qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [qemu/qemu] 0701a5: hw/usb: Add basic i.MX USB Phy suppor


From: Peter Maydell
Subject: [Qemu-commits] [qemu/qemu] 0701a5: hw/usb: Add basic i.MX USB Phy support
Date: Tue, 17 Mar 2020 09:30:13 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 0701a5efa015189248926879e7d44c45cc55515e
      
https://github.com/qemu/qemu/commit/0701a5efa015189248926879e7d44c45cc55515e
  Author: Guenter Roeck <address@hidden>
  Date:   2020-03-17 (Tue, 17 Mar 2020)

  Changed paths:
    M MAINTAINERS
    M hw/arm/Kconfig
    M hw/usb/Kconfig
    M hw/usb/Makefile.objs
    A hw/usb/imx-usb-phy.c
    A include/hw/usb/imx-usb-phy.h

  Log Message:
  -----------
  hw/usb: Add basic i.MX USB Phy support

Add basic USB PHY support as implemented in i.MX23, i.MX28, i.MX6,
and i.MX7 SoCs.

The only support really needed - at least to boot Linux - is support
for soft reset, which needs to reset various registers to their initial
value. Otherwise, just record register values.

Reviewed-by: Peter Maydell <address@hidden>
Signed-off-by: Guenter Roeck <address@hidden>
Message-id: address@hidden
Signed-off-by: Peter Maydell <address@hidden>


  Commit: 630e2af0ca248da764561cd695b9a7d7ad57e290
      
https://github.com/qemu/qemu/commit/630e2af0ca248da764561cd695b9a7d7ad57e290
  Author: Guenter Roeck <address@hidden>
  Date:   2020-03-17 (Tue, 17 Mar 2020)

  Changed paths:
    M include/hw/arm/fsl-imx6ul.h

  Log Message:
  -----------
  hw/arm/fsl-imx6ul: Fix USB interrupt numbers

USB1 and USB2 interrupt numbers were swapped. USB_PHY2 interrupt number
is 45. That didn't really matter up to now since the interrupts were not
used, but it needs to be fixed to be able to wire up the USB controllers.

Fixes: 31cbf933f0e ("i.MX6UL: Add i.MX6UL SOC")
Signed-off-by: Guenter Roeck <address@hidden>
Message-id: address@hidden
Reviewed-by: Peter Maydell <address@hidden>
Signed-off-by: Peter Maydell <address@hidden>


  Commit: 8e0c15852413936c7d619e469f681d8ef18c6f37
      
https://github.com/qemu/qemu/commit/8e0c15852413936c7d619e469f681d8ef18c6f37
  Author: Guenter Roeck <address@hidden>
  Date:   2020-03-17 (Tue, 17 Mar 2020)

  Changed paths:
    M hw/arm/fsl-imx6ul.c

  Log Message:
  -----------
  hw/arm/fsl-imx6ul: Instantiate unimplemented pwm and can devices

Recent Linux kernels (post v4.20) crash due to accesses to flexcan
and pwm controllers. Instantiate as unimplemented devices to work
around the problem.

Signed-off-by: Guenter Roeck <address@hidden>
Message-id: address@hidden
Reviewed-by: Peter Maydell <address@hidden>
Signed-off-by: Peter Maydell <address@hidden>


  Commit: 17372bd812dcdd7371a20e6226d2d1bbf415a47b
      
https://github.com/qemu/qemu/commit/17372bd812dcdd7371a20e6226d2d1bbf415a47b
  Author: Guenter Roeck <address@hidden>
  Date:   2020-03-17 (Tue, 17 Mar 2020)

  Changed paths:
    M hw/arm/fsl-imx6ul.c
    M include/hw/arm/fsl-imx6ul.h

  Log Message:
  -----------
  hw/arm/fsl-imx6ul: Wire up USB controllers

IMX6UL USB controllers are quite similar to IMX7 USB controllers.
Wire them up the same way.

The only real difference is that wiring up phy devices is necessary
to avoid phy reset timeouts in the Linux kernel.

Signed-off-by: Guenter Roeck <address@hidden>
Message-id: address@hidden
Reviewed-by: Peter Maydell <address@hidden>
Signed-off-by: Peter Maydell <address@hidden>


  Commit: 49cd55789bb17dba161fddf1817209999ce1d319
      
https://github.com/qemu/qemu/commit/49cd55789bb17dba161fddf1817209999ce1d319
  Author: Guenter Roeck <address@hidden>
  Date:   2020-03-17 (Tue, 17 Mar 2020)

  Changed paths:
    M hw/arm/fsl-imx6.c
    M include/hw/arm/fsl-imx6.h

  Log Message:
  -----------
  hw/arm/fsl-imx6: Wire up USB controllers

