Skip to contentSkip to conversation

Remove un-needed use of ssi_create_slave_no_init

PATCH Applied Peter Crosthwaite 2 participants 4 messages Apr 4, 2013 – Apr 5, 2013 Arm/Zynq architecture

lore
Share & tools
lore
#0 lore raw

cover Remove un-needed use of ssi_create_slave_no_init

Trivial code cleanup of the PetaLogix and Zynq machine models.

Peter Crosthwaite (2):
petalogix_ml605_mmu: Cleanup ssi_create_slave()
xilinx_zynq: Cleanup ssi_create_slave

 hw/arm/xilinx_zynq.c                |    3 +--
 hw/microblaze/petalogix_ml605_mmu.c |    3 +--
 2 files changed, 2 insertions(+), 4 deletions(-)
#1 lore raw

PATCH 1/2 petalogix_ml605_mmu: Cleanup ssi_create_slave()

With the recent m25p80 cleanup there is no need to use ssi_create_slave_no_init() anymore. Just use ssi_create_slave().

---

 hw/microblaze/petalogix_ml605_mmu.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
hw/microblaze/petalogix_ml605_mmu.c +1 -2
index cfc0220..07dc808 100644
@@ -158,8 +158,7 @@ petalogix_ml605_init(QEMUMachineInitArgs *args)
         for (i = 0; i < NUM_SPI_FLASHES; i++) {
             qemu_irq cs_line;
 
-            dev = ssi_create_slave_no_init(spi, "n25q128");
-            qdev_init_nofail(dev);
+            dev = ssi_create_slave(spi, "n25q128");
             cs_line = qdev_get_gpio_in(dev, 0);
             sysbus_connect_irq(busdev, i+1, cs_line);
         }
Signature · 1 line
1.7.0.4
#2 lore raw

PATCH 2/2 xilinx_zynq: Cleanup ssi_create_slave

With the recent m25p80 cleanup there is no need to use ssi_create_slave_no_init() anymore. Just use ssi_create_slave().

---

 hw/arm/xilinx_zynq.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
hw/arm/xilinx_zynq.c +1 -2
index 6f36286..5b9257a 100644
@@ -86,8 +86,7 @@ static inline void zynq_init_spi_flashes(uint32_t base_addr, qemu_irq irq,
         spi = (SSIBus *)qdev_get_child_bus(dev, bus_name);
 
         for (j = 0; j < num_ss; ++j) {
-            flash_dev = ssi_create_slave_no_init(spi, "n25q128");
-            qdev_init_nofail(flash_dev);
+            flash_dev = ssi_create_slave(spi, "n25q128");
 
             cs_line = qdev_get_gpio_in(flash_dev, 0);
             sysbus_connect_irq(busdev, i * num_ss + j + 1, cs_line);
Signature · 1 line
1.7.0.4
#3 lore raw
In reply to Peter Crosthwaite
Quoted 12 lines · Peter Crosthwaite

Trivial code cleanup of the PetaLogix and Zynq machine models.

Peter Crosthwaite (2):
petalogix_ml605_mmu: Cleanup ssi_create_slave()
xilinx_zynq: Cleanup ssi_create_slave

 hw/arm/xilinx_zynq.c                |    3 +--
 hw/microblaze/petalogix_ml605_mmu.c |    3 +--
 2 files changed, 2 insertions(+), 4 deletions(-)

Thanks, applied to the trivial patches tree:
https://github.com/stefanha/qemu/commits/trivial-patches

Stefan