[PATCH v3 1/5] ppc4xx: Move common dependency on serial to common option

BALATON Zoltan via posted 5 patches 5 years, 1 month ago
Maintainers: BALATON Zoltan <balaton@eik.bme.hu>, David Gibson <david@gibson.dropbear.id.au>, Greg Kurz <groug@kaod.org>
There is a newer version of this series
[PATCH v3 1/5] ppc4xx: Move common dependency on serial to common option
Posted by BALATON Zoltan via 5 years, 1 month ago
All machines that select SERIAL also select PPC4XX so we can just add
this common dependency there once.

Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
---
 hw/ppc/Kconfig | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/hw/ppc/Kconfig b/hw/ppc/Kconfig
index dd86e664d2..8548f42b0d 100644
--- a/hw/ppc/Kconfig
+++ b/hw/ppc/Kconfig
@@ -37,7 +37,6 @@ config PPC405
     select M48T59
     select PFLASH_CFI02
     select PPC4XX
-    select SERIAL
 
 config PPC440
     bool
@@ -46,13 +45,13 @@ config PPC440
     imply E1000_PCI
     select PCI_EXPRESS
     select PPC4XX
-    select SERIAL
     select FDT_PPC
 
 config PPC4XX
     bool
     select BITBANG_I2C
     select PCI
+    select SERIAL
 
 config SAM460EX
     bool
@@ -61,7 +60,6 @@ config SAM460EX
     select IDE_SII3112
     select M41T80
     select PPC440
-    select SERIAL
     select SM501
     select SMBUS_EEPROM
     select USB_EHCI_SYSBUS
@@ -123,7 +121,6 @@ config VIRTEX
     bool
     select PPC4XX
     select PFLASH_CFI01
-    select SERIAL
     select XILINX
     select XILINX_ETHLITE
     select FDT_PPC
-- 
2.21.3


Re: [PATCH v3 1/5] ppc4xx: Move common dependency on serial to common option
Posted by Thomas Huth 5 years, 1 month ago
On 03/01/2021 02.09, BALATON Zoltan via wrote:
> All machines that select SERIAL also select PPC4XX so we can just add
> this common dependency there once.
> 
> Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
> ---
>   hw/ppc/Kconfig | 5 +----
>   1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/hw/ppc/Kconfig b/hw/ppc/Kconfig
> index dd86e664d2..8548f42b0d 100644
> --- a/hw/ppc/Kconfig
> +++ b/hw/ppc/Kconfig
> @@ -37,7 +37,6 @@ config PPC405
>       select M48T59
>       select PFLASH_CFI02
>       select PPC4XX
> -    select SERIAL
>   
>   config PPC440
>       bool
> @@ -46,13 +45,13 @@ config PPC440
>       imply E1000_PCI
>       select PCI_EXPRESS
>       select PPC4XX
> -    select SERIAL
>       select FDT_PPC
>   
>   config PPC4XX
>       bool
>       select BITBANG_I2C
>       select PCI
> +    select SERIAL

Not sure whether this is really the right way to go... serial_hd() and 
serial_mm_init() are only used in ppc405_uc.c
and ppc440_bamboo.c, so IMHO it does make sense to keep the SERIAL setting 
with PPC405 and PPC440.


>   config SAM460EX
>       bool
> @@ -61,7 +60,6 @@ config SAM460EX
>       select IDE_SII3112
>       select M41T80
>       select PPC440
> -    select SERIAL

But this hunk here should be fine, I think, since PPC440 already includes 
the SERIAL switch.

  Thomas


>       select SM501
>       select SMBUS_EEPROM
>       select USB_EHCI_SYSBUS
> @@ -123,7 +121,6 @@ config VIRTEX
>       bool
>       select PPC4XX
>       select PFLASH_CFI01
> -    select SERIAL
>       select XILINX
>       select XILINX_ETHLITE
>       select FDT_PPC
> 