With this patch, the USB controllers on 'sabrelite' are detected
and can be used to boot the system.

Signed-off-by: Guenter Roeck <address@hidden>
Message-id: address@hidden
Reviewed-by: Peter Maydell <address@hidden>
Signed-off-by: Peter Maydell <address@hidden>


  Commit: a510d0c1cd5e5cf267f9893368bb1c4ee7ccca19
      
https://github.com/qemu/qemu/commit/a510d0c1cd5e5cf267f9893368bb1c4ee7ccca19
  Author: Chen Qun <address@hidden>
  Date:   2020-03-17 (Tue, 17 Mar 2020)

  Changed paths:
    M hw/net/imx_fec.c

  Log Message:
  -----------
  hw/net/imx_fec: write TGSR and TCSR3 in imx_enet_write()

The current code causes clang static code analyzer generate warning:
hw/net/imx_fec.c:858:9: warning: Value stored to 'value' is never read
        value = value & 0x0000000f;
        ^       ~~~~~~~~~~~~~~~~~~
hw/net/imx_fec.c:864:9: warning: Value stored to 'value' is never read
        value = value & 0x000000fd;
        ^       ~~~~~~~~~~~~~~~~~~

According to the definition of the function, the two “value” assignments
 should be written to registers.

Reported-by: Euler Robot <address@hidden>
Signed-off-by: Chen Qun <address@hidden>
Message-id: address@hidden
Reviewed-by: Peter Maydell <address@hidden>
Signed-off-by: Peter Maydell <address@hidden>


  Commit: ccc46090f1dd45aa9e4995b8d4be112e4d9aa5db
      
https://github.com/qemu/qemu/commit/ccc46090f1dd45aa9e4995b8d4be112e4d9aa5db
  Author: Guenter Roeck <address@hidden>
  Date:   2020-03-17 (Tue, 17 Mar 2020)

  Changed paths:
    M hw/block/m25p80.c
    M hw/block/trace-events

  Log Message:
  -----------
  m25p80: Convert to support tracing

While at it, add some trace messages to help debug problems
seen when running the latest Linux kernel.

Signed-off-by: Guenter Roeck <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
Reviewed-by: Alistair Francis <address@hidden>
Reviewed-by: Cédric Le Goater <address@hidden>
Signed-off-by: Peter Maydell <address@hidden>


  Commit: f3ee222f0c5f3681c28991313f76773e6cfed777
      
https://github.com/qemu/qemu/commit/f3ee222f0c5f3681c28991313f76773e6cfed777
  Author: Guenter Roeck <address@hidden>
  Date:   2020-03-17 (Tue, 17 Mar 2020)

  Changed paths:
    M hw/block/m25p80.c

  Log Message:
  -----------
  m25p80: Improve command handling for Jedec commands

When requesting JEDEC data using the JEDEC_READ command, the Linux kernel
always requests 6 bytes. The current implementation only returns three
bytes, and interprets the remaining three bytes as new commands.
While this does not matter most of the time, it is at the very least
confusing. To avoid the problem, always report up to 6 bytes of JEDEC
data. Fill remaining data with 0.

Signed-off-by: Guenter Roeck <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
Reviewed-by: Alistair Francis <address@hidden>
Reviewed-by: Cédric Le Goater <address@hidden>
Signed-off-by: Peter Maydell <address@hidden>


  Commit: 9c85bcd8f5f9f775e8305e580cf5fbc5b7ba2c28
      
https://github.com/qemu/qemu/commit/9c85bcd8f5f9f775e8305e580cf5fbc5b7ba2c28
  Author: Guenter Roeck <address@hidden>
  Date:   2020-03-17 (Tue, 17 Mar 2020)

  Changed paths:
    M hw/block/m25p80.c

  Log Message:
  -----------
  m25p80: Improve command handling for unsupported commands

Whenever an unsupported command is encountered, the current code
interprets each transferred byte as new command. Most of the time, those
'commands' are interpreted as new unknown commands. However, in rare
cases, it may be that for example address or length information
passed with the original command is by itself a valid command.
If that happens, the state machine may get completely confused and,
worst case, start writing data into the flash or even erase it.

To avoid the problem, transition into STATE_READING_DATA and keep
sending a value of 0 until the chip is deselected after encountering
an unsupported command.

Signed-off-by: Guenter Roeck <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
Reviewed-by: Cédric Le Goater <address@hidden>
Signed-off-by: Peter Maydell <address@hidden>


  Commit: 7faf6f1790dddf9f3acf6ddd95f7bbc1b4a755d0
      
