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

TOMOYO Linux Cross Reference
Linux/arch/arm/mach-omap2/fb.c

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 // SPDX-License-Identifier: GPL-2.0-or-later
  2 /*
  3  * Framebuffer device registration for TI OMAP platforms
  4  *
  5  * Copyright (C) 2006 Nokia Corporation
  6  * Author: Imre Deak <imre.deak@nokia.com>
  7  */
  8 
  9 #include <linux/module.h>
 10 #include <linux/kernel.h>
 11 #include <linux/mm.h>
 12 #include <linux/init.h>
 13 #include <linux/platform_device.h>
 14 #include <linux/memblock.h>
 15 #include <linux/io.h>
 16 #include <linux/omapfb.h>
 17 #include <linux/dma-mapping.h>
 18 
 19 #include <asm/mach/map.h>
 20 
 21 #include "soc.h"
 22 #include "display.h"
 23 
 24 #ifdef CONFIG_OMAP2_VRFB
 25 
 26 /*
 27  * The first memory resource is the register region for VRFB,
 28  * the rest are VRFB virtual memory areas for each VRFB context.
 29  */
 30 
 31 static const struct resource omap2_vrfb_resources[] = {
 32         DEFINE_RES_MEM_NAMED(0x68008000u, 0x40, "vrfb-regs"),
 33         DEFINE_RES_MEM_NAMED(0x70000000u, 0x4000000, "vrfb-area-0"),
 34         DEFINE_RES_MEM_NAMED(0x74000000u, 0x4000000, "vrfb-area-1"),
 35         DEFINE_RES_MEM_NAMED(0x78000000u, 0x4000000, "vrfb-area-2"),
 36         DEFINE_RES_MEM_NAMED(0x7c000000u, 0x4000000, "vrfb-area-3"),
 37 };
 38 
 39 static const struct resource omap3_vrfb_resources[] = {
 40         DEFINE_RES_MEM_NAMED(0x6C000180u, 0xc0, "vrfb-regs"),
 41         DEFINE_RES_MEM_NAMED(0x70000000u, 0x4000000, "vrfb-area-0"),
 42         DEFINE_RES_MEM_NAMED(0x74000000u, 0x4000000, "vrfb-area-1"),
 43         DEFINE_RES_MEM_NAMED(0x78000000u, 0x4000000, "vrfb-area-2"),
 44         DEFINE_RES_MEM_NAMED(0x7c000000u, 0x4000000, "vrfb-area-3"),
 45         DEFINE_RES_MEM_NAMED(0xe0000000u, 0x4000000, "vrfb-area-4"),
 46         DEFINE_RES_MEM_NAMED(0xe4000000u, 0x4000000, "vrfb-area-5"),
 47         DEFINE_RES_MEM_NAMED(0xe8000000u, 0x4000000, "vrfb-area-6"),
 48         DEFINE_RES_MEM_NAMED(0xec000000u, 0x4000000, "vrfb-area-7"),
 49         DEFINE_RES_MEM_NAMED(0xf0000000u, 0x4000000, "vrfb-area-8"),
 50         DEFINE_RES_MEM_NAMED(0xf4000000u, 0x4000000, "vrfb-area-9"),
 51         DEFINE_RES_MEM_NAMED(0xf8000000u, 0x4000000, "vrfb-area-10"),
 52         DEFINE_RES_MEM_NAMED(0xfc000000u, 0x4000000, "vrfb-area-11"),
 53 };
 54 
 55 int __init omap_init_vrfb(void)
 56 {
 57         struct platform_device *pdev;
 58         const struct resource *res;
 59         unsigned int num_res;
 60 
 61         if (cpu_is_omap24xx()) {
 62                 res = omap2_vrfb_resources;
 63                 num_res = ARRAY_SIZE(omap2_vrfb_resources);
 64         } else if (cpu_is_omap34xx()) {
 65                 res = omap3_vrfb_resources;
 66                 num_res = ARRAY_SIZE(omap3_vrfb_resources);
 67         } else {
 68                 return 0;
 69         }
 70 
 71         pdev = platform_device_register_resndata(NULL, "omapvrfb", -1,
 72                         res, num_res, NULL, 0);
 73 
 74         return PTR_ERR_OR_ZERO(pdev);
 75 }
 76 #else
 77 int __init omap_init_vrfb(void) { return 0; }
 78 #endif
 79 
 80 #if IS_ENABLED(CONFIG_FB_OMAP2)
 81 
 82 static u64 omap_fb_dma_mask = ~(u32)0;
 83 static struct omapfb_platform_data omapfb_config;
 84 
 85 static struct platform_device omap_fb_device = {
 86         .name           = "omapfb",
 87         .id             = -1,
 88         .dev = {
 89                 .dma_mask               = &omap_fb_dma_mask,
 90                 .coherent_dma_mask      = DMA_BIT_MASK(32),
 91                 .platform_data          = &omapfb_config,
 92         },
 93         .num_resources = 0,
 94 };
 95 
 96 int __init omap_init_fb(void)
 97 {
 98         return platform_device_register(&omap_fb_device);
 99 }
100 #else
101 int __init omap_init_fb(void) { return 0; }
102 #endif
103 

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

kernel.org | git.kernel.org | LWN.net | Project Home | 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.

sflogo.php