aboutsummaryrefslogtreecommitdiffstats
path: root/arch/blackfin/mach-bf533
diff options
context:
space:
mode:
authorJiri Kosina <jkosina@suse.cz>2008-05-20 10:43:50 -0400
committerJiri Kosina <jkosina@suse.cz>2008-05-20 10:43:50 -0400
commit2d4b3f37ded8998a362c8d0b4be02f583dd9a002 (patch)
tree5c66ddaf0a6ab6d898931a5ed58c7aa844b94740 /arch/blackfin/mach-bf533
parent7022b15e2a9f878fd5184586064c63352c3dd225 (diff)
parent8033c6e9736c29cce5f0d0abbca9a44dffb20c39 (diff)
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'arch/blackfin/mach-bf533')
-rw-r--r--arch/blackfin/mach-bf533/boards/cm_bf533.c33
-rw-r--r--arch/blackfin/mach-bf533/boards/ezkit.c31
-rw-r--r--arch/blackfin/mach-bf533/boards/stamp.c55
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
347static 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
361static 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
367static struct platform_device bfin_dpmc = {
368 .name = "bfin dpmc",
369 .dev = {
370 .platform_data = &bfin_dmpc_vreg_data,
371 },
372};
373
344static struct platform_device *cm_bf533_devices[] __initdata = { 374static 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
354static 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
368static 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
374static struct platform_device bfin_dpmc = {
375 .name = "bfin dpmc",
376 .dev = {
377 .platform_data = &bfin_dmpc_vreg_data,
378 },
379};
380
353static struct platform_device *ezkit_devices[] __initdata = { 381static 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)
114static struct mtd_partition stamp_partitions[] = { 115static 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
148static struct platform_device stamp_flash_device = { 153static 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
524static 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
538static 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
544static struct platform_device bfin_dpmc = {
545 .name = "bfin dpmc",
546 .dev = {
547 .platform_data = &bfin_dmpc_vreg_data,
548 },
549};
550
519static struct platform_device *stamp_devices[] __initdata = { 551static 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
606void native_machine_restart(char *cmd) 641void 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}