https://github.com/qemu/qemu/commit/7faf6f1790dddf9f3acf6ddd95f7bbc1b4a755d0
  Author: Guenter Roeck <address@hidden>
  Date:   2020-03-17 (Tue, 17 Mar 2020)

  Changed paths:
    M hw/ssi/aspeed_smc.c

  Log Message:
  -----------
  aspeed/smc: Fix number of dummy cycles for FAST_READ_4 command

The Linux kernel recently started using FAST_READ_4 commands.
This results in flash read failures. At the same time, the m25p80
emulation is seen to read 8 more bytes than expected. Adjusting the
expected number of dummy cycles to match FAST_READ fixes the problem.

Fixes: f95c4bffdc4c ("aspeed/smc: snoop SPI transfers to fake dummy cycles")
Reviewed-by: Cédric Le Goater <address@hidden>
Signed-off-by: Guenter Roeck <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
Signed-off-by: Peter Maydell <address@hidden>


  Commit: e88d3671e3bbd59d385838a4101ea19cdcf47309
      
https://github.com/qemu/qemu/commit/e88d3671e3bbd59d385838a4101ea19cdcf47309
  Author: Guenter Roeck <address@hidden>
  Date:   2020-03-17 (Tue, 17 Mar 2020)

  Changed paths:
    M hw/arm/pxa2xx.c

  Log Message:
  -----------
  hw/arm/pxa2xx: Do not wire up OHCI for PXA255

PXA255 does not support a USB OHCI controller, so don't wire it up.

Signed-off-by: Guenter Roeck <address@hidden>
Message-id: address@hidden
Reviewed-by: Peter Maydell <address@hidden>
Signed-off-by: Peter Maydell <address@hidden>


  Commit: 6fb1603aa24d9212493e4819d7b685be9c9aad7a
      
https://github.com/qemu/qemu/commit/6fb1603aa24d9212493e4819d7b685be9c9aad7a
  Author: Peter Maydell <address@hidden>
  Date:   2020-03-17 (Tue, 17 Mar 2020)

  Changed paths:
    M MAINTAINERS
    M hw/arm/Kconfig
    M hw/arm/fsl-imx6.c
    M hw/arm/fsl-imx6ul.c
    M hw/arm/pxa2xx.c
    M hw/block/m25p80.c
    M hw/block/trace-events
    M hw/net/imx_fec.c
    M hw/ssi/aspeed_smc.c
    M hw/usb/Kconfig
    M hw/usb/Makefile.objs
    A hw/usb/imx-usb-phy.c
    M include/hw/arm/fsl-imx6.h
    M include/hw/arm/fsl-imx6ul.h
    A include/hw/usb/imx-usb-phy.h

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20200317' 
into staging

target-arm:
 * hw/arm/pxa2xx: Do not wire up OHCI for PXA255
 * aspeed/smc: Fix number of dummy cycles for FAST_READ_4 command
 * m25p80: Improve command handling for Jedec and unsupported commands
 * hw/net/imx_fec: write TGSR and TCSR3 in imx_enet_write()
 * hw/arm/fsl-imx6, imx6ul: Wire up USB controllers
 * hw/arm/fsl-imx6ul: Instantiate unimplemented pwm and can devices

# gpg: Signature made Tue 17 Mar 2020 11:40:01 GMT
# gpg:                using RSA key E1A5C593CD419DE28E8315CF3C2525ED14360CDE
# gpg:                issuer "address@hidden"
# gpg: Good signature from "Peter Maydell <address@hidden>" [ultimate]
# gpg:                 aka "Peter Maydell <address@hidden>" [ultimate]
# gpg:                 aka "Peter Maydell <address@hidden>" [ultimate]
# Primary key fingerprint: E1A5 C593 CD41 9DE2 8E83  15CF 3C25 25ED 1436 0CDE

* remotes/pmaydell/tags/pull-target-arm-20200317:
  hw/arm/pxa2xx: Do not wire up OHCI for PXA255
  aspeed/smc: Fix number of dummy cycles for FAST_READ_4 command
  m25p80: Improve command handling for unsupported commands
  m25p80: Improve command handling for Jedec commands
  m25p80: Convert to support tracing
  hw/net/imx_fec: write TGSR and TCSR3 in imx_enet_write()
  hw/arm/fsl-imx6: Wire up USB controllers
  hw/arm/fsl-imx6ul: Wire up USB controllers
  hw/arm/fsl-imx6ul: Instantiate unimplemented pwm and can devices
  hw/arm/fsl-imx6ul: Fix USB interrupt numbers
  hw/usb: Add basic i.MX USB Phy support

Signed-off-by: Peter Maydell <address@hidden>


Compare: https://github.com/qemu/qemu/compare/40c67636f67c...6fb1603aa24d



reply via email to

[Prev in Thread] Current Thread [Next in Thread]