mbox series

[GIT,PULL] I2C updates

Message ID 20200716174900.GL3235@minyard.net (mailing list archive)
State New, archived
Headers show
Series [GIT,PULL] I2C updates | expand

Pull-request

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

Message

Corey Minyard July 16, 2020, 5:49 p.m. UTC
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(-)

Comments

Peter Maydell July 16, 2020, 8:45 p.m. UTC | #1
On Thu, 16 Jul 2020 at 18:49, Corey Minyard <minyard@acm.org> wrote:
>
> 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

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
Corey Minyard July 16, 2020, 10:26 p.m. UTC | #2
On Thu, Jul 16, 2020 at 09:45:41PM +0100, Peter Maydell wrote:
> On Thu, 16 Jul 2020 at 18:49, Corey Minyard <minyard@acm.org> wrote:
> >
> > 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
> 
> 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

> 
>   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
Peter Maydell July 17, 2020, 10:50 a.m. UTC | #3
On Thu, 16 Jul 2020 at 23:26, Corey Minyard <minyard@acm.org> wrote:
>
> On Thu, Jul 16, 2020 at 09:45:41PM +0100, Peter Maydell wrote:
> > 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
Philippe Mathieu-Daudé July 17, 2020, 11:30 a.m. UTC | #4
On 7/17/20 12:50 PM, Peter Maydell wrote:
> On Thu, 16 Jul 2020 at 23:26, Corey Minyard <minyard@acm.org> wrote:
>>
>> On Thu, Jul 16, 2020 at 09:45:41PM +0100, Peter Maydell wrote:
>>> 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.

To Corey, this is likely the later (buildsys), see:
https://lists.gnu.org/archive/html/qemu-devel/2020-07/msg05475.html
Corey Minyard July 17, 2020, 12:33 p.m. UTC | #5
On Fri, Jul 17, 2020 at 01:30:35PM +0200, Philippe Mathieu-Daudé wrote:
> On 7/17/20 12:50 PM, Peter Maydell wrote:
> > On Thu, 16 Jul 2020 at 23:26, Corey Minyard <minyard@acm.org> wrote:
> >>
> >> On Thu, Jul 16, 2020 at 09:45:41PM +0100, Peter Maydell wrote:
> >>> 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.
> 
> 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
Peter Maydell July 20, 2020, 10:06 a.m. UTC | #6
On Thu, 16 Jul 2020 at 18:49, Corey Minyard <minyard@acm.org> wrote:
>
> 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

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