mirror of
https://github.com/torvalds/linux.git
synced 2024-12-03 17:41:22 +00:00
1a59d1b8e0
Based on 1 normalized pattern(s): 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 extracted by the scancode license scanner the SPDX license identifier GPL-2.0-or-later has been chosen to replace the boilerplate/reference in 1334 file(s). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Allison Randal <allison@lohutok.net> Reviewed-by: Richard Fontana <rfontana@redhat.com> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190527070033.113240726@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
68 lines
1.4 KiB
C
68 lines
1.4 KiB
C
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
/*
|
|
* 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>
|
|
*/
|
|
|
|
#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 IS_ENABLED(CONFIG_FB_OMAP)
|
|
|
|
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
|