Skip to contentSkip to conversation

I2C updates

GIT PULL Applied Corey Minyard 3 participants 7 messages Jul 16, 2020 – Jul 20, 2020

lore
Share & tools
lore
#0 lore raw

The following changes since commit 45db94cc90c286a9965a285ba19450f448760a09:

Merge remote-tracking branch 'remotes/mcayland/tags/qemu-openbios-20200707' into staging (2020-07-10 16:43:40 +0100)

are available in the Git repository at:

https://github.com/cminyard/qemu.git tags/for-qemu-i2c-5

for you to fetch changes up to 73d5f22ecbb76dfc785876779d47787084ff0f42:

hw/i2c: Document the I2C qdev helpers (2020-07-16 12:30:54 -0500)

----------------------------------------------------------------
Minor changes to:

Add an SMBus config entry

Cleanup/simplify/document some I2C interfaces

----------------------------------------------------------------
Philippe Mathieu-Daudé (6):
hw/i2c/Kconfig: Add an entry for the SMBus hw/i2c/aspeed_i2c: Simplify aspeed_i2c_get_bus()
hw/i2c: Rename i2c_try_create_slave() as i2c_slave_new() hw/i2c: Rename i2c_realize_and_unref() as i2c_slave_realize_and_unref() hw/i2c: Rename i2c_create_slave() as i2c_slave_create_simple() hw/i2c: Document the I2C qdev helpers

 hw/arm/aspeed.c             | 82 +++++++++++++++++++++++----------------------
 hw/arm/musicpal.c           |  4 +--
 hw/arm/nseries.c            |  8 ++---
 hw/arm/pxa2xx.c             |  5 +--
 hw/arm/realview.c           |  2 +-
 hw/arm/spitz.c              |  4 +--
 hw/arm/stellaris.c          |  2 +-
 hw/arm/tosa.c               |  2 +-
 hw/arm/versatilepb.c        |  2 +-
 hw/arm/vexpress.c           |  2 +-
 hw/arm/z2.c                 |  4 +--
 hw/display/sii9022.c        |  2 +-
 hw/i2c/Kconfig              |  8 +++--
 hw/i2c/Makefile.objs        |  3 +-
 hw/i2c/aspeed_i2c.c         |  3 +-
 hw/i2c/core.c               | 15 ++++-----
 hw/ppc/e500.c               |  2 +-
 hw/ppc/sam460ex.c           |  2 +-
 include/hw/i2c/aspeed_i2c.h |  2 +-
 include/hw/i2c/i2c.h        | 54 +++++++++++++++++++++++++++--
 20 files changed, 131 insertions(+), 77 deletions(-)
#1 lore raw
Quoted 20 lines · Corey Minyard

The following changes since commit 45db94cc90c286a9965a285ba19450f448760a09:

Merge remote-tracking branch 'remotes/mcayland/tags/qemu-openbios-20200707' into staging (2020-07-10 16:43:40 +0100)

are available in the Git repository at:

https://github.com/cminyard/qemu.git tags/for-qemu-i2c-5

for you to fetch changes up to 73d5f22ecbb76dfc785876779d47787084ff0f42:

hw/i2c: Document the I2C qdev helpers (2020-07-16 12:30:54 -0500)

----------------------------------------------------------------
Minor changes to:

Add an SMBus config entry

Cleanup/simplify/document some I2C interfaces

Quoted 8 lines

----------------------------------------------------------------
Philippe Mathieu-Daudé (6):
hw/i2c/Kconfig: Add an entry for the SMBus hw/i2c/aspeed_i2c: Simplify aspeed_i2c_get_bus()
hw/i2c: Rename i2c_try_create_slave() as i2c_slave_new() hw/i2c: Rename i2c_realize_and_unref() as i2c_slave_realize_and_unref() hw/i2c: Rename i2c_create_slave() as i2c_slave_create_simple() hw/i2c: Document the I2C qdev helpers

Hi; this failed to build on x86-64 Linux (incremental build):

