aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-shmobile
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-03-24 13:04:59 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-03-24 13:04:59 -0400
commit95985725367e55642755ca6986d0c930cd3738e2 (patch)
treee8c8627bc782fa39f42ab3d099e92ebdb8261026 /arch/arm/mach-shmobile
parent4d4fcae1d4a10c6cf3c8ca2ec61d2d3270f1225e (diff)
parent9d9659b6c0ebf7dde65ebada4c67980818245913 (diff)
Merge branch 'rmobile-latest' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6
* 'rmobile-latest' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6: mmc: Add MMC_PROGRESS_* mmc, ARM: Rename SuperH Mobile ARM zboot helpers ARM: mach-shmobile: add coherent DMA mask to CEU camera devices ARM: mach-shmobile: Dynamic backlight control for Mackerel
Diffstat (limited to 'arch/arm/mach-shmobile')
-rw-r--r--arch/arm/mach-shmobile/board-ap4evb.c3
-rw-r--r--arch/arm/mach-shmobile/board-mackerel.c25
-rw-r--r--arch/arm/mach-shmobile/include/mach/mmc-ap4eb.h (renamed from arch/arm/mach-shmobile/include/mach/mmcif-ap4eb.h)10
-rw-r--r--arch/arm/mach-shmobile/include/mach/mmc-mackerel.h (renamed from arch/arm/mach-shmobile/include/mach/mmcif-mackerel.h)11
-rw-r--r--arch/arm/mach-shmobile/include/mach/mmc.h (renamed from arch/arm/mach-shmobile/include/mach/mmcif.h)10
5 files changed, 40 insertions, 19 deletions
diff --git a/arch/arm/mach-shmobile/board-ap4evb.c b/arch/arm/mach-shmobile/board-ap4evb.c
index 1a8118c929be..a94f29da5d30 100644
--- a/arch/arm/mach-shmobile/board-ap4evb.c
+++ b/arch/arm/mach-shmobile/board-ap4evb.c
@@ -923,7 +923,8 @@ static struct platform_device ceu_device = {
923 .num_resources = ARRAY_SIZE(ceu_resources), 923 .num_resources = ARRAY_SIZE(ceu_resources),
924 .resource = ceu_resources, 924 .resource = ceu_resources,
925 .dev = { 925 .dev = {
926 .platform_data = &sh_mobile_ceu_info, 926 .platform_data = &sh_mobile_ceu_info,
927 .coherent_dma_mask = 0xffffffff,
927 }, 928 },
928}; 929};
929 930
diff --git a/arch/arm/mach-shmobile/board-mackerel.c b/arch/arm/mach-shmobile/board-mackerel.c
index 1a63c213e45d..49bc07482179 100644
--- a/arch/arm/mach-shmobile/board-mackerel.c
+++ b/arch/arm/mach-shmobile/board-mackerel.c
@@ -295,6 +295,18 @@ static struct fb_videomode mackerel_lcdc_modes[] = {
295 }, 295 },
296}; 296};
297 297
298static int mackerel_set_brightness(void *board_data, int brightness)
299{
300 gpio_set_value(GPIO_PORT31, brightness);
301
302 return 0;
303}
304
305static int mackerel_get_brightness(void *board_data)
306{
307 return gpio_get_value(GPIO_PORT31);
308}
309
298static struct sh_mobile_lcdc_info lcdc_info = { 310static struct sh_mobile_lcdc_info lcdc_info = {
299 .clock_source = LCDC_CLK_BUS, 311 .clock_source = LCDC_CLK_BUS,
300 .ch[0] = { 312 .ch[0] = {
@@ -307,6 +319,14 @@ static struct sh_mobile_lcdc_info lcdc_info = {
307 .flags = 0, 319 .flags = 0,
308 .lcd_size_cfg.width = 152, 320 .lcd_size_cfg.width = 152,
309 .lcd_size_cfg.height = 91, 321 .lcd_size_cfg.height = 91,
322 .board_cfg = {
323 .set_brightness = mackerel_set_brightness,
324 .get_brightness = mackerel_get_brightness,
325 },
326 .bl_info = {
327 .name = "sh_mobile_lcdc_bl",
328 .max_brightness = 1,
329 },
310 } 330 }
311}; 331};
312 332
@@ -901,7 +921,8 @@ static struct platform_device ceu_device = {
901 .num_resources = ARRAY_SIZE(ceu_resources), 921 .num_resources = ARRAY_SIZE(ceu_resources),
902 .resource = ceu_resources, 922 .resource = ceu_resources,
903 .dev = { 923 .dev = {
904 .platform_data = &sh_mobile_ceu_info, 924 .platform_data = &sh_mobile_ceu_info,
925 .coherent_dma_mask = 0xffffffff,
905 }, 926 },
906}; 927};
907 928
@@ -1059,7 +1080,7 @@ static void __init mackerel_init(void)
1059 gpio_request(GPIO_FN_LCDDCK, NULL); 1080 gpio_request(GPIO_FN_LCDDCK, NULL);
1060 1081
1061 gpio_request(GPIO_PORT31, NULL); /* backlight */ 1082 gpio_request(GPIO_PORT31, NULL); /* backlight */
1062 gpio_direction_output(GPIO_PORT31, 1); 1083 gpio_direction_output(GPIO_PORT31, 0); /* off by default */
1063 1084
1064 gpio_request(GPIO_PORT151, NULL); /* LCDDON */ 1085 gpio_request(GPIO_PORT151, NULL); /* LCDDON */
1065 gpio_direction_output(GPIO_PORT151, 1); 1086 gpio_direction_output(GPIO_PORT151, 1);
diff --git a/arch/arm/mach-shmobile/include/mach/mmcif-ap4eb.h b/arch/arm/mach-shmobile/include/mach/mmc-ap4eb.h
index a8d02be8d2b6..db59fdbda860 100644
--- a/arch/arm/mach-shmobile/include/mach/mmcif-ap4eb.h
+++ b/arch/arm/mach-shmobile/include/mach/mmc-ap4eb.h
@@ -1,5 +1,5 @@
1#ifndef MMCIF_AP4EB_H 1#ifndef MMC_AP4EB_H
2#define MMCIF_AP4EB_H 2#define MMC_AP4EB_H
3 3
4#define PORT185CR (void __iomem *)0xe60520b9 4#define PORT185CR (void __iomem *)0xe60520b9
5#define PORT186CR (void __iomem *)0xe60520ba 5#define PORT186CR (void __iomem *)0xe60520ba
@@ -8,7 +8,7 @@
8 8
9#define PORTR191_160DR (void __iomem *)0xe6056014 9#define PORTR191_160DR (void __iomem *)0xe6056014
10 10
11static inline void mmcif_init_progress(void) 11static inline void mmc_init_progress(void)
12{ 12{
13 /* Initialise LEDS1-4 13 /* Initialise LEDS1-4
14 * registers: PORT185CR-PORT188CR (LED1-LED4 Control) 14 * registers: PORT185CR-PORT188CR (LED1-LED4 Control)
@@ -20,10 +20,10 @@ static inline void mmcif_init_progress(void)
20 __raw_writeb(0x10, PORT188CR); 20 __raw_writeb(0x10, PORT188CR);
21} 21}
22 22
23static inline void mmcif_update_progress(int n) 23static inline void mmc_update_progress(int n)
24{ 24{
25 __raw_writel((__raw_readl(PORTR191_160DR) & ~(0xf << 25)) | 25 __raw_writel((__raw_readl(PORTR191_160DR) & ~(0xf << 25)) |
26 (1 << (25 + n)), PORTR191_160DR); 26 (1 << (25 + n)), PORTR191_160DR);
27} 27}
28 28
29#endif /* MMCIF_AP4EB_H */ 29#endif /* MMC_AP4EB_H */
diff --git a/arch/arm/mach-shmobile/include/mach/mmcif-mackerel.h b/arch/arm/mach-shmobile/include/mach/mmc-mackerel.h
index 4b4f6949a868..15d3a9efdec2 100644
--- a/arch/arm/mach-shmobile/include/mach/mmcif-mackerel.h
+++ b/arch/arm/mach-shmobile/include/mach/mmc-mackerel.h
@@ -1,5 +1,5 @@
1#ifndef MMCIF_MACKEREL_H 1#ifndef MMC_MACKEREL_H
2#define MMCIF_MACKEREL_H 2#define MMC_MACKEREL_H
3 3
4#define PORT0CR (void __iomem *)0xe6051000 4#define PORT0CR (void __iomem *)0xe6051000
5#define PORT1CR (void __iomem *)0xe6051001 5#define PORT1CR (void __iomem *)0xe6051001
@@ -9,7 +9,7 @@
9#define PORTR031_000DR (void __iomem *)0xe6055000 9#define PORTR031_000DR (void __iomem *)0xe6055000
10#define PORTL159_128DR (void __iomem *)0xe6054010 10#define PORTL159_128DR (void __iomem *)0xe6054010
11 11
12static inline void mmcif_init_progress(void) 12static inline void mmc_init_progress(void)
13{ 13{
14 /* Initialise LEDS0-3 14 /* Initialise LEDS0-3
15 * registers: PORT0CR-PORT2CR,PORT159CR (LED0-LED3 Control) 15 * registers: PORT0CR-PORT2CR,PORT159CR (LED0-LED3 Control)
@@ -21,7 +21,7 @@ static inline void mmcif_init_progress(void)
21 __raw_writeb(0x10, PORT159CR); 21 __raw_writeb(0x10, PORT159CR);
22} 22}
23 23
24static inline void mmcif_update_progress(int n) 24static inline void mmc_update_progress(int n)
25{ 25{
26 unsigned a = 0, b = 0; 26 unsigned a = 0, b = 0;
27 27
@@ -35,5 +35,4 @@ static inline void mmcif_update_progress(int n)
35 __raw_writel((__raw_readl(PORTL159_128DR) & ~(1 << 31)) | b, 35 __raw_writel((__raw_readl(PORTL159_128DR) & ~(1 << 31)) | b,
36 PORTL159_128DR); 36 PORTL159_128DR);
37} 37}
38 38#endif /* MMC_MACKEREL_H */
39#endif /* MMCIF_MACKEREL_H */
diff --git a/arch/arm/mach-shmobile/include/mach/mmcif.h b/arch/arm/mach-shmobile/include/mach/mmc.h
index f4dc3279cf03..e11560a525a1 100644
--- a/arch/arm/mach-shmobile/include/mach/mmcif.h
+++ b/arch/arm/mach-shmobile/include/mach/mmc.h
@@ -1,5 +1,5 @@
1#ifndef MMCIF_H 1#ifndef MMC_H
2#define MMCIF_H 2#define MMC_H
3 3
4/************************************************** 4/**************************************************
5 * 5 *
@@ -8,11 +8,11 @@
8 **************************************************/ 8 **************************************************/
9 9
10#ifdef CONFIG_MACH_AP4EVB 10#ifdef CONFIG_MACH_AP4EVB
11#include "mach/mmcif-ap4eb.h" 11#include "mach/mmc-ap4eb.h"
12#elif CONFIG_MACH_MACKEREL 12#elif CONFIG_MACH_MACKEREL
13#include "mach/mmcif-mackerel.h" 13#include "mach/mmc-mackerel.h"
14#else 14#else
15#error "unsupported board." 15#error "unsupported board."
16#endif 16#endif
17 17
18#endif /* MMCIF_H */ 18#endif /* MMC_H */