Re: [PATCH v3 1/5] ppc4xx: Move common dependency on serial to common option
Posted by BALATON Zoltan via 5 years, 1 month ago
On Sun, 3 Jan 2021, Thomas Huth wrote:
> On 03/01/2021 02.09, BALATON Zoltan via wrote:
>> All machines that select SERIAL also select PPC4XX so we can just add
>> this common dependency there once.
>> 
>> Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
>> ---
>>   hw/ppc/Kconfig | 5 +----
>>   1 file changed, 1 insertion(+), 4 deletions(-)
>> 
>> diff --git a/hw/ppc/Kconfig b/hw/ppc/Kconfig
>> index dd86e664d2..8548f42b0d 100644
>> --- a/hw/ppc/Kconfig
>> +++ b/hw/ppc/Kconfig
>> @@ -37,7 +37,6 @@ config PPC405
>>       select M48T59
>>       select PFLASH_CFI02
>>       select PPC4XX
>> -    select SERIAL
>>     config PPC440
>>       bool
>> @@ -46,13 +45,13 @@ config PPC440
>>       imply E1000_PCI
>>       select PCI_EXPRESS
>>       select PPC4XX
>> -    select SERIAL
>>       select FDT_PPC
>>     config PPC4XX
>>       bool
>>       select BITBANG_I2C
>>       select PCI
>> +    select SERIAL
>
> Not sure whether this is really the right way to go... serial_hd() and 
> serial_mm_init() are only used in ppc405_uc.c
> and ppc440_bamboo.c, so IMHO it does make sense to keep the SERIAL setting 
> with PPC405 and PPC440.
>
>
>>   config SAM460EX
>>       bool
>> @@ -61,7 +60,6 @@ config SAM460EX
>>       select IDE_SII3112
>>       select M41T80
>>       select PPC440
>> -    select SERIAL
>
> But this hunk here should be fine, I think, since PPC440 already includes the 
> SERIAL switch.

If it's OK in this case why doesn't the same argument apply in case of 
PPC440 including PPC4XX which then includes SERIAL. All these boards use 
serial_mm_init but they also all include PPC4XX either directly or 
indirectly via an intermeriate option such as PPC440 or PPC405.

Regards,
BALATON Zoltan

> Thomas
>
>
>>       select SM501
>>       select SMBUS_EEPROM
>>       select USB_EHCI_SYSBUS
>> @@ -123,7 +121,6 @@ config VIRTEX
>>       bool
>>       select PPC4XX
>>       select PFLASH_CFI01
>> -    select SERIAL
>>       select XILINX
>>       select XILINX_ETHLITE
>>       select FDT_PPC
>> 
>
>

Re: [PATCH v3 1/5] ppc4xx: Move common dependency on serial to common option
Posted by Thomas Huth 5 years, 1 month ago
On 04/01/2021 02.39, BALATON Zoltan via wrote:
> On Sun, 3 Jan 2021, Thomas Huth wrote:
>> On 03/01/2021 02.09, BALATON Zoltan via wrote:
>>> All machines that select SERIAL also select PPC4XX so we can just add
>>> this common dependency there once.
>>>
>>> Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
>>> ---
>>>   hw/ppc/Kconfig | 5 +----
>>>   1 file changed, 1 insertion(+), 4 deletions(-)
>>>
>>> diff --git a/hw/ppc/Kconfig b/hw/ppc/Kconfig
>>> index dd86e664d2..8548f42b0d 100644
>>> --- a/hw/ppc/Kconfig
>>> +++ b/hw/ppc/Kconfig
>>> @@ -37,7 +37,6 @@ config PPC405
>>>       select M48T59
>>>       select PFLASH_CFI02
>>>       select PPC4XX
>>> -    select SERIAL
>>>     config PPC440
>>>       bool
>>> @@ -46,13 +45,13 @@ config PPC440
>>>       imply E1000_PCI
>>>       select PCI_EXPRESS
>>>       select PPC4XX
>>> -    select SERIAL
>>>       select FDT_PPC
>>>     config PPC4XX
>>>       bool
>>>       select BITBANG_I2C
>>>       select PCI
>>> +    select SERIAL
>>
>> Not sure whether this is really the right way to go... serial_hd() and 
>> serial_mm_init() are only used in ppc405_uc.c
>> and ppc440_bamboo.c, so IMHO it does make sense to keep the SERIAL setting 
>> with PPC405 and PPC440.
>>
>>
>>>   config SAM460EX
>>>       bool
>>> @@ -61,7 +60,6 @@ config SAM460EX
>>>       select IDE_SII3112
>>>       select M41T80
>>>       select PPC440
>>> -    select SERIAL
>>
>> But this hunk here should be fine, I think, since PPC440 already includes 
>> the SERIAL switch.
> 
> If it's OK in this case why doesn't the same argument apply in case of 
> PPC440 including PPC4XX which then includes SERIAL. All these boards use 
> serial_mm_init but they also all include PPC4XX either directly or 
> indirectly via an intermeriate option such as PPC440 or PPC405.

Yeah, it's likely cleaner if you keep the "select SERIAL" here, too, since 
sam460ex.c uses serial_hd() and serial_mm_init() directly, too.

I guess we should rather have a separate switch for the bamboo board, and 
then move the "select SERIAL" from the PPC440 section into the BAMBOO section...

  Thomas