diff --git a/MLO.byteswap b/MLO.byteswap index c1b1af2..fa42848 100644 Binary files a/MLO.byteswap and b/MLO.byteswap differ diff --git a/board/ti/am335x/board.c b/board/ti/am335x/board.c index 7704718..0837d92 100644 --- a/board/ti/am335x/board.c +++ b/board/ti/am335x/board.c @@ -90,7 +90,7 @@ int board_is_evm_15_or_later(void) * Read header information from EEPROM into global structure. */ static int read_eeprom(void) -{ +{ /* Check if baseboard eeprom is available */ if (i2c_probe(CONFIG_SYS_I2C_EEPROM_ADDR)) { puts("Could not probe the EEPROM; something fundamentally " @@ -106,12 +106,12 @@ static int read_eeprom(void) return -EIO; } - if (header.magic != 0xEE3355AA) { + //if (header.magic != 0xEE3355AA) { /* * read the eeprom using i2c again, * but use only a 1 byte address */ - if (i2c_read(CONFIG_SYS_I2C_EEPROM_ADDR, 0, 1, + /* if (i2c_read(CONFIG_SYS_I2C_EEPROM_ADDR, 0, 1, (uchar *)&header, sizeof(header))) { puts("Could not read the EEPROM; something " "fundamentally wrong on the I2C bus.\n"); @@ -123,7 +123,7 @@ static int read_eeprom(void) header.magic); return -EINVAL; } - } + }*/ return 0; } @@ -651,13 +651,16 @@ void s_init(void) #endif /* Initalize the board header */ - enable_i2c0_pin_mux(); + enable_i2c1_pin_mux(); + i2c_set_bus_num(1); i2c_init(CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE); #ifndef CONFIG_NOR_BOOT - if (read_eeprom() < 0) - puts("Could not get board ID.\n"); + //if (read_eeprom() < 0) + // puts("Could not get board ID.\n"); #endif + + /* Check if baseboard eeprom is available */ if (i2c_probe(CONFIG_SYS_I2C_EEPROM_ADDR)) { puts("Could not probe the EEPROM; something fundamentally " @@ -671,12 +674,12 @@ void s_init(void) " wrong on the I2C bus.\n"); } - if (header.magic != 0xEE3355AA) { + //if (header.magic != 0xEE3355AA) { /* * read the eeprom using i2c again, * but use only a 1 byte address */ - if (i2c_read(CONFIG_SYS_I2C_EEPROM_ADDR, 0, 1, + /*if (i2c_read(CONFIG_SYS_I2C_EEPROM_ADDR, 0, 1, (uchar *)&header, sizeof(header))) { puts("Could not read the EEPROM; something " "fundamentally wrong on the I2C bus.\n"); @@ -688,8 +691,11 @@ void s_init(void) header.magic); hang(); } - } - + }*/ + header.magic=0xEE3355AA; + strcpy(header.name,"A335X_SK"); + strcpy(header.version,"1.2B"); + strcpy(header.serial,"8SKU"); enable_board_pin_mux(&header); if (!strncmp("A335X_SK", header.name, HDR_NAME_LEN)) { /* @@ -728,8 +734,8 @@ void s_init(void) int board_init(void) { i2c_init(CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE); - if (read_eeprom() < 0) - puts("Could not get board ID.\n"); + //if (read_eeprom() < 0) + // puts("Could not get board ID.\n"); gd->bd->bi_boot_params = PHYS_DRAM_1 + 0x100; diff --git a/board/ti/am335x/board.h b/board/ti/am335x/board.h index 48e112e..598d4bd 100644 --- a/board/ti/am335x/board.h +++ b/board/ti/am335x/board.h @@ -50,5 +50,6 @@ void enable_uart3_pin_mux(void); void enable_uart4_pin_mux(void); void enable_uart5_pin_mux(void); void enable_i2c0_pin_mux(void); +void enable_i2c1_pin_mux(void); void enable_board_pin_mux(struct am335x_baseboard_id *header); #endif diff --git a/board/ti/am335x/mux.c b/board/ti/am335x/mux.c index 85e83bb..529a224 100644 --- a/board/ti/am335x/mux.c +++ b/board/ti/am335x/mux.c @@ -275,6 +275,11 @@ void enable_i2c0_pin_mux(void) configure_module_pin_mux(i2c0_pin_mux); } +void enable_i2c1_pin_mux(void) +{ + configure_module_pin_mux(i2c1_pin_mux); +} + /* * The AM335x GP EVM, if daughter card(s) are connected, can have 8 * different profiles. These profiles determine what peripherals are @@ -349,7 +354,7 @@ void enable_board_pin_mux(struct am335x_baseboard_id *header) configure_module_pin_mux(mmc0_no_cd_pin_mux); } else if (!strncmp(header->name, "A335X_SK", HDR_NAME_LEN)) { /* Starter Kit EVM */ - configure_module_pin_mux(i2c1_pin_mux); + configure_module_pin_mux(i2c0_pin_mux); configure_module_pin_mux(gpio0_7_pin_mux); configure_module_pin_mux(rgmii1_pin_mux); configure_module_pin_mux(mmc0_pin_mux_sk_evm);