Browse Source

hw/i2c/versatile_i2c: Replace TYPE_VERSATILE_I2C -> TYPE_ARM_SBCON_I2C

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20230110082508.24038-4-philmd@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Philippe Mathieu-Daudé 2 years ago
parent
commit
550da1cc22
5 changed files with 6 additions and 7 deletions
  1. 1 1
      hw/arm/realview.c
  2. 1 1
      hw/arm/versatilepb.c
  3. 1 1
      hw/arm/vexpress.c
  4. 2 2
      hw/i2c/versatile_i2c.c
  5. 1 2
      include/hw/i2c/arm_sbcon_i2c.h

+ 1 - 1
hw/arm/realview.c

@@ -309,7 +309,7 @@ static void realview_init(MachineState *machine,
         }
         }
     }
     }
 
 
-    dev = sysbus_create_simple(TYPE_VERSATILE_I2C, 0x10002000, NULL);
+    dev = sysbus_create_simple(TYPE_ARM_SBCON_I2C, 0x10002000, NULL);
     i2c = (I2CBus *)qdev_get_child_bus(dev, "i2c");
     i2c = (I2CBus *)qdev_get_child_bus(dev, "i2c");
     i2c_slave_create_simple(i2c, "ds1338", 0x68);
     i2c_slave_create_simple(i2c, "ds1338", 0x68);
 
 

+ 1 - 1
hw/arm/versatilepb.c

@@ -336,7 +336,7 @@ static void versatile_init(MachineState *machine, int board_id)
     /* Add PL031 Real Time Clock. */
     /* Add PL031 Real Time Clock. */
     sysbus_create_simple("pl031", 0x101e8000, pic[10]);
     sysbus_create_simple("pl031", 0x101e8000, pic[10]);
 
 
-    dev = sysbus_create_simple(TYPE_VERSATILE_I2C, 0x10002000, NULL);
+    dev = sysbus_create_simple(TYPE_ARM_SBCON_I2C, 0x10002000, NULL);
     i2c = (I2CBus *)qdev_get_child_bus(dev, "i2c");
     i2c = (I2CBus *)qdev_get_child_bus(dev, "i2c");
     i2c_slave_create_simple(i2c, "ds1338", 0x68);
     i2c_slave_create_simple(i2c, "ds1338", 0x68);
 
 

+ 1 - 1
hw/arm/vexpress.c

@@ -646,7 +646,7 @@ static void vexpress_common_init(MachineState *machine)
     sysbus_create_simple("sp804", map[VE_TIMER01], pic[2]);
     sysbus_create_simple("sp804", map[VE_TIMER01], pic[2]);
     sysbus_create_simple("sp804", map[VE_TIMER23], pic[3]);
     sysbus_create_simple("sp804", map[VE_TIMER23], pic[3]);
 
 
-    dev = sysbus_create_simple(TYPE_VERSATILE_I2C, map[VE_SERIALDVI], NULL);
+    dev = sysbus_create_simple(TYPE_ARM_SBCON_I2C, map[VE_SERIALDVI], NULL);
     i2c = (I2CBus *)qdev_get_child_bus(dev, "i2c");
     i2c = (I2CBus *)qdev_get_child_bus(dev, "i2c");
     i2c_slave_create_simple(i2c, "sii9022", 0x39);
     i2c_slave_create_simple(i2c, "sii9022", 0x39);
 
 

+ 2 - 2
hw/i2c/versatile_i2c.c

@@ -31,7 +31,7 @@
 
 
 typedef ArmSbconI2CState VersatileI2CState;
 typedef ArmSbconI2CState VersatileI2CState;
 DECLARE_INSTANCE_CHECKER(ArmSbconI2CState, VERSATILE_I2C,
 DECLARE_INSTANCE_CHECKER(ArmSbconI2CState, VERSATILE_I2C,
-                         TYPE_VERSATILE_I2C)
+                         TYPE_ARM_SBCON_I2C)
 
 
 
 
 
 
@@ -98,7 +98,7 @@ static void versatile_i2c_init(Object *obj)
 }
 }
 
 
 static const TypeInfo versatile_i2c_info = {
 static const TypeInfo versatile_i2c_info = {
-    .name          = TYPE_VERSATILE_I2C,
+    .name          = TYPE_ARM_SBCON_I2C,
     .parent        = TYPE_SYS_BUS_DEVICE,
     .parent        = TYPE_SYS_BUS_DEVICE,
     .instance_size = sizeof(ArmSbconI2CState),
     .instance_size = sizeof(ArmSbconI2CState),
     .instance_init = versatile_i2c_init,
     .instance_init = versatile_i2c_init,

+ 1 - 2
include/hw/i2c/arm_sbcon_i2c.h

@@ -17,8 +17,7 @@
 #include "hw/i2c/bitbang_i2c.h"
 #include "hw/i2c/bitbang_i2c.h"
 #include "qom/object.h"
 #include "qom/object.h"
 
 
-#define TYPE_VERSATILE_I2C "versatile_i2c"
-#define TYPE_ARM_SBCON_I2C TYPE_VERSATILE_I2C
+#define TYPE_ARM_SBCON_I2C "versatile_i2c"
 
 
 typedef struct ArmSbconI2CState ArmSbconI2CState;
 typedef struct ArmSbconI2CState ArmSbconI2CState;
 DECLARE_INSTANCE_CHECKER(ArmSbconI2CState, ARM_SBCON_I2C, TYPE_ARM_SBCON_I2C)
 DECLARE_INSTANCE_CHECKER(ArmSbconI2CState, ARM_SBCON_I2C, TYPE_ARM_SBCON_I2C)