Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

staging: drm/omap: add support for ARCH_MULTIPLATFORM

Remove usage of plat/cpu.h and get information from platform data
instead. This enables omapdrm to be built with ARCH_MULTIPLATFORM.

Signed-off-by: Rob Clark <rob@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Rob Clark and committed by
Greg Kroah-Hartman
5e3b0874 f68f5f20

+16 -3
+7
arch/arm/mach-omap2/drm.c
··· 23 23 #include <linux/init.h> 24 24 #include <linux/platform_device.h> 25 25 #include <linux/dma-mapping.h> 26 + #include <linux/platform_data/omap_drm.h> 26 27 27 28 #include <plat/omap_device.h> 28 29 #include <plat/omap_hwmod.h> 30 + #include <plat/cpu.h> 29 31 30 32 #if defined(CONFIG_DRM_OMAP) || (CONFIG_DRM_OMAP_MODULE) 33 + 34 + static struct omap_drm_platform_data platform_data; 31 35 32 36 static struct platform_device omap_drm_device = { 33 37 .dev = { 34 38 .coherent_dma_mask = DMA_BIT_MASK(32), 39 + .platform_data = &platform_data, 35 40 }, 36 41 .name = "omapdrm", 37 42 .id = 0, ··· 56 51 WARN(IS_ERR(pdev), "Could not build omap_device for %s\n", 57 52 oh->name); 58 53 } 54 + 55 + platform_data.omaprev = GET_OMAP_REVISION(); 59 56 60 57 return platform_device_register(&omap_drm_device); 61 58
+1 -1
drivers/staging/omapdrm/Kconfig
··· 2 2 config DRM_OMAP 3 3 tristate "OMAP DRM" 4 4 depends on DRM && !CONFIG_FB_OMAP2 5 - depends on ARCH_OMAP2PLUS 5 + depends on ARCH_OMAP2PLUS || ARCH_MULTIPLATFORM 6 6 select DRM_KMS_HELPER 7 7 select OMAP2_DSS 8 8 select FB_SYS_FILLRECT
-1
drivers/staging/omapdrm/omap_dmm_tiler.h
··· 16 16 #ifndef OMAP_DMM_TILER_H 17 17 #define OMAP_DMM_TILER_H 18 18 19 - #include <plat/cpu.h> 20 19 #include "omap_drv.h" 21 20 #include "tcm.h" 22 21
+5 -1
drivers/staging/omapdrm/omap_drv.c
··· 417 417 static int ioctl_get_param(struct drm_device *dev, void *data, 418 418 struct drm_file *file_priv) 419 419 { 420 + struct omap_drm_private *priv = dev->dev_private; 420 421 struct drm_omap_param *args = data; 421 422 422 423 DBG("%p: param=%llu", dev, args->param); 423 424 424 425 switch (args->param) { 425 426 case OMAP_PARAM_CHIPSET_ID: 426 - args->value = GET_OMAP_TYPE; 427 + args->value = priv->omaprev; 427 428 break; 428 429 default: 429 430 DBG("unknown parameter %lld", args->param); ··· 556 555 */ 557 556 static int dev_load(struct drm_device *dev, unsigned long flags) 558 557 { 558 + struct omap_drm_platform_data *pdata = dev->dev->platform_data; 559 559 struct omap_drm_private *priv; 560 560 int ret; 561 561 ··· 567 565 dev_err(dev->dev, "could not allocate priv\n"); 568 566 return -ENOMEM; 569 567 } 568 + 569 + priv->omaprev = pdata->omaprev; 570 570 571 571 dev->dev_private = priv; 572 572
+2
drivers/staging/omapdrm/omap_drv.h
··· 40 40 #define MAX_MAPPERS 2 41 41 42 42 struct omap_drm_private { 43 + uint32_t omaprev; 44 + 43 45 unsigned int num_crtcs; 44 46 struct drm_crtc *crtcs[8]; 45 47
+1
include/linux/platform_data/omap_drm.h
··· 46 46 }; 47 47 48 48 struct omap_drm_platform_data { 49 + uint32_t omaprev; 49 50 struct omap_kms_platform_data *kms_pdata; 50 51 }; 51 52