Re: [PATCH 2/2] mci: arasan: fix build for non-ZynqMP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Apr 02, 2024 at 10:43:24AM +0200, Lucas Stach wrote:
> Am Dienstag, dem 02.04.2024 um 10:33 +0200 schrieb Sascha Hauer:
> > On Tue, Mar 26, 2024 at 01:34:49PM +0100, Sascha Hauer wrote:
> > > On Tue, Mar 26, 2024 at 12:50:42PM +0100, Steffen Trumtrar wrote:
> > > > Registering sdclk only makes sense on the ZynqMP architecture. Guard
> > > > calling the function with a IS_ENABLED()
> > > > 
> > > > Signed-off-by: Steffen Trumtrar <s.trumtrar@xxxxxxxxxxxxxx>
> > > > ---
> > > >  drivers/mci/arasan-sdhci.c | 3 ++-
> > > >  1 file changed, 2 insertions(+), 1 deletion(-)
> > > > 
> > > > diff --git a/drivers/mci/arasan-sdhci.c b/drivers/mci/arasan-sdhci.c
> > > > index f01396d7ee..b7dd98049f 100644
> > > > --- a/drivers/mci/arasan-sdhci.c
> > > > +++ b/drivers/mci/arasan-sdhci.c
> > > > @@ -772,7 +772,8 @@ static int arasan_sdhci_probe(struct device *dev)
> > > >  
> > > >  	mci->f_min = 50000000 / 256;
> > > >  
> > > > -	arasan_sdhci_register_sdclk(&arasan_sdhci->clk_data, clk_xin, dev);
> > > > +	if (IS_ENABLED(CONFIG_ARCH_ZYNQMP))
> > > > +		arasan_sdhci_register_sdclk(&arasan_sdhci->clk_data, clk_xin, dev);
> > > 
> > > CONFIG_ARCH_ZYNQMP being enabled doesn't necessarily mean the code
> > > actually runs on Zynqmp. Does this need a runtime check for other
> > > architectures?
> > 
> > The arasan MMC driver is currently only used on ZynqMP, so it's OK for
> > now.
> > 
> That's not true. The driver is also used on the Zynq7000.

You're right. I didn't remember we have support for that in barebox as
well. In this case this note becomes relevant:

> 
> > In Linux the driver the ZynqMP specifics are only used with the "xlnx,zynqmp-8.9a"
> > compatible whereas our driver binds to the "arasan,sdhci-8.9a"
> > compatible. This makes it more clear that this is really a ZynqMP
> > specific path that is taken here.

We have to put the ZynqMP specific stuff behind the "xlnx,zynqmp-8.9a"
compatible to make sure Zynq7000 doesn't take this path.

Sascha

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |




[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux