aboutsummaryrefslogtreecommitdiffstats
path: root/arch/blackfin/mach-bf537
diff options
context:
space:
mode:
authorDavid Woodhouse <David.Woodhouse@intel.com>2008-07-11 09:36:25 -0400
committerDavid Woodhouse <David.Woodhouse@intel.com>2008-07-11 09:36:25 -0400
commita8931ef380c92d121ae74ecfb03b2d63f72eea6f (patch)
tree980fb6b019e11e6cb1ece55b7faff184721a8053 /arch/blackfin/mach-bf537
parent90574d0a4d4b73308ae54a2a57a4f3f1fa98e984 (diff)
parente5a5816f7875207cb0a0a7032e39a4686c5e10a4 (diff)
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'arch/blackfin/mach-bf537')
-rw-r--r--arch/blackfin/mach-bf537/boards/Makefile2
-rw-r--r--arch/blackfin/mach-bf537/boards/cm_bf537.c33
-rw-r--r--arch/blackfin/mach-bf537/boards/led.S183
-rw-r--r--arch/blackfin/mach-bf537/boards/stamp.c40
4 files changed, 67 insertions, 191 deletions
diff --git a/arch/blackfin/mach-bf537/boards/Makefile b/arch/blackfin/mach-bf537/boards/Makefile
index 87e450f29e37..c94f7a5b8211 100644
--- a/arch/blackfin/mach-bf537/boards/Makefile
+++ b/arch/blackfin/mach-bf537/boards/Makefile
@@ -3,7 +3,7 @@
3# 3#
4 4
5obj-$(CONFIG_GENERIC_BF537_BOARD) += generic_board.o 5obj-$(CONFIG_GENERIC_BF537_BOARD) += generic_board.o
6obj-$(CONFIG_BFIN537_STAMP) += stamp.o led.o 6obj-$(CONFIG_BFIN537_STAMP) += stamp.o
7obj-$(CONFIG_BFIN537_BLUETECHNIX_CM) += cm_bf537.o 7obj-$(CONFIG_BFIN537_BLUETECHNIX_CM) += cm_bf537.o
8obj-$(CONFIG_PNAV10) += pnav10.o 8obj-$(CONFIG_PNAV10) += pnav10.o
9obj-$(CONFIG_CAMSIG_MINOTAUR) += minotaur.o 9obj-$(CONFIG_CAMSIG_MINOTAUR) += minotaur.o
diff --git a/arch/blackfin/mach-bf537/boards/cm_bf537.c b/arch/blackfin/mach-bf537/boards/cm_bf537.c
index d8a23cd9b9ed..73f2142875e2 100644
--- a/arch/blackfin/mach-bf537/boards/cm_bf537.c
+++ b/arch/blackfin/mach-bf537/boards/cm_bf537.c
@@ -35,12 +35,15 @@
35#include <linux/mtd/partitions.h> 35#include <linux/mtd/partitions.h>
36#include <linux/spi/spi.h> 36#include <linux/spi/spi.h>
37#include <linux/spi/flash.h> 37#include <linux/spi/flash.h>
38#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE)
38#include <linux/usb/isp1362.h> 39#include <linux/usb/isp1362.h>
40#endif
39#include <linux/ata_platform.h> 41#include <linux/ata_platform.h>
40#include <linux/irq.h> 42#include <linux/irq.h>
41#include <asm/dma.h> 43#include <asm/dma.h>
42#include <asm/bfin5xx_spi.h> 44#include <asm/bfin5xx_spi.h>
43#include <asm/portmux.h> 45#include <asm/portmux.h>
46#include <asm/dpmc.h>
44 47
45/* 48/*
46 * Name the Board for the /proc/cpuinfo 49 * Name the Board for the /proc/cpuinfo
@@ -428,7 +431,37 @@ static struct platform_device bfin_pata_device = {
428}; 431};
429#endif 432#endif
430 433
434static const unsigned int cclk_vlev_datasheet[] =
435{
436 VRPAIR(VLEV_085, 250000000),
437 VRPAIR(VLEV_090, 376000000),
438 VRPAIR(VLEV_095, 426000000),
439 VRPAIR(VLEV_100, 426000000),
440 VRPAIR(VLEV_105, 476000000),
441 VRPAIR(VLEV_110, 476000000),
442 VRPAIR(VLEV_115, 476000000),
443 VRPAIR(VLEV_120, 500000000),
444 VRPAIR(VLEV_125, 533000000),
445 VRPAIR(VLEV_130, 600000000),
446};
447
448static struct bfin_dpmc_platform_data bfin_dmpc_vreg_data = {
449 .tuple_tab = cclk_vlev_datasheet,
450 .tabsize = ARRAY_SIZE(cclk_vlev_datasheet),
451 .vr_settling_time = 25 /* us */,
452};
453
454static struct platform_device bfin_dpmc = {
455 .name = "bfin dpmc",
456 .dev = {
457 .platform_data = &bfin_dmpc_vreg_data,
458 },
459};
460
431static struct platform_device *cm_bf537_devices[] __initdata = { 461static struct platform_device *cm_bf537_devices[] __initdata = {
462
463 &bfin_dpmc,
464
432#if defined(CONFIG_FB_HITACHI_TX09) || defined(CONFIG_FB_HITACHI_TX09_MODULE) 465#if defined(CONFIG_FB_HITACHI_TX09) || defined(CONFIG_FB_HITACHI_TX09_MODULE)
433 &hitachi_fb_device, 466 &hitachi_fb_device,
434#endif 467#endif
diff --git a/arch/blackfin/mach-bf537/boards/led.S b/arch/blackfin/mach-bf537/boards/led.S
deleted file mode 100644
index 4e9ea4283e5f..000000000000
--- a/arch/blackfin/mach-bf537/boards/led.S
+++ /dev/null
@@ -1,183 +0,0 @@
1/****************************************************
2 * LED1 ---- PF6 LED2 ---- PF7 *
3 * LED3 ---- PF8 LED4 ---- PF9 *
4 * LED5 ---- PF10 LED6 ---- PF11 *
5 ****************************************************/
6
7#include <linux/linkage.h>
8#include <asm/blackfin.h>
9
10/* All functions in this file save the registers they uses.
11 So there is no need to save any registers before calling them. */
12
13 .text;
14
15/* Initialize LEDs. */
16
17ENTRY(_led_init)
18 LINK 12;
19 [--SP] = P0;
20 [--SP] = R0;
21 [--SP] = R1;
22 [--SP] = R2;
23 R1 = PF6|PF7|PF8|PF9|PF10|PF11 (Z);
24 R2 = ~R1;
25
26 P0.H = hi(PORTF_FER);
27 P0.L = lo(PORTF_FER);
28 R0 = W[P0](Z);
29 SSYNC;
30 R0 = R0 & R2;
31 W[P0] = R0.L;
32 SSYNC;
33
34 P0.H = hi(PORTFIO_DIR);
35 P0.L = lo(PORTFIO_DIR);
36 R0 = W[P0](Z);
37 SSYNC;
38 R0 = R0 | R1;
39 W[P0] = R0.L;
40 SSYNC;
41
42 P0.H = hi(PORTFIO_INEN);
43 P0.L = lo(PORTFIO_INEN);
44 R0 = W[P0](Z);
45 SSYNC;
46 R0 = R0 & R2;
47 W[P0] = R0.L;
48 SSYNC;
49
50 R2 = [SP++];
51 R1 = [SP++];
52 R0 = [SP++];
53 P0 = [SP++];
54 UNLINK;
55 RTS;
56 .size _led_init, .-_led_init
57
58/* Set one LED on. Leave other LEDs unchanged.
59 It expects the LED number passed through R0. */
60
61ENTRY(_led_on)
62 LINK 12;
63 [--SP] = P0;
64 [--SP] = R1;
65 CALL _led_init;
66 R1 = 1;
67 R0 += 5;
68 R1 <<= R0;
69 P0.H = hi(PORTFIO);
70 P0.L = lo(PORTFIO);
71 R0 = W[P0](Z);
72 SSYNC;
73 R0 = R0 | R1;
74 W[P0] = R0.L;
75 SSYNC;
76 R1 = [SP++];
77 P0 = [SP++];
78 UNLINK;
79 RTS;
80 .size _led_on, .-_led_on
81
82/* Set one LED off. Leave other LEDs unchanged. */
83
84ENTRY(_led_off)
85 LINK 12;
86 [--SP] = P0;
87 [--SP] = R1;
88 CALL _led_init;
89 R1 = 1;
90 R0 += 5;
91 R1 <<= R0;
92 R1 = ~R1;
93 P0.H = hi(PORTFIO);
94 P0.L = lo(PORTFIO);
95 R0 = W[P0](Z);
96 SSYNC;
97 R0 = R0 & R1;
98 W[P0] = R0.L;
99 SSYNC;
100 R1 = [SP++];
101 P0 = [SP++];
102 UNLINK;
103 RTS;
104 .size _led_off, .-_led_off
105
106/* Toggle one LED. Leave other LEDs unchanged. */
107
108ENTRY(_led_toggle)
109 LINK 12;
110 [--SP] = P0;
111 [--SP] = R1;
112 CALL _led_init;
113 R1 = 1;
114 R0 += 5;
115 R1 <<= R0;
116 P0.H = hi(PORTFIO);
117 P0.L = lo(PORTFIO);
118 R0 = W[P0](Z);
119 SSYNC;
120 R0 = R0 ^ R1;
121 W[P0] = R0.L;
122 SSYNC;
123 R1 = [SP++];
124 P0 = [SP++];
125 UNLINK;
126 RTS;
127 .size _led_toggle, .-_led_toggle
128
129/* Display the number using LEDs in binary format. */
130
131ENTRY(_led_disp_num)
132 LINK 12;
133 [--SP] = P0;
134 [--SP] = R1;
135 [--SP] = R2;
136 CALL _led_init;
137 R1 = 0x3f(X);
138 R0 = R0 & R1;
139 R2 = 6(X);
140 R0 <<= R2;
141 R1 <<= R2;
142 P0.H = hi(PORTFIO);
143 P0.L = lo(PORTFIO);
144 R2 = W[P0](Z);
145 SSYNC;
146 R1 = ~R1;
147 R2 = R2 & R1;
148 R2 = R2 | R0;
149 W[P0] = R2.L;
150 SSYNC;
151 R2 = [SP++];
152 R1 = [SP++];
153 P0 = [SP++];
154 UNLINK;
155 RTS;
156 .size _led_disp_num, .-_led_disp_num
157
158/* Toggle the number using LEDs in binary format. */
159
160ENTRY(_led_toggle_num)
161 LINK 12;
162 [--SP] = P0;
163 [--SP] = R1;
164 [--SP] = R2;
165 CALL _led_init;
166 R1 = 0x3f(X);
167 R0 = R0 & R1;
168 R1 = 6(X);
169 R0 <<= R1;
170 P0.H = hi(PORTFIO);
171 P0.L = lo(PORTFIO);
172 R1 = W[P0](Z);
173 SSYNC;
174 R1 = R1 ^ R0;
175 W[P0] = R1.L;
176 SSYNC;
177 R2 = [SP++];
178 R1 = [SP++];
179 P0 = [SP++];
180 UNLINK;
181 RTS;
182 .size _led_toggle_num, .-_led_toggle_num
183
diff --git a/arch/blackfin/mach-bf537/boards/stamp.c b/arch/blackfin/mach-bf537/boards/stamp.c
index d3727b7c2d7d..671f9d67f23a 100644
--- a/arch/blackfin/mach-bf537/boards/stamp.c
+++ b/arch/blackfin/mach-bf537/boards/stamp.c
@@ -47,6 +47,7 @@
47#include <asm/bfin5xx_spi.h> 47#include <asm/bfin5xx_spi.h>
48#include <asm/reboot.h> 48#include <asm/reboot.h>
49#include <asm/portmux.h> 49#include <asm/portmux.h>
50#include <asm/dpmc.h>
50#include <linux/spi/ad7877.h> 51#include <linux/spi/ad7877.h>
51 52
52/* 53/*
@@ -399,9 +400,6 @@ static struct platform_device stamp_flash_device = {
399}; 400};
400#endif 401#endif
401 402
402#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
403/* all SPI peripherals info goes here */
404
405#if defined(CONFIG_MTD_M25P80) \ 403#if defined(CONFIG_MTD_M25P80) \
406 || defined(CONFIG_MTD_M25P80_MODULE) 404 || defined(CONFIG_MTD_M25P80_MODULE)
407static struct mtd_partition bfin_spi_flash_partitions[] = { 405static struct mtd_partition bfin_spi_flash_partitions[] = {
@@ -628,6 +626,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
628#endif 626#endif
629}; 627};
630 628
629#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
631/* SPI controller data */ 630/* SPI controller data */
632static struct bfin5xx_spi_master bfin_spi0_info = { 631static struct bfin5xx_spi_master bfin_spi0_info = {
633 .num_chipselect = 8, 632 .num_chipselect = 8,
@@ -817,7 +816,37 @@ static struct platform_device bfin_pata_device = {
817}; 816};
818#endif 817#endif
819 818
819static const unsigned int cclk_vlev_datasheet[] =
820{
821 VRPAIR(VLEV_085, 250000000),
822 VRPAIR(VLEV_090, 376000000),
823 VRPAIR(VLEV_095, 426000000),
824 VRPAIR(VLEV_100, 426000000),
825 VRPAIR(VLEV_105, 476000000),
826 VRPAIR(VLEV_110, 476000000),
827 VRPAIR(VLEV_115, 476000000),
828 VRPAIR(VLEV_120, 500000000),
829 VRPAIR(VLEV_125, 533000000),
830 VRPAIR(VLEV_130, 600000000),
831};
832
833static struct bfin_dpmc_platform_data bfin_dmpc_vreg_data = {
834 .tuple_tab = cclk_vlev_datasheet,
835 .tabsize = ARRAY_SIZE(cclk_vlev_datasheet),
836 .vr_settling_time = 25 /* us */,
837};
838
839static struct platform_device bfin_dpmc = {
840 .name = "bfin dpmc",
841 .dev = {
842 .platform_data = &bfin_dmpc_vreg_data,
843 },
844};
845
820static struct platform_device *stamp_devices[] __initdata = { 846static struct platform_device *stamp_devices[] __initdata = {
847
848 &bfin_dpmc,
849
821#if defined(CONFIG_BFIN_CFPCMCIA) || defined(CONFIG_BFIN_CFPCMCIA_MODULE) 850#if defined(CONFIG_BFIN_CFPCMCIA) || defined(CONFIG_BFIN_CFPCMCIA_MODULE)
822 &bfin_pcmcia_cf_device, 851 &bfin_pcmcia_cf_device,
823#endif 852#endif
@@ -908,10 +937,7 @@ static int __init stamp_init(void)
908#endif 937#endif
909 938
910 platform_add_devices(stamp_devices, ARRAY_SIZE(stamp_devices)); 939 platform_add_devices(stamp_devices, ARRAY_SIZE(stamp_devices));
911#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) 940 spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info));
912 spi_register_board_info(bfin_spi_board_info,
913 ARRAY_SIZE(bfin_spi_board_info));
914#endif
915 941
916#if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) 942#if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE)
917 irq_desc[PATA_INT].status |= IRQ_NOAUTOEN; 943 irq_desc[PATA_INT].status |= IRQ_NOAUTOEN;