Skip to contentSkip to conversation

ppc: move at24c to its own CONFIG_ symbol

PATCH In review Paolo Bonzini 4 participants 5 messages May 22, 2018 – May 24, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ppc: move at24c to its own CONFIG_ symbol

AT24c EEPROM is currently gated by CONFIG_I2C, and as such it is being included in all emulators that use I2C, even if they do not really need it. Separate it and, since it was added for the e500 machines, add it to qemu-system-ppc and qemu-system-ppc64.

---
 default-configs/ppc-softmmu.mak | 1 +
 hw/nvram/Makefile.objs          | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)
default-configs/ppc-softmmu.mak +1 -0
index 4d7be45ac5..c57e568121 100644
@@ -26,6 +26,7 @@ CONFIG_USB_EHCI_SYSBUS=y
 CONFIG_SM501=y
 CONFIG_IDE_SII3112=y
 CONFIG_I2C=y
+CONFIG_AT24C=y
 
 # For Macs
 CONFIG_MAC=y
hw/nvram/Makefile.objs +1 -1
index a912d25391..b318e53a43 100644
@@ -1,6 +1,6 @@
 common-obj-$(CONFIG_DS1225Y) += ds1225y.o
 common-obj-y += eeprom93xx.o
-common-obj-$(CONFIG_I2C) += eeprom_at24c.o
+common-obj-$(CONFIG_AT24C) += eeprom_at24c.o
 common-obj-y += fw_cfg.o
 common-obj-y += chrp_nvram.o
 common-obj-$(CONFIG_MAC_NVRAM) += mac_nvram.o
Signature · 1 line
2.17.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 4 lines · Paolo Bonzini

AT24c EEPROM is currently gated by CONFIG_I2C, and as such it is being included in all emulators that use I2C, even if they do not really need it. Separate it and, since it was added for the e500 machines, add it to qemu-system-ppc and qemu-system-ppc64.

With your S-o-b:

Quoted 30 lines
---
 default-configs/ppc-softmmu.mak | 1 +
 hw/nvram/Makefile.objs          | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)
default-configs/ppc-softmmu.mak +1 -0
index 4d7be45ac5..c57e568121 100644
@@ -26,6 +26,7 @@ CONFIG_USB_EHCI_SYSBUS=y
 CONFIG_SM501=y
 CONFIG_IDE_SII3112=y
 CONFIG_I2C=y
+CONFIG_AT24C=y
 
 # For Macs
 CONFIG_MAC=y
hw/nvram/Makefile.objs +1 -1
index a912d25391..b318e53a43 100644
@@ -1,6 +1,6 @@
 common-obj-$(CONFIG_DS1225Y) += ds1225y.o
 common-obj-y += eeprom93xx.o
-common-obj-$(CONFIG_I2C) += eeprom_at24c.o
+common-obj-$(CONFIG_AT24C) += eeprom_at24c.o
 common-obj-y += fw_cfg.o
 common-obj-y += chrp_nvram.o
 common-obj-$(CONFIG_MAC_NVRAM) += mac_nvram.o
Reviewed-by on v1 1/1
#2 lore raw
In reply to Paolo Bonzini
Quoted 26 lines · Paolo Bonzini

AT24c EEPROM is currently gated by CONFIG_I2C, and as such it is being included in all emulators that use I2C, even if they do not really need it. Separate it and, since it was added for the e500 machines, add it to qemu-system-ppc and qemu-system-ppc64.

---
 default-configs/ppc-softmmu.mak | 1 +
 hw/nvram/Makefile.objs          | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)
default-configs/ppc-softmmu.mak +1 -0
index 4d7be45ac5..c57e568121 100644
@@ -26,6 +26,7 @@ CONFIG_USB_EHCI_SYSBUS=y
 CONFIG_SM501=y
 CONFIG_IDE_SII3112=y
 CONFIG_I2C=y
+CONFIG_AT24C=y
 
 # For Macs
 CONFIG_MAC=y
hw/nvram/Makefile.objs +0 -0
index a912d25391..b318e53a43 100644

hw/nvram/Makefile.objs line 6

Quoted 7 lines
hw/nvram/Makefile.objs +1 -1
@@ -1,6 +1,6 @@
 common-obj-$(CONFIG_DS1225Y) += ds1225y.o
 common-obj-y += eeprom93xx.o
