RE: [RFC/PATCH 8/7] ARM: OMAP: AM35xx: convert 3517 detection/flags to AM35xx

2012-01-07 Thread Hiremath, Vaibhav
> -Original Message-
> From: Hilman, Kevin
> Sent: Saturday, January 07, 2012 12:24 AM
> To: linux-omap@vger.kernel.org
> Cc: Paul Walmsley; Hiremath, Vaibhav
> Subject: [RFC/PATCH 8/7] ARM: OMAP: AM35xx: convert 3517 detection/flags
> to AM35xx
> 
> Currently cpu_is_omap3517() actually detects any device in the AM35x
> family (3517 and no-SGX version 3505.)  To make it more clear what is
> being detected, convert the names from 3517 to AM35xx.
> 
> For the same reason, replace the CK_3517 flag used in the clock data
> to CK_AM35XX.
> 
> Signed-off-by: Kevin Hilman 
> ---
>  arch/arm/mach-omap2/clock3xxx_data.c  |8 
>  arch/arm/mach-omap2/hsmmc.c   |8 
>  arch/arm/mach-omap2/id.c  |7 +++
>  arch/arm/mach-omap2/omap_hwmod_3xxx_data.c|2 +-
>  arch/arm/mach-omap2/powerdomains3xxx_data.c   |2 +-
>  arch/arm/mach-omap2/usb-musb.c|2 +-
>  arch/arm/mach-omap2/voltagedomains3xxx_data.c |2 +-
>  arch/arm/plat-omap/include/plat/clkdev_omap.h |3 +--
>  arch/arm/plat-omap/include/plat/cpu.h |   15 +++
>  9 files changed, 23 insertions(+), 26 deletions(-)
> 
Is this also right time to change Makefile and Kconfig files???
Change in board/mach-types/Makefile/Kconfig files will bring
consistency across...

Thanks,
Vaibhav

