X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=arch%2Fblackfin%2Fmach-bf537%2Fboards%2Fgeneric_board.c;h=3e52f3f5bd5888b7aa0e0d0c7b10242531a011ec;hb=f9f7dd222364a6428d2ad99a515935dd1dd89d18;hp=6668c8e4a3fc953fb95f7f1a899a5e1212945985;hpb=efefc6eb38d43b8e5daef482f575d767b002004e;p=linux-2.6 diff --git a/arch/blackfin/mach-bf537/boards/generic_board.c b/arch/blackfin/mach-bf537/boards/generic_board.c index 6668c8e4a3..3e52f3f5bd 100644 --- a/arch/blackfin/mach-bf537/boards/generic_board.c +++ b/arch/blackfin/mach-bf537/boards/generic_board.c @@ -8,7 +8,7 @@ * * Modified: * Copyright 2005 National ICT Australia (NICTA) - * Copyright 2004-2007 Analog Devices Inc. + * Copyright 2004-2008 Analog Devices Inc. * * Bugs: Enter bugs at http://blackfin.uclinux.org/ * @@ -29,13 +29,14 @@ */ #include +#include #include #include #include #include #include #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) -#include +#include #endif #include #include @@ -44,12 +45,13 @@ #include #include #include +#include #include /* * Name the Board for the /proc/cpuinfo */ -char *bfin_board_name = "GENERIC Board"; +const char bfin_board_name[] = "GENERIC Board"; /* * Driver needs to know address, irq and flag pin. @@ -203,12 +205,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 @@ -502,7 +500,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { .platform_data = &bfin_ad7877_ts_info, .irq = IRQ_PF6, .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */ - .bus_num = 1, + .bus_num = 0, .chip_select = 1, .controller_data = &spi_ad7877_chip_info, }, @@ -513,6 +511,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { 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}, }; /* SPI (0) */ @@ -730,3 +729,12 @@ void native_machine_restart(char *cmd) if ((bfin_read_SYSCR() & 0x7) == 0x3) bfin_gpio_reset_spi0_ssel1(); } + +#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) +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); +#endif