X-Git-Url: http://pilppa.org/gitweb/?a=blobdiff_plain;f=arch%2Fblackfin%2Fmach-bf537%2Fboards%2Fstamp.c;h=07b0dc273d2f0b13ba87a3ec089b52f54af356be;hb=233b28a91caf7cff326e604c437a364eaf794106;hp=cc41f6c2ef4f515c65f5e4f99b3e027b41d96045;hpb=527da38d33f16da4c245da3a5a3858193f8a0261;p=linux-2.6-omap-h63xx.git diff --git a/arch/blackfin/mach-bf537/boards/stamp.c b/arch/blackfin/mach-bf537/boards/stamp.c index cc41f6c2ef4..07b0dc273d2 100644 --- a/arch/blackfin/mach-bf537/boards/stamp.c +++ b/arch/blackfin/mach-bf537/boards/stamp.c @@ -35,7 +35,7 @@ #include #include #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) -#include +#include #endif #include #include @@ -44,6 +44,7 @@ #include #include #include +#include #include /* @@ -182,6 +183,28 @@ static struct platform_device dm9000_device = { }; #endif +#if defined(CONFIG_AX88180) || defined(CONFIG_AX88180_MODULE) +static struct resource ax88180_resources[] = { + [0] = { + .start = 0x20300000, + .end = 0x20300000 + 0x8000, + .flags = IORESOURCE_MEM, + }, + [1] = { + .start = IRQ_PF7, + .end = IRQ_PF7, + .flags = (IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL), + }, +}; + +static struct platform_device ax88180_device = { + .name = "ax88180", + .id = -1, + .num_resources = ARRAY_SIZE(ax88180_resources), + .resource = ax88180_resources, +}; +#endif + #if defined(CONFIG_USB_SL811_HCD) || defined(CONFIG_USB_SL811_HCD_MODULE) static struct resource sl811_hcd_resources[] = { { @@ -450,7 +473,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { #if defined(CONFIG_SPI_MMC) || defined(CONFIG_SPI_MMC_MODULE) { .modalias = "spi_mmc_dummy", - .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */ + .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */ .bus_num = 0, .chip_select = 0, .platform_data = NULL, @@ -459,7 +482,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { }, { .modalias = "spi_mmc", - .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */ + .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */ .bus_num = 0, .chip_select = CONFIG_SPI_MMC_CS_CHAN, .platform_data = NULL, @@ -502,7 +525,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 +536,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) */ @@ -554,15 +578,20 @@ static struct platform_device bfin_fb_adv7393_device = { #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) static struct resource bfin_uart_resources[] = { +#ifdef CONFIG_SERIAL_BFIN_UART0 { .start = 0xFFC00400, .end = 0xFFC004FF, .flags = IORESOURCE_MEM, - }, { + }, +#endif +#ifdef CONFIG_SERIAL_BFIN_UART1 + { .start = 0xFFC02000, .end = 0xFFC020FF, .flags = IORESOURCE_MEM, }, +#endif }; static struct platform_device bfin_uart_device = { @@ -612,7 +641,7 @@ static struct platform_device bfin_sport1_uart_device = { static struct pata_platform_info bfin_pata_platform_data = { .ioport_shift = 1, - .irq_type = IRQF_TRIGGER_HIGH | IRQF_DISABLED, + .irq_flags = IRQF_TRIGGER_HIGH | IRQF_DISABLED, }; static struct resource bfin_pata_resources[] = { @@ -669,6 +698,10 @@ static struct platform_device *stamp_devices[] __initdata = { &dm9000_device, #endif +#if defined(CONFIG_AX88180) || defined(CONFIG_AX88180_MODULE) + &ax88180_device, +#endif + #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) &bfin_mac_device, #endif @@ -730,3 +763,14 @@ void native_machine_restart(char *cmd) if ((bfin_read_SYSCR() & 0x7) == 0x3) bfin_gpio_reset_spi0_ssel1(); } + +/* + * Currently the MAC address is saved in Flash by U-Boot + */ +#define FLASH_MAC 0x203f0000 +void bfin_get_ether_addr(char *addr) +{ + *(u32 *)(&(addr[0])) = bfin_read32(FLASH_MAC); + *(u16 *)(&(addr[4])) = bfin_read16(FLASH_MAC + 4); +} +EXPORT_SYMBOL(bfin_get_ether_addr);