[U-Boot] [PATCH] usb: add support of generic OHCI devices

Marek Vasut marex at denx.de
Wed Dec 16 16:44:03 CET 2015


On Wednesday, December 16, 2015 at 04:40:25 PM, Alexey Brodkin wrote:
> Hi Marek,
> 
> On Wed, 2015-12-16 at 01:44 +0100, Marek Vasut wrote:
> > On Monday, December 14, 2015 at 03:18:50 PM, Alexey Brodkin wrote:
> > > This driver is meant to be used with any OHCI-compatible host
> > > controller in case if there's no need for platform-specific
> > > glue such as setup of controller or PHY's power mode via
> > > GPIOs etc.
> > > 
> > > Signed-off-by: Alexey Brodkin <abrodkin at synopsys.com>
> > > Cc: Simon Glass <sjg at chromium.org>
> > > Cc: Marek Vasut <marex at denx.de>
> > > ---
> > > 
> > >  drivers/usb/host/Kconfig        |  8 ++++++++
> > >  drivers/usb/host/Makefile       |  1 +
> > >  drivers/usb/host/ohci-generic.c | 45
> > > 
> > > +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 54
> > > insertions(+)
> > > 
> > >  create mode 100644 drivers/usb/host/ohci-generic.c
> > 
> > Applied, thanks.
> > 
> > btw. I am a bit worried about the compatible string, are those strings
> > used somewhere besides this driver ?
> 
> Well U-Boot we already may see that:
> ------------------->8--------------------
> $ git grep generic-ohci
> arch/arm/dts/sun4i-a10.dtsi:650:                        compatible =
> "allwinner,sun4i-a10-ohci", "generic-ohci";
> arch/arm/dts/sun4i-a10.dtsi:692:                        compatible =
> "allwinner,sun4i-a10-ohci", "generic-ohci"; arch/arm/dts/sun5i.dtsi:456:  
>                  compatible = "allwinner,sun5i-a13-ohci", "generic-ohci";
> arch/arm/dts/sun6i-a31.dtsi:564:                        compatible =
> "allwinner,sun6i-a31-ohci", "generic-ohci";
> arch/arm/dts/sun6i-a31.dtsi:586:                        compatible =
> "allwinner,sun6i-a31-ohci", "generic-ohci";
> arch/arm/dts/sun6i-a31.dtsi:597:                        compatible =
> "allwinner,sun6i-a31-ohci", "generic-ohci";
> arch/arm/dts/sun7i-a20.dtsi:738:                        compatible =
> "allwinner,sun7i-a20-ohci", "generic-ohci";
> arch/arm/dts/sun7i-a20.dtsi:780:                        compatible =
> "allwinner,sun7i-a20-ohci", "generic-ohci";
> arch/arm/dts/sun8i-a23-a33.dtsi:347:                    compatible =
> "allwinner,sun8i-a23-ohci", "generic-ohci";
> arch/arm/dts/sun8i-h3.dtsi:406:                 compatible =
> "allwinner,sun8i-h3-ohci", "generic-ohci"; arch/arm/dts/sun8i-h3.dtsi:429:
>                 compatible = "allwinner,sun8i-h3-ohci", "generic-ohci";
> arch/arm/dts/sun8i-h3.dtsi:452:                 compatible =
> "allwinner,sun8i-h3-ohci", "generic-ohci";
> arch/arm/dts/sun9i-a80.dtsi:365:                        compatible =
> "allwinner,sun9i-a80-ohci", "generic-ohci";
> arch/arm/dts/sun9i-a80.dtsi:423:                        compatible =
> "allwinner,sun9i-a80-ohci", "generic-ohci";
> ------------------->8--------------------
> 
> Even though Sunxi might not work without additional things done in
> ohci-sunxi.c.
> 
> And in Linux kernel we see more usages:
> ------------------->8--------------------
> $ git grep generic-ohci arch
> arch/arc/boot/dts/axs10x_mb.dtsi:59:                    compatible =
> "generic-ohci"; arch/arm/boot/dts/hisi-x5hd2.dtsi:462:                 
> compatible = "generic-ohci"; arch/arm/boot/dts/sun4i-a10.dtsi:703:        
>           compatible = "allwinner,sun4i-a10-ohci", "generic-ohci";
> arch/arm/boot/dts/sun4i-a10.dtsi:753:                   compatible =
> "allwinner,sun4i-a10-ohci", "generic-ohci";
> arch/arm/boot/dts/sun5i.dtsi:474:                       compatible =
> "allwinner,sun5i-a13-ohci", "generic-ohci";
> arch/arm/boot/dts/sun6i-a31.dtsi:596:                   compatible =
> "allwinner,sun6i-a31-ohci", "generic-ohci";
> arch/arm/boot/dts/sun6i-a31.dtsi:618:                   compatible =
> "allwinner,sun6i-a31-ohci", "generic-ohci";
> arch/arm/boot/dts/sun6i-a31.dtsi:629:                   compatible =
> "allwinner,sun6i-a31-ohci", "generic-ohci";
> arch/arm/boot/dts/sun7i-a20.dtsi:787:                   compatible =
> "allwinner,sun7i-a20-ohci", "generic-ohci";
> arch/arm/boot/dts/sun7i-a20.dtsi:837:                   compatible =
> "allwinner,sun7i-a20-ohci", "generic-ohci";
> arch/arm/boot/dts/sun8i-a23-a33.dtsi:337:                       compatible
> = "allwinner,sun8i-a23-ohci", "generic-ohci";
> arch/arm/boot/dts/sun9i-a80.dtsi:377:                   compatible =
> "allwinner,sun9i-a80-ohci", "generic-ohci";
> arch/arm/boot/dts/sun9i-a80.dtsi:435:                   compatible =
> "allwinner,sun9i-a80-ohci", "generic-ohci";
> arch/arm64/boot/dts/arm/juno-base.dtsi:156:             compatible =
> "generic-ohci"; arch/mips/boot/dts/brcm/bcm3384_viper.dtsi:99:            
>      compatible = "brcm,bcm3384-ohci", "generic-ohci";
> arch/mips/boot/dts/brcm/bcm3384_zephyr.dtsi:117:                       
> compatible = "brcm,bcm3384-ohci", "generic -ohci";
> arch/mips/boot/dts/brcm/bcm6368.dtsi:84:                        compatible
> = "brcm,bcm6368-ohci", "generic-ohci";
> arch/mips/boot/dts/brcm/bcm7125.dtsi:131:                       compatible
> = "brcm,bcm7125-ohci", "generic-ohci";
> arch/mips/boot/dts/brcm/bcm7346.dtsi:252:                       compatible
> = "brcm,bcm7346-ohci", "generic-ohci";
> arch/mips/boot/dts/brcm/bcm7346.dtsi:271:                       compatible
> = "brcm,bcm7346-ohci", "generic-ohci";
> arch/mips/boot/dts/brcm/bcm7346.dtsi:290:                       compatible
> = "brcm,bcm7346-ohci", "generic-ohci";
> arch/mips/boot/dts/brcm/bcm7346.dtsi:309:                       compatible
> = "brcm,bcm7346-ohci", "generic-ohci";
> arch/mips/boot/dts/brcm/bcm7358.dtsi:236:                       compatible
> = "brcm,bcm7358-ohci", "generic-ohci";
> arch/mips/boot/dts/brcm/bcm7360.dtsi:236:                       compatible
> = "brcm,bcm7360-ohci", "generic-ohci";
> arch/mips/boot/dts/brcm/bcm7362.dtsi:232:                       compatible
> = "brcm,bcm7362-ohci", "generic-ohci";
> arch/mips/boot/dts/brcm/bcm7420.dtsi:157:                       compatible
> = "brcm,bcm7420-ohci", "generic-ohci";
> arch/mips/boot/dts/brcm/bcm7420.dtsi:175:                       compatible
> = "brcm,bcm7420-ohci", "generic-ohci";
> arch/mips/boot/dts/brcm/bcm7425.dtsi:159:                       compatible
> = "brcm,bcm7425-ohci", "generic-ohci";
> arch/mips/boot/dts/brcm/bcm7425.dtsi:178:                       compatible
> = "brcm,bcm7425-ohci", "generic-ohci";
> arch/mips/boot/dts/brcm/bcm7425.dtsi:197:                       compatible
> = "brcm,bcm7425-ohci", "generic-ohci";
> arch/mips/boot/dts/brcm/bcm7425.dtsi:216:                       compatible
> = "brcm,bcm7425-ohci", "generic-ohci";
> arch/mips/boot/dts/brcm/bcm7435.dtsi:173:                       compatible
> = "brcm,bcm7435-ohci", "generic-ohci";
> arch/mips/boot/dts/brcm/bcm7435.dtsi:192:                       compatible
> = "brcm,bcm7435-ohci", "generic-ohci";
> arch/mips/boot/dts/brcm/bcm7435.dtsi:211:                       compatible
> = "brcm,bcm7435-ohci", "generic-ohci";
> arch/mips/boot/dts/brcm/bcm7435.dtsi:230:                       compatible
> = "brcm,bcm7435-ohci", "generic-ohci";
> arch/powerpc/boot/dts/akebono.dts:144:                  compatible =
> "ibm,476gtr-ohci", "generic-ohci"; arch/powerpc/boot/dts/akebono.dts:151: 
>                 compatible = "ibm,476gtr-ohci", "generic-ohci";
> ------------------->8--------------------
> 
> Note here some boards use pure "generic-ohci" compatibility string.
> 
> And essentially I created that patch intentionally,
> I'm about to send a patch for Synopsys AXS103 board which will use this
> driver.

I was more interested if something outside of U-Boot uses that compat string.


More information about the U-Boot mailing list