diff options
author | Tony Lindgren <tony@atomide.com> | 2012-12-16 14:39:40 -0500 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2012-12-17 13:50:40 -0500 |
commit | 16d60bb86e45aa7513007b4788f16fa2b968f9dd (patch) | |
tree | 4a9acd6ba700f3484156ade2d7baf72909b0012c /arch | |
parent | 50f29fbd39835e3fd21c60a798f03f2692146ccb (diff) |
ARM: OMAP: Split fb.c to remove last remaining cpu_is_omap usage
Looks like we missed plat-omap/fb.c for cpu_is_omap usage
mach-omap2. This is the last user of cpu_is_omap, so let's
quickly fix it up so we can finally remove plat/cpu.h for
omap2lus.
We want to limit cpu_is_omap macro usage to mach-omap2 only so
we can make plat/cpu.h private. After this we can finally drop
plat/cpu.h for omap2+.
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-omap1/Makefile | 2 | ||||
-rw-r--r-- | arch/arm/mach-omap1/fb.c | 80 | ||||
-rw-r--r-- | arch/arm/mach-omap2/Makefile | 2 | ||||
-rw-r--r-- | arch/arm/mach-omap2/fb.c (renamed from arch/arm/plat-omap/fb.c) | 50 | ||||
-rw-r--r-- | arch/arm/plat-omap/Makefile | 2 |
5 files changed, 85 insertions, 51 deletions
diff --git a/arch/arm/mach-omap1/Makefile b/arch/arm/mach-omap1/Makefile index f0e69cbc5baa..222d58c0ae76 100644 --- a/arch/arm/mach-omap1/Makefile +++ b/arch/arm/mach-omap1/Makefile | |||
@@ -4,7 +4,7 @@ | |||
4 | 4 | ||
5 | # Common support | 5 | # Common support |
6 | obj-y := io.o id.o sram-init.o sram.o time.o irq.o mux.o flash.o \ | 6 | obj-y := io.o id.o sram-init.o sram.o time.o irq.o mux.o flash.o \ |
7 | serial.o devices.o dma.o | 7 | serial.o devices.o dma.o fb.o |
8 | obj-y += clock.o clock_data.o opp_data.o reset.o pm_bus.o timer.o | 8 | obj-y += clock.o clock_data.o opp_data.o reset.o pm_bus.o timer.o |
9 | 9 | ||
10 | ifneq ($(CONFIG_SND_OMAP_SOC_MCBSP),) | 10 | ifneq ($(CONFIG_SND_OMAP_SOC_MCBSP),) |
diff --git a/arch/arm/mach-omap1/fb.c b/arch/arm/mach-omap1/fb.c new file mode 100644 index 000000000000..c770d45c7226 --- /dev/null +++ b/arch/arm/mach-omap1/fb.c | |||
@@ -0,0 +1,80 @@ | |||
1 | /* | ||
2 | * File: arch/arm/plat-omap/fb.c | ||
3 | * | ||
4 | * Framebuffer device registration for TI OMAP platforms | ||
5 | * | ||
6 | * Copyright (C) 2006 Nokia Corporation | ||
7 | * Author: Imre Deak <imre.deak@nokia.com> | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or modify it | ||
10 | * under the terms of the GNU General Public License as published by the | ||
11 | * Free Software Foundation; either version 2 of the License, or (at your | ||
12 | * option) any later version. | ||
13 | * | ||
14 | * This program is distributed in the hope that it will be useful, but | ||
15 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
17 | * General Public License for more details. | ||
18 | * | ||
19 | * You should have received a copy of the GNU General Public License along | ||
20 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
21 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||
22 | */ | ||
23 | |||
24 | #include <linux/module.h> | ||
25 | #include <linux/kernel.h> | ||
26 | #include <linux/mm.h> | ||
27 | #include <linux/init.h> | ||
28 | #include <linux/platform_device.h> | ||
29 | #include <linux/memblock.h> | ||
30 | #include <linux/io.h> | ||
31 | #include <linux/omapfb.h> | ||
32 | #include <linux/dma-mapping.h> | ||
33 | |||
34 | #include <asm/mach/map.h> | ||
35 | |||
36 | #if defined(CONFIG_FB_OMAP) || defined(CONFIG_FB_OMAP_MODULE) | ||
37 | |||
38 | static bool omapfb_lcd_configured; | ||
39 | static struct omapfb_platform_data omapfb_config; | ||
40 | |||
41 | static u64 omap_fb_dma_mask = ~(u32)0; | ||
42 | |||
43 | static struct platform_device omap_fb_device = { | ||
44 | .name = "omapfb", | ||
45 | .id = -1, | ||
46 | .dev = { | ||
47 | .dma_mask = &omap_fb_dma_mask, | ||
48 | .coherent_dma_mask = DMA_BIT_MASK(32), | ||
49 | .platform_data = &omapfb_config, | ||
50 | }, | ||
51 | .num_resources = 0, | ||
52 | }; | ||
53 | |||
54 | void __init omapfb_set_lcd_config(const struct omap_lcd_config *config) | ||
55 | { | ||
56 | omapfb_config.lcd = *config; | ||
57 | omapfb_lcd_configured = true; | ||
58 | } | ||
59 | |||
60 | static int __init omap_init_fb(void) | ||
61 | { | ||
62 | /* | ||
63 | * If the board file has not set the lcd config with | ||
64 | * omapfb_set_lcd_config(), don't bother registering the omapfb device | ||
65 | */ | ||
66 | if (!omapfb_lcd_configured) | ||
67 | return 0; | ||
68 | |||
69 | return platform_device_register(&omap_fb_device); | ||
70 | } | ||
71 | |||
72 | arch_initcall(omap_init_fb); | ||
73 | |||
74 | #else | ||
75 | |||
76 | void __init omapfb_set_lcd_config(const struct omap_lcd_config *config) | ||
77 | { | ||
78 | } | ||
79 | |||
80 | #endif | ||
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile index a8004f33b7e2..947cafe65aef 100644 --- a/arch/arm/mach-omap2/Makefile +++ b/arch/arm/mach-omap2/Makefile | |||
@@ -3,7 +3,7 @@ | |||
3 | # | 3 | # |
4 | 4 | ||
5 | # Common support | 5 | # Common support |
6 | obj-y := id.o io.o control.o mux.o devices.o serial.o gpmc.o timer.o pm.o \ | 6 | obj-y := id.o io.o control.o mux.o devices.o fb.o serial.o gpmc.o timer.o pm.o \ |
7 | common.o gpio.o dma.o wd_timer.o display.o i2c.o hdq1w.o omap_hwmod.o \ | 7 | common.o gpio.o dma.o wd_timer.o display.o i2c.o hdq1w.o omap_hwmod.o \ |
8 | omap_device.o sram.o | 8 | omap_device.o sram.o |
9 | 9 | ||
diff --git a/arch/arm/plat-omap/fb.c b/arch/arm/mach-omap2/fb.c index a3367b783fc7..d9bd965f6d07 100644 --- a/arch/arm/plat-omap/fb.c +++ b/arch/arm/mach-omap2/fb.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * File: arch/arm/plat-omap/fb.c | ||
3 | * | ||
4 | * Framebuffer device registration for TI OMAP platforms | 2 | * Framebuffer device registration for TI OMAP platforms |
5 | * | 3 | * |
6 | * Copyright (C) 2006 Nokia Corporation | 4 | * Copyright (C) 2006 Nokia Corporation |
@@ -33,7 +31,7 @@ | |||
33 | 31 | ||
34 | #include <asm/mach/map.h> | 32 | #include <asm/mach/map.h> |
35 | 33 | ||
36 | #include <plat/cpu.h> | 34 | #include "soc.h" |
37 | 35 | ||
38 | #ifdef CONFIG_OMAP2_VRFB | 36 | #ifdef CONFIG_OMAP2_VRFB |
39 | 37 | ||
@@ -94,45 +92,7 @@ static int __init omap_init_vrfb(void) | |||
94 | arch_initcall(omap_init_vrfb); | 92 | arch_initcall(omap_init_vrfb); |
95 | #endif | 93 | #endif |
96 | 94 | ||
97 | #if defined(CONFIG_FB_OMAP) || defined(CONFIG_FB_OMAP_MODULE) | 95 | #if defined(CONFIG_FB_OMAP2) || defined(CONFIG_FB_OMAP2_MODULE) |
98 | |||
99 | static bool omapfb_lcd_configured; | ||
100 | static struct omapfb_platform_data omapfb_config; | ||
101 | |||
102 | static u64 omap_fb_dma_mask = ~(u32)0; | ||
103 | |||
104 | static struct platform_device omap_fb_device = { | ||
105 | .name = "omapfb", | ||
106 | .id = -1, | ||
107 | .dev = { | ||
108 | .dma_mask = &omap_fb_dma_mask, | ||
109 | .coherent_dma_mask = DMA_BIT_MASK(32), | ||
110 | .platform_data = &omapfb_config, | ||
111 | }, | ||
112 | .num_resources = 0, | ||
113 | }; | ||
114 | |||
115 | void __init omapfb_set_lcd_config(const struct omap_lcd_config *config) | ||
116 | { | ||
117 | omapfb_config.lcd = *config; | ||
118 | omapfb_lcd_configured = true; | ||
119 | } | ||
120 | |||
121 | static int __init omap_init_fb(void) | ||
122 | { | ||
123 | /* | ||
124 | * If the board file has not set the lcd config with | ||
125 | * omapfb_set_lcd_config(), don't bother registering the omapfb device | ||
126 | */ | ||
127 | if (!omapfb_lcd_configured) | ||
128 | return 0; | ||
129 | |||
130 | return platform_device_register(&omap_fb_device); | ||
131 | } | ||
132 | |||
133 | arch_initcall(omap_init_fb); | ||
134 | |||
135 | #elif defined(CONFIG_FB_OMAP2) || defined(CONFIG_FB_OMAP2_MODULE) | ||
136 | 96 | ||
137 | static u64 omap_fb_dma_mask = ~(u32)0; | 97 | static u64 omap_fb_dma_mask = ~(u32)0; |
138 | static struct omapfb_platform_data omapfb_config; | 98 | static struct omapfb_platform_data omapfb_config; |
@@ -155,10 +115,4 @@ static int __init omap_init_fb(void) | |||
155 | 115 | ||
156 | arch_initcall(omap_init_fb); | 116 | arch_initcall(omap_init_fb); |
157 | 117 | ||
158 | #else | ||
159 | |||
160 | void __init omapfb_set_lcd_config(const struct omap_lcd_config *config) | ||
161 | { | ||
162 | } | ||
163 | |||
164 | #endif | 118 | #endif |
diff --git a/arch/arm/plat-omap/Makefile b/arch/arm/plat-omap/Makefile index 8d885848600a..97fe69abdf5a 100644 --- a/arch/arm/plat-omap/Makefile +++ b/arch/arm/plat-omap/Makefile | |||
@@ -3,7 +3,7 @@ | |||
3 | # | 3 | # |
4 | 4 | ||
5 | # Common support | 5 | # Common support |
6 | obj-y := sram.o dma.o fb.o counter_32k.o | 6 | obj-y := sram.o dma.o counter_32k.o |
7 | obj-m := | 7 | obj-m := |
8 | obj-n := | 8 | obj-n := |
9 | obj- := | 9 | obj- := |