diff mbox series

[v2,02/25] hw/arm: Express dependencies of the highbank machines with Kconfig

Message ID 1550047098-1210-3-git-send-email-thuth@redhat.com
State New
Headers show
Series Kconfig dependencies for ARM machines | expand

Commit Message

Thomas Huth Feb. 13, 2019, 8:37 a.m. UTC
Add Kconfig dependencies for the highbank machine (and the midway
machine).
This patch is slightly based on earlier work by Ákos Kovács (i.e.
his "hw/arm/Kconfig: Add ARM Kconfig" patch).

Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 default-configs/arm-softmmu.mak |  4 +---
 hw/arm/Kconfig                  | 12 ++++++++++++
 2 files changed, 13 insertions(+), 3 deletions(-)

Comments

Peter Maydell Feb. 14, 2019, 7:17 p.m. UTC | #1
On Wed, 13 Feb 2019 at 08:38, Thomas Huth <thuth@redhat.com> wrote:
>
> Add Kconfig dependencies for the highbank machine (and the midway
> machine).
> This patch is slightly based on earlier work by Ákos Kovács (i.e.
> his "hw/arm/Kconfig: Add ARM Kconfig" patch).
>
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
>  default-configs/arm-softmmu.mak |  4 +---
>  hw/arm/Kconfig                  | 12 ++++++++++++
>  2 files changed, 13 insertions(+), 3 deletions(-)
>
> diff --git a/default-configs/arm-softmmu.mak b/default-configs/arm-softmmu.mak
> index 3baafc4..59734ee 100644
> --- a/default-configs/arm-softmmu.mak
> +++ b/default-configs/arm-softmmu.mak
> @@ -6,6 +6,7 @@ CONFIG_ARM_V7M=y
>  CONFIG_PCI_DEVICES=y
>
>  CONFIG_EXYNOS4=y
> +CONFIG_HIGHBANK=y
>
>  CONFIG_VGA=y
>  CONFIG_NAND=y
> @@ -54,14 +55,12 @@ CONFIG_PL022=y
>  CONFIG_PL031=y
>  CONFIG_PL041=y
>  CONFIG_PL050=y
> -CONFIG_PL061=y
>  CONFIG_PL080=y
>  CONFIG_PL110=y
>  CONFIG_PL181=y
>  CONFIG_PL190=y
>  CONFIG_PL330=y
>  CONFIG_CADENCE=y
> -CONFIG_XGMAC=y

Could you explain the logic for when CONFIG_*=y
lines get deleted from the arm-softmmu.mak?
In this patch PL061 has been deleted, but PL011,
PL022, PL031 have not, though all these devices are
used in both Highbank and in other not-yet-converted
machine types. What's the difference ?

thanks
-- PMM
Paolo Bonzini Feb. 14, 2019, 8:35 p.m. UTC | #2
On 14/02/19 20:17, Peter Maydell wrote:
> On Wed, 13 Feb 2019 at 08:38, Thomas Huth <thuth@redhat.com> wrote:
>>
>> Add Kconfig dependencies for the highbank machine (and the midway
>> machine).
>> This patch is slightly based on earlier work by Ákos Kovács (i.e.
>> his "hw/arm/Kconfig: Add ARM Kconfig" patch).
>>
>> Signed-off-by: Thomas Huth <thuth@redhat.com>
>> ---
>>  default-configs/arm-softmmu.mak |  4 +---
>>  hw/arm/Kconfig                  | 12 ++++++++++++
>>  2 files changed, 13 insertions(+), 3 deletions(-)
>>
>> diff --git a/default-configs/arm-softmmu.mak b/default-configs/arm-softmmu.mak
>> index 3baafc4..59734ee 100644
>> --- a/default-configs/arm-softmmu.mak
>> +++ b/default-configs/arm-softmmu.mak
>> @@ -6,6 +6,7 @@ CONFIG_ARM_V7M=y
>>  CONFIG_PCI_DEVICES=y
>>
>>  CONFIG_EXYNOS4=y
>> +CONFIG_HIGHBANK=y
>>
>>  CONFIG_VGA=y
>>  CONFIG_NAND=y
>> @@ -54,14 +55,12 @@ CONFIG_PL022=y
>>  CONFIG_PL031=y
>>  CONFIG_PL041=y
>>  CONFIG_PL050=y
>> -CONFIG_PL061=y
>>  CONFIG_PL080=y
>>  CONFIG_PL110=y
>>  CONFIG_PL181=y
>>  CONFIG_PL190=y
>>  CONFIG_PL330=y
>>  CONFIG_CADENCE=y
>> -CONFIG_XGMAC=y
> 
> Could you explain the logic for when CONFIG_*=y
> lines get deleted from the arm-softmmu.mak?
> In this patch PL061 has been deleted, but PL011,
> PL022, PL031 have not, though all these devices are
> used in both Highbank and in other not-yet-converted
> machine types. What's the difference ?

