]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - arch/blackfin/mach-bf533/boards/stamp.c
Merge branch 'master' into tk71
[mv-sheeva.git] / arch / blackfin / mach-bf533 / boards / stamp.c
index c457eaa60239e4e2281553114302c1001eeabdff..43224ef00b8cddff96024a89d791e08cfe39a9db 100644 (file)
@@ -184,7 +184,7 @@ static struct bfin5xx_spi_chip spi_adc_chip_info = {
 };
 #endif
 
-#if defined(CONFIG_SND_BLACKFIN_AD183X) || defined(CONFIG_SND_BLACKFIN_AD183X_MODULE)
+#if defined(CONFIG_SND_BF5XX_SOC_AD183X) || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE)
 static struct bfin5xx_spi_chip ad1836_spi_chip_info = {
        .enable_dma = 0,
        .bits_per_word = 16,
@@ -251,13 +251,15 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
        },
 #endif
 
-#if defined(CONFIG_SND_BLACKFIN_AD183X) || defined(CONFIG_SND_BLACKFIN_AD183X_MODULE)
+#if defined(CONFIG_SND_BF5XX_SOC_AD183X) || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE)
        {
-               .modalias = "ad1836",
+               .modalias = "ad183x",
                .max_speed_hz = 3125000,     /* max spi clock (SCK) speed in HZ */
                .bus_num = 0,
-               .chip_select = CONFIG_SND_BLACKFIN_SPI_PFBIT,
+               .chip_select = 4,
+               .platform_data = "ad1836", /* only includes chip name for the moment */
                .controller_data = &ad1836_spi_chip_info,
+               .mode = SPI_MODE_3,
        },
 #endif
 
@@ -351,7 +353,7 @@ static struct resource bfin_uart0_resources[] = {
        },
 };
 
-unsigned short bfin_uart0_peripherals[] = {
+static unsigned short bfin_uart0_peripherals[] = {
        P_UART0_TX, P_UART0_RX, 0
 };
 
@@ -416,9 +418,9 @@ static struct resource bfin_sport0_uart_resources[] = {
        },
 };
 
-unsigned short bfin_sport0_peripherals[] = {
+static unsigned short bfin_sport0_peripherals[] = {
        P_SPORT0_TFS, P_SPORT0_DTPRI, P_SPORT0_TSCLK, P_SPORT0_RFS,
-       P_SPORT0_DRPRI, P_SPORT0_RSCLK, P_SPORT0_DRSEC, P_SPORT0_DTSEC, 0
+       P_SPORT0_DRPRI, P_SPORT0_RSCLK, 0
 };
 
 static struct platform_device bfin_sport0_uart_device = {
@@ -450,9 +452,9 @@ static struct resource bfin_sport1_uart_resources[] = {
        },
 };
 
-unsigned short bfin_sport1_peripherals[] = {
+static unsigned short bfin_sport1_peripherals[] = {
        P_SPORT1_TFS, P_SPORT1_DTPRI, P_SPORT1_TSCLK, P_SPORT1_RFS,
-       P_SPORT1_DRPRI, P_SPORT1_RSCLK, P_SPORT1_DRSEC, P_SPORT1_DTSEC, 0
+       P_SPORT1_DRPRI, P_SPORT1_RSCLK, 0
 };
 
 static struct platform_device bfin_sport1_uart_device = {
@@ -494,8 +496,8 @@ static struct platform_device bfin_device_gpiokeys = {
 #include <linux/i2c-gpio.h>
 
 static struct i2c_gpio_platform_data i2c_gpio_data = {
-       .sda_pin                = 2,
-       .scl_pin                = 3,
+       .sda_pin                = GPIO_PF2,
+       .scl_pin                = GPIO_PF3,
        .sda_is_open_drain      = 0,
        .scl_is_open_drain      = 0,
        .udelay                 = 40,
@@ -533,6 +535,11 @@ static struct i2c_board_info __initdata bfin_i2c_board_info[] = {
                I2C_BOARD_INFO("bfin-adv7393", 0x2B),
        },
 #endif
+#if defined(CONFIG_BFIN_TWI_LCD) || defined(CONFIG_BFIN_TWI_LCD_MODULE)
+       {
+               I2C_BOARD_INFO("ad5252", 0x2f),
+       },
+#endif
 };
 
 static const unsigned int cclk_vlev_datasheet[] =
@@ -666,10 +673,16 @@ static int __init stamp_init(void)
                return ret;
 
 #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE)
-       /* setup BF533_STAMP CPLD to route AMS3 to Ethernet MAC */
-       bfin_write_FIO_DIR(bfin_read_FIO_DIR() | PF0);
-       bfin_write_FIO_FLAG_S(PF0);
-       SSYNC();
+       /*
+        * setup BF533_STAMP CPLD to route AMS3 to Ethernet MAC.
+        * the bfin-async-map driver takes care of flipping between
+        * flash and ethernet when necessary.
+        */
+       ret = gpio_request(GPIO_PF0, "enet_cpld");
+       if (!ret) {
+               gpio_direction_output(GPIO_PF0, 1);
+               gpio_free(GPIO_PF0);
+       }
 #endif
 
        spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info));
@@ -705,7 +718,6 @@ void __init native_machine_early_platform_add_devices(void)
 void native_machine_restart(char *cmd)
 {
        /* workaround pull up on cpld / flash pin not being strong enough */
-       bfin_write_FIO_INEN(~PF0);
-       bfin_write_FIO_DIR(PF0);
-       bfin_write_FIO_FLAG_C(PF0);
+       gpio_request(GPIO_PF0, "flash_cpld");
+       gpio_direction_output(GPIO_PF0, 0);
 }