aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-pxa/pxa25x.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-pxa/pxa25x.c')
-rw-r--r--arch/arm/mach-pxa/pxa25x.c62
1 files changed, 50 insertions, 12 deletions
diff --git a/arch/arm/mach-pxa/pxa25x.c b/arch/arm/mach-pxa/pxa25x.c
index c1f21739bf7..f36ca448338 100644
--- a/arch/arm/mach-pxa/pxa25x.c
+++ b/arch/arm/mach-pxa/pxa25x.c
@@ -19,12 +19,17 @@
19#include <linux/module.h> 19#include <linux/module.h>
20#include <linux/kernel.h> 20#include <linux/kernel.h>
21#include <linux/init.h> 21#include <linux/init.h>
22#include <linux/platform_device.h>
22#include <linux/pm.h> 23#include <linux/pm.h>
23 24
24#include <asm/hardware.h> 25#include <asm/hardware.h>
26#include <asm/arch/irqs.h>
25#include <asm/arch/pxa-regs.h> 27#include <asm/arch/pxa-regs.h>
28#include <asm/arch/pm.h>
29#include <asm/arch/dma.h>
26 30
27#include "generic.h" 31#include "generic.h"
32#include "devices.h"
28 33
29/* 34/*
30 * Various clock factors driven by the CCCR register. 35 * Various clock factors driven by the CCCR register.
@@ -105,18 +110,6 @@ EXPORT_SYMBOL(get_lcdclk_frequency_10khz);
105 110
106#ifdef CONFIG_PM 111#ifdef CONFIG_PM
107 112
108int pxa_cpu_pm_prepare(suspend_state_t state)
109{
110 switch (state) {
111 case PM_SUSPEND_MEM:
112 break;
113 default:
114 return -EINVAL;
115 }
116
117 return 0;
118}
119
120void pxa_cpu_pm_enter(suspend_state_t state) 113void pxa_cpu_pm_enter(suspend_state_t state)
121{ 114{
122 extern void pxa_cpu_suspend(unsigned int); 115 extern void pxa_cpu_suspend(unsigned int);
@@ -133,4 +126,49 @@ void pxa_cpu_pm_enter(suspend_state_t state)
133 } 126 }
134} 127}
135 128
129static struct pm_ops pxa25x_pm_ops = {
130 .enter = pxa_pm_enter,
131 .valid = pm_valid_only_mem,
132};
133#endif
134
135void __init pxa25x_init_irq(void)
136{
137 pxa_init_irq_low();
138 pxa_init_irq_gpio(85);
139}
140
141static struct platform_device *pxa25x_devices[] __initdata = {
142 &pxamci_device,
143 &pxaudc_device,
144 &pxafb_device,
145 &ffuart_device,
146 &btuart_device,
147 &stuart_device,
148 &pxai2c_device,
149 &pxai2s_device,
150 &pxaficp_device,
151 &pxartc_device,
152};
153
154static int __init pxa25x_init(void)
155{
156 int ret = 0;
157
158 if (cpu_is_pxa21x() || cpu_is_pxa25x()) {
159 if ((ret = pxa_init_dma(16)))
160 return ret;
161#ifdef CONFIG_PM
162 pm_set_ops(&pxa25x_pm_ops);
136#endif 163#endif
164 ret = platform_add_devices(pxa25x_devices,
165 ARRAY_SIZE(pxa25x_devices));
166 }
167 /* Only add HWUART for PXA255/26x; PXA210/250/27x do not have it. */
168 if (cpu_is_pxa25x())
169 ret = platform_device_register(&hwuart_device);
170
171 return ret;
172}
173
174subsys_initcall(pxa25x_init);