diff options
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/mach-imx/mx1ads.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-pxa/corgi.c | 18 | ||||
-rw-r--r-- | arch/arm/mach-pxa/spitz.c | 18 | ||||
-rw-r--r-- | arch/arm/mach-s3c2440/mach-osiris.c | 18 |
4 files changed, 51 insertions, 5 deletions
diff --git a/arch/arm/mach-imx/mx1ads.c b/arch/arm/mach-imx/mx1ads.c index da893c80d471..a9778c1587ab 100644 --- a/arch/arm/mach-imx/mx1ads.c +++ b/arch/arm/mach-imx/mx1ads.c | |||
@@ -116,7 +116,7 @@ static struct platform_device *devices[] __initdata = { | |||
116 | }; | 116 | }; |
117 | 117 | ||
118 | #ifdef CONFIG_MMC_IMX | 118 | #ifdef CONFIG_MMC_IMX |
119 | static int mx1ads_mmc_card_present(void) | 119 | static int mx1ads_mmc_card_present(struct device *dev) |
120 | { | 120 | { |
121 | /* MMC/SD Card Detect is PB 20 on MX1ADS V1.0.7 */ | 121 | /* MMC/SD Card Detect is PB 20 on MX1ADS V1.0.7 */ |
122 | return (SSR(1) & (1 << 20) ? 0 : 1); | 122 | return (SSR(1) & (1 << 20) ? 0 : 1); |
diff --git a/arch/arm/mach-pxa/corgi.c b/arch/arm/mach-pxa/corgi.c index aab27297b3c6..2363cc64fe07 100644 --- a/arch/arm/mach-pxa/corgi.c +++ b/arch/arm/mach-pxa/corgi.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/interrupt.h> | 20 | #include <linux/interrupt.h> |
21 | #include <linux/mmc/host.h> | 21 | #include <linux/mmc/host.h> |
22 | #include <linux/pm.h> | 22 | #include <linux/pm.h> |
23 | #include <linux/backlight.h> | ||
23 | 24 | ||
24 | #include <asm/setup.h> | 25 | #include <asm/setup.h> |
25 | #include <asm/memory.h> | 26 | #include <asm/memory.h> |
@@ -142,15 +143,28 @@ struct corgissp_machinfo corgi_ssp_machinfo = { | |||
142 | /* | 143 | /* |
143 | * Corgi Backlight Device | 144 | * Corgi Backlight Device |
144 | */ | 145 | */ |
145 | static struct corgibl_machinfo corgi_bl_machinfo = { | 146 | static void corgi_bl_kick_battery(void) |
147 | { | ||
148 | void (*kick_batt)(void); | ||
149 | |||
150 | kick_batt = symbol_get(sharpsl_battery_kick); | ||
151 | if (kick_batt) { | ||
152 | kick_batt(); | ||
153 | symbol_put(sharpsl_battery_kick); | ||
154 | } | ||
155 | } | ||
156 | |||
157 | static struct generic_bl_info corgi_bl_machinfo = { | ||
158 | .name = "corgi-bl", | ||
146 | .max_intensity = 0x2f, | 159 | .max_intensity = 0x2f, |
147 | .default_intensity = 0x1f, | 160 | .default_intensity = 0x1f, |
148 | .limit_mask = 0x0b, | 161 | .limit_mask = 0x0b, |
149 | .set_bl_intensity = corgi_bl_set_intensity, | 162 | .set_bl_intensity = corgi_bl_set_intensity, |
163 | .kick_battery = corgi_bl_kick_battery, | ||
150 | }; | 164 | }; |
151 | 165 | ||
152 | static struct platform_device corgibl_device = { | 166 | static struct platform_device corgibl_device = { |
153 | .name = "corgi-bl", | 167 | .name = "generic-bl", |
154 | .dev = { | 168 | .dev = { |
155 | .parent = &corgifb_device.dev, | 169 | .parent = &corgifb_device.dev, |
156 | .platform_data = &corgi_bl_machinfo, | 170 | .platform_data = &corgi_bl_machinfo, |
diff --git a/arch/arm/mach-pxa/spitz.c b/arch/arm/mach-pxa/spitz.c index bae47e145de8..2d78199d24af 100644 --- a/arch/arm/mach-pxa/spitz.c +++ b/arch/arm/mach-pxa/spitz.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/interrupt.h> | 21 | #include <linux/interrupt.h> |
22 | #include <linux/mmc/host.h> | 22 | #include <linux/mmc/host.h> |
23 | #include <linux/pm.h> | 23 | #include <linux/pm.h> |
24 | #include <linux/backlight.h> | ||
24 | 25 | ||
25 | #include <asm/setup.h> | 26 | #include <asm/setup.h> |
26 | #include <asm/memory.h> | 27 | #include <asm/memory.h> |
@@ -222,14 +223,27 @@ struct corgissp_machinfo spitz_ssp_machinfo = { | |||
222 | /* | 223 | /* |
223 | * Spitz Backlight Device | 224 | * Spitz Backlight Device |
224 | */ | 225 | */ |
225 | static struct corgibl_machinfo spitz_bl_machinfo = { | 226 | static void spitz_bl_kick_battery(void) |
227 | { | ||
228 | void (*kick_batt)(void); | ||
229 | |||
230 | kick_batt = symbol_get(sharpsl_battery_kick); | ||
231 | if (kick_batt) { | ||
232 | kick_batt(); | ||
233 | symbol_put(sharpsl_battery_kick); | ||
234 | } | ||
235 | } | ||
236 | |||
237 | static struct generic_bl_info spitz_bl_machinfo = { | ||
238 | .name = "corgi-bl", | ||
226 | .default_intensity = 0x1f, | 239 | .default_intensity = 0x1f, |
227 | .limit_mask = 0x0b, | 240 | .limit_mask = 0x0b, |
228 | .max_intensity = 0x2f, | 241 | .max_intensity = 0x2f, |
242 | .kick_battery = spitz_bl_kick_battery, | ||
229 | }; | 243 | }; |
230 | 244 | ||
231 | static struct platform_device spitzbl_device = { | 245 | static struct platform_device spitzbl_device = { |
232 | .name = "corgi-bl", | 246 | .name = "generic-bl", |
233 | .dev = { | 247 | .dev = { |
234 | .platform_data = &spitz_bl_machinfo, | 248 | .platform_data = &spitz_bl_machinfo, |
235 | }, | 249 | }, |
diff --git a/arch/arm/mach-s3c2440/mach-osiris.c b/arch/arm/mach-s3c2440/mach-osiris.c index 0ba7e9060c7b..c326983f4a8f 100644 --- a/arch/arm/mach-s3c2440/mach-osiris.c +++ b/arch/arm/mach-s3c2440/mach-osiris.c | |||
@@ -276,7 +276,21 @@ static unsigned char pm_osiris_ctrl0; | |||
276 | 276 | ||
277 | static int osiris_pm_suspend(struct sys_device *sd, pm_message_t state) | 277 | static int osiris_pm_suspend(struct sys_device *sd, pm_message_t state) |
278 | { | 278 | { |
279 | unsigned int tmp; | ||
280 | |||
279 | pm_osiris_ctrl0 = __raw_readb(OSIRIS_VA_CTRL0); | 281 | pm_osiris_ctrl0 = __raw_readb(OSIRIS_VA_CTRL0); |
282 | tmp = pm_osiris_ctrl0 & ~OSIRIS_CTRL0_NANDSEL; | ||
283 | |||
284 | /* ensure correct NAND slot is selected on resume */ | ||
285 | if ((pm_osiris_ctrl0 & OSIRIS_CTRL0_BOOT_INT) == 0) | ||
286 | tmp |= 2; | ||
287 | |||
288 | __raw_writeb(tmp, OSIRIS_VA_CTRL0); | ||
289 | |||
290 | /* ensure that an nRESET is not generated on resume. */ | ||
291 | s3c2410_gpio_setpin(S3C2410_GPA21, 1); | ||
292 | s3c2410_gpio_cfgpin(S3C2410_GPA21, S3C2410_GPA21_OUT); | ||
293 | |||
280 | return 0; | 294 | return 0; |
281 | } | 295 | } |
282 | 296 | ||
@@ -285,6 +299,10 @@ static int osiris_pm_resume(struct sys_device *sd) | |||
285 | if (pm_osiris_ctrl0 & OSIRIS_CTRL0_FIX8) | 299 | if (pm_osiris_ctrl0 & OSIRIS_CTRL0_FIX8) |
286 | __raw_writeb(OSIRIS_CTRL1_FIX8, OSIRIS_VA_CTRL1); | 300 | __raw_writeb(OSIRIS_CTRL1_FIX8, OSIRIS_VA_CTRL1); |
287 | 301 | ||
302 | __raw_writeb(pm_osiris_ctrl0, OSIRIS_VA_CTRL0); | ||
303 | |||
304 | s3c2410_gpio_cfgpin(S3C2410_GPA21, S3C2410_GPA21_nRSTOUT); | ||
305 | |||
288 | return 0; | 306 | return 0; |
289 | } | 307 | } |
290 | 308 | ||