Skip to contentSkip to conversation

omap1: Separate omap1 subdevices from omap_mpu_state

PATCH In review Peter Maydell 2 participants 10 messages Dec 20, 2011 – Jan 4, 2012

lore
Share & tools
lore
#0 lore raw

cover omap1: Separate omap1 subdevices from omap_mpu_state

This patchset is some minor cleanup which pulls out the data fields of omap_mpu_state which are really specific to the omap1 into their own structures in omap1.c. (At some point they can then be converted fully into qdev devices I guess.)

There's also a couple of trivial cleanups from me in there.

Juha Riihimäki (4):
hw/omap1.c: Separate PWL from omap_mpu_state hw/omap1.c: Separate PWT from omap_mpu_state hw/omap1.c: Separate dpll_ctl from omap_mpu_state hw/omap1.c: Separate clkm from omap_mpu_state

Peter Maydell (2):
hw/omap1.c: omap_mpuio_init() need not be public hw/omap1.c: Drop unused includes

 hw/omap.h  |   44 +---------
 hw/omap1.c |  278 +++++++++++++++++++++++++++++++++++-------------------------
 2 files changed, 165 insertions(+), 157 deletions(-)
#1 lore raw

PATCH 1/6 hw/omap1.c: omap_mpuio_init() need not be public

omap_mpuio_init() is only used and defined in omap1.c, so make it static.

---
 hw/omap.h  |    4 ----
 hw/omap1.c |    2 +-
 2 files changed, 1 insertions(+), 5 deletions(-)
hw/omap.h +0 -4
index 42eb361..5fe33db 100644
@@ -672,10 +672,6 @@ void omap_uart_reset(struct omap_uart_s *s);
 void omap_uart_attach(struct omap_uart_s *s, CharDriverState *chr);
 
 struct omap_mpuio_s;
-struct omap_mpuio_s *omap_mpuio_init(MemoryRegion *system_memory,
-                target_phys_addr_t base,
-                qemu_irq kbd_int, qemu_irq gpio_int, qemu_irq wakeup,
-                omap_clk clk);
 qemu_irq *omap_mpuio_in_get(struct omap_mpuio_s *s);
 void omap_mpuio_out_set(struct omap_mpuio_s *s, int line, qemu_irq handler);
 void omap_mpuio_key(struct omap_mpuio_s *s, int row, int col, int down);
hw/omap1.c +1 -1
index 53cde76..dddac92 100644
@@ -2066,7 +2066,7 @@ static void omap_mpuio_onoff(void *opaque, int line, int on)
         omap_mpuio_kbd_update(s);
 }
 
