diff options
Diffstat (limited to 'arch/blackfin/mach-bf533')
-rw-r--r-- | arch/blackfin/mach-bf533/boards/cm_bf533.c | 33 | ||||
-rw-r--r-- | arch/blackfin/mach-bf533/boards/ezkit.c | 31 | ||||
-rw-r--r-- | arch/blackfin/mach-bf533/boards/stamp.c | 55 |
3 files changed, 109 insertions, 10 deletions
diff --git a/arch/blackfin/mach-bf533/boards/cm_bf533.c b/arch/blackfin/mach-bf533/boards/cm_bf533.c index a03149c72681..ed2b0b8f5dc9 100644 --- a/arch/blackfin/mach-bf533/boards/cm_bf533.c +++ b/arch/blackfin/mach-bf533/boards/cm_bf533.c | |||
@@ -33,12 +33,15 @@ | |||
33 | #include <linux/mtd/partitions.h> | 33 | #include <linux/mtd/partitions.h> |
34 | #include <linux/spi/spi.h> | 34 | #include <linux/spi/spi.h> |
35 | #include <linux/spi/flash.h> | 35 | #include <linux/spi/flash.h> |
36 | #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) | ||
36 | #include <linux/usb/isp1362.h> | 37 | #include <linux/usb/isp1362.h> |
38 | #endif | ||
37 | #include <linux/ata_platform.h> | 39 | #include <linux/ata_platform.h> |
38 | #include <linux/irq.h> | 40 | #include <linux/irq.h> |
39 | #include <asm/dma.h> | 41 | #include <asm/dma.h> |
40 | #include <asm/bfin5xx_spi.h> | 42 | #include <asm/bfin5xx_spi.h> |
41 | #include <asm/portmux.h> | 43 | #include <asm/portmux.h> |
44 | #include <asm/dpmc.h> | ||
42 | 45 | ||
43 | /* | 46 | /* |
44 | * Name the Board for the /proc/cpuinfo | 47 | * Name the Board for the /proc/cpuinfo |
@@ -341,7 +344,37 @@ static struct platform_device bfin_pata_device = { | |||
341 | }; | 344 | }; |
342 | #endif | 345 | #endif |
343 | 346 | ||
347 | static const unsigned int cclk_vlev_datasheet[] = | ||
348 | { | ||
349 | VRPAIR(VLEV_085, 250000000), | ||
350 | VRPAIR(VLEV_090, 376000000), | ||
351 | VRPAIR(VLEV_095, 426000000), | ||
352 | VRPAIR(VLEV_100, 426000000), | ||
353 | VRPAIR(VLEV_105, 476000000), | ||
354 | VRPAIR(VLEV_110, 476000000), | ||
355 | VRPAIR(VLEV_115, 476000000), | ||
356 | VRPAIR(VLEV_120, 600000000), | ||
357 | VRPAIR(VLEV_125, 600000000), | ||
358 | VRPAIR(VLEV_130, 600000000), | ||
359 | }; | ||
360 | |||
361 | static struct bfin_dpmc_platform_data bfin_dmpc_vreg_data = { | ||
362 | .tuple_tab = cclk_vlev_datasheet, | ||
363 | .tabsize = ARRAY_SIZE(cclk_vlev_datasheet), | ||
364 | .vr_settling_time = 25 /* us */, | ||
365 | }; | ||
366 | |||
367 | static struct platform_device bfin_dpmc = { | ||
368 | .name = "bfin dpmc", | ||
369 | .dev = { | ||
370 | .platform_data = &bfin_dmpc_vreg_data, | ||
371 | }, | ||
372 | }; | ||
373 | |||
344 | static struct platform_device *cm_bf533_devices[] __initdata = { | 374 | static struct platform_device *cm_bf533_devices[] __initdata = { |
375 | |||
376 | &bfin_dpmc, | ||
377 | |||
345 | #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) | 378 | #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) |
346 | &bfin_uart_device, | 379 | &bfin_uart_device, |
347 | #endif | 380 | #endif |
diff --git a/arch/blackfin/mach-bf533/boards/ezkit.c b/arch/blackfin/mach-bf533/boards/ezkit.c index 08a7943949ae..9d28415163ea 100644 --- a/arch/blackfin/mach-bf533/boards/ezkit.c +++ b/arch/blackfin/mach-bf533/boards/ezkit.c | |||
@@ -42,6 +42,7 @@ | |||
42 | #include <asm/dma.h> | 42 | #include <asm/dma.h> |
43 | #include <asm/bfin5xx_spi.h> | 43 | #include <asm/bfin5xx_spi.h> |
44 | #include <asm/portmux.h> | 44 | #include <asm/portmux.h> |
45 | #include <asm/dpmc.h> | ||
45 | 46 | ||
46 | /* | 47 | /* |
47 | * Name the Board for the /proc/cpuinfo | 48 | * Name the Board for the /proc/cpuinfo |
@@ -350,7 +351,37 @@ static struct platform_device i2c_gpio_device = { | |||
350 | }; | 351 | }; |
351 | #endif | 352 | #endif |
352 | 353 | ||
354 | static const unsigned int cclk_vlev_datasheet[] = | ||
355 | { | ||
356 | VRPAIR(VLEV_085, 250000000), | ||
357 | VRPAIR(VLEV_090, 376000000), | ||
358 | VRPAIR(VLEV_095, 426000000), | ||
359 | VRPAIR(VLEV_100, 426000000), | ||
360 | VRPAIR(VLEV_105, 476000000), | ||
361 | VRPAIR(VLEV_110, 476000000), | ||
362 | VRPAIR(VLEV_115, 476000000), | ||
363 | VRPAIR(VLEV_120, 600000000), | ||
364 | VRPAIR(VLEV_125, 600000000), | ||
365 | VRPAIR(VLEV_130, 600000000), | ||
366 | }; | ||
367 | |||
368 | static struct bfin_dpmc_platform_data bfin_dmpc_vreg_data = { | ||
369 | .tuple_tab = cclk_vlev_datasheet, | ||
370 | .tabsize = ARRAY_SIZE(cclk_vlev_datasheet), | ||
371 | .vr_settling_time = 25 /* us */, | ||
372 | }; | ||
373 | |||
374 | static struct platform_device bfin_dpmc = { | ||
375 | .name = "bfin dpmc", | ||
376 | .dev = { | ||
377 | .platform_data = &bfin_dmpc_vreg_data, | ||
378 | }, | ||
379 | }; | ||
380 | |||
353 | static struct platform_device *ezkit_devices[] __initdata = { | 381 | static struct platform_device *ezkit_devices[] __initdata = { |
382 | |||
383 | &bfin_dpmc, | ||
384 | |||
354 | #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) | 385 | #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) |
355 | &smc91x_device, | 386 | &smc91x_device, |
356 | #endif | 387 | #endif |
diff --git a/arch/blackfin/mach-bf533/boards/stamp.c b/arch/blackfin/mach-bf533/boards/stamp.c index 024f418ae543..ec05b236dc3f 100644 --- a/arch/blackfin/mach-bf533/boards/stamp.c +++ b/arch/blackfin/mach-bf533/boards/stamp.c | |||
@@ -45,6 +45,7 @@ | |||
45 | #include <asm/bfin5xx_spi.h> | 45 | #include <asm/bfin5xx_spi.h> |
46 | #include <asm/reboot.h> | 46 | #include <asm/reboot.h> |
47 | #include <asm/portmux.h> | 47 | #include <asm/portmux.h> |
48 | #include <asm/dpmc.h> | ||
48 | 49 | ||
49 | /* | 50 | /* |
50 | * Name the Board for the /proc/cpuinfo | 51 | * Name the Board for the /proc/cpuinfo |
@@ -110,7 +111,7 @@ static struct platform_device net2272_bfin_device = { | |||
110 | }; | 111 | }; |
111 | #endif | 112 | #endif |
112 | 113 | ||
113 | #if defined(CONFIG_MTD_BF5xx) || defined(CONFIG_MTD_BF5xx_MODULE) | 114 | #if defined(CONFIG_MTD_BFIN_ASYNC) || defined(CONFIG_MTD_BFIN_ASYNC_MODULE) |
114 | static struct mtd_partition stamp_partitions[] = { | 115 | static struct mtd_partition stamp_partitions[] = { |
115 | { | 116 | { |
116 | .name = "Bootloader", | 117 | .name = "Bootloader", |
@@ -140,13 +141,17 @@ static struct resource stamp_flash_resource[] = { | |||
140 | .end = 0x203fffff, | 141 | .end = 0x203fffff, |
141 | .flags = IORESOURCE_MEM, | 142 | .flags = IORESOURCE_MEM, |
142 | }, { | 143 | }, { |
143 | .start = CONFIG_ENET_FLASH_PIN, | 144 | .start = 0x7BB07BB0, /* AMBCTL0 setting when accessing flash */ |
145 | .end = 0x7BB07BB0, /* AMBCTL1 setting when accessing flash */ | ||
146 | .flags = IORESOURCE_MEM, | ||
147 | }, { | ||
148 | .start = GPIO_PF0, | ||
144 | .flags = IORESOURCE_IRQ, | 149 | .flags = IORESOURCE_IRQ, |
145 | } | 150 | } |
146 | }; | 151 | }; |
147 | 152 | ||
148 | static struct platform_device stamp_flash_device = { | 153 | static struct platform_device stamp_flash_device = { |
149 | .name = "BF5xx-Flash", | 154 | .name = "bfin-async-flash", |
150 | .id = 0, | 155 | .id = 0, |
151 | .dev = { | 156 | .dev = { |
152 | .platform_data = &stamp_flash_data, | 157 | .platform_data = &stamp_flash_data, |
@@ -516,7 +521,37 @@ static struct i2c_board_info __initdata bfin_i2c_board_info[] = { | |||
516 | }; | 521 | }; |
517 | #endif | 522 | #endif |
518 | 523 | ||
524 | static const unsigned int cclk_vlev_datasheet[] = | ||
525 | { | ||
526 | VRPAIR(VLEV_085, 250000000), | ||
527 | VRPAIR(VLEV_090, 376000000), | ||
528 | VRPAIR(VLEV_095, 426000000), | ||
529 | VRPAIR(VLEV_100, 426000000), | ||
530 | VRPAIR(VLEV_105, 476000000), | ||
531 | VRPAIR(VLEV_110, 476000000), | ||
532 | VRPAIR(VLEV_115, 476000000), | ||
533 | VRPAIR(VLEV_120, 600000000), | ||
534 | VRPAIR(VLEV_125, 600000000), | ||
535 | VRPAIR(VLEV_130, 600000000), | ||
536 | }; | ||
537 | |||
538 | static struct bfin_dpmc_platform_data bfin_dmpc_vreg_data = { | ||
539 | .tuple_tab = cclk_vlev_datasheet, | ||
540 | .tabsize = ARRAY_SIZE(cclk_vlev_datasheet), | ||
541 | .vr_settling_time = 25 /* us */, | ||
542 | }; | ||
543 | |||
544 | static struct platform_device bfin_dpmc = { | ||
545 | .name = "bfin dpmc", | ||
546 | .dev = { | ||
547 | .platform_data = &bfin_dmpc_vreg_data, | ||
548 | }, | ||
549 | }; | ||
550 | |||
519 | static struct platform_device *stamp_devices[] __initdata = { | 551 | static struct platform_device *stamp_devices[] __initdata = { |
552 | |||
553 | &bfin_dpmc, | ||
554 | |||
520 | #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) | 555 | #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) |
521 | &rtc_device, | 556 | &rtc_device, |
522 | #endif | 557 | #endif |
@@ -564,7 +599,7 @@ static struct platform_device *stamp_devices[] __initdata = { | |||
564 | 599 | ||
565 | &bfin_gpios_device, | 600 | &bfin_gpios_device, |
566 | 601 | ||
567 | #if defined(CONFIG_MTD_BF5xx) || defined(CONFIG_MTD_BF5xx_MODULE) | 602 | #if defined(CONFIG_MTD_BFIN_ASYNC) || defined(CONFIG_MTD_BFIN_ASYNC_MODULE) |
568 | &stamp_flash_device, | 603 | &stamp_flash_device, |
569 | #endif | 604 | #endif |
570 | }; | 605 | }; |
@@ -586,8 +621,8 @@ static int __init stamp_init(void) | |||
586 | 621 | ||
587 | #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) | 622 | #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) |
588 | /* setup BF533_STAMP CPLD to route AMS3 to Ethernet MAC */ | 623 | /* setup BF533_STAMP CPLD to route AMS3 to Ethernet MAC */ |
589 | bfin_write_FIO_DIR(bfin_read_FIO_DIR() | (1 << CONFIG_ENET_FLASH_PIN)); | 624 | bfin_write_FIO_DIR(bfin_read_FIO_DIR() | PF0); |
590 | bfin_write_FIO_FLAG_S(1 << CONFIG_ENET_FLASH_PIN); | 625 | bfin_write_FIO_FLAG_S(PF0); |
591 | SSYNC(); | 626 | SSYNC(); |
592 | #endif | 627 | #endif |
593 | 628 | ||
@@ -605,8 +640,8 @@ arch_initcall(stamp_init); | |||
605 | 640 | ||
606 | void native_machine_restart(char *cmd) | 641 | void native_machine_restart(char *cmd) |
607 | { | 642 | { |
608 | #define BIT_TO_SET (1 << CONFIG_ENET_FLASH_PIN) | 643 | /* workaround pull up on cpld / flash pin not being strong enough */ |
609 | bfin_write_FIO_INEN(~BIT_TO_SET); | 644 | bfin_write_FIO_INEN(~PF0); |
610 | bfin_write_FIO_DIR(BIT_TO_SET); | 645 | bfin_write_FIO_DIR(PF0); |
611 | bfin_write_FIO_FLAG_C(BIT_TO_SET); | 646 | bfin_write_FIO_FLAG_C(PF0); |
612 | } | 647 | } |