RK3066B: add SGX540 device
authorchenli <chenli@rock-chips.com>
Wed, 29 Aug 2012 08:47:37 +0000 (16:47 +0800)
committerchenli <chenli@rock-chips.com>
Wed, 29 Aug 2012 08:47:37 +0000 (16:47 +0800)
arch/arm/mach-rk30/devices.c

index f24f6e7e137a30e4c6dff5a400be39d8c3db8294..41a02d479b61515ad5ebb1bb57781f71768faace 100755 (executable)
@@ -1044,6 +1044,29 @@ static struct platform_device device_ipp = {
        .resource       = resource_ipp,
 };
 
+#if defined(CONFIG_ARCH_RK3066B)
+static struct resource resources_sgx[] = {
+    [0] = {
+        .name  = "gpu_irq",
+        .start         = IRQ_GPU,
+        .end    = IRQ_GPU,
+        .flags  = IORESOURCE_IRQ,
+    },
+    [1] = {
+        .name   = "gpu_base",
+        .start  = RK30_GPU_PHYS ,
+        .end    = RK30_GPU_PHYS  + RK30_GPU_SIZE - 1,
+        .flags  = IORESOURCE_MEM,
+    },
+};
+static struct platform_device device_sgx = {
+    .name             = "pvrsrvkm",
+    .id               = 0,
+    .num_resources    = ARRAY_SIZE(resources_sgx),
+    .resource         = resources_sgx,
+};
+#endif
+
 #ifdef CONFIG_SND_RK29_SOC_I2S
 #ifdef CONFIG_SND_RK29_SOC_I2S_8CH
 static struct resource resource_iis0_8ch[] = {
@@ -1348,6 +1371,9 @@ static int __init rk30_init_devices(void)
        platform_device_register(&device_rga);
 #endif
        platform_device_register(&device_ipp);
+#if defined(CONFIG_ARCH_RK3066B)
+       platform_device_register(&device_sgx);
+#endif
 #if    defined(CONFIG_LCDC0_RK30) || defined(CONFIG_LCDC0_RK31)
        platform_device_register(&device_lcdc0);
 #endif