diff options
author | Philippe Mathieu-Daudé <f4bug@amsat.org> | 2020-06-17 09:25:30 +0200 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2020-06-23 11:39:47 +0100 |
commit | 440c9f959d20b83c20c589f614cb14fd0dce4546 (patch) | |
tree | 4da9a5433f5457c9d5987c08bf1d07110d7d9b44 /hw/arm/versatilepb.c | |
parent | f61c3fb56bfad1d76422fa80d18ae5e39a47d61d (diff) |
hw/arm: Use TYPE_VERSATILE_I2C instead of hardcoded string
By using the TYPE_* definitions for devices, we can:
- quickly find where devices are used with 'git-grep'
- easily rename a device (one-line change).
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-id: 20200617072539.32686-6-f4bug@amsat.org
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/arm/versatilepb.c')
-rw-r--r-- | hw/arm/versatilepb.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/arm/versatilepb.c b/hw/arm/versatilepb.c index 2ebdcbd8ac..e596b8170f 100644 --- a/hw/arm/versatilepb.c +++ b/hw/arm/versatilepb.c @@ -18,6 +18,7 @@ #include "sysemu/sysemu.h" #include "hw/pci/pci.h" #include "hw/i2c/i2c.h" +#include "hw/i2c/arm_sbcon_i2c.h" #include "hw/irq.h" #include "hw/boards.h" #include "exec/address-spaces.h" @@ -314,7 +315,7 @@ static void versatile_init(MachineState *machine, int board_id) /* Add PL031 Real Time Clock. */ sysbus_create_simple("pl031", 0x101e8000, pic[10]); - dev = sysbus_create_simple("versatile_i2c", 0x10002000, NULL); + dev = sysbus_create_simple(TYPE_VERSATILE_I2C, 0x10002000, NULL); i2c = (I2CBus *)qdev_get_child_bus(dev, "i2c"); i2c_create_slave(i2c, "ds1338", 0x68); |