mbox series

[v1,0/7] Add Starfive JH7110 Cadence USB driver

Message ID 20240504150358.19600-1-minda.chen@starfivetech.com
Headers show
Series Add Starfive JH7110 Cadence USB driver | expand

Message

Minda Chen May 4, 2024, 3:03 p.m. UTC
Add Starfive JH7110 Cadence USB driver and related PHY driver.
So the codes can be used in visionfive2 and milkv 7110 board.

The driver is almost the same with kernel driver.

patch1: Add set phy mode function in cdns3 core driver
        which is used by Starfive.

patch2-3: USB and PCIe 2.0 (usb 3.0) PHY drivier
patch4: Cadence USB wrapper driver.
patch5-7 dts, config and maintainers update.

Minda Chen (7):
  usb: cdns3: Set USB PHY mode in cdns3_probe()
  phy: starfive: Add Starfive JH7110 USB 2.0 PHY driver
  phy: starfive: Add Starfive JH7110 PCIe 2.0 PHY driver
  usb: cdns: starfive: Add cdns USB driver
  configs: starfive: Add visionfive2 cadence USB configuration
  dts: starfive: Add JH7110 Cadence USB dts node
  MAINTAINERS: Update Starfive visionfive2 maintain files.

 .../dts/jh7110-starfive-visionfive-2.dtsi     |   5 +
 arch/riscv/dts/jh7110.dtsi                    |  52 +++++
 board/starfive/visionfive2/MAINTAINERS        |   2 +
 configs/starfive_visionfive2_defconfig        |   9 +
 drivers/phy/Kconfig                           |   1 +
 drivers/phy/Makefile                          |   1 +
 drivers/phy/starfive/Kconfig                  |  19 ++
 drivers/phy/starfive/Makefile                 |   7 +
 drivers/phy/starfive/phy-jh7110-pcie.c        | 211 ++++++++++++++++++
 drivers/phy/starfive/phy-jh7110-usb2.c        | 135 +++++++++++
 drivers/usb/cdns3/Kconfig                     |   7 +
 drivers/usb/cdns3/Makefile                    |   2 +
 drivers/usb/cdns3/cdns3-starfive.c            | 184 +++++++++++++++
 drivers/usb/cdns3/core.c                      |  17 ++
 14 files changed, 652 insertions(+)
 create mode 100644 drivers/phy/starfive/Kconfig
 create mode 100644 drivers/phy/starfive/Makefile
 create mode 100644 drivers/phy/starfive/phy-jh7110-pcie.c
 create mode 100644 drivers/phy/starfive/phy-jh7110-usb2.c
 create mode 100644 drivers/usb/cdns3/cdns3-starfive.c


base-commit: 174ac987655c888017c82df1883c0c2ea0dc2495

Comments

E Shattow May 20, 2024, 5:06 a.m. UTC | #1
Hi, there is a compile warning. I don't know why.