> diff --git a/arch/arm/mach-omap2/clock3xxx_data.c b/arch/arm/mach-
> omap2/clock3xxx_data.c
> index 26fb4d9..745df5f 100644
> --- a/arch/arm/mach-omap2/clock3xxx_data.c
> +++ b/arch/arm/mach-omap2/clock3xxx_data.c
> @@ -3286,8 +3286,8 @@ static struct omap_clk omap3xxx_clks[] = {
>   CLK(NULL,   "gfx_l3_ick",   &gfx_l3_ick,CK_3430ES1),
>   CLK(NULL,   "gfx_cg1_ck",   &gfx_cg1_ck,CK_3430ES1),
>   CLK(NULL,   "gfx_cg2_ck",   &gfx_cg2_ck,CK_3430ES1),
> - CLK(NULL,   "sgx_fck",  &sgx_fck,   CK_3430ES2PLUS | 
> CK_3517 |
> CK_36XX),
> - CLK(NULL,   "sgx_ick",  &sgx_ick,   CK_3430ES2PLUS | 
> CK_3517 |
> CK_36XX),
> + CLK(NULL,   "sgx_fck",  &sgx_fck,   CK_3430ES2PLUS | 
> CK_AM35XX |
> CK_36XX),
> + CLK(NULL,   "sgx_ick",  &sgx_ick,   CK_3430ES2PLUS | 
> CK_AM35XX |
> CK_36XX),
>   CLK(NULL,   "d2d_26m_fck",  &d2d_26m_fck,   CK_3430ES1),
>   CLK(NULL,   "modem_fck",&modem_fck, CK_34XX | CK_36XX),
>   CLK(NULL,   "sad2d_ick",&sad2d_ick, CK_34XX | CK_36XX),
> @@ -3505,9 +3505,9 @@ int __init omap3xxx_clk_init(void)
>   struct omap_clk *c;
>   u32 cpu_clkflg = 0;
> 
> - if (cpu_is_omap3517()) {
> + if (cpu_is_am35xx()) {
>   cpu_mask = RATE_IN_34XX;
> - cpu_clkflg = CK_3517;
> + cpu_clkflg = CK_AM35XX;
>   } else if (cpu_is_omap3630()) {
>   cpu_mask = (RATE_IN_34XX | RATE_IN_36XX);
>   cpu_clkflg = CK_36XX;
> diff --git a/arch/arm/mach-omap2/hsmmc.c b/arch/arm/mach-omap2/hsmmc.c
> index c49a91d..70dbe6a 100644
> --- a/arch/arm/mach-omap2/hsmmc.c
> +++ b/arch/arm/mach-omap2/hsmmc.c
> @@ -353,7 +353,7 @@ static int __init omap_hsmmc_pdata_init(struct
> omap2_hsmmc_info *c,
>*
>* temporary HACK: ocr_mask instead of fixed supply
>*/
> - if (cpu_is_omap3517())
> + if (cpu_is_am35xx())
>   mmc->slots[0].ocr_mask = MMC_VDD_165_195 |
>MMC_VDD_26_27 |
>MMC_VDD_27_28 |
> @@ -363,7 +363,7 @@ static int __init omap_hsmmc_pdata_init(struct
> omap2_hsmmc_info *c,
>   else
>   mmc->slots[0].ocr_mask = c->ocr_mask;
> 
> - if (!cpu_is_omap3517())
> + if (!cpu_is_am35xx())
>   mmc->slots[0].features |= HSMMC_HAS_PBIAS;
> 
>   if (cpu_is_omap44xx() && (omap_rev() > OMAP4430_REV_ES1_0))
> @@ -386,7 +386,7 @@ static int __init omap_hsmmc_pdata_init(struct
> omap2_hsmmc_info *c,
>   }
>   }
> 
> - if (cpu_is_omap3517())
> + if (cpu_is_am35xx())
>   mmc->slots[0].set_power = nop_mmc_set_power;
> 
>   /* OMAP3630 HSMMC1 supports only 4-bit */
> @@ -398,7 +398,7 @@ static int __init omap_hsmmc_pdata_init(struct
> omap2_hsmmc_info *c,
>   }
>   break;
>   case 2:
> - if (cpu_is_omap3517())
> + if (cpu_is_am35xx())
>   mmc->slots[0].set_power = am35x_hsmmc2_set_power;
> 
>   if (c->ext_clock)
> diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c
> index 92e4d55..325e12e 100644
> --- a/arch/arm/mach-omap2/id.c
> +++ b/arch/arm/mach-omap2/id.c
> @@ -183,8 +183,7 @@ static void __init omap3_cpuinfo(void)
>*/
>   if (cpu_is_omap3630()) {
>   cpu_name = "OMAP3630";
> - } else if (cpu_is_omap3517()) {
> - /* AM35xx devices */
> + } else if (cpu_is_am35xx()) {
>   cpu_name = (omap3_has_s

Re: [PATCH v4 1/4] OMAP3: hwmod data: add mmu data for iva and isp

2012-01-07 Thread Laurent Pinchart
Hi Omar,

On Thursday 05 January 2012 20:24:25 Ramirez Luna, Omar wrote:
> On Sun, Dec 25, 2011 at 3:08 PM, Laurent Pinchart wrote:
> >> > I'm not sure how this clock stuff works, but I'm guessing the device
> >> > is supposed to go to sleep at some points in time, and with your patch
> >> > "OMAP3/4: iommu: adapt to runtime pm" it won't, as long as the module
> >> > is loaded, unless I'm missing something.
> >> 
> >> The device should be able to be put to sleep at anytime when it is NOT
> >> being used. AFAIK there is no mechanism for the main processor (the
> >> one running the kernel) to know when the other iommus are not being
> >> used, given that they are in independent processors/subsystems, at
> >> least for the ones in the DSP or M3 processors. Once the user releases
> >> its iommu resource it means it is no longer using it, at that point
> >> the device can be put to sleep.
> > 
> > How should the OMAP3 ISP driver proceed to make sure that its IOMMU is
> > clocked off when it doesn't need it ?
> 
> If there is an specific scenario where the iommu should be disabled,
> iommu_detach_device can be called to release the iommu resource. On
> suspend/resume scenarios runtime pm callbacks should still be able to
> put the device in idle.

Runtime PM might indeed be a better option. The OMAP3 ISP doesn't need to 
IOMMU until video streams are started, so we should keep it powered down in 
that case.

-- 
Regards,

Laurent Pinchart
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html