drivers/gpio/gpio-xtensa: fix driver build
Subsystems (2)
PATCH 1/1 drivers/gpio/gpio-xtensa: fix driver build
Commit cad6fade6e78 ("xtensa: clean up WSR*/RSR*/get_sr/set_sr") removed {RSR,WSR}_CPENABLE from xtensa code, but did not fix up all users, breaking gpio-xtensa driver build.
Update gpio-xtensa to use new xtensa_{get,set}_sr API.
Cc [email protected] # v5.0+
Fixes cad6fade6e78 ("xtensa: clean up WSR*/RSR*/get_sr/set_sr")
Signed-off-by Max Filippov <[email protected]>
--- drivers/gpio/gpio-xtensa.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
drivers/gpio/gpio-xtensa.c +3 -4
@@ -44,15 +44,14 @@ static inline unsigned long enable_cp(unsigned long *cpenable)unsigned long flags;local_irq_save (flags); -RSR_CPENABLE (*cpenable); -WSR_CPENABLE (*cpenable |BIT (XCHAL_CP_ID_XTIOP )); - + *cpenable =xtensa_get_sr (cpenable); +xtensa_set_sr (*cpenable |BIT (XCHAL_CP_ID_XTIOP ), cpenable);return flags; }static inline void disable_cp (unsigned long flags,unsigned long cpenable) { -WSR_CPENABLE (cpenable); +xtensa_set_sr (cpenable, cpenable);local_irq_restore (flags); }
Signature · 1 line
2.20.1
wt., 26 lis 2019 o 20:30 Max Filippov <[email protected]> napisał(a):
Quoted 37 lines
Commit
cad6fade6e78("xtensa: clean up WSR*/RSR*/get_sr/set_sr") removed {RSR,WSR}_CPENABLE from xtensa code, but did not fix up all users, breaking gpio-xtensa driver build.
Update gpio-xtensa to use new xtensa_{get,set}_sr API.Cc [email protected] # v5.0+Fixes cad6fade6e78 ("xtensa: clean up WSR*/RSR*/get_sr/set_sr")Signed-off-by Max Filippov <[email protected]>--- drivers/gpio/gpio-xtensa.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)drivers/gpio/gpio-xtensa.c +3
-5@@ -44,15 +44,14 @@ static inline unsigned long enable_cp(unsigned long *cpenable)unsigned long flags;local_irq_save (flags); -RSR_CPENABLE (*cpenable); -WSR_CPENABLE (*cpenable |BIT (XCHAL_CP_ID_XTIOP )); - + *cpenable =xtensa_get_sr (cpenable); +xtensa_set_sr (*cpenable |BIT (XCHAL_CP_ID_XTIOP ), cpenable);return flags; }static inline void disable_cp (unsigned long flags,unsigned long cpenable) { -WSR_CPENABLE (cpenable); +xtensa_set_sr (cpenable, cpenable);local_irq_restore (flags); } --
Quoted 2 lines
2.20.1
Patch applied, thanks!
Bart