Kconfig switches for core / misc devices
cover Kconfig switches for core / misc devices
Here are some more Kconfig patches that introduce proper config switches for some devices in the hw/core and hw/misc directories.
Thomas Huth (4):
hw/core: Add a config switch for the "register" device hw/core: Add a config switch for the "or-irq" device hw/core: Add a config switch for the "split-irq" device hw/misc: Add a config switch for the "unimplemented" device
hw/arm/Kconfig | 12 ++++++++++++ hw/core/Kconfig | 9 +++++++++ hw/core/Makefile.objs | 6 +++--- hw/dma/Kconfig | 1 + hw/microblaze/Kconfig | 1 + hw/misc/Kconfig | 3 +++ hw/misc/Makefile.objs | 2 +- hw/pci-host/Kconfig | 3 ++- hw/sparc64/Kconfig | 1 + hw/timer/Kconfig | 1 + 10 files changed, 34 insertions(+), 5 deletions(-)
Signature · 1 line
2.21.0
PATCH 2/4 hw/core: Add a config switch for the "or-irq" device
The "or-irq" device is only used by certain machines. Let's add a proper config switch for it so that it only gets compiled when we really need it.
--- hw/arm/Kconfig | 2 ++ hw/core/Kconfig | 3 +++ hw/core/Makefile.objs | 2 +- hw/pci-host/Kconfig | 3 ++- 4 files changed, 8 insertions(+), 2 deletions(-)
hw/arm/Kconfig +2 -0
@@ -277,6 +277,7 @@ config RASPI config STM32F205_SOC bool select ARM_V7M + select OR_IRQ select STM32F2XX_TIMER select STM32F2XX_USART select STM32F2XX_SYSCFG
@@ -424,6 +425,7 @@ config ARMSSE select IOTKIT_SECCTL select IOTKIT_SYSCTL select IOTKIT_SYSINFO + select OR_IRQ select TZ_MPC select TZ_MSC select TZ_PPC
hw/core/Kconfig +3 -0
@@ -7,6 +7,9 @@ config PTIMER config FITLOADER bool +config OR_IRQ + bool + config PLATFORM_BUS bool
hw/core/Makefile.objs +1 -1
@@ -17,7 +17,7 @@ common-obj-$(CONFIG_SOFTMMU) += loader.o common-obj-$(CONFIG_FITLOADER) += loader-fit.o common-obj-$(CONFIG_SOFTMMU) += qdev-properties-system.o common-obj-$(CONFIG_REGISTER) += register.o -common-obj-$(CONFIG_SOFTMMU) += or-irq.o +common-obj-$(CONFIG_OR_IRQ) += or-irq.o common-obj-$(CONFIG_SOFTMMU) += split-irq.o common-obj-$(CONFIG_PLATFORM_BUS) += platform-bus.o common-obj-$(CONFIG_SOFTMMU) += generic-loader.o
hw/pci-host/Kconfig +2 -1
@@ -2,8 +2,9 @@ config PAM bool config PREP_PCI - select PCI bool + select PCI + select OR_IRQ config GRACKLE_PCI select PCI
Signature · 1 line
2.21.0
PATCH 1/4 hw/core: Add a config switch for the "register" device
In reply to Thomas HuthThe "register" device is only used by certain machines. Let's add a proper config switch for it so that it only gets compiled when we really need it.
--- hw/core/Kconfig | 3 +++ hw/core/Makefile.objs | 2 +- hw/dma/Kconfig | 1 + hw/timer/Kconfig | 1 + 4 files changed, 6 insertions(+), 1 deletion(-)
hw/core/Kconfig +3 -0
@@ -9,3 +9,6 @@ config FITLOADER config PLATFORM_BUS bool + +config REGISTER + bool
hw/core/Makefile.objs +1 -1
@@ -16,7 +16,7 @@ common-obj-$(CONFIG_SOFTMMU) += machine.o common-obj-$(CONFIG_SOFTMMU) += loader.o common-obj-$(CONFIG_FITLOADER) += loader-fit.o common-obj-$(CONFIG_SOFTMMU) += qdev-properties-system.o -common-obj-$(CONFIG_SOFTMMU) += register.o +common-obj-$(CONFIG_REGISTER) += register.o common-obj-$(CONFIG_SOFTMMU) += or-irq.o common-obj-$(CONFIG_SOFTMMU) += split-irq.o common-obj-$(CONFIG_PLATFORM_BUS) += platform-bus.o
hw/dma/Kconfig +1 -0
@@ -16,6 +16,7 @@ config I8257 config ZYNQ_DEVCFG bool + select REGISTER config STP2000 bool
hw/timer/Kconfig +1 -0
@@ -36,6 +36,7 @@ config TWL92230 config XLNX_ZYNQMP bool + select REGISTER config ALTERA_TIMER bool
Signature · 1 line
2.21.0
PATCH 3/4 hw/core: Add a config switch for the "split-irq" device
In reply to Thomas HuthThe "split-irq" device is currently only used by machines that use CONFIG_ARMSSE. Let's add a proper CONFIG_SPLIT_IRQ switch for this so that it only gets compiled when we really need it.
--- hw/arm/Kconfig | 1 + hw/core/Kconfig | 3 +++ hw/core/Makefile.objs | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-)
hw/arm/Kconfig +1 -0
@@ -426,6 +426,7 @@ config ARMSSE select IOTKIT_SYSCTL select IOTKIT_SYSINFO select OR_IRQ + select SPLIT_IRQ select TZ_MPC select TZ_MSC select TZ_PPC
hw/core/Kconfig +3 -0
@@ -15,3 +15,6 @@ config PLATFORM_BUS config REGISTER bool + +config SPLIT_IRQ + bool
hw/core/Makefile.objs +1 -1
@@ -18,7 +18,7 @@ common-obj-$(CONFIG_FITLOADER) += loader-fit.o common-obj-$(CONFIG_SOFTMMU) += qdev-properties-system.o common-obj-$(CONFIG_REGISTER) += register.o common-obj-$(CONFIG_OR_IRQ) += or-irq.o -common-obj-$(CONFIG_SOFTMMU) += split-irq.o +common-obj-$(CONFIG_SPLIT_IRQ) += split-irq.o common-obj-$(CONFIG_PLATFORM_BUS) += platform-bus.o common-obj-$(CONFIG_SOFTMMU) += generic-loader.o common-obj-$(CONFIG_SOFTMMU) += null-machine.o
Signature · 1 line
2.21.0
PATCH 4/4 hw/misc: Add a config switch for the "unimplemented" device
In reply to Thomas HuthThe device is only used by certain Arm boards. Now that we have fine-grained Kconfig for these machines, too, we can enable the "unimplemented" devices only for the machines that really need it.
--- hw/arm/Kconfig | 9 +++++++++ hw/microblaze/Kconfig | 1 + hw/misc/Kconfig | 3 +++ hw/misc/Makefile.objs | 2 +- hw/sparc64/Kconfig | 1 + 5 files changed, 15 insertions(+), 1 deletion(-)
hw/arm/Kconfig +9 -0
@@ -201,6 +201,7 @@ config STELLARIS select SSI_SD select STELLARIS_INPUT select STELLARIS_ENET # ethernet + select UNIMP config STRONGARM bool
@@ -267,6 +268,7 @@ config ALLWINNER_A10 select ALLWINNER_A10_PIC select ALLWINNER_EMAC select SERIAL + select UNIMP config RASPI bool
@@ -304,6 +306,7 @@ config XLNX_VERSAL select PL011 select CADENCE select VIRTIO_MMIO + select UNIMP config FSL_IMX25 bool
@@ -339,6 +342,7 @@ config ASPEED_SOC select SSI_M25P80 select TMP105 select TMP421 + select UNIMP config MPS2 bool
@@ -360,6 +364,7 @@ config FSL_IMX7 select IMX_I2C select PCI_EXPRESS_DESIGNWARE select SDHCI + select UNIMP config ARM_SMMUV3 bool
@@ -371,6 +376,7 @@ config FSL_IMX6UL select IMX_FEC select IMX_I2C select SDHCI + select UNIMP config MICROBIT bool
@@ -380,6 +386,7 @@ config NRF51_SOC bool select I2C select ARM_V7M + select UNIMP config EMCRAFT_SF2 bool
@@ -392,6 +399,7 @@ config MSF2 select PTIMER select SERIAL select SSI + select UNIMP config ZAURUS bool
@@ -430,6 +438,7 @@ config ARMSSE select TZ_MPC select TZ_MSC select TZ_PPC + select UNIMP config ARMSSE_CPUID bool
hw/microblaze/Kconfig +1 -0
@@ -4,6 +4,7 @@ config PETALOGIX_S3ADSP1800 select XILINX select XILINX_AXI select XILINX_ETHLITE + select UNIMP config PETALOGIX_ML605 bool
hw/misc/Kconfig +3 -0
@@ -117,4 +117,7 @@ config AUX bool select I2C +config UNIMP + bool + source macio/Kconfig
hw/misc/Makefile.objs +1 -1
@@ -9,7 +9,7 @@ common-obj-$(CONFIG_PCI_TESTDEV) += pci-testdev.o common-obj-$(CONFIG_EDU) += edu.o common-obj-$(CONFIG_PCA9552) += pca9552.o -common-obj-y += unimp.o +common-obj-$(CONFIG_UNIMP) += unimp.o common-obj-$(CONFIG_FW_CFG_DMA) += vmcoreinfo.o # ARM devices
hw/sparc64/Kconfig +1 -0
@@ -17,3 +17,4 @@ config NIAGARA bool select EMPTY_SLOT select SUN4V_RTC + select UNIMP
Signature · 1 line
2.21.0
Re: [Qemu-arm] [PATCH 2/4] hw/core: Add a config switch for the "or-irq" device
In reply to Thomas HuthQuoted 26 lines · Thomas Huth
The "or-irq" device is only used by certain machines. Let's add a proper config switch for it so that it only gets compiled when we really need it.
Signed-off-by Thomas Huth <[email protected]>--- hw/arm/Kconfig | 2 ++ hw/core/Kconfig | 3 +++ hw/core/Makefile.objs | 2 +- hw/pci-host/Kconfig | 3 ++- 4 files changed, 8 insertions(+), 2 deletions(-)hw/arm/Kconfig +1
-0@@ -277,6 +277,7 @@ config RASPI config STM32F205_SOC bool select ARM_V7M + select OR_IRQ select STM32F2XX_TIMER select STM32F2XX_USART select STM32F2XX_SYSCFG
hw/arm/Kconfig config ARMSSE · line 431
Quoted 7 lines
hw/arm/Kconfig +1
-0@@ -424,6 +425,7 @@ config ARMSSE select IOTKIT_SECCTL select IOTKIT_SYSCTL select IOTKIT_SYSINFO + select OR_IRQ select TZ_MPC select TZ_MSC select TZ_PPC
In cases like this where a device is used both by an SoC and also directly by the board code that uses that SoC, should we put the select OR_IRQ only in the SoC's config, or also in the board model's config (ie, in "config MPS2" as well as "config ARMSSE") ?
thanks
-- PMM
Quoted 9 lines · Thomas Huth
Here are some more
Kconfigpatches that introduce proper config switches for some devices in the hw/core and hw/misc directories.Thomas Huth (4):
hw/core: Add a config switch for the "register" device hw/core: Add a config switch for the "or-irq" device hw/core: Add a config switch for the "split-irq" device hw/misc: Add a config switch for the "unimplemented" device
Quoted 12 lines
hw/arm/Kconfig | 12 ++++++++++++ hw/core/Kconfig | 9 +++++++++ hw/core/Makefile.objs | 6 +++--- hw/dma/Kconfig | 1 + hw/microblaze/Kconfig | 1 + hw/misc/Kconfig | 3 +++ hw/misc/Makefile.objs | 2 +- hw/pci-host/Kconfig | 3 ++- hw/sparc64/Kconfig | 1 + hw/timer/Kconfig | 1 + 10 files changed, 34 insertions(+), 5 deletions(-)
Paolo
Re: [Qemu-devel] [Qemu-arm] [PATCH 4/4] hw/misc: Add a config switch for the "unimplemented" device
In reply to Thomas HuthQuoted 5 lines · Thomas Huth
The device is only used by certain Arm boards. Now that we have fine-grained
Kconfigfor these machines, too, we can enable the "unimplemented" devices only for the machines that really need it.
Quoted 8 lines
Signed-off-by Thomas Huth <[email protected]>--- hw/arm/Kconfig | 9 +++++++++ hw/microblaze/Kconfig | 1 + hw/misc/Kconfig | 3 +++ hw/misc/Makefile.objs | 2 +- hw/sparc64/Kconfig | 1 + 5 files changed, 15 insertions(+), 1 deletion(-)
Commit message says "only Arm" but code change changes sparc and microblaze Kconfigs too :-)
thanks
-- PMM
Re: [Qemu-devel] [PATCH 1/4] hw/core: Add a config switch for the "register" device
In reply to Philippe Mathieu-DaudéQuoted 59 lines · Philippe Mathieu-Daudé
Quoted 58 lines · Thomas Huth
The "register" device is only used by certain machines. Let's add a proper config switch for it so that it only gets compiled when we really need it.
Signed-off-by Thomas Huth <[email protected]>--- hw/core/Kconfig | 3 +++ hw/core/Makefile.objs | 2 +- hw/dma/Kconfig | 1 + hw/timer/Kconfig | 1 + 4 files changed, 6 insertions(+), 1 deletion(-)hw/core/Kconfig +3
-0@@ -9,3 +9,6 @@ config FITLOADER config PLATFORM_BUS bool + +config REGISTER + boolhw/core/Makefile.objs +1
-1@@ -16,7 +16,7 @@ common-obj-$(CONFIG_SOFTMMU) += machine.o common-obj-$(CONFIG_SOFTMMU) += loader.o common-obj-$(CONFIG_FITLOADER) += loader-fit.o common-obj-$(CONFIG_SOFTMMU) += qdev-properties-system.o -common-obj-$(CONFIG_SOFTMMU) += register.o +common-obj-$(CONFIG_REGISTER) += register.o common-obj-$(CONFIG_SOFTMMU) += or-irq.o common-obj-$(CONFIG_SOFTMMU) += split-irq.o common-obj-$(CONFIG_PLATFORM_BUS) += platform-bus.ohw/dma/Kconfig +1
-0@@ -16,6 +16,7 @@ config I8257 config ZYNQ_DEVCFG bool + select REGISTER config STP2000 boolhw/timer/Kconfig +1
-0@@ -36,6 +36,7 @@ config TWL92230 config XLNX_ZYNQMP bool + select REGISTER
Quoted 7 lines
hw/timer/Kconfig config TWL92230 · line 42
Quoted 3 lines
hw/timer/Kconfig +0
-0config ALTERA_TIMER boolAnnoying, this clashes with "hw/microblaze:
Kconfigcleanup" which is already queued by Paolo:
https://lists.gnu.org/archive/html/qemu-devel/2019-04/msg04669.html
Ok, I'll wait for the merge of Paolo's next PULL request before sending the v2 of my series.
Thomas
Re: [Qemu-arm] [PATCH 2/4] hw/core: Add a config switch for the "or-irq" device
In reply to Philippe Mathieu-DaudéQuoted 42 lines · Philippe Mathieu-Daudé
Quoted 32 lines · Peter Maydell
Quoted 31 lines · Thomas Huth
The "or-irq" device is only used by certain machines. Let's add a proper config switch for it so that it only gets compiled when we really need it.
Signed-off-by Thomas Huth <[email protected]>--- hw/arm/Kconfig | 2 ++ hw/core/Kconfig | 3 +++ hw/core/Makefile.objs | 2 +- hw/pci-host/Kconfig | 3 ++- 4 files changed, 8 insertions(+), 2 deletions(-)hw/arm/Kconfig +2
-0@@ -277,6 +277,7 @@ config RASPI config STM32F205_SOC bool select ARM_V7M + select OR_IRQ select STM32F2XX_TIMER select STM32F2XX_USART select STM32F2XX_SYSCFG@@ -424,6 +425,7 @@ config ARMSSE select IOTKIT_SECCTL select IOTKIT_SYSCTL select IOTKIT_SYSINFO + select OR_IRQ select TZ_MPCQuoted 8 lines
hw/arm/Kconfig config ARMSSE · line 431
Quoted 2 lines
hw/arm/Kconfig +0
-0select TZ_MSC select TZ_PPCIn cases like this where a device is used both by an SoC and also directly by the board code that uses that SoC, should we put the select
OR_IRQonly in the SoC's config, or also in the board model's config (ie, in "config MPS2" as well as "config ARMSSE") ?
Quoted 3 lines
Someone should be able to work on the board without having to look at the SoC code/config, so both :) The idea of
Kconfigis you only worry about a specific device, and the qgraph sort the rest out.
I don't have a strong opinion here, but likely is safer indeed to put the switch into both sections in this case - so if one of the two ever gets changed, the config switch is still there for the other one that still requires it. I'll send a v2.
Thomas
Re: [Qemu-arm] [PATCH 2/4] hw/core: Add a config switch for the "or-irq" device
In reply to Thomas HuthQuoted 25 lines · Thomas Huth
The "or-irq" device is only used by certain machines. Let's add a proper config switch for it so that it only gets compiled when we really need it.
Signed-off-by Thomas Huth <[email protected]>--- hw/arm/Kconfig | 2 ++ hw/core/Kconfig | 3 +++ hw/core/Makefile.objs | 2 +- hw/pci-host/Kconfig | 3 ++- 4 files changed, 8 insertions(+), 2 deletions(-)hw/arm/Kconfig +1
-0@@ -277,6 +277,7 @@ config RASPI config STM32F205_SOC bool select ARM_V7M + select OR_IRQ select STM32F2XX_TIMER select STM32F2XX_USART select STM32F2XX_SYSCFG
hw/arm/Kconfig config ARMSSE · line 431
Quoted 7 lines
hw/arm/Kconfig +1
-0@@ -424,6 +425,7 @@ config ARMSSE select IOTKIT_SECCTL select IOTKIT_SYSCTL select IOTKIT_SYSINFO + select OR_IRQ select TZ_MPC select TZ_MSC select TZ_PPC
You missed the MPS2* boards
Quoted 43 lines
hw/core/Kconfig +3
-0@@ -7,6 +7,9 @@ config PTIMER config FITLOADER bool +config OR_IRQ + bool + config PLATFORM_BUS boolhw/core/Makefile.objs +1
-1@@ -17,7 +17,7 @@ common-obj-$(CONFIG_SOFTMMU) += loader.o common-obj-$(CONFIG_FITLOADER) += loader-fit.o common-obj-$(CONFIG_SOFTMMU) += qdev-properties-system.o common-obj-$(CONFIG_REGISTER) += register.o -common-obj-$(CONFIG_SOFTMMU) += or-irq.o +common-obj-$(CONFIG_OR_IRQ) += or-irq.o common-obj-$(CONFIG_SOFTMMU) += split-irq.o common-obj-$(CONFIG_PLATFORM_BUS) += platform-bus.o common-obj-$(CONFIG_SOFTMMU) += generic-loader.ohw/pci-host/Kconfig +2
-1@@ -2,8 +2,9 @@ config PAM bool config PREP_PCI - select PCI bool + select PCI + select OR_IRQ config GRACKLE_PCI select PCI
Re: [Qemu-arm] [PATCH 1/4] hw/core: Add a config switch for the "register" device
In reply to Thomas HuthQuoted 54 lines · Thomas Huth
The "register" device is only used by certain machines. Let's add a proper config switch for it so that it only gets compiled when we really need it.
Signed-off-by Thomas Huth <[email protected]>--- hw/core/Kconfig | 3 +++ hw/core/Makefile.objs | 2 +- hw/dma/Kconfig | 1 + hw/timer/Kconfig | 1 + 4 files changed, 6 insertions(+), 1 deletion(-)hw/core/Kconfig +3
-0@@ -9,3 +9,6 @@ config FITLOADER config PLATFORM_BUS bool + +config REGISTER + boolhw/core/Makefile.objs +1
-1@@ -16,7 +16,7 @@ common-obj-$(CONFIG_SOFTMMU) += machine.o common-obj-$(CONFIG_SOFTMMU) += loader.o common-obj-$(CONFIG_FITLOADER) += loader-fit.o common-obj-$(CONFIG_SOFTMMU) += qdev-properties-system.o -common-obj-$(CONFIG_SOFTMMU) += register.o +common-obj-$(CONFIG_REGISTER) += register.o common-obj-$(CONFIG_SOFTMMU) += or-irq.o common-obj-$(CONFIG_SOFTMMU) += split-irq.o common-obj-$(CONFIG_PLATFORM_BUS) += platform-bus.ohw/dma/Kconfig +1
-0@@ -16,6 +16,7 @@ config I8257 config ZYNQ_DEVCFG bool + select REGISTER config STP2000 boolhw/timer/Kconfig +0
-0
hw/timer/Kconfig config TWL92230 · line 42
Quoted 7 lines
hw/timer/Kconfig +1
-0@@ -36,6 +36,7 @@ config TWL92230 config XLNX_ZYNQMP bool + select REGISTER config ALTERA_TIMER bool
Annoying, this clashes with "hw/microblaze: Kconfig cleanup" which is already queued by Paolo:
https://lists.gnu.org/archive/html/qemu-devel/2019-04/msg04669.html
Re: [Qemu-arm] [PATCH 2/4] hw/core: Add a config switch for the "or-irq" device
In reply to Philippe Mathieu-DaudéQuoted 42 lines · Philippe Mathieu-Daudé
Quoted 32 lines · Peter Maydell
Quoted 31 lines · Thomas Huth
The "or-irq" device is only used by certain machines. Let's add a proper config switch for it so that it only gets compiled when we really need it.
Signed-off-by Thomas Huth <[email protected]>--- hw/arm/Kconfig | 2 ++ hw/core/Kconfig | 3 +++ hw/core/Makefile.objs | 2 +- hw/pci-host/Kconfig | 3 ++- 4 files changed, 8 insertions(+), 2 deletions(-)hw/arm/Kconfig +2
-0@@ -277,6 +277,7 @@ config RASPI config STM32F205_SOC bool select ARM_V7M + select OR_IRQ select STM32F2XX_TIMER select STM32F2XX_USART select STM32F2XX_SYSCFG@@ -424,6 +425,7 @@ config ARMSSE select IOTKIT_SECCTL select IOTKIT_SYSCTL select IOTKIT_SYSINFO + select OR_IRQ select TZ_MPCQuoted 8 lines
hw/arm/Kconfig config ARMSSE · line 431
Quoted 2 lines
hw/arm/Kconfig +0
-0select TZ_MSC select TZ_PPCIn cases like this where a device is used both by an SoC and also directly by the board code that uses that SoC, should we put the select
OR_IRQonly in the SoC's config, or also in the board model's config (ie, in "config MPS2" as well as "config ARMSSE") ?
Quoted 3 lines
Someone should be able to work on the board without having to look at the SoC code/config, so both :) The idea of
Kconfigis you only worry about a specific device, and the qgraph sort the rest out.
Hypothetical example if you only use the selector in the SoC config:
If you replace the SoC OR_IRQ by a more complex device or extended one, the board will lack the OR_IRQ selector.
Using Kconfig selectors in all place a dependency is explicit also ease backports.
Quoted 5 lines
So having in both place is safer, and helps to visualize dependencies in the graph tree (I'm slowly working on this feature to help new-comer to understand model dependencies).
Re: [Qemu-devel] [Qemu-arm] [PATCH 2/4] hw/core: Add a config switch for the "or-irq" device
In reply to Peter MaydellQuoted 32 lines · Peter Maydell
Quoted 31 lines · Thomas Huth
The "or-irq" device is only used by certain machines. Let's add a proper config switch for it so that it only gets compiled when we really need it.
Signed-off-by Thomas Huth <[email protected]>--- hw/arm/Kconfig | 2 ++ hw/core/Kconfig | 3 +++ hw/core/Makefile.objs | 2 +- hw/pci-host/Kconfig | 3 ++- 4 files changed, 8 insertions(+), 2 deletions(-)hw/arm/Kconfig +2
-0@@ -277,6 +277,7 @@ config RASPI config STM32F205_SOC bool select ARM_V7M + select OR_IRQ select STM32F2XX_TIMER select STM32F2XX_USART select STM32F2XX_SYSCFG@@ -424,6 +425,7 @@ config ARMSSE select IOTKIT_SECCTL select IOTKIT_SYSCTL select IOTKIT_SYSINFO + select OR_IRQ select TZ_MPC
Quoted 8 lines
hw/arm/Kconfig config ARMSSE · line 431
Quoted 2 lines
hw/arm/Kconfig +0
-0select TZ_MSC select TZ_PPCIn cases like this where a device is used both by an SoC and also directly by the board code that uses that SoC, should we put the select
OR_IRQonly in the SoC's config, or also in the board model's config (ie, in "config MPS2" as well as "config ARMSSE") ?
Someone should be able to work on the board without having to look at the SoC code/config, so both :) The idea of Kconfig is you only worry about a specific device, and the qgraph sort the rest out.
So having in both place is safer, and helps to visualize dependencies in the graph tree (I'm slowly working on this feature to help new-comer to understand model dependencies).
Re: [Qemu-arm] [PATCH 2/4] hw/core: Add a config switch for the "or-irq" device
In reply to Philippe Mathieu-DaudéQuoted 27 lines · Philippe Mathieu-Daudé
Quoted 26 lines · Thomas Huth
The "or-irq" device is only used by certain machines. Let's add a proper config switch for it so that it only gets compiled when we really need it.
Signed-off-by Thomas Huth <[email protected]>--- hw/arm/Kconfig | 2 ++ hw/core/Kconfig | 3 +++ hw/core/Makefile.objs | 2 +- hw/pci-host/Kconfig | 3 ++- 4 files changed, 8 insertions(+), 2 deletions(-)hw/arm/Kconfig +1
-0@@ -277,6 +277,7 @@ config RASPI config STM32F205_SOC bool select ARM_V7M + select OR_IRQ select STM32F2XX_TIMER select STM32F2XX_USART select STM32F2XX_SYSCFG@@ -424,6 +425,7 @@ config ARMSSE select IOTKIT_SECCTL
Quoted 8 lines
hw/arm/Kconfig config ARMSSE · line 431
Quoted 6 lines
hw/arm/Kconfig +1
-0select IOTKIT_SYSCTL select IOTKIT_SYSINFO + select OR_IRQ select TZ_MPC select TZ_MSC select TZ_PPCYou missed the MPS2* boards
No, the MPS2 boards "select ARMSSE", so this gets added via the above hunk there. But as mentioned in the reply to Peter, it's likely better to add it there, too.
Thomas
Re: [Qemu-arm] [PATCH 4/4] hw/misc: Add a config switch for the "unimplemented" device
In reply to Peter MaydellQuoted 15 lines · Peter Maydell
Quoted 5 lines · Thomas Huth
The device is only used by certain Arm boards. Now that we have fine-grained
Kconfigfor these machines, too, we can enable the "unimplemented" devices only for the machines that really need it.Quoted 8 lines
Signed-off-by Thomas Huth <[email protected]>--- hw/arm/Kconfig | 9 +++++++++ hw/microblaze/Kconfig | 1 + hw/misc/Kconfig | 3 +++ hw/misc/Makefile.objs | 2 +- hw/sparc64/Kconfig | 1 + 5 files changed, 15 insertions(+), 1 deletion(-)
Quoted 2 lines
Commit message says "only Arm" but code change changes sparc and microblaze Kconfigs too :-)
D'oh! ... I started with grep'ing for TYPE_UNIMPLEMENTED_DEVICE and only saw Arm boards there. When I tested my patches, I noticed that I must also add the machines that use the create_unimplemented_device() function, but apparently forgot to fix up the commit message accordingly. I'll fix it in v2.
Thomas
Re: [Qemu-arm] [Qemu-devel] [PATCH 1/4] hw/core: Add a config switch for the "register" device
In reply to Thomas HuthQuoted 68 lines · Thomas Huth
Quoted 59 lines · Philippe Mathieu-Daudé
Quoted 58 lines · Thomas Huth
The "register" device is only used by certain machines. Let's add a proper config switch for it so that it only gets compiled when we really need it.
Signed-off-by Thomas Huth <[email protected]>--- hw/core/Kconfig | 3 +++ hw/core/Makefile.objs | 2 +- hw/dma/Kconfig | 1 + hw/timer/Kconfig | 1 + 4 files changed, 6 insertions(+), 1 deletion(-)hw/core/Kconfig +3
-0@@ -9,3 +9,6 @@ config FITLOADER config PLATFORM_BUS bool + +config REGISTER + boolhw/core/Makefile.objs +1
-1@@ -16,7 +16,7 @@ common-obj-$(CONFIG_SOFTMMU) += machine.o common-obj-$(CONFIG_SOFTMMU) += loader.o common-obj-$(CONFIG_FITLOADER) += loader-fit.o common-obj-$(CONFIG_SOFTMMU) += qdev-properties-system.o -common-obj-$(CONFIG_SOFTMMU) += register.o +common-obj-$(CONFIG_REGISTER) += register.o common-obj-$(CONFIG_SOFTMMU) += or-irq.o common-obj-$(CONFIG_SOFTMMU) += split-irq.o common-obj-$(CONFIG_PLATFORM_BUS) += platform-bus.ohw/dma/Kconfig +1
-0@@ -16,6 +16,7 @@ config I8257 config ZYNQ_DEVCFG bool + select REGISTER config STP2000 boolhw/timer/Kconfig +1
-0@@ -36,6 +36,7 @@ config TWL92230 config XLNX_ZYNQMP bool + select REGISTERQuoted 7 lines
hw/timer/Kconfig config TWL92230 · line 42
Quoted 3 lines
hw/timer/Kconfig +0
-0config ALTERA_TIMER boolAnnoying, this clashes with "hw/microblaze:
Kconfigcleanup" which is already queued by Paolo:
https://lists.gnu.org/archive/html/qemu-devel/2019-04/msg04669.html
Quoted 2 lines
Ok, I'll wait for the merge of Paolo's next PULL request before sending the v2 of my series.
Looks like your patches were not included in Paolo's last PULL request? Did the patches fall through the cracks?
Thomas