On Sat, May 4, 2024 at 8:04 AM Minda Chen <minda.chen@starfivetech.com> wrote:
>
> Add Starfive JH7110 Cadence USB driver and related PHY driver.
> So the codes can be used in visionfive2 and milkv 7110 board.
>
> The driver is almost the same with kernel driver.
>
> patch1: Add set phy mode function in cdns3 core driver
>         which is used by Starfive.
>
> patch2-3: USB and PCIe 2.0 (usb 3.0) PHY drivier
> patch4: Cadence USB wrapper driver.
> patch5-7 dts, config and maintainers update.
>
> Minda Chen (7):
>   usb: cdns3: Set USB PHY mode in cdns3_probe()
>   phy: starfive: Add Starfive JH7110 USB 2.0 PHY driver
>   phy: starfive: Add Starfive JH7110 PCIe 2.0 PHY driver
>   usb: cdns: starfive: Add cdns USB driver
>   configs: starfive: Add visionfive2 cadence USB configuration
>   dts: starfive: Add JH7110 Cadence USB dts node
>   MAINTAINERS: Update Starfive visionfive2 maintain files.
>
>  .../dts/jh7110-starfive-visionfive-2.dtsi     |   5 +
>  arch/riscv/dts/jh7110.dtsi                    |  52 +++++
>  board/starfive/visionfive2/MAINTAINERS        |   2 +
>  configs/starfive_visionfive2_defconfig        |   9 +
>  drivers/phy/Kconfig                           |   1 +
>  drivers/phy/Makefile                          |   1 +
>  drivers/phy/starfive/Kconfig                  |  19 ++
>  drivers/phy/starfive/Makefile                 |   7 +
>  drivers/phy/starfive/phy-jh7110-pcie.c        | 211 ++++++++++++++++++
>  drivers/phy/starfive/phy-jh7110-usb2.c        | 135 +++++++++++
>  drivers/usb/cdns3/Kconfig                     |   7 +
>  drivers/usb/cdns3/Makefile                    |   2 +
>  drivers/usb/cdns3/cdns3-starfive.c            | 184 +++++++++++++++
>  drivers/usb/cdns3/core.c                      |  17 ++
>  14 files changed, 652 insertions(+)
>  create mode 100644 drivers/phy/starfive/Kconfig
>  create mode 100644 drivers/phy/starfive/Makefile
>  create mode 100644 drivers/phy/starfive/phy-jh7110-pcie.c
>  create mode 100644 drivers/phy/starfive/phy-jh7110-usb2.c
>  create mode 100644 drivers/usb/cdns3/cdns3-starfive.c
>
>
> base-commit: 174ac987655c888017c82df1883c0c2ea0dc2495
> --
> 2.17.1
>

The compile warning as follows:

In file included from
/home/user/source/u-boot.git/drivers/usb/cdns3/gadget.c:70:
/home/user/source/u-boot.git/include/linux/bitmap.h: In function
‘bitmap_find_next_zero_area’:
/home/user/source/u-boot.git/include/linux/bitmap.h:170:17: warning:
implicit declaration of function ‘find_next_zero_bit’; did you mean
‘find_next_bit’? [-Wimplicit-function-declaration]
  170 |         index = find_next_zero_bit(map, size, start);
      |                 ^~~~~~~~~~~~~~~~~~
      |                 find_next_bit
  CC      drivers/usb/cdns3/ep0.o
In file included from
/home/user/source/u-boot.git/include/linux/usb/composite.h:26,
                 from /home/user/source/u-boot.git/drivers/usb/cdns3/ep0.c:19:
/home/user/source/u-boot.git/include/linux/bitmap.h: In function
‘bitmap_find_next_zero_area’:
/home/user/source/u-boot.git/include/linux/bitmap.h:170:17: warning:
implicit declaration of function ‘find_next_zero_bit’; did you mean
‘find_next_bit’? [-Wimplicit-function-declaration]
  170 |         index = find_next_zero_bit(map, size, start);
      |                 ^~~~~~~~~~~~~~~~~~
      |                 find_next_bit


Is this something missing in the patch series?

