]> git.sur5r.net Git - u-boot/blobdiff - board/logicpd/zoom2/zoom2.c
Merge branch 'u-boot-samsung/master' into 'u-boot-arm/master'
[u-boot] / board / logicpd / zoom2 / zoom2.c
index d9e2ae5021ef6b02c0ce61dbbcf0826c2a2ddfb4..ad6ae3669685f7a9652e810fdd6e04ca569c23d9 100644 (file)
  * MA 02111-1307 USA
  */
 #include <common.h>
+#include <netdev.h>
 #ifdef CONFIG_STATUS_LED
 #include <status_led.h>
 #endif
 #include <twl4030.h>
 #include <asm/io.h>
-#include <asm/arch/gpio.h>
+#include <asm/arch/mmc_host_def.h>
+#include <asm/gpio.h>
 #include <asm/arch/mem.h>
 #include <asm/arch/mux.h>
 #include <asm/arch/sys_proto.h>
 #include "zoom2.h"
 #include "zoom2_serial.h"
 
+DECLARE_GLOBAL_DATA_PTR;
+
 /*
  * This the the zoom2, board specific, gpmc configuration for the
  * quad uart on the debug board.   The more general gpmc configurations
- * are setup at the cpu level in cpu/arm_cortexa8/omap3/mem.c
+ * are setup at the cpu level in arch/arm/cpu/armv7/omap3/mem.c
  *
  * The details of the setting of the serial gpmc setup are not available.
  * The values were provided by another party.
  */
-void enable_gpmc_cs_config(u32 *gpmc_config, struct gpmc_cs *cs, u32 base,
-                       u32 size);
-
 static u32 gpmc_serial_TL16CP754C[GPMC_MAX_REG] = {
        0x00011000,
        0x001F1F01,
@@ -89,12 +90,11 @@ void zoom2_identify(void)
         * and they are not commonly used.  They are mentioned here
         * only for completeness.
         */
-       if (!omap_request_gpio(94)) {
+       if (!gpio_request(94, "")) {
                unsigned int val;
 
-               omap_set_gpio_direction(94, 1);
-               val = omap_get_gpio_datain(94);
-               omap_free_gpio(94);
+               gpio_direction_input(94);
+               val = gpio_get_value(94);
 
                if (val)
                        revision = ZOOM2_REVISION_BETA;
@@ -122,14 +122,13 @@ void zoom2_identify(void)
  */
 int board_init (void)
 {
-       DECLARE_GLOBAL_DATA_PTR;
        u32 *gpmc_config;
 
        gpmc_init ();           /* in SRAM or SDRAM, finish GPMC */
 
        /* Configure console support on zoom2 */
        gpmc_config = gpmc_serial_TL16CP754C;
-       enable_gpmc_cs_config(gpmc_config, &gpmc_cfg->cs[4],
+       enable_gpmc_cs_config(gpmc_config, &gpmc_cfg->cs[3],
                        SERIAL_TL16CP754C_BASE, GPMC_SIZE_16M);
 
        /* board id for Linux */
@@ -151,7 +150,7 @@ int misc_init_r(void)
 {
        zoom2_identify();
        twl4030_power_init();
-       twl4030_led_init();
+       twl4030_led_init(TWL4030_LED_LEDEN_LEDAON | TWL4030_LED_LEDEN_LEDBON);
        dieid_num_r();
 
        /*
@@ -180,3 +179,21 @@ void set_muxconf_regs (void)
        /* platform specific muxes */
        MUX_ZOOM2 ();
 }
+
+#ifdef CONFIG_GENERIC_MMC
+int board_mmc_init(bd_t *bis)
+{
+       return omap_mmc_init(0, 0, 0, -1, -1);
+}
+#endif
+
+#ifdef CONFIG_CMD_NET
+int board_eth_init(bd_t *bis)
+{
+       int rc = 0;
+#ifdef CONFIG_LAN91C96
+       rc = lan91c96_initialize(0, CONFIG_LAN91C96_BASE);
+#endif
+       return rc;
+}
+#endif