]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - board/bf527-ezkit/bf527-ezkit.c
colibri_vf: Add pinmux entries for GPIOs
[karo-tx-uboot.git] / board / bf527-ezkit / bf527-ezkit.c
index 2cbfa8d03acf72c2ae2b2231cc70140c477853ca..b551d4ed7e34ece6c2c31c741e561d819a8d7bcc 100644 (file)
@@ -12,7 +12,7 @@
 #include <net.h>
 #include <netdev.h>
 #include <asm/blackfin.h>
-#include <asm/net.h>
+#include <asm/gpio.h>
 #include <asm/mach-common/bits/otp.h>
 
 DECLARE_GLOBAL_DATA_PTR;
@@ -24,18 +24,9 @@ int checkboard(void)
        return 0;
 }
 
-phys_size_t initdram(int board_type)
-{
-       gd->bd->bi_memstart = CONFIG_SYS_SDRAM_BASE;
-       gd->bd->bi_memsize = CONFIG_SYS_MAX_RAM_SIZE;
-       return gd->bd->bi_memsize;
-}
-
 #ifdef CONFIG_BFIN_MAC
 static void board_init_enetaddr(uchar *mac_addr)
 {
-       bool valid_mac = false;
-
        /* the MAC is stored in OTP memory page 0xDF */
        uint32_t ret;
        uint64_t otp_mac;
@@ -47,16 +38,9 @@ static void board_init_enetaddr(uchar *mac_addr)
                for (ret = 0; ret < 6; ++ret)
                        mac_addr[ret] = otp_mac_p[5 - ret];
 
-               if (is_valid_ether_addr(mac_addr))
-                       valid_mac = true;
-       }
-
-       if (!valid_mac) {
-               puts("Warning: Generating 'random' MAC address\n");
-               bfin_gen_rand_mac(mac_addr);
+               if (is_valid_ethaddr(mac_addr))
+                       eth_setenv_enetaddr("ethaddr", mac_addr);
        }
-
-       eth_setenv_enetaddr("ethaddr", mac_addr);
 }
 
 int board_eth_init(bd_t *bis)
@@ -75,3 +59,14 @@ int misc_init_r(void)
 
        return 0;
 }
+
+#ifdef CONFIG_USB_BLACKFIN
+void board_musb_init(void)
+{
+       /*
+        * BF527 EZ-KITs require PG13 to be high for HOST mode
+        */
+       gpio_request(GPIO_PG13, "musb-vbus");
+       gpio_direction_output(GPIO_PG13, 1);
+}
+#endif