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, 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.

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.

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