All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v4 00/29] Kconfig dependencies for ARM machines
@ 2019-03-07 14:18 Thomas Huth
  2019-03-07 14:18 ` [Qemu-devel] [PATCH v4 01/29] hw/pci/pci-stub: Add msi_enabled() and msi_notify() to the pci stubs Thomas Huth
                   ` (30 more replies)
  0 siblings, 31 replies; 35+ messages in thread
From: Thomas Huth @ 2019-03-07 14:18 UTC (permalink / raw)
  To: yang.zhong, pbonzini, qemu-devel
  Cc: Philippe Mathieu-Daudé,
	qemu-arm, John Snow, Michael S. Tsirkin, Peter Maydell

This series reworks the default-configs/arm-softmmu.mak and
default-configs/aarch64-softmmu.mak files to use the new Kconfig-style
dependencies instead.

Based-on: 1551723614-1823-1-git-send-email-pbonzini@redhat.com
          ("Support Kconfig in QEMU")

Some of the patches are slightly based on the work by Ákos Kovács:

https://lists.nongnu.org/archive/html/qemu-devel/2013-08/msg03730.html

The other patches have been created by looking at the sources and finding
out the dependencies the hard way via trial-and-error (i.e. by enabling
only one machine at a time and checking whether it can be compiled and
started).

v4:
 - Rebased the series to Paolo's latest kconfig tree

v3:
 - Addressed review feedback from v2
 - Included patches to clean up the PCI dependencies of AHCI and SDHCI
   (so CONFIG_AHCI and CONFIG_SDHCI do not depend on CONFIG_PCI anymore)
 - Added an additional patch for the new "musca" machines

v2: Adressed review-feedback from v1
 - CONFIG_SDHCI and CONFIG_AHCI now select CONFIG_PCI
 - Added switches for MICROBIT and EMCRAFT_SF2

Thomas Huth (29):
  hw/pci/pci-stub: Add msi_enabled() and msi_notify() to the pci stubs
  hw/ide/ahci: Add a Kconfig switch for the AHDI-ICH9 device
  hw/sd/sdhci: Move PCI-related code into a separate file
  hw/arm: Express dependencies of the exynos machines with Kconfig
  hw/arm: Express dependencies of the highbank machines with Kconfig
  hw/arm: Express dependencies of integratorcp with Kconfig
  hw/arm: Express dependencies of the fsl-imx31 machine with Kconfig
  hw/arm: Express dependencies of musicpal with Kconfig
  hw/arm: Express dependencies of the OMAP machines with Kconfig
  hw/arm: Express dependencies of stellaris with Kconfig
  hw/arm: Express dependencies of realview, versatile and vexpress with
    Kconfig
  hw/arm: Express dependencies of the PXA2xx machines with Kconfig
  hw/arm: Express dependencies of xilinx-zynq with Kconfig
  hw/arm: Express dependencies of collie with Kconfig
  hw/arm: Express dependencies of the aspeed boards with Kconfig
  hw/arm: Express dependencies of the virt machine with Kconfig
  hw/arm: Express dependencies of netduino / stm32f2xx with Kconfig
  hw/arm: Express dependencies of allwinner / cubieboard with Kconfig
  hw/arm: Express dependencies of the MPS2 boards with Kconfig
  hw/arm: Express dependencies of the raspi machines with Kconfig
  hw/arm: Express dependencies of canon-a1100 with Kconfig
  hw/arm: Express dependencies of sabrelite with Kconfig
  hw/arm: Express dependencies of the MSF2 / EMCRAFT_SF2 machine with
    Kconfig
  hw/arm: Express dependencies for remaining IMX boards with Kconfig
  hw/arm: Express dependencies of the microbit / nrf51 machine with
    Kconfig
  hw/arm: Express dependencies of the ZynqMP zcu102 machine with Kconfig
  hw/arm: Express dependencies of the xlnx-versal-virt machine with
    Kconfig
  hw/arm: Express dependencies of the musca machines with Kconfig
  hw/arm: Remove hard-enablement of the remaining PCI devices

 default-configs/aarch64-softmmu.mak |   4 -
 default-configs/arm-softmmu.mak     | 175 +++-----------------
 hw/arm/Kconfig                      | 319 +++++++++++++++++++++++++++++++++++-
 hw/arm/Makefile.objs                |  25 ++-
 hw/display/Kconfig                  |   3 +
 hw/i2c/Kconfig                      |   2 +-
 hw/ide/Kconfig                      |   6 +-
 hw/ide/Makefile.objs                |   2 +-
 hw/misc/Kconfig                     |   2 +
 hw/pci/pci-stub.c                   |  11 ++
 hw/sd/Kconfig                       |   6 +-
 hw/sd/Makefile.objs                 |   1 +
 hw/sd/sdhci-internal.h              |  34 ++++
 hw/sd/sdhci-pci.c                   |  87 ++++++++++
 hw/sd/sdhci.c                       |  98 +----------
 15 files changed, 514 insertions(+), 261 deletions(-)
 create mode 100644 hw/sd/sdhci-pci.c

-- 
1.8.3.1

^ permalink raw reply	[flat|nested] 35+ messages in thread

* [Qemu-devel] [PATCH v4 01/29] hw/pci/pci-stub: Add msi_enabled() and msi_notify() to the pci stubs
  2019-03-07 14:18 [Qemu-devel] [PATCH v4 00/29] Kconfig dependencies for ARM machines Thomas Huth
@ 2019-03-07 14:18 ` Thomas Huth
  2019-03-07 14:18 ` [Qemu-devel] [PATCH v4 02/29] hw/ide/ahci: Add a Kconfig switch for the AHDI-ICH9 device Thomas Huth
                   ` (29 subsequent siblings)
  30 siblings, 0 replies; 35+ messages in thread
From: Thomas Huth @ 2019-03-07 14:18 UTC (permalink / raw)
  To: yang.zhong, pbonzini, qemu-devel
  Cc: Philippe Mathieu-Daudé,
	qemu-arm, John Snow, Michael S. Tsirkin, Peter Maydell

Some machines have an AHCI adapter, but no PCI. To be able to
compile hw/ide/ahci.c without CONFIG_PCI, we still need the two
functions msi_enabled() and msi_notify() for linking.
This is required for the new Kconfig-like build system, if a user
wants to compile a QEMU binary with just one machine that has AHCI,
but no PCI, like the ARM "cubieboard" for example.

Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 hw/pci/pci-stub.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/hw/pci/pci-stub.c b/hw/pci/pci-stub.c
index b941a0e..c04a5df 100644
--- a/hw/pci/pci-stub.c
+++ b/hw/pci/pci-stub.c
@@ -53,3 +53,14 @@ uint16_t pci_requester_id(PCIDevice *dev)
     g_assert(false);
     return 0;
 }
+
+/* Required by ahci.c */
+bool msi_enabled(const PCIDevice *dev)
+{
+    return false;
+}
+
+void msi_notify(PCIDevice *dev, unsigned int vector)
+{
+    g_assert_not_reached();
+}
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [Qemu-devel] [PATCH v4 02/29] hw/ide/ahci: Add a Kconfig switch for the AHDI-ICH9 device
  2019-03-07 14:18 [Qemu-devel] [PATCH v4 00/29] Kconfig dependencies for ARM machines Thomas Huth
  2019-03-07 14:18 ` [Qemu-devel] [PATCH v4 01/29] hw/pci/pci-stub: Add msi_enabled() and msi_notify() to the pci stubs Thomas Huth
@ 2019-03-07 14:18 ` Thomas Huth
  2019-03-07 14:18 ` [Qemu-devel] [PATCH v4 03/29] hw/sd/sdhci: Move PCI-related code into a separate file Thomas Huth
                   ` (28 subsequent siblings)
  30 siblings, 0 replies; 35+ messages in thread
From: Thomas Huth @ 2019-03-07 14:18 UTC (permalink / raw)
  To: yang.zhong, pbonzini, qemu-devel
  Cc: Philippe Mathieu-Daudé,
	qemu-arm, John Snow, Michael S. Tsirkin, Peter Maydell

Some of our machines (like the ARM cubieboard) use CONFIG_AHCI for an AHCI
sysbus device, but do not use CONFIG_PCI since they do not feature a PCI
bus. With CONFIG_AHCI but without CONFIG_PCI, currently linking fails:

    ../hw/ide/ich.o: In function `pci_ich9_ahci_realize':
    hw/ide/ich.c:124: undefined reference to `pci_allocate_irq'
    hw/ide/ich.c:126: undefined reference to `pci_register_bar'
    hw/ide/ich.c:128: undefined reference to `pci_register_bar'
    hw/ide/ich.c:131: undefined reference to `pci_add_capability'
    hw/ide/ich.c:147: undefined reference to `msi_init'
    ../hw/ide/ich.o: In function `pci_ich9_uninit':
    hw/ide/ich.c:158: undefined reference to `msi_uninit'
    ../hw/ide/ich.o:(.data.rel+0x50): undefined reference to `vmstate_pci_device'

We must only compile ich.c if CONFIG_PCI is available, too, so introduce a
new config switch for this device.

Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 hw/ide/Kconfig       | 6 +++++-
 hw/ide/Makefile.objs | 2 +-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/hw/ide/Kconfig b/hw/ide/Kconfig
index ab47b6a..5d9106b 100644
--- a/hw/ide/Kconfig
+++ b/hw/ide/Kconfig
@@ -44,9 +44,13 @@ config MICRODRIVE
 
 config AHCI
     bool
+    select IDE_QDEV
+
+config AHCI_ICH9
+    bool
     default y if PCI_DEVICES
     depends on PCI
-    select IDE_QDEV
+    select AHCI
 
 config IDE_SII3112
     bool
diff --git a/hw/ide/Makefile.objs b/hw/ide/Makefile.objs
index a142add..faf04e0 100644
--- a/hw/ide/Makefile.objs
+++ b/hw/ide/Makefile.objs
@@ -9,6 +9,6 @@ common-obj-$(CONFIG_IDE_MMIO) += mmio.o
 common-obj-$(CONFIG_IDE_VIA) += via.o
 common-obj-$(CONFIG_MICRODRIVE) += microdrive.o
 common-obj-$(CONFIG_AHCI) += ahci.o
-common-obj-$(CONFIG_AHCI) += ich.o
+common-obj-$(CONFIG_AHCI_ICH9) += ich.o
 common-obj-$(CONFIG_ALLWINNER_A10) += ahci-allwinner.o
 common-obj-$(CONFIG_IDE_SII3112) += sii3112.o
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [Qemu-devel] [PATCH v4 03/29] hw/sd/sdhci: Move PCI-related code into a separate file
  2019-03-07 14:18 [Qemu-devel] [PATCH v4 00/29] Kconfig dependencies for ARM machines Thomas Huth
  2019-03-07 14:18 ` [Qemu-devel] [PATCH v4 01/29] hw/pci/pci-stub: Add msi_enabled() and msi_notify() to the pci stubs Thomas Huth
  2019-03-07 14:18 ` [Qemu-devel] [PATCH v4 02/29] hw/ide/ahci: Add a Kconfig switch for the AHDI-ICH9 device Thomas Huth
@ 2019-03-07 14:18 ` Thomas Huth
  2019-03-10 21:12   ` Philippe Mathieu-Daudé
  2019-03-07 14:18 ` [Qemu-devel] [PATCH v4 04/29] hw/arm: Express dependencies of the exynos machines with Kconfig Thomas Huth
                   ` (27 subsequent siblings)
  30 siblings, 1 reply; 35+ messages in thread
From: Thomas Huth @ 2019-03-07 14:18 UTC (permalink / raw)
  To: yang.zhong, pbonzini, qemu-devel
  Cc: Philippe Mathieu-Daudé,
	qemu-arm, John Snow, Michael S. Tsirkin, Peter Maydell

Some machines have an SDHCI device, but no PCI. To be able to
compile hw/sd/sdhci.c without CONFIG_PCI, we must not call functions
like pci_get_address_space() and pci_allocate_irq() there. Thus
move the PCI-related code into a separate file.

This is required for the new Kconfig-like build system, e.g. it is
needed if a user wants to compile a QEMU binary with just one machine
that has SDHCI, but no PCI, like the ARM "raspi" machines for example.

Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 hw/sd/Kconfig          |  6 +++-
 hw/sd/Makefile.objs    |  1 +
 hw/sd/sdhci-internal.h | 34 ++++++++++++++++++
 hw/sd/sdhci-pci.c      | 87 ++++++++++++++++++++++++++++++++++++++++++++
 hw/sd/sdhci.c          | 98 +++-----------------------------------------------
 5 files changed, 132 insertions(+), 94 deletions(-)
 create mode 100644 hw/sd/sdhci-pci.c

diff --git a/hw/sd/Kconfig b/hw/sd/Kconfig
index 864f535..c5e1e55 100644
--- a/hw/sd/Kconfig
+++ b/hw/sd/Kconfig
@@ -12,6 +12,10 @@ config SD
 
 config SDHCI
     bool
+    select SD
+
+config SDHCI_PCI
+    bool
     default y if PCI_DEVICES
     depends on PCI
-    select SD
+    select SDHCI
diff --git a/hw/sd/Makefile.objs b/hw/sd/Makefile.objs
index a99d9fb..0665727 100644
--- a/hw/sd/Makefile.objs
+++ b/hw/sd/Makefile.objs
@@ -2,6 +2,7 @@ common-obj-$(CONFIG_PL181) += pl181.o
 common-obj-$(CONFIG_SSI_SD) += ssi-sd.o
 common-obj-$(CONFIG_SD) += sd.o core.o sdmmc-internal.o
 common-obj-$(CONFIG_SDHCI) += sdhci.o
+common-obj-$(CONFIG_SDHCI_PCI) += sdhci-pci.o
 
 obj-$(CONFIG_MILKYMIST) += milkymist-memcard.o
 obj-$(CONFIG_OMAP) += omap_mmc.o
diff --git a/hw/sd/sdhci-internal.h b/hw/sd/sdhci-internal.h
index 19665fd..3414140 100644
--- a/hw/sd/sdhci-internal.h
+++ b/hw/sd/sdhci-internal.h
@@ -304,4 +304,38 @@ extern const VMStateDescription sdhci_vmstate;
 
 #define ESDHC_PRNSTS_SDSTB              (1 << 3)
 
+/*
+ * Default SD/MMC host controller features information, which will be
+ * presented in CAPABILITIES register of generic SD host controller at reset.
+ *
+ * support:
+ * - 3.3v and 1.8v voltages
+ * - SDMA/ADMA1/ADMA2
+ * - high-speed
+ * max host controller R/W buffers size: 512B
+ * max clock frequency for SDclock: 52 MHz
+ * timeout clock frequency: 52 MHz
+ *
+ * does not support:
+ * - 3.0v voltage
+ * - 64-bit system bus
+ * - suspend/resume
+ */
+#define SDHC_CAPAB_REG_DEFAULT 0x057834b4
+
+#define DEFINE_SDHCI_COMMON_PROPERTIES(_state) \
+    DEFINE_PROP_UINT8("sd-spec-version", _state, sd_spec_version, 2), \
+    DEFINE_PROP_UINT8("uhs", _state, uhs_mode, UHS_NOT_SUPPORTED), \
+    \
+    /* Capabilities registers provide information on supported
+     * features of this specific host controller implementation */ \
+    DEFINE_PROP_UINT64("capareg", _state, capareg, SDHC_CAPAB_REG_DEFAULT), \
+    DEFINE_PROP_UINT64("maxcurr", _state, maxcurr, 0)
+
+void sdhci_initfn(SDHCIState *s);
+void sdhci_uninitfn(SDHCIState *s);
+void sdhci_common_realize(SDHCIState *s, Error **errp);
+void sdhci_common_unrealize(SDHCIState *s, Error **errp);
+void sdhci_common_class_init(ObjectClass *klass, void *data);
+
 #endif
diff --git a/hw/sd/sdhci-pci.c b/hw/sd/sdhci-pci.c
new file mode 100644
index 0000000..f884661
--- /dev/null
+++ b/hw/sd/sdhci-pci.c
@@ -0,0 +1,87 @@
+/*
+ * SDHCI device on PCI
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "qemu/osdep.h"
+#include "qapi/error.h"
+#include "hw/hw.h"
+#include "hw/sd/sdhci.h"
+#include "sdhci-internal.h"
+
+static Property sdhci_pci_properties[] = {
+    DEFINE_SDHCI_COMMON_PROPERTIES(SDHCIState),
+    DEFINE_PROP_END_OF_LIST(),
+};
+
+static void sdhci_pci_realize(PCIDevice *dev, Error **errp)
+{
+    SDHCIState *s = PCI_SDHCI(dev);
+    Error *local_err = NULL;
+
+    sdhci_initfn(s);
+    sdhci_common_realize(s, &local_err);
+    if (local_err) {
+        error_propagate(errp, local_err);
+        return;
+    }
+
+    dev->config[PCI_CLASS_PROG] = 0x01; /* Standard Host supported DMA */
+    dev->config[PCI_INTERRUPT_PIN] = 0x01; /* interrupt pin A */
+    s->irq = pci_allocate_irq(dev);
+    s->dma_as = pci_get_address_space(dev);
+    pci_register_bar(dev, 0, PCI_BASE_ADDRESS_SPACE_MEMORY, &s->iomem);
+}
+
+static void sdhci_pci_exit(PCIDevice *dev)
+{
+    SDHCIState *s = PCI_SDHCI(dev);
+
+    sdhci_common_unrealize(s, &error_abort);
+    sdhci_uninitfn(s);
+}
+
+static void sdhci_pci_class_init(ObjectClass *klass, void *data)
+{
+    DeviceClass *dc = DEVICE_CLASS(klass);
+    PCIDeviceClass *k = PCI_DEVICE_CLASS(klass);
+
+    k->realize = sdhci_pci_realize;
+    k->exit = sdhci_pci_exit;
+    k->vendor_id = PCI_VENDOR_ID_REDHAT;
+    k->device_id = PCI_DEVICE_ID_REDHAT_SDHCI;
+    k->class_id = PCI_CLASS_SYSTEM_SDHCI;
+    dc->props = sdhci_pci_properties;
+
+    sdhci_common_class_init(klass, data);
+}
+
+static const TypeInfo sdhci_pci_info = {
+    .name = TYPE_PCI_SDHCI,
+    .parent = TYPE_PCI_DEVICE,
+    .instance_size = sizeof(SDHCIState),
+    .class_init = sdhci_pci_class_init,
+    .interfaces = (InterfaceInfo[]) {
+        { INTERFACE_CONVENTIONAL_PCI_DEVICE },
+        { },
+    },
+};
+
+static void sdhci_pci_register_type(void)
+{
+    type_register_static(&sdhci_pci_info);
+}
+
+type_init(sdhci_pci_register_type)
diff --git a/hw/sd/sdhci.c b/hw/sd/sdhci.c
index 83f1574..17ad546 100644
--- a/hw/sd/sdhci.c
+++ b/hw/sd/sdhci.c
@@ -40,24 +40,6 @@
 
 #define MASKED_WRITE(reg, mask, val)  (reg = (reg & (mask)) | (val))
 
