\r
#define HEVC_TEST_ENABLE 0\r
#define HEVC_SIM_ENABLE 0\r
+#define VCODEC_CLOCK_ENABLE 1\r
\r
typedef enum {\r
VPU_DEC_ID_9190 = 0x6731,\r
\r
static void vpu_get_clk(struct vpu_service_info *pservice)\r
{\r
+#if VCODEC_CLOCK_ENABLE\r
/*pd_video = clk_get(NULL, "pd_video");\r
if (IS_ERR(pd_video)) {\r
pr_err("failed on clk_get pd_video\n");\r
dev_err(pservice->dev, "failed on clk_get clk_cabac\n");\r
}\r
}\r
+#endif\r
}\r
\r
static void vpu_put_clk(struct vpu_service_info *pservice)\r
{\r
+#if VCODEC_CLOCK_ENABLE\r
//clk_put(pd_video);\r
\r
if (pservice->aclk_vcodec) {\r
devm_clk_put(pservice->dev, pservice->hclk_vcodec);\r
}\r
\r
- if (pservice->hw_info->hw_id == HEVC_ID) {\r
+ if (pservice->dev_id == VCODEC_DEVICE_ID_HEVC) {\r
if (pservice->clk_core) {\r
devm_clk_put(pservice->dev, pservice->clk_core);\r
}\r
devm_clk_put(pservice->dev, pservice->clk_cabac);\r
}\r
}\r
+#endif\r
}\r
\r
static void vpu_reset(struct vpu_service_info *pservice)\r
vpu_service_dump(pservice);\r
}\r
\r
- printk("vpu: power off...");\r
+ printk("%s: power off...", dev_name(pservice->dev));\r
#ifdef CONFIG_ARCH_RK29\r
pmu_set_power_domain(PD_VCODEC, false);\r
#else\r
//clk_disable(pd_video);\r
#endif\r
udelay(10);\r
-#if 0\r
+#if VCODEC_CLOCK_ENABLE\r
clk_disable_unprepare(pservice->hclk_vcodec);\r
clk_disable_unprepare(pservice->aclk_vcodec);\r
- if (pservice->hw_info->hw_id == HEVC_ID) {\r
+ if (pservice->dev_id == VCODEC_DEVICE_ID_HEVC) {\r
clk_disable_unprepare(pservice->clk_core);\r
clk_disable_unprepare(pservice->clk_cabac);\r
}\r
return ;\r
\r
pservice->enabled = true;\r
- printk("vpu: power on\n");\r
+ printk("%s: power on\n", dev_name(pservice->dev));\r
\r
-#if 0\r
+#if VCODEC_CLOCK_ENABLE\r
clk_prepare_enable(pservice->aclk_vcodec);\r
clk_prepare_enable(pservice->hclk_vcodec);\r
- if (pservice->hw_info->hw_id == HEVC_ID) {\r
+\r
+ if (pservice->dev_id == VCODEC_DEVICE_ID_HEVC) {\r
clk_prepare_enable(pservice->clk_core);\r
clk_prepare_enable(pservice->clk_cabac);\r
}\r
{\r
struct vpu_service_info *pservice = (struct vpu_service_info*)dev_id;\r
vpu_device *dev = &pservice->dec_dev;\r
- u32 irq_status = readl(dev->hwregs + DEC_INTERRUPT_REGISTER);\r
- int i;\r
+ u32 irq_status = readl(dev->hwregs + DEC_INTERRUPT_REGISTER);\r
\r
pr_debug("dec_irq\n");\r
\r