I think it's a mistake.  I'd not remove any CONFIG_*=y except in a final
separate patch.

Paolo
Thomas Huth Feb. 15, 2019, 12:15 p.m. UTC | #3
On 14/02/2019 21.35, Paolo Bonzini wrote:
> On 14/02/19 20:17, Peter Maydell wrote:
>> On Wed, 13 Feb 2019 at 08:38, Thomas Huth <thuth@redhat.com> wrote:
>>>
>>> Add Kconfig dependencies for the highbank machine (and the midway
>>> machine).
>>> This patch is slightly based on earlier work by Ákos Kovács (i.e.
>>> his "hw/arm/Kconfig: Add ARM Kconfig" patch).
>>>
>>> Signed-off-by: Thomas Huth <thuth@redhat.com>
>>> ---
>>>  default-configs/arm-softmmu.mak |  4 +---
>>>  hw/arm/Kconfig                  | 12 ++++++++++++
>>>  2 files changed, 13 insertions(+), 3 deletions(-)
>>>
>>> diff --git a/default-configs/arm-softmmu.mak b/default-configs/arm-softmmu.mak
>>> index 3baafc4..59734ee 100644
>>> --- a/default-configs/arm-softmmu.mak
>>> +++ b/default-configs/arm-softmmu.mak
>>> @@ -6,6 +6,7 @@ CONFIG_ARM_V7M=y
>>>  CONFIG_PCI_DEVICES=y
>>>
>>>  CONFIG_EXYNOS4=y
>>> +CONFIG_HIGHBANK=y
>>>
>>>  CONFIG_VGA=y
>>>  CONFIG_NAND=y
>>> @@ -54,14 +55,12 @@ CONFIG_PL022=y
>>>  CONFIG_PL031=y
>>>  CONFIG_PL041=y
>>>  CONFIG_PL050=y
>>> -CONFIG_PL061=y
>>>  CONFIG_PL080=y
>>>  CONFIG_PL110=y
>>>  CONFIG_PL181=y
>>>  CONFIG_PL190=y
>>>  CONFIG_PL330=y
>>>  CONFIG_CADENCE=y
>>> -CONFIG_XGMAC=y
>>
>> Could you explain the logic for when CONFIG_*=y
>> lines get deleted from the arm-softmmu.mak?
>> In this patch PL061 has been deleted, but PL011,
>> PL022, PL031 have not, though all these devices are
>> used in both Highbank and in other not-yet-converted
>> machine types. What's the difference ?

My plan was indeed to remove the switches from the default-configs file
as soon as they are enabled in the Kconfig file. Looks like I missed
these here in this patch, sorry!

(but unless there are other reasons for respinning, I think it should
also be OK if the switches get removed in later patches instead)

> I think it's a mistake.  I'd not remove any CONFIG_*=y except in a final
> separate patch.

Really? In that case it's way harder to see which options from the
default-configs are really handled in the Kconfig files - and there's a
risk that some options would get removed that are not enabled in any of
the preceeding Kconfig patches. So I think it's better this way, bit by bit.

 Thomas
