diff mbox series

PCI: imx6: Simplify Kconfig depends on

Message ID e3fd8e88a22468be8bd8fce85dafcc14f2e6a618.1552330407.git.leonard.crestez@nxp.com (mailing list archive)
State New, archived
Delegated to: Bjorn Helgaas
Headers show
Series PCI: imx6: Simplify Kconfig depends on | expand

Commit Message

Leonard Crestez March 11, 2019, 6:59 p.m. UTC
In theory this driver can be used on imx6sx without enabling support for
imx6q or imx7d but the "depends on" condition doesn't allow that.

Instead of making the condition even longer just make it depend on
"ARCH_MXC || COMPILE_TEST" instead.

Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
---
 drivers/pci/controller/dwc/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Lorenzo Pieralisi March 26, 2019, 6:19 p.m. UTC | #1
On Mon, Mar 11, 2019 at 06:59:28PM +0000, Leonard Crestez wrote:
> In theory this driver can be used on imx6sx without enabling support for
> imx6q or imx7d but the "depends on" condition doesn't allow that.
> 
> Instead of making the condition even longer just make it depend on
> "ARCH_MXC || COMPILE_TEST" instead.
> 
> Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
> ---
>  drivers/pci/controller/dwc/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/pci/controller/dwc/Kconfig b/drivers/pci/controller/dwc/Kconfig
> index 6ea74b1c0d94..21747fd0e799 100644
> --- a/drivers/pci/controller/dwc/Kconfig
> +++ b/drivers/pci/controller/dwc/Kconfig
> @@ -88,11 +88,11 @@ config PCI_EXYNOS
>  	depends on PCI_MSI_IRQ_DOMAIN
>  	select PCIE_DW_HOST
>  
>  config PCI_IMX6
>  	bool "Freescale i.MX6/7/8 PCIe controller"
> -	depends on SOC_IMX6Q || SOC_IMX7D || (ARM64 && ARCH_MXC) || COMPILE_TEST
> +	depends on ARCH_MXC || COMPILE_TEST
>  	depends on PCI_MSI_IRQ_DOMAIN
>  	select PCIE_DW_HOST

If Lucas does not spot any problem with this patch I would request his
ACK to merge it, thanks.

Lorenzo
Leonard Crestez April 12, 2019, 5:56 p.m. UTC | #2
On 3/26/19 8:19 PM, Lorenzo Pieralisi wrote:
> On Mon, Mar 11, 2019 at 06:59:28PM +0000, Leonard Crestez wrote:
>> In theory this driver can be used on imx6sx without enabling support for
>> imx6q or imx7d but the "depends on" condition doesn't allow that.
>>
>> Instead of making the condition even longer just make it depend on
>> "ARCH_MXC || COMPILE_TEST" instead.
>>
>> Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
>> ---
>>   drivers/pci/controller/dwc/Kconfig | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/pci/controller/dwc/Kconfig b/drivers/pci/controller/dwc/Kconfig
>> index 6ea74b1c0d94..21747fd0e799 100644
>> --- a/drivers/pci/controller/dwc/Kconfig
>> +++ b/drivers/pci/controller/dwc/Kconfig
>> @@ -88,11 +88,11 @@ config PCI_EXYNOS
>>   	depends on PCI_MSI_IRQ_DOMAIN
>>   	select PCIE_DW_HOST
>>   
>>   config PCI_IMX6
>>   	bool "Freescale i.MX6/7/8 PCIe controller"
>> -	depends on SOC_IMX6Q || SOC_IMX7D || (ARM64 && ARCH_MXC) || COMPILE_TEST
>> +	depends on ARCH_MXC || COMPILE_TEST
>>   	depends on PCI_MSI_IRQ_DOMAIN
>>   	select PCIE_DW_HOST
> 
> If Lucas does not spot any problem with this patch I would request his
> ACK to merge it, thanks.

Lucas: Can you please ack this? It's a bit old but applies cleanly and 
resend shouldn't be required.

