Add X86 and SPI_MEM as dependencies for the spi_amd driver to ensure it is
built only on relevant platforms and with the required SPI memory
framework.
Co-developed-by: Akshata MukundShetty <akshata.mukundshetty@amd.com>
Signed-off-by: Akshata MukundShetty <akshata.mukundshetty@amd.com>
Signed-off-by: Raju Rangoju <Raju.Rangoju@amd.com>
---
drivers/spi/Kconfig | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig
index b03a7005f1bd..c51da3fc3604 100644
--- a/drivers/spi/Kconfig
+++ b/drivers/spi/Kconfig
@@ -1267,7 +1267,8 @@ config SPI_ZYNQMP_GQSPI
config SPI_AMD
tristate "AMD SPI controller"
depends on PCI
- depends on SPI_MASTER || COMPILE_TEST
+ depends on SPI_MASTER || X86 || COMPILE_TEST
+ depends on SPI_MEM
help
Enables SPI controller driver for AMD SoC.
--
2.34.1
Hi Raju,
Thanks for your patch, which is now commit dbb79974193a2932 ("spi:
spi_amd: Update Kconfig dependencies") upstream.
On Fri, 16 May 2025 at 12:09, Raju Rangoju <Raju.Rangoju@amd.com> wrote:
> Add X86 and SPI_MEM as dependencies for the spi_amd driver to ensure it is
> built only on relevant platforms and with the required SPI memory
> framework.
This sounds like you are restricting the driver further (BTW, what are
"relevant platforms"?)...
> Co-developed-by: Akshata MukundShetty <akshata.mukundshetty@amd.com>
> Signed-off-by: Akshata MukundShetty <akshata.mukundshetty@amd.com>
> Signed-off-by: Raju Rangoju <Raju.Rangoju@amd.com>
> --- a/drivers/spi/Kconfig
> +++ b/drivers/spi/Kconfig
> @@ -1267,7 +1267,8 @@ config SPI_ZYNQMP_GQSPI
> config SPI_AMD
> tristate "AMD SPI controller"
> depends on PCI
> - depends on SPI_MASTER || COMPILE_TEST
> + depends on SPI_MASTER || X86 || COMPILE_TEST
... but this broadens it instead?
And how can it be used on X86 if SPI_MASTER=n?
Seeing an ACPI match table in drivers/spi/spi-amd.c, perhaps you wanted
to have a dependency on ACPI (or X86 && ACPI) somewhere?
BTW, as you now have a single Kconfig symbol gating both spi-amd.c
and spi-amd-pci.c, this means you can no longer build spi-amd.c if
CONFIG_PCI=n.
> + depends on SPI_MEM
> help
> Enables SPI controller driver for AMD SoC.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
On 5/28/2025 1:02 PM, Geert Uytterhoeven wrote:
> Hi Raju,
>
> Thanks for your patch, which is now commit dbb79974193a2932 ("spi:
> spi_amd: Update Kconfig dependencies") upstream.
>
> On Fri, 16 May 2025 at 12:09, Raju Rangoju <Raju.Rangoju@amd.com> wrote:
>> Add X86 and SPI_MEM as dependencies for the spi_amd driver to ensure it is
>> built only on relevant platforms and with the required SPI memory
>> framework.
>
> This sounds like you are restricting the driver further (BTW, what are
> "relevant platforms"?)...
AMD x86 platforms.
>
>> Co-developed-by: Akshata MukundShetty <akshata.mukundshetty@amd.com>
>> Signed-off-by: Akshata MukundShetty <akshata.mukundshetty@amd.com>
>> Signed-off-by: Raju Rangoju <Raju.Rangoju@amd.com>
>
>> --- a/drivers/spi/Kconfig
>> +++ b/drivers/spi/Kconfig
>> @@ -1267,7 +1267,8 @@ config SPI_ZYNQMP_GQSPI
>> config SPI_AMD
>> tristate "AMD SPI controller"
>> depends on PCI
>> - depends on SPI_MASTER || COMPILE_TEST
>> + depends on SPI_MASTER || X86 || COMPILE_TEST
>
> ... but this broadens it instead?
> And how can it be used on X86 if SPI_MASTER=n?
>
> Seeing an ACPI match table in drivers/spi/spi-amd.c, perhaps you wanted
> to have a dependency on ACPI (or X86 && ACPI) somewhere?
>
> BTW, as you now have a single Kconfig symbol gating both spi-amd.c
> and spi-amd-pci.c, this means you can no longer build spi-amd.c if
> CONFIG_PCI=n.
Sure Greert. Thanks for the suggestion.
We are planning to have separate Kconfig for both ACPI and PCI based
drivers in the upcoming series.
>
>> + depends on SPI_MEM
>> help
>> Enables SPI controller driver for AMD SoC.
>
> Gr{oetje,eeting}s,
>
> Geert
>
© 2016 - 2025 Red Hat, Inc.