diff options
Diffstat (limited to 'arch/sh/boards')
-rw-r--r-- | arch/sh/boards/renesas/rts7751r2d/setup.c | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/arch/sh/boards/renesas/rts7751r2d/setup.c b/arch/sh/boards/renesas/rts7751r2d/setup.c index 8125d20fdbd8..dc143c10cd18 100644 --- a/arch/sh/boards/renesas/rts7751r2d/setup.c +++ b/arch/sh/boards/renesas/rts7751r2d/setup.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/serial_8250.h> | 14 | #include <linux/serial_8250.h> |
15 | #include <linux/sm501.h> | 15 | #include <linux/sm501.h> |
16 | #include <linux/pm.h> | 16 | #include <linux/pm.h> |
17 | #include <linux/fb.h> | ||
17 | #include <asm/machvec.h> | 18 | #include <asm/machvec.h> |
18 | #include <asm/rts7751r2d.h> | 19 | #include <asm/rts7751r2d.h> |
19 | #include <asm/voyagergx.h> | 20 | #include <asm/voyagergx.h> |
@@ -129,9 +130,53 @@ static struct resource sm501_resources[] = { | |||
129 | }, | 130 | }, |
130 | }; | 131 | }; |
131 | 132 | ||
133 | static struct fb_videomode sm501_default_mode = { | ||
134 | .pixclock = 35714, | ||
135 | .xres = 640, | ||
136 | .yres = 480, | ||
137 | .left_margin = 105, | ||
138 | .right_margin = 50, | ||
139 | .upper_margin = 35, | ||
140 | .lower_margin = 0, | ||
141 | .hsync_len = 96, | ||
142 | .vsync_len = 2, | ||
143 | .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, | ||
144 | }; | ||
145 | |||
146 | static struct sm501_platdata_fbsub sm501_pdata_fbsub_pnl = { | ||
147 | .def_bpp = 16, | ||
148 | .def_mode = &sm501_default_mode, | ||
149 | .flags = SM501FB_FLAG_USE_INIT_MODE | | ||
150 | SM501FB_FLAG_USE_HWCURSOR | | ||
151 | SM501FB_FLAG_USE_HWACCEL | | ||
152 | SM501FB_FLAG_DISABLE_AT_EXIT, | ||
153 | }; | ||
154 | |||
155 | static struct sm501_platdata_fbsub sm501_pdata_fbsub_crt = { | ||
156 | .flags = (SM501FB_FLAG_USE_INIT_MODE | | ||
157 | SM501FB_FLAG_USE_HWCURSOR | | ||
158 | SM501FB_FLAG_USE_HWACCEL | | ||
159 | SM501FB_FLAG_DISABLE_AT_EXIT), | ||
160 | |||
161 | }; | ||
162 | |||
163 | static struct sm501_platdata_fb sm501_fb_pdata = { | ||
164 | .fb_route = SM501_FB_OWN, | ||
165 | .fb_crt = &sm501_pdata_fbsub_crt, | ||
166 | .fb_pnl = &sm501_pdata_fbsub_pnl, | ||
167 | .flags = SM501_FBPD_SWAP_FB_ENDIAN, | ||
168 | }; | ||
169 | |||
170 | static struct sm501_platdata sm501_platform_data = { | ||
171 | .fb = &sm501_fb_pdata, | ||
172 | }; | ||
173 | |||
132 | static struct platform_device sm501_device = { | 174 | static struct platform_device sm501_device = { |
133 | .name = "sm501", | 175 | .name = "sm501", |
134 | .id = -1, | 176 | .id = -1, |
177 | .dev = { | ||
178 | .platform_data = &sm501_platform_data, | ||
179 | }, | ||
135 | .num_resources = ARRAY_SIZE(sm501_resources), | 180 | .num_resources = ARRAY_SIZE(sm501_resources), |
136 | .resource = sm501_resources, | 181 | .resource = sm501_resources, |
137 | }; | 182 | }; |