mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-22 20:23:57 +08:00
2b8318881d
OMAPDSS changes, including: - use dynanic debug prints - OMAP platform dependency removals - Creation of compat-layer, helping us to improve omapdrm - Misc cleanups, aiming to make omadss more in line with the upcoming common display framework Exynos DP changes for the 3.8 merge window: - Device Tree support for Samsung Exynos DP - SW Link training is cleaned up. - HPD interrupt is supported. Samsung Framebuffer changes for the 3.8 merge window: - The bit definitions of header file are updated. - Some minor typos are fixed. - Some minor bugs of s3c_fb_check_var() are fixed. FB related changes for SH Mobile, Freescale DIU Add support for the Solomon SSD1307 OLED Controller -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iQIcBAABAgAGBQJQyvniAAoJEPo9qoy8lh71IqkQAK9LkVjVk6UQRT2/b39hPF6i PKPRNYxpLxX5u98hiqQfweukGkuC/cmsAJOh5UwX1lFg0TNua8CEYg0iuHgUtLWE gi+HNUhHfGx1+a9yQpTKsiheq7r88IjpghFGahnFhpE4kDzhIROom7B39x8bx9gs 1vnCptmcIq0IlMlmjIktTHw8R36Fd/8xDVEhEtDccxT9AJSePnKBY8SBuRjiyJfP QvXnd131kmHdshQbSVetsEwI1a9NJ9Z6MMRiQK3vtDiBJ7QHUw8wD/+kdR68gQxZ NqTC/s478dvx/bR5CIXHrXxQZGfOCJ0GFzT1rlcRMxECcF0dQYNr3Hid3Zas+mPZ hABpEJE7nV7LoDGhW3oIWPt6MZVFED/HE0F5QrG3/PWYs5UpTwkI9UTkB8Bx6LcA H9ypHzFaOT1SK2/jln9pAfYgo/ITCRf08gcxBvGZUPcybrQy+kbVPdYgDn09cDhR u6ax3k/PMF/6JRdpVRNxLaoEHw/G6vtNjoeRJivZzuIOmGDfGwADGcEnrcZEM3NM muOjk8TfTJgK+gzWleOfr9CQGiWWp1Tht9vF6TSApq4SEqmOK81EZpucrMXY0t6r 9+JmFzS1/+75NeY2YjgHCuqRaqVSMiyyOp1eYV9JIY14rKINbj77OHX8xaMm+Leg ZU4tirie/oEALaIJUann =KVPX -----END PGP SIGNATURE----- Merge tag 'fbdev-for-3.8' of git://gitorious.org/linux-omap-dss2/linux Pull fbdev changes from Tomi Valkeinen: "OMAPDSS changes, including: - use dynanic debug prints - OMAP platform dependency removals - Creation of compat-layer, helping us to improve omapdrm - Misc cleanups, aiming to make omadss more in line with the upcoming common display framework Exynos DP changes for the 3.8 merge window: - Device Tree support for Samsung Exynos DP - SW Link training is cleaned up. - HPD interrupt is supported. Samsung Framebuffer changes for the 3.8 merge window: - The bit definitions of header file are updated. - Some minor typos are fixed. - Some minor bugs of s3c_fb_check_var() are fixed. FB related changes for SH Mobile, Freescale DIU Add support for the Solomon SSD1307 OLED Controller" * tag 'fbdev-for-3.8' of git://gitorious.org/linux-omap-dss2/linux: (191 commits) OMAPDSS: fix TV-out issue with DSI PLL Revert "OMAPFB: simplify locking" OMAPFB: remove silly loop in fb2display() OMAPFB: fix error handling in omapfb_find_best_mode() OMAPFB: use devm_kzalloc to allocate omapfb2_device OMAPDSS: DISPC: remove dispc fck uses OMAPDSS: DISPC: get dss clock rate from dss driver drivers/video/console/softcursor.c: remove redundant NULL check before kfree() drivers/video: add support for the Solomon SSD1307 OLED Controller OMAPDSS: use omapdss_compat_init() in other drivers OMAPDSS: export dispc functions OMAPDSS: export dss_feat functions OMAPDSS: export dss_mgr_ops functions OMAPDSS: separate compat files in the Makefile OMAPDSS: move display sysfs init to compat layer OMAPDSS: DPI: use dispc's check_timings OMAPDSS: DISPC: add dispc_ovl_check() OMAPDSS: move irq handling to dispc-compat OMAPDSS: move omap_dispc_wait_for_irq_interruptible_timeout to dispc-compat.c OMAPDSS: move blocking mgr enable/disable to compat layer ... Conflicts: arch/arm/mach-davinci/devices-da8xx.c arch/arm/plat-omap/common.c drivers/media/platform/omap/omap_vout.c
165 lines
4.5 KiB
C
165 lines
4.5 KiB
C
/*
|
|
* 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>
|
|
|
|
#include <plat/cpu.h>
|
|
|
|
#ifdef CONFIG_OMAP2_VRFB
|
|
|
|
/*
|
|
* The first memory resource is the register region for VRFB,
|
|
* the rest are VRFB virtual memory areas for each VRFB context.
|
|
*/
|
|
|
|
static const struct resource omap2_vrfb_resources[] = {
|
|
DEFINE_RES_MEM_NAMED(0x68008000u, 0x40, "vrfb-regs"),
|
|
DEFINE_RES_MEM_NAMED(0x70000000u, 0x4000000, "vrfb-area-0"),
|
|
DEFINE_RES_MEM_NAMED(0x74000000u, 0x4000000, "vrfb-area-1"),
|
|
DEFINE_RES_MEM_NAMED(0x78000000u, 0x4000000, "vrfb-area-2"),
|
|
DEFINE_RES_MEM_NAMED(0x7c000000u, 0x4000000, "vrfb-area-3"),
|
|
};
|
|
|
|
static const struct resource omap3_vrfb_resources[] = {
|
|
DEFINE_RES_MEM_NAMED(0x6C000180u, 0xc0, "vrfb-regs"),
|
|
DEFINE_RES_MEM_NAMED(0x70000000u, 0x4000000, "vrfb-area-0"),
|
|
DEFINE_RES_MEM_NAMED(0x74000000u, 0x4000000, "vrfb-area-1"),
|
|
DEFINE_RES_MEM_NAMED(0x78000000u, 0x4000000, "vrfb-area-2"),
|
|
DEFINE_RES_MEM_NAMED(0x7c000000u, 0x4000000, "vrfb-area-3"),
|
|
DEFINE_RES_MEM_NAMED(0xe0000000u, 0x4000000, "vrfb-area-4"),
|
|
DEFINE_RES_MEM_NAMED(0xe4000000u, 0x4000000, "vrfb-area-5"),
|
|
DEFINE_RES_MEM_NAMED(0xe8000000u, 0x4000000, "vrfb-area-6"),
|
|
DEFINE_RES_MEM_NAMED(0xec000000u, 0x4000000, "vrfb-area-7"),
|
|
DEFINE_RES_MEM_NAMED(0xf0000000u, 0x4000000, "vrfb-area-8"),
|
|
DEFINE_RES_MEM_NAMED(0xf4000000u, 0x4000000, "vrfb-area-9"),
|
|
DEFINE_RES_MEM_NAMED(0xf8000000u, 0x4000000, "vrfb-area-10"),
|
|
DEFINE_RES_MEM_NAMED(0xfc000000u, 0x4000000, "vrfb-area-11"),
|
|
};
|
|
|
|
static int __init omap_init_vrfb(void)
|
|
{
|
|
struct platform_device *pdev;
|
|
const struct resource *res;
|
|
unsigned int num_res;
|
|
|
|
if (cpu_is_omap24xx()) {
|
|
res = omap2_vrfb_resources;
|
|
num_res = ARRAY_SIZE(omap2_vrfb_resources);
|
|
} else if (cpu_is_omap34xx()) {
|
|
res = omap3_vrfb_resources;
|
|
num_res = ARRAY_SIZE(omap3_vrfb_resources);
|
|
} else {
|
|
return 0;
|
|
}
|
|
|
|
pdev = platform_device_register_resndata(NULL, "omapvrfb", -1,
|
|
res, num_res, NULL, 0);
|
|
|
|
if (IS_ERR(pdev))
|
|
return PTR_ERR(pdev);
|
|
else
|
|
return 0;
|
|
}
|
|
|
|
arch_initcall(omap_init_vrfb);
|
|
#endif
|
|
|
|
#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);
|
|
|
|
#elif defined(CONFIG_FB_OMAP2) || defined(CONFIG_FB_OMAP2_MODULE)
|
|
|
|
static u64 omap_fb_dma_mask = ~(u32)0;
|
|
static struct omapfb_platform_data omapfb_config;
|
|
|
|
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,
|
|
};
|
|
|
|
static int __init omap_init_fb(void)
|
|
{
|
|
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
|