LINK i386-softmmu/qemu-system-i386
../hw/i2c/smbus_eeprom.o: In function `smbus_eeprom_vmstate_needed':
/home/petmay01/linaro/qemu-for-merges/hw/i2c/smbus_eeprom.c:94:
undefined reference to smbus_vmstate_needed' ../hw/i2c/smbus_eeprom.o:(.data.rel+0x50): undefined reference to vmstate_smbus_device'
../hw/i2c/pm_smbus.o: In function `smb_transaction':
/home/petmay01/linaro/qemu-for-merges/hw/i2c/pm_smbus.c:93: undefined reference to smbus_quick_command' /home/petmay01/linaro/qemu-for-merges/hw/i2c/pm_smbus.c:97: undefined reference to smbus_receive_byte' /home/petmay01/linaro/qemu-for-merges/hw/i2c/pm_smbus.c:100: undefined reference to smbus_send_byte' /home/petmay01/linaro/qemu-for-merges/hw/i2c/pm_smbus.c:105: undefined reference to smbus_read_byte' /home/petmay01/linaro/qemu-for-merges/hw/i2c/pm_smbus.c:108: undefined reference to smbus_write_byte' /home/petmay01/linaro/qemu-for-merges/hw/i2c/pm_smbus.c:114: undefined reference to smbus_read_word' /home/petmay01/linaro/qemu-for-merges/hw/i2c/pm_smbus.c:117: undefined reference to smbus_write_word' /home/petmay01/linaro/qemu-for-merges/hw/i2c/pm_smbus.c:149: undefined reference to smbus_read_block' /home/petmay01/linaro/qemu-for-merges/hw/i2c/pm_smbus.c:174: undefined reference to `smbus_write_block'
../hw/i2c/pm_smbus.o: In function `smb_ioport_writeb':
/home/petmay01/linaro/qemu-for-merges/hw/i2c/pm_smbus.c:290: undefined reference to smbus_write_block' ../hw/ipmi/smbus_ipmi.o:(.data.rel+0x50): undefined reference to vmstate_smbus_device'
collect2: error: ld returned 1 exit status

(similarly for other qemu-system-* binary links)

thanks
-- PMM

#2 lore raw
Quoted 30 lines · Peter Maydell
Quoted 20 lines · Corey Minyard

The following changes since commit 45db94cc90c286a9965a285ba19450f448760a09:

Merge remote-tracking branch 'remotes/mcayland/tags/qemu-openbios-20200707' into staging (2020-07-10 16:43:40 +0100)

are available in the Git repository at:

https://github.com/cminyard/qemu.git tags/for-qemu-i2c-5

for you to fetch changes up to 73d5f22ecbb76dfc785876779d47787084ff0f42:

hw/i2c: Document the I2C qdev helpers (2020-07-16 12:30:54 -0500)

----------------------------------------------------------------
Minor changes to:

Add an SMBus config entry

Cleanup/simplify/document some I2C interfaces

Quoted 8 lines

----------------------------------------------------------------
Philippe Mathieu-Daudé (6):
hw/i2c/Kconfig: Add an entry for the SMBus hw/i2c/aspeed_i2c: Simplify aspeed_i2c_get_bus()
hw/i2c: Rename i2c_try_create_slave() as i2c_slave_new() hw/i2c: Rename i2c_realize_and_unref() as i2c_slave_realize_and_unref() hw/i2c: Rename i2c_create_slave() as i2c_slave_create_simple() hw/i2c: Document the I2C qdev helpers

Quoted 1 line

Hi; this failed to build on x86-64 Linux (incremental build):

Hmm, I did test this, and I just rebuilt, then rebased on the end of master and rebuilt, without issue.

It looks like the smbus code is not being included, but I don't see how that can be.

-corey

Quoted 37 lines

LINK i386-softmmu/qemu-system-i386
../hw/i2c/smbus_eeprom.o: In function `smbus_eeprom_vmstate_needed':
/home/petmay01/linaro/qemu-for-merges/hw/i2c/smbus_eeprom.c:94:
undefined reference to smbus_vmstate_needed' ../hw/i2c/smbus_eeprom.o:(.data.rel+0x50): undefined reference to vmstate_smbus_device'
../hw/i2c/pm_smbus.o: In function `smb_transaction':
/home/petmay01/linaro/qemu-for-merges/hw/i2c/pm_smbus.c:93: undefined reference to smbus_quick_command' /home/petmay01/linaro/qemu-for-merges/hw/i2c/pm_smbus.c:97: undefined reference to smbus_receive_byte' /home/petmay01/linaro/qemu-for-merges/hw/i2c/pm_smbus.c:100: undefined reference to smbus_send_byte' /home/petmay01/linaro/qemu-for-merges/hw/i2c/pm_smbus.c:105: undefined reference to smbus_read_byte' /home/petmay01/linaro/qemu-for-merges/hw/i2c/pm_smbus.c:108: undefined reference to smbus_write_byte' /home/petmay01/linaro/qemu-for-merges/hw/i2c/pm_smbus.c:114: undefined reference to smbus_read_word' /home/petmay01/linaro/qemu-for-merges/hw/i2c/pm_smbus.c:117: undefined reference to smbus_write_word' /home/petmay01/linaro/qemu-for-merges/hw/i2c/pm_smbus.c:149: undefined reference to smbus_read_block' /home/petmay01/linaro/qemu-for-merges/hw/i2c/pm_smbus.c:174: undefined reference to `smbus_write_block'
../hw/i2c/pm_smbus.o: In function `smb_ioport_writeb':
/home/petmay01/linaro/qemu-for-merges/hw/i2c/pm_smbus.c:290: undefined reference to smbus_write_block' ../hw/ipmi/smbus_ipmi.o:(.data.rel+0x50): undefined reference to vmstate_smbus_device'
collect2: error: ld returned 1 exit status

