diff options
Diffstat (limited to 'meta/packages/linux/linux-cmx270-2.6.17/add_2700g_plat-r0.patch')
-rw-r--r-- | meta/packages/linux/linux-cmx270-2.6.17/add_2700g_plat-r0.patch | 126 |
1 files changed, 0 insertions, 126 deletions
diff --git a/meta/packages/linux/linux-cmx270-2.6.17/add_2700g_plat-r0.patch b/meta/packages/linux/linux-cmx270-2.6.17/add_2700g_plat-r0.patch deleted file mode 100644 index b4a33e2cf7..0000000000 --- a/meta/packages/linux/linux-cmx270-2.6.17/add_2700g_plat-r0.patch +++ /dev/null | |||
@@ -1,126 +0,0 @@ | |||
1 | Index: linux-2.6.17/arch/arm/mach-pxa/cm-x270.c | ||
2 | =================================================================== | ||
3 | --- linux-2.6.17.orig/arch/arm/mach-pxa/cm-x270.c 2006-07-18 15:40:10.000000000 +0100 | ||
4 | +++ linux-2.6.17/arch/arm/mach-pxa/cm-x270.c 2006-07-20 20:25:22.000000000 +0100 | ||
5 | @@ -11,6 +11,7 @@ | ||
6 | #include <linux/pm.h> | ||
7 | #include <linux/fb.h> | ||
8 | #include <linux/rtc-v3020.h> | ||
9 | +#include <linux/mbxfb.h> | ||
10 | |||
11 | #include <asm/types.h> | ||
12 | #include <asm/setup.h> | ||
13 | @@ -396,10 +397,113 @@ | ||
14 | .resource = dm9000_resources, | ||
15 | }; | ||
16 | |||
17 | +/* 2700G graphics */ | ||
18 | +static u64 fb_dma_mask = ~(u64)0; | ||
19 | + | ||
20 | +static struct resource cmx270_2700G_resource[] = { | ||
21 | + /* frame buffer memory including ODFB and External SDRAM */ | ||
22 | + [0] = { | ||
23 | + .start = MARATHON_PHYS, | ||
24 | + .end = MARATHON_PHYS + 0x02000000, | ||
25 | + .flags = IORESOURCE_MEM, | ||
26 | + }, | ||
27 | + /* Marathon registers */ | ||
28 | + [1] = { | ||
29 | + .start = MARATHON_PHYS + 0x03fe0000, | ||
30 | + .end = MARATHON_PHYS + 0x03ffffff, | ||
31 | + .flags = IORESOURCE_MEM, | ||
32 | + }, | ||
33 | +}; | ||
34 | + | ||
35 | +static unsigned long save_lcd_regs[10]; | ||
36 | + | ||
37 | +/* if 2700G is used, disable PCI throttle */ | ||
38 | +#define LB_TROTTLE_OFF (PXA_CS1_PHYS | (1 << 25)) | ||
39 | +#define LB_TROTTLE_MAX (PXA_CS1_PHYS | (1 << 25) | (1 << 22)) | ||
40 | +static int cmx270_marathon_probe(struct fb_info *fb) | ||
41 | +{ | ||
42 | + volatile unsigned long *cpld; | ||
43 | + | ||
44 | + cpld = (volatile unsigned long*)ioremap(LB_TROTTLE_OFF, 4); | ||
45 | + if ( !cpld ) { | ||
46 | + return -ENODEV; | ||
47 | + } | ||
48 | + *cpld = 0; | ||
49 | + iounmap((void*)cpld); | ||
50 | + | ||
51 | + /* save PXA-270 pin settings before enabling 2700G */ | ||
52 | + save_lcd_regs[0] = GPDR1; | ||
53 | + save_lcd_regs[1] = GPDR2; | ||
54 | + save_lcd_regs[2] = GAFR1_U; | ||
55 | + save_lcd_regs[3] = GAFR2_L; | ||
56 | + save_lcd_regs[4] = GAFR2_U; | ||
57 | + | ||
58 | + /* Disable PXA-270 on-chip controller driving pins */ | ||
59 | + GPDR1 &= ~(0xfc000000); | ||
60 | + GPDR2 &= ~(0x00c03fff); | ||
61 | + GAFR1_U &= ~(0xfff00000); | ||
62 | + GAFR2_L &= ~(0x0fffffff); | ||
63 | + GAFR2_U &= ~(0x0000f000); | ||
64 | + return 0; | ||
65 | +} | ||
66 | + | ||
67 | +static int cmx270_marathon_remove(struct fb_info *fb) | ||
68 | +{ | ||
69 | + volatile unsigned long *cpld; | ||
70 | + cpld = (volatile unsigned long*)ioremap(LB_TROTTLE_MAX, 4); | ||
71 | + | ||
72 | + if ( !cpld ) { | ||
73 | + return -ENODEV; | ||
74 | + } | ||
75 | + *cpld = 0; | ||
76 | + iounmap((void*)cpld); | ||
77 | + | ||
78 | + GPDR1 = save_lcd_regs[0]; | ||
79 | + GPDR2 = save_lcd_regs[1]; | ||
80 | + GAFR1_U = save_lcd_regs[2]; | ||
81 | + GAFR2_L = save_lcd_regs[3]; | ||
82 | + GAFR2_U = save_lcd_regs[4]; | ||
83 | + return 0; | ||
84 | +} | ||
85 | + | ||
86 | +static struct mbxfb_platform_data cmx270_2700G_data = { | ||
87 | + .xres = { | ||
88 | + .min = 240, | ||
89 | + .max = 1200, | ||
90 | + .defval = 640, | ||
91 | + }, | ||
92 | + .yres = { | ||
93 | + .min = 240, | ||
94 | + .max = 1200, | ||
95 | + .defval = 480, | ||
96 | + }, | ||
97 | + .bpp = { | ||
98 | + .min = 16, | ||
99 | + .max = 32, | ||
100 | + .defval = 16, | ||
101 | + }, | ||
102 | + .memsize = 8*1024*1024, | ||
103 | + .probe = cmx270_marathon_probe, | ||
104 | + .remove = cmx270_marathon_remove, | ||
105 | +}; | ||
106 | + | ||
107 | +static struct platform_device cmx270_2700G = { | ||
108 | + .name = "mbx-fb", | ||
109 | + .dev = { | ||
110 | + .platform_data = &cmx270_2700G_data, | ||
111 | + .dma_mask = &fb_dma_mask, | ||
112 | + .coherent_dma_mask = 0xffffffff, | ||
113 | + }, | ||
114 | + .num_resources = ARRAY_SIZE(cmx270_2700G_resource), | ||
115 | + .resource = cmx270_2700G_resource, | ||
116 | + .id = -1, | ||
117 | +}; | ||
118 | + | ||
119 | static struct platform_device *platform_devices[] __initdata = {\ | ||
120 | &cmx270_audio_device, | ||
121 | &v3020_rtc_device, | ||
122 | &dm9000_device, | ||
123 | + &cmx270_2700G, | ||
124 | }; | ||
125 | |||
126 | static int cmx270_ohci_init(struct device *dev) | ||