-common-obj-$(CONFIG_I2C) += eeprom_at24c.o
+common-obj-$(CONFIG_AT24C) += eeprom_at24c.o
 common-obj-y += fw_cfg.o
 common-obj-y += chrp_nvram.o
 common-obj-$(CONFIG_MAC_NVRAM) += mac_nvram.o

Since this is a device that can only be added by the user (no board is using it automatically, as far as I can see), it could be useful for other machines, too, I guess? Anyway, it's a good idea to have a separate config switch available for it, and we can add it to other machines again later if somebody feels that it is necessary, so (once you add your SoB):

#3 lore raw
Quoted 29 lines · Thomas Huth
Quoted 28 lines · Paolo Bonzini

AT24c EEPROM is currently gated by CONFIG_I2C, and as such it is being included in all emulators that use I2C, even if they do not really need it. Separate it and, since it was added for the e500 machines, add it to qemu-system-ppc and qemu-system-ppc64.

---
 default-configs/ppc-softmmu.mak | 1 +
 hw/nvram/Makefile.objs          | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)
default-configs/ppc-softmmu.mak +1 -0
index 4d7be45ac5..c57e568121 100644
@@ -26,6 +26,7 @@ CONFIG_USB_EHCI_SYSBUS=y
 CONFIG_SM501=y
 CONFIG_IDE_SII3112=y
 CONFIG_I2C=y
+CONFIG_AT24C=y
 
 # For Macs
 CONFIG_MAC=y
hw/nvram/Makefile.objs +0 -0
index a912d25391..b318e53a43 100644
@@ -1,6 +1,6 @@
 common-obj-$(CONFIG_DS1225Y) += ds1225y.o
 common-obj-y += eeprom93xx.o
Quoted 8 lines

hw/nvram/Makefile.objs line 6

Quoted 5 lines
hw/nvram/Makefile.objs +1 -1
-common-obj-$(CONFIG_I2C) += eeprom_at24c.o
+common-obj-$(CONFIG_AT24C) += eeprom_at24c.o
 common-obj-y += fw_cfg.o
 common-obj-y += chrp_nvram.o
 common-obj-$(CONFIG_MAC_NVRAM) += mac_nvram.o

Since this is a device that can only be added by the user (no board is using it automatically, as far as I can see),

The board which prompted me to add this device is still out there and I'm still intent on pursuing getting it into QEMU. It's clearly going to be some time before this can happen as there are RTC and e500 patches that would need to get in first, and my time to spend on this has been non-existent in recent months.

https://github.com/mdavidsaver/qemu/commits/vme

Quoted 8 lines

it could be useful for
other machines, too, I guess? Anyway, it's a good idea to have a separate config switch available for it, and we can add it to other machines again later if somebody feels that it is necessary, so (once you add your SoB):

#4 lore raw
In reply to Paolo Bonzini
Quoted 4 lines · Paolo Bonzini

AT24c EEPROM is currently gated by CONFIG_I2C, and as such it is being included in all emulators that use I2C, even if they do not really need it. Separate it and, since it was added for the e500 machines, add it to qemu-system-ppc and qemu-system-ppc64.

Quoted 30 lines
---
 default-configs/ppc-softmmu.mak | 1 +
 hw/nvram/Makefile.objs          | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)
default-configs/ppc-softmmu.mak +1 -0
index 4d7be45ac5..c57e568121 100644
@@ -26,6 +26,7 @@ CONFIG_USB_EHCI_SYSBUS=y
 CONFIG_SM501=y
 CONFIG_IDE_SII3112=y
 CONFIG_I2C=y
+CONFIG_AT24C=y
 
 # For Macs
 CONFIG_MAC=y
hw/nvram/Makefile.objs +1 -1
index a912d25391..b318e53a43 100644
@@ -1,6 +1,6 @@
 common-obj-$(CONFIG_DS1225Y) += ds1225y.o
 common-obj-y += eeprom93xx.o
-common-obj-$(CONFIG_I2C) += eeprom_at24c.o
+common-obj-$(CONFIG_AT24C) += eeprom_at24c.o
 common-obj-y += fw_cfg.o
 common-obj-y += chrp_nvram.o
 common-obj-$(CONFIG_MAC_NVRAM) += mac_nvram.o