diff options
Diffstat (limited to 'arch/arm/mach-pxa')
-rw-r--r-- | arch/arm/mach-pxa/Kconfig | 5 | ||||
-rw-r--r-- | arch/arm/mach-pxa/Makefile | 3 | ||||
-rw-r--r-- | arch/arm/mach-pxa/clock.c | 124 | ||||
-rw-r--r-- | arch/arm/mach-pxa/corgi.c | 12 | ||||
-rw-r--r-- | arch/arm/mach-pxa/generic.c | 6 | ||||
-rw-r--r-- | arch/arm/mach-pxa/leds-mainstone.c | 6 | ||||
-rw-r--r-- | arch/arm/mach-pxa/lpd270.c | 393 | ||||
-rw-r--r-- | arch/arm/mach-pxa/mainstone.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-pxa/poodle.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-pxa/spitz.c | 14 | ||||
-rw-r--r-- | arch/arm/mach-pxa/tosa.c | 10 |
11 files changed, 568 insertions, 10 deletions
diff --git a/arch/arm/mach-pxa/Kconfig b/arch/arm/mach-pxa/Kconfig index c1d77f5b3823..0104fd142e70 100644 --- a/arch/arm/mach-pxa/Kconfig +++ b/arch/arm/mach-pxa/Kconfig | |||
@@ -10,6 +10,11 @@ config ARCH_LUBBOCK | |||
10 | select PXA25x | 10 | select PXA25x |
11 | select SA1111 | 11 | select SA1111 |
12 | 12 | ||
13 | config MACH_LOGICPD_PXA270 | ||
14 | bool "LogicPD PXA270 Card Engine Development Platform" | ||
15 | select PXA27x | ||
16 | select IWMMXT | ||
17 | |||
13 | config MACH_MAINSTONE | 18 | config MACH_MAINSTONE |
14 | bool "Intel HCDDBBVA0 Development Platform" | 19 | bool "Intel HCDDBBVA0 Development Platform" |
15 | select PXA27x | 20 | select PXA27x |
diff --git a/arch/arm/mach-pxa/Makefile b/arch/arm/mach-pxa/Makefile index 32526a0a6f86..4e8a983e2b83 100644 --- a/arch/arm/mach-pxa/Makefile +++ b/arch/arm/mach-pxa/Makefile | |||
@@ -3,12 +3,13 @@ | |||
3 | # | 3 | # |
4 | 4 | ||
5 | # Common support (must be linked before board specific support) | 5 | # Common support (must be linked before board specific support) |
6 | obj-y += generic.o irq.o dma.o time.o | 6 | obj-y += clock.o generic.o irq.o dma.o time.o |
7 | obj-$(CONFIG_PXA25x) += pxa25x.o | 7 | obj-$(CONFIG_PXA25x) += pxa25x.o |
8 | obj-$(CONFIG_PXA27x) += pxa27x.o | 8 | obj-$(CONFIG_PXA27x) += pxa27x.o |
9 | 9 | ||
10 | # Specific board support | 10 | # Specific board support |
11 | obj-$(CONFIG_ARCH_LUBBOCK) += lubbock.o | 11 | obj-$(CONFIG_ARCH_LUBBOCK) += lubbock.o |
12 | obj-$(CONFIG_MACH_LOGICPD_PXA270) += lpd270.o | ||
12 | obj-$(CONFIG_MACH_MAINSTONE) += mainstone.o | 13 | obj-$(CONFIG_MACH_MAINSTONE) += mainstone.o |
13 | obj-$(CONFIG_ARCH_PXA_IDP) += idp.o | 14 | obj-$(CONFIG_ARCH_PXA_IDP) += idp.o |
14 | obj-$(CONFIG_PXA_SHARP_C7xx) += corgi.o corgi_ssp.o corgi_lcd.o sharpsl_pm.o corgi_pm.o | 15 | obj-$(CONFIG_PXA_SHARP_C7xx) += corgi.o corgi_ssp.o corgi_lcd.o sharpsl_pm.o corgi_pm.o |
diff --git a/arch/arm/mach-pxa/clock.c b/arch/arm/mach-pxa/clock.c new file mode 100644 index 000000000000..8f7c90a0593b --- /dev/null +++ b/arch/arm/mach-pxa/clock.c | |||
@@ -0,0 +1,124 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/mach-sa1100/clock.c | ||
3 | */ | ||
4 | #include <linux/module.h> | ||
5 | #include <linux/kernel.h> | ||
6 | #include <linux/list.h> | ||
7 | #include <linux/errno.h> | ||
8 | #include <linux/err.h> | ||
9 | #include <linux/string.h> | ||
10 | #include <linux/clk.h> | ||
11 | #include <linux/spinlock.h> | ||
12 | |||
13 | #include <asm/arch/pxa-regs.h> | ||
14 | #include <asm/hardware.h> | ||
15 | #include <asm/semaphore.h> | ||
16 | |||
17 | struct clk { | ||
18 | struct list_head node; | ||
19 | unsigned long rate; | ||
20 | struct module *owner; | ||
21 | const char *name; | ||
22 | unsigned int enabled; | ||
23 | void (*enable)(void); | ||
24 | void (*disable)(void); | ||
25 | }; | ||
26 | |||
27 | static LIST_HEAD(clocks); | ||
28 | static DECLARE_MUTEX(clocks_sem); | ||
29 | static DEFINE_SPINLOCK(clocks_lock); | ||
30 | |||
31 | struct clk *clk_get(struct device *dev, const char *id) | ||
32 | { | ||
33 | struct clk *p, *clk = ERR_PTR(-ENOENT); | ||
34 | |||
35 | down(&clocks_sem); | ||
36 | list_for_each_entry(p, &clocks, node) { | ||
37 | if (strcmp(id, p->name) == 0 && try_module_get(p->owner)) { | ||
38 | clk = p; | ||
39 | break; | ||
40 | } | ||
41 | } | ||
42 | up(&clocks_sem); | ||
43 | |||
44 | return clk; | ||
45 | } | ||
46 | EXPORT_SYMBOL(clk_get); | ||
47 | |||
48 | void clk_put(struct clk *clk) | ||
49 | { | ||
50 | module_put(clk->owner); | ||
51 | } | ||
52 | EXPORT_SYMBOL(clk_put); | ||
53 | |||
54 | int clk_enable(struct clk *clk) | ||
55 | { | ||
56 | unsigned long flags; | ||
57 | |||
58 | spin_lock_irqsave(&clocks_lock, flags); | ||
59 | if (clk->enabled++ == 0) | ||
60 | clk->enable(); | ||
61 | spin_unlock_irqrestore(&clocks_lock, flags); | ||
62 | return 0; | ||
63 | } | ||
64 | EXPORT_SYMBOL(clk_enable); | ||
65 | |||
66 | void clk_disable(struct clk *clk) | ||
67 | { | ||
68 | unsigned long flags; | ||
69 | |||
70 | WARN_ON(clk->enabled == 0); | ||
71 | |||
72 | spin_lock_irqsave(&clocks_lock, flags); | ||
73 | if (--clk->enabled == 0) | ||
74 | clk->disable(); | ||
75 | spin_unlock_irqrestore(&clocks_lock, flags); | ||
76 | } | ||
77 | EXPORT_SYMBOL(clk_disable); | ||
78 | |||
79 | unsigned long clk_get_rate(struct clk *clk) | ||
80 | { | ||
81 | return clk->rate; | ||
82 | } | ||
83 | EXPORT_SYMBOL(clk_get_rate); | ||
84 | |||
85 | |||
86 | static void clk_gpio27_enable(void) | ||
87 | { | ||
88 | pxa_gpio_mode(GPIO11_3_6MHz_MD); | ||
89 | } | ||
90 | |||
91 | static void clk_gpio27_disable(void) | ||
92 | { | ||
93 | } | ||
94 | |||
95 | static struct clk clk_gpio27 = { | ||
96 | .name = "GPIO27_CLK", | ||
97 | .rate = 3686400, | ||
98 | .enable = clk_gpio27_enable, | ||
99 | .disable = clk_gpio27_disable, | ||
100 | }; | ||
101 | |||
102 | int clk_register(struct clk *clk) | ||
103 | { | ||
104 | down(&clocks_sem); | ||
105 | list_add(&clk->node, &clocks); | ||
106 | up(&clocks_sem); | ||
107 | return 0; | ||
108 | } | ||
109 | EXPORT_SYMBOL(clk_register); | ||
110 | |||
111 | void clk_unregister(struct clk *clk) | ||
112 | { | ||
113 | down(&clocks_sem); | ||
114 | list_del(&clk->node); | ||
115 | up(&clocks_sem); | ||
116 | } | ||
117 | EXPORT_SYMBOL(clk_unregister); | ||
118 | |||
119 | static int __init clk_init(void) | ||
120 | { | ||
121 | clk_register(&clk_gpio27); | ||
122 | return 0; | ||
123 | } | ||
124 | arch_initcall(clk_init); | ||
diff --git a/arch/arm/mach-pxa/corgi.c b/arch/arm/mach-pxa/corgi.c index 7ffd2de8f2f3..d6d726036361 100644 --- a/arch/arm/mach-pxa/corgi.c +++ b/arch/arm/mach-pxa/corgi.c | |||
@@ -32,7 +32,6 @@ | |||
32 | #include <asm/mach/irq.h> | 32 | #include <asm/mach/irq.h> |
33 | 33 | ||
34 | #include <asm/arch/pxa-regs.h> | 34 | #include <asm/arch/pxa-regs.h> |
35 | #include <asm/arch/irq.h> | ||
36 | #include <asm/arch/irda.h> | 35 | #include <asm/arch/irda.h> |
37 | #include <asm/arch/mmc.h> | 36 | #include <asm/arch/mmc.h> |
38 | #include <asm/arch/udc.h> | 37 | #include <asm/arch/udc.h> |
@@ -142,6 +141,8 @@ struct corgissp_machinfo corgi_ssp_machinfo = { | |||
142 | */ | 141 | */ |
143 | static struct corgibl_machinfo corgi_bl_machinfo = { | 142 | static struct corgibl_machinfo corgi_bl_machinfo = { |
144 | .max_intensity = 0x2f, | 143 | .max_intensity = 0x2f, |
144 | .default_intensity = 0x1f, | ||
145 | .limit_mask = 0x0b, | ||
145 | .set_bl_intensity = corgi_bl_set_intensity, | 146 | .set_bl_intensity = corgi_bl_set_intensity, |
146 | }; | 147 | }; |
147 | 148 | ||
@@ -165,6 +166,14 @@ static struct platform_device corgikbd_device = { | |||
165 | 166 | ||
166 | 167 | ||
167 | /* | 168 | /* |
169 | * Corgi LEDs | ||
170 | */ | ||
171 | static struct platform_device corgiled_device = { | ||
172 | .name = "corgi-led", | ||
173 | .id = -1, | ||
174 | }; | ||
175 | |||
176 | /* | ||
168 | * Corgi Touch Screen Device | 177 | * Corgi Touch Screen Device |
169 | */ | 178 | */ |
170 | static struct resource corgits_resources[] = { | 179 | static struct resource corgits_resources[] = { |
@@ -298,6 +307,7 @@ static struct platform_device *devices[] __initdata = { | |||
298 | &corgikbd_device, | 307 | &corgikbd_device, |
299 | &corgibl_device, | 308 | &corgibl_device, |
300 | &corgits_device, | 309 | &corgits_device, |
310 | &corgiled_device, | ||
301 | }; | 311 | }; |
302 | 312 | ||
303 | static void __init corgi_init(void) | 313 | static void __init corgi_init(void) |
diff --git a/arch/arm/mach-pxa/generic.c b/arch/arm/mach-pxa/generic.c index 9b48a90aefce..5efa84749f37 100644 --- a/arch/arm/mach-pxa/generic.c +++ b/arch/arm/mach-pxa/generic.c | |||
@@ -319,6 +319,11 @@ void __init pxa_set_ficp_info(struct pxaficp_platform_data *info) | |||
319 | pxaficp_device.dev.platform_data = info; | 319 | pxaficp_device.dev.platform_data = info; |
320 | } | 320 | } |
321 | 321 | ||
322 | static struct platform_device pxartc_device = { | ||
323 | .name = "sa1100-rtc", | ||
324 | .id = -1, | ||
325 | }; | ||
326 | |||
322 | static struct platform_device *devices[] __initdata = { | 327 | static struct platform_device *devices[] __initdata = { |
323 | &pxamci_device, | 328 | &pxamci_device, |
324 | &udc_device, | 329 | &udc_device, |
@@ -329,6 +334,7 @@ static struct platform_device *devices[] __initdata = { | |||
329 | &pxaficp_device, | 334 | &pxaficp_device, |
330 | &i2c_device, | 335 | &i2c_device, |
331 | &i2s_device, | 336 | &i2s_device, |
337 | &pxartc_device, | ||
332 | }; | 338 | }; |
333 | 339 | ||
334 | static int __init pxa_init(void) | 340 | static int __init pxa_init(void) |
diff --git a/arch/arm/mach-pxa/leds-mainstone.c b/arch/arm/mach-pxa/leds-mainstone.c index bbd3f87a9fc2..c06d3d7a8dd4 100644 --- a/arch/arm/mach-pxa/leds-mainstone.c +++ b/arch/arm/mach-pxa/leds-mainstone.c | |||
@@ -85,7 +85,7 @@ void mainstone_leds_event(led_event_t evt) | |||
85 | break; | 85 | break; |
86 | 86 | ||
87 | case led_green_on: | 87 | case led_green_on: |
88 | hw_led_state |= D21;; | 88 | hw_led_state |= D21; |
89 | break; | 89 | break; |
90 | 90 | ||
91 | case led_green_off: | 91 | case led_green_off: |
@@ -93,7 +93,7 @@ void mainstone_leds_event(led_event_t evt) | |||
93 | break; | 93 | break; |
94 | 94 | ||
95 | case led_amber_on: | 95 | case led_amber_on: |
96 | hw_led_state |= D22;; | 96 | hw_led_state |= D22; |
97 | break; | 97 | break; |
98 | 98 | ||
99 | case led_amber_off: | 99 | case led_amber_off: |
@@ -101,7 +101,7 @@ void mainstone_leds_event(led_event_t evt) | |||
101 | break; | 101 | break; |
102 | 102 | ||
103 | case led_red_on: | 103 | case led_red_on: |
104 | hw_led_state |= D23;; | 104 | hw_led_state |= D23; |
105 | break; | 105 | break; |
106 | 106 | ||
107 | case led_red_off: | 107 | case led_red_off: |
diff --git a/arch/arm/mach-pxa/lpd270.c b/arch/arm/mach-pxa/lpd270.c new file mode 100644 index 000000000000..ec0f43a102c7 --- /dev/null +++ b/arch/arm/mach-pxa/lpd270.c | |||
@@ -0,0 +1,393 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/mach-pxa/lpd270.c | ||
3 | * | ||
4 | * Support for the LogicPD PXA270 Card Engine. | ||
5 | * Derived from the mainstone code, which carries these notices: | ||
6 | * | ||
7 | * Author: Nicolas Pitre | ||
8 | * Created: Nov 05, 2002 | ||
9 | * Copyright: MontaVista Software Inc. | ||
10 | * | ||
11 | * This program is free software; you can redistribute it and/or modify | ||
12 | * it under the terms of the GNU General Public License version 2 as | ||
13 | * published by the Free Software Foundation. | ||
14 | */ | ||
15 | |||
16 | #include <linux/init.h> | ||
17 | #include <linux/platform_device.h> | ||
18 | #include <linux/sysdev.h> | ||
19 | #include <linux/interrupt.h> | ||
20 | #include <linux/sched.h> | ||
21 | #include <linux/bitops.h> | ||
22 | #include <linux/fb.h> | ||
23 | #include <linux/ioport.h> | ||
24 | #include <linux/mtd/mtd.h> | ||
25 | #include <linux/mtd/partitions.h> | ||
26 | |||
27 | #include <asm/types.h> | ||
28 | #include <asm/setup.h> | ||
29 | #include <asm/memory.h> | ||
30 | #include <asm/mach-types.h> | ||
31 | #include <asm/hardware.h> | ||
32 | #include <asm/irq.h> | ||
33 | #include <asm/sizes.h> | ||
34 | |||
35 | #include <asm/mach/arch.h> | ||
36 | #include <asm/mach/map.h> | ||
37 | #include <asm/mach/irq.h> | ||
38 | #include <asm/mach/flash.h> | ||
39 | |||
40 | #include <asm/arch/pxa-regs.h> | ||
41 | #include <asm/arch/lpd270.h> | ||
42 | #include <asm/arch/audio.h> | ||
43 | #include <asm/arch/pxafb.h> | ||
44 | #include <asm/arch/mmc.h> | ||
45 | #include <asm/arch/irda.h> | ||
46 | #include <asm/arch/ohci.h> | ||
47 | |||
48 | #include "generic.h" | ||
49 | |||
50 | |||
51 | static unsigned int lpd270_irq_enabled; | ||
52 | |||
53 | static void lpd270_mask_irq(unsigned int irq) | ||
54 | { | ||
55 | int lpd270_irq = irq - LPD270_IRQ(0); | ||
56 | |||
57 | __raw_writew(~(1 << lpd270_irq), LPD270_INT_STATUS); | ||
58 | |||
59 | lpd270_irq_enabled &= ~(1 << lpd270_irq); | ||
60 | __raw_writew(lpd270_irq_enabled, LPD270_INT_MASK); | ||
61 | } | ||
62 | |||
63 | static void lpd270_unmask_irq(unsigned int irq) | ||
64 | { | ||
65 | int lpd270_irq = irq - LPD270_IRQ(0); | ||
66 | |||
67 | lpd270_irq_enabled |= 1 << lpd270_irq; | ||
68 | __raw_writew(lpd270_irq_enabled, LPD270_INT_MASK); | ||
69 | } | ||
70 | |||
71 | static struct irqchip lpd270_irq_chip = { | ||
72 | .ack = lpd270_mask_irq, | ||
73 | .mask = lpd270_mask_irq, | ||
74 | .unmask = lpd270_unmask_irq, | ||
75 | }; | ||
76 | |||
77 | static void lpd270_irq_handler(unsigned int irq, struct irqdesc *desc, | ||
78 | struct pt_regs *regs) | ||
79 | { | ||
80 | unsigned long pending; | ||
81 | |||
82 | pending = __raw_readw(LPD270_INT_STATUS) & lpd270_irq_enabled; | ||
83 | do { | ||
84 | GEDR(0) = GPIO_bit(0); /* clear useless edge notification */ | ||
85 | if (likely(pending)) { | ||
86 | irq = LPD270_IRQ(0) + __ffs(pending); | ||
87 | desc = irq_desc + irq; | ||
88 | desc_handle_irq(irq, desc, regs); | ||
89 | |||
90 | pending = __raw_readw(LPD270_INT_STATUS) & | ||
91 | lpd270_irq_enabled; | ||
92 | } | ||
93 | } while (pending); | ||
94 | } | ||
95 | |||
96 | static void __init lpd270_init_irq(void) | ||
97 | { | ||
98 | int irq; | ||
99 | |||
100 | pxa_init_irq(); | ||
101 | |||
102 | __raw_writew(0, LPD270_INT_MASK); | ||
103 | __raw_writew(0, LPD270_INT_STATUS); | ||
104 | |||
105 | /* setup extra LogicPD PXA270 irqs */ | ||
106 | for (irq = LPD270_IRQ(2); irq <= LPD270_IRQ(4); irq++) { | ||
107 | set_irq_chip(irq, &lpd270_irq_chip); | ||
108 | set_irq_handler(irq, do_level_IRQ); | ||
109 | set_irq_flags(irq, IRQF_VALID | IRQF_PROBE); | ||
110 | } | ||
111 | set_irq_chained_handler(IRQ_GPIO(0), lpd270_irq_handler); | ||
112 | set_irq_type(IRQ_GPIO(0), IRQT_FALLING); | ||
113 | } | ||
114 | |||
115 | |||
116 | #ifdef CONFIG_PM | ||
117 | static int lpd270_irq_resume(struct sys_device *dev) | ||
118 | { | ||
119 | __raw_writew(lpd270_irq_enabled, LPD270_INT_MASK); | ||
120 | return 0; | ||
121 | } | ||
122 | |||
123 | static struct sysdev_class lpd270_irq_sysclass = { | ||
124 | set_kset_name("cpld_irq"), | ||
125 | .resume = lpd270_irq_resume, | ||
126 | }; | ||
127 | |||
128 | static struct sys_device lpd270_irq_device = { | ||
129 | .cls = &lpd270_irq_sysclass, | ||
130 | }; | ||
131 | |||
132 | static int __init lpd270_irq_device_init(void) | ||
133 | { | ||
134 | int ret = sysdev_class_register(&lpd270_irq_sysclass); | ||
135 | if (ret == 0) | ||
136 | ret = sysdev_register(&lpd270_irq_device); | ||
137 | return ret; | ||
138 | } | ||
139 | |||
140 | device_initcall(lpd270_irq_device_init); | ||
141 | #endif | ||
142 | |||
143 | |||
144 | static struct resource smc91x_resources[] = { | ||
145 | [0] = { | ||
146 | .start = LPD270_ETH_PHYS, | ||
147 | .end = (LPD270_ETH_PHYS + 0xfffff), | ||
148 | .flags = IORESOURCE_MEM, | ||
149 | }, | ||
150 | [1] = { | ||
151 | .start = LPD270_ETHERNET_IRQ, | ||
152 | .end = LPD270_ETHERNET_IRQ, | ||
153 | .flags = IORESOURCE_IRQ, | ||
154 | }, | ||
155 | }; | ||
156 | |||
157 | static struct platform_device smc91x_device = { | ||
158 | .name = "smc91x", | ||
159 | .id = 0, | ||
160 | .num_resources = ARRAY_SIZE(smc91x_resources), | ||
161 | .resource = smc91x_resources, | ||
162 | }; | ||
163 | |||
164 | static struct platform_device lpd270_audio_device = { | ||
165 | .name = "pxa2xx-ac97", | ||
166 | .id = -1, | ||
167 | }; | ||
168 | |||
169 | static struct resource lpd270_flash_resources[] = { | ||
170 | [0] = { | ||
171 | .start = PXA_CS0_PHYS, | ||
172 | .end = PXA_CS0_PHYS + SZ_64M - 1, | ||
173 | .flags = IORESOURCE_MEM, | ||
174 | }, | ||
175 | [1] = { | ||
176 | .start = PXA_CS1_PHYS, | ||
177 | .end = PXA_CS1_PHYS + SZ_64M - 1, | ||
178 | .flags = IORESOURCE_MEM, | ||
179 | }, | ||
180 | }; | ||
181 | |||
182 | static struct mtd_partition lpd270_flash0_partitions[] = { | ||
183 | { | ||
184 | .name = "Bootloader", | ||
185 | .size = 0x00040000, | ||
186 | .offset = 0, | ||
187 | .mask_flags = MTD_WRITEABLE /* force read-only */ | ||
188 | }, { | ||
189 | .name = "Kernel", | ||
190 | .size = 0x00400000, | ||
191 | .offset = 0x00040000, | ||
192 | }, { | ||
193 | .name = "Filesystem", | ||
194 | .size = MTDPART_SIZ_FULL, | ||
195 | .offset = 0x00440000 | ||
196 | }, | ||
197 | }; | ||
198 | |||
199 | static struct flash_platform_data lpd270_flash_data[2] = { | ||
200 | { | ||
201 | .name = "processor-flash", | ||
202 | .map_name = "cfi_probe", | ||
203 | .parts = lpd270_flash0_partitions, | ||
204 | .nr_parts = ARRAY_SIZE(lpd270_flash0_partitions), | ||
205 | }, { | ||
206 | .name = "mainboard-flash", | ||
207 | .map_name = "cfi_probe", | ||
208 | .parts = NULL, | ||
209 | .nr_parts = 0, | ||
210 | } | ||
211 | }; | ||
212 | |||
213 | static struct platform_device lpd270_flash_device[2] = { | ||
214 | { | ||
215 | .name = "pxa2xx-flash", | ||
216 | .id = 0, | ||
217 | .dev = { | ||
218 | .platform_data = &lpd270_flash_data[0], | ||
219 | }, | ||
220 | .resource = &lpd270_flash_resources[0], | ||
221 | .num_resources = 1, | ||
222 | }, { | ||
223 | .name = "pxa2xx-flash", | ||
224 | .id = 1, | ||
225 | .dev = { | ||
226 | .platform_data = &lpd270_flash_data[1], | ||
227 | }, | ||
228 | .resource = &lpd270_flash_resources[1], | ||
229 | .num_resources = 1, | ||
230 | }, | ||
231 | }; | ||
232 | |||
233 | static void lpd270_backlight_power(int on) | ||
234 | { | ||
235 | if (on) { | ||
236 | pxa_gpio_mode(GPIO16_PWM0_MD); | ||
237 | pxa_set_cken(CKEN0_PWM0, 1); | ||
238 | PWM_CTRL0 = 0; | ||
239 | PWM_PWDUTY0 = 0x3ff; | ||
240 | PWM_PERVAL0 = 0x3ff; | ||
241 | } else { | ||
242 | PWM_CTRL0 = 0; | ||
243 | PWM_PWDUTY0 = 0x0; | ||
244 | PWM_PERVAL0 = 0x3FF; | ||
245 | pxa_set_cken(CKEN0_PWM0, 0); | ||
246 | } | ||
247 | } | ||
248 | |||
249 | /* 5.7" TFT QVGA (LoLo display number 1) */ | ||
250 | static struct pxafb_mach_info sharp_lq057q3dc02 __initdata = { | ||
251 | .pixclock = 100000, | ||
252 | .xres = 240, | ||
253 | .yres = 320, | ||
254 | .bpp = 16, | ||
255 | .hsync_len = 64, | ||
256 | .left_margin = 0x27, | ||
257 | .right_margin = 0x09, | ||
258 | .vsync_len = 0x04, | ||
259 | .upper_margin = 0x08, | ||
260 | .lower_margin = 0x14, | ||
261 | .sync = 0, | ||
262 | .lccr0 = 0x07800080, | ||
263 | .lccr3 = 0x04400007, | ||
264 | .pxafb_backlight_power = lpd270_backlight_power, | ||
265 | }; | ||
266 | |||
267 | /* 6.4" TFT VGA (LoLo display number 5) */ | ||
268 | static struct pxafb_mach_info sharp_lq64d343 __initdata = { | ||
269 | .pixclock = 20000, | ||
270 | .xres = 640, | ||
271 | .yres = 480, | ||
272 | .bpp = 16, | ||
273 | .hsync_len = 49, | ||
274 | .left_margin = 0x89, | ||
275 | .right_margin = 0x19, | ||
276 | .vsync_len = 18, | ||
277 | .upper_margin = 0x22, | ||
278 | .lower_margin = 0, | ||
279 | .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, | ||
280 | .lccr0 = 0x07800080, | ||
281 | .lccr3 = 0x04400001, | ||
282 | .pxafb_backlight_power = lpd270_backlight_power, | ||
283 | }; | ||
284 | |||
285 | /* 3.5" TFT QVGA (LoLo display number 8) */ | ||
286 | static struct pxafb_mach_info sharp_lq035q7db02_20 __initdata = { | ||
287 | .pixclock = 100000, | ||
288 | .xres = 240, | ||
289 | .yres = 320, | ||
290 | .bpp = 16, | ||
291 | .hsync_len = 0x34, | ||
292 | .left_margin = 0x09, | ||
293 | .right_margin = 0x09, | ||
294 | .vsync_len = 0x08, | ||
295 | .upper_margin = 0x05, | ||
296 | .lower_margin = 0x14, | ||
297 | .sync = 0, | ||
298 | .lccr0 = 0x07800080, | ||
299 | .lccr3 = 0x04400007, | ||
300 | .pxafb_backlight_power = lpd270_backlight_power, | ||
301 | }; | ||
302 | |||
303 | static struct platform_device *platform_devices[] __initdata = { | ||
304 | &smc91x_device, | ||
305 | &lpd270_audio_device, | ||
306 | &lpd270_flash_device[0], | ||
307 | &lpd270_flash_device[1], | ||
308 | }; | ||
309 | |||
310 | static int lpd270_ohci_init(struct device *dev) | ||
311 | { | ||
312 | /* setup Port1 GPIO pin. */ | ||
313 | pxa_gpio_mode(88 | GPIO_ALT_FN_1_IN); /* USBHPWR1 */ | ||
314 | pxa_gpio_mode(89 | GPIO_ALT_FN_2_OUT); /* USBHPEN1 */ | ||
315 | |||
316 | /* Set the Power Control Polarity Low and Power Sense | ||
317 | Polarity Low to active low. */ | ||
318 | UHCHR = (UHCHR | UHCHR_PCPL | UHCHR_PSPL) & | ||
319 | ~(UHCHR_SSEP1 | UHCHR_SSEP2 | UHCHR_SSEP3 | UHCHR_SSE); | ||
320 | |||
321 | return 0; | ||
322 | } | ||
323 | |||
324 | static struct pxaohci_platform_data lpd270_ohci_platform_data = { | ||
325 | .port_mode = PMM_PERPORT_MODE, | ||
326 | .init = lpd270_ohci_init, | ||
327 | }; | ||
328 | |||
329 | static void __init lpd270_init(void) | ||
330 | { | ||
331 | lpd270_flash_data[0].width = (BOOT_DEF & 1) ? 2 : 4; | ||
332 | lpd270_flash_data[1].width = 4; | ||
333 | |||
334 | /* | ||
335 | * System bus arbiter setting: | ||
336 | * - Core_Park | ||
337 | * - LCD_wt:DMA_wt:CORE_Wt = 2:3:4 | ||
338 | */ | ||
339 | ARB_CNTRL = ARB_CORE_PARK | 0x234; | ||
340 | |||
341 | /* | ||
342 | * On LogicPD PXA270, we route AC97_SYSCLK via GPIO45. | ||
343 | */ | ||
344 | pxa_gpio_mode(GPIO45_SYSCLK_AC97_MD); | ||
345 | |||
346 | platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); | ||
347 | |||
348 | // set_pxa_fb_info(&sharp_lq057q3dc02); | ||
349 | set_pxa_fb_info(&sharp_lq64d343); | ||
350 | // set_pxa_fb_info(&sharp_lq035q7db02_20); | ||
351 | |||
352 | pxa_set_ohci_info(&lpd270_ohci_platform_data); | ||
353 | } | ||
354 | |||
355 | |||
356 | static struct map_desc lpd270_io_desc[] __initdata = { | ||
357 | { | ||
358 | .virtual = LPD270_CPLD_VIRT, | ||
359 | .pfn = __phys_to_pfn(LPD270_CPLD_PHYS), | ||
360 | .length = LPD270_CPLD_SIZE, | ||
361 | .type = MT_DEVICE, | ||
362 | }, | ||
363 | }; | ||
364 | |||
365 | static void __init lpd270_map_io(void) | ||
366 | { | ||
367 | pxa_map_io(); | ||
368 | iotable_init(lpd270_io_desc, ARRAY_SIZE(lpd270_io_desc)); | ||
369 | |||
370 | /* initialize sleep mode regs (wake-up sources, etc) */ | ||
371 | PGSR0 = 0x00008800; | ||
372 | PGSR1 = 0x00000002; | ||
373 | PGSR2 = 0x0001FC00; | ||
374 | PGSR3 = 0x00001F81; | ||
375 | PWER = 0xC0000002; | ||
376 | PRER = 0x00000002; | ||
377 | PFER = 0x00000002; | ||
378 | |||
379 | /* for use I SRAM as framebuffer. */ | ||
380 | PSLR |= 0x00000F04; | ||
381 | PCFR = 0x00000066; | ||
382 | } | ||
383 | |||
384 | MACHINE_START(LOGICPD_PXA270, "LogicPD PXA270 Card Engine") | ||
385 | /* Maintainer: Peter Barada */ | ||
386 | .phys_io = 0x40000000, | ||
387 | .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc, | ||
388 | .boot_params = 0xa0000100, | ||
389 | .map_io = lpd270_map_io, | ||
390 | .init_irq = lpd270_init_irq, | ||
391 | .timer = &pxa_timer, | ||
392 | .init_machine = lpd270_init, | ||
393 | MACHINE_END | ||
diff --git a/arch/arm/mach-pxa/mainstone.c b/arch/arm/mach-pxa/mainstone.c index d5bda60209ec..98356f810007 100644 --- a/arch/arm/mach-pxa/mainstone.c +++ b/arch/arm/mach-pxa/mainstone.c | |||
@@ -157,14 +157,14 @@ static struct platform_device smc91x_device = { | |||
157 | .resource = smc91x_resources, | 157 | .resource = smc91x_resources, |
158 | }; | 158 | }; |
159 | 159 | ||
160 | static int mst_audio_startup(snd_pcm_substream_t *substream, void *priv) | 160 | static int mst_audio_startup(struct snd_pcm_substream *substream, void *priv) |
161 | { | 161 | { |
162 | if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) | 162 | if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) |
163 | MST_MSCWR2 &= ~MST_MSCWR2_AC97_SPKROFF; | 163 | MST_MSCWR2 &= ~MST_MSCWR2_AC97_SPKROFF; |
164 | return 0; | 164 | return 0; |
165 | } | 165 | } |
166 | 166 | ||
167 | static void mst_audio_shutdown(snd_pcm_substream_t *substream, void *priv) | 167 | static void mst_audio_shutdown(struct snd_pcm_substream *substream, void *priv) |
168 | { | 168 | { |
169 | if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) | 169 | if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) |
170 | MST_MSCWR2 |= MST_MSCWR2_AC97_SPKROFF; | 170 | MST_MSCWR2 |= MST_MSCWR2_AC97_SPKROFF; |
diff --git a/arch/arm/mach-pxa/poodle.c b/arch/arm/mach-pxa/poodle.c index 911e6ff5a9bd..b45560a8f6c4 100644 --- a/arch/arm/mach-pxa/poodle.c +++ b/arch/arm/mach-pxa/poodle.c | |||
@@ -29,7 +29,6 @@ | |||
29 | #include <asm/mach/irq.h> | 29 | #include <asm/mach/irq.h> |
30 | 30 | ||
31 | #include <asm/arch/pxa-regs.h> | 31 | #include <asm/arch/pxa-regs.h> |
32 | #include <asm/arch/irq.h> | ||
33 | #include <asm/arch/mmc.h> | 32 | #include <asm/arch/mmc.h> |
34 | #include <asm/arch/udc.h> | 33 | #include <asm/arch/udc.h> |
35 | #include <asm/arch/irda.h> | 34 | #include <asm/arch/irda.h> |
diff --git a/arch/arm/mach-pxa/spitz.c b/arch/arm/mach-pxa/spitz.c index c094d99ebf56..19b372df544a 100644 --- a/arch/arm/mach-pxa/spitz.c +++ b/arch/arm/mach-pxa/spitz.c | |||
@@ -33,7 +33,6 @@ | |||
33 | #include <asm/mach/irq.h> | 33 | #include <asm/mach/irq.h> |
34 | 34 | ||
35 | #include <asm/arch/pxa-regs.h> | 35 | #include <asm/arch/pxa-regs.h> |
36 | #include <asm/arch/irq.h> | ||
37 | #include <asm/arch/irda.h> | 36 | #include <asm/arch/irda.h> |
38 | #include <asm/arch/mmc.h> | 37 | #include <asm/arch/mmc.h> |
39 | #include <asm/arch/ohci.h> | 38 | #include <asm/arch/ohci.h> |
@@ -221,6 +220,8 @@ struct corgissp_machinfo spitz_ssp_machinfo = { | |||
221 | * Spitz Backlight Device | 220 | * Spitz Backlight Device |
222 | */ | 221 | */ |
223 | static struct corgibl_machinfo spitz_bl_machinfo = { | 222 | static struct corgibl_machinfo spitz_bl_machinfo = { |
223 | .default_intensity = 0x1f, | ||
224 | .limit_mask = 0x0b, | ||
224 | .max_intensity = 0x2f, | 225 | .max_intensity = 0x2f, |
225 | }; | 226 | }; |
226 | 227 | ||
@@ -243,6 +244,14 @@ static struct platform_device spitzkbd_device = { | |||
243 | 244 | ||
244 | 245 | ||
245 | /* | 246 | /* |
247 | * Spitz LEDs | ||
248 | */ | ||
249 | static struct platform_device spitzled_device = { | ||
250 | .name = "spitz-led", | ||
251 | .id = -1, | ||
252 | }; | ||
253 | |||
254 | /* | ||
246 | * Spitz Touch Screen Device | 255 | * Spitz Touch Screen Device |
247 | */ | 256 | */ |
248 | static struct resource spitzts_resources[] = { | 257 | static struct resource spitzts_resources[] = { |
@@ -419,6 +428,7 @@ static struct platform_device *devices[] __initdata = { | |||
419 | &spitzkbd_device, | 428 | &spitzkbd_device, |
420 | &spitzts_device, | 429 | &spitzts_device, |
421 | &spitzbl_device, | 430 | &spitzbl_device, |
431 | &spitzled_device, | ||
422 | }; | 432 | }; |
423 | 433 | ||
424 | static void __init common_init(void) | 434 | static void __init common_init(void) |
@@ -468,6 +478,8 @@ struct platform_device akitaioexp_device = { | |||
468 | .id = -1, | 478 | .id = -1, |
469 | }; | 479 | }; |
470 | 480 | ||
481 | EXPORT_SYMBOL_GPL(akitaioexp_device); | ||
482 | |||
471 | static void __init akita_init(void) | 483 | static void __init akita_init(void) |
472 | { | 484 | { |
473 | spitz_ficp_platform_data.transceiver_mode = akita_irda_transceiver_mode; | 485 | spitz_ficp_platform_data.transceiver_mode = akita_irda_transceiver_mode; |
diff --git a/arch/arm/mach-pxa/tosa.c b/arch/arm/mach-pxa/tosa.c index d168286ed470..76c0e7f0a219 100644 --- a/arch/arm/mach-pxa/tosa.c +++ b/arch/arm/mach-pxa/tosa.c | |||
@@ -34,7 +34,6 @@ | |||
34 | #include <asm/mach/irq.h> | 34 | #include <asm/mach/irq.h> |
35 | 35 | ||
36 | #include <asm/arch/pxa-regs.h> | 36 | #include <asm/arch/pxa-regs.h> |
37 | #include <asm/arch/irq.h> | ||
38 | #include <asm/arch/tosa.h> | 37 | #include <asm/arch/tosa.h> |
39 | 38 | ||
40 | #include <asm/hardware/scoop.h> | 39 | #include <asm/hardware/scoop.h> |
@@ -252,10 +251,19 @@ static struct platform_device tosakbd_device = { | |||
252 | .id = -1, | 251 | .id = -1, |
253 | }; | 252 | }; |
254 | 253 | ||
254 | /* | ||
255 | * Tosa LEDs | ||
256 | */ | ||
257 | static struct platform_device tosaled_device = { | ||
258 | .name = "tosa-led", | ||
259 | .id = -1, | ||
260 | }; | ||
261 | |||
255 | static struct platform_device *devices[] __initdata = { | 262 | static struct platform_device *devices[] __initdata = { |
256 | &tosascoop_device, | 263 | &tosascoop_device, |
257 | &tosascoop_jc_device, | 264 | &tosascoop_jc_device, |
258 | &tosakbd_device, | 265 | &tosakbd_device, |
266 | &tosaled_device, | ||
259 | }; | 267 | }; |
260 | 268 | ||
261 | static void __init tosa_init(void) | 269 | static void __init tosa_init(void) |