diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-01-27 16:15:24 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-01-27 16:15:24 -0500 |
commit | 91525300baf162e83e923b09ca286f9205e21522 (patch) | |
tree | 115f50c0f270eb1bb032dc520e018d9aa65b957c /arch/blackfin/mach-bf533/boards | |
parent | 991dee591a99d035796a8c194eb1796cc020e142 (diff) | |
parent | 9c5e710bc1431f41ccdd0c294fa355aa0d45d2d7 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/blackfin-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/blackfin-2.6: (54 commits)
MAINTIANERS: just use Mike gmail e-mail for contact and pawn the serial driver off onto Sonic
[Blackfin] arch: remove old I2C BF54x porting.
[Blackfin] arch: Add the semtimedop syscall. Upstream uClibc doesn't compile without it.
[Blackfin] arch: fix bug kernel boot message: memory information is not reasonable
[Blackfin] arch: use common flash driver to setup partitions rather than the bf5xx-flash driver
[Blackfin] arch: Fix bug - kernel build with Debug option enabled fails to boot up
[Blackfin] arch: Fix bug Only RTC interrupt can wake up deeper sleep core.
[Blackfin] arch: Add proper SW System Reset delay sequence
[Blackfin] arch: Update copyright date
[Blackfin] arch: GPIO API cleanup and anomaly update
[Blackfin] arch: Fix BUG gpio_direction_output API is not compatitable with GENERIC_GPIO API interface
[Blackfin] arch: Initial checkin of the memory protection support.
[Blackfin] arch: set_bfin_dma_config shouldnt set SYNC or RESTART by default - add argument or option
[Blackfin] arch: Add some comments - fix semicolons
[Blackfin] arch: move all code related to CPLB handling into a new subdirectory under kernel/
[Blackfin] arch: print out list of modules if kernel is crashing and tell people if the kernel is tainted
[Blackfin] arch: enable generic GPIO based I2C driver in STAMP-BF533, EZKIT-BF533 and EZKIT-BF561 boards
[Blackfin] arch: Don't oops_in_progress if single step is comming from the kernel
[Blackfin] arch: Fix BUG - kernel sometimes would stuck with KEYBOARD_GPIO on
[Blackfin] arch: update to latest anomaly sheets
...
Diffstat (limited to 'arch/blackfin/mach-bf533/boards')
-rw-r--r-- | arch/blackfin/mach-bf533/boards/H8606.c | 83 | ||||
-rw-r--r-- | arch/blackfin/mach-bf533/boards/ezkit.c | 52 | ||||
-rw-r--r-- | arch/blackfin/mach-bf533/boards/stamp.c | 103 |
3 files changed, 231 insertions, 7 deletions
diff --git a/arch/blackfin/mach-bf533/boards/H8606.c b/arch/blackfin/mach-bf533/boards/H8606.c index 6bcf4047f89c..a72c7a620fa1 100644 --- a/arch/blackfin/mach-bf533/boards/H8606.c +++ b/arch/blackfin/mach-bf533/boards/H8606.c | |||
@@ -40,6 +40,7 @@ | |||
40 | #endif | 40 | #endif |
41 | #include <linux/pata_platform.h> | 41 | #include <linux/pata_platform.h> |
42 | #include <linux/irq.h> | 42 | #include <linux/irq.h> |
43 | |||
43 | #include <asm/dma.h> | 44 | #include <asm/dma.h> |
44 | #include <asm/bfin5xx_spi.h> | 45 | #include <asm/bfin5xx_spi.h> |
45 | #include <asm/reboot.h> | 46 | #include <asm/reboot.h> |
@@ -303,7 +304,77 @@ static struct platform_device bfin_uart_device = { | |||
303 | }; | 304 | }; |
304 | #endif | 305 | #endif |
305 | 306 | ||
306 | static struct platform_device *stamp_devices[] __initdata = { | 307 | #if defined(CONFIG_SERIAL_8250) || defined(CONFIG_SERIAL_8250_MODULE) |
308 | |||
309 | #include <linux/serial_8250.h> | ||
310 | #include <linux/serial.h> | ||
311 | |||
312 | /* | ||
313 | * Configuration for two 16550 UARTS in FPGA at addresses 0x20200000 and 0x202000010. | ||
314 | * running at half system clock, both with interrupt output or-ed to PF8. Change to | ||
315 | * suit different FPGA configuration, or to suit real 16550 UARTS connected to the bus | ||
316 | */ | ||
317 | |||
318 | static struct plat_serial8250_port serial8250_platform_data [] = { | ||
319 | { | ||
320 | .membase = 0x20200000, | ||
321 | .mapbase = 0x20200000, | ||
322 | .irq = IRQ_PF8, | ||
323 | .flags = UPF_BOOT_AUTOCONF | UART_CONFIG_TYPE, | ||
324 | .iotype = UPIO_MEM, | ||
325 | .regshift = 1, | ||
326 | .uartclk = 66666667, | ||
327 | }, { | ||
328 | .membase = 0x20200010, | ||
329 | .mapbase = 0x20200010, | ||
330 | .irq = IRQ_PF8, | ||
331 | .flags = UPF_BOOT_AUTOCONF | UART_CONFIG_TYPE, | ||
332 | .iotype = UPIO_MEM, | ||
333 | .regshift = 1, | ||
334 | .uartclk = 66666667, | ||
335 | }, { | ||
336 | } | ||
337 | }; | ||
338 | |||
339 | static struct platform_device serial8250_device = { | ||
340 | .id = PLAT8250_DEV_PLATFORM, | ||
341 | .name = "serial8250", | ||
342 | .dev = { | ||
343 | .platform_data = serial8250_platform_data, | ||
344 | }, | ||
345 | }; | ||
346 | |||
347 | #endif | ||
348 | |||
349 | #if defined(CONFIG_KEYBOARD_OPENCORES) || defined(CONFIG_KEYBOARD_OPENCORES_MODULE) | ||
350 | |||
351 | /* | ||
352 | * Configuration for one OpenCores keyboard controller in FPGA at address 0x20200030, | ||
353 | * interrupt output wired to PF9. Change to suit different FPGA configuration | ||
354 | */ | ||
355 | |||
356 | static struct resource opencores_kbd_resources[] = { | ||
357 | [0] = { | ||
358 | .start = 0x20200030, | ||
359 | .end = 0x20300030 + 2, | ||
360 | .flags = IORESOURCE_MEM, | ||
361 | }, | ||
362 | [1] = { | ||
363 | .start = IRQ_PF9, | ||
364 | .end = IRQ_PF9, | ||
365 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE, | ||
366 | }, | ||
367 | }; | ||
368 | |||
369 | static struct platform_device opencores_kbd_device = { | ||
370 | .id = -1, | ||
371 | .name = "opencores-kbd", | ||
372 | .resource = opencores_kbd_resources, | ||
373 | .num_resources = ARRAY_SIZE(opencores_kbd_resources), | ||
374 | }; | ||
375 | #endif | ||
376 | |||
377 | static struct platform_device *h8606_devices[] __initdata = { | ||
307 | #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) | 378 | #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) |
308 | &rtc_device, | 379 | &rtc_device, |
309 | #endif | 380 | #endif |
@@ -327,13 +398,21 @@ static struct platform_device *stamp_devices[] __initdata = { | |||
327 | #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) | 398 | #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) |
328 | &bfin_uart_device, | 399 | &bfin_uart_device, |
329 | #endif | 400 | #endif |
401 | |||
402 | #if defined(CONFIG_SERIAL_8250) || defined(CONFIG_SERIAL_8250_MODULE) | ||
403 | &serial8250_device, | ||
404 | #endif | ||
405 | |||
406 | #if defined(CONFIG_KEYBOARD_OPENCORES) || defined(CONFIG_KEYBOARD_OPENCORES_MODULE) | ||
407 | &opencores_kbd_device, | ||
408 | #endif | ||
330 | }; | 409 | }; |
331 | 410 | ||
332 | static int __init H8606_init(void) | 411 | static int __init H8606_init(void) |
333 | { | 412 | { |
334 | printk(KERN_INFO "HV Sistemas H8606 board support by http://www.hvsistemas.com\n"); | 413 | printk(KERN_INFO "HV Sistemas H8606 board support by http://www.hvsistemas.com\n"); |
335 | printk(KERN_INFO "%s(): registering device resources\n", __FUNCTION__); | 414 | printk(KERN_INFO "%s(): registering device resources\n", __FUNCTION__); |
336 | platform_add_devices(stamp_devices, ARRAY_SIZE(stamp_devices)); | 415 | platform_add_devices(h8606_devices, ARRAY_SIZE(h8606_devices)); |
337 | #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) | 416 | #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) |
338 | spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info)); | 417 | spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info)); |
339 | #endif | 418 | #endif |
diff --git a/arch/blackfin/mach-bf533/boards/ezkit.c b/arch/blackfin/mach-bf533/boards/ezkit.c index be852034a68b..c37dd45c8803 100644 --- a/arch/blackfin/mach-bf533/boards/ezkit.c +++ b/arch/blackfin/mach-bf533/boards/ezkit.c | |||
@@ -256,6 +256,50 @@ static struct platform_device bfin_pata_device = { | |||
256 | }; | 256 | }; |
257 | #endif | 257 | #endif |
258 | 258 | ||
259 | #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) | ||
260 | #include <linux/input.h> | ||
261 | #include <linux/gpio_keys.h> | ||
262 | |||
263 | static struct gpio_keys_button bfin_gpio_keys_table[] = { | ||
264 | {BTN_0, GPIO_PF7, 1, "gpio-keys: BTN0"}, | ||
265 | {BTN_1, GPIO_PF8, 1, "gpio-keys: BTN1"}, | ||
266 | {BTN_2, GPIO_PF9, 1, "gpio-keys: BTN2"}, | ||
267 | {BTN_3, GPIO_PF10, 1, "gpio-keys: BTN3"}, | ||
268 | }; | ||
269 | |||
270 | static struct gpio_keys_platform_data bfin_gpio_keys_data = { | ||
271 | .buttons = bfin_gpio_keys_table, | ||
272 | .nbuttons = ARRAY_SIZE(bfin_gpio_keys_table), | ||
273 | }; | ||
274 | |||
275 | static struct platform_device bfin_device_gpiokeys = { | ||
276 | .name = "gpio-keys", | ||
277 | .dev = { | ||
278 | .platform_data = &bfin_gpio_keys_data, | ||
279 | }, | ||
280 | }; | ||
281 | #endif | ||
282 | |||
283 | #if defined(CONFIG_I2C_GPIO) || defined(CONFIG_I2C_GPIO_MODULE) | ||
284 | #include <linux/i2c-gpio.h> | ||
285 | |||
286 | static struct i2c_gpio_platform_data i2c_gpio_data = { | ||
287 | .sda_pin = 1, | ||
288 | .scl_pin = 0, | ||
289 | .sda_is_open_drain = 0, | ||
290 | .scl_is_open_drain = 0, | ||
291 | .udelay = 40, | ||
292 | }; | ||
293 | |||
294 | static struct platform_device i2c_gpio_device = { | ||
295 | .name = "i2c-gpio", | ||
296 | .id = 0, | ||
297 | .dev = { | ||
298 | .platform_data = &i2c_gpio_data, | ||
299 | }, | ||
300 | }; | ||
301 | #endif | ||
302 | |||
259 | static struct platform_device *ezkit_devices[] __initdata = { | 303 | static struct platform_device *ezkit_devices[] __initdata = { |
260 | #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) | 304 | #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) |
261 | &smc91x_device, | 305 | &smc91x_device, |
@@ -280,6 +324,14 @@ static struct platform_device *ezkit_devices[] __initdata = { | |||
280 | #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) | 324 | #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) |
281 | &bfin_pata_device, | 325 | &bfin_pata_device, |
282 | #endif | 326 | #endif |
327 | |||
328 | #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) | ||
329 | &bfin_device_gpiokeys, | ||
330 | #endif | ||
331 | |||
332 | #if defined(CONFIG_I2C_GPIO) || defined(CONFIG_I2C_GPIO_MODULE) | ||
333 | &i2c_gpio_device, | ||
334 | #endif | ||
283 | }; | 335 | }; |
284 | 336 | ||
285 | static int __init ezkit_init(void) | 337 | static int __init ezkit_init(void) |
diff --git a/arch/blackfin/mach-bf533/boards/stamp.c b/arch/blackfin/mach-bf533/boards/stamp.c index 8fde8d832850..ac52b040b336 100644 --- a/arch/blackfin/mach-bf533/boards/stamp.c +++ b/arch/blackfin/mach-bf533/boards/stamp.c | |||
@@ -32,6 +32,7 @@ | |||
32 | #include <linux/platform_device.h> | 32 | #include <linux/platform_device.h> |
33 | #include <linux/mtd/mtd.h> | 33 | #include <linux/mtd/mtd.h> |
34 | #include <linux/mtd/partitions.h> | 34 | #include <linux/mtd/partitions.h> |
35 | #include <linux/mtd/physmap.h> | ||
35 | #include <linux/spi/spi.h> | 36 | #include <linux/spi/spi.h> |
36 | #include <linux/spi/flash.h> | 37 | #include <linux/spi/flash.h> |
37 | #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) | 38 | #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) |
@@ -108,6 +109,50 @@ static struct platform_device net2272_bfin_device = { | |||
108 | }; | 109 | }; |
109 | #endif | 110 | #endif |
110 | 111 | ||
112 | static struct mtd_partition stamp_partitions[] = { | ||
113 | { | ||
114 | .name = "Bootloader", | ||
115 | .size = 0x20000, | ||
116 | .offset = 0, | ||
117 | }, { | ||
118 | .name = "Kernel", | ||
119 | .size = 0xE0000, | ||
120 | .offset = MTDPART_OFS_APPEND, | ||
121 | }, { | ||
122 | .name = "RootFS", | ||
123 | .size = MTDPART_SIZ_FULL, | ||
124 | .offset = MTDPART_OFS_APPEND, | ||
125 | } | ||
126 | }; | ||
127 | |||
128 | static struct physmap_flash_data stamp_flash_data = { | ||
129 | .width = 2, | ||
130 | .parts = stamp_partitions, | ||
131 | .nr_parts = ARRAY_SIZE(stamp_partitions), | ||
132 | }; | ||
133 | |||
134 | static struct resource stamp_flash_resource[] = { | ||
135 | { | ||
136 | .name = "cfi_probe", | ||
137 | .start = 0x20000000, | ||
138 | .end = 0x203fffff, | ||
139 | .flags = IORESOURCE_MEM, | ||
140 | }, { | ||
141 | .start = CONFIG_ENET_FLASH_PIN, | ||
142 | .flags = IORESOURCE_IRQ, | ||
143 | } | ||
144 | }; | ||
145 | |||
146 | static struct platform_device stamp_flash_device = { | ||
147 | .name = "BF5xx-Flash", | ||
148 | .id = 0, | ||
149 | .dev = { | ||
150 | .platform_data = &stamp_flash_data, | ||
151 | }, | ||
152 | .num_resources = ARRAY_SIZE(stamp_flash_resource), | ||
153 | .resource = stamp_flash_resource, | ||
154 | }; | ||
155 | |||
111 | #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) | 156 | #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) |
112 | /* all SPI peripherals info goes here */ | 157 | /* all SPI peripherals info goes here */ |
113 | 158 | ||
@@ -373,6 +418,49 @@ static struct platform_device bfin_pata_device = { | |||
373 | }; | 418 | }; |
374 | #endif | 419 | #endif |
375 | 420 | ||
421 | #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) | ||
422 | #include <linux/input.h> | ||
423 | #include <linux/gpio_keys.h> | ||
424 | |||
425 | static struct gpio_keys_button bfin_gpio_keys_table[] = { | ||
426 | {BTN_0, GPIO_PF5, 1, "gpio-keys: BTN0"}, | ||
427 | {BTN_1, GPIO_PF6, 1, "gpio-keys: BTN1"}, | ||
428 | {BTN_2, GPIO_PF8, 1, "gpio-keys: BTN2"}, | ||
429 | }; | ||
430 | |||
431 | static struct gpio_keys_platform_data bfin_gpio_keys_data = { | ||
432 | .buttons = bfin_gpio_keys_table, | ||
433 | .nbuttons = ARRAY_SIZE(bfin_gpio_keys_table), | ||
434 | }; | ||
435 | |||
436 | static struct platform_device bfin_device_gpiokeys = { | ||
437 | .name = "gpio-keys", | ||
438 | .dev = { | ||
439 | .platform_data = &bfin_gpio_keys_data, | ||
440 | }, | ||
441 | }; | ||
442 | #endif | ||
443 | |||
444 | #if defined(CONFIG_I2C_GPIO) || defined(CONFIG_I2C_GPIO_MODULE) | ||
445 | #include <linux/i2c-gpio.h> | ||
446 | |||
447 | static struct i2c_gpio_platform_data i2c_gpio_data = { | ||
448 | .sda_pin = 2, | ||
449 | .scl_pin = 3, | ||
450 | .sda_is_open_drain = 0, | ||
451 | .scl_is_open_drain = 0, | ||
452 | .udelay = 40, | ||
453 | }; | ||
454 | |||
455 | static struct platform_device i2c_gpio_device = { | ||
456 | .name = "i2c-gpio", | ||
457 | .id = 0, | ||
458 | .dev = { | ||
459 | .platform_data = &i2c_gpio_data, | ||
460 | }, | ||
461 | }; | ||
462 | #endif | ||
463 | |||
376 | static struct platform_device *stamp_devices[] __initdata = { | 464 | static struct platform_device *stamp_devices[] __initdata = { |
377 | #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) | 465 | #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) |
378 | &rtc_device, | 466 | &rtc_device, |
@@ -406,6 +494,15 @@ static struct platform_device *stamp_devices[] __initdata = { | |||
406 | #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) | 494 | #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) |
407 | &bfin_pata_device, | 495 | &bfin_pata_device, |
408 | #endif | 496 | #endif |
497 | |||
498 | #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) | ||
499 | &bfin_device_gpiokeys, | ||
500 | #endif | ||
501 | |||
502 | #if defined(CONFIG_I2C_GPIO) || defined(CONFIG_I2C_GPIO_MODULE) | ||
503 | &i2c_gpio_device, | ||
504 | #endif | ||
505 | &stamp_flash_device, | ||
409 | }; | 506 | }; |
410 | 507 | ||
411 | static int __init stamp_init(void) | 508 | static int __init stamp_init(void) |
@@ -418,12 +515,10 @@ static int __init stamp_init(void) | |||
418 | return ret; | 515 | return ret; |
419 | 516 | ||
420 | #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) | 517 | #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) |
421 | # if defined(CONFIG_BFIN_SHARED_FLASH_ENET) | ||
422 | /* setup BF533_STAMP CPLD to route AMS3 to Ethernet MAC */ | 518 | /* setup BF533_STAMP CPLD to route AMS3 to Ethernet MAC */ |
423 | bfin_write_FIO_DIR(bfin_read_FIO_DIR() | (1 << CONFIG_ENET_FLASH_PIN)); | 519 | bfin_write_FIO_DIR(bfin_read_FIO_DIR() | (1 << CONFIG_ENET_FLASH_PIN)); |
424 | bfin_write_FIO_FLAG_S(1 << CONFIG_ENET_FLASH_PIN); | 520 | bfin_write_FIO_FLAG_S(1 << CONFIG_ENET_FLASH_PIN); |
425 | SSYNC(); | 521 | SSYNC(); |
426 | # endif | ||
427 | #endif | 522 | #endif |
428 | 523 | ||
429 | #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) | 524 | #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) |
@@ -440,10 +535,8 @@ arch_initcall(stamp_init); | |||
440 | 535 | ||
441 | void native_machine_restart(char *cmd) | 536 | void native_machine_restart(char *cmd) |
442 | { | 537 | { |
443 | #if defined(CONFIG_BFIN_SHARED_FLASH_ENET) | 538 | #define BIT_TO_SET (1 << CONFIG_ENET_FLASH_PIN) |
444 | # define BIT_TO_SET (1 << CONFIG_ENET_FLASH_PIN) | ||
445 | bfin_write_FIO_INEN(~BIT_TO_SET); | 539 | bfin_write_FIO_INEN(~BIT_TO_SET); |
446 | bfin_write_FIO_DIR(BIT_TO_SET); | 540 | bfin_write_FIO_DIR(BIT_TO_SET); |
447 | bfin_write_FIO_FLAG_C(BIT_TO_SET); | 541 | bfin_write_FIO_FLAG_C(BIT_TO_SET); |
448 | #endif | ||
449 | } | 542 | } |