-E
Minda Chen May 20, 2024, 6:20 a.m. UTC | #2
> -----邮件原件-----
> 发件人: E Shattow <lucent@gmail.com>
> 发送时间: 2024年5月20日 13:06
> 收件人: Minda Chen <minda.chen@starfivetech.com>
> 抄送: Marek Vasut <marex@denx.de>; Tom Rini <trini@konsulko.com>; Roger
> Quadros <rogerq@kernel.org>; Neil Armstrong <neil.armstrong@linaro.org>;
> Alexey Romanov <avromanov@salutedevices.com>; Sumit Garg
> <sumit.garg@linaro.org>; Mark Kettenis <kettenis@openbsd.org>; Nishanth
> Menon <nm@ti.com>; Rick Chen <rick@andestech.com>; Leo Yu-Chi Liang
> <ycliang@andestech.com>; u-boot@lists.denx.de; Heinrich Schuchardt
> <xypron.glpk@gmx.de>; Simon Glass <sjg@chromium.org>
> 主题: Re: [PATCH v1 0/7] Add Starfive JH7110 Cadence USB driver
> 
> Hi, there is a compile warning. I don't know why.
> 
> On Sat, May 4, 2024 at 8:04 AM Minda Chen <minda.chen@starfivetech.com>
> wrote:
> >
> > Add Starfive JH7110 Cadence USB driver and related PHY driver.
> > So the codes can be used in visionfive2 and milkv 7110 board.
> >
> > The driver is almost the same with kernel driver.
> >
> > patch1: Add set phy mode function in cdns3 core driver
> >         which is used by Starfive.
> >
> > patch2-3: USB and PCIe 2.0 (usb 3.0) PHY drivier
> > patch4: Cadence USB wrapper driver.
> > patch5-7 dts, config and maintainers update.
> >
> > Minda Chen (7):
> >   usb: cdns3: Set USB PHY mode in cdns3_probe()
> >   phy: starfive: Add Starfive JH7110 USB 2.0 PHY driver
> >   phy: starfive: Add Starfive JH7110 PCIe 2.0 PHY driver
> >   usb: cdns: starfive: Add cdns USB driver
> >   configs: starfive: Add visionfive2 cadence USB configuration
> >   dts: starfive: Add JH7110 Cadence USB dts node
> >   MAINTAINERS: Update Starfive visionfive2 maintain files.
> >
> >  .../dts/jh7110-starfive-visionfive-2.dtsi     |   5 +
> >  arch/riscv/dts/jh7110.dtsi                    |  52 +++++
> >  board/starfive/visionfive2/MAINTAINERS        |   2 +
> >  configs/starfive_visionfive2_defconfig        |   9 +
> >  drivers/phy/Kconfig                           |   1 +
> >  drivers/phy/Makefile                          |   1 +
> >  drivers/phy/starfive/Kconfig                  |  19 ++
> >  drivers/phy/starfive/Makefile                 |   7 +
> >  drivers/phy/starfive/phy-jh7110-pcie.c        | 211
> ++++++++++++++++++
> >  drivers/phy/starfive/phy-jh7110-usb2.c        | 135 +++++++++++
> >  drivers/usb/cdns3/Kconfig                     |   7 +
> >  drivers/usb/cdns3/Makefile                    |   2 +
> >  drivers/usb/cdns3/cdns3-starfive.c            | 184 +++++++++++++++
> >  drivers/usb/cdns3/core.c                      |  17 ++
> >  14 files changed, 652 insertions(+)
> >  create mode 100644 drivers/phy/starfive/Kconfig  create mode 100644
> > drivers/phy/starfive/Makefile  create mode 100644
> > drivers/phy/starfive/phy-jh7110-pcie.c
> >  create mode 100644 drivers/phy/starfive/phy-jh7110-usb2.c
> >  create mode 100644 drivers/usb/cdns3/cdns3-starfive.c
> >
> >
> > base-commit: 174ac987655c888017c82df1883c0c2ea0dc2495
> > --
> > 2.17.1
> >
> 
> The compile warning as follows:
> 
> In file included from
> /home/user/source/u-boot.git/drivers/usb/cdns3/gadget.c:70:
> /home/user/source/u-boot.git/include/linux/bitmap.h: In function
> ‘bitmap_find_next_zero_area’:
> /home/user/source/u-boot.git/include/linux/bitmap.h:170:17: warning:
> implicit declaration of function ‘find_next_zero_bit’; did you mean
> ‘find_next_bit’? [-Wimplicit-function-declaration]
>   170 |         index = find_next_zero_bit(map, size, start);
>       |                 ^~~~~~~~~~~~~~~~~~
>       |                 find_next_bit
>   CC      drivers/usb/cdns3/ep0.o
> In file included from
> /home/user/source/u-boot.git/include/linux/usb/composite.h:26,
>                  from
> /home/user/source/u-boot.git/drivers/usb/cdns3/ep0.c:19:
> /home/user/source/u-boot.git/include/linux/bitmap.h: In function
> ‘bitmap_find_next_zero_area’:
> /home/user/source/u-boot.git/include/linux/bitmap.h:170:17: warning:
> implicit declaration of function ‘find_next_zero_bit’; did you mean
> ‘find_next_bit’? [-Wimplicit-function-declaration]
>   170 |         index = find_next_zero_bit(map, size, start);
>       |                 ^~~~~~~~~~~~~~~~~~
>       |                 find_next_bit
> 
> 
> Is this something missing in the patch series?
> 
> -E

I have not noticed this. I just check this it is risc-v code do not contain "find_next_zero_bit" macro define.