Commit 16d60bb8 authored by Tony Lindgren's avatar Tony Lindgren

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: default avatarTony Lindgren <tony@atomide.com>
parent 50f29fbd
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
# Common support # Common support
obj-y := io.o id.o sram-init.o sram.o time.o irq.o mux.o flash.o \ obj-y := io.o id.o sram-init.o sram.o time.o irq.o mux.o flash.o \
serial.o devices.o dma.o serial.o devices.o dma.o fb.o
obj-y += clock.o clock_data.o opp_data.o reset.o pm_bus.o timer.o obj-y += clock.o clock_data.o opp_data.o reset.o pm_bus.o timer.o
ifneq ($(CONFIG_SND_OMAP_SOC_MCBSP),) ifneq ($(CONFIG_SND_OMAP_SOC_MCBSP),)
......
/*
* File: arch/arm/plat-omap/fb.c
*
* Framebuffer device registration for TI OMAP platforms
*
* Copyright (C) 2006 Nokia Corporation
* Author: Imre Deak <imre.deak@nokia.com>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/mm.h>
#include <linux/init.h>
#include <linux/platform_device.h>
#include <linux/memblock.h>
#include <linux/io.h>
#include <linux/omapfb.h>
#include <linux/dma-mapping.h>
#include <asm/mach/map.h>
#if defined(CONFIG_FB_OMAP) || defined(CONFIG_FB_OMAP_MODULE)
static bool omapfb_lcd_configured;
static struct omapfb_platform_data omapfb_config;
static u64 omap_fb_dma_mask = ~(u32)0;
static struct platform_device omap_fb_device = {
.name = "omapfb",
.id = -1,
.dev = {
.dma_mask = &omap_fb_dma_mask,
.coherent_dma_mask = DMA_BIT_MASK(32),
.platform_data = &omapfb_config,
},
.num_resources = 0,
};
void __init omapfb_set_lcd_config(const struct omap_lcd_config *config)
{
omapfb_config.lcd = *config;
omapfb_lcd_configured = true;
}
static int __init omap_init_fb(void)
{
/*
* If the board file has not set the lcd config with
* omapfb_set_lcd_config(), don't bother registering the omapfb device
*/
if (!omapfb_lcd_configured)
return 0;
return platform_device_register(&omap_fb_device);
}
arch_initcall(omap_init_fb);
#else
void __init omapfb_set_lcd_config(const struct omap_lcd_config *config)
{
}
#endif
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
# #
# Common support # Common support
obj-y := id.o io.o control.o mux.o devices.o serial.o gpmc.o timer.o pm.o \ obj-y := id.o io.o control.o mux.o devices.o fb.o serial.o gpmc.o timer.o pm.o \
common.o gpio.o dma.o wd_timer.o display.o i2c.o hdq1w.o omap_hwmod.o \ common.o gpio.o dma.o wd_timer.o display.o i2c.o hdq1w.o omap_hwmod.o \
omap_device.o sram.o omap_device.o sram.o
......
/* /*
* File: arch/arm/plat-omap/fb.c
*
* Framebuffer device registration for TI OMAP platforms * Framebuffer device registration for TI OMAP platforms
* *
* Copyright (C) 2006 Nokia Corporation * Copyright (C) 2006 Nokia Corporation
...@@ -33,7 +31,7 @@ ...@@ -33,7 +31,7 @@
#include <asm/mach/map.h> #include <asm/mach/map.h>
#include <plat/cpu.h> #include "soc.h"
#ifdef CONFIG_OMAP2_VRFB #ifdef CONFIG_OMAP2_VRFB
...@@ -94,45 +92,7 @@ static int __init omap_init_vrfb(void) ...@@ -94,45 +92,7 @@ static int __init omap_init_vrfb(void)
arch_initcall(omap_init_vrfb); arch_initcall(omap_init_vrfb);
#endif #endif
#if defined(CONFIG_FB_OMAP) || defined(CONFIG_FB_OMAP_MODULE) #if defined(CONFIG_FB_OMAP2) || defined(CONFIG_FB_OMAP2_MODULE)
static bool omapfb_lcd_configured;
static struct omapfb_platform_data omapfb_config;
static u64 omap_fb_dma_mask = ~(u32)0;
static struct platform_device omap_fb_device = {
.name = "omapfb",
.id = -1,
.dev = {
.dma_mask = &omap_fb_dma_mask,
.coherent_dma_mask = DMA_BIT_MASK(32),
.platform_data = &omapfb_config,
},
.num_resources = 0,
};
void __init omapfb_set_lcd_config(const struct omap_lcd_config *config)
{
omapfb_config.lcd = *config;
omapfb_lcd_configured = true;
}
static int __init omap_init_fb(void)
{
/*
* If the board file has not set the lcd config with
* omapfb_set_lcd_config(), don't bother registering the omapfb device
*/
if (!omapfb_lcd_configured)
return 0;
return platform_device_register(&omap_fb_device);
}
arch_initcall(omap_init_fb);
#elif defined(CONFIG_FB_OMAP2) || defined(CONFIG_FB_OMAP2_MODULE)
static u64 omap_fb_dma_mask = ~(u32)0; static u64 omap_fb_dma_mask = ~(u32)0;
static struct omapfb_platform_data omapfb_config; static struct omapfb_platform_data omapfb_config;
...@@ -155,10 +115,4 @@ static int __init omap_init_fb(void) ...@@ -155,10 +115,4 @@ static int __init omap_init_fb(void)
arch_initcall(omap_init_fb); arch_initcall(omap_init_fb);
#else
void __init omapfb_set_lcd_config(const struct omap_lcd_config *config)
{
}
#endif #endif
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
# #
# Common support # Common support
obj-y := sram.o dma.o fb.o counter_32k.o obj-y := sram.o dma.o counter_32k.o
obj-m := obj-m :=
obj-n := obj-n :=
obj- := obj- :=
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment