[PATCH 2/2] mci: arasan: fix build for non-ZynqMP
Lucas Stach
l.stach at pengutronix.de
Tue Apr 2 01:43:24 PDT 2024
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 at pengutronix.de>
> > > ---
> > > 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.
Regards,
Lucas
> 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
>
More information about the barebox
mailing list