--
Regards,
Leonard
Trent Piepho April 12, 2019, 6:03 p.m. UTC | #3
On Fri, 2019-04-12 at 17:56 +0000, Leonard Crestez wrote:
> On 3/26/19 8:19 PM, Lorenzo Pieralisi wrote:
> > On Mon, Mar 11, 2019 at 06:59:28PM +0000, Leonard Crestez wrote:
> > > In theory this driver can be used on imx6sx without enabling support for
> > > imx6q or imx7d but the "depends on" condition doesn't allow that.
> > > 
> > > Instead of making the condition even longer just make it depend on
> > > "ARCH_MXC || COMPILE_TEST" instead.
> > > 
> > > Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
> > > ---
> > >   drivers/pci/controller/dwc/Kconfig | 2 +-
> > >   1 file changed, 1 insertion(+), 1 deletion(-)
> > > 
> > > diff --git a/drivers/pci/controller/dwc/Kconfig b/drivers/pci/controller/dwc/Kconfig
> > > index 6ea74b1c0d94..21747fd0e799 100644
> > > --- a/drivers/pci/controller/dwc/Kconfig
> > > +++ b/drivers/pci/controller/dwc/Kconfig
> > > @@ -88,11 +88,11 @@ config PCI_EXYNOS
> > >   	depends on PCI_MSI_IRQ_DOMAIN
> > >   	select PCIE_DW_HOST
> > >   
> > >   config PCI_IMX6
> > >   	bool "Freescale i.MX6/7/8 PCIe controller"
> > > -	depends on SOC_IMX6Q || SOC_IMX7D || (ARM64 && ARCH_MXC) || COMPILE_TEST
> > > +	depends on ARCH_MXC || COMPILE_TEST
> > >   	depends on PCI_MSI_IRQ_DOMAIN
> > >   	select PCIE_DW_HOST
> > 
> > If Lucas does not spot any problem with this patch I would request his
> > ACK to merge it, thanks.
> 
> Lucas: Can you please ack this? It's a bit old but applies cleanly and 
> resend shouldn't be required.

The IMX7s does not have a PCI-e controller.  The IMX7d does have one,
but not the "s".

Enabling the controller driver on an IMX SoC that doesn't have it is
not exactly the end of the world and having to keep adding new IMX SOCs
to the list here is annoying.  So IMHO, it's ok to make this change
even if the controller is allowed on a superset of the SoCs that have
it.
Leonard Crestez April 12, 2019, 6:20 p.m. UTC | #4
On 4/12/2019 9:03 PM, Trent Piepho wrote:
> On Fri, 2019-04-12 at 17:56 +0000, Leonard Crestez wrote:
>> On 3/26/19 8:19 PM, Lorenzo Pieralisi wrote:
>>> On Mon, Mar 11, 2019 at 06:59:28PM +0000, Leonard Crestez wrote:
>>>> In theory this driver can be used on imx6sx without enabling support for
>>>> imx6q or imx7d but the "depends on" condition doesn't allow that.
>>>>
>>>> Instead of making the condition even longer just make it depend on
>>>> "ARCH_MXC || COMPILE_TEST" instead.
>>>>
>>>> Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
>>>> ---
>>>>    drivers/pci/controller/dwc/Kconfig | 2 +-
>>>>    1 file changed, 1 insertion(+), 1 deletion(-)
>>>>
>>>> diff --git a/drivers/pci/controller/dwc/Kconfig b/drivers/pci/controller/dwc/Kconfig
>>>> index 6ea74b1c0d94..21747fd0e799 100644
>>>> --- a/drivers/pci/controller/dwc/Kconfig
>>>> +++ b/drivers/pci/controller/dwc/Kconfig
>>>> @@ -88,11 +88,11 @@ config PCI_EXYNOS
>>>>            depends on PCI_MSI_IRQ_DOMAIN
>>>>            select PCIE_DW_HOST
>>>>
>>>>    config PCI_IMX6
>>>>            bool "Freescale i.MX6/7/8 PCIe controller"
>>>> - depends on SOC_IMX6Q || SOC_IMX7D || (ARM64 && ARCH_MXC) || COMPILE_TEST
>>>> + depends on ARCH_MXC || COMPILE_TEST
>>>>            depends on PCI_MSI_IRQ_DOMAIN
>>>>            select PCIE_DW_HOST
>>>
>>> If Lucas does not spot any problem with this patch I would request his
>>> ACK to merge it, thanks.
>>
>> Lucas: Can you please ack this? It's a bit old but applies cleanly and
>> resend shouldn't be required.
> 
> The IMX7s does not have a PCI-e controller.  The IMX7d does have one,
> but not the "s".
> 
> Enabling the controller driver on an IMX SoC that doesn't have it is
> not exactly the end of the world and having to keep adding new IMX SOCs
> to the list here is annoying.  So IMHO, it's ok to make this change
> even if the controller is allowed on a superset of the SoCs that have
> it.

There is no separate config option for IMX7S and I don't think it will 
be ever added. There is however a CONFIG_SOC_IMX6SX.

There were attempts to add "depends on"/"selected by" IMX8MQ to various 
drivers but arm64 maintainers disagreed. This is why this patch fixes 
the "depends on" list for 6sx pcie by dropping per-SOC logic on 32-bit 
arm as well.

People who want very small kernels for their boards will likely fiddle 
with their specific defconfig anyway so maybe complex logic in Kconfig 
is not very helpful.

