~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/arch/arm/plat-omap/fb.c

Version: ~ [ linux-5.5-rc7 ] ~ [ linux-5.4.13 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.97 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.166 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.210 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.210 ] ~ [ linux-4.3.6 ] ~ [ linux-4.2.8 ] ~ [ linux-4.1.52 ] ~ [ linux-4.0.9 ] ~ [ linux-3.19.8 ] ~ [ linux-3.18.140 ] ~ [ linux-3.17.8 ] ~ [ linux-3.16.81 ] ~ [ linux-3.15.10 ] ~ [ linux-3.14.79 ] ~ [ linux-3.13.11 ] ~ [ linux-3.12.74 ] ~ [ linux-3.11.10 ] ~ [ linux-3.10.108 ] ~ [ linux-3.9.11 ] ~ [ linux-3.8.13 ] ~ [ linux-3.7.10 ] ~ [ linux-3.6.11 ] ~ [ linux-3.5.7 ] ~ [ linux-3.4.113 ] ~ [ linux-3.3.8 ] ~ [ linux-3.2.102 ] ~ [ linux-3.1.10 ] ~ [ linux-3.0.101 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.5 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  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 
 33 #include <mach/hardware.h>
 34 #include <asm/mach/map.h>
 35 
 36 #include <plat/board.h>
 37 
 38 #if defined(CONFIG_FB_OMAP) || defined(CONFIG_FB_OMAP_MODULE)
 39 
 40 static bool omapfb_lcd_configured;
 41 static struct omapfb_platform_data omapfb_config;
 42 
 43 static u64 omap_fb_dma_mask = ~(u32)0;
 44 
 45 static struct platform_device omap_fb_device = {
 46         .name           = "omapfb",
 47         .id             = -1,
 48         .dev = {
 49                 .dma_mask               = &omap_fb_dma_mask,
 50                 .coherent_dma_mask      = ~(u32)0,
 51                 .platform_data          = &omapfb_config,
 52         },
 53         .num_resources = 0,
 54 };
 55 
 56 void __init omapfb_set_lcd_config(const struct omap_lcd_config *config)
 57 {
 58         omapfb_config.lcd = *config;
 59         omapfb_lcd_configured = true;
 60 }
 61 
 62 static int __init omap_init_fb(void)
 63 {
 64         /*
 65          * If the board file has not set the lcd config with
 66          * omapfb_set_lcd_config(), don't bother registering the omapfb device
 67          */
 68         if (!omapfb_lcd_configured)
 69                 return 0;
 70 
 71         return platform_device_register(&omap_fb_device);
 72 }
 73 
 74 arch_initcall(omap_init_fb);
 75 
 76 #elif defined(CONFIG_FB_OMAP2) || defined(CONFIG_FB_OMAP2_MODULE)
 77 
 78 static u64 omap_fb_dma_mask = ~(u32)0;
 79 static struct omapfb_platform_data omapfb_config;
 80 
 81 static struct platform_device omap_fb_device = {
 82         .name           = "omapfb",
 83         .id             = -1,
 84         .dev = {
 85                 .dma_mask               = &omap_fb_dma_mask,
 86                 .coherent_dma_mask      = ~(u32)0,
 87                 .platform_data          = &omapfb_config,
 88         },
 89         .num_resources = 0,
 90 };
 91 
 92 static int __init omap_init_fb(void)
 93 {
 94         return platform_device_register(&omap_fb_device);
 95 }
 96 
 97 arch_initcall(omap_init_fb);
 98 
 99 #else
100 
101 void __init omapfb_set_lcd_config(const struct omap_lcd_config *config)
102 {
103 }
104 
105 #endif
106 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | Wiki (Japanese) | Wiki (English) | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

osdn.jp