3 * Stefan Roese, DENX Software Engineering, sr@denx.de.
5 * See file CREDITS for list of people who contributed to this
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License as
10 * published by the Free Software Foundation; either version 2 of
11 * the License, or (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
27 #include <asm/processor.h>
30 #if defined(CONFIG_TAISHAN)
32 const uchar bootstrap_buf[16] = {
51 static int update_boot_eeprom(void)
54 uchar chip = CFG_BOOTSTRAP_IIC_ADDR;
55 uchar *pbuf = (uchar *)bootstrap_buf;
58 for (ii = 0; ii < len; ii++) {
59 if (i2c_write(chip, ii, 1, &pbuf[ii], 1) != 0) {
60 printf("i2c_write failed\n");
65 for (jj = 0; jj < 10; jj++)
71 int do_update_boot_eeprom(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
73 return update_boot_eeprom();
76 U_BOOT_CMD(update_boot_eeprom, 1, 1, do_update_boot_eeprom,
77 "update_boot_eeprom - update bootstrap eeprom content\n", NULL);