diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-omap2/sdrc.c | 16 | ||||
-rw-r--r-- | arch/arm/plat-omap/fb.c | 61 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/plat/sdrc.h | 7 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/plat/vrfb.h | 66 |
4 files changed, 61 insertions, 89 deletions
diff --git a/arch/arm/mach-omap2/sdrc.c b/arch/arm/mach-omap2/sdrc.c index e3d345f46409..4282e6e967d6 100644 --- a/arch/arm/mach-omap2/sdrc.c +++ b/arch/arm/mach-omap2/sdrc.c | |||
@@ -160,19 +160,3 @@ void __init omap2_sdrc_init(struct omap_sdrc_params *sdrc_cs0, | |||
160 | sdrc_write_reg(l, SDRC_POWER); | 160 | sdrc_write_reg(l, SDRC_POWER); |
161 | omap2_sms_save_context(); | 161 | omap2_sms_save_context(); |
162 | } | 162 | } |
163 | |||
164 | void omap2_sms_write_rot_control(u32 val, unsigned ctx) | ||
165 | { | ||
166 | sms_write_reg(val, SMS_ROT_CONTROL(ctx)); | ||
167 | } | ||
168 | |||
169 | void omap2_sms_write_rot_size(u32 val, unsigned ctx) | ||
170 | { | ||
171 | sms_write_reg(val, SMS_ROT_SIZE(ctx)); | ||
172 | } | ||
173 | |||
174 | void omap2_sms_write_rot_physical_ba(u32 val, unsigned ctx) | ||
175 | { | ||
176 | sms_write_reg(val, SMS_ROT_PHYSICAL_BA(ctx)); | ||
177 | } | ||
178 | |||
diff --git a/arch/arm/plat-omap/fb.c b/arch/arm/plat-omap/fb.c index bcbb9d5dc293..f868caeedfd6 100644 --- a/arch/arm/plat-omap/fb.c +++ b/arch/arm/plat-omap/fb.c | |||
@@ -33,6 +33,67 @@ | |||
33 | #include <mach/hardware.h> | 33 | #include <mach/hardware.h> |
34 | #include <asm/mach/map.h> | 34 | #include <asm/mach/map.h> |
35 | 35 | ||
36 | #include <plat/cpu.h> | ||
37 | |||
38 | #ifdef CONFIG_OMAP2_VRFB | ||
39 | |||
40 | /* | ||
41 | * The first memory resource is the register region for VRFB, | ||
42 | * the rest are VRFB virtual memory areas for each VRFB context. | ||
43 | */ | ||
44 | |||
45 | static const struct resource omap2_vrfb_resources[] = { | ||
46 | DEFINE_RES_MEM_NAMED(0x68008000u, 0x40, "vrfb-regs"), | ||
47 | DEFINE_RES_MEM_NAMED(0x70000000u, 0x4000000, "vrfb-area-0"), | ||
48 | DEFINE_RES_MEM_NAMED(0x74000000u, 0x4000000, "vrfb-area-1"), | ||
49 | DEFINE_RES_MEM_NAMED(0x78000000u, 0x4000000, "vrfb-area-2"), | ||
50 | DEFINE_RES_MEM_NAMED(0x7c000000u, 0x4000000, "vrfb-area-3"), | ||
51 | }; | ||
52 | |||
53 | static const struct resource omap3_vrfb_resources[] = { | ||
54 | DEFINE_RES_MEM_NAMED(0x6C000180u, 0xc0, "vrfb-regs"), | ||
55 | DEFINE_RES_MEM_NAMED(0x70000000u, 0x4000000, "vrfb-area-0"), | ||
56 | DEFINE_RES_MEM_NAMED(0x74000000u, 0x4000000, "vrfb-area-1"), | ||
57 | DEFINE_RES_MEM_NAMED(0x78000000u, 0x4000000, "vrfb-area-2"), | ||
58 | DEFINE_RES_MEM_NAMED(0x7c000000u, 0x4000000, "vrfb-area-3"), | ||
59 | DEFINE_RES_MEM_NAMED(0xe0000000u, 0x4000000, "vrfb-area-4"), | ||
60 | DEFINE_RES_MEM_NAMED(0xe4000000u, 0x4000000, "vrfb-area-5"), | ||
61 | DEFINE_RES_MEM_NAMED(0xe8000000u, 0x4000000, "vrfb-area-6"), | ||
62 | DEFINE_RES_MEM_NAMED(0xec000000u, 0x4000000, "vrfb-area-7"), | ||
63 | DEFINE_RES_MEM_NAMED(0xf0000000u, 0x4000000, "vrfb-area-8"), | ||
64 | DEFINE_RES_MEM_NAMED(0xf4000000u, 0x4000000, "vrfb-area-9"), | ||
65 | DEFINE_RES_MEM_NAMED(0xf8000000u, 0x4000000, "vrfb-area-10"), | ||
66 | DEFINE_RES_MEM_NAMED(0xfc000000u, 0x4000000, "vrfb-area-11"), | ||
67 | }; | ||
68 | |||
69 | static int __init omap_init_vrfb(void) | ||
70 | { | ||
71 | struct platform_device *pdev; | ||
72 | const struct resource *res; | ||
73 | unsigned int num_res; | ||
74 | |||
75 | if (cpu_is_omap24xx()) { | ||
76 | res = omap2_vrfb_resources; | ||
77 | num_res = ARRAY_SIZE(omap2_vrfb_resources); | ||
78 | } else if (cpu_is_omap34xx()) { | ||
79 | res = omap3_vrfb_resources; | ||
80 | num_res = ARRAY_SIZE(omap3_vrfb_resources); | ||
81 | } else { | ||
82 | return 0; | ||
83 | } | ||
84 | |||
85 | pdev = platform_device_register_resndata(NULL, "omapvrfb", -1, | ||
86 | res, num_res, NULL, 0); | ||
87 | |||
88 | if (IS_ERR(pdev)) | ||
89 | return PTR_ERR(pdev); | ||
90 | else | ||
91 | return 0; | ||
92 | } | ||
93 | |||
94 | arch_initcall(omap_init_vrfb); | ||
95 | #endif | ||
96 | |||
36 | #if defined(CONFIG_FB_OMAP) || defined(CONFIG_FB_OMAP_MODULE) | 97 | #if defined(CONFIG_FB_OMAP) || defined(CONFIG_FB_OMAP_MODULE) |
37 | 98 | ||
38 | static bool omapfb_lcd_configured; | 99 | static bool omapfb_lcd_configured; |
diff --git a/arch/arm/plat-omap/include/plat/sdrc.h b/arch/arm/plat-omap/include/plat/sdrc.h index 36d6a7666216..c68bab29cfc5 100644 --- a/arch/arm/plat-omap/include/plat/sdrc.h +++ b/arch/arm/plat-omap/include/plat/sdrc.h | |||
@@ -94,9 +94,6 @@ | |||
94 | /* SMS register offsets - read/write with sms_{read,write}_reg() */ | 94 | /* SMS register offsets - read/write with sms_{read,write}_reg() */ |
95 | 95 | ||
96 | #define SMS_SYSCONFIG 0x010 | 96 | #define SMS_SYSCONFIG 0x010 |
97 | #define SMS_ROT_CONTROL(context) (0x180 + 0x10 * context) | ||
98 | #define SMS_ROT_SIZE(context) (0x184 + 0x10 * context) | ||
99 | #define SMS_ROT_PHYSICAL_BA(context) (0x188 + 0x10 * context) | ||
100 | /* REVISIT: fill in other SMS registers here */ | 97 | /* REVISIT: fill in other SMS registers here */ |
101 | 98 | ||
102 | 99 | ||
@@ -137,10 +134,6 @@ int omap2_sdrc_get_params(unsigned long r, | |||
137 | void omap2_sms_save_context(void); | 134 | void omap2_sms_save_context(void); |
138 | void omap2_sms_restore_context(void); | 135 | void omap2_sms_restore_context(void); |
139 | 136 | ||
140 | void omap2_sms_write_rot_control(u32 val, unsigned ctx); | ||
141 | void omap2_sms_write_rot_size(u32 val, unsigned ctx); | ||
142 | void omap2_sms_write_rot_physical_ba(u32 val, unsigned ctx); | ||
143 | |||
144 | #ifdef CONFIG_ARCH_OMAP2 | 137 | #ifdef CONFIG_ARCH_OMAP2 |
145 | 138 | ||
146 | struct memory_timings { | 139 | struct memory_timings { |
diff --git a/arch/arm/plat-omap/include/plat/vrfb.h b/arch/arm/plat-omap/include/plat/vrfb.h deleted file mode 100644 index 3792bdea2f6d..000000000000 --- a/arch/arm/plat-omap/include/plat/vrfb.h +++ /dev/null | |||
@@ -1,66 +0,0 @@ | |||
1 | /* | ||
2 | * VRFB Rotation Engine | ||
3 | * | ||
4 | * Copyright (C) 2009 Nokia Corporation | ||
5 | * Author: Tomi Valkeinen <tomi.valkeinen@nokia.com> | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License version 2 as | ||
9 | * published by the Free Software Foundation. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, but | ||
12 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
14 | * General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License along | ||
17 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
18 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||
19 | */ | ||
20 | |||
21 | #ifndef __OMAP_VRFB_H__ | ||
22 | #define __OMAP_VRFB_H__ | ||
23 | |||
24 | #define OMAP_VRFB_LINE_LEN 2048 | ||
25 | |||
26 | struct vrfb { | ||
27 | u8 context; | ||
28 | void __iomem *vaddr[4]; | ||
29 | unsigned long paddr[4]; | ||
30 | u16 xres; | ||
31 | u16 yres; | ||
32 | u16 xoffset; | ||
33 | u16 yoffset; | ||
34 | u8 bytespp; | ||
35 | bool yuv_mode; | ||
36 | }; | ||
37 | |||
38 | #ifdef CONFIG_OMAP2_VRFB | ||
39 | extern int omap_vrfb_request_ctx(struct vrfb *vrfb); | ||
40 | extern void omap_vrfb_release_ctx(struct vrfb *vrfb); | ||
41 | extern void omap_vrfb_adjust_size(u16 *width, u16 *height, | ||
42 | u8 bytespp); | ||
43 | extern u32 omap_vrfb_min_phys_size(u16 width, u16 height, u8 bytespp); | ||
44 | extern u16 omap_vrfb_max_height(u32 phys_size, u16 width, u8 bytespp); | ||
45 | extern void omap_vrfb_setup(struct vrfb *vrfb, unsigned long paddr, | ||
46 | u16 width, u16 height, | ||
47 | unsigned bytespp, bool yuv_mode); | ||
48 | extern int omap_vrfb_map_angle(struct vrfb *vrfb, u16 height, u8 rot); | ||
49 | extern void omap_vrfb_restore_context(void); | ||
50 | |||
51 | #else | ||
52 | static inline int omap_vrfb_request_ctx(struct vrfb *vrfb) { return 0; } | ||
53 | static inline void omap_vrfb_release_ctx(struct vrfb *vrfb) {} | ||
54 | static inline void omap_vrfb_adjust_size(u16 *width, u16 *height, | ||
55 | u8 bytespp) {} | ||
56 | static inline u32 omap_vrfb_min_phys_size(u16 width, u16 height, u8 bytespp) | ||
57 | { return 0; } | ||
58 | static inline u16 omap_vrfb_max_height(u32 phys_size, u16 width, u8 bytespp) | ||
59 | { return 0; } | ||
60 | static inline void omap_vrfb_setup(struct vrfb *vrfb, unsigned long paddr, | ||
61 | u16 width, u16 height, unsigned bytespp, bool yuv_mode) {} | ||
62 | static inline int omap_vrfb_map_angle(struct vrfb *vrfb, u16 height, u8 rot) | ||
63 | { return 0; } | ||
64 | static inline void omap_vrfb_restore_context(void) {} | ||
65 | #endif | ||
66 | #endif /* __VRFB_H */ | ||