USB: musb: fix Blackfin building after power updates
Subsystems (2)
PATCH 1/1 USB: musb: fix Blackfin building after power updates
From: Ian Jeffray <[email protected]>
The new MUSB power code needs musb_read_txhubport() to return a value (so stub it as 0 like the other Blackfin hub funcs). It also needs new helper functions for saving/restoring context, so change the apparently unused musb_platform_{suspend,resume} to musb_platform_{save,restore}_context in the Blackfin code.
---
Note: this is for 2.6.34.x and 2.6.35
Note: i believe this is what we want, but Cliff is free to correct me ;)
drivers/usb/musb/blackfin.c | 12 ++++++++++++ drivers/usb/musb/musb_regs.h | 3 ++- 2 files changed, 14 insertions(+), 1 deletions(-)
drivers/usb/musb/blackfin.c +12 -0
@@ -392,6 +392,18 @@ int __init musb_platform_init(struct musb *musb, void *board_data)return 0 ; } +#ifdef CONFIG_PM +void musb_platform_save_context (struct musb *musb, +struct musb_context_registers *musb_context) +{ +} + +void musb_platform_restore_context (struct musb *musb, +struct musb_context_registers *musb_context) +{ +} +#endif +int musb_platform_exit (struct musb *musb) {
drivers/usb/musb/musb_regs.h +2 -1
@@ -633,8 +633,9 @@ static inline u8 musb_read_txhubaddr(void __iomem *mbase, u8 epnum) return 0; } -static inline void musb_read_txhubport (void __iomem *mbase,u8 epnum) +static inline u8 musb_read_txhubport (void __iomem *mbase,u8 epnum) { +return 0 ; }#endif /* CONFIG_BLACKFIN */
Signature · 1 line
1.7.1
Hello.
Quoted 5 lines · Mike Frysinger
From: Ian Jeffray <[email protected]>
The new MUSB power code needs
musb_read_txhubport()to return a value (so stub it as 0 like the other Blackfin hub funcs). It also needs new helper functions for saving/restoring context,
No, it doesn't. It was an erratic patch that caused these functions
to be needed outside OMAPs. I've already submitted a patch fixing this, see:
http://marc.info/?l=linux-usb&m=127427834925805
Quoted 3 lines
so change the apparently unused musb_platform_{suspend,resume} to musb_platform_{save,restore}_context in the Blackfin code.
I don't see where you're "changing" them -- and no wonder as I have
deleted these two unused functions.
Quoted 5 lines
Signed-off-by Ian Jeffray <[email protected]>Signed-off-by Mike Frysinger <[email protected]>---
Note: this is for 2.6.34.x and 2.6.35
Note: i believe this is what we want, but Cliff is free to correct me ;)
No, it's not what we want -- though I'm not Cliff. :-)
Quoted 32 lines
drivers/usb/musb/blackfin.c | 12 ++++++++++++ drivers/usb/musb/musb_regs.h | 3 ++- 2 files changed, 14 insertions(+), 1 deletions(-)drivers/usb/musb/blackfin.c +12
-0@@ -392,6 +392,18 @@ int __init musb_platform_init(struct musb *musb, void *board_data)return 0 ; } +#ifdef CONFIG_PM +void musb_platform_save_context (struct musb *musb, +struct musb_context_registers *musb_context) +{ +} + +void musb_platform_restore_context (struct musb *musb, +struct musb_context_registers *musb_context) +{ +} +#endif +int musb_platform_exit (struct musb *musb) {drivers/usb/musb/musb_regs.h +0
-0
drivers/usb/musb/musb_regs.h static inline u8 musb_read_txhubaddr(void __iomem *mbase, u8 epnum) · line 641
Quoted 10 lines
drivers/usb/musb/musb_regs.h +2
-1@@ -633,8 +633,9 @@ static inline u8 musb_read_txhubaddr(void __iomem *mbase, u8 epnum) return 0; } -static inline void musb_read_txhubport (void __iomem *mbase,u8 epnum) +static inline u8 musb_read_txhubport (void __iomem *mbase,u8 epnum) { +return 0 ; }#endif /* CONFIG_BLACKFIN */
Besides, this actually should have been two patches...
WBR, Sergei
Quoted 9 lines · Sergei Shtylyov
Quoted 3 lines · Mike Frysinger
The new MUSB power code needs
musb_read_txhubport()to return a value (so stub it as 0 like the other Blackfin hub funcs). It also needs new helper functions for saving/restoring context,No, it doesn't. It was an erratic patch that caused these functions to be needed outside OMAPs. I've already submitted a patch fixing this, see:
thanks ... i'll grab whatever gets merged and repost on top of that.
Quoted 6 lines
Quoted 3 lines
so change the apparently unused musb_platform_{suspend,resume} to musb_platform_{save,restore}_context in the Blackfin code.
I don't see where you're "changing" them -- and no wonder as I have deleted these two unused functions.
the patch was against 2.6.34, but when updating to latest git, the related changes were dropped. but git automerging doesnt fix changelogs for you :p.
Quoted 8 lines
Quoted 6 lines
-static inline void musb_read_txhubport(void
__iomem*mbase, u8 epnum) +static inline u8musb_read_txhubport(void __iomem *mbase, u8 epnum){
+ return 0;
}
#endif /*CONFIG_BLACKFIN*/Besides, this actually should have been two patches...
it was addressing the same issue: new power code breaks on Blackfin systems -mike
Quoted 8 lines · Mike Frysinger
From: Ian Jeffray <[email protected]>
The new MUSB power code needs
musb_read_txhubport()to return a value (so stub it as 0 like the other Blackfin hub funcs). It also needs new helper functions for saving/restoring context, so change the apparently unused musb_platform_{suspend,resume} to musb_platform_{save,restore}_context in the Blackfin code.
Quoted 8 lines
Signed-off-by Ian Jeffray <[email protected]>Signed-off-by Mike Frysinger <[email protected]>---
Note: this is for 2.6.34.x and 2.6.35
Note: i believe this is what we want, but Cliff is free to correct me ;)drivers/usb/musb/blackfin.c | 12 ++++++++++++ drivers/usb/musb/musb_regs.h | 3 ++-
Note, I'm refusing to take any musb patch unless it comes from Felipe due to the constant bickering from a number of the musb developers, which is starting to really annoy me and contemplate warming up my kill file...
So please work with him to get this agreed apon and have him forward it to me when ready, that's the only way I'm going to accept it.
thanks,
greg k-h
Quoted 19 lines · Greg KH
Quoted 8 lines · Mike Frysinger
From: Ian Jeffray <[email protected]>
The new MUSB power code needs
musb_read_txhubport()to return a value (so stub it as 0 like the other Blackfin hub funcs). It also needs new helper functions for saving/restoring context, so change the apparently unused musb_platform_{suspend,resume} to musb_platform_{save,restore}_context in the Blackfin code.Quoted 8 lines
Signed-off-by Ian Jeffray <[email protected]>Signed-off-by Mike Frysinger <[email protected]>---
Note: this is for 2.6.34.x and 2.6.35
Note: i believe this is what we want, but Cliff is free to correct me ;)drivers/usb/musb/blackfin.c | 12 ++++++++++++
drivers/usb/musb/musb_regs.h | 3 ++-
Quoted 7 lines
Note, I'm refusing to take any musb patch unless it comes from Felipe due to the constant bickering from a number of the musb developers, which is starting to really annoy me and contemplate warming up my kill file...
So please work with him to get this agreed apon and have him forward it to me when ready, that's the only way I'm going to accept it.
this patch is already dead pending whatever Felipe merges (as Sergei pointed out). so i'm waiting for him too ;).
-mike