-/* Default SD/MMC host controller features information, which will be
- * presented in CAPABILITIES register of generic SD host controller at reset.
- *
- * support:
- * - 3.3v and 1.8v voltages
- * - SDMA/ADMA1/ADMA2
- * - high-speed
- * max host controller R/W buffers size: 512B
- * max clock frequency for SDclock: 52 MHz
- * timeout clock frequency: 52 MHz
- *
- * does not support:
- * - 3.0v voltage
- * - 64-bit system bus
- * - suspend/resume
- */
-#define SDHC_CAPAB_REG_DEFAULT 0x057834b4
-
 static inline unsigned int sdhci_get_fifolen(SDHCIState *s)
 {
     return 1 << (9 + FIELD_EX32(s->capareg, SDHC_CAPAB, MAXBLOCKLENGTH));
@@ -1328,16 +1310,7 @@ static void sdhci_init_readonly_registers(SDHCIState *s, Error **errp)
 
 /* --- qdev common --- */
 
-#define DEFINE_SDHCI_COMMON_PROPERTIES(_state) \
-    DEFINE_PROP_UINT8("sd-spec-version", _state, sd_spec_version, 2), \
-    DEFINE_PROP_UINT8("uhs", _state, uhs_mode, UHS_NOT_SUPPORTED), \
-    \
-    /* Capabilities registers provide information on supported
-     * features of this specific host controller implementation */ \
-    DEFINE_PROP_UINT64("capareg", _state, capareg, SDHC_CAPAB_REG_DEFAULT), \
-    DEFINE_PROP_UINT64("maxcurr", _state, maxcurr, 0)
-
-static void sdhci_initfn(SDHCIState *s)
+void sdhci_initfn(SDHCIState *s)
 {
     qbus_create_inplace(&s->sdbus, sizeof(s->sdbus),
                         TYPE_SDHCI_BUS, DEVICE(s), "sd-bus");
@@ -1348,7 +1321,7 @@ static void sdhci_initfn(SDHCIState *s)
     s->io_ops = &sdhci_mmio_ops;
 }
 
-static void sdhci_uninitfn(SDHCIState *s)
+void sdhci_uninitfn(SDHCIState *s)
 {
     timer_del(s->insert_timer);
     timer_free(s->insert_timer);
@@ -1359,7 +1332,7 @@ static void sdhci_uninitfn(SDHCIState *s)
     s->fifo_buffer = NULL;
 }
 
-static void sdhci_common_realize(SDHCIState *s, Error **errp)
+void sdhci_common_realize(SDHCIState *s, Error **errp)
 {
     Error *local_err = NULL;
 
@@ -1375,7 +1348,7 @@ static void sdhci_common_realize(SDHCIState *s, Error **errp)
                           SDHC_REGISTERS_MAP_SIZE);
 }
 
