rk3026: devices.c: register device_vpu_service
author黄涛 <huangtao@rock-chips.com>
Thu, 1 Aug 2013 07:27:25 +0000 (15:27 +0800)
committer黄涛 <huangtao@rock-chips.com>
Thu, 1 Aug 2013 07:27:25 +0000 (15:27 +0800)
arch/arm/mach-rk2928/devices.c

index 009808878a2d00688c393811db288dbcdf3e20d2..471f38c06a96f3f1d5ae677694feeeb9422cbd97 100644 (file)
@@ -772,7 +772,7 @@ static struct resource resource_arm_pmu[] = {
 #endif
 };
 
-struct platform_device device_arm_pmu = {
+static struct platform_device device_arm_pmu = {
        .name           = "arm-pmu",
        .id             = ARM_PMU_DEVICE_CPU,
        .num_resources  = ARRAY_SIZE(resource_arm_pmu),
@@ -789,7 +789,7 @@ static struct resource resource_lvds[] = {
        },
 };
 
-struct platform_device device_lvds = {
+static struct platform_device device_lvds = {
        .name           = "rk3026-lvds",
        .id             = -1,
        .num_resources  = ARRAY_SIZE(resource_lvds),
@@ -797,6 +797,33 @@ struct platform_device device_lvds = {
 };
 #endif
 
+static struct resource resource_vpu_service[] = {
+       {
+               .start  = IRQ_VDPU,
+               .end    = IRQ_VDPU,
+               .name   = "irq_vdpu",
+               .flags  = IORESOURCE_IRQ,
+       },
+       {
+               .start  = IRQ_VEPU,
+               .end    = IRQ_VEPU,
+               .name   = "irq_vepu",
+               .flags  = IORESOURCE_IRQ,
+       },
+       {
+               .start  = RK2928_VCODEC_PHYS,
+               .end    = RK2928_VCODEC_PHYS + RK2928_VCODEC_SIZE - 1,
+               .flags  = IORESOURCE_MEM,
+       },
+};
+
+static struct platform_device device_vpu_service = {
+       .name           = "vpu_service",
+       .id             = -1,
+       .num_resources  = ARRAY_SIZE(resource_vpu_service),
+       .resource       = resource_vpu_service,
+};
+
 static int __init rk2928_init_devices(void)
 {
        rk2928_init_dma();
@@ -828,6 +855,7 @@ static int __init rk2928_init_devices(void)
 #ifdef CONFIG_RK3026_LVDS
        platform_device_register(&device_lvds);
 #endif
+       platform_device_register(&device_vpu_service);
 
        return 0;
 }