diff mbox series

[v4,1/4] clk: sunxi-ng: Enable DE2_CCU for SUN8I and SUN50I

Message ID 20180904163609.10171-1-jagan@amarulasolutions.com (mailing list archive)
State New, archived
Headers show
Series [v4,1/4] clk: sunxi-ng: Enable DE2_CCU for SUN8I and SUN50I | expand

Commit Message

Jagan Teki Sept. 4, 2018, 4:36 p.m. UTC
Allwinner SoC like SUN8I and SUN50I has DE2 CCU so enable them
as default.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
---
Changes for v4, v3:
- none
Changes for v2:
- Enable for MACH_SUN8I

 drivers/clk/sunxi-ng/Kconfig | 2 ++
 1 file changed, 2 insertions(+)

Comments

Maxime Ripard Sept. 5, 2018, 7:03 a.m. UTC | #1
On Tue, Sep 04, 2018 at 10:06:06PM +0530, Jagan Teki wrote:
> Allwinner SoC like SUN8I and SUN50I has DE2 CCU so enable them
> as default.
> 
> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
> ---
> Changes for v4, v3:
> - none
> Changes for v2:
> - Enable for MACH_SUN8I
> 
>  drivers/clk/sunxi-ng/Kconfig | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/clk/sunxi-ng/Kconfig b/drivers/clk/sunxi-ng/Kconfig
> index 826674d090fd..e20182aa9748 100644
> --- a/drivers/clk/sunxi-ng/Kconfig
> +++ b/drivers/clk/sunxi-ng/Kconfig
> @@ -63,6 +63,8 @@ config SUN8I_V3S_CCU
>  
>  config SUN8I_DE2_CCU
>  	bool "Support for the Allwinner SoCs DE2 CCU"
> +	default MACH_SUN8I || (ARM64 && ARCH_SUNXI)
> +	depends on DRM_SUN4I && (MACH_SUN8I || (ARM64 && ARCH_SUNXI))

I don't see why there's a dependency on the DRM driver. I'm pretty
sure this would even break simplefb.

Maxime
Jagan Teki Sept. 5, 2018, 7:55 a.m. UTC | #2
On Wed, Sep 5, 2018 at 12:33 PM, Maxime Ripard
<maxime.ripard@bootlin.com> wrote:
> On Tue, Sep 04, 2018 at 10:06:06PM +0530, Jagan Teki wrote:
>> Allwinner SoC like SUN8I and SUN50I has DE2 CCU so enable them
>> as default.
>>
>> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
>> ---
>> Changes for v4, v3:
>> - none
>> Changes for v2:
>> - Enable for MACH_SUN8I
>>
>>  drivers/clk/sunxi-ng/Kconfig | 2 ++
>>  1 file changed, 2 insertions(+)
>>
>> diff --git a/drivers/clk/sunxi-ng/Kconfig b/drivers/clk/sunxi-ng/Kconfig
>> index 826674d090fd..e20182aa9748 100644
>> --- a/drivers/clk/sunxi-ng/Kconfig
>> +++ b/drivers/clk/sunxi-ng/Kconfig
>> @@ -63,6 +63,8 @@ config SUN8I_V3S_CCU
>>
>>  config SUN8I_DE2_CCU
>>       bool "Support for the Allwinner SoCs DE2 CCU"
>> +     default MACH_SUN8I || (ARM64 && ARCH_SUNXI)
>> +     depends on DRM_SUN4I && (MACH_SUN8I || (ARM64 && ARCH_SUNXI))
>
> I don't see why there's a dependency on the DRM driver. I'm pretty
> sure this would even break simplefb.

