Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 330737
b: refs/heads/master
c: be9a1b9
h: refs/heads/master
i:
  330735: c23b354
v: v3
  • Loading branch information
Laurent Pinchart authored and Mauro Carvalho Chehab committed Aug 11, 2012
1 parent ece3800 commit b2145af
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 26 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2f65f467b410ad7285ee243336c5d16dad01e847
refs/heads/master: be9a1b98f4796532c77babe211a6980e81e47b20
4 changes: 3 additions & 1 deletion trunk/drivers/media/video/omap3isp/isp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1281,7 +1281,9 @@ static void __isp_subclk_update(struct isp_device *isp)
{
u32 clk = 0;

if (isp->subclk_resources & OMAP3_ISP_SUBCLK_H3A)
/* AEWB and AF share the same clock. */
if (isp->subclk_resources &
(OMAP3_ISP_SUBCLK_AEWB | OMAP3_ISP_SUBCLK_AF))
clk |= ISPCTRL_H3A_CLK_EN;

if (isp->subclk_resources & OMAP3_ISP_SUBCLK_HIST)
Expand Down
9 changes: 5 additions & 4 deletions trunk/drivers/media/video/omap3isp/isp.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,11 @@ enum isp_sbl_resource {

enum isp_subclk_resource {
OMAP3_ISP_SUBCLK_CCDC = (1 << 0),
OMAP3_ISP_SUBCLK_H3A = (1 << 1),
OMAP3_ISP_SUBCLK_HIST = (1 << 2),
OMAP3_ISP_SUBCLK_PREVIEW = (1 << 3),
OMAP3_ISP_SUBCLK_RESIZER = (1 << 4),
OMAP3_ISP_SUBCLK_AEWB = (1 << 1),
OMAP3_ISP_SUBCLK_AF = (1 << 2),
OMAP3_ISP_SUBCLK_HIST = (1 << 3),
OMAP3_ISP_SUBCLK_PREVIEW = (1 << 4),
OMAP3_ISP_SUBCLK_RESIZER = (1 << 5),
};

/* ISP: OMAP 34xx ES 1.0 */
Expand Down
10 changes: 2 additions & 8 deletions trunk/drivers/media/video/omap3isp/isph3a_aewb.c
Original file line number Diff line number Diff line change
Expand Up @@ -93,17 +93,11 @@ static void h3a_aewb_enable(struct ispstat *aewb, int enable)
if (enable) {
isp_reg_set(aewb->isp, OMAP3_ISP_IOMEM_H3A, ISPH3A_PCR,
ISPH3A_PCR_AEW_EN);
/* This bit is already set if AF is enabled */
if (aewb->isp->isp_af.state != ISPSTAT_ENABLED)
isp_reg_set(aewb->isp, OMAP3_ISP_IOMEM_MAIN, ISP_CTRL,
ISPCTRL_H3A_CLK_EN);
omap3isp_subclk_enable(aewb->isp, OMAP3_ISP_SUBCLK_AEWB);
} else {
isp_reg_clr(aewb->isp, OMAP3_ISP_IOMEM_H3A, ISPH3A_PCR,
ISPH3A_PCR_AEW_EN);
/* This bit can't be cleared if AF is enabled */
if (aewb->isp->isp_af.state != ISPSTAT_ENABLED)
isp_reg_clr(aewb->isp, OMAP3_ISP_IOMEM_MAIN, ISP_CTRL,
ISPCTRL_H3A_CLK_EN);
omap3isp_subclk_disable(aewb->isp, OMAP3_ISP_SUBCLK_AEWB);
}
}

Expand Down
10 changes: 2 additions & 8 deletions trunk/drivers/media/video/omap3isp/isph3a_af.c
Original file line number Diff line number Diff line change
Expand Up @@ -143,17 +143,11 @@ static void h3a_af_enable(struct ispstat *af, int enable)
if (enable) {
isp_reg_set(af->isp, OMAP3_ISP_IOMEM_H3A, ISPH3A_PCR,
ISPH3A_PCR_AF_EN);
/* This bit is already set if AEWB is enabled */
if (af->isp->isp_aewb.state != ISPSTAT_ENABLED)
isp_reg_set(af->isp, OMAP3_ISP_IOMEM_MAIN, ISP_CTRL,
ISPCTRL_H3A_CLK_EN);
omap3isp_subclk_enable(af->isp, OMAP3_ISP_SUBCLK_AF);
} else {
isp_reg_clr(af->isp, OMAP3_ISP_IOMEM_H3A, ISPH3A_PCR,
ISPH3A_PCR_AF_EN);
/* This bit can't be cleared if AEWB is enabled */
if (af->isp->isp_aewb.state != ISPSTAT_ENABLED)
isp_reg_clr(af->isp, OMAP3_ISP_IOMEM_MAIN, ISP_CTRL,
ISPCTRL_H3A_CLK_EN);
omap3isp_subclk_disable(af->isp, OMAP3_ISP_SUBCLK_AF);
}
}

Expand Down
6 changes: 2 additions & 4 deletions trunk/drivers/media/video/omap3isp/isphist.c
Original file line number Diff line number Diff line change
Expand Up @@ -167,13 +167,11 @@ static void hist_enable(struct ispstat *hist, int enable)
if (enable) {
isp_reg_set(hist->isp, OMAP3_ISP_IOMEM_HIST, ISPHIST_PCR,
ISPHIST_PCR_ENABLE);
isp_reg_set(hist->isp, OMAP3_ISP_IOMEM_MAIN, ISP_CTRL,
ISPCTRL_HIST_CLK_EN);
omap3isp_subclk_enable(hist->isp, OMAP3_ISP_SUBCLK_HIST);
} else {
isp_reg_clr(hist->isp, OMAP3_ISP_IOMEM_HIST, ISPHIST_PCR,
ISPHIST_PCR_ENABLE);
isp_reg_clr(hist->isp, OMAP3_ISP_IOMEM_MAIN, ISP_CTRL,
ISPCTRL_HIST_CLK_EN);
omap3isp_subclk_disable(hist->isp, OMAP3_ISP_SUBCLK_HIST);
}
}

Expand Down

0 comments on commit b2145af

Please sign in to comment.