--
Regards,
Leonard
Lorenzo Pieralisi April 30, 2019, 2:22 p.m. UTC | #5
On Fri, Apr 12, 2019 at 06:20:53PM +0000, Leonard Crestez wrote:
> On 4/12/2019 9:03 PM, Trent Piepho wrote:
> > On Fri, 2019-04-12 at 17:56 +0000, Leonard Crestez wrote:
> >> On 3/26/19 8:19 PM, Lorenzo Pieralisi wrote:
> >>> On Mon, Mar 11, 2019 at 06:59:28PM +0000, Leonard Crestez wrote:
> >>>> In theory this driver can be used on imx6sx without enabling support for
> >>>> imx6q or imx7d but the "depends on" condition doesn't allow that.
> >>>>
> >>>> Instead of making the condition even longer just make it depend on
> >>>> "ARCH_MXC || COMPILE_TEST" instead.
> >>>>
> >>>> Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
> >>>> ---
> >>>>    drivers/pci/controller/dwc/Kconfig | 2 +-
> >>>>    1 file changed, 1 insertion(+), 1 deletion(-)
> >>>>
> >>>> diff --git a/drivers/pci/controller/dwc/Kconfig b/drivers/pci/controller/dwc/Kconfig
> >>>> index 6ea74b1c0d94..21747fd0e799 100644
> >>>> --- a/drivers/pci/controller/dwc/Kconfig
> >>>> +++ b/drivers/pci/controller/dwc/Kconfig
> >>>> @@ -88,11 +88,11 @@ config PCI_EXYNOS
> >>>>            depends on PCI_MSI_IRQ_DOMAIN
> >>>>            select PCIE_DW_HOST
> >>>>
> >>>>    config PCI_IMX6
> >>>>            bool "Freescale i.MX6/7/8 PCIe controller"
> >>>> - depends on SOC_IMX6Q || SOC_IMX7D || (ARM64 && ARCH_MXC) || COMPILE_TEST
> >>>> + depends on ARCH_MXC || COMPILE_TEST
> >>>>            depends on PCI_MSI_IRQ_DOMAIN
> >>>>            select PCIE_DW_HOST
> >>>
> >>> If Lucas does not spot any problem with this patch I would request his
> >>> ACK to merge it, thanks.
> >>
> >> Lucas: Can you please ack this? It's a bit old but applies cleanly and
> >> resend shouldn't be required.
> > 
> > The IMX7s does not have a PCI-e controller.  The IMX7d does have one,
> > but not the "s".
> > 
> > Enabling the controller driver on an IMX SoC that doesn't have it is
> > not exactly the end of the world and having to keep adding new IMX SOCs
> > to the list here is annoying.  So IMHO, it's ok to make this change
> > even if the controller is allowed on a superset of the SoCs that have
> > it.
> 
> There is no separate config option for IMX7S and I don't think it will 
> be ever added. There is however a CONFIG_SOC_IMX6SX.
> 
> There were attempts to add "depends on"/"selected by" IMX8MQ to various 
> drivers but arm64 maintainers disagreed. This is why this patch fixes 
> the "depends on" list for 6sx pcie by dropping per-SOC logic on 32-bit 
> arm as well.
> 
> People who want very small kernels for their boards will likely fiddle 
> with their specific defconfig anyway so maybe complex logic in Kconfig 
> is not very helpful.

My request still stands, please let me know.