-struct omap_mpuio_s *omap_mpuio_init(MemoryRegion *memory,
+static struct omap_mpuio_s *omap_mpuio_init(MemoryRegion *memory,
                 target_phys_addr_t base,
                 qemu_irq kbd_int, qemu_irq gpio_int, qemu_irq wakeup,
                 omap_clk clk)
Signature · 1 line
1.7.1
#2 lore raw

PATCH 2/6 hw/omap1.c: Separate PWL from omap_mpu_state

In reply to Peter Maydell

From: Juha Riihimäki <[email protected]>

[Riku Voipio: Fixes and restructuring patchset]
[Peter Maydell: More fixes and cleanups for upstream submission]
---
 hw/omap.h  |    8 +-------
 hw/omap1.c |   60 ++++++++++++++++++++++++++++++++++++------------------------
 2 files changed, 37 insertions(+), 31 deletions(-)
hw/omap.h +1 -7
index 5fe33db..851ad46 100644
@@ -829,7 +829,6 @@ struct omap_mpu_state_s {
     MemoryRegion tcmi_iomem;
     MemoryRegion clkm_iomem;
     MemoryRegion clkdsp_iomem;
-    MemoryRegion pwl_iomem;
     MemoryRegion pwt_iomem;
     MemoryRegion mpui_io_iomem;
     MemoryRegion tap_iomem;
@@ -867,12 +866,7 @@ struct omap_mpu_state_s {
 
     struct omap_uwire_s *microwire;
 
-    struct {
-        uint8_t output;
-        uint8_t level;
-        uint8_t enable;
-        int clk;
-    } pwl;
+    struct omap_pwl_s *pwl;
 
     struct {
         uint8_t frc;
hw/omap1.c +36 -24

130 lines not on this page · raw message

Signature · 1 line
1.7.1
#3 lore raw

PATCH 3/6 hw/omap1.c: Separate PWT from omap_mpu_state

In reply to Peter Maydell

From: Juha Riihimäki <[email protected]>

[Riku Voipio: Fixes and restructuring patchset]
[Peter Maydell: More fixes and cleanups for upstream submission]
---
 hw/omap.h  |   10 +---------
 hw/omap1.c |   57 ++++++++++++++++++++++++++++++++++-----------------------
 2 files changed, 35 insertions(+), 32 deletions(-)
hw/omap.h +1 -9
index 851ad46..2e227b5 100644
@@ -829,7 +829,6 @@ struct omap_mpu_state_s {
     MemoryRegion tcmi_iomem;
     MemoryRegion clkm_iomem;
     MemoryRegion clkdsp_iomem;
-    MemoryRegion pwt_iomem;
     MemoryRegion mpui_io_iomem;
     MemoryRegion tap_iomem;
     MemoryRegion imif_ram;
@@ -867,14 +866,7 @@ struct omap_mpu_state_s {
     struct omap_uwire_s *microwire;
 
     struct omap_pwl_s *pwl;
-
-    struct {
-        uint8_t frc;
-        uint8_t vrc;
-        uint8_t gcr;
-        omap_clk clk;
-    } pwt;
-
+    struct omap_pwt_s *pwt;
     struct omap_i2c_s *i2c[2];
 
     struct omap_rtc_s *rtc;
hw/omap1.c +34 -23

125 lines not on this page · raw message

Signature · 1 line
1.7.1
#4 lore raw

PATCH 4/6 hw/omap1.c: Separate dpll_ctl from omap_mpu_state

In reply to Peter Maydell

From: Juha Riihimäki <[email protected]>

[Riku Voipio: Fixes and restructuring patchset]
[Peter Maydell: More fixes and cleanups for upstream submission]
---
 hw/omap.h  |    6 +-----
 hw/omap1.c |   28 ++++++++++++++++++----------
 2 files changed, 19 insertions(+), 15 deletions(-)
hw/omap.h +1 -5
index 2e227b5..60fa34c 100644
@@ -904,11 +904,7 @@ struct omap_mpu_state_s {
 
     uint32_t tcmi_regs[17];
 
-    struct dpll_ctl_s {
-        MemoryRegion iomem;
-        uint16_t mode;
-        omap_clk dpll;
-    } dpll[3];
+    struct dpll_ctl_s *dpll[3];
 
     omap_clk clks;
     struct {
hw/omap1.c +18 -10
index 4635938..6ab9192 100644
@@ -1344,6 +1344,12 @@ static void omap_tcmi_init(MemoryRegion *memory, target_phys_addr_t base,
 }
 
 /* Digital phase-locked loops control */
+struct dpll_ctl_s {
+    MemoryRegion iomem;
+    uint16_t mode;
+    omap_clk dpll;
+};
+
 static uint64_t omap_dpll_read(void *opaque, target_phys_addr_t addr,
                                unsigned size)
 {
@@ -1409,15 +1415,17 @@ static void omap_dpll_reset(struct dpll_ctl_s *s)
     omap_clk_setrate(s->dpll, 1, 1);
 }
 
-static void omap_dpll_init(MemoryRegion *memory, struct dpll_ctl_s *s,
+static struct dpll_ctl_s  *omap_dpll_init(MemoryRegion *memory,
                            target_phys_addr_t base, omap_clk clk)
 {
+    struct dpll_ctl_s *s = g_malloc0(sizeof(*s));
     memory_region_init_io(&s->iomem, &omap_dpll_ops, s, "omap-dpll", 0x100);
 
     s->dpll = clk;
     omap_dpll_reset(s);
 
     memory_region_add_subregion(memory, base, &s->iomem);
+    return s;
 }
 
 /* MPU Clock/Reset/Power Mode Control */
@@ -3679,9 +3687,9 @@ static void omap1_mpu_reset(void *opaque)
     omap_mpui_reset(mpu);
     omap_tipb_bridge_reset(mpu->private_tipb);
     omap_tipb_bridge_reset(mpu->public_tipb);
-    omap_dpll_reset(&mpu->dpll[0]);
-    omap_dpll_reset(&mpu->dpll[1]);
-    omap_dpll_reset(&mpu->dpll[2]);
+    omap_dpll_reset(mpu->dpll[0]);
+    omap_dpll_reset(mpu->dpll[1]);
+    omap_dpll_reset(mpu->dpll[2]);
     omap_uart_reset(mpu->uart[0]);
     omap_uart_reset(mpu->uart[1]);
     omap_uart_reset(mpu->uart[2]);
@@ -3947,12 +3955,12 @@ struct omap_mpu_state_s *omap310_mpu_init(MemoryRegion *system_memory,
                     "uart3",
                     serial_hds[0] && serial_hds[1] ? serial_hds[2] : NULL);
 
-    omap_dpll_init(system_memory,
-                   &s->dpll[0], 0xfffecf00, omap_findclk(s, "dpll1"));
-    omap_dpll_init(system_memory,
-                   &s->dpll[1], 0xfffed000, omap_findclk(s, "dpll2"));
-    omap_dpll_init(system_memory,
-                   &s->dpll[2], 0xfffed100, omap_findclk(s, "dpll3"));
+    s->dpll[0] = omap_dpll_init(system_memory, 0xfffecf00,
+                                omap_findclk(s, "dpll1"));
+    s->dpll[1] = omap_dpll_init(system_memory, 0xfffed000,
+                                omap_findclk(s, "dpll2"));
+    s->dpll[2] = omap_dpll_init(system_memory, 0xfffed100,
+                                omap_findclk(s, "dpll3"));
 
     dinfo = drive_get(IF_SD, 0, 0);
     if (!dinfo) {
Signature · 1 line
1.7.1
#5 lore raw

PATCH 5/6 hw/omap1.c: Separate clkm from omap_mpu_state

In reply to Peter Maydell

From: Juha Riihimäki <[email protected]>

[Riku Voipio: Fixes and restructuring patchset]
[Peter Maydell: More fixes and cleanups for upstream submission]
---
 hw/omap.h  |   16 +-------
 hw/omap1.c |  127 ++++++++++++++++++++++++++++++++++--------------------------
 2 files changed, 73 insertions(+), 70 deletions(-)
hw/omap.h +1 -15
index 60fa34c..17b4312 100644
@@ -907,21 +907,7 @@ struct omap_mpu_state_s {
     struct dpll_ctl_s *dpll[3];
 
     omap_clk clks;
-    struct {
-        int cold_start;
-        int clocking_scheme;
-        uint16_t arm_ckctl;
-        uint16_t arm_idlect1;
-        uint16_t arm_idlect2;
-        uint16_t arm_ewupct;
-        uint16_t arm_rstct1;
-        uint16_t arm_rstct2;
-        uint16_t arm_ckout1;
-        int dpll1_mode;
-        uint16_t dsp_idlect1;
-        uint16_t dsp_idlect2;
-        uint16_t dsp_rstct2;
-    } clkm;
+    struct omap_clkm_s *clkm;
 
     /* OMAP2-only peripherals */
     struct omap_l4_s *l4;
hw/omap1.c +72 -55

234 lines not on this page · raw message

Signature · 1 line
1.7.1
#6 lore raw

Re: [Qemu-devel] [PATCH 5/6] hw/omap1.c: Separate clkm from omap_mpu_state

Quoted 272 lines · Peter Maydell

From: Juha Riihimäki <[email protected]>

[Riku Voipio: Fixes and restructuring patchset]
[Peter Maydell: More fixes and cleanups for upstream submission]

---
 hw/omap.h  |   16 +-------
 hw/omap1.c |  127 ++++++++++++++++++++++++++++++++++--------------------------

 2 files changed, 73 insertions(+), 70 deletions(-)
hw/omap.h +1 -15
index 60fa34c..17b4312 100644
@@ -907,21 +907,7 @@ struct omap_mpu_state_s {
     struct dpll_ctl_s *dpll[3];
 
     omap_clk clks;
-    struct {
-        int cold_start;
-        int clocking_scheme;
-        uint16_t arm_ckctl;
-        uint16_t arm_idlect1;
-        uint16_t arm_idlect2;
-        uint16_t arm_ewupct;
-        uint16_t arm_rstct1;
-        uint16_t arm_rstct2;
-        uint16_t arm_ckout1;
-        int dpll1_mode;
-        uint16_t dsp_idlect1;
-        uint16_t dsp_idlect2;
-        uint16_t dsp_rstct2;
-    } clkm;
+    struct omap_clkm_s *clkm;
 
     /* OMAP2-only peripherals */
     struct omap_l4_s *l4;
hw/omap1.c +16 -0
index 6ab9192..5fc67e9 100644
@@ -1429,6 +1429,22 @@ static struct dpll_ctl_s  *omap_dpll_init(MemoryRegion *memory,
  }
 
  /* MPU Clock/Reset/Power Mode Control */
+struct omap_clkm_s {
+    int cold_start;
+    int clocking_scheme;
+    uint16_t arm_ckctl;
+    uint16_t arm_idlect1;
+    uint16_t arm_idlect2;
+    uint16_t arm_ewupct;
+    uint16_t arm_rstct1;
+    uint16_t arm_rstct2;
+    uint16_t arm_ckout1;
+    int dpll1_mode;
+    uint16_t dsp_idlect1;
+    uint16_t dsp_idlect2;
+    uint16_t dsp_rstct2;
+};
+
  static uint64_t omap_clkm_read(void *opaque, target_phys_addr_t addr,
                                unsigned size)
  {
@@ -1440,28 +1456,28 @@ static uint64_t omap_clkm_read(void *opaque, target_phys_addr_t addr,
 
     switch (addr) {

    case 0x00: /* ARM_CKCTL */
-        return s->clkm.arm_ckctl;
+        return s->clkm->arm_ckctl;

    case 0x04: /* ARM_IDLECT1 */
-        return s->clkm.arm_idlect1;
+        return s->clkm->arm_idlect1;

    case 0x08: /* ARM_IDLECT2 */
-        return s->clkm.arm_idlect2;
+        return s->clkm->arm_idlect2;

    case 0x0c: /* ARM_EWUPCT */
-        return s->clkm.arm_ewupct;
+        return s->clkm->arm_ewupct;

    case 0x10: /* ARM_RSTCT1 */
-        return s->clkm.arm_rstct1;
+        return s->clkm->arm_rstct1;

    case 0x14: /* ARM_RSTCT2 */
-        return s->clkm.arm_rstct2;
+        return s->clkm->arm_rstct2;

    case 0x18: /* ARM_SYSST */
-        return (s->clkm.clocking_scheme << 11) | s->clkm.cold_start;
+        return (s->clkm->clocking_scheme << 11) | s->clkm->cold_start;

    case 0x1c: /* ARM_CKOUT1 */
-        return s->clkm.arm_ckout1;
+        return s->clkm->arm_ckout1;

    case 0x20: /* ARM_CKOUT2 */
        break;

hw/omap1.c +0 -0
@@ -1647,33 +1663,33 @@ static void omap_clkm_write(void *opaque, target_phys_addr_t addr,
 
     switch (addr) {

    case 0x00: /* ARM_CKCTL */
-        diff = s->clkm.arm_ckctl ^ value;
-        s->clkm.arm_ckctl = value & 0x7fff;
+        diff = s->clkm->arm_ckctl ^ value;
+        s->clkm->arm_ckctl = value & 0x7fff;
        omap_clkm_ckctl_update(s, diff, value);
        return;

    case 0x04: /* ARM_IDLECT1 */
-        diff = s->clkm.arm_idlect1 ^ value;
-        s->clkm.arm_idlect1 = value & 0x0fff;
+        diff = s->clkm->arm_idlect1 ^ value;
+        s->clkm->arm_idlect1 = value & 0x0fff;
        omap_clkm_idlect1_update(s, diff, value);
        return;

    case 0x08: /* ARM_IDLECT2 */
-        diff = s->clkm.arm_idlect2 ^ value;
-        s->clkm.arm_idlect2 = value & 0x07ff;
+        diff = s->clkm->arm_idlect2 ^ value;
+        s->clkm->arm_idlect2 = value & 0x07ff;
        omap_clkm_idlect2_update(s, diff, value);
        return;

    case 0x0c: /* ARM_EWUPCT */
-        s->clkm.arm_ewupct = value & 0x003f;
+        s->clkm->arm_ewupct = value & 0x003f;
        return;

    case 0x10: /* ARM_RSTCT1 */
-        diff = s->clkm.arm_rstct1 ^ value;
-        s->clkm.arm_rstct1 = value & 0x0007;
+        diff = s->clkm->arm_rstct1 ^ value;
+        s->clkm->arm_rstct1 = value & 0x0007;
        if (value & 9) {
            qemu_system_reset_request();
-            s->clkm.cold_start = 0xa;
+            s->clkm->cold_start = 0xa;
        }
        if (diff & ~value & 4) {                               /* DSP_RST */ omap_mpui_reset(s);

hw/omap1.c +0 -0
@@ -1687,21 +1703,21 @@ static void omap_clkm_write(void *opaque, target_phys_addr_t addr,
         return;
 

    case 0x14: /* ARM_RSTCT2 */
-        s->clkm.arm_rstct2 = value & 0x0001;
+        s->clkm->arm_rstct2 = value & 0x0001;
        return;

    case 0x18: /* ARM_SYSST */
-        if ((s->clkm.clocking_scheme ^ (value >> 11)) & 7) {
-            s->clkm.clocking_scheme = (value >> 11) & 7;
+        if ((s->clkm->clocking_scheme ^ (value >> 11)) & 7) {
+            s->clkm->clocking_scheme = (value >> 11) & 7; printf("%s: clocking scheme set to %s\n", __FUNCTION__,
-                            clkschemename[s->clkm.clocking_scheme]);
+                            clkschemename[s->clkm->clocking_scheme]); }
-        s->clkm.cold_start &= value & 0x3f;
+        s->clkm->cold_start &= value & 0x3f;
        return;

    case 0x1c: /* ARM_CKOUT1 */
-        diff = s->clkm.arm_ckout1 ^ value;
-        s->clkm.arm_ckout1 = value & 0x003f;
+        diff = s->clkm->arm_ckout1 ^ value;
+        s->clkm->arm_ckout1 = value & 0x003f;
        omap_clkm_ckout1_update(s, diff, value);
        return;

hw/omap1.c +0 -0
@@ -1728,16 +1744,16 @@ static uint64_t omap_clkdsp_read(void *opaque, target_phys_addr_t addr,
 
     switch (addr) {

    case 0x04: /* DSP_IDLECT1 */
-        return s->clkm.dsp_idlect1;
+        return s->clkm->dsp_idlect1;

    case 0x08: /* DSP_IDLECT2 */
-        return s->clkm.dsp_idlect2;
+        return s->clkm->dsp_idlect2;

    case 0x14: /* DSP_RSTCT2 */
-        return s->clkm.dsp_rstct2;
+        return s->clkm->dsp_rstct2;

    case 0x18: /* DSP_SYSST */
-        return (s->clkm.clocking_scheme << 11) | s->clkm.cold_start |
+        return (s->clkm->clocking_scheme << 11) | s->clkm->cold_start | (s->env->halted << 6); /* Quite useless... */ }

hw/omap1.c +0 -0
@@ -1773,23 +1789,23 @@ static void omap_clkdsp_write(void *opaque, target_phys_addr_t addr,
 
     switch (addr) {

    case 0x04: /* DSP_IDLECT1 */
-        diff = s->clkm.dsp_idlect1 ^ value;
-        s->clkm.dsp_idlect1 = value & 0x01f7;
+        diff = s->clkm->dsp_idlect1 ^ value;
+        s->clkm->dsp_idlect1 = value & 0x01f7; omap_clkdsp_idlect1_update(s, diff, value); break;

    case 0x08: /* DSP_IDLECT2 */
-        s->clkm.dsp_idlect2 = value & 0x0037;
-        diff = s->clkm.dsp_idlect1 ^ value;
+        s->clkm->dsp_idlect2 = value & 0x0037;
+        diff = s->clkm->dsp_idlect1 ^ value; omap_clkdsp_idlect2_update(s, diff, value); break;

    case 0x14: /* DSP_RSTCT2 */
-        s->clkm.dsp_rstct2 = value & 0x0001;
+        s->clkm->dsp_rstct2 = value & 0x0001;
        break;

    case 0x18: /* DSP_SYSST */
-        s->clkm.cold_start &= value & 0x3f;
+        s->clkm->cold_start &= value & 0x3f;
        break;

    default:

hw/omap1.c +16 -16
@@ -1806,24 +1822,24 @@ static const MemoryRegionOps omap_clkdsp_ops = {
  static void omap_clkm_reset(struct omap_mpu_state_s *s)
  {
     if (s->wdt && s->wdt->reset)
-        s->clkm.cold_start = 0x6;
-    s->clkm.clocking_scheme = 0;
+        s->clkm->cold_start = 0x6;
+    s->clkm->clocking_scheme = 0;
     omap_clkm_ckctl_update(s, ~0, 0x3000);
-    s->clkm.arm_ckctl = 0x3000;
-    omap_clkm_idlect1_update(s, s->clkm.arm_idlect1 ^ 0x0400, 0x0400);
-    s->clkm.arm_idlect1 = 0x0400;
-    omap_clkm_idlect2_update(s, s->clkm.arm_idlect2 ^ 0x0100, 0x0100);
-    s->clkm.arm_idlect2 = 0x0100;
-    s->clkm.arm_ewupct = 0x003f;
-    s->clkm.arm_rstct1 = 0x0000;
-    s->clkm.arm_rstct2 = 0x0000;
-    s->clkm.arm_ckout1 = 0x0015;
-    s->clkm.dpll1_mode = 0x2002;
-    omap_clkdsp_idlect1_update(s, s->clkm.dsp_idlect1 ^ 0x0040, 0x0040);
-    s->clkm.dsp_idlect1 = 0x0040;
+    s->clkm->arm_ckctl = 0x3000;
+    omap_clkm_idlect1_update(s, s->clkm->arm_idlect1 ^ 0x0400, 0x0400);
+    s->clkm->arm_idlect1 = 0x0400;
+    omap_clkm_idlect2_update(s, s->clkm->arm_idlect2 ^ 0x0100, 0x0100);
+    s->clkm->arm_idlect2 = 0x0100;
+    s->clkm->arm_ewupct = 0x003f;
+    s->clkm->arm_rstct1 = 0x0000;
+    s->clkm->arm_rstct2 = 0x0000;
+    s->clkm->arm_ckout1 = 0x0015;
+    s->clkm->dpll1_mode = 0x2002;
+    omap_clkdsp_idlect1_update(s, s->clkm->dsp_idlect1 ^ 0x0040, 0x0040);
+    s->clkm->dsp_idlect1 = 0x0040;
     omap_clkdsp_idlect2_update(s, ~0, 0x0000);
-    s->clkm.dsp_idlect2 = 0x0000;
-    s->clkm.dsp_rstct2 = 0x0000;
+    s->clkm->dsp_idlect2 = 0x0000;
+    s->clkm->dsp_rstct2 = 0x0000;
  }
 
  static void omap_clkm_init(MemoryRegion *memory, target_phys_addr_t mpu_base,
@@ -1834,11 +1850,12 @@ static void omap_clkm_init(MemoryRegion *memory, target_phys_addr_t mpu_base,
     memory_region_init_io(&s->clkdsp_iomem, &omap_clkdsp_ops, s,
                           "omap-clkdsp", 0x1000);
 

hw/omap1.c static void omap_clkm_init(MemoryRegion *memory, target_phys_addr_t mpu_base, · line 1858

Quoted 10 lines
hw/omap1.c +5 -4
-    s->clkm.arm_idlect1 = 0x03ff;
-    s->clkm.arm_idlect2 = 0x0100;
-    s->clkm.dsp_idlect1 = 0x0002;
+    s->clkm = g_malloc0(sizeof(*(s->clkm)));
+    s->clkm->arm_idlect1 = 0x03ff;
+    s->clkm->arm_idlect2 = 0x0100;
+    s->clkm->dsp_idlect1 = 0x0002;
     omap_clkm_reset(s);
-    s->clkm.cold_start = 0x3a;
+    s->clkm->cold_start = 0x3a;

Since this sub device uses parts of the rest of mpu state, it's (apparently) not a separate device, can we thus skip this change? I don't see much value in it and it doesn't simplify code. The other patches in this series I have no opinion about.

(note the parens in *(s->clkm) are redundant. Also would be great if your patches could maintain the indentation of the rest of the file where it's not specified by the new coding style, this would reduce inconsistency).

Cheers

#7 lore raw

Re: [Qemu-devel] [PATCH 5/6] hw/omap1.c: Separate clkm from omap_mpu_state

Quoted 3 lines · andrzej zaborowski

Since this sub device uses parts of the rest of mpu state, it's (apparently) not a separate device, can we thus skip this change?  I don't see much value in it and it doesn't simplify code.

If you like; I don't have a very strong feeling about it, I'm mostly just trying to get patches out of my tree, so "drop patch" is as good as "push to master" in that sense :-)

I do suspect that nested anonymous structs are going to be a pain for VMState if we ever get to adding save/load support to omap3.

Quoted 4 lines

(note the parens in *(s->clkm) are redundant.  Also would be great if your patches could maintain the indentation of the rest of the file where it's not specified by the new coding style, this would reduce inconsistency).

I mostly try not to make spurious indentation changes, but there are a lot in the patches I inherited from the qemu-meego tree so sometimes things slip through.

-- PMM

#8 lore raw

Re: [Qemu-devel] [PATCH 5/6] hw/omap1.c: Separate clkm from omap_mpu_state

Quoted 8 lines · Peter Maydell
Quoted 3 lines · andrzej zaborowski

Since this sub device uses parts of the rest of mpu state, it's (apparently) not a separate device, can we thus skip this change?  I don't see much value in it and it doesn't simplify code.

If you like; I don't have a very strong feeling about it, I'm mostly just trying to get patches out of my tree, so "drop patch" is as good as "push to master" in that sense :-)

I'm going to drop this patch and just include 1-4,6 in the arm-devs.next pullreq I'm putting together.

-- PMM

#9 lore raw

PATCH 6/6 hw/omap1.c: Drop unused includes

In reply to Peter Maydell

Drop includes of qemu-timer.h, qemu-char.h and pc.h as they are no longer needed.

---
 hw/omap1.c |    4 ----
 1 files changed, 0 insertions(+), 4 deletions(-)
hw/omap1.c +0 -4
index 5fc67e9..f89dca5 100644
@@ -20,11 +20,7 @@
 #include "arm-misc.h"
 #include "omap.h"
 #include "sysemu.h"
-#include "qemu-timer.h"
-#include "qemu-char.h"
 #include "soc_dma.h"
-/* We use pc-style serial ports.  */
-#include "pc.h"
 #include "blockdev.h"
 #include "range.h"
 #include "sysbus.h"
Signature · 1 line
1.7.1