rk30: vpu_service: modify vpu dec hardware offset, hwid check pass
author陈恒明 <chm@rock-chips.com>
Fri, 23 Mar 2012 08:40:54 +0000 (16:40 +0800)
committer陈恒明 <chm@rock-chips.com>
Fri, 23 Mar 2012 08:40:54 +0000 (16:40 +0800)
arch/arm/configs/rk30_sdk_defconfig
arch/arm/plat-rk/vpu_service.c

index 6798e1761226f74db8fcb341697af311d992e6ca..db3e1ce2fbe9755d13d6084707e2c2d5a361a3b5 100644 (file)
@@ -22,7 +22,7 @@ CONFIG_MODULE_UNLOAD=y
 CONFIG_MODULE_FORCE_UNLOAD=y
 CONFIG_ARCH_RK30=y
 CONFIG_DDR_SDRAM_FREQ=456
-# CONFIG_RK29_VPU is not set
+CONFIG_RK29_VPU=y
 # CONFIG_SWP_EMULATE is not set
 CONFIG_FIQ_DEBUGGER=y
 CONFIG_FIQ_DEBUGGER_NO_SLEEP=y
index ab3559fd376eba73db38d5202a2f5e0307c8498e..96f391729cd997ae312ca0835d8b15594915fb28 100644 (file)
 static const u16 dec_hw_ids[] = { 0x8190, 0x8170, 0x9170, 0x9190, 0x6731 };
 #if defined(CONFIG_ARCH_RK29)
 static const u16 enc_hw_ids[] = { 0x6280, 0x7280, 0x8270 };
+#define DEC_PHY_OFFSET                                 0x200
 #elif defined(CONFIG_ARCH_RK30)
 static const u16 enc_hw_ids[] = { 0x6280, 0x7280, 0x8270, 0x8290, 0x4831 };
+#define DEC_PHY_OFFSET                                 0x400
 #endif
 
 #define VPU_REG_EN_ENC                         14
@@ -1110,7 +1112,7 @@ static int __init vpu_service_init(void)
 
        pr_debug("baseaddr = 0x%08x vdpu irq = %d vepu irq = %d\n", RK29_VCODEC_PHYS, IRQ_VDPU, IRQ_VEPU);
 
-       dec_dev.iobaseaddr      = RK29_VCODEC_PHYS + 0x200;
+       dec_dev.iobaseaddr      = RK29_VCODEC_PHYS + DEC_PHY_OFFSET;
        dec_dev.iosize          = DEC_IO_SIZE;
        enc_dev.iobaseaddr      = RK29_VCODEC_PHYS;
        enc_dev.iosize          = ENC_IO_SIZE;