From: 黄涛 Date: Tue, 22 Mar 2011 04:54:54 +0000 (+0800) Subject: rk29: clock: rename vip to vip_out X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=43cef275115ae93068717252d3537f50b406cca3;p=firefly-linux-kernel-4.4.55.git rk29: clock: rename vip to vip_out --- diff --git a/arch/arm/mach-rk29/clock.c b/arch/arm/mach-rk29/clock.c index c3efca3c63c2..2eb8d17cfc71 100755 --- a/arch/arm/mach-rk29/clock.c +++ b/arch/arm/mach-rk29/clock.c @@ -1600,12 +1600,16 @@ static struct clk aclk_gpu = { }; +static struct clk vip_clkin = { + .name = "vip_clkin", +}; + static struct clk *clk_vip_parents[4] = { &xin24m, &xin27m, &dclk_ebook }; -static struct clk clk_vip = { - .name = "vip", +static struct clk clk_vip_out = { + .name = "vip_out", .mode = gate_mode, - .gate_idx = CLK_GATE_VIP, + .gate_idx = CLK_GATE_VIP_OUT, .clksel_con = CRU_CLKSEL1_CON, .clksel_parent_mask = 3, .clksel_parent_shift = 7, @@ -1673,7 +1677,7 @@ GATE_CLK(wdt, pclk_periph, WDT); GATE_CLK(pwm, pclk_periph, PWM); GATE_CLK(vip_bus, aclk_cpu, VIP_BUS); GATE_CLK(vip_matrix, clk_vip_bus, VIP_MATRIX); -GATE_CLK(vip_input, hclk_cpu, VIP_INPUT); +GATE_CLK(vip_input, vip_clkin, VIP_INPUT); GATE_CLK(jtag, aclk_cpu, JTAG); GATE_CLK(aclk_ddr_lcdc, aclk_lcdc, ACLK_DDR_LCDC); @@ -1713,6 +1717,7 @@ static struct clk_lookup clks[] = { CLK(NULL, "otgphy0_clkin", &otgphy0_clkin), CLK(NULL, "otgphy1_clkin", &otgphy1_clkin), CLK(NULL, "gpsclk", &gpsclk), + CLK(NULL, "vip_clkin", &vip_clkin), CLK1(12m), CLK(NULL, "arm_pll", &arm_pll_clk), @@ -1729,7 +1734,7 @@ static struct clk_lookup clks[] = { CLK(NULL, "hclk_periph", &hclk_periph), CLK(NULL, "pclk_periph", &pclk_periph), - CLK1(vip), + CLK1(vip_out), CLK1(otgphy0), CLK1(otgphy1), CLK1(uhost), diff --git a/arch/arm/mach-rk29/include/mach/cru.h b/arch/arm/mach-rk29/include/mach/cru.h index 158630fb76f8..34b0e3229484 100644 --- a/arch/arm/mach-rk29/include/mach/cru.h +++ b/arch/arm/mach-rk29/include/mach/cru.h @@ -106,7 +106,7 @@ enum cru_clk_gate CLK_GATE_PWM, CLK_GATE_VIP_BUS, CLK_GATE_VIP_MATRIX, - CLK_GATE_VIP, + CLK_GATE_VIP_OUT, CLK_GATE_VIP_INPUT, CLK_GATE_JTAG, diff --git a/drivers/media/video/rk29_camera_oneframe.c b/drivers/media/video/rk29_camera_oneframe.c index 483568ad951a..466758bdf2d8 100755 --- a/drivers/media/video/rk29_camera_oneframe.c +++ b/drivers/media/video/rk29_camera_oneframe.c @@ -207,7 +207,7 @@ struct rk29_camera_dev struct clk *hclk_cpu_display; struct clk *vip_slave; - struct clk *vip; + struct clk *vip_out; struct clk *vip_input; struct clk *vip_bus; @@ -612,9 +612,9 @@ static int rk29_camera_activate(struct rk29_camera_dev *pcdev, struct soc_camera RK29CAMERA_DG("%s..%d.. \n",__FUNCTION__,__LINE__); if (!pcdev->aclk_ddr_lcdc || !pcdev->aclk_disp_matrix || !pcdev->hclk_cpu_display || - !pcdev->vip_slave || !pcdev->vip || !pcdev->vip_input || !pcdev->vip_bus || + !pcdev->vip_slave || !pcdev->vip_out || !pcdev->vip_input || !pcdev->vip_bus || IS_ERR(pcdev->aclk_ddr_lcdc) || IS_ERR(pcdev->aclk_disp_matrix) || IS_ERR(pcdev->hclk_cpu_display) || - IS_ERR(pcdev->vip_slave) || IS_ERR(pcdev->vip) || IS_ERR(pcdev->vip_input) || IS_ERR(pcdev->vip_bus)) { + IS_ERR(pcdev->vip_slave) || IS_ERR(pcdev->vip_out) || IS_ERR(pcdev->vip_input) || IS_ERR(pcdev->vip_bus)) { RK29CAMERA_TR(KERN_ERR "failed to get vip_clk(axi) source\n"); goto RK29_CAMERA_ACTIVE_ERR; @@ -658,9 +658,9 @@ static int rk29_camera_activate(struct rk29_camera_dev *pcdev, struct soc_camera goto RK29_CAMERA_ACTIVE_ERR; } - clk_set_parent(pcdev->vip, parent); + clk_set_parent(pcdev->vip_out, parent); - clk_enable(pcdev->vip); + clk_enable(pcdev->vip_out); rk29_mux_api_set(GPIO1B4_VIPCLKOUT_NAME, GPIO1L_VIP_CLKOUT); ndelay(10); @@ -693,7 +693,7 @@ static void rk29_camera_deactivate(struct rk29_camera_dev *pcdev) read_vip_reg(RK29_VIP_INT_STS); //clear vip interrupte single rk29_mux_api_set(GPIO1B4_VIPCLKOUT_NAME, GPIO1L_GPIO1B4); - clk_disable(pcdev->vip); + clk_disable(pcdev->vip_out); clk_disable(pcdev->vip_input); clk_disable(pcdev->vip_bus); @@ -1443,7 +1443,7 @@ static int rk29_camera_probe(struct platform_device *pdev) pcdev->hclk_cpu_display = clk_get(&pdev->dev, "hclk_cpu_display"); pcdev->vip_slave = clk_get(&pdev->dev, "vip_slave"); - pcdev->vip = clk_get(&pdev->dev,"vip"); + pcdev->vip_out = clk_get(&pdev->dev,"vip_out"); pcdev->vip_input = clk_get(&pdev->dev,"vip_input"); pcdev->vip_bus = clk_get(&pdev->dev, "vip_bus"); @@ -1451,9 +1451,9 @@ static int rk29_camera_probe(struct platform_device *pdev) pcdev->vip_matrix = clk_get(&pdev->dev,"vip_matrix"); if (!pcdev->aclk_ddr_lcdc || !pcdev->aclk_disp_matrix || !pcdev->hclk_cpu_display || - !pcdev->vip_slave || !pcdev->vip || !pcdev->vip_input || !pcdev->vip_bus || + !pcdev->vip_slave || !pcdev->vip_out || !pcdev->vip_input || !pcdev->vip_bus || IS_ERR(pcdev->aclk_ddr_lcdc) || IS_ERR(pcdev->aclk_disp_matrix) || IS_ERR(pcdev->hclk_cpu_display) || - IS_ERR(pcdev->vip_slave) || IS_ERR(pcdev->vip) || IS_ERR(pcdev->vip_input) || IS_ERR(pcdev->vip_bus)) { + IS_ERR(pcdev->vip_slave) || IS_ERR(pcdev->vip_out) || IS_ERR(pcdev->vip_input) || IS_ERR(pcdev->vip_bus)) { RK29CAMERA_TR(KERN_ERR "failed to get vip_clk(axi) source\n"); err = -ENOENT; @@ -1565,9 +1565,9 @@ exit_reqmem: clk_put(pcdev->vip_slave); pcdev->vip_slave = NULL; } - if (pcdev->vip) { - clk_put(pcdev->vip); - pcdev->vip = NULL; + if (pcdev->vip_out) { + clk_put(pcdev->vip_out); + pcdev->vip_out = NULL; } if (pcdev->vip_input) { clk_put(pcdev->vip_input); diff --git a/drivers/media/video/rk29_camera_pingpong.c b/drivers/media/video/rk29_camera_pingpong.c index 32667f5ee204..a1088e480775 100644 --- a/drivers/media/video/rk29_camera_pingpong.c +++ b/drivers/media/video/rk29_camera_pingpong.c @@ -1223,7 +1223,7 @@ static int rk29_camera_probe(struct platform_device *pdev) rk29_camdev_info_ptr = pcdev; /*config output clk*/ - pcdev->clk = clk_get(&pdev->dev, "vip"); + pcdev->clk = clk_get(&pdev->dev, "vip_out"); if (!pcdev->clk || IS_ERR(pcdev->clk)) { RK29CAMERA_TR(KERN_ERR "failed to get vip_clk source\n"); err = -ENOENT;