]> Pileus Git - ~andy/linux/blobdiff - arch/blackfin/mach-bf537/boards/pnav10.c
[Blackfin] arch: Fix BUG gpio_direction_output API is not compatitable with GENERIC_G...
[~andy/linux] / arch / blackfin / mach-bf537 / boards / pnav10.c
index 20507e92a3a4bfbd334d06eb324492c0bbd665cd..4c4870590bd868d4f9b9151ae912264ed7dce58a 100644 (file)
  */
 
 #include <linux/device.h>
+#include <linux/etherdevice.h>
 #include <linux/platform_device.h>
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/partitions.h>
 #include <linux/spi/spi.h>
 #include <linux/spi/flash.h>
 #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE)
-#include <linux/usb_isp1362.h>
+#include <linux/usb/isp1362.h>
 #endif
 #include <linux/irq.h>
 #include <asm/dma.h>
 #include <asm/bfin5xx_spi.h>
-#include <linux/usb_sl811.h>
+#include <asm/portmux.h>
+#include <linux/usb/sl811.h>
 
 #include <linux/spi/ad7877.h>
 
 /*
  * Name the Board for the /proc/cpuinfo
  */
-char *bfin_board_name = "PNAV-1.0";
+const char bfin_board_name[] = "PNAV-1.0";
 
 /*
  *  Driver needs to know address, irq and flag pin.
@@ -132,12 +134,8 @@ static struct resource sl811_hcd_resources[] = {
 void sl811_port_power(struct device *dev, int is_on)
 {
        gpio_request(CONFIG_USB_SL811_BFIN_GPIO_VBUS, "usb:SL811_VBUS");
-       gpio_direction_output(CONFIG_USB_SL811_BFIN_GPIO_VBUS);
+       gpio_direction_output(CONFIG_USB_SL811_BFIN_GPIO_VBUS, is_on);
 
-       if (is_on)
-               gpio_set_value(CONFIG_USB_SL811_BFIN_GPIO_VBUS, 1);
-       else
-               gpio_set_value(CONFIG_USB_SL811_BFIN_GPIO_VBUS, 0);
 }
 #endif
 
@@ -295,7 +293,7 @@ static struct bfin5xx_spi_chip spi_mmc_chip_info = {
 
 #if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE)
 static struct bfin5xx_spi_chip spi_ad7877_chip_info = {
-       .cs_change_per_word = 1,
+       .cs_change_per_word = 0,
        .enable_dma = 0,
        .bits_per_word = 16,
 };
@@ -387,7 +385,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
        .platform_data          = &bfin_ad7877_ts_info,
        .irq                    = IRQ_PF2,
        .max_speed_hz           = 12500000,     /* max spi clock (SCK) speed in HZ */
-       .bus_num                = 1,
+       .bus_num                = 0,
        .chip_select            = 5,
        .controller_data = &spi_ad7877_chip_info,
 },
@@ -413,6 +411,7 @@ static struct resource bfin_spi0_resource[] = {
 static struct bfin5xx_spi_master bfin_spi0_info = {
        .num_chipselect = 8,
        .enable_dma = 1,  /* master has the ability to do dma transfer */
+       .pin_req = {P_SPI0_SCK, P_SPI0_MISO, P_SPI0_MOSI, 0},
 };
 
 static struct platform_device bfin_spi0_device = {
@@ -508,3 +507,10 @@ static int __init stamp_init(void)
 }
 
 arch_initcall(stamp_init);
+
+void bfin_get_ether_addr(char *addr)
+{
+       random_ether_addr(addr);
+       printk(KERN_WARNING "%s:%s: Setting Ethernet MAC to a random one\n", __FILE__, __func__);
+}
+EXPORT_SYMBOL(bfin_get_ether_addr);