3 * Stefan Roese, DENX Software Engineering, sr@denx.de.
5 * SPDX-License-Identifier: GPL-2.0+
11 #include <asm/processor.h>
13 #include <asm/ppc4xx-gpio.h>
16 #if defined(CONFIG_ZEUS)
19 /*00 01 02 03 04 05 06 07 */
20 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
21 /*08 09 0a 0b 0c 0d 0e 0f */
22 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
23 /*10 11 12 13 14 15 16 17 */
24 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
25 /*18 19 1a 1b 1c 1d 1e 1f */
26 0x00, 0xc0, 0x50, 0x12, 0x72, 0x3e, 0x00, 0x00 };
30 /* CPU_CLOCK_DIV 1 = 00
31 CPU_PLB_FREQ_DIV 3 = 10
32 OPB_PLB_FREQ_DIV 2 = 01
33 EBC_PLB_FREQ_DIV 2 = 00
34 MAL_PLB_FREQ_DIV 1 = 00
35 PCI_PLB_FRQ_DIV 3 = 10
37 PLL_OPERATING = IS NOT SET
42 /*00 01 02 03 04 05 06 07 */
43 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
44 /*08 09 0a 0b 0c 0d 0e 0f */
45 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
46 /*10 11 12 13 14 15 16 17 */
47 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
48 /*18 19 1a 1b 1c 1d 1e 1f */
49 0x00, 0x60, 0x68, 0x2d, 0x42, 0xbe, 0x00, 0x00 };
51 static int update_boot_eeprom(void)
54 u8 chip = CONFIG_SYS_I2C_EEPROM_ADDR;
59 if (in_be32((void *)GPIO0_IR) & GPIO_VAL(CONFIG_SYS_GPIO_ZEUS_PE)) {
67 for (i = 0; i < len; i++, base++) {
68 if (i2c_write(chip, base, 1, &pbuf[i], 1) != 0) {
69 printf("i2c_write fail\n");
78 int do_update_boot_eeprom(cmd_tbl_t* cmdtp, int flag, int argc, char * const argv[])
80 return update_boot_eeprom();
84 update_boot_eeprom, 1, 1, do_update_boot_eeprom,
85 "update boot eeprom content",