Thanks,
Lorenzo
Lucas Stach July 5, 2019, 3:41 p.m. UTC | #6
Am Dienstag, den 30.04.2019, 15:22 +0100 schrieb Lorenzo Pieralisi:
> On Fri, Apr 12, 2019 at 06:20:53PM +0000, Leonard Crestez wrote:
> > On 4/12/2019 9:03 PM, Trent Piepho wrote:
> > > On Fri, 2019-04-12 at 17:56 +0000, Leonard Crestez wrote:
> > > > On 3/26/19 8:19 PM, Lorenzo Pieralisi wrote:
> > > > > On Mon, Mar 11, 2019 at 06:59:28PM +0000, Leonard Crestez wrote:
> > > > > > In theory this driver can be used on imx6sx without enabling support for
> > > > > > imx6q or imx7d but the "depends on" condition doesn't allow that.
> > > > > > 
> > > > > > Instead of making the condition even longer just make it depend on
> > > > > > "ARCH_MXC || COMPILE_TEST" instead.
> > > > > > 
> > > > > > > > > > > > Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
> > > > > > ---
> > > > > >    drivers/pci/controller/dwc/Kconfig | 2 +-
> > > > > >    1 file changed, 1 insertion(+), 1 deletion(-)
> > > > > > 
> > > > > > diff --git a/drivers/pci/controller/dwc/Kconfig b/drivers/pci/controller/dwc/Kconfig
> > > > > > index 6ea74b1c0d94..21747fd0e799 100644
> > > > > > --- a/drivers/pci/controller/dwc/Kconfig
> > > > > > +++ b/drivers/pci/controller/dwc/Kconfig
> > > > > > @@ -88,11 +88,11 @@ config PCI_EXYNOS
> > > > > >            depends on PCI_MSI_IRQ_DOMAIN
> > > > > >            select PCIE_DW_HOST
> > > > > > 
> > > > > >    config PCI_IMX6
> > > > > >            bool "Freescale i.MX6/7/8 PCIe controller"
> > > > > > - depends on SOC_IMX6Q || SOC_IMX7D || (ARM64 && ARCH_MXC) || COMPILE_TEST
> > > > > > + depends on ARCH_MXC || COMPILE_TEST
> > > > > >            depends on PCI_MSI_IRQ_DOMAIN
> > > > > >            select PCIE_DW_HOST
> > > > > 
> > > > > If Lucas does not spot any problem with this patch I would request his
> > > > > ACK to merge it, thanks.
> > > > 
> > > > Lucas: Can you please ack this? It's a bit old but applies cleanly and
> > > > resend shouldn't be required.
> > > 
> > > The IMX7s does not have a PCI-e controller.  The IMX7d does have one,
> > > but not the "s".
> > > 
> > > Enabling the controller driver on an IMX SoC that doesn't have it is
> > > not exactly the end of the world and having to keep adding new IMX SOCs
> > > to the list here is annoying.  So IMHO, it's ok to make this change
> > > even if the controller is allowed on a superset of the SoCs that have
> > > it.
> > 
> > There is no separate config option for IMX7S and I don't think it will 
> > be ever added. There is however a CONFIG_SOC_IMX6SX.
> > 
> > There were attempts to add "depends on"/"selected by" IMX8MQ to various 
> > drivers but arm64 maintainers disagreed. This is why this patch fixes 
> > the "depends on" list for 6sx pcie by dropping per-SOC logic on 32-bit 
> > arm as well.
> > 
> > People who want very small kernels for their boards will likely fiddle 
> > with their specific defconfig anyway so maybe complex logic in Kconfig 
> > is not very helpful.
> 
> My request still stands, please let me know.

I've acked the resend, but that one doesn't show up in patchwork for
some reason, so:

Acked-by: Lucas Stach <l.stach@pengutronix.de>

Regards,
Lucas
Lorenzo Pieralisi July 5, 2019, 3:51 p.m. UTC | #7
On Mon, Mar 11, 2019 at 06:59:28PM +0000, Leonard Crestez wrote:
> In theory this driver can be used on imx6sx without enabling support for
> imx6q or imx7d but the "depends on" condition doesn't allow that.
> 
> Instead of making the condition even longer just make it depend on
> "ARCH_MXC || COMPILE_TEST" instead.
> 
> Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
> ---
>  drivers/pci/controller/dwc/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Applied to pci/dwc for v5.3, thanks.

Lorenzo

> diff --git a/drivers/pci/controller/dwc/Kconfig b/drivers/pci/controller/dwc/Kconfig
> index 6ea74b1c0d94..21747fd0e799 100644
> --- a/drivers/pci/controller/dwc/Kconfig
> +++ b/drivers/pci/controller/dwc/Kconfig
> @@ -88,11 +88,11 @@ config PCI_EXYNOS
>  	depends on PCI_MSI_IRQ_DOMAIN
>  	select PCIE_DW_HOST
>  
>  config PCI_IMX6
>  	bool "Freescale i.MX6/7/8 PCIe controller"
> -	depends on SOC_IMX6Q || SOC_IMX7D || (ARM64 && ARCH_MXC) || COMPILE_TEST
> +	depends on ARCH_MXC || COMPILE_TEST
>  	depends on PCI_MSI_IRQ_DOMAIN
>  	select PCIE_DW_HOST
>  
>  config PCIE_SPEAR13XX
>  	bool "STMicroelectronics SPEAr PCIe controller"
> -- 
> 2.17.1
>
diff mbox series

Patch

diff --git a/drivers/pci/controller/dwc/Kconfig b/drivers/pci/controller/dwc/Kconfig
index 6ea74b1c0d94..21747fd0e799 100644
--- a/drivers/pci/controller/dwc/Kconfig
+++ b/drivers/pci/controller/dwc/Kconfig
@@ -88,11 +88,11 @@  config PCI_EXYNOS
 	depends on PCI_MSI_IRQ_DOMAIN
 	select PCIE_DW_HOST
 
 config PCI_IMX6
 	bool "Freescale i.MX6/7/8 PCIe controller"
-	depends on SOC_IMX6Q || SOC_IMX7D || (ARM64 && ARCH_MXC) || COMPILE_TEST
+	depends on ARCH_MXC || COMPILE_TEST
 	depends on PCI_MSI_IRQ_DOMAIN
 	select PCIE_DW_HOST
 
 config PCIE_SPEAR13XX
 	bool "STMicroelectronics SPEAr PCIe controller"