]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - board/freescale/mx6slevk/mx6slevk.c
Merge branch 'master' of git://git.denx.de/u-boot-imx
[karo-tx-uboot.git] / board / freescale / mx6slevk / mx6slevk.c
index d2b64cc35748ec3cd518fede6f7c0dad8f5aaea5..a500133efae1b08b3c416dd202bb5ef2b654c0f2 100644 (file)
@@ -13,6 +13,7 @@
 #include <asm/arch/sys_proto.h>
 #include <asm/gpio.h>
 #include <asm/imx-common/iomux-v3.h>
+#include <asm/imx-common/spi.h>
 #include <asm/io.h>
 #include <linux/sizes.h>
 #include <common.h>
@@ -82,6 +83,11 @@ static iomux_v3_cfg_t ecspi1_pads[] = {
        MX6_PAD_ECSPI1_SS0__GPIO4_IO11  | MUX_PAD_CTRL(NO_PAD_CTRL),
 };
 
+int board_spi_cs_gpio(unsigned bus, unsigned cs)
+{
+       return (bus == 0 && cs == 0) ? (IMX_GPIO_NR(4, 11)) : -1;
+}
+
 static void setup_spi(void)
 {
        imx_iomux_v3_setup_multiple_pads(ecspi1_pads, ARRAY_SIZE(ecspi1_pads));
@@ -130,8 +136,7 @@ int board_eth_init(bd_t *bis)
 
 static int setup_fec(void)
 {
-       struct iomuxc_base_regs *iomuxc_regs =
-                               (struct iomuxc_base_regs *)IOMUXC_BASE_ADDR;
+       struct iomuxc *iomuxc_regs = (struct iomuxc *)IOMUXC_BASE_ADDR;
        int ret;
 
        /* clear gpr1[14], gpr1[18:17] to select anatop clock */