Fix compile failure encountered on u-boot-usb tree (2017-07-20)
Subsystems (4)
cover Fix compile failure encountered on u-boot-usb tree (2017-07-20)
From: Patrice Chotard <[email protected]>
This series fixes :
_ compilation issue reported by Ran Wang on u-boot-usb branch _ add last minute fixes for both generic-ehci and generic_ohci drivers
which avoid to init a generic PHY if not found, reported by Patrick Delaunay
This series need an additionnal patch from Jean-Jacques Hiblot :
[PATCH v2] phy: add a NO-OP phy driver
Patrice Chotard (4):
dm: phy: add missing #ifdef CONFIG_PHY
dm: usb: host: xhci-dwc3: add missing #ifdef CONFIG_DM_USB
usb: host: ehci-generic: initialize PHY only when found
usb: host: ohci-generic: initialize PHY only when found
drivers/usb/host/ehci-generic.c | 11 ++++++----- drivers/usb/host/ohci-generic.c | 11 ++++++----- drivers/usb/host/xhci-dwc3.c | 2 ++ include/generic-phy.h | 42 +++++++++++++++++++++++++++++++++++++++++ 4 files changed, 56 insertions(+), 10 deletions(-)
Signature · 1 line
1.9.1
PATCH 1/4 dm: phy: add missing #ifdef CONFIG_PHY
From: Patrice Chotard <[email protected]>
To avoid compilation breakage on platform that doesn't support DM PHY but uses xhci-dwc3 driver, add the missing CONFIG_PHY flag.
Introduced by patch :84e53877 "usb: host: xhci-dwc3: Add generic PHY support"
--- include/generic-phy.h | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+)
include/generic-phy.h +42 -0
@@ -122,6 +122,7 @@ struct phy_ops {int (*power_off)(struct phy *phy); }; +#ifdef CONFIG_PHY /** * generic_phy_init() - initialize the PHY port
@@ -220,6 +221,47 @@ int generic_phy_get_by_index(struct udevice *user, int index,int generic_phy_get_by_name (struct udevice *user,const char *phy_name,struct phy *phy); +#else /* CONFIG_PHY */ + +static inline int generic_phy_init (struct phy *phy) +{ +return 0 ; +} + +static inline int generic_phy_exit (struct phy *phy) +{ +return 0 ; +} + +static inline int generic_phy_reset (struct phy *phy) +{ +return 0 ; +} + +static inline int generic_phy_power_on (struct phy *phy) +{ +return 0 ; +} + +static inline int generic_phy_power_off (struct phy *phy) +{ +return 0 ; +} + +static inline int generic_phy_get_by_index (struct udevice *user,int index, +struct phy *phy) +{ +return 0 ; +} + +static inline int generic_phy_get_by_name (struct udevice *user,const char *phy_name, +struct phy *phy) +{ +return 0 ; +} + +#endif /* CONFIG_PHY */ +/** * generic_phy_valid() - check if PHY port is valid *
Signature · 1 line
1.9.1
PATCH 2/4 dm: usb: host: xhci-dwc3: add missing #ifdef CONFIG_DM_USB
In reply to patrice.chotard at st.comFrom: Patrice Chotard <[email protected]>
Add CONFIG_DM_USB flag to avoid following compilation errors detected by buildman :+drivers/usb/host/built-in.o: In function `xhci_dwc3_remove':+drivers/usb/host/xhci-dwc3.c:168: undefined reference to xhci_deregister' +drivers/usb/host/built-in.o: In function xhci_dwc3_probe':+drivers/usb/host/xhci-dwc3.c:145: undefined reference to usb_get_dr_mode' +drivers/usb/host/xhci-dwc3.c:152: undefined reference to xhci_register'
introduced by patch d5c3f014da3 "usb: host: xhci-dwc3: Convert driver to DM"
--- drivers/usb/host/xhci-dwc3.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/usb/host/xhci-dwc3.c +2 -0
@@ -111,6 +111,7 @@ void dwc3_set_fladj(struct dwc3 *dwc3_reg, u32 val) GFLADJ_30MHZ(val)); } +#ifdef CONFIG_DM_USB static int xhci_dwc3_probe (struct udevice *dev) {struct xhci_dwc3_platdata *plat =dev_get_platdata (dev);
@@ -184,3 +185,4 @@ U_BOOT_DRIVER(xhci_dwc3) = { .platdata_auto_alloc_size = sizeof(struct xhci_dwc3_platdata), .flags = DM_FLAG_ALLOC_PRIV_DMA, }; +#endif
Signature · 1 line
1.9.1
PATCH 2/4 dm: usb: host: xhci-dwc3: add missing #ifdef CONFIG_DM_USB
Quoted 10 lines · On 24 July 2017 at 09:07, <[email protected]> wrote:
From: Patrice Chotard <[email protected]>
Add
CONFIG_DM_USBflag to avoid following compilation errors detected by buildman :(quoted diff) +5
-0+drivers/usb/host/built-in.o: In function `xhci_dwc3_remove': +drivers/usb/host/xhci-dwc3.c:168: undefined reference to `xhci_deregister' +drivers/usb/host/built-in.o: In function `xhci_dwc3_probe': +drivers/usb/host/xhci-dwc3.c:145: undefined reference to `usb_get_dr_mode' +drivers/usb/host/xhci-dwc3.c:152: undefined reference to `xhci_register'
Quoted 7 lines
introduced by patch
d5c3f014da3"usb: host: xhci-dwc3: Convert driver to DM"Signed-off-by Patrice Chotard <[email protected]>Reported-by Ran Wang <[email protected]>--- drivers/usb/host/xhci-dwc3.c | 2 ++ 1 file changed, 2 insertions(+)
PATCH 2/4 dm: usb: host: xhci-dwc3: add missing #ifdef CONFIG_DM_USB
Quoted 13 lines · Simon Glass
Quoted 12 lines · On 24 July 2017 at 09:07, <[email protected]> wrote:
From: Patrice Chotard <[email protected]>
Add
CONFIG_DM_USBflag to avoid following compilation errors detected by buildman :(quoted diff) +5
-0+drivers/usb/host/built-in.o: In function `xhci_dwc3_remove': +drivers/usb/host/xhci-dwc3.c:168: undefined reference to `xhci_deregister' +drivers/usb/host/built-in.o: In function `xhci_dwc3_probe': +drivers/usb/host/xhci-dwc3.c:145: undefined reference to `usb_get_dr_mode' +drivers/usb/host/xhci-dwc3.c:152: undefined reference to `xhci_register'introduced by patch
d5c3f014da3"usb: host: xhci-dwc3: Convert driver to DM"
Quoted 8 lines
Quoted 5 lines
Signed-off-by Patrice Chotard <[email protected]>Reported-by Ran Wang <[email protected]>--- drivers/usb/host/xhci-dwc3.c | 2 ++ 1 file changed, 2 insertions(+)Reviewed-by Simon Glass <[email protected]>
Um, this patch was applied like two weeks ago. Is this some automated botmail ... reviewman ? :)
Signature · 2 lines
Best regards, Marek Vasut
PATCH 2/4 dm: usb: host: xhci-dwc3: add missing #ifdef CONFIG_DM_USB
Hi Marek,
Quoted 22 lines · Marek Vasut
Quoted 13 lines · Simon Glass
Quoted 12 lines · On 24 July 2017 at 09:07, <[email protected]> wrote:
From: Patrice Chotard <[email protected]>
Add
CONFIG_DM_USBflag to avoid following compilation errors detected by buildman :(quoted diff) +5
-0+drivers/usb/host/built-in.o: In function `xhci_dwc3_remove': +drivers/usb/host/xhci-dwc3.c:168: undefined reference to `xhci_deregister' +drivers/usb/host/built-in.o: In function `xhci_dwc3_probe': +drivers/usb/host/xhci-dwc3.c:145: undefined reference to `usb_get_dr_mode' +drivers/usb/host/xhci-dwc3.c:152: undefined reference to `xhci_register'introduced by patch
d5c3f014da3"usb: host: xhci-dwc3: Convert driver to DM"Quoted 8 lines
Quoted 5 lines
Signed-off-by Patrice Chotard <[email protected]>Reported-by Ran Wang <[email protected]>--- drivers/usb/host/xhci-dwc3.c | 2 ++ 1 file changed, 2 insertions(+)Reviewed-by Simon Glass <[email protected]>
Quoted 2 lines
Um, this patch was applied like two weeks ago. Is this some automated botmail ... reviewman ? :)
There is no mention of it being applied on this thread, so it looked like an open patch to me.
Regards,
Simon
PATCH 3/4 usb: host: ehci-generic: initialize PHY only when found
In reply to patrice.chotard at st.comFrom: Patrice Chotard <[email protected]>
Call generic_phy_init() only when a PHY was found. This will avoid a crash if no "phys" property is found in DT.
--- drivers/usb/host/ehci-generic.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-)
drivers/usb/host/ehci-generic.c +6 -5
@@ -99,12 +99,13 @@ static int ehci_usb_probe(struct udevice *dev)error ("failed to get usb phy\n" ); goto reset_err; } - } + }else { - err =generic_phy_init (&priv->phy); -if (err) { -error ("failed to init usb phy\n" ); - goto reset_err; + err =generic_phy_init (&priv->phy); +if (err) { +error ("failed to init usb phy\n" ); + goto reset_err; + } } hccr =map_physmem (devfdt_get_addr (dev),0x100 ,MAP_NOCACHE );
Signature · 1 line
1.9.1
PATCH 3/4 usb: host: ehci-generic: initialize PHY only when found
Quoted 10 lines · On 24 July 2017 at 09:07, <[email protected]> wrote:
From: Patrice Chotard <[email protected]>
Call
generic_phy_init()only when a PHY was found. This will avoid a crash if no "phys" property is found in DT.Signed-off-by Patrice Chotard <[email protected]>Reported-by Patrick Delaunay <[email protected]>--- drivers/usb/host/ehci-generic.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-)
PATCH 4/4 usb: host: ohci-generic: initialize PHY only when found
In reply to patrice.chotard at st.comFrom: Patrice Chotard <[email protected]>
Call generic_phy_init() only when a PHY was found. This will avoid a crash if no "phys" property is found in DT.
--- drivers/usb/host/ohci-generic.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-)
drivers/usb/host/ohci-generic.c +6 -5
@@ -91,12 +91,13 @@ static int ohci_usb_probe(struct udevice *dev)error ("failed to get usb phy\n" ); goto reset_err; } - } + }else { - err =generic_phy_init (&priv->phy); -if (err) { -error ("failed to init usb phy\n" ); - goto reset_err; + err =generic_phy_init (&priv->phy); +if (err) { +error ("failed to init usb phy\n" ); + goto reset_err; + } } err =ohci_register (dev, regs);
Signature · 1 line
1.9.1
PATCH 4/4 usb: host: ohci-generic: initialize PHY only when found
Quoted 10 lines · On 24 July 2017 at 09:07, <[email protected]> wrote:
From: Patrice Chotard <[email protected]>
Call
generic_phy_init()only when a PHY was found. This will avoid a crash if no "phys" property is found in DT.Signed-off-by Patrice Chotard <[email protected]>Reported-by Patrick Delaunay <[email protected]>--- drivers/usb/host/ohci-generic.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-)
Marek Vasut
Appliedcover Fix compile failure encountered on u-boot-usb tree (2017-07-20)
In reply to patrice.chotard at st.comQuoted 18 lines · patrice.chotard at st.com
From: Patrice Chotard <[email protected]>
This series fixes :
_ compilation issue reported by Ran Wang on u-boot-usb branch _ add last minute fixes for both generic-ehci andgeneric_ohcidrivers
which avoid to init a generic PHY if not found, reported by Patrick DelaunayThis series need an additionnal patch from Jean-Jacques Hiblot :
[PATCH v2] phy: add a NO-OP phy driverPatrice Chotard (4):
dm: phy: add missing #ifdefCONFIG_PHY
dm: usb: host: xhci-dwc3: add missing #ifdefCONFIG_DM_USB
usb: host: ehci-generic: initialize PHY only when found
usb: host: ohci-generic: initialize PHY only when found
Quoted 6 lines
drivers/usb/host/ehci-generic.c | 11 ++++++----- drivers/usb/host/ohci-generic.c | 11 ++++++----- drivers/usb/host/xhci-dwc3.c | 2 ++ include/generic-phy.h | 42 +++++++++++++++++++++++++++++++++++++++++ 4 files changed, 56 insertions(+), 10 deletions(-)
Applied all, thanks.
Signature · 2 lines
Best regards, Marek Vasut
cover Fix compile failure encountered on u-boot-usb tree (2017-07-20)
Hi Marek,
Quoted 19 lines · Marek Vasut
Quoted 18 lines · patrice.chotard at st.com
From: Patrice Chotard <[email protected]>
This series fixes :
_ compilation issue reported by Ran Wang on u-boot-usb branch _ add last minute fixes for both generic-ehci andgeneric_ohcidrivers
which avoid to init a generic PHY if not found, reported by Patrick DelaunayThis series need an additionnal patch from Jean-Jacques Hiblot :
[PATCH v2] phy: add a NO-OP phy driverPatrice Chotard (4):
dm: phy: add missing #ifdefCONFIG_PHY
dm: usb: host: xhci-dwc3: add missing #ifdefCONFIG_DM_USB
usb: host: ehci-generic: initialize PHY only when found
usb: host: ohci-generic: initialize PHY only when found
Quoted 8 lines
Quoted 6 lines
drivers/usb/host/ehci-generic.c | 11 ++++++----- drivers/usb/host/ohci-generic.c | 11 ++++++----- drivers/usb/host/xhci-dwc3.c | 2 ++ include/generic-phy.h | 42 +++++++++++++++++++++++++++++++++++++++++ 4 files changed, 56 insertions(+), 10 deletions(-)Applied all, thanks.
I see these 4 patches are applied on top of u-boot-usb/master directly. I think they should be squashed into Patrice's previous patches, so that we can still maintain bisectablity.
Regards,
Bin
cover Fix compile failure encountered on u-boot-usb tree (2017-07-20)
Quoted 1 line · Bin Meng
Hi Marek,
Hi Bin,
Quoted 26 lines · Marek Vasut
Quoted 25 lines · patrice.chotard at st.com
Quoted 24 lines
From: Patrice Chotard <[email protected]>
This series fixes :
_ compilation issue reported by Ran Wang on u-boot-usb branch _ add last minute fixes for both generic-ehci andgeneric_ohcidrivers
which avoid to init a generic PHY if not found, reported by Patrick DelaunayThis series need an additionnal patch from Jean-Jacques Hiblot :
[PATCH v2] phy: add a NO-OP phy driverPatrice Chotard (4):
dm: phy: add missing #ifdefCONFIG_PHY
dm: usb: host: xhci-dwc3: add missing #ifdefCONFIG_DM_USB
usb: host: ehci-generic: initialize PHY only when found
usb: host: ohci-generic: initialize PHY only when founddrivers/usb/host/ehci-generic.c | 11 ++++++----- drivers/usb/host/ohci-generic.c | 11 ++++++----- drivers/usb/host/xhci-dwc3.c | 2 ++ include/generic-phy.h | 42 +++++++++++++++++++++++++++++++++++++++++ 4 files changed, 56 insertions(+), 10 deletions(-)
Quoted 6 lines
Quoted 2 lines
Applied all, thanks.
I see these 4 patches are applied on top of u-boot-usb/master directly. I think they should be squashed into Patrice's previous patches, so that we can still maintain bisectablity.
They can, but then I have to rewrite history and rebase your patches on top of his, which I'm not too happy to do. Plus if I squash them, you cannot locate either of the squashed patches in the ML, which sucks.
Quoted 3 lines
Regards,
Bin
Signature · 2 lines
Best regards, Marek Vasut
cover Fix compile failure encountered on u-boot-usb tree (2017-07-20)
In reply to patrice.chotard at st.comQuoted 18 lines · patrice.chotard at st.com
From: Patrice Chotard <[email protected]>
This series fixes :
_ compilation issue reported by Ran Wang on u-boot-usb branch _ add last minute fixes for both generic-ehci andgeneric_ohcidrivers
which avoid to init a generic PHY if not found, reported by Patrick DelaunayThis series need an additionnal patch from Jean-Jacques Hiblot :
[PATCH v2] phy: add a NO-OP phy driverPatrice Chotard (4):
dm: phy: add missing #ifdefCONFIG_PHY
dm: usb: host: xhci-dwc3: add missing #ifdefCONFIG_DM_USB
usb: host: ehci-generic: initialize PHY only when found
usb: host: ohci-generic: initialize PHY only when found
Quoted 6 lines
drivers/usb/host/ehci-generic.c | 11 ++++++----- drivers/usb/host/ohci-generic.c | 11 ++++++----- drivers/usb/host/xhci-dwc3.c | 2 ++ include/generic-phy.h | 42 +++++++++++++++++++++++++++++++++++++++++ 4 files changed, 56 insertions(+), 10 deletions(-)
FYI, poplar, dra7xx_evm, evb-rk3328 still have errors. Just try building the entirety of ARM and ARM64 and you'll see them.
Signature · 2 lines
Best regards, Marek Vasut
cover Fix compile failure encountered on u-boot-usb tree (2017-07-20)
Hi Marek
Quoted 26 lines · Marek Vasut
Quoted 18 lines · patrice.chotard at st.com
From: Patrice Chotard <[email protected]>
This series fixes :
_ compilation issue reported by Ran Wang on u-boot-usb branch _ add last minute fixes for both generic-ehci andgeneric_ohcidrivers
which avoid to init a generic PHY if not found, reported by Patrick DelaunayThis series need an additionnal patch from Jean-Jacques Hiblot :
[PATCH v2] phy: add a NO-OP phy driverPatrice Chotard (4):
dm: phy: add missing #ifdefCONFIG_PHY
dm: usb: host: xhci-dwc3: add missing #ifdefCONFIG_DM_USB
usb: host: ehci-generic: initialize PHY only when found
usb: host: ohci-generic: initialize PHY only when foundQuoted 6 lines
drivers/usb/host/ehci-generic.c | 11 ++++++----- drivers/usb/host/ohci-generic.c | 11 ++++++----- drivers/usb/host/xhci-dwc3.c | 2 ++ include/generic-phy.h | 42 +++++++++++++++++++++++++++++++++++++++++ 4 files changed, 56 insertions(+), 10 deletions(-)
Quoted 3 lines
FYI, poplar,
dra7xx_evm, evb-rk3328 still have errors. Just try building the entirety of ARM and ARM64 and you'll see them.
Ok i will submit fixes to fix error poplar and warnings for dra7xx_evm platforms.
Regarding evb-rk3328, warnings are not link with my series
Patrice
cover Fix compile failure encountered on u-boot-usb tree (2017-07-20)
Quoted 29 lines · Patrice CHOTARD
Hi Marek
Quoted 26 lines · Marek Vasut
Quoted 24 lines · patrice.chotard at st.com
From: Patrice Chotard <[email protected]>
This series fixes :
_ compilation issue reported by Ran Wang on u-boot-usb branch _ add last minute fixes for both generic-ehci andgeneric_ohcidrivers
which avoid to init a generic PHY if not found, reported by Patrick DelaunayThis series need an additionnal patch from Jean-Jacques Hiblot :
[PATCH v2] phy: add a NO-OP phy driverPatrice Chotard (4):
dm: phy: add missing #ifdefCONFIG_PHY
dm: usb: host: xhci-dwc3: add missing #ifdefCONFIG_DM_USB
usb: host: ehci-generic: initialize PHY only when found
usb: host: ohci-generic: initialize PHY only when founddrivers/usb/host/ehci-generic.c | 11 ++++++----- drivers/usb/host/ohci-generic.c | 11 ++++++----- drivers/usb/host/xhci-dwc3.c | 2 ++ include/generic-phy.h | 42 +++++++++++++++++++++++++++++++++++++++++ 4 files changed, 56 insertions(+), 10 deletions(-)
Quoted 6 lines
Quoted 3 lines
FYI, poplar,
dra7xx_evm, evb-rk3328 still have errors. Just try building the entirety of ARM and ARM64 and you'll see them.Ok i will submit fixes to fix error poplar and warnings for
dra7xx_evmplatforms.
Can you please run buildman to see if there are any failures remaining ?
Quoted 1 line
Regarding evb-rk3328, warnings are not link with my series
OK
Quoted 2 lines
Patrice
Signature · 2 lines
Best regards, Marek Vasut
cover Fix compile failure encountered on u-boot-usb tree (2017-07-20)
Hi Marek
Quoted 30 lines · Marek Vasut
Quoted 29 lines · Patrice CHOTARD
Hi Marek
Quoted 26 lines · Marek Vasut
Quoted 24 lines · patrice.chotard at st.com
From: Patrice Chotard <[email protected]>
This series fixes :
_ compilation issue reported by Ran Wang on u-boot-usb branch _ add last minute fixes for both generic-ehci andgeneric_ohcidrivers
which avoid to init a generic PHY if not found, reported by Patrick DelaunayThis series need an additionnal patch from Jean-Jacques Hiblot :
[PATCH v2] phy: add a NO-OP phy driverPatrice Chotard (4):
dm: phy: add missing #ifdefCONFIG_PHY
dm: usb: host: xhci-dwc3: add missing #ifdefCONFIG_DM_USB
usb: host: ehci-generic: initialize PHY only when found
usb: host: ohci-generic: initialize PHY only when founddrivers/usb/host/ehci-generic.c | 11 ++++++----- drivers/usb/host/ohci-generic.c | 11 ++++++----- drivers/usb/host/xhci-dwc3.c | 2 ++ include/generic-phy.h | 42 +++++++++++++++++++++++++++++++++++++++++ 4 files changed, 56 insertions(+), 10 deletions(-)
Quoted 8 lines
Quoted 6 lines
Quoted 3 lines
FYI, poplar,
dra7xx_evm, evb-rk3328 still have errors. Just try building the entirety of ARM and ARM64 and you'll see them.Ok i will submit fixes to fix error poplar and warnings for
dra7xx_evmplatforms.Can you please run buildman to see if there are any failures remaining ?
Of course, buildman becomes my friends ;-)
Quoted 9 lines
Quoted 2 lines
Regarding evb-rk3328, warnings are not link with my series
OK
Quoted 2 lines
Patrice