diff mbox series

[015/171] iommu: Add a Kconfig for SPL_IOMMU

Message ID 20230130144324.206208-16-sjg@chromium.org
State Changes Requested
Headers show
Series Kconfig: More cleanup of CONFIG options | expand

Commit Message

Simon Glass Jan. 30, 2023, 2:40 p.m. UTC
This is implicitly used in the source and seems useful, so add it.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 drivers/iommu/Kconfig | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Mark Kettenis Jan. 30, 2023, 4:23 p.m. UTC | #1
> From: Simon Glass <sjg@chromium.org>
> Date: Mon, 30 Jan 2023 07:40:48 -0700
> 
> This is implicitly used in the source and seems useful, so add it.

At this point the IOMMU support isn't used for SPL.  While I can't
rule out we'll see an SoC at some point the needs it, I don't think
I've seen an SoC that has devices that are typically used in SPL (MMC,
NOR flash, memory controllers) behind an IOMMU.  So switching to
IS_ENABLED(CONFIG_IOMMU) seems more logical to me.

Cheers,

Mark

> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
> 
>  drivers/iommu/Kconfig | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/iommu/Kconfig b/drivers/iommu/Kconfig
> index dabc1f900d5..bbacd14a56c 100644
> --- a/drivers/iommu/Kconfig
> +++ b/drivers/iommu/Kconfig
> @@ -14,6 +14,10 @@ config IOMMU
>  	  memory if the IOMMU has been programmed to allow access to
>  	  that memory.
>  
> +config SPL_IOMMU
> +	def_bool n  # Enable Driver Model for IOMMU drivers (SPL)
> +	depends on SPL_DM
> +
>  config APPLE_DART
>  	bool "Apple DART support"
>  	depends on IOMMU && ARCH_APPLE
> -- 
> 2.39.1.456.gfc5497dd1b-goog
> 
>
Simon Glass Feb. 5, 2023, 1:21 a.m. UTC | #2
Hi Mark,

On Mon, 30 Jan 2023 at 09:24, Mark Kettenis <mark.kettenis@xs4all.nl> wrote:
>
> > From: Simon Glass <sjg@chromium.org>
> > Date: Mon, 30 Jan 2023 07:40:48 -0700
> >
> > This is implicitly used in the source and seems useful, so add it.
>
> At this point the IOMMU support isn't used for SPL.  While I can't
> rule out we'll see an SoC at some point the needs it, I don't think
> I've seen an SoC that has devices that are typically used in SPL (MMC,
> NOR flash, memory controllers) behind an IOMMU.  So switching to
> IS_ENABLED(CONFIG_IOMMU) seems more logical to me.

That's actually not the issue here. If we need an option enabled in
U-Boot proper, but not in SPL, then we need to have an SPL option.
Otherwise it gets enabled in both.

If it were OK to have the feature in SPL always for all boards, we
would not need this.

Regards,
Simon
diff mbox series

Patch

diff --git a/drivers/iommu/Kconfig b/drivers/iommu/Kconfig
index dabc1f900d5..bbacd14a56c 100644
--- a/drivers/iommu/Kconfig
+++ b/drivers/iommu/Kconfig
@@ -14,6 +14,10 @@  config IOMMU
 	  memory if the IOMMU has been programmed to allow access to
 	  that memory.
 
+config SPL_IOMMU
+	def_bool n  # Enable Driver Model for IOMMU drivers (SPL)
+	depends on SPL_DM
+
 config APPLE_DART
 	bool "Apple DART support"
 	depends on IOMMU && ARCH_APPLE