15 #include <linux/module.h>
18 #include <linux/device.h>
19 #include <linux/errno.h>
24 #include <linux/slab.h>
30 #include <asm/sizes.h>
43 static const struct icst_params impd1_vco_params = {
58 u32 val = vco.
v | (vco.
r << 9) | (vco.
s << 16);
66 vco.
r = (val >> 9) & 0x7f;
67 vco.
s = (val >> 16) & 7;
69 pr_debug(
"IM-PD1: VCO%d clock is %ld Hz\n",
70 vconr, icst525_hz(&impd1_vco_params, vco));
74 static const struct clk_ops impd1_clk_ops = {
77 .setvco = impd1_setvco,
95 #define PANEL PROSPECTOR
103 #define PANELTYPE vga
131 #define PANELTYPE svga
158 #elif PANEL == PROSPECTOR
159 #define PANELTYPE prospector
162 .name =
"PROSPECTOR",
187 #elif PANEL == LTM10C209
188 #define PANELTYPE ltm10c209
223 static void impd1fb_clcd_disable(
struct clcd_fb *
fb)
231 static void impd1fb_clcd_enable(
struct clcd_fb *
fb)
237 static int impd1fb_clcd_setup(
struct clcd_fb *
fb)
239 unsigned long framebase = fb->
dev->res.start + 0x01000000;
240 unsigned long framesize =
SZ_1M;
250 fb->
fb.screen_base =
ioremap(framebase, framesize);
251 if (!fb->
fb.screen_base) {
257 fb->
fb.fix.smem_start = framebase;
258 fb->
fb.fix.smem_len = framesize;
278 static void impd1fb_clcd_remove(
struct clcd_fb *fb)
287 .check = clcdfb_check,
288 .decode = clcdfb_decode,
289 .disable = impd1fb_clcd_disable,
290 .enable = impd1fb_clcd_enable,
291 .setup = impd1fb_clcd_setup,
292 .mmap = impd1fb_clcd_mmap,
293 .remove = impd1fb_clcd_remove,
305 .offset = 0x03000000,
308 .offset = 0x00100000,
312 .offset = 0x00200000,
316 .offset = 0x00300000,
320 .offset = 0x00400000,
324 .offset = 0x00500000,
328 .offset = 0x00600000,
332 .offset = 0x00700000,
336 .offset = 0x00800000,
340 .offset = 0x01000000,
343 .platform_data = &impd1_clcd_data,
347 static struct clk fixed_14745600 = {
376 printk(
"IM-PD1 found at 0x%08lx\n",
377 (
unsigned long)dev->
resource.start);
380 impd1->
vcos[
i].ops = &impd1_clk_ops,
382 impd1->
vcos[
i].params = &impd1_vco_params,
383 impd1->
vcos[
i].data = impd1;
397 for (i = 0; i <
ARRAY_SIZE(impd1_devs); i++) {
400 unsigned long pc_base;
409 dev_err(&dev->
dev,
"unable to register device: %ld\n", PTR_ERR(d));
417 if (impd1 && impd1->
base)
425 static int impd1_remove_one(
struct device *dev,
void *
data)
431 static void impd1_remove(
struct lm_device *dev)
452 .probe = impd1_probe,
453 .remove = impd1_remove,
456 static int __init impd1_init(
void)
461 static void __exit impd1_exit(
void)