diff options
author | Nobuhiro Iwamatsu <iwamatsu.nobuhiro@renesas.com> | 2008-08-08 01:30:06 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2008-08-11 07:17:50 -0400 |
commit | 674063c5a5461e39c0eb0b33570d467708ec0ecd (patch) | |
tree | 3e3802be62d708db8be8940c5a66015f3845f894 | |
parent | 0a766a6b7dd9f3d15c32d724555d954dc6bb020d (diff) |
sh: Add support sh7760fb to sh7763rdp board
Add sh7760fb platform device to sh7763rdp's setup.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
-rw-r--r-- | arch/sh/boards/mach-sh7763rdp/setup.c | 52 |
1 files changed, 51 insertions, 1 deletions
diff --git a/arch/sh/boards/mach-sh7763rdp/setup.c b/arch/sh/boards/mach-sh7763rdp/setup.c index 49940d192d67..23850da05e3c 100644 --- a/arch/sh/boards/mach-sh7763rdp/setup.c +++ b/arch/sh/boards/mach-sh7763rdp/setup.c | |||
@@ -15,9 +15,11 @@ | |||
15 | #include <linux/interrupt.h> | 15 | #include <linux/interrupt.h> |
16 | #include <linux/input.h> | 16 | #include <linux/input.h> |
17 | #include <linux/mtd/physmap.h> | 17 | #include <linux/mtd/physmap.h> |
18 | #include <linux/fb.h> | ||
18 | #include <linux/io.h> | 19 | #include <linux/io.h> |
19 | #include <asm/sh7763rdp.h> | 20 | #include <asm/sh7763rdp.h> |
20 | #include <asm/sh_eth.h> | 21 | #include <asm/sh_eth.h> |
22 | #include <asm/sh7760fb.h> | ||
21 | 23 | ||
22 | /* NOR Flash */ | 24 | /* NOR Flash */ |
23 | static struct mtd_partition sh7763rdp_nor_flash_partitions[] = { | 25 | static struct mtd_partition sh7763rdp_nor_flash_partitions[] = { |
@@ -88,9 +90,58 @@ static struct platform_device sh7763rdp_eth_device = { | |||
88 | }, | 90 | }, |
89 | }; | 91 | }; |
90 | 92 | ||
93 | /* SH7763 LCDC */ | ||
94 | static struct resource sh7763rdp_fb_resources[] = { | ||
95 | { | ||
96 | .start = 0xFFE80000, | ||
97 | .end = 0xFFE80442 - 1, | ||
98 | .flags = IORESOURCE_MEM, | ||
99 | }, | ||
100 | }; | ||
101 | |||
102 | static struct fb_videomode sh7763fb_videomode = { | ||
103 | .refresh = 60, | ||
104 | .name = "VGA Monitor", | ||
105 | .xres = 640, | ||
106 | .yres = 480, | ||
107 | .pixclock = 10000, | ||
108 | .left_margin = 80, | ||
109 | .right_margin = 24, | ||
110 | .upper_margin = 30, | ||
111 | .lower_margin = 1, | ||
112 | .hsync_len = 96, | ||
113 | .vsync_len = 1, | ||
114 | .sync = 0, | ||
115 | .vmode = FB_VMODE_NONINTERLACED, | ||
116 | .flag = FBINFO_FLAG_DEFAULT, | ||
117 | }; | ||
118 | |||
119 | static struct sh7760fb_platdata sh7763fb_def_pdata = { | ||
120 | .def_mode = &sh7763fb_videomode, | ||
121 | .ldmtr = (LDMTR_TFT_COLOR_16|LDMTR_MCNT), | ||
122 | .lddfr = LDDFR_16BPP_RGB565, | ||
123 | .ldpmmr = 0x0000, | ||
124 | .ldpspr = 0xFFFF, | ||
125 | .ldaclnr = 0x0001, | ||
126 | .ldickr = 0x1102, | ||
127 | .rotate = 0, | ||
128 | .novsync = 0, | ||
129 | .blank = NULL, | ||
130 | }; | ||
131 | |||
132 | static struct platform_device sh7763rdp_fb_device = { | ||
133 | .name = "sh7760-lcdc", | ||
134 | .resource = sh7763rdp_fb_resources, | ||
135 | .num_resources = ARRAY_SIZE(sh7763rdp_fb_resources), | ||
136 | .dev = { | ||
137 | .platform_data = &sh7763fb_def_pdata, | ||
138 | }, | ||
139 | }; | ||
140 | |||
91 | static struct platform_device *sh7763rdp_devices[] __initdata = { | 141 | static struct platform_device *sh7763rdp_devices[] __initdata = { |
92 | &sh7763rdp_nor_flash_device, | 142 | &sh7763rdp_nor_flash_device, |
93 | &sh7763rdp_eth_device, | 143 | &sh7763rdp_eth_device, |
144 | &sh7763rdp_fb_device, | ||
94 | }; | 145 | }; |
95 | 146 | ||
96 | static int __init sh7763rdp_devices_setup(void) | 147 | static int __init sh7763rdp_devices_setup(void) |
@@ -98,7 +149,6 @@ static int __init sh7763rdp_devices_setup(void) | |||
98 | return platform_add_devices(sh7763rdp_devices, | 149 | return platform_add_devices(sh7763rdp_devices, |
99 | ARRAY_SIZE(sh7763rdp_devices)); | 150 | ARRAY_SIZE(sh7763rdp_devices)); |
100 | } | 151 | } |
101 | |||
102 | device_initcall(sh7763rdp_devices_setup); | 152 | device_initcall(sh7763rdp_devices_setup); |
103 | 153 | ||
104 | static void __init sh7763rdp_setup(char **cmdline_p) | 154 | static void __init sh7763rdp_setup(char **cmdline_p) |