-static void sdhci_common_unrealize(SDHCIState *s, Error **errp)
+void sdhci_common_unrealize(SDHCIState *s, Error **errp)
 {
     /* This function is expected to be called only once for each class:
      * - SysBus:    via DeviceClass->unrealize(),
@@ -1445,7 +1418,7 @@ const VMStateDescription sdhci_vmstate = {
     },
 };
 
-static void sdhci_common_class_init(ObjectClass *klass, void *data)
+void sdhci_common_class_init(ObjectClass *klass, void *data)
 {
     DeviceClass *dc = DEVICE_CLASS(klass);
 
@@ -1454,66 +1427,6 @@ static void sdhci_common_class_init(ObjectClass *klass, void *data)
     dc->reset = sdhci_poweron_reset;
 }
 
-/* --- qdev PCI --- */
-
-static Property sdhci_pci_properties[] = {
-    DEFINE_SDHCI_COMMON_PROPERTIES(SDHCIState),
-    DEFINE_PROP_END_OF_LIST(),
-};
-
-static void sdhci_pci_realize(PCIDevice *dev, Error **errp)
-{
-    SDHCIState *s = PCI_SDHCI(dev);
-    Error *local_err = NULL;
-
-    sdhci_initfn(s);
-    sdhci_common_realize(s, &local_err);
-    if (local_err) {
-        error_propagate(errp, local_err);
-        return;
-    }
-
-    dev->config[PCI_CLASS_PROG] = 0x01; /* Standard Host supported DMA */
-    dev->config[PCI_INTERRUPT_PIN] = 0x01; /* interrupt pin A */
-    s->irq = pci_allocate_irq(dev);
-    s->dma_as = pci_get_address_space(dev);
-    pci_register_bar(dev, 0, PCI_BASE_ADDRESS_SPACE_MEMORY, &s->iomem);
-}
-
-static void sdhci_pci_exit(PCIDevice *dev)
-{
-    SDHCIState *s = PCI_SDHCI(dev);
-
-    sdhci_common_unrealize(s, &error_abort);
-    sdhci_uninitfn(s);
-}
-
-static void sdhci_pci_class_init(ObjectClass *klass, void *data)
-{
-    DeviceClass *dc = DEVICE_CLASS(klass);
-    PCIDeviceClass *k = PCI_DEVICE_CLASS(klass);
-
-    k->realize = sdhci_pci_realize;
-    k->exit = sdhci_pci_exit;
-    k->vendor_id = PCI_VENDOR_ID_REDHAT;
-    k->device_id = PCI_DEVICE_ID_REDHAT_SDHCI;
-    k->class_id = PCI_CLASS_SYSTEM_SDHCI;
-    dc->props = sdhci_pci_properties;
-
-    sdhci_common_class_init(klass, data);
-}
-
-static const TypeInfo sdhci_pci_info = {
-    .name = TYPE_PCI_SDHCI,
-    .parent = TYPE_PCI_DEVICE,
-    .instance_size = sizeof(SDHCIState),
-    .class_init = sdhci_pci_class_init,
-    .interfaces = (InterfaceInfo[]) {
-        { INTERFACE_CONVENTIONAL_PCI_DEVICE },
-        { },
-    },
-};
-
 /* --- qdev SysBus --- */
 
 static Property sdhci_sysbus_properties[] = {
@@ -1846,7 +1759,6 @@ static const TypeInfo imx_usdhc_info = {
 
 static void sdhci_register_types(void)
 {
-    type_register_static(&sdhci_pci_info);
     type_register_static(&sdhci_sysbus_info);
     type_register_static(&sdhci_bus_info);
     type_register_static(&imx_usdhc_info);
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [Qemu-devel] [PATCH v4 04/29] hw/arm: Express dependencies of the exynos machines with Kconfig
  2019-03-07 14:18 [Qemu-devel] [PATCH v4 00/29] Kconfig dependencies for ARM machines Thomas Huth
                   ` (2 preceding siblings ...)
  2019-03-07 14:18 ` [Qemu-devel] [PATCH v4 03/29] hw/sd/sdhci: Move PCI-related code into a separate file Thomas Huth
@ 2019-03-07 14:18 ` Thomas Huth
  2019-03-07 14:18 ` [Qemu-devel] [PATCH v4 05/29] hw/arm: Express dependencies of the highbank " Thomas Huth
                   ` (26 subsequent siblings)
  30 siblings, 0 replies; 35+ messages in thread
From: Thomas Huth @ 2019-03-07 14:18 UTC (permalink / raw)
  To: yang.zhong, pbonzini, qemu-devel
  Cc: Philippe Mathieu-Daudé,
	qemu-arm, John Snow, Michael S. Tsirkin, Peter Maydell

Add Kconfig dependencies for the Exynos-related boards (nuri and
smdkc210).
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 | 18 ++++++------------
 hw/arm/Kconfig                  | 11 +++++++++++
 2 files changed, 17 insertions(+), 12 deletions(-)

diff --git a/default-configs/arm-softmmu.mak b/default-configs/arm-softmmu.mak
index 2a7efc1..3475d50 100644
--- a/default-configs/arm-softmmu.mak
+++ b/default-configs/arm-softmmu.mak
@@ -1,7 +1,12 @@
 # Default configuration for arm-softmmu
 
-CONFIG_PCI=y
+# TODO: ARM_V7M is currently always required - make this more flexible!
+CONFIG_ARM_V7M=y
+
 CONFIG_PCI_DEVICES=y
+
+CONFIG_EXYNOS4=y
+
 CONFIG_VGA=y
 CONFIG_NAND=y
 CONFIG_ECC=y
@@ -25,7 +30,6 @@ CONFIG_ADS7846=y
 CONFIG_MAX111X=y
 CONFIG_SSI_SD=y
 CONFIG_SSI_M25P80=y
-CONFIG_LAN9118=y
 CONFIG_SMC91C111=y
 CONFIG_ALLWINNER_EMAC=y
 CONFIG_IMX_FEC=y
@@ -35,21 +39,15 @@ CONFIG_PFLASH_CFI01=y
 CONFIG_PFLASH_CFI02=y
 CONFIG_MICRODRIVE=y
 CONFIG_USB_MUSB=y
-CONFIG_USB_EHCI_SYSBUS=y
 CONFIG_PLATFORM_BUS=y
 CONFIG_VIRTIO_MMIO=y
 
 CONFIG_ARM11MPCORE=y
-CONFIG_A9MPCORE=y
 CONFIG_A15MPCORE=y
 
-CONFIG_ARM_V7M=y
 CONFIG_NETDUINO2=y
 
-CONFIG_ARM_GIC=y
 CONFIG_ARM_TIMER=y
-CONFIG_ARM_MPTIMER=y
-CONFIG_A9_GTIMER=y
 CONFIG_PL011=y
 CONFIG_PL022=y
 CONFIG_PL031=y
@@ -60,11 +58,9 @@ CONFIG_PL080=y
 CONFIG_PL110=y
 CONFIG_PL181=y
 CONFIG_PL190=y
-CONFIG_PL310=y
 CONFIG_PL330=y
 CONFIG_CADENCE=y
 CONFIG_XGMAC=y
-CONFIG_EXYNOS4=y
 CONFIG_PXA2XX=y
 CONFIG_BITBANG_I2C=y
 CONFIG_FRAMEBUFFER=y
@@ -72,7 +68,6 @@ CONFIG_XILINX_SPIPS=y
 CONFIG_ZYNQ_DEVCFG=y
 
 CONFIG_ARM11SCU=y
-CONFIG_A9SCU=y
 CONFIG_DIGIC=y
 CONFIG_MARVELL_88W8618=y
 CONFIG_OMAP=y
@@ -122,7 +117,6 @@ CONFIG_VERSATILE_I2C=y
 CONFIG_PCI_EXPRESS=y
 CONFIG_PCI_EXPRESS_GENERIC_BRIDGE=y
 
-CONFIG_SDHCI=y
 CONFIG_INTEGRATOR=y
 CONFIG_INTEGRATOR_DEBUG=y
 
diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig
index d298fbd..74436cc 100644
--- a/hw/arm/Kconfig
+++ b/hw/arm/Kconfig
@@ -8,7 +8,14 @@ config DIGIC
 
 config EXYNOS4
     bool
+    select A9MPCORE
+    select I2C
+    select LAN9118
+    select PCI
+    select PL310 # cache controller
     select PTIMER
+    select SDHCI
+    select USB_EHCI_SYSBUS
 
 config HIGHBANK
     bool
@@ -104,6 +111,10 @@ config ZAURUS
 
 config A9MPCORE
     bool
+    select A9_GTIMER
+    select A9SCU       # snoop control unit
+    select ARM_GIC
+    select ARM_MPTIMER
 
 config A15MPCORE
     bool
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [Qemu-devel] [PATCH v4 05/29] hw/arm: Express dependencies of the highbank machines with Kconfig
  2019-03-07 14:18 [Qemu-devel] [PATCH v4 00/29] Kconfig dependencies for ARM machines Thomas Huth
                   ` (3 preceding siblings ...)
  2019-03-07 14:18 ` [Qemu-devel] [PATCH v4 04/29] hw/arm: Express dependencies of the exynos machines with Kconfig Thomas Huth
@ 2019-03-07 14:18 ` Thomas Huth
  2019-03-07 14:18 ` [Qemu-devel] [PATCH v4 06/29] hw/arm: Express dependencies of integratorcp " Thomas Huth
                   ` (25 subsequent siblings)
  30 siblings, 0 replies; 35+ messages in thread
From: Thomas Huth @ 2019-03-07 14:18 UTC (permalink / raw)
  To: yang.zhong, pbonzini, qemu-devel
  Cc: Philippe Mathieu-Daudé,
	qemu-arm, John Snow, Michael S. Tsirkin, Peter Maydell

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 |  9 +--------
 hw/arm/Kconfig                  | 12 ++++++++++++
 2 files changed, 13 insertions(+), 8 deletions(-)

diff --git a/default-configs/arm-softmmu.mak b/default-configs/arm-softmmu.mak
index 3475d50..13cfffa 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
@@ -43,24 +44,17 @@ CONFIG_PLATFORM_BUS=y
 CONFIG_VIRTIO_MMIO=y
 
 CONFIG_ARM11MPCORE=y
-CONFIG_A15MPCORE=y
 
 CONFIG_NETDUINO2=y
 
-CONFIG_ARM_TIMER=y
-CONFIG_PL011=y
-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
@@ -148,7 +142,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 74436cc..2747e2b 100644
--- a/hw/arm/Kconfig
+++ b/hw/arm/Kconfig
@@ -19,6 +19,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
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [Qemu-devel] [PATCH v4 06/29] hw/arm: Express dependencies of integratorcp with Kconfig
  2019-03-07 14:18 [Qemu-devel] [PATCH v4 00/29] Kconfig dependencies for ARM machines Thomas Huth
                   ` (4 preceding siblings ...)
  2019-03-07 14:18 ` [Qemu-devel] [PATCH v4 05/29] hw/arm: Express dependencies of the highbank " Thomas Huth
@ 2019-03-07 14:18 ` Thomas Huth
  2019-03-07 14:18 ` [Qemu-devel] [PATCH v4 07/29] hw/arm: Express dependencies of the fsl-imx31 machine " Thomas Huth
                   ` (24 subsequent siblings)
  30 siblings, 0 replies; 35+ messages in thread
From: Thomas Huth @ 2019-03-07 14:18 UTC (permalink / raw)
  To: yang.zhong, pbonzini, qemu-devel
  Cc: Philippe Mathieu-Daudé,
	qemu-arm, John Snow, Michael S. Tsirkin, Peter Maydell

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 | 8 +-------
 hw/arm/Kconfig                  | 9 +++++++++
 hw/display/Kconfig              | 1 +
 3 files changed, 11 insertions(+), 7 deletions(-)

diff --git a/default-configs/arm-softmmu.mak b/default-configs/arm-softmmu.mak
index 13cfffa..51032c5 100644
--- a/default-configs/arm-softmmu.mak
+++ b/default-configs/arm-softmmu.mak
@@ -7,6 +7,7 @@ CONFIG_PCI_DEVICES=y
 
 CONFIG_EXYNOS4=y
 CONFIG_HIGHBANK=y
+CONFIG_INTEGRATOR=y
 
 CONFIG_VGA=y
 CONFIG_NAND=y
@@ -31,7 +32,6 @@ CONFIG_ADS7846=y
 CONFIG_MAX111X=y
 CONFIG_SSI_SD=y
 CONFIG_SSI_M25P80=y
-CONFIG_SMC91C111=y
 CONFIG_ALLWINNER_EMAC=y
 CONFIG_IMX_FEC=y
 CONFIG_FTGMAC100=y
@@ -48,10 +48,7 @@ CONFIG_ARM11MPCORE=y
 CONFIG_NETDUINO2=y
 
 CONFIG_PL041=y
-CONFIG_PL050=y
 CONFIG_PL080=y
-CONFIG_PL110=y
-CONFIG_PL181=y
 CONFIG_PL190=y
 CONFIG_PL330=y
 CONFIG_CADENCE=y
@@ -111,9 +108,6 @@ CONFIG_VERSATILE_I2C=y
 CONFIG_PCI_EXPRESS=y
 CONFIG_PCI_EXPRESS_GENERIC_BRIDGE=y
 
-CONFIG_INTEGRATOR=y
-CONFIG_INTEGRATOR_DEBUG=y
-
 CONFIG_ALLWINNER_A10_PIT=y
 CONFIG_ALLWINNER_A10_PIC=y
 CONFIG_ALLWINNER_A10=y
diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig
index 2747e2b..a08a863 100644
--- a/hw/arm/Kconfig
+++ b/hw/arm/Kconfig
@@ -34,6 +34,15 @@ config HIGHBANK
 
 config INTEGRATOR
     bool
+    select ARM_TIMER
+    select INTEGRATOR_DEBUG
+    select PL011 # UART
+    select PL031 # RTC
+    select PL050 # keyboard/mouse
+    select PL110 # pl111 LCD controller
+    select PL181 # display
+    select PCI
+    select SMC91C111
 
 config MAINSTONE
     bool
diff --git a/hw/display/Kconfig b/hw/display/Kconfig
index a96ea76..364d628 100644
--- a/hw/display/Kconfig
+++ b/hw/display/Kconfig
@@ -21,6 +21,7 @@ config JAZZ_LED
 
 config PL110
     bool
+    select FRAMEBUFFER
 
 config SII9022
     bool
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [Qemu-devel] [PATCH v4 07/29] hw/arm: Express dependencies of the fsl-imx31 machine with Kconfig
  2019-03-07 14:18 [Qemu-devel] [PATCH v4 00/29] Kconfig dependencies for ARM machines Thomas Huth
                   ` (5 preceding siblings ...)
  2019-03-07 14:18 ` [Qemu-devel] [PATCH v4 06/29] hw/arm: Express dependencies of integratorcp " Thomas Huth
@ 2019-03-07 14:18 ` Thomas Huth
  2019-03-07 14:18 ` [Qemu-devel] [PATCH v4 08/29] hw/arm: Express dependencies of musicpal " Thomas Huth
                   ` (23 subsequent siblings)
  30 siblings, 0 replies; 35+ messages in thread
From: Thomas Huth @ 2019-03-07 14:18 UTC (permalink / raw)
  To: yang.zhong, pbonzini, qemu-devel
  Cc: Philippe Mathieu-Daudé,
	qemu-arm, John Snow, Michael S. Tsirkin, Peter Maydell

Add Kconfig dependencies for the fsl-imx31 / kzm 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 | 3 +--
 hw/arm/Kconfig                  | 5 +++++
 hw/misc/Kconfig                 | 2 ++
 3 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/default-configs/arm-softmmu.mak b/default-configs/arm-softmmu.mak
index 51032c5..a2e74cd 100644
--- a/default-configs/arm-softmmu.mak
+++ b/default-configs/arm-softmmu.mak
@@ -8,6 +8,7 @@ CONFIG_PCI_DEVICES=y
 CONFIG_EXYNOS4=y
 CONFIG_HIGHBANK=y
 CONFIG_INTEGRATOR=y
+CONFIG_FSL_IMX31=y
 
 CONFIG_VGA=y
 CONFIG_NAND=y
@@ -66,7 +67,6 @@ CONFIG_TSC210X=y
 CONFIG_BLIZZARD=y
 CONFIG_ONENAND=y
 CONFIG_TUSB6010=y
-CONFIG_IMX=y
 CONFIG_MAINSTONE=y
 CONFIG_MPS2=y
 CONFIG_MUSCA=y
@@ -113,7 +113,6 @@ CONFIG_ALLWINNER_A10_PIC=y
 CONFIG_ALLWINNER_A10=y
 
 CONFIG_FSL_IMX6=y
-CONFIG_FSL_IMX31=y
 CONFIG_FSL_IMX25=y
 CONFIG_FSL_IMX7=y
 CONFIG_FSL_IMX6UL=y
diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig
index a08a863..40c79d2 100644
--- a/hw/arm/Kconfig
+++ b/hw/arm/Kconfig
@@ -101,6 +101,11 @@ config FSL_IMX25
 
 config FSL_IMX31
     bool
+    select SERIAL
+    select IMX
+    select IMX_I2C
+    select LAN9118
+    select PCI
 
 config FSL_IMX6
     bool
diff --git a/hw/misc/Kconfig b/hw/misc/Kconfig
index 2c60be9..4db73ec 100644
--- a/hw/misc/Kconfig
+++ b/hw/misc/Kconfig
@@ -76,6 +76,8 @@ config ECCMEMCTL
 config IMX
     bool
     select PTIMER
+    select SSI
+    select USB_EHCI_SYSBUS
 
 config STM32F2XX_SYSCFG
     bool
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [Qemu-devel] [PATCH v4 08/29] hw/arm: Express dependencies of musicpal with Kconfig
  2019-03-07 14:18 [Qemu-devel] [PATCH v4 00/29] Kconfig dependencies for ARM machines Thomas Huth
                   ` (6 preceding siblings ...)
  2019-03-07 14:18 ` [Qemu-devel] [PATCH v4 07/29] hw/arm: Express dependencies of the fsl-imx31 machine " Thomas Huth
@ 2019-03-07 14:18 ` Thomas Huth
  2019-03-07 14:18 ` [Qemu-devel] [PATCH v4 09/29] hw/arm: Express dependencies of the OMAP machines " Thomas Huth
                   ` (22 subsequent siblings)
  30 siblings, 0 replies; 35+ messages in thread
From: Thomas Huth @ 2019-03-07 14:18 UTC (permalink / raw)
  To: yang.zhong, pbonzini, qemu-devel
  Cc: Philippe Mathieu-Daudé,
	qemu-arm, John Snow, Michael S. Tsirkin, Peter Maydell

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 | 6 +-----
 hw/arm/Kconfig                  | 6 ++++++
 2 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/default-configs/arm-softmmu.mak b/default-configs/arm-softmmu.mak
index a2e74cd..a058bcb 100644
--- a/default-configs/arm-softmmu.mak
+++ b/default-configs/arm-softmmu.mak
@@ -9,13 +9,13 @@ CONFIG_EXYNOS4=y
 CONFIG_HIGHBANK=y
 CONFIG_INTEGRATOR=y
 CONFIG_FSL_IMX31=y
+CONFIG_MUSICPAL=y
 
 CONFIG_VGA=y
 CONFIG_NAND=y
 CONFIG_ECC=y
 CONFIG_SERIAL=y
 CONFIG_MAX7310=y
-CONFIG_WM8750=y
 CONFIG_TWL92230=y
 CONFIG_TSC2005=y
 CONFIG_LM832X=y
@@ -38,7 +38,6 @@ CONFIG_IMX_FEC=y
 CONFIG_FTGMAC100=y
 CONFIG_DS1338=y
 CONFIG_PFLASH_CFI01=y
-CONFIG_PFLASH_CFI02=y
 CONFIG_MICRODRIVE=y
 CONFIG_USB_MUSB=y
 CONFIG_PLATFORM_BUS=y
@@ -54,14 +53,12 @@ CONFIG_PL190=y
 CONFIG_PL330=y
 CONFIG_CADENCE=y
 CONFIG_PXA2XX=y
-CONFIG_BITBANG_I2C=y
 CONFIG_FRAMEBUFFER=y
 CONFIG_XILINX_SPIPS=y
 CONFIG_ZYNQ_DEVCFG=y
 
 CONFIG_ARM11SCU=y
 CONFIG_DIGIC=y
-CONFIG_MARVELL_88W8618=y
 CONFIG_OMAP=y
 CONFIG_TSC210X=y
 CONFIG_BLIZZARD=y
@@ -135,7 +132,6 @@ CONFIG_XILINX_AXI=y
 CONFIG_PCI_EXPRESS_DESIGNWARE=y
 
 CONFIG_STRONGARM=y
-CONFIG_MUSICPAL=y
 
 # for realview and versatilepb
 CONFIG_LSI_SCSI_PCI=y
diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig
index 40c79d2..08c213d 100644
--- a/hw/arm/Kconfig
+++ b/hw/arm/Kconfig
@@ -49,7 +49,13 @@ config MAINSTONE
 
 config MUSICPAL
     bool
+    select BITBANG_I2C
+    select MARVELL_88W8618
     select PTIMER
+    select PFLASH_CFI02
+    select PCI
+    select SERIAL
+    select WM8750
 
 config NETDUINO2
     bool
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [Qemu-devel] [PATCH v4 09/29] hw/arm: Express dependencies of the OMAP machines with Kconfig
  2019-03-07 14:18 [Qemu-devel] [PATCH v4 00/29] Kconfig dependencies for ARM machines Thomas Huth
                   ` (7 preceding siblings ...)
  2019-03-07 14:18 ` [Qemu-devel] [PATCH v4 08/29] hw/arm: Express dependencies of musicpal " Thomas Huth
@ 2019-03-07 14:18 ` Thomas Huth
  2019-03-07 14:18 ` [Qemu-devel] [PATCH v4 10/29] hw/arm: Express dependencies of stellaris " Thomas Huth
                   ` (21 subsequent siblings)
  30 siblings, 0 replies; 35+ messages in thread
From: Thomas Huth @ 2019-03-07 14:18 UTC (permalink / raw)
  To: yang.zhong, pbonzini, qemu-devel
  Cc: Philippe Mathieu-Daudé,
	qemu-arm, John Snow, Michael S. Tsirkin, Peter Maydell

Add Kconfig dependencies for the OMAP machines (cheetah, n800, n810,
sx1 and sx1-v1).
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 | 17 ++++-------------
 hw/arm/Kconfig                  | 26 ++++++++++++++++++++++++++
 hw/arm/Makefile.objs            |  3 ++-
 3 files changed, 32 insertions(+), 14 deletions(-)

diff --git a/default-configs/arm-softmmu.mak b/default-configs/arm-softmmu.mak
index a058bcb..2c07f5c 100644
--- a/default-configs/arm-softmmu.mak
+++ b/default-configs/arm-softmmu.mak
@@ -10,16 +10,16 @@ CONFIG_HIGHBANK=y
 CONFIG_INTEGRATOR=y
 CONFIG_FSL_IMX31=y
 CONFIG_MUSICPAL=y
+CONFIG_MUSCA=y
+CONFIG_CHEETAH=y
+CONFIG_SX1=y
+CONFIG_NSERIES=y
 
 CONFIG_VGA=y
 CONFIG_NAND=y
 CONFIG_ECC=y
 CONFIG_SERIAL=y
 CONFIG_MAX7310=y
-CONFIG_TWL92230=y
-CONFIG_TSC2005=y
-CONFIG_LM832X=y
-CONFIG_TMP105=y
 CONFIG_TMP421=y
 CONFIG_PCA9552=y
 CONFIG_STELLARIS=y
@@ -37,9 +37,7 @@ CONFIG_ALLWINNER_EMAC=y
 CONFIG_IMX_FEC=y
 CONFIG_FTGMAC100=y
 CONFIG_DS1338=y
-CONFIG_PFLASH_CFI01=y
 CONFIG_MICRODRIVE=y
-CONFIG_USB_MUSB=y
 CONFIG_PLATFORM_BUS=y
 CONFIG_VIRTIO_MMIO=y
 
@@ -59,15 +57,8 @@ CONFIG_ZYNQ_DEVCFG=y
 
 CONFIG_ARM11SCU=y
 CONFIG_DIGIC=y
-CONFIG_OMAP=y
-CONFIG_TSC210X=y
-CONFIG_BLIZZARD=y
-CONFIG_ONENAND=y
-CONFIG_TUSB6010=y
 CONFIG_MAINSTONE=y
 CONFIG_MPS2=y
-CONFIG_MUSCA=y
-CONFIG_NSERIES=y
 CONFIG_RASPI=y
 CONFIG_REALVIEW=y
 CONFIG_ZAURUS=y
diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig
index 08c213d..cfb3ab1 100644
--- a/hw/arm/Kconfig
+++ b/hw/arm/Kconfig
@@ -2,6 +2,11 @@ config ARM_VIRT
     bool
     imply VFIO_PLATFORM
 
+config CHEETAH
+    bool
+    select OMAP
+    select TSC210X
+
 config DIGIC
     bool
     select PTIMER
@@ -62,9 +67,26 @@ config NETDUINO2
 
 config NSERIES
     bool
+    select OMAP
+    select TMP105   # tempature sensor
+    select BLIZZARD # LCD/TV controller
+    select ONENAND
+    select TSC210X  # touchscreen/sensors/audio
+    select TSC2005  # touchscreen/sensors/keypad
+    select LM832X   # GPIO keyboard chip
+    select TWL92230 # energy-management
+    select TUSB6010
 
 config OMAP
     bool
+    select FRAMEBUFFER
+    select I2C
+    select ECC
+    select NAND
+    select PFLASH_CFI01
+    select PCI
+    select SD
+    select SERIAL
 
 config PXA2XX
     bool
@@ -78,6 +100,10 @@ config STELLARIS
 config STRONGARM
     bool
 
+config SX1
+    bool
+    select OMAP
+
 config VERSATILE
     bool
 
diff --git a/hw/arm/Makefile.objs b/hw/arm/Makefile.objs
index fa57c7c..8302b8d 100644
--- a/hw/arm/Makefile.objs
+++ b/hw/arm/Makefile.objs
@@ -9,7 +9,8 @@ obj-$(CONFIG_MAINSTONE) += mainstone.o
 obj-$(CONFIG_MUSICPAL) += musicpal.o
 obj-$(CONFIG_NETDUINO2) += netduino2.o
 obj-$(CONFIG_NSERIES) += nseries.o
-obj-$(CONFIG_OMAP) += omap_sx1.o palm.o
+obj-$(CONFIG_SX1) += omap_sx1.o
+obj-$(CONFIG_CHEETAH) += palm.o
 obj-$(CONFIG_PXA2XX) += gumstix.o spitz.o tosa.o z2.o
 obj-$(CONFIG_REALVIEW) += realview.o
 obj-$(CONFIG_STELLARIS) += stellaris.o
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [Qemu-devel] [PATCH v4 10/29] hw/arm: Express dependencies of stellaris with Kconfig
  2019-03-07 14:18 [Qemu-devel] [PATCH v4 00/29] Kconfig dependencies for ARM machines Thomas Huth
                   ` (8 preceding siblings ...)
  2019-03-07 14:18 ` [Qemu-devel] [PATCH v4 09/29] hw/arm: Express dependencies of the OMAP machines " Thomas Huth
@ 2019-03-07 14:18 ` Thomas Huth
  2019-03-07 14:18 ` [Qemu-devel] [PATCH v4 11/29] hw/arm: Express dependencies of realview, versatile and vexpress " Thomas Huth
                   ` (20 subsequent siblings)
  30 siblings, 0 replies; 35+ messages in thread
From: Thomas Huth @ 2019-03-07 14:18 UTC (permalink / raw)
  To: yang.zhong, pbonzini, qemu-devel
  Cc: Philippe Mathieu-Daudé,
	qemu-arm, John Snow, Michael S. Tsirkin, Peter Maydell

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 |  7 +------
 hw/arm/Kconfig                  | 10 ++++++++++
 2 files changed, 11 insertions(+), 6 deletions(-)

diff --git a/default-configs/arm-softmmu.mak b/default-configs/arm-softmmu.mak
index 2c07f5c..46ec4eb 100644
--- a/default-configs/arm-softmmu.mak
+++ b/default-configs/arm-softmmu.mak
@@ -14,6 +14,7 @@ CONFIG_MUSCA=y
 CONFIG_CHEETAH=y
 CONFIG_SX1=y
 CONFIG_NSERIES=y
+CONFIG_STELLARIS=y
 
 CONFIG_VGA=y
 CONFIG_NAND=y
@@ -22,16 +23,10 @@ CONFIG_SERIAL=y
 CONFIG_MAX7310=y
 CONFIG_TMP421=y
 CONFIG_PCA9552=y
-CONFIG_STELLARIS=y
-CONFIG_STELLARIS_INPUT=y
-CONFIG_STELLARIS_ENET=y
-CONFIG_SSD0303=y
-CONFIG_SSD0323=y
 CONFIG_DDC=y
 CONFIG_SII9022=y
 CONFIG_ADS7846=y
 CONFIG_MAX111X=y
-CONFIG_SSI_SD=y
 CONFIG_SSI_M25P80=y
 CONFIG_ALLWINNER_EMAC=y
 CONFIG_IMX_FEC=y
diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig
index cfb3ab1..cb19fd3 100644
--- a/hw/arm/Kconfig
+++ b/hw/arm/Kconfig
@@ -96,6 +96,16 @@ config REALVIEW
 
 config STELLARIS
     bool
+    select ARM_V7M
+    select I2C
+    select PL011 # UART
+    select PL022 # Serial port
+    select PL061 # GPIO
+    select SSD0303 # OLED display
+    select SSD0323 # OLED display
+    select SSI_SD
+    select STELLARIS_INPUT
+    select STELLARIS_ENET # ethernet
 
 config STRONGARM
     bool
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [Qemu-devel] [PATCH v4 11/29] hw/arm: Express dependencies of realview, versatile and vexpress with Kconfig
  2019-03-07 14:18 [Qemu-devel] [PATCH v4 00/29] Kconfig dependencies for ARM machines Thomas Huth
                   ` (9 preceding siblings ...)
  2019-03-07 14:18 ` [Qemu-devel] [PATCH v4 10/29] hw/arm: Express dependencies of stellaris " Thomas Huth
@ 2019-03-07 14:18 ` Thomas Huth
  2019-03-07 14:18 ` [Qemu-devel] [PATCH v4 12/29] hw/arm: Express dependencies of the PXA2xx machines " Thomas Huth
                   ` (19 subsequent siblings)
  30 siblings, 0 replies; 35+ messages in thread
From: Thomas Huth @ 2019-03-07 14:18 UTC (permalink / raw)
  To: yang.zhong, pbonzini, qemu-devel
  Cc: Philippe Mathieu-Daudé,
	qemu-arm, John Snow, Michael S. Tsirkin, Peter Maydell

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 | 21 +++---------------
 hw/arm/Kconfig                  | 47 +++++++++++++++++++++++++++++++++++++++++
 hw/arm/Makefile.objs            |  3 ++-
 hw/display/Kconfig              |  1 +
 hw/i2c/Kconfig                  |  2 +-
 5 files changed, 54 insertions(+), 20 deletions(-)

diff --git a/default-configs/arm-softmmu.mak b/default-configs/arm-softmmu.mak
index 46ec4eb..41df0af 100644
--- a/default-configs/arm-softmmu.mak
+++ b/default-configs/arm-softmmu.mak
@@ -3,8 +3,6 @@
 # TODO: ARM_V7M is currently always required - make this more flexible!
 CONFIG_ARM_V7M=y
 
-CONFIG_PCI_DEVICES=y
-
 CONFIG_EXYNOS4=y
 CONFIG_HIGHBANK=y
 CONFIG_INTEGRATOR=y
@@ -15,6 +13,9 @@ CONFIG_CHEETAH=y
 CONFIG_SX1=y
 CONFIG_NSERIES=y
 CONFIG_STELLARIS=y
+CONFIG_REALVIEW=y
+CONFIG_VERSATILE=y
+CONFIG_VEXPRESS=y
 
 CONFIG_VGA=y
 CONFIG_NAND=y
@@ -23,8 +24,6 @@ CONFIG_SERIAL=y
 CONFIG_MAX7310=y
 CONFIG_TMP421=y
 CONFIG_PCA9552=y
-CONFIG_DDC=y
-CONFIG_SII9022=y
 CONFIG_ADS7846=y
 CONFIG_MAX111X=y
 CONFIG_SSI_M25P80=y
@@ -36,13 +35,8 @@ CONFIG_MICRODRIVE=y
 CONFIG_PLATFORM_BUS=y
 CONFIG_VIRTIO_MMIO=y
 
-CONFIG_ARM11MPCORE=y
-
 CONFIG_NETDUINO2=y
 
-CONFIG_PL041=y
-CONFIG_PL080=y
-CONFIG_PL190=y
 CONFIG_PL330=y
 CONFIG_CADENCE=y
 CONFIG_PXA2XX=y
@@ -50,12 +44,10 @@ CONFIG_FRAMEBUFFER=y
 CONFIG_XILINX_SPIPS=y
 CONFIG_ZYNQ_DEVCFG=y
 
-CONFIG_ARM11SCU=y
 CONFIG_DIGIC=y
 CONFIG_MAINSTONE=y
 CONFIG_MPS2=y
 CONFIG_RASPI=y
-CONFIG_REALVIEW=y
 CONFIG_ZAURUS=y
 CONFIG_ZYNQ=y
 CONFIG_STM32F2XX_TIMER=y
@@ -84,10 +76,6 @@ CONFIG_IOTKIT_SYSINFO=y
 CONFIG_ARMSSE_CPUID=y
 CONFIG_ARMSSE_MHU=y
 
-CONFIG_VERSATILE=y
-CONFIG_VERSATILE_PCI=y
-CONFIG_VERSATILE_I2C=y
-
 CONFIG_PCI_EXPRESS=y
 CONFIG_PCI_EXPRESS_GENERIC_BRIDGE=y
 
@@ -118,6 +106,3 @@ CONFIG_XILINX_AXI=y
 CONFIG_PCI_EXPRESS_DESIGNWARE=y
 
 CONFIG_STRONGARM=y
-
-# for realview and versatilepb
-CONFIG_LSI_SCSI_PCI=y
diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig
index cb19fd3..2a82a4f 100644
--- a/hw/arm/Kconfig
+++ b/hw/arm/Kconfig
@@ -93,6 +93,29 @@ config PXA2XX
 
 config REALVIEW
     bool
+    imply PCI_DEVICES
+    select SMC91C111
+    select LAN9118
+    select A9MPCORE
+    select A15MPCORE
+    select ARM11MPCORE
+    select ARM_TIMER
+    select VERSATILE_PCI
+    select WM8750 # audio codec
+    select LSI_SCSI_PCI
+    select PCI
+    select PL011  # UART
+    select PL031  # RTC
+    select PL041  # audio codec
+    select PL050  # keyboard/mouse
+    select PL061  # GPIO
+    select PL080  # DMA controller
+    select PL110
+    select PL181  # display
+    select PL310  # cache controller
+    select VERSATILE_I2C
+    select DS1338 # I2C RTC+NVRAM
+    select USB_OHCI
 
 config STELLARIS
     bool
@@ -116,6 +139,29 @@ config SX1
 
 config VERSATILE
     bool
+    select ARM_TIMER # sp804
+    select PFLASH_CFI01
+    select LSI_SCSI_PCI
+    select PL050  # keyboard/mouse
+    select PL080  # DMA controller
+    select PL190  # Vector PIC
+    select REALVIEW
+    select USB_OHCI
+
+config VEXPRESS
+    bool
+    select A9MPCORE
+    select A15MPCORE
+    select ARM_MPTIMER
+    select ARM_TIMER # sp804
+    select LAN9118
+    select PFLASH_CFI01
+    select PL011 # UART
+    select PL041 # audio codec
+    select PL181  # display
+    select REALVIEW
+    select SII9022
+    select VIRTIO_MMIO
 
 config ZYNQ
     bool
@@ -189,6 +235,7 @@ config A15MPCORE
 
 config ARM11MPCORE
     bool
+    select ARM11SCU
 
 config ARMSSE
     bool
diff --git a/hw/arm/Makefile.objs b/hw/arm/Makefile.objs
index 8302b8d..bd0b45a 100644
--- a/hw/arm/Makefile.objs
+++ b/hw/arm/Makefile.objs
@@ -15,7 +15,8 @@ obj-$(CONFIG_PXA2XX) += gumstix.o spitz.o tosa.o z2.o
 obj-$(CONFIG_REALVIEW) += realview.o
 obj-$(CONFIG_STELLARIS) += stellaris.o
 obj-$(CONFIG_STRONGARM) += collie.o
-obj-$(CONFIG_VERSATILE) += vexpress.o versatilepb.o
+obj-$(CONFIG_VERSATILE) += versatilepb.o
+obj-$(CONFIG_VEXPRESS) += vexpress.o
 obj-$(CONFIG_ZYNQ) += xilinx_zynq.o
 
 obj-$(CONFIG_ARM_V7M) += armv7m.o
diff --git a/hw/display/Kconfig b/hw/display/Kconfig
index 364d628..25116e6 100644
--- a/hw/display/Kconfig
+++ b/hw/display/Kconfig
@@ -26,6 +26,7 @@ config PL110
 config SII9022
     bool
     depends on I2C
+    select DDC
 
 config SSD0303
     bool
diff --git a/hw/i2c/Kconfig b/hw/i2c/Kconfig
index ef1caa6..0004893 100644
--- a/hw/i2c/Kconfig
+++ b/hw/i2c/Kconfig
@@ -12,7 +12,7 @@ config DDC
 
 config VERSATILE_I2C
     bool
-    select I2C
+    select BITBANG_I2C
 
 config ACPI_SMBUS
     bool
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [Qemu-devel] [PATCH v4 12/29] hw/arm: Express dependencies of the PXA2xx machines with Kconfig
  2019-03-07 14:18 [Qemu-devel] [PATCH v4 00/29] Kconfig dependencies for ARM machines Thomas Huth
                   ` (10 preceding siblings ...)
  2019-03-07 14:18 ` [Qemu-devel] [PATCH v4 11/29] hw/arm: Express dependencies of realview, versatile and vexpress " Thomas Huth
@ 2019-03-07 14:18 ` Thomas Huth
  2019-03-07 14:18 ` [Qemu-devel] [PATCH v4 13/29] hw/arm: Express dependencies of xilinx-zynq " Thomas Huth
                   ` (18 subsequent siblings)
  30 siblings, 0 replies; 35+ messages in thread
From: Thomas Huth @ 2019-03-07 14:18 UTC (permalink / raw)
  To: yang.zhong, pbonzini, qemu-devel
  Cc: Philippe Mathieu-Daudé,
	qemu-arm, John Snow, Michael S. Tsirkin, Peter Maydell

Add Kconfig dependencies for the PXA2xx machines (akita, borzoi,
connex and verdex gumstix, tosa, mainstone, spitz, terrier and z2).
This patch is 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 | 15 +++++---------
 hw/arm/Kconfig                  | 43 +++++++++++++++++++++++++++++++++++++++++
 hw/arm/Makefile.objs            |  5 ++++-
 3 files changed, 52 insertions(+), 11 deletions(-)

diff --git a/default-configs/arm-softmmu.mak b/default-configs/arm-softmmu.mak
index 41df0af..f3ac12c 100644
--- a/default-configs/arm-softmmu.mak
+++ b/default-configs/arm-softmmu.mak
@@ -16,22 +16,20 @@ CONFIG_STELLARIS=y
 CONFIG_REALVIEW=y
 CONFIG_VERSATILE=y
 CONFIG_VEXPRESS=y
+CONFIG_MAINSTONE=y
+CONFIG_GUMSTIX=y
+CONFIG_SPITZ=y
+CONFIG_TOSA=y
+CONFIG_Z2=y
 
 CONFIG_VGA=y
-CONFIG_NAND=y
-CONFIG_ECC=y
-CONFIG_SERIAL=y
-CONFIG_MAX7310=y
 CONFIG_TMP421=y
 CONFIG_PCA9552=y
-CONFIG_ADS7846=y
-CONFIG_MAX111X=y
 CONFIG_SSI_M25P80=y
 CONFIG_ALLWINNER_EMAC=y
 CONFIG_IMX_FEC=y
 CONFIG_FTGMAC100=y
 CONFIG_DS1338=y
-CONFIG_MICRODRIVE=y
 CONFIG_PLATFORM_BUS=y
 CONFIG_VIRTIO_MMIO=y
 
@@ -39,16 +37,13 @@ CONFIG_NETDUINO2=y
 
 CONFIG_PL330=y
 CONFIG_CADENCE=y
-CONFIG_PXA2XX=y
 CONFIG_FRAMEBUFFER=y
 CONFIG_XILINX_SPIPS=y
 CONFIG_ZYNQ_DEVCFG=y
 
 CONFIG_DIGIC=y
-CONFIG_MAINSTONE=y
 CONFIG_MPS2=y
 CONFIG_RASPI=y
-CONFIG_ZAURUS=y
 CONFIG_ZYNQ=y
 CONFIG_STM32F2XX_TIMER=y
 CONFIG_STM32F2XX_USART=y
diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig
index 2a82a4f..1a3ad0f 100644
--- a/hw/arm/Kconfig
+++ b/hw/arm/Kconfig
@@ -51,6 +51,9 @@ config INTEGRATOR
 
 config MAINSTONE
     bool
+    select PXA2XX
+    select PFLASH_CFI01
+    select SMC91C111
 
 config MUSICPAL
     bool
@@ -90,6 +93,44 @@ config OMAP
 
 config PXA2XX
     bool
+    select FRAMEBUFFER
+    select I2C
+    select PCI
+    select SERIAL
+    select SD
+    select SSI
+    select USB_OHCI
+
+config GUMSTIX
+    bool
+    select PFLASH_CFI01
+    select SMC91C111
+    select PXA2XX
+
+config TOSA
+    bool
+    select ZAURUS  # scoop
+    select MICRODRIVE
+    select PXA2XX
+
+config SPITZ
+    bool
+    select ADS7846 # display
+    select MAX111X # A/D converter
+    select WM8750  # audio codec
+    select MAX7310 # GPIO expander
+    select ZAURUS  # scoop
+    select NAND    # memory
+    select ECC     # Error-correcting for NAND
+    select MICRODRIVE
+    select PXA2XX
+
+config Z2
+    bool
+    select PFLASH_CFI01
+    select WM8750
+    select PL011 # UART
+    select PXA2XX
 
 config REALVIEW
     bool
@@ -222,6 +263,8 @@ config MSF2
 
 config ZAURUS
     bool
+    select NAND
+    select ECC
 
 config A9MPCORE
     bool
diff --git a/hw/arm/Makefile.objs b/hw/arm/Makefile.objs
index bd0b45a..00328d1 100644
--- a/hw/arm/Makefile.objs
+++ b/hw/arm/Makefile.objs
@@ -11,7 +11,10 @@ obj-$(CONFIG_NETDUINO2) += netduino2.o
 obj-$(CONFIG_NSERIES) += nseries.o
 obj-$(CONFIG_SX1) += omap_sx1.o
 obj-$(CONFIG_CHEETAH) += palm.o
-obj-$(CONFIG_PXA2XX) += gumstix.o spitz.o tosa.o z2.o
+obj-$(CONFIG_GUMSTIX) += gumstix.o
+obj-$(CONFIG_SPITZ) += spitz.o
+obj-$(CONFIG_TOSA) += tosa.o
+obj-$(CONFIG_Z2) += z2.o
 obj-$(CONFIG_REALVIEW) += realview.o
 obj-$(CONFIG_STELLARIS) += stellaris.o
 obj-$(CONFIG_STRONGARM) += collie.o
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [Qemu-devel] [PATCH v4 13/29] hw/arm: Express dependencies of xilinx-zynq with Kconfig
  2019-03-07 14:18 [Qemu-devel] [PATCH v4 00/29] Kconfig dependencies for ARM machines Thomas Huth
                   ` (11 preceding siblings ...)
  2019-03-07 14:18 ` [Qemu-devel] [PATCH v4 12/29] hw/arm: Express dependencies of the PXA2xx machines " Thomas Huth
@ 2019-03-07 14:18 ` Thomas Huth
  2019-03-07 14:18 ` [Qemu-devel] [PATCH v4 14/29] hw/arm: Express dependencies of collie " Thomas Huth
                   ` (17 subsequent siblings)
  30 siblings, 0 replies; 35+ messages in thread
From: Thomas Huth @ 2019-03-07 14:18 UTC (permalink / raw)
  To: yang.zhong, pbonzini, qemu-devel
  Cc: Philippe Mathieu-Daudé,
	qemu-arm, John Snow, Michael S. Tsirkin, Peter Maydell

Add Kconfig dependencies for the xilinx-zynq-a9 board.
This patch is 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 |  7 +------
 hw/arm/Kconfig                  | 14 ++++++++++++++
 2 files changed, 15 insertions(+), 6 deletions(-)

diff --git a/default-configs/arm-softmmu.mak b/default-configs/arm-softmmu.mak
index f3ac12c..54b1c61 100644
--- a/default-configs/arm-softmmu.mak
+++ b/default-configs/arm-softmmu.mak
@@ -16,6 +16,7 @@ CONFIG_STELLARIS=y
 CONFIG_REALVIEW=y
 CONFIG_VERSATILE=y
 CONFIG_VEXPRESS=y
+CONFIG_ZYNQ=y
 CONFIG_MAINSTONE=y
 CONFIG_GUMSTIX=y
 CONFIG_SPITZ=y
@@ -35,16 +36,11 @@ CONFIG_VIRTIO_MMIO=y
 
 CONFIG_NETDUINO2=y
 
-CONFIG_PL330=y
-CONFIG_CADENCE=y
 CONFIG_FRAMEBUFFER=y
-CONFIG_XILINX_SPIPS=y
-CONFIG_ZYNQ_DEVCFG=y
 
 CONFIG_DIGIC=y
 CONFIG_MPS2=y
 CONFIG_RASPI=y
-CONFIG_ZYNQ=y
 CONFIG_STM32F2XX_TIMER=y
 CONFIG_STM32F2XX_USART=y
 CONFIG_STM32F2XX_SYSCFG=y
@@ -97,7 +93,6 @@ CONFIG_SMBUS_EEPROM=y
 CONFIG_GPIO_KEY=y
 CONFIG_MSF2=y
 CONFIG_FW_CFG_DMA=y
-CONFIG_XILINX_AXI=y
 CONFIG_PCI_EXPRESS_DESIGNWARE=y
 
 CONFIG_STRONGARM=y
diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig
index 1a3ad0f..ef9cc97 100644
--- a/hw/arm/Kconfig
+++ b/hw/arm/Kconfig
@@ -206,6 +206,20 @@ config VEXPRESS
 
 config ZYNQ
     bool
+    select A9MPCORE
+    select CADENCE # UART
+    select PCI
+    select PFLASH_CFI02
+    select PL330
+    select SDHCI
+    select SSI_M25P80
+    select USB_EHCI
+    select USB_EHCI_SYSBUS
+    select XILINX # UART
+    select XILINX_AXI
+    select XILINX_SPI
+    select XILINX_SPIPS
+    select ZYNQ_DEVCFG
 
 config ARM_V7M
     bool
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [Qemu-devel] [PATCH v4 14/29] hw/arm: Express dependencies of collie with Kconfig
  2019-03-07 14:18 [Qemu-devel] [PATCH v4 00/29] Kconfig dependencies for ARM machines Thomas Huth
                   ` (12 preceding siblings ...)
  2019-03-07 14:18 ` [Qemu-devel] [PATCH v4 13/29] hw/arm: Express dependencies of xilinx-zynq " Thomas Huth
@ 2019-03-07 14:18 ` Thomas Huth
  2019-03-07 14:18 ` [Qemu-devel] [PATCH v4 15/29] hw/arm: Express dependencies of the aspeed boards " Thomas Huth
                   ` (16 subsequent siblings)
  30 siblings, 0 replies; 35+ messages in thread
From: Thomas Huth @ 2019-03-07 14:18 UTC (permalink / raw)
  To: yang.zhong, pbonzini, qemu-devel
  Cc: Philippe Mathieu-Daudé,
	qemu-arm, John Snow, Michael S. Tsirkin, Peter Maydell

Add Kconfig dependencies for the Strongarm collie machine.
This patch is 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 | 3 +--
 hw/arm/Kconfig                  | 7 +++++++
 hw/arm/Makefile.objs            | 2 +-
 3 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/default-configs/arm-softmmu.mak b/default-configs/arm-softmmu.mak
index 54b1c61..44988f7 100644
--- a/default-configs/arm-softmmu.mak
+++ b/default-configs/arm-softmmu.mak
@@ -22,6 +22,7 @@ CONFIG_GUMSTIX=y
 CONFIG_SPITZ=y
 CONFIG_TOSA=y
 CONFIG_Z2=y
+CONFIG_COLLIE=y
 
 CONFIG_VGA=y
 CONFIG_TMP421=y
@@ -94,5 +95,3 @@ CONFIG_GPIO_KEY=y
 CONFIG_MSF2=y
 CONFIG_FW_CFG_DMA=y
 CONFIG_PCI_EXPRESS_DESIGNWARE=y
-
-CONFIG_STRONGARM=y
diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig
index ef9cc97..43ef149 100644
--- a/hw/arm/Kconfig
+++ b/hw/arm/Kconfig
@@ -173,6 +173,13 @@ config STELLARIS
 
 config STRONGARM
     bool
+    select PXA2XX
+
+config COLLIE
+    bool
+    select PFLASH_CFI01
+    select ZAURUS  # scoop
+    select STRONGARM
 
 config SX1
     bool
diff --git a/hw/arm/Makefile.objs b/hw/arm/Makefile.objs
index 00328d1..729e711 100644
--- a/hw/arm/Makefile.objs
+++ b/hw/arm/Makefile.objs
@@ -17,7 +17,7 @@ obj-$(CONFIG_TOSA) += tosa.o
 obj-$(CONFIG_Z2) += z2.o
 obj-$(CONFIG_REALVIEW) += realview.o
 obj-$(CONFIG_STELLARIS) += stellaris.o
-obj-$(CONFIG_STRONGARM) += collie.o
+obj-$(CONFIG_COLLIE) += collie.o
 obj-$(CONFIG_VERSATILE) += versatilepb.o
 obj-$(CONFIG_VEXPRESS) += vexpress.o
 obj-$(CONFIG_ZYNQ) += xilinx_zynq.o
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [Qemu-devel] [PATCH v4 15/29] hw/arm: Express dependencies of the aspeed boards with Kconfig
  2019-03-07 14:18 [Qemu-devel] [PATCH v4 00/29] Kconfig dependencies for ARM machines Thomas Huth
                   ` (13 preceding siblings ...)
  2019-03-07 14:18 ` [Qemu-devel] [PATCH v4 14/29] hw/arm: Express dependencies of collie " Thomas Huth
@ 2019-03-07 14:18 ` Thomas Huth
  2019-03-07 14:18 ` [Qemu-devel] [PATCH v4 16/29] hw/arm: Express dependencies of the virt machine " Thomas Huth
                   ` (15 subsequent siblings)
  30 siblings, 0 replies; 35+ messages in thread
From: Thomas Huth @ 2019-03-07 14:18 UTC (permalink / raw)
  To: yang.zhong, pbonzini, qemu-devel
  Cc: Philippe Mathieu-Daudé,
	qemu-arm, John Snow, Michael S. Tsirkin, Peter Maydell

Dependencies have been determined by looking at hw/arm/aspeed.c

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

diff --git a/default-configs/arm-softmmu.mak b/default-configs/arm-softmmu.mak
index 44988f7..81c8156 100644
--- a/default-configs/arm-softmmu.mak
+++ b/default-configs/arm-softmmu.mak
@@ -23,15 +23,12 @@ CONFIG_SPITZ=y
 CONFIG_TOSA=y
 CONFIG_Z2=y
 CONFIG_COLLIE=y
+CONFIG_ASPEED_SOC=y
 
 CONFIG_VGA=y
-CONFIG_TMP421=y
-CONFIG_PCA9552=y
 CONFIG_SSI_M25P80=y
 CONFIG_ALLWINNER_EMAC=y
 CONFIG_IMX_FEC=y
-CONFIG_FTGMAC100=y
-CONFIG_DS1338=y
 CONFIG_PLATFORM_BUS=y
 CONFIG_VIRTIO_MMIO=y
 
@@ -89,8 +86,6 @@ CONFIG_I82801B11=y
 CONFIG_ACPI=y
 CONFIG_ARM_VIRT=y
 CONFIG_SMBIOS=y
-CONFIG_ASPEED_SOC=y
-CONFIG_SMBUS_EEPROM=y
 CONFIG_GPIO_KEY=y
 CONFIG_MSF2=y
 CONFIG_FW_CFG_DMA=y
diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig
index 43ef149..e162049 100644
--- a/hw/arm/Kconfig
+++ b/hw/arm/Kconfig
@@ -262,6 +262,16 @@ config FSL_IMX6
 
 config ASPEED_SOC
     bool
+    select DS1338
+    select FTGMAC100
+    select I2C
+    select PCA9552
+    select SERIAL
+    select SMBUS_EEPROM
+    select SSI
+    select SSI_M25P80
+    select TMP105
+    select TMP421
 
 config MPS2
     bool
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [Qemu-devel] [PATCH v4 16/29] hw/arm: Express dependencies of the virt machine with Kconfig
  2019-03-07 14:18 [Qemu-devel] [PATCH v4 00/29] Kconfig dependencies for ARM machines Thomas Huth
                   ` (14 preceding siblings ...)
  2019-03-07 14:18 ` [Qemu-devel] [PATCH v4 15/29] hw/arm: Express dependencies of the aspeed boards " Thomas Huth
@ 2019-03-07 14:18 ` Thomas Huth
  2019-03-07 14:18 ` [Qemu-devel] [PATCH v4 17/29] hw/arm: Express dependencies of netduino / stm32f2xx " Thomas Huth
                   ` (14 subsequent siblings)
  30 siblings, 0 replies; 35+ messages in thread
From: Thomas Huth @ 2019-03-07 14:18 UTC (permalink / raw)
  To: yang.zhong, pbonzini, qemu-devel
  Cc: Philippe Mathieu-Daudé,
	qemu-arm, John Snow, Michael S. Tsirkin, Peter Maydell

Dependencies have been determined by looking at hw/arm/virt.c

Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 default-configs/arm-softmmu.mak | 11 +----------
 hw/arm/Kconfig                  | 18 ++++++++++++++++++
 hw/arm/Makefile.objs            |  3 ++-
 3 files changed, 21 insertions(+), 11 deletions(-)

diff --git a/default-configs/arm-softmmu.mak b/default-configs/arm-softmmu.mak
index 81c8156..79996a3 100644
--- a/default-configs/arm-softmmu.mak
+++ b/default-configs/arm-softmmu.mak
@@ -3,6 +3,7 @@
 # TODO: ARM_V7M is currently always required - make this more flexible!
 CONFIG_ARM_V7M=y
 
+CONFIG_ARM_VIRT=y
 CONFIG_EXYNOS4=y
 CONFIG_HIGHBANK=y
 CONFIG_INTEGRATOR=y
@@ -29,8 +30,6 @@ CONFIG_VGA=y
 CONFIG_SSI_M25P80=y
 CONFIG_ALLWINNER_EMAC=y
 CONFIG_IMX_FEC=y
-CONFIG_PLATFORM_BUS=y
-CONFIG_VIRTIO_MMIO=y
 
 CONFIG_NETDUINO2=y
 
@@ -65,9 +64,6 @@ CONFIG_IOTKIT_SYSINFO=y
 CONFIG_ARMSSE_CPUID=y
 CONFIG_ARMSSE_MHU=y
 
-CONFIG_PCI_EXPRESS=y
-CONFIG_PCI_EXPRESS_GENERIC_BRIDGE=y
-
 CONFIG_ALLWINNER_A10_PIT=y
 CONFIG_ALLWINNER_A10_PIC=y
 CONFIG_ALLWINNER_A10=y
@@ -83,10 +79,5 @@ CONFIG_PCIE_PORT=y
 CONFIG_XIO3130=y
 CONFIG_IOH3420=y
 CONFIG_I82801B11=y
-CONFIG_ACPI=y
-CONFIG_ARM_VIRT=y
-CONFIG_SMBIOS=y
-CONFIG_GPIO_KEY=y
 CONFIG_MSF2=y
-CONFIG_FW_CFG_DMA=y
 CONFIG_PCI_EXPRESS_DESIGNWARE=y
diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig
index e162049..76cf754 100644
--- a/hw/arm/Kconfig
+++ b/hw/arm/Kconfig
@@ -1,6 +1,23 @@
 config ARM_VIRT
     bool
+    imply PCI_DEVICES
+    imply VFIO_AMD_XGBE
     imply VFIO_PLATFORM
+    imply VFIO_XGMAC
+    select A15MPCORE
+    select ACPI
+    select ARM_SMMUV3
+    select GPIO_KEY
+    select FW_CFG_DMA
+    select PCI_EXPRESS
+    select PCI_EXPRESS_GENERIC_BRIDGE
+    select PFLASH_CFI01
+    select PL011 # UART
+    select PL031 # RTC
+    select PL061 # GPIO
+    select PLATFORM_BUS
+    select SMBIOS
+    select VIRTIO_MMIO
 
 config CHEETAH
     bool
@@ -306,6 +323,7 @@ config A9MPCORE
 
 config A15MPCORE
     bool
+    select ARM_GIC
 
 config ARM11MPCORE
     bool
diff --git a/hw/arm/Makefile.objs b/hw/arm/Makefile.objs
index 729e711..4f591ca 100644
--- a/hw/arm/Makefile.objs
+++ b/hw/arm/Makefile.objs
@@ -1,4 +1,5 @@
-obj-y += boot.o sysbus-fdt.o
+obj-y += boot.o
+obj-$(CONFIG_PLATFORM_BUS) += sysbus-fdt.o
 obj-$(CONFIG_ARM_VIRT) += virt.o
 obj-$(CONFIG_ACPI) += virt-acpi-build.o
 obj-$(CONFIG_DIGIC) += digic_boards.o
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [Qemu-devel] [PATCH v4 17/29] hw/arm: Express dependencies of netduino / stm32f2xx with Kconfig
  2019-03-07 14:18 [Qemu-devel] [PATCH v4 00/29] Kconfig dependencies for ARM machines Thomas Huth
                   ` (15 preceding siblings ...)
  2019-03-07 14:18 ` [Qemu-devel] [PATCH v4 16/29] hw/arm: Express dependencies of the virt machine " Thomas Huth
@ 2019-03-07 14:18 ` Thomas Huth
  2019-03-07 14:18 ` [Qemu-devel] [PATCH v4 18/29] hw/arm: Express dependencies of allwinner / cubieboard " Thomas Huth
                   ` (13 subsequent siblings)
  30 siblings, 0 replies; 35+ messages in thread
From: Thomas Huth @ 2019-03-07 14:18 UTC (permalink / raw)
  To: yang.zhong, pbonzini, qemu-devel
  Cc: Philippe Mathieu-Daudé,
	qemu-arm, John Snow, Michael S. Tsirkin, Peter Maydell

Netduino only depends on the stm32f205 SoC which in turn depends on
its components.

Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 default-configs/arm-softmmu.mak | 9 +--------
 hw/arm/Kconfig                  | 7 +++++++
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/default-configs/arm-softmmu.mak b/default-configs/arm-softmmu.mak
index 79996a3..beb94d9 100644
--- a/default-configs/arm-softmmu.mak
+++ b/default-configs/arm-softmmu.mak
@@ -25,25 +25,18 @@ CONFIG_TOSA=y
 CONFIG_Z2=y
 CONFIG_COLLIE=y
 CONFIG_ASPEED_SOC=y
+CONFIG_NETDUINO2=y
 
 CONFIG_VGA=y
 CONFIG_SSI_M25P80=y
 CONFIG_ALLWINNER_EMAC=y
 CONFIG_IMX_FEC=y
 
-CONFIG_NETDUINO2=y
-
 CONFIG_FRAMEBUFFER=y
 
 CONFIG_DIGIC=y
 CONFIG_MPS2=y
 CONFIG_RASPI=y
-CONFIG_STM32F2XX_TIMER=y
-CONFIG_STM32F2XX_USART=y
-CONFIG_STM32F2XX_SYSCFG=y
-CONFIG_STM32F2XX_ADC=y
-CONFIG_STM32F2XX_SPI=y
-CONFIG_STM32F205_SOC=y
 CONFIG_NRF51_SOC=y
 
 CONFIG_CMSDK_APB_TIMER=y
diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig
index 76cf754..68eccbf 100644
--- a/hw/arm/Kconfig
+++ b/hw/arm/Kconfig
@@ -84,6 +84,7 @@ config MUSICPAL
 
 config NETDUINO2
     bool
+    select STM32F205_SOC
 
 config NSERIES
     bool
@@ -256,6 +257,12 @@ config RASPI
 
 config STM32F205_SOC
     bool
+    select ARM_V7M
+    select STM32F2XX_TIMER
+    select STM32F2XX_USART
+    select STM32F2XX_SYSCFG
+    select STM32F2XX_ADC
+    select STM32F2XX_SPI
 
 config XLNX_ZYNQMP_ARM
     bool
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [Qemu-devel] [PATCH v4 18/29] hw/arm: Express dependencies of allwinner / cubieboard with Kconfig
  2019-03-07 14:18 [Qemu-devel] [PATCH v4 00/29] Kconfig dependencies for ARM machines Thomas Huth
                   ` (16 preceding siblings ...)
  2019-03-07 14:18 ` [Qemu-devel] [PATCH v4 17/29] hw/arm: Express dependencies of netduino / stm32f2xx " Thomas Huth
@ 2019-03-07 14:18 ` Thomas Huth
  2019-03-07 14:18 ` [Qemu-devel] [PATCH v4 19/29] hw/arm: Express dependencies of the MPS2 boards " Thomas Huth
                   ` (12 subsequent siblings)
  30 siblings, 0 replies; 35+ messages in thread
From: Thomas Huth @ 2019-03-07 14:18 UTC (permalink / raw)
  To: yang.zhong, pbonzini, qemu-devel
  Cc: Philippe Mathieu-Daudé,
	qemu-arm, John Snow, Michael S. Tsirkin, Peter Maydell

Add dependencies for the Cubitech Cubieboard.

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

diff --git a/default-configs/arm-softmmu.mak b/default-configs/arm-softmmu.mak
index beb94d9..b6f3d60 100644
--- a/default-configs/arm-softmmu.mak
+++ b/default-configs/arm-softmmu.mak
@@ -4,6 +4,7 @@
 CONFIG_ARM_V7M=y
 
 CONFIG_ARM_VIRT=y
+CONFIG_CUBIEBOARD=y
 CONFIG_EXYNOS4=y
 CONFIG_HIGHBANK=y
 CONFIG_INTEGRATOR=y
@@ -29,7 +30,6 @@ CONFIG_NETDUINO2=y
 
 CONFIG_VGA=y
 CONFIG_SSI_M25P80=y
-CONFIG_ALLWINNER_EMAC=y
 CONFIG_IMX_FEC=y
 
 CONFIG_FRAMEBUFFER=y
@@ -57,10 +57,6 @@ CONFIG_IOTKIT_SYSINFO=y
 CONFIG_ARMSSE_CPUID=y
 CONFIG_ARMSSE_MHU=y
 
-CONFIG_ALLWINNER_A10_PIT=y
-CONFIG_ALLWINNER_A10_PIC=y
-CONFIG_ALLWINNER_A10=y
-
 CONFIG_FSL_IMX6=y
 CONFIG_FSL_IMX25=y
 CONFIG_FSL_IMX7=y
diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig
index 68eccbf..743c78b 100644
--- a/hw/arm/Kconfig
+++ b/hw/arm/Kconfig
@@ -24,6 +24,10 @@ config CHEETAH
     select OMAP
     select TSC210X
 
+config CUBIEBOARD
+    bool
+    select ALLWINNER_A10
+
 config DIGIC
     bool
     select PTIMER
@@ -251,6 +255,11 @@ config ARM_V7M
 
 config ALLWINNER_A10
     bool
+    select AHCI
+    select ALLWINNER_A10_PIT
+    select ALLWINNER_A10_PIC
+    select ALLWINNER_EMAC
+    select SERIAL
 
 config RASPI
     bool
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [Qemu-devel] [PATCH v4 19/29] hw/arm: Express dependencies of the MPS2 boards with Kconfig
  2019-03-07 14:18 [Qemu-devel] [PATCH v4 00/29] Kconfig dependencies for ARM machines Thomas Huth
                   ` (17 preceding siblings ...)
  2019-03-07 14:18 ` [Qemu-devel] [PATCH v4 18/29] hw/arm: Express dependencies of allwinner / cubieboard " Thomas Huth
@ 2019-03-07 14:18 ` Thomas Huth
  2019-03-10 21:33   ` Philippe Mathieu-Daudé
  2019-03-07 14:18 ` [Qemu-devel] [PATCH v4 20/29] hw/arm: Express dependencies of the raspi machines " Thomas Huth
                   ` (11 subsequent siblings)
  30 siblings, 1 reply; 35+ messages in thread
From: Thomas Huth @ 2019-03-07 14:18 UTC (permalink / raw)
  To: yang.zhong, pbonzini, qemu-devel
  Cc: Philippe Mathieu-Daudé,
	qemu-arm, John Snow, Michael S. Tsirkin, Peter Maydell

Add Kconfig dependencies for the mps2-an* machines.

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

diff --git a/default-configs/arm-softmmu.mak b/default-configs/arm-softmmu.mak
index b6f3d60..b8509fd 100644
--- a/default-configs/arm-softmmu.mak
+++ b/default-configs/arm-softmmu.mak
@@ -27,6 +27,7 @@ CONFIG_Z2=y
 CONFIG_COLLIE=y
 CONFIG_ASPEED_SOC=y
 CONFIG_NETDUINO2=y
+CONFIG_MPS2=y
 
 CONFIG_VGA=y
 CONFIG_SSI_M25P80=y
@@ -35,28 +36,9 @@ CONFIG_IMX_FEC=y
 CONFIG_FRAMEBUFFER=y
 
 CONFIG_DIGIC=y
-CONFIG_MPS2=y
 CONFIG_RASPI=y
 CONFIG_NRF51_SOC=y
 
-CONFIG_CMSDK_APB_TIMER=y
-CONFIG_CMSDK_APB_DUALTIMER=y
-CONFIG_CMSDK_APB_UART=y
-CONFIG_CMSDK_APB_WATCHDOG=y
-
-CONFIG_MPS2_FPGAIO=y
-CONFIG_MPS2_SCC=y
-
-CONFIG_TZ_MPC=y
-CONFIG_TZ_MSC=y
-CONFIG_TZ_PPC=y
-CONFIG_ARMSSE=y
-CONFIG_IOTKIT_SECCTL=y
-CONFIG_IOTKIT_SYSCTL=y
-CONFIG_IOTKIT_SYSINFO=y
-CONFIG_ARMSSE_CPUID=y
-CONFIG_ARMSSE_MHU=y
-
 CONFIG_FSL_IMX6=y
 CONFIG_FSL_IMX25=y
 CONFIG_FSL_IMX7=y
diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig
index 743c78b..32c8663 100644
--- a/hw/arm/Kconfig
+++ b/hw/arm/Kconfig
@@ -308,6 +308,13 @@ config ASPEED_SOC
 
 config MPS2
     bool
+    select ARMSSE
+    select LAN9118
+    select MPS2_FPGAIO
+    select MPS2_SCC
+    select PL022    # Serial port
+    select PL080    # DMA controller
+    select TZ_MPC
 
 config FSL_IMX7
     bool
@@ -347,6 +354,17 @@ config ARM11MPCORE
 
 config ARMSSE
     bool
+    select ARMSSE_CPUID
+    select ARMSSE_MHU
+    select CMSDK_APB_TIMER
+    select CMSDK_APB_DUALTIMER
+    select CMSDK_APB_UART
+    select CMSDK_APB_WATCHDOG
+    select IOTKIT_SECCTL
+    select IOTKIT_SYSCTL
+    select IOTKIT_SYSINFO
+    select TZ_MSC
+    select TZ_PPC
 
 config ARMSSE_CPUID
     bool
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [Qemu-devel] [PATCH v4 20/29] hw/arm: Express dependencies of the raspi machines with Kconfig
  2019-03-07 14:18 [Qemu-devel] [PATCH v4 00/29] Kconfig dependencies for ARM machines Thomas Huth
                   ` (18 preceding siblings ...)
  2019-03-07 14:18 ` [Qemu-devel] [PATCH v4 19/29] hw/arm: Express dependencies of the MPS2 boards " Thomas Huth
@ 2019-03-07 14:18 ` Thomas Huth
  2019-03-07 14:18 ` [Qemu-devel] [PATCH v4 21/29] hw/arm: Express dependencies of canon-a1100 " Thomas Huth
                   ` (10 subsequent siblings)
  30 siblings, 0 replies; 35+ messages in thread
From: Thomas Huth @ 2019-03-07 14:18 UTC (permalink / raw)
  To: yang.zhong, pbonzini, qemu-devel
  Cc: Philippe Mathieu-Daudé,
	qemu-arm, John Snow, Michael S. Tsirkin, Peter Maydell

Most of the code is directly controlled by the CONFIG_RASPI switch,
so not much to add here additionally.

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

diff --git a/default-configs/arm-softmmu.mak b/default-configs/arm-softmmu.mak
index b8509fd..290023c 100644
--- a/default-configs/arm-softmmu.mak
+++ b/default-configs/arm-softmmu.mak
@@ -28,15 +28,13 @@ CONFIG_COLLIE=y
 CONFIG_ASPEED_SOC=y
 CONFIG_NETDUINO2=y
 CONFIG_MPS2=y
+CONFIG_RASPI=y
 
 CONFIG_VGA=y
 CONFIG_SSI_M25P80=y
 CONFIG_IMX_FEC=y
 
-CONFIG_FRAMEBUFFER=y
-
 CONFIG_DIGIC=y
-CONFIG_RASPI=y
 CONFIG_NRF51_SOC=y
 
 CONFIG_FSL_IMX6=y
diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig
index 32c8663..87440db 100644
--- a/hw/arm/Kconfig
+++ b/hw/arm/Kconfig
@@ -263,6 +263,9 @@ config ALLWINNER_A10
 
 config RASPI
     bool
+    select FRAMEBUFFER
+    select PL011 # UART
+    select SDHCI
 
 config STM32F205_SOC
     bool
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [Qemu-devel] [PATCH v4 21/29] hw/arm: Express dependencies of canon-a1100 with Kconfig
  2019-03-07 14:18 [Qemu-devel] [PATCH v4 00/29] Kconfig dependencies for ARM machines Thomas Huth
                   ` (19 preceding siblings ...)
  2019-03-07 14:18 ` [Qemu-devel] [PATCH v4 20/29] hw/arm: Express dependencies of the raspi machines " Thomas Huth
@ 2019-03-07 14:18 ` Thomas Huth
  2019-03-07 14:18 ` [Qemu-devel] [PATCH v4 22/29] hw/arm: Express dependencies of sabrelite " Thomas Huth
                   ` (9 subsequent siblings)
  30 siblings, 0 replies; 35+ messages in thread
From: Thomas Huth @ 2019-03-07 14:18 UTC (permalink / raw)
  To: yang.zhong, pbonzini, qemu-devel
  Cc: Philippe Mathieu-Daudé,
	qemu-arm, John Snow, Michael S. Tsirkin, Peter Maydell

Add Kconfig dependencies for the DIGIC / canon-a1100 machine.

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 default-configs/arm-softmmu.mak | 2 +-
 hw/arm/Kconfig                  | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/default-configs/arm-softmmu.mak b/default-configs/arm-softmmu.mak
index 290023c..53609ea 100644
--- a/default-configs/arm-softmmu.mak
+++ b/default-configs/arm-softmmu.mak
@@ -29,12 +29,12 @@ CONFIG_ASPEED_SOC=y
 CONFIG_NETDUINO2=y
 CONFIG_MPS2=y
 CONFIG_RASPI=y
+CONFIG_DIGIC=y
 
 CONFIG_VGA=y
 CONFIG_SSI_M25P80=y
 CONFIG_IMX_FEC=y
 
-CONFIG_DIGIC=y
 CONFIG_NRF51_SOC=y
 
 CONFIG_FSL_IMX6=y
diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig
index 87440db..ed42e60 100644
--- a/hw/arm/Kconfig
+++ b/hw/arm/Kconfig
@@ -31,6 +31,7 @@ config CUBIEBOARD
 config DIGIC
     bool
     select PTIMER
+    select PFLASH_CFI02
 
 config EXYNOS4
     bool
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [Qemu-devel] [PATCH v4 22/29] hw/arm: Express dependencies of sabrelite with Kconfig
  2019-03-07 14:18 [Qemu-devel] [PATCH v4 00/29] Kconfig dependencies for ARM machines Thomas Huth
                   ` (20 preceding siblings ...)
  2019-03-07 14:18 ` [Qemu-devel] [PATCH v4 21/29] hw/arm: Express dependencies of canon-a1100 " Thomas Huth
@ 2019-03-07 14:18 ` Thomas Huth
  2019-03-07 14:18 ` [Qemu-devel] [PATCH v4 23/29] hw/arm: Express dependencies of the MSF2 / EMCRAFT_SF2 machine " Thomas Huth
                   ` (8 subsequent siblings)
  30 siblings, 0 replies; 35+ messages in thread
From: Thomas Huth @ 2019-03-07 14:18 UTC (permalink / raw)
  To: yang.zhong, pbonzini, qemu-devel
  Cc: Philippe Mathieu-Daudé,
	qemu-arm, John Snow, Michael S. Tsirkin, Peter Maydell

Add Kconfig dependencies for the Sabrelite / iMX6 machine.

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

diff --git a/default-configs/arm-softmmu.mak b/default-configs/arm-softmmu.mak
index 53609ea..9150858 100644
--- a/default-configs/arm-softmmu.mak
+++ b/default-configs/arm-softmmu.mak
@@ -30,6 +30,7 @@ CONFIG_NETDUINO2=y
 CONFIG_MPS2=y
 CONFIG_RASPI=y
 CONFIG_DIGIC=y
+CONFIG_SABRELITE=y
 
 CONFIG_VGA=y
 CONFIG_SSI_M25P80=y
@@ -37,13 +38,10 @@ CONFIG_IMX_FEC=y
 
 CONFIG_NRF51_SOC=y
 
-CONFIG_FSL_IMX6=y
 CONFIG_FSL_IMX25=y
 CONFIG_FSL_IMX7=y
 CONFIG_FSL_IMX6UL=y
 
-CONFIG_IMX_I2C=y
-
 CONFIG_PCIE_PORT=y
 CONFIG_XIO3130=y
 CONFIG_IOH3420=y
diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig
index ed42e60..cff2925 100644
--- a/hw/arm/Kconfig
+++ b/hw/arm/Kconfig
@@ -181,6 +181,10 @@ config REALVIEW
     select DS1338 # I2C RTC+NVRAM
     select USB_OHCI
 
+config SABRELITE
+    bool
+    select FSL_IMX6
+
 config STELLARIS
     bool
     select ARM_V7M
@@ -296,6 +300,9 @@ config FSL_IMX31
 
 config FSL_IMX6
     bool
+    select A9MPCORE
+    select IMX
+    select IMX_I2C
 
 config ASPEED_SOC
     bool
diff --git a/hw/arm/Makefile.objs b/hw/arm/Makefile.objs
index 4f591ca..fadd698 100644
--- a/hw/arm/Makefile.objs
+++ b/hw/arm/Makefile.objs
@@ -22,6 +22,7 @@ obj-$(CONFIG_COLLIE) += collie.o
 obj-$(CONFIG_VERSATILE) += versatilepb.o
 obj-$(CONFIG_VEXPRESS) += vexpress.o
 obj-$(CONFIG_ZYNQ) += xilinx_zynq.o
+obj-$(CONFIG_SABRELITE) += sabrelite.o
 
 obj-$(CONFIG_ARM_V7M) += armv7m.o
 obj-$(CONFIG_EXYNOS4) += exynos4210.o
@@ -36,7 +37,7 @@ obj-$(CONFIG_XLNX_ZYNQMP_ARM) += xlnx-zynqmp.o xlnx-zcu102.o
 obj-$(CONFIG_XLNX_VERSAL) += xlnx-versal.o xlnx-versal-virt.o
 obj-$(CONFIG_FSL_IMX25) += fsl-imx25.o imx25_pdk.o
 obj-$(CONFIG_FSL_IMX31) += fsl-imx31.o kzm.o
-obj-$(CONFIG_FSL_IMX6) += fsl-imx6.o sabrelite.o
+obj-$(CONFIG_FSL_IMX6) += fsl-imx6.o
 obj-$(CONFIG_ASPEED_SOC) += aspeed_soc.o aspeed.o
 obj-$(CONFIG_MPS2) += mps2.o
 obj-$(CONFIG_MPS2) += mps2-tz.o
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [Qemu-devel] [PATCH v4 23/29] hw/arm: Express dependencies of the MSF2 / EMCRAFT_SF2 machine with Kconfig
  2019-03-07 14:18 [Qemu-devel] [PATCH v4 00/29] Kconfig dependencies for ARM machines Thomas Huth
                   ` (21 preceding siblings ...)
  2019-03-07 14:18 ` [Qemu-devel] [PATCH v4 22/29] hw/arm: Express dependencies of sabrelite " Thomas Huth
@ 2019-03-07 14:18 ` Thomas Huth
  2019-03-07 14:18 ` [Qemu-devel] [PATCH v4 24/29] hw/arm: Express dependencies for remaining IMX boards " Thomas Huth
                   ` (7 subsequent siblings)
  30 siblings, 0 replies; 35+ messages in thread
From: Thomas Huth @ 2019-03-07 14:18 UTC (permalink / raw)
  To: yang.zhong, pbonzini, qemu-devel
  Cc: Philippe Mathieu-Daudé,
	qemu-arm, John Snow, Michael S. Tsirkin, Peter Maydell

Add Kconfig dependencies for the emcraft-sf2 machine - we also
distinguish between the machine (CONFIG_EMCRAFT_SF2) and the SoC
(CONFIG_MSF2) now.

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

diff --git a/default-configs/arm-softmmu.mak b/default-configs/arm-softmmu.mak
index 9150858..a01e407 100644
--- a/default-configs/arm-softmmu.mak
+++ b/default-configs/arm-softmmu.mak
@@ -31,9 +31,9 @@ CONFIG_MPS2=y
 CONFIG_RASPI=y
 CONFIG_DIGIC=y
 CONFIG_SABRELITE=y
+CONFIG_EMCRAFT_SF2=y
 
 CONFIG_VGA=y
-CONFIG_SSI_M25P80=y
 CONFIG_IMX_FEC=y
 
 CONFIG_NRF51_SOC=y
@@ -46,5 +46,4 @@ CONFIG_PCIE_PORT=y
 CONFIG_XIO3130=y
 CONFIG_IOH3420=y
 CONFIG_I82801B11=y
-CONFIG_MSF2=y
 CONFIG_PCI_EXPRESS_DESIGNWARE=y
diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig
index cff2925..7df0bb6 100644
--- a/hw/arm/Kconfig
+++ b/hw/arm/Kconfig
@@ -325,7 +325,6 @@ config MPS2
     select MPS2_SCC
     select PL022    # Serial port
     select PL080    # DMA controller
-    select TZ_MPC
 
 config FSL_IMX7
     bool
@@ -339,9 +338,17 @@ config FSL_IMX6UL
 config NRF51_SOC
     bool
 
+config EMCRAFT_SF2
+    bool
+    select MSF2
+    select SSI_M25P80
+
 config MSF2
     bool
+    select ARM_V7M
     select PTIMER
+    select SERIAL
+    select SSI
 
 config ZAURUS
     bool
@@ -374,6 +381,7 @@ config ARMSSE
     select IOTKIT_SECCTL
     select IOTKIT_SYSCTL
     select IOTKIT_SYSINFO
+    select TZ_MPC
     select TZ_MSC
     select TZ_PPC
 
diff --git a/hw/arm/Makefile.objs b/hw/arm/Makefile.objs
index fadd698..eae9f6c 100644
--- a/hw/arm/Makefile.objs
+++ b/hw/arm/Makefile.objs
@@ -4,6 +4,7 @@ obj-$(CONFIG_ARM_VIRT) += virt.o
 obj-$(CONFIG_ACPI) += virt-acpi-build.o
 obj-$(CONFIG_DIGIC) += digic_boards.o
 obj-$(CONFIG_EXYNOS4) += exynos4_boards.o
+obj-$(CONFIG_EMCRAFT_SF2) += msf2-som.o
 obj-$(CONFIG_HIGHBANK) += highbank.o
 obj-$(CONFIG_INTEGRATOR) += integratorcp.o
 obj-$(CONFIG_MAINSTONE) += mainstone.o
@@ -41,7 +42,7 @@ obj-$(CONFIG_FSL_IMX6) += fsl-imx6.o
 obj-$(CONFIG_ASPEED_SOC) += aspeed_soc.o aspeed.o
 obj-$(CONFIG_MPS2) += mps2.o
 obj-$(CONFIG_MPS2) += mps2-tz.o
-obj-$(CONFIG_MSF2) += msf2-soc.o msf2-som.o
+obj-$(CONFIG_MSF2) += msf2-soc.o
 obj-$(CONFIG_MUSCA) += musca.o
 obj-$(CONFIG_ARMSSE) += armsse.o
 obj-$(CONFIG_FSL_IMX7) += fsl-imx7.o mcimx7d-sabre.o
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [Qemu-devel] [PATCH v4 24/29] hw/arm: Express dependencies for remaining IMX boards with Kconfig
  2019-03-07 14:18 [Qemu-devel] [PATCH v4 00/29] Kconfig dependencies for ARM machines Thomas Huth
                   ` (22 preceding siblings ...)
  2019-03-07 14:18 ` [Qemu-devel] [PATCH v4 23/29] hw/arm: Express dependencies of the MSF2 / EMCRAFT_SF2 machine " Thomas Huth
@ 2019-03-07 14:18 ` Thomas Huth
  2019-03-07 14:18 ` [Qemu-devel] [PATCH v4 25/29] hw/arm: Express dependencies of the microbit / nrf51 machine " Thomas Huth
                   ` (6 subsequent siblings)
  30 siblings, 0 replies; 35+ messages in thread
From: Thomas Huth @ 2019-03-07 14:18 UTC (permalink / raw)
  To: yang.zhong, pbonzini, qemu-devel
  Cc: Philippe Mathieu-Daudé,
	qemu-arm, John Snow, Michael S. Tsirkin, Peter Maydell

IMX25, IMX7 and IMX6UL were still missing the Kconfig dependencies.

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

diff --git a/default-configs/arm-softmmu.mak b/default-configs/arm-softmmu.mak
index a01e407..88e4e8e 100644
--- a/default-configs/arm-softmmu.mak
+++ b/default-configs/arm-softmmu.mak
@@ -34,7 +34,6 @@ CONFIG_SABRELITE=y
 CONFIG_EMCRAFT_SF2=y
 
 CONFIG_VGA=y
-CONFIG_IMX_FEC=y
 
 CONFIG_NRF51_SOC=y
 
@@ -46,4 +45,3 @@ CONFIG_PCIE_PORT=y
 CONFIG_XIO3130=y
 CONFIG_IOH3420=y
 CONFIG_I82801B11=y
-CONFIG_PCI_EXPRESS_DESIGNWARE=y
diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig
index 7df0bb6..6a8b801 100644
--- a/hw/arm/Kconfig
+++ b/hw/arm/Kconfig
@@ -289,6 +289,10 @@ config XLNX_VERSAL
 
 config FSL_IMX25
     bool
+    select IMX
+    select IMX_FEC
+    select IMX_I2C
+    select DS1338
 
 config FSL_IMX31
     bool
@@ -303,6 +307,7 @@ config FSL_IMX6
     select A9MPCORE
     select IMX
     select IMX_I2C
+    select SDHCI
 
 config ASPEED_SOC
     bool
@@ -328,12 +333,25 @@ config MPS2
 
 config FSL_IMX7
     bool
+    imply PCI_DEVICES
+    select A15MPCORE
+    select PCI
+    select IMX
+    select IMX_FEC
+    select IMX_I2C
+    select PCI_EXPRESS_DESIGNWARE
+    select SDHCI
 
 config ARM_SMMUV3
     bool
 
 config FSL_IMX6UL
     bool
+    select A15MPCORE
+    select IMX
+    select IMX_FEC
+    select IMX_I2C
+    select SDHCI
 
 config NRF51_SOC
     bool
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [Qemu-devel] [PATCH v4 25/29] hw/arm: Express dependencies of the microbit / nrf51 machine with Kconfig
  2019-03-07 14:18 [Qemu-devel] [PATCH v4 00/29] Kconfig dependencies for ARM machines Thomas Huth
                   ` (23 preceding siblings ...)
  2019-03-07 14:18 ` [Qemu-devel] [PATCH v4 24/29] hw/arm: Express dependencies for remaining IMX boards " Thomas Huth
@ 2019-03-07 14:18 ` Thomas Huth
  2019-03-07 14:18 ` [Qemu-devel] [PATCH v4 26/29] hw/arm: Express dependencies of the ZynqMP zcu102 " Thomas Huth
                   ` (5 subsequent siblings)
  30 siblings, 0 replies; 35+ messages in thread
From: Thomas Huth @ 2019-03-07 14:18 UTC (permalink / raw)
  To: yang.zhong, pbonzini, qemu-devel
  Cc: Philippe Mathieu-Daudé,
	qemu-arm, John Snow, Michael S. Tsirkin, Peter Maydell

Add Kconfig dependencies for the NRF51 / microbit machine.

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

diff --git a/default-configs/arm-softmmu.mak b/default-configs/arm-softmmu.mak
index 88e4e8e..ee95cc0 100644
--- a/default-configs/arm-softmmu.mak
+++ b/default-configs/arm-softmmu.mak
@@ -32,11 +32,10 @@ CONFIG_RASPI=y
 CONFIG_DIGIC=y
 CONFIG_SABRELITE=y
 CONFIG_EMCRAFT_SF2=y
+CONFIG_MICROBIT=y
 
 CONFIG_VGA=y
 
-CONFIG_NRF51_SOC=y
-
 CONFIG_FSL_IMX25=y
 CONFIG_FSL_IMX7=y
 CONFIG_FSL_IMX6UL=y
diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig
index 6a8b801..da4d5c1 100644
--- a/hw/arm/Kconfig
+++ b/hw/arm/Kconfig
@@ -353,8 +353,14 @@ config FSL_IMX6UL
     select IMX_I2C
     select SDHCI
 
+config MICROBIT
+    bool
+    select NRF51_SOC
+
 config NRF51_SOC
     bool
+    select I2C
+    select ARM_V7M
 
 config EMCRAFT_SF2
     bool
diff --git a/hw/arm/Makefile.objs b/hw/arm/Makefile.objs
index eae9f6c..994e67d 100644
--- a/hw/arm/Makefile.objs
+++ b/hw/arm/Makefile.objs
@@ -8,6 +8,7 @@ obj-$(CONFIG_EMCRAFT_SF2) += msf2-som.o
 obj-$(CONFIG_HIGHBANK) += highbank.o
 obj-$(CONFIG_INTEGRATOR) += integratorcp.o
 obj-$(CONFIG_MAINSTONE) += mainstone.o
+obj-$(CONFIG_MICROBIT) += microbit.o
 obj-$(CONFIG_MUSICPAL) += musicpal.o
 obj-$(CONFIG_NETDUINO2) += netduino2.o
 obj-$(CONFIG_NSERIES) += nseries.o
@@ -48,4 +49,4 @@ obj-$(CONFIG_ARMSSE) += armsse.o
 obj-$(CONFIG_FSL_IMX7) += fsl-imx7.o mcimx7d-sabre.o
 obj-$(CONFIG_ARM_SMMUV3) += smmu-common.o smmuv3.o
 obj-$(CONFIG_FSL_IMX6UL) += fsl-imx6ul.o mcimx6ul-evk.o
-obj-$(CONFIG_NRF51_SOC) += nrf51_soc.o microbit.o
+obj-$(CONFIG_NRF51_SOC) += nrf51_soc.o
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [Qemu-devel] [PATCH v4 26/29] hw/arm: Express dependencies of the ZynqMP zcu102 machine with Kconfig
  2019-03-07 14:18 [Qemu-devel] [PATCH v4 00/29] Kconfig dependencies for ARM machines Thomas Huth
                   ` (24 preceding siblings ...)
  2019-03-07 14:18 ` [Qemu-devel] [PATCH v4 25/29] hw/arm: Express dependencies of the microbit / nrf51 machine " Thomas Huth
@ 2019-03-07 14:18 ` Thomas Huth
  2019-03-07 14:18 ` [Qemu-devel] [PATCH v4 27/29] hw/arm: Express dependencies of the xlnx-versal-virt " Thomas Huth
                   ` (4 subsequent siblings)
  30 siblings, 0 replies; 35+ messages in thread
From: Thomas Huth @ 2019-03-07 14:18 UTC (permalink / raw)
  To: yang.zhong, pbonzini, qemu-devel
  Cc: Philippe Mathieu-Daudé,
	qemu-arm, John Snow, Michael S. Tsirkin, Peter Maydell

This cleans up most settings in default-configs/aarch64-softmmu.mak.

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

diff --git a/default-configs/aarch64-softmmu.mak b/default-configs/aarch64-softmmu.mak
index 4ea9add..3a4b15e 100644
--- a/default-configs/aarch64-softmmu.mak
+++ b/default-configs/aarch64-softmmu.mak
@@ -3,10 +3,6 @@
 # We support all the 32 bit boards so need all their config
 include arm-softmmu.mak
 
-CONFIG_AUX=y
-CONFIG_DDC=y
-CONFIG_DPCD=y
-CONFIG_XLNX_ZYNQMP=y
 CONFIG_XLNX_ZYNQMP_ARM=y
 CONFIG_XLNX_VERSAL=y
 CONFIG_ARM_SMMUV3=y
diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig
index da4d5c1..adc38d4 100644
--- a/hw/arm/Kconfig
+++ b/hw/arm/Kconfig
@@ -283,6 +283,17 @@ config STM32F205_SOC
 
 config XLNX_ZYNQMP_ARM
     bool
+    select AHCI
+    select ARM_GIC
+    select CADENCE
+    select DDC
+    select DPCD
+    select SDHCI
+    select SSI
+    select SSI_M25P80
+    select XILINX_AXI
+    select XILINX_SPIPS
+    select XLNX_ZYNQMP
 
 config XLNX_VERSAL
     bool
diff --git a/hw/display/Kconfig b/hw/display/Kconfig
index 25116e6..5ea402c 100644
--- a/hw/display/Kconfig
+++ b/hw/display/Kconfig
@@ -108,3 +108,4 @@ config VIRTIO_VGA
 
 config DPCD
     bool
+    select AUX
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [Qemu-devel] [PATCH v4 27/29] hw/arm: Express dependencies of the xlnx-versal-virt machine with Kconfig
  2019-03-07 14:18 [Qemu-devel] [PATCH v4 00/29] Kconfig dependencies for ARM machines Thomas Huth
                   ` (25 preceding siblings ...)
  2019-03-07 14:18 ` [Qemu-devel] [PATCH v4 26/29] hw/arm: Express dependencies of the ZynqMP zcu102 " Thomas Huth
@ 2019-03-07 14:18 ` Thomas Huth
  2019-03-07 14:18 ` [Qemu-devel] [PATCH v4 28/29] hw/arm: Express dependencies of the musca machines " Thomas Huth
                   ` (3 subsequent siblings)
  30 siblings, 0 replies; 35+ messages in thread
From: Thomas Huth @ 2019-03-07 14:18 UTC (permalink / raw)
  To: yang.zhong, pbonzini, qemu-devel
  Cc: Philippe Mathieu-Daudé,
	qemu-arm, John Snow, Michael S. Tsirkin, Peter Maydell

Dependencies have been determined with trial-and-error and by
looking at the xlnx-versal.c source file.

Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 hw/arm/Kconfig | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig
index adc38d4..3a04def 100644
--- a/hw/arm/Kconfig
+++ b/hw/arm/Kconfig
@@ -297,6 +297,10 @@ config XLNX_ZYNQMP_ARM
 
 config XLNX_VERSAL
     bool
+    select ARM_GIC
+    select PL011
+    select CADENCE
+    select VIRTIO_MMIO
 
 config FSL_IMX25
     bool
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [Qemu-devel] [PATCH v4 28/29] hw/arm: Express dependencies of the musca machines with Kconfig
  2019-03-07 14:18 [Qemu-devel] [PATCH v4 00/29] Kconfig dependencies for ARM machines Thomas Huth
                   ` (26 preceding siblings ...)
  2019-03-07 14:18 ` [Qemu-devel] [PATCH v4 27/29] hw/arm: Express dependencies of the xlnx-versal-virt " Thomas Huth
@ 2019-03-07 14:18 ` Thomas Huth
  2019-03-07 14:18 ` [Qemu-devel] [PATCH v4 29/29] hw/arm: Remove hard-enablement of the remaining PCI devices Thomas Huth
                   ` (2 subsequent siblings)
  30 siblings, 0 replies; 35+ messages in thread
From: Thomas Huth @ 2019-03-07 14:18 UTC (permalink / raw)
  To: yang.zhong, pbonzini, qemu-devel
  Cc: Philippe Mathieu-Daudé,
	qemu-arm, John Snow, Michael S. Tsirkin, Peter Maydell

Dependencies have been determined with trial-and-error and by
looking at the musca.c source file.

Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 hw/arm/Kconfig | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig
index 3a04def..7a0e0ba 100644
--- a/hw/arm/Kconfig
+++ b/hw/arm/Kconfig
@@ -77,6 +77,12 @@ config MAINSTONE
     select PFLASH_CFI01
     select SMC91C111
 
+config MUSCA
+    bool
+    select ARMSSE
+    select PL011
+    select PL031
+
 config MUSICPAL
     bool
     select BITBANG_I2C
@@ -429,6 +435,3 @@ config ARMSSE_CPUID
 
 config ARMSSE_MHU
     bool
-
-config MUSCA
-    bool
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [Qemu-devel] [PATCH v4 29/29] hw/arm: Remove hard-enablement of the remaining PCI devices
  2019-03-07 14:18 [Qemu-devel] [PATCH v4 00/29] Kconfig dependencies for ARM machines Thomas Huth
                   ` (27 preceding siblings ...)
  2019-03-07 14:18 ` [Qemu-devel] [PATCH v4 28/29] hw/arm: Express dependencies of the musca machines " Thomas Huth
@ 2019-03-07 14:18 ` Thomas Huth
  2019-03-07 14:59 ` [Qemu-devel] [PATCH v4 00/29] Kconfig dependencies for ARM machines no-reply
  2019-03-09 21:40 ` no-reply
  30 siblings, 0 replies; 35+ messages in thread
From: Thomas Huth @ 2019-03-07 14:18 UTC (permalink / raw)
  To: yang.zhong, pbonzini, qemu-devel
  Cc: Philippe Mathieu-Daudé,
	qemu-arm, John Snow, Michael S. Tsirkin, Peter Maydell

The PCI devices should be pulled in by default if PCI_DEVICES
is set, so there is no need anymore to enforce them in the configs
file.

Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 default-configs/arm-softmmu.mak | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/default-configs/arm-softmmu.mak b/default-configs/arm-softmmu.mak
index ee95cc0..6b1f6a8 100644
--- a/default-configs/arm-softmmu.mak
+++ b/default-configs/arm-softmmu.mak
@@ -33,14 +33,6 @@ CONFIG_DIGIC=y
 CONFIG_SABRELITE=y
 CONFIG_EMCRAFT_SF2=y
 CONFIG_MICROBIT=y
-
-CONFIG_VGA=y
-
 CONFIG_FSL_IMX25=y
 CONFIG_FSL_IMX7=y
 CONFIG_FSL_IMX6UL=y
-
-CONFIG_PCIE_PORT=y
-CONFIG_XIO3130=y
-CONFIG_IOH3420=y
-CONFIG_I82801B11=y
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 35+ messages in thread

* Re: [Qemu-devel] [PATCH v4 00/29] Kconfig dependencies for ARM machines
  2019-03-07 14:18 [Qemu-devel] [PATCH v4 00/29] Kconfig dependencies for ARM machines Thomas Huth
                   ` (28 preceding siblings ...)
  2019-03-07 14:18 ` [Qemu-devel] [PATCH v4 29/29] hw/arm: Remove hard-enablement of the remaining PCI devices Thomas Huth
@ 2019-03-07 14:59 ` no-reply
  2019-03-09 21:40 ` no-reply
  30 siblings, 0 replies; 35+ messages in thread
From: no-reply @ 2019-03-07 14:59 UTC (permalink / raw)
  To: thuth
  Cc: fam, yang.zhong, pbonzini, qemu-devel, peter.maydell, jsnow,
	qemu-arm, philmd, mst

Patchew URL: https://patchew.org/QEMU/1551968334-18982-1-git-send-email-thuth@redhat.com/



Hi,

This series seems to have some coding style problems. See output below for
more information:

Type: series
Message-id: 1551968334-18982-1-git-send-email-thuth@redhat.com
Subject: [Qemu-devel] [PATCH v4 00/29] Kconfig dependencies for ARM machines

=== TEST SCRIPT BEGIN ===
#!/bin/bash
git rev-parse base > /dev/null || exit 0
git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram
./scripts/checkpatch.pl --mailback base..
=== TEST SCRIPT END ===

Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
From https://github.com/patchew-project/qemu
 * [new tag]               patchew/1551968334-18982-1-git-send-email-thuth@redhat.com -> patchew/1551968334-18982-1-git-send-email-thuth@redhat.com
Switched to a new branch 'test'
7a49f0e7fc hw/arm: Remove hard-enablement of the remaining PCI devices
5972e76d91 hw/arm: Express dependencies of the musca machines with Kconfig
2fe0991947 hw/arm: Express dependencies of the xlnx-versal-virt machine with Kconfig
89816717cc hw/arm: Express dependencies of the ZynqMP zcu102 machine with Kconfig
073ba3a043 hw/arm: Express dependencies of the microbit / nrf51 machine with Kconfig
b401ff6f8a hw/arm: Express dependencies for remaining IMX boards with Kconfig
2ed93aae1e hw/arm: Express dependencies of the MSF2 / EMCRAFT_SF2 machine with Kconfig
3238b4b7e3 hw/arm: Express dependencies of sabrelite with Kconfig
1c24fa816d hw/arm: Express dependencies of canon-a1100 with Kconfig
de1ad28241 hw/arm: Express dependencies of the raspi machines with Kconfig
543bf8a7a2 hw/arm: Express dependencies of the MPS2 boards with Kconfig
f52e0f02a0 hw/arm: Express dependencies of allwinner / cubieboard with Kconfig
58d1e7b58e hw/arm: Express dependencies of netduino / stm32f2xx with Kconfig
18f1a551d8 hw/arm: Express dependencies of the virt machine with Kconfig
fd99e7322f hw/arm: Express dependencies of the aspeed boards with Kconfig
e3342d6665 hw/arm: Express dependencies of collie with Kconfig
2b7d5906ca hw/arm: Express dependencies of xilinx-zynq with Kconfig
5e3d8a9740 hw/arm: Express dependencies of the PXA2xx machines with Kconfig
9f01ca8889 hw/arm: Express dependencies of realview, versatile and vexpress with Kconfig
475f8aeca0 hw/arm: Express dependencies of stellaris with Kconfig
c21e5c7fb5 hw/arm: Express dependencies of the OMAP machines with Kconfig
7e669c51cf hw/arm: Express dependencies of musicpal with Kconfig
98422e5732 hw/arm: Express dependencies of the fsl-imx31 machine with Kconfig
94baf18b80 hw/arm: Express dependencies of integratorcp with Kconfig
80448178fe hw/arm: Express dependencies of the highbank machines with Kconfig
99200c7e4b hw/arm: Express dependencies of the exynos machines with Kconfig
a71ef12409 hw/sd/sdhci: Move PCI-related code into a separate file
15e1f1f48c hw/ide/ahci: Add a Kconfig switch for the AHDI-ICH9 device
91cd8d9338 hw/pci/pci-stub: Add msi_enabled() and msi_notify() to the pci stubs

=== OUTPUT BEGIN ===
1/29 Checking commit 91cd8d9338e2 (hw/pci/pci-stub: Add msi_enabled() and msi_notify() to the pci stubs)
2/29 Checking commit 15e1f1f48c73 (hw/ide/ahci: Add a Kconfig switch for the AHDI-ICH9 device)
3/29 Checking commit a71ef124095c (hw/sd/sdhci: Move PCI-related code into a separate file)
ERROR: Macros with complex values should be enclosed in parenthesis
#76: FILE: hw/sd/sdhci-internal.h:326:
+#define DEFINE_SDHCI_COMMON_PROPERTIES(_state) \
+    DEFINE_PROP_UINT8("sd-spec-version", _state, sd_spec_version, 2), \
+    DEFINE_PROP_UINT8("uhs", _state, uhs_mode, UHS_NOT_SUPPORTED), \
+    \
+    /* Capabilities registers provide information on supported

WARNING: Block comments use a leading /* on a separate line
#80: FILE: hw/sd/sdhci-internal.h:330:
+    /* Capabilities registers provide information on supported

WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#93: 
new file mode 100644

total: 1 errors, 2 warnings, 290 lines checked

Patch 3/29 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

4/29 Checking commit 99200c7e4b0b (hw/arm: Express dependencies of the exynos machines with Kconfig)
5/29 Checking commit 80448178fec7 (hw/arm: Express dependencies of the highbank machines with Kconfig)
6/29 Checking commit 94baf18b8031 (hw/arm: Express dependencies of integratorcp with Kconfig)
7/29 Checking commit 98422e573261 (hw/arm: Express dependencies of the fsl-imx31 machine with Kconfig)
8/29 Checking commit 7e669c51cf64 (hw/arm: Express dependencies of musicpal with Kconfig)
9/29 Checking commit c21e5c7fb52c (hw/arm: Express dependencies of the OMAP machines with Kconfig)
10/29 Checking commit 475f8aeca0b8 (hw/arm: Express dependencies of stellaris with Kconfig)
11/29 Checking commit 9f01ca888983 (hw/arm: Express dependencies of realview, versatile and vexpress with Kconfig)
12/29 Checking commit 5e3d8a97402c (hw/arm: Express dependencies of the PXA2xx machines with Kconfig)
13/29 Checking commit 2b7d5906ca99 (hw/arm: Express dependencies of xilinx-zynq with Kconfig)
14/29 Checking commit e3342d666514 (hw/arm: Express dependencies of collie with Kconfig)
15/29 Checking commit fd99e7322fc7 (hw/arm: Express dependencies of the aspeed boards with Kconfig)
16/29 Checking commit 18f1a551d87e (hw/arm: Express dependencies of the virt machine with Kconfig)
17/29 Checking commit 58d1e7b58e0f (hw/arm: Express dependencies of netduino / stm32f2xx with Kconfig)
18/29 Checking commit f52e0f02a06a (hw/arm: Express dependencies of allwinner / cubieboard with Kconfig)
19/29 Checking commit 543bf8a7a2ae (hw/arm: Express dependencies of the MPS2 boards with Kconfig)
20/29 Checking commit de1ad282418c (hw/arm: Express dependencies of the raspi machines with Kconfig)
21/29 Checking commit 1c24fa816d4e (hw/arm: Express dependencies of canon-a1100 with Kconfig)
22/29 Checking commit 3238b4b7e33a (hw/arm: Express dependencies of sabrelite with Kconfig)
23/29 Checking commit 2ed93aae1e68 (hw/arm: Express dependencies of the MSF2 / EMCRAFT_SF2 machine with Kconfig)
24/29 Checking commit b401ff6f8a73 (hw/arm: Express dependencies for remaining IMX boards with Kconfig)
25/29 Checking commit 073ba3a04384 (hw/arm: Express dependencies of the microbit / nrf51 machine with Kconfig)
26/29 Checking commit 89816717cce4 (hw/arm: Express dependencies of the ZynqMP zcu102 machine with Kconfig)
27/29 Checking commit 2fe0991947d4 (hw/arm: Express dependencies of the xlnx-versal-virt machine with Kconfig)
28/29 Checking commit 5972e76d91b5 (hw/arm: Express dependencies of the musca machines with Kconfig)
29/29 Checking commit 7a49f0e7fc3d (hw/arm: Remove hard-enablement of the remaining PCI devices)
=== OUTPUT END ===

Test command exited with code: 1


The full log is available at
http://patchew.org/logs/1551968334-18982-1-git-send-email-thuth@redhat.com/testing.checkpatch/?type=message.
---
Email generated automatically by Patchew [http://patchew.org/].
Please send your feedback to patchew-devel@redhat.com

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [Qemu-devel] [PATCH v4 00/29] Kconfig dependencies for ARM machines
  2019-03-07 14:18 [Qemu-devel] [PATCH v4 00/29] Kconfig dependencies for ARM machines Thomas Huth
                   ` (29 preceding siblings ...)
  2019-03-07 14:59 ` [Qemu-devel] [PATCH v4 00/29] Kconfig dependencies for ARM machines no-reply
@ 2019-03-09 21:40 ` no-reply
  30 siblings, 0 replies; 35+ messages in thread
From: no-reply @ 2019-03-09 21:40 UTC (permalink / raw)
  To: thuth
  Cc: fam, yang.zhong, pbonzini, qemu-devel, peter.maydell, jsnow,
	qemu-arm, philmd, mst

Patchew URL: https://patchew.org/QEMU/1551968334-18982-1-git-send-email-thuth@redhat.com/



Hi,

This series failed the docker-mingw@fedora build test. Please find the testing commands and
their output below. If you have Docker installed, you can probably reproduce it
locally.

=== TEST SCRIPT BEGIN ===
#!/bin/bash
time make docker-test-mingw@fedora SHOW_ENV=1 J=14 NETWORK=1
=== TEST SCRIPT END ===

  CC      hw/usb/dev-wacom.o
  CC      hw/usb/dev-storage.o
In file included from /tmp/qemu-test/src/hw/tpm/tpm_emulator.c:37:
/tmp/qemu-test/src/hw/tpm/tpm_ioctl.h:11:10: fatal error: sys/uio.h: No such file or directory
 #include <sys/uio.h>
          ^~~~~~~~~~~
compilation terminated.


The full log is available at
http://patchew.org/logs/1551968334-18982-1-git-send-email-thuth@redhat.com/testing.docker-mingw@fedora/?type=message.
---
Email generated automatically by Patchew [http://patchew.org/].
Please send your feedback to patchew-devel@redhat.com

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [Qemu-devel] [PATCH v4 03/29] hw/sd/sdhci: Move PCI-related code into a separate file
  2019-03-07 14:18 ` [Qemu-devel] [PATCH v4 03/29] hw/sd/sdhci: Move PCI-related code into a separate file Thomas Huth
@ 2019-03-10 21:12   ` Philippe Mathieu-Daudé
  0 siblings, 0 replies; 35+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-03-10 21:12 UTC (permalink / raw)
  To: Thomas Huth, yang.zhong, pbonzini, qemu-devel
  Cc: qemu-arm, John Snow, Michael S. Tsirkin, Peter Maydell

On 3/7/19 3:18 PM, Thomas Huth wrote:
> Some machines have an SDHCI device, but no PCI. To be able to
> compile hw/sd/sdhci.c without CONFIG_PCI, we must not call functions
> like pci_get_address_space() and pci_allocate_irq() there. Thus
> move the PCI-related code into a separate file.
> 
> This is required for the new Kconfig-like build system, e.g. it is
> needed if a user wants to compile a QEMU binary with just one machine
> that has SDHCI, but no PCI, like the ARM "raspi" machines for example.
> 
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
>  hw/sd/Kconfig          |  6 +++-
>  hw/sd/Makefile.objs    |  1 +
>  hw/sd/sdhci-internal.h | 34 ++++++++++++++++++
>  hw/sd/sdhci-pci.c      | 87 ++++++++++++++++++++++++++++++++++++++++++++
>  hw/sd/sdhci.c          | 98 +++-----------------------------------------------
>  5 files changed, 132 insertions(+), 94 deletions(-)
>  create mode 100644 hw/sd/sdhci-pci.c
> 
> diff --git a/hw/sd/Kconfig b/hw/sd/Kconfig
> index 864f535..c5e1e55 100644
> --- a/hw/sd/Kconfig
> +++ b/hw/sd/Kconfig
> @@ -12,6 +12,10 @@ config SD
>  
>  config SDHCI
>      bool
> +    select SD

Hmm this should be SDBUS. I'll clean that up later.

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>

> +
> +config SDHCI_PCI
> +    bool
>      default y if PCI_DEVICES
>      depends on PCI
> -    select SD
> +    select SDHCI
> diff --git a/hw/sd/Makefile.objs b/hw/sd/Makefile.objs
> index a99d9fb..0665727 100644
> --- a/hw/sd/Makefile.objs
> +++ b/hw/sd/Makefile.objs
> @@ -2,6 +2,7 @@ common-obj-$(CONFIG_PL181) += pl181.o
>  common-obj-$(CONFIG_SSI_SD) += ssi-sd.o
>  common-obj-$(CONFIG_SD) += sd.o core.o sdmmc-internal.o
>  common-obj-$(CONFIG_SDHCI) += sdhci.o
> +common-obj-$(CONFIG_SDHCI_PCI) += sdhci-pci.o
>  
>  obj-$(CONFIG_MILKYMIST) += milkymist-memcard.o
>  obj-$(CONFIG_OMAP) += omap_mmc.o
> diff --git a/hw/sd/sdhci-internal.h b/hw/sd/sdhci-internal.h
> index 19665fd..3414140 100644
> --- a/hw/sd/sdhci-internal.h
> +++ b/hw/sd/sdhci-internal.h
> @@ -304,4 +304,38 @@ extern const VMStateDescription sdhci_vmstate;
>  
>  #define ESDHC_PRNSTS_SDSTB              (1 << 3)
>  
> +/*
> + * Default SD/MMC host controller features information, which will be
> + * presented in CAPABILITIES register of generic SD host controller at reset.
> + *
> + * support:
> + * - 3.3v and 1.8v voltages
> + * - SDMA/ADMA1/ADMA2
> + * - high-speed
> + * max host controller R/W buffers size: 512B
> + * max clock frequency for SDclock: 52 MHz
> + * timeout clock frequency: 52 MHz
> + *
> + * does not support:
> + * - 3.0v voltage
> + * - 64-bit system bus
> + * - suspend/resume
> + */
> +#define SDHC_CAPAB_REG_DEFAULT 0x057834b4
> +
> +#define DEFINE_SDHCI_COMMON_PROPERTIES(_state) \
> +    DEFINE_PROP_UINT8("sd-spec-version", _state, sd_spec_version, 2), \
> +    DEFINE_PROP_UINT8("uhs", _state, uhs_mode, UHS_NOT_SUPPORTED), \
> +    \
> +    /* Capabilities registers provide information on supported
> +     * features of this specific host controller implementation */ \
> +    DEFINE_PROP_UINT64("capareg", _state, capareg, SDHC_CAPAB_REG_DEFAULT), \
> +    DEFINE_PROP_UINT64("maxcurr", _state, maxcurr, 0)
> +
> +void sdhci_initfn(SDHCIState *s);
> +void sdhci_uninitfn(SDHCIState *s);
> +void sdhci_common_realize(SDHCIState *s, Error **errp);
> +void sdhci_common_unrealize(SDHCIState *s, Error **errp);
> +void sdhci_common_class_init(ObjectClass *klass, void *data);
> +
>  #endif
> diff --git a/hw/sd/sdhci-pci.c b/hw/sd/sdhci-pci.c
> new file mode 100644
> index 0000000..f884661
> --- /dev/null
> +++ b/hw/sd/sdhci-pci.c
> @@ -0,0 +1,87 @@
> +/*
> + * SDHCI device on PCI
> + *
> + * This program is free software; you can redistribute it and/or modify it
> + * under the terms of the GNU General Public License as published by the
> + * Free Software Foundation; either version 2 of the License, or (at your
> + * option) any later version.
> + *
> + * This program is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
> + * See the GNU General Public License for more details.
> + *
> + * You should have received a copy of the GNU General Public License along
> + * with this program; if not, see <http://www.gnu.org/licenses/>.
> + */
> +
> +#include "qemu/osdep.h"
> +#include "qapi/error.h"
> +#include "hw/hw.h"
> +#include "hw/sd/sdhci.h"
> +#include "sdhci-internal.h"
> +
> +static Property sdhci_pci_properties[] = {
> +    DEFINE_SDHCI_COMMON_PROPERTIES(SDHCIState),
> +    DEFINE_PROP_END_OF_LIST(),
> +};
> +
> +static void sdhci_pci_realize(PCIDevice *dev, Error **errp)
> +{
> +    SDHCIState *s = PCI_SDHCI(dev);
> +    Error *local_err = NULL;
> +
> +    sdhci_initfn(s);
> +    sdhci_common_realize(s, &local_err);
> +    if (local_err) {
> +        error_propagate(errp, local_err);
> +        return;
> +    }
> +
> +    dev->config[PCI_CLASS_PROG] = 0x01; /* Standard Host supported DMA */
> +    dev->config[PCI_INTERRUPT_PIN] = 0x01; /* interrupt pin A */
> +    s->irq = pci_allocate_irq(dev);
> +    s->dma_as = pci_get_address_space(dev);
> +    pci_register_bar(dev, 0, PCI_BASE_ADDRESS_SPACE_MEMORY, &s->iomem);
> +}
> +
> +static void sdhci_pci_exit(PCIDevice *dev)
> +{
> +    SDHCIState *s = PCI_SDHCI(dev);
> +
> +    sdhci_common_unrealize(s, &error_abort);
> +    sdhci_uninitfn(s);
> +}
> +
> +static void sdhci_pci_class_init(ObjectClass *klass, void *data)
> +{
> +    DeviceClass *dc = DEVICE_CLASS(klass);
> +    PCIDeviceClass *k = PCI_DEVICE_CLASS(klass);
> +
> +    k->realize = sdhci_pci_realize;
> +    k->exit = sdhci_pci_exit;
> +    k->vendor_id = PCI_VENDOR_ID_REDHAT;
> +    k->device_id = PCI_DEVICE_ID_REDHAT_SDHCI;
> +    k->class_id = PCI_CLASS_SYSTEM_SDHCI;
> +    dc->props = sdhci_pci_properties;
> +
> +    sdhci_common_class_init(klass, data);
> +}
> +
> +static const TypeInfo sdhci_pci_info = {
> +    .name = TYPE_PCI_SDHCI,
> +    .parent = TYPE_PCI_DEVICE,
> +    .instance_size = sizeof(SDHCIState),
> +    .class_init = sdhci_pci_class_init,
> +    .interfaces = (InterfaceInfo[]) {
> +        { INTERFACE_CONVENTIONAL_PCI_DEVICE },
> +        { },
> +    },
> +};
> +
> +static void sdhci_pci_register_type(void)
> +{
> +    type_register_static(&sdhci_pci_info);
> +}
> +
> +type_init(sdhci_pci_register_type)
> diff --git a/hw/sd/sdhci.c b/hw/sd/sdhci.c
> index 83f1574..17ad546 100644
> --- a/hw/sd/sdhci.c
> +++ b/hw/sd/sdhci.c
> @@ -40,24 +40,6 @@
>  
>  #define MASKED_WRITE(reg, mask, val)  (reg = (reg & (mask)) | (val))
>  
> -/* Default SD/MMC host controller features information, which will be
> - * presented in CAPABILITIES register of generic SD host controller at reset.
> - *
> - * support:
> - * - 3.3v and 1.8v voltages
> - * - SDMA/ADMA1/ADMA2
> - * - high-speed
> - * max host controller R/W buffers size: 512B
> - * max clock frequency for SDclock: 52 MHz
> - * timeout clock frequency: 52 MHz
> - *
> - * does not support:
> - * - 3.0v voltage
> - * - 64-bit system bus
> - * - suspend/resume
> - */
> -#define SDHC_CAPAB_REG_DEFAULT 0x057834b4
> -
>  static inline unsigned int sdhci_get_fifolen(SDHCIState *s)
>  {
>      return 1 << (9 + FIELD_EX32(s->capareg, SDHC_CAPAB, MAXBLOCKLENGTH));
> @@ -1328,16 +1310,7 @@ static void sdhci_init_readonly_registers(SDHCIState *s, Error **errp)
>  
>  /* --- qdev common --- */
>  
> -#define DEFINE_SDHCI_COMMON_PROPERTIES(_state) \
> -    DEFINE_PROP_UINT8("sd-spec-version", _state, sd_spec_version, 2), \
> -    DEFINE_PROP_UINT8("uhs", _state, uhs_mode, UHS_NOT_SUPPORTED), \
> -    \
> -    /* Capabilities registers provide information on supported
> -     * features of this specific host controller implementation */ \
> -    DEFINE_PROP_UINT64("capareg", _state, capareg, SDHC_CAPAB_REG_DEFAULT), \
> -    DEFINE_PROP_UINT64("maxcurr", _state, maxcurr, 0)
> -
> -static void sdhci_initfn(SDHCIState *s)
> +void sdhci_initfn(SDHCIState *s)
>  {
>      qbus_create_inplace(&s->sdbus, sizeof(s->sdbus),
>                          TYPE_SDHCI_BUS, DEVICE(s), "sd-bus");
> @@ -1348,7 +1321,7 @@ static void sdhci_initfn(SDHCIState *s)
>      s->io_ops = &sdhci_mmio_ops;
>  }
>  
> -static void sdhci_uninitfn(SDHCIState *s)
> +void sdhci_uninitfn(SDHCIState *s)
>  {
>      timer_del(s->insert_timer);
>      timer_free(s->insert_timer);
> @@ -1359,7 +1332,7 @@ static void sdhci_uninitfn(SDHCIState *s)
>      s->fifo_buffer = NULL;
>  }
>  
> -static void sdhci_common_realize(SDHCIState *s, Error **errp)
> +void sdhci_common_realize(SDHCIState *s, Error **errp)
>  {
>      Error *local_err = NULL;
>  
> @@ -1375,7 +1348,7 @@ static void sdhci_common_realize(SDHCIState *s, Error **errp)
>                            SDHC_REGISTERS_MAP_SIZE);
>  }
>  
> -static void sdhci_common_unrealize(SDHCIState *s, Error **errp)
> +void sdhci_common_unrealize(SDHCIState *s, Error **errp)
>  {
>      /* This function is expected to be called only once for each class:
>       * - SysBus:    via DeviceClass->unrealize(),
> @@ -1445,7 +1418,7 @@ const VMStateDescription sdhci_vmstate = {
>      },
>  };
>  
> -static void sdhci_common_class_init(ObjectClass *klass, void *data)
> +void sdhci_common_class_init(ObjectClass *klass, void *data)
>  {
>      DeviceClass *dc = DEVICE_CLASS(klass);
>  
> @@ -1454,66 +1427,6 @@ static void sdhci_common_class_init(ObjectClass *klass, void *data)
>      dc->reset = sdhci_poweron_reset;
>  }
>  
> -/* --- qdev PCI --- */
> -
> -static Property sdhci_pci_properties[] = {
> -    DEFINE_SDHCI_COMMON_PROPERTIES(SDHCIState),
> -    DEFINE_PROP_END_OF_LIST(),
> -};
> -
> -static void sdhci_pci_realize(PCIDevice *dev, Error **errp)
> -{
> -    SDHCIState *s = PCI_SDHCI(dev);
> -    Error *local_err = NULL;
> -
> -    sdhci_initfn(s);
> -    sdhci_common_realize(s, &local_err);
> -    if (local_err) {
> -        error_propagate(errp, local_err);
> -        return;
> -    }
> -
> -    dev->config[PCI_CLASS_PROG] = 0x01; /* Standard Host supported DMA */
> -    dev->config[PCI_INTERRUPT_PIN] = 0x01; /* interrupt pin A */
> -    s->irq = pci_allocate_irq(dev);
> -    s->dma_as = pci_get_address_space(dev);
> -    pci_register_bar(dev, 0, PCI_BASE_ADDRESS_SPACE_MEMORY, &s->iomem);
> -}
> -
> -static void sdhci_pci_exit(PCIDevice *dev)
> -{
> -    SDHCIState *s = PCI_SDHCI(dev);
> -
> -    sdhci_common_unrealize(s, &error_abort);
> -    sdhci_uninitfn(s);
> -}
> -
> -static void sdhci_pci_class_init(ObjectClass *klass, void *data)
> -{
> -    DeviceClass *dc = DEVICE_CLASS(klass);
> -    PCIDeviceClass *k = PCI_DEVICE_CLASS(klass);
> -
> -    k->realize = sdhci_pci_realize;
> -    k->exit = sdhci_pci_exit;
> -    k->vendor_id = PCI_VENDOR_ID_REDHAT;
> -    k->device_id = PCI_DEVICE_ID_REDHAT_SDHCI;
> -    k->class_id = PCI_CLASS_SYSTEM_SDHCI;
> -    dc->props = sdhci_pci_properties;
> -
> -    sdhci_common_class_init(klass, data);
> -}
> -
> -static const TypeInfo sdhci_pci_info = {
> -    .name = TYPE_PCI_SDHCI,
> -    .parent = TYPE_PCI_DEVICE,
> -    .instance_size = sizeof(SDHCIState),
> -    .class_init = sdhci_pci_class_init,
> -    .interfaces = (InterfaceInfo[]) {
> -        { INTERFACE_CONVENTIONAL_PCI_DEVICE },
> -        { },
> -    },
> -};
> -
>  /* --- qdev SysBus --- */
>  
>  static Property sdhci_sysbus_properties[] = {
> @@ -1846,7 +1759,6 @@ static const TypeInfo imx_usdhc_info = {
>  
>  static void sdhci_register_types(void)
>  {
> -    type_register_static(&sdhci_pci_info);
>      type_register_static(&sdhci_sysbus_info);
>      type_register_static(&sdhci_bus_info);
>      type_register_static(&imx_usdhc_info);
> 

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [Qemu-devel] [PATCH v4 19/29] hw/arm: Express dependencies of the MPS2 boards with Kconfig
  2019-03-07 14:18 ` [Qemu-devel] [PATCH v4 19/29] hw/arm: Express dependencies of the MPS2 boards " Thomas Huth
@ 2019-03-10 21:33   ` Philippe Mathieu-Daudé
  2019-03-11  6:35     ` Thomas Huth
  0 siblings, 1 reply; 35+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-03-10 21:33 UTC (permalink / raw)
  To: Thomas Huth, yang.zhong, pbonzini, qemu-devel
  Cc: qemu-arm, John Snow, Michael S. Tsirkin, Peter Maydell

Hi Thomas,

On 3/7/19 3:18 PM, Thomas Huth wrote:
> Add Kconfig dependencies for the mps2-an* machines.
> 
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
>  default-configs/arm-softmmu.mak | 20 +-------------------
>  hw/arm/Kconfig                  | 18 ++++++++++++++++++
>  2 files changed, 19 insertions(+), 19 deletions(-)
> 
> diff --git a/default-configs/arm-softmmu.mak b/default-configs/arm-softmmu.mak
> index b6f3d60..b8509fd 100644
> --- a/default-configs/arm-softmmu.mak
> +++ b/default-configs/arm-softmmu.mak
> @@ -27,6 +27,7 @@ CONFIG_Z2=y
>  CONFIG_COLLIE=y
>  CONFIG_ASPEED_SOC=y
>  CONFIG_NETDUINO2=y
> +CONFIG_MPS2=y
>  
>  CONFIG_VGA=y
>  CONFIG_SSI_M25P80=y
> @@ -35,28 +36,9 @@ CONFIG_IMX_FEC=y
>  CONFIG_FRAMEBUFFER=y
>  
>  CONFIG_DIGIC=y
> -CONFIG_MPS2=y
>  CONFIG_RASPI=y
>  CONFIG_NRF51_SOC=y
>  
> -CONFIG_CMSDK_APB_TIMER=y
> -CONFIG_CMSDK_APB_DUALTIMER=y
> -CONFIG_CMSDK_APB_UART=y
> -CONFIG_CMSDK_APB_WATCHDOG=y
> -
> -CONFIG_MPS2_FPGAIO=y
> -CONFIG_MPS2_SCC=y
> -
> -CONFIG_TZ_MPC=y
> -CONFIG_TZ_MSC=y
> -CONFIG_TZ_PPC=y
> -CONFIG_ARMSSE=y
> -CONFIG_IOTKIT_SECCTL=y
> -CONFIG_IOTKIT_SYSCTL=y
> -CONFIG_IOTKIT_SYSINFO=y
> -CONFIG_ARMSSE_CPUID=y
> -CONFIG_ARMSSE_MHU=y
> -
>  CONFIG_FSL_IMX6=y
>  CONFIG_FSL_IMX25=y
>  CONFIG_FSL_IMX7=y
> diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig
> index 743c78b..32c8663 100644
> --- a/hw/arm/Kconfig
> +++ b/hw/arm/Kconfig
> @@ -308,6 +308,13 @@ config ASPEED_SOC
>  
>  config MPS2
>      bool
> +    select ARMSSE
> +    select LAN9118
> +    select MPS2_FPGAIO
> +    select MPS2_SCC
> +    select PL022    # Serial port
> +    select PL080    # DMA controller
> +    select TZ_MPC

Can we move TZ_MPC to ARMSSE?

>  config FSL_IMX7
>      bool
> @@ -347,6 +354,17 @@ config ARM11MPCORE
>  
>  config ARMSSE
>      bool
> +    select ARMSSE_CPUID
> +    select ARMSSE_MHU
> +    select CMSDK_APB_TIMER
> +    select CMSDK_APB_DUALTIMER
> +    select CMSDK_APB_UART
> +    select CMSDK_APB_WATCHDOG
> +    select IOTKIT_SECCTL
> +    select IOTKIT_SYSCTL
> +    select IOTKIT_SYSINFO
> +    select TZ_MSC
> +    select TZ_PPC
>  
>  config ARMSSE_CPUID
>      bool
> 

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [Qemu-devel] [PATCH v4 19/29] hw/arm: Express dependencies of the MPS2 boards with Kconfig
  2019-03-10 21:33   ` Philippe Mathieu-Daudé
@ 2019-03-11  6:35     ` Thomas Huth
  0 siblings, 0 replies; 35+ messages in thread
From: Thomas Huth @ 2019-03-11  6:35 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, yang.zhong, pbonzini, qemu-devel
  Cc: qemu-arm, John Snow, Michael S. Tsirkin, Peter Maydell

On 10/03/2019 22.33, Philippe Mathieu-Daudé wrote:
> Hi Thomas,
> 
> On 3/7/19 3:18 PM, Thomas Huth wrote:
>> Add Kconfig dependencies for the mps2-an* machines.
>>
>> Signed-off-by: Thomas Huth <thuth@redhat.com>
>> ---
>>  default-configs/arm-softmmu.mak | 20 +-------------------
>>  hw/arm/Kconfig                  | 18 ++++++++++++++++++
>>  2 files changed, 19 insertions(+), 19 deletions(-)
>>
>> diff --git a/default-configs/arm-softmmu.mak b/default-configs/arm-softmmu.mak
>> index b6f3d60..b8509fd 100644
>> --- a/default-configs/arm-softmmu.mak
>> +++ b/default-configs/arm-softmmu.mak
>> @@ -27,6 +27,7 @@ CONFIG_Z2=y
>>  CONFIG_COLLIE=y
>>  CONFIG_ASPEED_SOC=y
>>  CONFIG_NETDUINO2=y
>> +CONFIG_MPS2=y
>>  
>>  CONFIG_VGA=y
>>  CONFIG_SSI_M25P80=y
>> @@ -35,28 +36,9 @@ CONFIG_IMX_FEC=y
>>  CONFIG_FRAMEBUFFER=y
>>  
>>  CONFIG_DIGIC=y
>> -CONFIG_MPS2=y
>>  CONFIG_RASPI=y
>>  CONFIG_NRF51_SOC=y
>>  
>> -CONFIG_CMSDK_APB_TIMER=y
>> -CONFIG_CMSDK_APB_DUALTIMER=y
>> -CONFIG_CMSDK_APB_UART=y
>> -CONFIG_CMSDK_APB_WATCHDOG=y
>> -
>> -CONFIG_MPS2_FPGAIO=y
>> -CONFIG_MPS2_SCC=y
>> -
>> -CONFIG_TZ_MPC=y
>> -CONFIG_TZ_MSC=y
>> -CONFIG_TZ_PPC=y
>> -CONFIG_ARMSSE=y
>> -CONFIG_IOTKIT_SECCTL=y
>> -CONFIG_IOTKIT_SYSCTL=y
>> -CONFIG_IOTKIT_SYSINFO=y
>> -CONFIG_ARMSSE_CPUID=y
>> -CONFIG_ARMSSE_MHU=y
>> -
>>  CONFIG_FSL_IMX6=y
>>  CONFIG_FSL_IMX25=y
>>  CONFIG_FSL_IMX7=y
>> diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig
>> index 743c78b..32c8663 100644
>> --- a/hw/arm/Kconfig
>> +++ b/hw/arm/Kconfig
>> @@ -308,6 +308,13 @@ config ASPEED_SOC
>>  
>>  config MPS2
>>      bool
>> +    select ARMSSE
>> +    select LAN9118
>> +    select MPS2_FPGAIO
>> +    select MPS2_SCC
>> +    select PL022    # Serial port
>> +    select PL080    # DMA controller
>> +    select TZ_MPC
> 
> Can we move TZ_MPC to ARMSSE?

Oh, right, armsse_init() uses TYPE_TZ_MPC, too, so it should be moved.

 Thomas

^ permalink raw reply	[flat|nested] 35+ messages in thread

end of thread, other threads:[~2019-03-11  6:52 UTC | newest]

Thread overview: 35+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-07 14:18 [Qemu-devel] [PATCH v4 00/29] Kconfig dependencies for ARM machines Thomas Huth
2019-03-07 14:18 ` [Qemu-devel] [PATCH v4 01/29] hw/pci/pci-stub: Add msi_enabled() and msi_notify() to the pci stubs Thomas Huth
2019-03-07 14:18 ` [Qemu-devel] [PATCH v4 02/29] hw/ide/ahci: Add a Kconfig switch for the AHDI-ICH9 device Thomas Huth
2019-03-07 14:18 ` [Qemu-devel] [PATCH v4 03/29] hw/sd/sdhci: Move PCI-related code into a separate file Thomas Huth
2019-03-10 21:12   ` Philippe Mathieu-Daudé
2019-03-07 14:18 ` [Qemu-devel] [PATCH v4 04/29] hw/arm: Express dependencies of the exynos machines with Kconfig Thomas Huth
2019-03-07 14:18 ` [Qemu-devel] [PATCH v4 05/29] hw/arm: Express dependencies of the highbank " Thomas Huth
2019-03-07 14:18 ` [Qemu-devel] [PATCH v4 06/29] hw/arm: Express dependencies of integratorcp " Thomas Huth
2019-03-07 14:18 ` [Qemu-devel] [PATCH v4 07/29] hw/arm: Express dependencies of the fsl-imx31 machine " Thomas Huth
2019-03-07 14:18 ` [Qemu-devel] [PATCH v4 08/29] hw/arm: Express dependencies of musicpal " Thomas Huth
2019-03-07 14:18 ` [Qemu-devel] [PATCH v4 09/29] hw/arm: Express dependencies of the OMAP machines " Thomas Huth
2019-03-07 14:18 ` [Qemu-devel] [PATCH v4 10/29] hw/arm: Express dependencies of stellaris " Thomas Huth
2019-03-07 14:18 ` [Qemu-devel] [PATCH v4 11/29] hw/arm: Express dependencies of realview, versatile and vexpress " Thomas Huth
2019-03-07 14:18 ` [Qemu-devel] [PATCH v4 12/29] hw/arm: Express dependencies of the PXA2xx machines " Thomas Huth
2019-03-07 14:18 ` [Qemu-devel] [PATCH v4 13/29] hw/arm: Express dependencies of xilinx-zynq " Thomas Huth
2019-03-07 14:18 ` [Qemu-devel] [PATCH v4 14/29] hw/arm: Express dependencies of collie " Thomas Huth
2019-03-07 14:18 ` [Qemu-devel] [PATCH v4 15/29] hw/arm: Express dependencies of the aspeed boards " Thomas Huth
2019-03-07 14:18 ` [Qemu-devel] [PATCH v4 16/29] hw/arm: Express dependencies of the virt machine " Thomas Huth
2019-03-07 14:18 ` [Qemu-devel] [PATCH v4 17/29] hw/arm: Express dependencies of netduino / stm32f2xx " Thomas Huth
2019-03-07 14:18 ` [Qemu-devel] [PATCH v4 18/29] hw/arm: Express dependencies of allwinner / cubieboard " Thomas Huth
2019-03-07 14:18 ` [Qemu-devel] [PATCH v4 19/29] hw/arm: Express dependencies of the MPS2 boards " Thomas Huth
2019-03-10 21:33   ` Philippe Mathieu-Daudé
2019-03-11  6:35     ` Thomas Huth
2019-03-07 14:18 ` [Qemu-devel] [PATCH v4 20/29] hw/arm: Express dependencies of the raspi machines " Thomas Huth
2019-03-07 14:18 ` [Qemu-devel] [PATCH v4 21/29] hw/arm: Express dependencies of canon-a1100 " Thomas Huth
2019-03-07 14:18 ` [Qemu-devel] [PATCH v4 22/29] hw/arm: Express dependencies of sabrelite " Thomas Huth
2019-03-07 14:18 ` [Qemu-devel] [PATCH v4 23/29] hw/arm: Express dependencies of the MSF2 / EMCRAFT_SF2 machine " Thomas Huth
2019-03-07 14:18 ` [Qemu-devel] [PATCH v4 24/29] hw/arm: Express dependencies for remaining IMX boards " Thomas Huth
2019-03-07 14:18 ` [Qemu-devel] [PATCH v4 25/29] hw/arm: Express dependencies of the microbit / nrf51 machine " Thomas Huth
2019-03-07 14:18 ` [Qemu-devel] [PATCH v4 26/29] hw/arm: Express dependencies of the ZynqMP zcu102 " Thomas Huth
2019-03-07 14:18 ` [Qemu-devel] [PATCH v4 27/29] hw/arm: Express dependencies of the xlnx-versal-virt " Thomas Huth
2019-03-07 14:18 ` [Qemu-devel] [PATCH v4 28/29] hw/arm: Express dependencies of the musca machines " Thomas Huth
2019-03-07 14:18 ` [Qemu-devel] [PATCH v4 29/29] hw/arm: Remove hard-enablement of the remaining PCI devices Thomas Huth
2019-03-07 14:59 ` [Qemu-devel] [PATCH v4 00/29] Kconfig dependencies for ARM machines no-reply
2019-03-09 21:40 ` no-reply

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.