splash_source: add support for filesystem formatted mmc
[oweals/u-boot.git] / board / compulab / cm_t35 / cm_t35.c
index 886c7239005a9dc323c67fe6c9fef5be2879c563..189d903b6e39c804edc444041f235e1bbafb6a66 100644 (file)
@@ -19,6 +19,7 @@
 #include <i2c.h>
 #include <usb.h>
 #include <mmc.h>
+#include <splash.h>
 #include <twl4030.h>
 #include <linux/compiler.h>
 
@@ -59,11 +60,19 @@ void get_board_mem_timings(struct board_sdrc_timings *timings)
 }
 #endif
 
-#define CM_T35_SPLASH_NAND_OFFSET 0x100000
+struct splash_location splash_locations[] = {
+       {
+               .name = "nand",
+               .storage = SPLASH_STORAGE_NAND,
+               .flags = SPLASH_STORAGE_RAW,
+               .offset = 0x100000,
+       },
+};
 
 int splash_screen_prepare(void)
 {
-       return cl_splash_screen_prepare(CM_T35_SPLASH_NAND_OFFSET);
+       return splash_source_load(splash_locations,
+                                 ARRAY_SIZE(splash_locations));
 }
 
 /*
@@ -96,13 +105,13 @@ int board_init(void)
  */
 u32 get_board_rev(void)
 {
-       return cl_eeprom_get_board_rev();
+       return cl_eeprom_get_board_rev(CONFIG_SYS_I2C_EEPROM_BUS);
 };
 
 int misc_init_r(void)
 {
        cl_print_pcb_info();
-       dieid_num_r();
+       omap_die_id_display();
 
        return 0;
 }
@@ -382,6 +391,13 @@ int board_mmc_init(bd_t *bis)
 }
 #endif
 
+#if defined(CONFIG_GENERIC_MMC)
+void board_mmc_power_init(void)
+{
+       twl4030_power_mmc_init(0);
+}
+#endif
+
 #ifdef CONFIG_SYS_I2C_OMAP34XX
 /*
  * Routine: reset_net_chip
@@ -422,11 +438,11 @@ static int handle_mac_address(void)
        if (rc)
                return 0;
 
-       rc = cl_eeprom_read_mac_addr(enetaddr);
+       rc = cl_eeprom_read_mac_addr(enetaddr, CONFIG_SYS_I2C_EEPROM_BUS);
        if (rc)
                return rc;
 
-       if (!is_valid_ether_addr(enetaddr))
+       if (!is_valid_ethaddr(enetaddr))
                return -1;
 
        return eth_setenv_enetaddr("ethaddr", enetaddr);