diff options
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/include/asm/mach/udc_pxa2xx.h | 3 | ||||
-rw-r--r-- | arch/arm/mach-pxa/devices.h | 1 | ||||
-rw-r--r-- | arch/arm/mach-pxa/generic.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-pxa/include/mach/hardware.h | 79 | ||||
-rw-r--r-- | arch/arm/mach-pxa/include/mach/i2c.h | 9 | ||||
-rw-r--r-- | arch/arm/mach-pxa/include/mach/pm.h | 2 | ||||
-rw-r--r-- | arch/arm/mach-pxa/include/mach/pxa-regs.h | 1 | ||||
-rw-r--r-- | arch/arm/mach-pxa/include/mach/ssp.h | 24 | ||||
-rw-r--r-- | arch/arm/mach-pxa/pm.c | 18 | ||||
-rw-r--r-- | arch/arm/mach-pxa/pxa25x.c | 38 | ||||
-rw-r--r-- | arch/arm/mach-pxa/pxa27x.c | 22 | ||||
-rw-r--r-- | arch/arm/mach-pxa/pxa3xx.c | 45 | ||||
-rw-r--r-- | arch/arm/mach-pxa/time.c | 2 |
13 files changed, 210 insertions, 38 deletions
diff --git a/arch/arm/include/asm/mach/udc_pxa2xx.h b/arch/arm/include/asm/mach/udc_pxa2xx.h index 270902c353fd..f3eabf1ecec3 100644 --- a/arch/arm/include/asm/mach/udc_pxa2xx.h +++ b/arch/arm/include/asm/mach/udc_pxa2xx.h | |||
@@ -18,8 +18,7 @@ struct pxa2xx_udc_mach_info { | |||
18 | /* Boards following the design guidelines in the developer's manual, | 18 | /* Boards following the design guidelines in the developer's manual, |
19 | * with on-chip GPIOs not Lubbock's weird hardware, can have a sane | 19 | * with on-chip GPIOs not Lubbock's weird hardware, can have a sane |
20 | * VBUS IRQ and omit the methods above. Store the GPIO number | 20 | * VBUS IRQ and omit the methods above. Store the GPIO number |
21 | * here; for GPIO 0, also mask in one of the pxa_gpio_mode() bits. | 21 | * here. Note that sometimes the signals go through inverters... |
22 | * Note that sometimes the signals go through inverters... | ||
23 | */ | 22 | */ |
24 | bool gpio_vbus_inverted; | 23 | bool gpio_vbus_inverted; |
25 | u16 gpio_vbus; /* high == vbus present */ | 24 | u16 gpio_vbus; /* high == vbus present */ |
diff --git a/arch/arm/mach-pxa/devices.h b/arch/arm/mach-pxa/devices.h index 887c738f5911..bb04af4b0aa3 100644 --- a/arch/arm/mach-pxa/devices.h +++ b/arch/arm/mach-pxa/devices.h | |||
@@ -32,5 +32,6 @@ extern struct platform_device pxa27x_device_pwm0; | |||
32 | extern struct platform_device pxa27x_device_pwm1; | 32 | extern struct platform_device pxa27x_device_pwm1; |
33 | 33 | ||
34 | extern struct platform_device pxa3xx_device_nand; | 34 | extern struct platform_device pxa3xx_device_nand; |
35 | extern struct platform_device pxa3xx_device_i2c_power; | ||
35 | 36 | ||
36 | void __init pxa_register_device(struct platform_device *dev, void *data); | 37 | void __init pxa_register_device(struct platform_device *dev, void *data); |
diff --git a/arch/arm/mach-pxa/generic.c b/arch/arm/mach-pxa/generic.c index ceaed0076366..cbbf30097920 100644 --- a/arch/arm/mach-pxa/generic.c +++ b/arch/arm/mach-pxa/generic.c | |||
@@ -46,7 +46,7 @@ void clear_reset_status(unsigned int mask) | |||
46 | */ | 46 | */ |
47 | unsigned int get_clk_frequency_khz(int info) | 47 | unsigned int get_clk_frequency_khz(int info) |
48 | { | 48 | { |
49 | if (cpu_is_pxa21x() || cpu_is_pxa25x()) | 49 | if (cpu_is_pxa25x()) |
50 | return pxa25x_get_clk_frequency_khz(info); | 50 | return pxa25x_get_clk_frequency_khz(info); |
51 | else if (cpu_is_pxa27x()) | 51 | else if (cpu_is_pxa27x()) |
52 | return pxa27x_get_clk_frequency_khz(info); | 52 | return pxa27x_get_clk_frequency_khz(info); |
@@ -60,7 +60,7 @@ EXPORT_SYMBOL(get_clk_frequency_khz); | |||
60 | */ | 60 | */ |
61 | unsigned int get_memclk_frequency_10khz(void) | 61 | unsigned int get_memclk_frequency_10khz(void) |
62 | { | 62 | { |
63 | if (cpu_is_pxa21x() || cpu_is_pxa25x()) | 63 | if (cpu_is_pxa25x()) |
64 | return pxa25x_get_memclk_frequency_10khz(); | 64 | return pxa25x_get_memclk_frequency_10khz(); |
65 | else if (cpu_is_pxa27x()) | 65 | else if (cpu_is_pxa27x()) |
66 | return pxa27x_get_memclk_frequency_10khz(); | 66 | return pxa27x_get_memclk_frequency_10khz(); |
diff --git a/arch/arm/mach-pxa/include/mach/hardware.h b/arch/arm/mach-pxa/include/mach/hardware.h index e89df4d0d239..9dc71114e287 100644 --- a/arch/arm/mach-pxa/include/mach/hardware.h +++ b/arch/arm/mach-pxa/include/mach/hardware.h | |||
@@ -62,26 +62,72 @@ | |||
62 | 62 | ||
63 | #ifndef __ASSEMBLY__ | 63 | #ifndef __ASSEMBLY__ |
64 | 64 | ||
65 | /* | ||
66 | * CPU Stepping CPU_ID JTAG_ID | ||
67 | * | ||
68 | * PXA210 B0 0x69052922 0x2926C013 | ||
69 | * PXA210 B1 0x69052923 0x3926C013 | ||
70 | * PXA210 B2 0x69052924 0x4926C013 | ||
71 | * PXA210 C0 0x69052D25 0x5926C013 | ||
72 | * | ||
73 | * PXA250 A0 0x69052100 0x09264013 | ||
74 | * PXA250 A1 0x69052101 0x19264013 | ||
75 | * PXA250 B0 0x69052902 0x29264013 | ||
76 | * PXA250 B1 0x69052903 0x39264013 | ||
77 | * PXA250 B2 0x69052904 0x49264013 | ||
78 | * PXA250 C0 0x69052D05 0x59264013 | ||
79 | * | ||
80 | * PXA255 A0 0x69052D06 0x69264013 | ||
81 | * | ||
82 | * PXA26x A0 0x69052903 0x39264013 | ||
83 | * PXA26x B0 0x69052D05 0x59264013 | ||
84 | * | ||
85 | * PXA27x A0 0x69054110 0x09265013 | ||
86 | * PXA27x A1 0x69054111 0x19265013 | ||
87 | * PXA27x B0 0x69054112 0x29265013 | ||
88 | * PXA27x B1 0x69054113 0x39265013 | ||
89 | * PXA27x C0 0x69054114 0x49265013 | ||
90 | * PXA27x C5 0x69054117 0x79265013 | ||
91 | * | ||
92 | * PXA30x A0 0x69056880 0x0E648013 | ||
93 | * PXA30x A1 0x69056881 0x1E648013 | ||
94 | * PXA31x A0 0x69056890 0x0E649013 | ||
95 | * PXA31x A1 0x69056891 0x1E649013 | ||
96 | * PXA31x A2 0x69056892 0x2E649013 | ||
97 | * PXA32x B1 0x69056825 0x5E642013 | ||
98 | * PXA32x B2 0x69056826 0x6E642013 | ||
99 | * | ||
100 | * PXA930 B0 0x69056835 0x5E643013 | ||
101 | * PXA930 B1 0x69056837 0x7E643013 | ||
102 | * PXA930 B2 0x69056838 0x8E643013 | ||
103 | */ | ||
65 | #ifdef CONFIG_PXA25x | 104 | #ifdef CONFIG_PXA25x |
66 | #define __cpu_is_pxa21x(id) \ | 105 | #define __cpu_is_pxa210(id) \ |
67 | ({ \ | 106 | ({ \ |
68 | unsigned int _id = (id) >> 4 & 0xf3f; \ | 107 | unsigned int _id = (id) & 0xf3f0; \ |
69 | _id == 0x212; \ | 108 | _id == 0x2120; \ |
70 | }) | 109 | }) |
71 | 110 | ||
72 | #define __cpu_is_pxa255(id) \ | 111 | #define __cpu_is_pxa250(id) \ |
73 | ({ \ | 112 | ({ \ |
74 | unsigned int _id = (id) >> 4 & 0xfff; \ | 113 | unsigned int _id = (id) & 0xf3ff; \ |
75 | _id == 0x2d0; \ | 114 | _id <= 0x2105; \ |
76 | }) | 115 | }) |
116 | |||
117 | #define __cpu_is_pxa255(id) \ | ||
118 | ({ \ | ||
119 | unsigned int _id = (id) & 0xffff; \ | ||
120 | _id == 0x2d06; \ | ||
121 | }) | ||
77 | 122 | ||
78 | #define __cpu_is_pxa25x(id) \ | 123 | #define __cpu_is_pxa25x(id) \ |
79 | ({ \ | 124 | ({ \ |
80 | unsigned int _id = (id) >> 4 & 0xfff; \ | 125 | unsigned int _id = (id) & 0xf300; \ |
81 | _id == 0x2d0 || _id == 0x290; \ | 126 | _id == 0x2100; \ |
82 | }) | 127 | }) |
83 | #else | 128 | #else |
84 | #define __cpu_is_pxa21x(id) (0) | 129 | #define __cpu_is_pxa210(id) (0) |
130 | #define __cpu_is_pxa250(id) (0) | ||
85 | #define __cpu_is_pxa255(id) (0) | 131 | #define __cpu_is_pxa255(id) (0) |
86 | #define __cpu_is_pxa25x(id) (0) | 132 | #define __cpu_is_pxa25x(id) (0) |
87 | #endif | 133 | #endif |
@@ -136,9 +182,14 @@ | |||
136 | #define __cpu_is_pxa930(id) (0) | 182 | #define __cpu_is_pxa930(id) (0) |
137 | #endif | 183 | #endif |
138 | 184 | ||
139 | #define cpu_is_pxa21x() \ | 185 | #define cpu_is_pxa210() \ |
140 | ({ \ | 186 | ({ \ |
141 | __cpu_is_pxa21x(read_cpuid_id()); \ | 187 | __cpu_is_pxa210(read_cpuid_id()); \ |
188 | }) | ||
189 | |||
190 | #define cpu_is_pxa250() \ | ||
191 | ({ \ | ||
192 | __cpu_is_pxa250(read_cpuid_id()); \ | ||
142 | }) | 193 | }) |
143 | 194 | ||
144 | #define cpu_is_pxa255() \ | 195 | #define cpu_is_pxa255() \ |
@@ -151,6 +202,8 @@ | |||
151 | __cpu_is_pxa25x(read_cpuid_id()); \ | 202 | __cpu_is_pxa25x(read_cpuid_id()); \ |
152 | }) | 203 | }) |
153 | 204 | ||
205 | extern int cpu_is_pxa26x(void); | ||
206 | |||
154 | #define cpu_is_pxa27x() \ | 207 | #define cpu_is_pxa27x() \ |
155 | ({ \ | 208 | ({ \ |
156 | __cpu_is_pxa27x(read_cpuid_id()); \ | 209 | __cpu_is_pxa27x(read_cpuid_id()); \ |
diff --git a/arch/arm/mach-pxa/include/mach/i2c.h b/arch/arm/mach-pxa/include/mach/i2c.h index 80596b013443..1a9f65e6ec0f 100644 --- a/arch/arm/mach-pxa/include/mach/i2c.h +++ b/arch/arm/mach-pxa/include/mach/i2c.h | |||
@@ -65,13 +65,18 @@ struct i2c_pxa_platform_data { | |||
65 | unsigned int slave_addr; | 65 | unsigned int slave_addr; |
66 | struct i2c_slave_client *slave; | 66 | struct i2c_slave_client *slave; |
67 | unsigned int class; | 67 | unsigned int class; |
68 | int use_pio; | 68 | unsigned int use_pio :1; |
69 | unsigned int fast_mode :1; | ||
69 | }; | 70 | }; |
70 | 71 | ||
71 | extern void pxa_set_i2c_info(struct i2c_pxa_platform_data *info); | 72 | extern void pxa_set_i2c_info(struct i2c_pxa_platform_data *info); |
72 | 73 | ||
73 | #ifdef CONFIG_PXA27x | 74 | #ifdef CONFIG_PXA27x |
74 | extern void pxa_set_i2c_power_info(struct i2c_pxa_platform_data *info); | 75 | extern void pxa27x_set_i2c_power_info(struct i2c_pxa_platform_data *info); |
76 | #endif | ||
77 | |||
78 | #ifdef CONFIG_PXA3xx | ||
79 | extern void pxa3xx_set_i2c_power_info(struct i2c_pxa_platform_data *info); | ||
75 | #endif | 80 | #endif |
76 | 81 | ||
77 | #endif | 82 | #endif |
diff --git a/arch/arm/mach-pxa/include/mach/pm.h b/arch/arm/mach-pxa/include/mach/pm.h index 261e5bc958db..83342469acac 100644 --- a/arch/arm/mach-pxa/include/mach/pm.h +++ b/arch/arm/mach-pxa/include/mach/pm.h | |||
@@ -15,6 +15,8 @@ struct pxa_cpu_pm_fns { | |||
15 | void (*restore)(unsigned long *); | 15 | void (*restore)(unsigned long *); |
16 | int (*valid)(suspend_state_t state); | 16 | int (*valid)(suspend_state_t state); |
17 | void (*enter)(suspend_state_t state); | 17 | void (*enter)(suspend_state_t state); |
18 | int (*prepare)(void); | ||
19 | void (*finish)(void); | ||
18 | }; | 20 | }; |
19 | 21 | ||
20 | extern struct pxa_cpu_pm_fns *pxa_cpu_pm_fns; | 22 | extern struct pxa_cpu_pm_fns *pxa_cpu_pm_fns; |
diff --git a/arch/arm/mach-pxa/include/mach/pxa-regs.h b/arch/arm/mach-pxa/include/mach/pxa-regs.h index 12288ca3cbb2..772c67635e23 100644 --- a/arch/arm/mach-pxa/include/mach/pxa-regs.h +++ b/arch/arm/mach-pxa/include/mach/pxa-regs.h | |||
@@ -448,6 +448,7 @@ | |||
448 | #define ICR_ALDIE (1 << 12) /* enable arbitration interrupt */ | 448 | #define ICR_ALDIE (1 << 12) /* enable arbitration interrupt */ |
449 | #define ICR_SADIE (1 << 13) /* slave address detected int enable */ | 449 | #define ICR_SADIE (1 << 13) /* slave address detected int enable */ |
450 | #define ICR_UR (1 << 14) /* unit reset */ | 450 | #define ICR_UR (1 << 14) /* unit reset */ |
451 | #define ICR_FM (1 << 15) /* fast mode */ | ||
451 | 452 | ||
452 | #define ISR_RWM (1 << 0) /* read/write mode */ | 453 | #define ISR_RWM (1 << 0) /* read/write mode */ |
453 | #define ISR_ACKNAK (1 << 1) /* ack/nak status */ | 454 | #define ISR_ACKNAK (1 << 1) /* ack/nak status */ |
diff --git a/arch/arm/mach-pxa/include/mach/ssp.h b/arch/arm/mach-pxa/include/mach/ssp.h index a012882c9ee6..cb5cb766f0f1 100644 --- a/arch/arm/mach-pxa/include/mach/ssp.h +++ b/arch/arm/mach-pxa/include/mach/ssp.h | |||
@@ -20,6 +20,7 @@ | |||
20 | #define __ASM_ARCH_SSP_H | 20 | #define __ASM_ARCH_SSP_H |
21 | 21 | ||
22 | #include <linux/list.h> | 22 | #include <linux/list.h> |
23 | #include <linux/io.h> | ||
23 | 24 | ||
24 | enum pxa_ssp_type { | 25 | enum pxa_ssp_type { |
25 | SSP_UNDEFINED = 0, | 26 | SSP_UNDEFINED = 0, |
@@ -78,6 +79,29 @@ int ssp_init(struct ssp_dev *dev, u32 port, u32 init_flags); | |||
78 | int ssp_config(struct ssp_dev *dev, u32 mode, u32 flags, u32 psp_flags, u32 speed); | 79 | int ssp_config(struct ssp_dev *dev, u32 mode, u32 flags, u32 psp_flags, u32 speed); |
79 | void ssp_exit(struct ssp_dev *dev); | 80 | void ssp_exit(struct ssp_dev *dev); |
80 | 81 | ||
82 | /** | ||
83 | * ssp_write_reg - Write to a SSP register | ||
84 | * | ||
85 | * @dev: SSP device to access | ||
86 | * @reg: Register to write to | ||
87 | * @val: Value to be written. | ||
88 | */ | ||
89 | static inline void ssp_write_reg(struct ssp_device *dev, u32 reg, u32 val) | ||
90 | { | ||
91 | __raw_writel(val, dev->mmio_base + reg); | ||
92 | } | ||
93 | |||
94 | /** | ||
95 | * ssp_read_reg - Read from a SSP register | ||
96 | * | ||
97 | * @dev: SSP device to access | ||
98 | * @reg: Register to read from | ||
99 | */ | ||
100 | static inline u32 ssp_read_reg(struct ssp_device *dev, u32 reg) | ||
101 | { | ||
102 | return __raw_readl(dev->mmio_base + reg); | ||
103 | } | ||
104 | |||
81 | struct ssp_device *ssp_request(int port, const char *label); | 105 | struct ssp_device *ssp_request(int port, const char *label); |
82 | void ssp_free(struct ssp_device *); | 106 | void ssp_free(struct ssp_device *); |
83 | #endif /* __ASM_ARCH_SSP_H */ | 107 | #endif /* __ASM_ARCH_SSP_H */ |
diff --git a/arch/arm/mach-pxa/pm.c b/arch/arm/mach-pxa/pm.c index 1b539e675579..164eb0bb6321 100644 --- a/arch/arm/mach-pxa/pm.c +++ b/arch/arm/mach-pxa/pm.c | |||
@@ -86,9 +86,27 @@ static int pxa_pm_valid(suspend_state_t state) | |||
86 | return -EINVAL; | 86 | return -EINVAL; |
87 | } | 87 | } |
88 | 88 | ||
89 | static int pxa_pm_prepare(void) | ||
90 | { | ||
91 | int ret = 0; | ||
92 | |||
93 | if (pxa_cpu_pm_fns && pxa_cpu_pm_fns->prepare) | ||
94 | ret = pxa_cpu_pm_fns->prepare(); | ||
95 | |||
96 | return ret; | ||
97 | } | ||
98 | |||
99 | static void pxa_pm_finish(void) | ||
100 | { | ||
101 | if (pxa_cpu_pm_fns && pxa_cpu_pm_fns->finish) | ||
102 | pxa_cpu_pm_fns->finish(); | ||
103 | } | ||
104 | |||
89 | static struct platform_suspend_ops pxa_pm_ops = { | 105 | static struct platform_suspend_ops pxa_pm_ops = { |
90 | .valid = pxa_pm_valid, | 106 | .valid = pxa_pm_valid, |
91 | .enter = pxa_pm_enter, | 107 | .enter = pxa_pm_enter, |
108 | .prepare = pxa_pm_prepare, | ||
109 | .finish = pxa_pm_finish, | ||
92 | }; | 110 | }; |
93 | 111 | ||
94 | static int __init pxa_pm_init(void) | 112 | static int __init pxa_pm_init(void) |
diff --git a/arch/arm/mach-pxa/pxa25x.c b/arch/arm/mach-pxa/pxa25x.c index f0eda2094494..25d17a1dab78 100644 --- a/arch/arm/mach-pxa/pxa25x.c +++ b/arch/arm/mach-pxa/pxa25x.c | |||
@@ -36,6 +36,12 @@ | |||
36 | #include "devices.h" | 36 | #include "devices.h" |
37 | #include "clock.h" | 37 | #include "clock.h" |
38 | 38 | ||
39 | int cpu_is_pxa26x(void) | ||
40 | { | ||
41 | return cpu_is_pxa250() && ((BOOT_DEF & 0x8) == 0); | ||
42 | } | ||
43 | EXPORT_SYMBOL_GPL(cpu_is_pxa26x); | ||
44 | |||
39 | /* | 45 | /* |
40 | * Various clock factors driven by the CCCR register. | 46 | * Various clock factors driven by the CCCR register. |
41 | */ | 47 | */ |
@@ -218,9 +224,6 @@ static void pxa25x_cpu_pm_save(unsigned long *sleep_save) | |||
218 | 224 | ||
219 | static void pxa25x_cpu_pm_restore(unsigned long *sleep_save) | 225 | static void pxa25x_cpu_pm_restore(unsigned long *sleep_save) |
220 | { | 226 | { |
221 | /* ensure not to come back here if it wasn't intended */ | ||
222 | PSPR = 0; | ||
223 | |||
224 | RESTORE(CKEN); | 227 | RESTORE(CKEN); |
225 | RESTORE(PSTR); | 228 | RESTORE(PSTR); |
226 | } | 229 | } |
@@ -232,19 +235,32 @@ static void pxa25x_cpu_pm_enter(suspend_state_t state) | |||
232 | 235 | ||
233 | switch (state) { | 236 | switch (state) { |
234 | case PM_SUSPEND_MEM: | 237 | case PM_SUSPEND_MEM: |
235 | /* set resume return address */ | ||
236 | PSPR = virt_to_phys(pxa_cpu_resume); | ||
237 | pxa25x_cpu_suspend(PWRMODE_SLEEP); | 238 | pxa25x_cpu_suspend(PWRMODE_SLEEP); |
238 | break; | 239 | break; |
239 | } | 240 | } |
240 | } | 241 | } |
241 | 242 | ||
243 | static int pxa25x_cpu_pm_prepare(void) | ||
244 | { | ||
245 | /* set resume return address */ | ||
246 | PSPR = virt_to_phys(pxa_cpu_resume); | ||
247 | return 0; | ||
248 | } | ||
249 | |||
250 | static void pxa25x_cpu_pm_finish(void) | ||
251 | { | ||
252 | /* ensure not to come back here if it wasn't intended */ | ||
253 | PSPR = 0; | ||
254 | } | ||
255 | |||
242 | static struct pxa_cpu_pm_fns pxa25x_cpu_pm_fns = { | 256 | static struct pxa_cpu_pm_fns pxa25x_cpu_pm_fns = { |
243 | .save_count = SLEEP_SAVE_COUNT, | 257 | .save_count = SLEEP_SAVE_COUNT, |
244 | .valid = suspend_valid_only_mem, | 258 | .valid = suspend_valid_only_mem, |
245 | .save = pxa25x_cpu_pm_save, | 259 | .save = pxa25x_cpu_pm_save, |
246 | .restore = pxa25x_cpu_pm_restore, | 260 | .restore = pxa25x_cpu_pm_restore, |
247 | .enter = pxa25x_cpu_pm_enter, | 261 | .enter = pxa25x_cpu_pm_enter, |
262 | .prepare = pxa25x_cpu_pm_prepare, | ||
263 | .finish = pxa25x_cpu_pm_finish, | ||
248 | }; | 264 | }; |
249 | 265 | ||
250 | static void __init pxa25x_init_pm(void) | 266 | static void __init pxa25x_init_pm(void) |
@@ -316,11 +332,7 @@ static int __init pxa25x_init(void) | |||
316 | { | 332 | { |
317 | int i, ret = 0; | 333 | int i, ret = 0; |
318 | 334 | ||
319 | /* Only add HWUART for PXA255/26x; PXA210/250/27x do not have it. */ | 335 | if (cpu_is_pxa25x()) { |
320 | if (cpu_is_pxa255()) | ||
321 | clks_register(&pxa25x_hwuart_clk, 1); | ||
322 | |||
323 | if (cpu_is_pxa21x() || cpu_is_pxa25x()) { | ||
324 | 336 | ||
325 | reset_status = RCSR; | 337 | reset_status = RCSR; |
326 | 338 | ||
@@ -343,9 +355,11 @@ static int __init pxa25x_init(void) | |||
343 | return ret; | 355 | return ret; |
344 | } | 356 | } |
345 | 357 | ||
346 | /* Only add HWUART for PXA255/26x; PXA210/250/27x do not have it. */ | 358 | /* Only add HWUART for PXA255/26x; PXA210/250 do not have it. */ |
347 | if (cpu_is_pxa255()) | 359 | if (cpu_is_pxa255() || cpu_is_pxa26x()) { |
360 | clks_register(&pxa25x_hwuart_clk, 1); | ||
348 | ret = platform_device_register(&pxa_device_hwuart); | 361 | ret = platform_device_register(&pxa_device_hwuart); |
362 | } | ||
349 | 363 | ||
350 | return ret; | 364 | return ret; |
351 | } | 365 | } |
diff --git a/arch/arm/mach-pxa/pxa27x.c b/arch/arm/mach-pxa/pxa27x.c index 0288665ad035..bf01e14098f5 100644 --- a/arch/arm/mach-pxa/pxa27x.c +++ b/arch/arm/mach-pxa/pxa27x.c | |||
@@ -202,9 +202,6 @@ void pxa27x_cpu_pm_save(unsigned long *sleep_save) | |||
202 | 202 | ||
203 | void pxa27x_cpu_pm_restore(unsigned long *sleep_save) | 203 | void pxa27x_cpu_pm_restore(unsigned long *sleep_save) |
204 | { | 204 | { |
205 | /* ensure not to come back here if it wasn't intended */ | ||
206 | PSPR = 0; | ||
207 | |||
208 | RESTORE(MDREFR); | 205 | RESTORE(MDREFR); |
209 | RESTORE(PCFR); | 206 | RESTORE(PCFR); |
210 | 207 | ||
@@ -232,8 +229,6 @@ void pxa27x_cpu_pm_enter(suspend_state_t state) | |||
232 | pxa_cpu_standby(); | 229 | pxa_cpu_standby(); |
233 | break; | 230 | break; |
234 | case PM_SUSPEND_MEM: | 231 | case PM_SUSPEND_MEM: |
235 | /* set resume return address */ | ||
236 | PSPR = virt_to_phys(pxa_cpu_resume); | ||
237 | pxa27x_cpu_suspend(PWRMODE_SLEEP); | 232 | pxa27x_cpu_suspend(PWRMODE_SLEEP); |
238 | break; | 233 | break; |
239 | } | 234 | } |
@@ -244,12 +239,27 @@ static int pxa27x_cpu_pm_valid(suspend_state_t state) | |||
244 | return state == PM_SUSPEND_MEM || state == PM_SUSPEND_STANDBY; | 239 | return state == PM_SUSPEND_MEM || state == PM_SUSPEND_STANDBY; |
245 | } | 240 | } |
246 | 241 | ||
242 | static int pxa27x_cpu_pm_prepare(void) | ||
243 | { | ||
244 | /* set resume return address */ | ||
245 | PSPR = virt_to_phys(pxa_cpu_resume); | ||
246 | return 0; | ||
247 | } | ||
248 | |||
249 | static void pxa27x_cpu_pm_finish(void) | ||
250 | { | ||
251 | /* ensure not to come back here if it wasn't intended */ | ||
252 | PSPR = 0; | ||
253 | } | ||
254 | |||
247 | static struct pxa_cpu_pm_fns pxa27x_cpu_pm_fns = { | 255 | static struct pxa_cpu_pm_fns pxa27x_cpu_pm_fns = { |
248 | .save_count = SLEEP_SAVE_COUNT, | 256 | .save_count = SLEEP_SAVE_COUNT, |
249 | .save = pxa27x_cpu_pm_save, | 257 | .save = pxa27x_cpu_pm_save, |
250 | .restore = pxa27x_cpu_pm_restore, | 258 | .restore = pxa27x_cpu_pm_restore, |
251 | .valid = pxa27x_cpu_pm_valid, | 259 | .valid = pxa27x_cpu_pm_valid, |
252 | .enter = pxa27x_cpu_pm_enter, | 260 | .enter = pxa27x_cpu_pm_enter, |
261 | .prepare = pxa27x_cpu_pm_prepare, | ||
262 | .finish = pxa27x_cpu_pm_finish, | ||
253 | }; | 263 | }; |
254 | 264 | ||
255 | static void __init pxa27x_init_pm(void) | 265 | static void __init pxa27x_init_pm(void) |
@@ -322,7 +332,7 @@ struct platform_device pxa27x_device_i2c_power = { | |||
322 | .num_resources = ARRAY_SIZE(i2c_power_resources), | 332 | .num_resources = ARRAY_SIZE(i2c_power_resources), |
323 | }; | 333 | }; |
324 | 334 | ||
325 | void __init pxa_set_i2c_power_info(struct i2c_pxa_platform_data *info) | 335 | void __init pxa27x_set_i2c_power_info(struct i2c_pxa_platform_data *info) |
326 | { | 336 | { |
327 | local_irq_disable(); | 337 | local_irq_disable(); |
328 | PCFR |= PCFR_PI2CEN; | 338 | PCFR |= PCFR_PI2CEN; |
diff --git a/arch/arm/mach-pxa/pxa3xx.c b/arch/arm/mach-pxa/pxa3xx.c index 03cbc38103ed..b3cd5d0b0f35 100644 --- a/arch/arm/mach-pxa/pxa3xx.c +++ b/arch/arm/mach-pxa/pxa3xx.c | |||
@@ -203,6 +203,19 @@ static const struct clkops clk_pout_ops = { | |||
203 | .disable = clk_pout_disable, | 203 | .disable = clk_pout_disable, |
204 | }; | 204 | }; |
205 | 205 | ||
206 | static void clk_dummy_enable(struct clk *clk) | ||
207 | { | ||
208 | } | ||
209 | |||
210 | static void clk_dummy_disable(struct clk *clk) | ||
211 | { | ||
212 | } | ||
213 | |||
214 | static const struct clkops clk_dummy_ops = { | ||
215 | .enable = clk_dummy_enable, | ||
216 | .disable = clk_dummy_disable, | ||
217 | }; | ||
218 | |||
206 | static struct clk pxa3xx_clks[] = { | 219 | static struct clk pxa3xx_clks[] = { |
207 | { | 220 | { |
208 | .name = "CLK_POUT", | 221 | .name = "CLK_POUT", |
@@ -211,6 +224,13 @@ static struct clk pxa3xx_clks[] = { | |||
211 | .delay = 70, | 224 | .delay = 70, |
212 | }, | 225 | }, |
213 | 226 | ||
227 | /* Power I2C clock is always on */ | ||
228 | { | ||
229 | .name = "I2CCLK", | ||
230 | .ops = &clk_dummy_ops, | ||
231 | .dev = &pxa3xx_device_i2c_power.dev, | ||
232 | }, | ||
233 | |||
214 | PXA3xx_CK("LCDCLK", LCD, &clk_pxa3xx_hsio_ops, &pxa_device_fb.dev), | 234 | PXA3xx_CK("LCDCLK", LCD, &clk_pxa3xx_hsio_ops, &pxa_device_fb.dev), |
215 | PXA3xx_CK("CAMCLK", CAMERA, &clk_pxa3xx_hsio_ops, NULL), | 235 | PXA3xx_CK("CAMCLK", CAMERA, &clk_pxa3xx_hsio_ops, NULL), |
216 | PXA3xx_CK("AC97CLK", AC97, &clk_pxa3xx_ac97_ops, NULL), | 236 | PXA3xx_CK("AC97CLK", AC97, &clk_pxa3xx_ac97_ops, NULL), |
@@ -509,6 +529,30 @@ void __init pxa3xx_init_irq(void) | |||
509 | * device registration specific to PXA3xx. | 529 | * device registration specific to PXA3xx. |
510 | */ | 530 | */ |
511 | 531 | ||
532 | static struct resource i2c_power_resources[] = { | ||
533 | { | ||
534 | .start = 0x40f500c0, | ||
535 | .end = 0x40f500d3, | ||
536 | .flags = IORESOURCE_MEM, | ||
537 | }, { | ||
538 | .start = IRQ_PWRI2C, | ||
539 | .end = IRQ_PWRI2C, | ||
540 | .flags = IORESOURCE_IRQ, | ||
541 | }, | ||
542 | }; | ||
543 | |||
544 | struct platform_device pxa3xx_device_i2c_power = { | ||
545 | .name = "pxa2xx-i2c", | ||
546 | .id = 1, | ||
547 | .resource = i2c_power_resources, | ||
548 | .num_resources = ARRAY_SIZE(i2c_power_resources), | ||
549 | }; | ||
550 | |||
551 | void __init pxa3xx_set_i2c_power_info(struct i2c_pxa_platform_data *info) | ||
552 | { | ||
553 | pxa3xx_device_i2c_power.dev.platform_data = info; | ||
554 | } | ||
555 | |||
512 | static struct platform_device *devices[] __initdata = { | 556 | static struct platform_device *devices[] __initdata = { |
513 | /* &pxa_device_udc, The UDC driver is PXA25x only */ | 557 | /* &pxa_device_udc, The UDC driver is PXA25x only */ |
514 | &pxa_device_ffuart, | 558 | &pxa_device_ffuart, |
@@ -522,6 +566,7 @@ static struct platform_device *devices[] __initdata = { | |||
522 | &pxa3xx_device_ssp4, | 566 | &pxa3xx_device_ssp4, |
523 | &pxa27x_device_pwm0, | 567 | &pxa27x_device_pwm0, |
524 | &pxa27x_device_pwm1, | 568 | &pxa27x_device_pwm1, |
569 | &pxa3xx_device_i2c_power, | ||
525 | }; | 570 | }; |
526 | 571 | ||
527 | static struct sys_device pxa3xx_sysdev[] = { | 572 | static struct sys_device pxa3xx_sysdev[] = { |
diff --git a/arch/arm/mach-pxa/time.c b/arch/arm/mach-pxa/time.c index 67e18509d7bf..18d149745837 100644 --- a/arch/arm/mach-pxa/time.c +++ b/arch/arm/mach-pxa/time.c | |||
@@ -155,7 +155,7 @@ static void __init pxa_timer_init(void) | |||
155 | OIER = 0; | 155 | OIER = 0; |
156 | OSSR = OSSR_M0 | OSSR_M1 | OSSR_M2 | OSSR_M3; | 156 | OSSR = OSSR_M0 | OSSR_M1 | OSSR_M2 | OSSR_M3; |
157 | 157 | ||
158 | if (cpu_is_pxa21x() || cpu_is_pxa25x()) | 158 | if (cpu_is_pxa25x()) |
159 | clock_tick_rate = 3686400; | 159 | clock_tick_rate = 3686400; |
160 | else if (machine_is_mainstone()) | 160 | else if (machine_is_mainstone()) |
161 | clock_tick_rate = 3249600; | 161 | clock_tick_rate = 3249600; |