Ok, got it. I will drop the depends on just add default.
Jernej Škrabec Sept. 6, 2018, 5:10 a.m. UTC | #3
Dne sreda, 05. september 2018 ob 09:03:35 CEST je Maxime Ripard napisal(a):
> On Tue, Sep 04, 2018 at 10:06:06PM +0530, Jagan Teki wrote:
> > Allwinner SoC like SUN8I and SUN50I has DE2 CCU so enable them
> > as default.
> > 
> > Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
> > ---
> > Changes for v4, v3:
> > - none
> > Changes for v2:
> > - Enable for MACH_SUN8I
> > 
> >  drivers/clk/sunxi-ng/Kconfig | 2 ++
> >  1 file changed, 2 insertions(+)
> > 
> > diff --git a/drivers/clk/sunxi-ng/Kconfig b/drivers/clk/sunxi-ng/Kconfig
> > index 826674d090fd..e20182aa9748 100644
> > --- a/drivers/clk/sunxi-ng/Kconfig
> > +++ b/drivers/clk/sunxi-ng/Kconfig
> > @@ -63,6 +63,8 @@ config SUN8I_V3S_CCU
> > 
> >  config SUN8I_DE2_CCU
> >  
> >  	bool "Support for the Allwinner SoCs DE2 CCU"
> > 
> > +	default MACH_SUN8I || (ARM64 && ARCH_SUNXI)
> > +	depends on DRM_SUN4I && (MACH_SUN8I || (ARM64 && ARCH_SUNXI))
> 
> I don't see why there's a dependency on the DRM driver. I'm pretty
> sure this would even break simplefb.

I think best approach would be that SUN8I_MIXER selects (or depends on?) this 
symbol, since it can't work if there is no DE2 CCU clock present.

Best regards,
Jernej
Maxime Ripard Sept. 7, 2018, 1:31 p.m. UTC | #4
On Thu, Sep 06, 2018 at 07:10:06AM +0200, Jernej Škrabec wrote:
> Dne sreda, 05. september 2018 ob 09:03:35 CEST je Maxime Ripard napisal(a):
> > On Tue, Sep 04, 2018 at 10:06:06PM +0530, Jagan Teki wrote:
> > > Allwinner SoC like SUN8I and SUN50I has DE2 CCU so enable them
> > > as default.
> > > 
> > > Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
> > > ---
> > > Changes for v4, v3:
> > > - none
> > > Changes for v2:
> > > - Enable for MACH_SUN8I
> > > 
> > >  drivers/clk/sunxi-ng/Kconfig | 2 ++
> > >  1 file changed, 2 insertions(+)
> > > 
> > > diff --git a/drivers/clk/sunxi-ng/Kconfig b/drivers/clk/sunxi-ng/Kconfig
> > > index 826674d090fd..e20182aa9748 100644
> > > --- a/drivers/clk/sunxi-ng/Kconfig
> > > +++ b/drivers/clk/sunxi-ng/Kconfig
> > > @@ -63,6 +63,8 @@ config SUN8I_V3S_CCU
> > > 
> > >  config SUN8I_DE2_CCU
> > >  
> > >  	bool "Support for the Allwinner SoCs DE2 CCU"
> > > 
> > > +	default MACH_SUN8I || (ARM64 && ARCH_SUNXI)
> > > +	depends on DRM_SUN4I && (MACH_SUN8I || (ARM64 && ARCH_SUNXI))
> > 
> > I don't see why there's a dependency on the DRM driver. I'm pretty
> > sure this would even break simplefb.
> 
> I think best approach would be that SUN8I_MIXER selects (or depends on?) this 
> symbol, since it can't work if there is no DE2 CCU clock present.

This is a runtime dependency, not a build time one. We're not doing it
for any other similar driver, so there's no reason to do it in this
particular case.

Maxime
diff mbox series

Patch

diff --git a/drivers/clk/sunxi-ng/Kconfig b/drivers/clk/sunxi-ng/Kconfig
index 826674d090fd..e20182aa9748 100644
--- a/drivers/clk/sunxi-ng/Kconfig
+++ b/drivers/clk/sunxi-ng/Kconfig
@@ -63,6 +63,8 @@  config SUN8I_V3S_CCU
 
 config SUN8I_DE2_CCU
 	bool "Support for the Allwinner SoCs DE2 CCU"
+	default MACH_SUN8I || (ARM64 && ARCH_SUNXI)
+	depends on DRM_SUN4I && (MACH_SUN8I || (ARM64 && ARCH_SUNXI))
 
 config SUN8I_R40_CCU
 	bool "Support for the Allwinner R40 CCU"