(similarly for other qemu-system-* binary links)

thanks
-- PMM

#3 lore raw
Quoted 9 lines · Corey Minyard
Quoted 1 line · Peter Maydell

Hi; this failed to build on x86-64 Linux (incremental build):

Hmm, I did test this, and I just rebuilt, then rebased on the end of master and rebuilt, without issue.

It looks like the smbus code is not being included, but I don't see how that can be.

I was wrong about which config failed, sorry. Incremental builds are fine, but the build that does "make -C builddir clean" first fails.

It looks like the problem is that in the created config-devices.mak files, CONFIG_SMBUS_EEPROM is set, but CONFIG_SMBUS is not. So presumably the problem is in the change "hw/i2c/Kconfig: Add an entry for the SMBus", or it is a more general issue with changes to Kconfig files not correctly resulting in rebuilds of config-devices.mak.

thanks
-- PMM

#4 lore raw
Quoted 15 lines · Peter Maydell
Quoted 9 lines · Corey Minyard
Quoted 1 line · Peter Maydell

Hi; this failed to build on x86-64 Linux (incremental build):

Hmm, I did test this, and I just rebuilt, then rebased on the end of master and rebuilt, without issue.

It looks like the smbus code is not being included, but I don't see how that can be.

I was wrong about which config failed, sorry. Incremental builds are fine, but the build that does "make -C builddir clean" first fails.

Quoted 6 lines

It looks like the problem is that in the created config-devices.mak files, CONFIG_SMBUS_EEPROM is set, but CONFIG_SMBUS is not. So presumably the problem is in the change "hw/i2c/Kconfig: Add an entry for the SMBus", or it is a more general issue with changes to Kconfig files not correctly resulting in rebuilds of config-devices.mak.

To Corey, this is likely the later (buildsys), see:
https://lists.gnu.org/archive/html/qemu-devel/2020-07/msg05475.html

#5 lore raw
Quoted 23 lines · Philippe Mathieu-Daudé
Quoted 15 lines · Peter Maydell
Quoted 9 lines · Corey Minyard
Quoted 1 line · Peter Maydell

Hi; this failed to build on x86-64 Linux (incremental build):

Hmm, I did test this, and I just rebuilt, then rebased on the end of master and rebuilt, without issue.

It looks like the smbus code is not being included, but I don't see how that can be.

I was wrong about which config failed, sorry. Incremental builds are fine, but the build that does "make -C builddir clean" first fails.

Quoted 6 lines

It looks like the problem is that in the created config-devices.mak files, CONFIG_SMBUS_EEPROM is set, but CONFIG_SMBUS is not. So presumably the problem is in the change "hw/i2c/Kconfig: Add an entry for the SMBus", or it is a more general issue with changes to Kconfig files not correctly resulting in rebuilds of config-devices.mak.

Quoted 2 lines

To Corey, this is likely the later (buildsys), see:
https://lists.gnu.org/archive/html/qemu-devel/2020-07/msg05475.html

Thanks, I was planning to try to figure this out this morning, but Peter beat me to it.

Thanks Peter.

-corey

#6 lore raw
In reply to Corey Minyard
Quoted 20 lines · Corey Minyard

The following changes since commit 45db94cc90c286a9965a285ba19450f448760a09:

Merge remote-tracking branch 'remotes/mcayland/tags/qemu-openbios-20200707' into staging (2020-07-10 16:43:40 +0100)

are available in the Git repository at:

https://github.com/cminyard/qemu.git tags/for-qemu-i2c-5

for you to fetch changes up to 73d5f22ecbb76dfc785876779d47787084ff0f42:

hw/i2c: Document the I2C qdev helpers (2020-07-16 12:30:54 -0500)

----------------------------------------------------------------
Minor changes to:

Add an SMBus config entry

Cleanup/simplify/document some I2C interfaces

Quoted 8 lines

----------------------------------------------------------------
Philippe Mathieu-Daudé (6):
hw/i2c/Kconfig: Add an entry for the SMBus hw/i2c/aspeed_i2c: Simplify aspeed_i2c_get_bus()
hw/i2c: Rename i2c_try_create_slave() as i2c_slave_new() hw/i2c: Rename i2c_realize_and_unref() as i2c_slave_realize_and_unref() hw/i2c: Rename i2c_create_slave() as i2c_slave_create_simple() hw/i2c: Document the I2C qdev helpers

I've applied the Makefile fix and then this merges OK to master.

Please update the changelog at https://wiki.qemu.org/ChangeLog/5.1
for any user-visible changes.

-- PMM