Merge remote-tracking branch 'origin/develop-3.0-rk2928' into develop-3.0
[firefly-linux-kernel-4.4.55.git] / arch / arm / mach-rk30 / devices.c
index c456492da10f22674c004db54dc7f754be7108f2..c38d07903b1a5592f464fbc111ff2a3d70b4802f 100755 (executable)
@@ -51,6 +51,7 @@ struct platform_device device_adc = {
 };
 #endif
 
+#ifdef CONFIG_ARCH_RK30
 static struct resource rk30_tsadc_resource[] = {
        {
                .start  = IRQ_TSADC,
@@ -64,12 +65,13 @@ static struct resource rk30_tsadc_resource[] = {
        },
 };
 
-struct platform_device device_tsadc = {
+static struct platform_device device_tsadc = {
        .name           = "rk30-tsadc",
        .id             = -1,
        .num_resources  = ARRAY_SIZE(rk30_tsadc_resource),
        .resource       = rk30_tsadc_resource,
 };
+#endif
 
 static u64 dma_dmamask = DMA_BIT_MASK(32);
 
@@ -909,7 +911,7 @@ static struct platform_device device_nand = {
 };
 #endif
 
-#ifdef CONFIG_LCDC0_RK30
+#if defined(CONFIG_LCDC0_RK30) || defined(CONFIG_LCDC0_RK31)
 extern struct rk29fb_info lcdc0_screen_info;
 static struct resource resource_lcdc0[] = {
        [0] = {
@@ -937,7 +939,7 @@ static struct platform_device device_lcdc0 = {
        },
 };
 #endif
-#ifdef CONFIG_LCDC1_RK30
+#if defined(CONFIG_LCDC1_RK30) || defined(CONFIG_LCDC1_RK31)
 extern struct rk29fb_info lcdc1_screen_info;
 static struct resource resource_lcdc1[] = {
        [0] = {
@@ -1311,10 +1313,10 @@ static int __init rk30_init_devices(void)
        platform_device_register(&device_rga);
 #endif
        platform_device_register(&device_ipp);
-#ifdef CONFIG_LCDC0_RK30
+#if    defined(CONFIG_LCDC0_RK30) || defined(CONFIG_LCDC0_RK31)
        platform_device_register(&device_lcdc0);
 #endif
-#ifdef CONFIG_LCDC1_RK30
+#if     defined(CONFIG_LCDC1_RK30) || defined(CONFIG_LCDC1_RK31)
        platform_device_register(&device_lcdc1);
 #endif
 #ifdef CONFIG_HDMI_RK30
@@ -1323,7 +1325,9 @@ static int __init rk30_init_devices(void)
 #ifdef CONFIG_ADC_RK30
        platform_device_register(&device_adc);
 #endif
+#ifdef CONFIG_ARCH_RK30
        platform_device_register(&device_tsadc);
+#endif
        rk30_init_sdmmc();
 #if defined(CONFIG_FIQ_DEBUGGER) && defined(DEBUG_UART_PHYS)
        rk_serial_debug_init(DEBUG_UART_BASE, IRQ_DEBUG_UART, IRQ_UART_SIGNAL, -1);