Philippe Mathieu-Daudé Feb. 23, 2019, 10:56 a.m. UTC | #4
On 2/15/19 1:15 PM, Thomas Huth wrote:
> On 14/02/2019 21.35, Paolo Bonzini wrote:
>> On 14/02/19 20:17, Peter Maydell wrote:
>>> On Wed, 13 Feb 2019 at 08:38, Thomas Huth <thuth@redhat.com> wrote:
>>>>
>>>> Add Kconfig dependencies for the highbank machine (and the midway
>>>> machine).
>>>> This patch is slightly based on earlier work by Ákos Kovács (i.e.
>>>> his "hw/arm/Kconfig: Add ARM Kconfig" patch).
>>>>
>>>> Signed-off-by: Thomas Huth <thuth@redhat.com>
>>>> ---
>>>>  default-configs/arm-softmmu.mak |  4 +---
>>>>  hw/arm/Kconfig                  | 12 ++++++++++++
>>>>  2 files changed, 13 insertions(+), 3 deletions(-)
>>>>
>>>> diff --git a/default-configs/arm-softmmu.mak b/default-configs/arm-softmmu.mak
>>>> index 3baafc4..59734ee 100644
>>>> --- a/default-configs/arm-softmmu.mak
>>>> +++ b/default-configs/arm-softmmu.mak
>>>> @@ -6,6 +6,7 @@ CONFIG_ARM_V7M=y
>>>>  CONFIG_PCI_DEVICES=y
>>>>
>>>>  CONFIG_EXYNOS4=y
>>>> +CONFIG_HIGHBANK=y
>>>>
>>>>  CONFIG_VGA=y
>>>>  CONFIG_NAND=y
>>>> @@ -54,14 +55,12 @@ CONFIG_PL022=y
>>>>  CONFIG_PL031=y
>>>>  CONFIG_PL041=y
>>>>  CONFIG_PL050=y
>>>> -CONFIG_PL061=y
>>>>  CONFIG_PL080=y
>>>>  CONFIG_PL110=y
>>>>  CONFIG_PL181=y
>>>>  CONFIG_PL190=y
>>>>  CONFIG_PL330=y
>>>>  CONFIG_CADENCE=y
>>>> -CONFIG_XGMAC=y
>>>
>>> Could you explain the logic for when CONFIG_*=y
>>> lines get deleted from the arm-softmmu.mak?
>>> In this patch PL061 has been deleted, but PL011,
>>> PL022, PL031 have not, though all these devices are
>>> used in both Highbank and in other not-yet-converted
>>> machine types. What's the difference ?
> 
> My plan was indeed to remove the switches from the default-configs file
> as soon as they are enabled in the Kconfig file. Looks like I missed
> these here in this patch, sorry!
> 
> (but unless there are other reasons for respinning, I think it should
> also be OK if the switches get removed in later patches instead)
> 
>> I think it's a mistake.  I'd not remove any CONFIG_*=y except in a final
>> separate patch.
> 
> Really? In that case it's way harder to see which options from the
> default-configs are really handled in the Kconfig files - and there's a
> risk that some options would get removed that are not enabled in any of
> the preceeding Kconfig patches. So I think it's better this way, bit by bit.

Agreed. This way you can build/test at each step.
diff mbox series

Patch

diff --git a/default-configs/arm-softmmu.mak b/default-configs/arm-softmmu.mak
index 3baafc4..59734ee 100644
--- a/default-configs/arm-softmmu.mak
+++ b/default-configs/arm-softmmu.mak
@@ -6,6 +6,7 @@  CONFIG_ARM_V7M=y
 CONFIG_PCI_DEVICES=y
 
 CONFIG_EXYNOS4=y
+CONFIG_HIGHBANK=y
 
 CONFIG_VGA=y
 CONFIG_NAND=y
@@ -54,14 +55,12 @@  CONFIG_PL022=y
 CONFIG_PL031=y
 CONFIG_PL041=y
 CONFIG_PL050=y
-CONFIG_PL061=y
 CONFIG_PL080=y
 CONFIG_PL110=y
 CONFIG_PL181=y
 CONFIG_PL190=y
 CONFIG_PL330=y
 CONFIG_CADENCE=y
-CONFIG_XGMAC=y
 CONFIG_PXA2XX=y
 CONFIG_BITBANG_I2C=y
 CONFIG_FRAMEBUFFER=y
@@ -151,7 +150,6 @@  CONFIG_XILINX_AXI=y
 CONFIG_PCI_EXPRESS_DESIGNWARE=y
 
 CONFIG_STRONGARM=y
-CONFIG_HIGHBANK=y
 CONFIG_MUSICPAL=y
 
 # for realview and versatilepb
diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig
index 2850000..984de8a 100644
--- a/hw/arm/Kconfig
+++ b/hw/arm/Kconfig
@@ -18,6 +18,18 @@  config EXYNOS4
 
 config HIGHBANK
     bool
+    select A9MPCORE
+    select A15MPCORE
+    select AHCI
+    select ARM_TIMER # sp804
+    select ARM_V7M
+    select PCI
+    select PL011 # UART
+    select PL022 # Serial port
+    select PL031 # RTC
+    select PL061 # GPIO
+    select PL310 # cache controller
+    select XGMAC # ethernet
 
 config INTEGRATOR
     bool