Commit 634f0348 authored by Max Filippov's avatar Max Filippov Committed by Bartosz Golaszewski

gpio: xtensa: fix driver build

Commit cad6fade ("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: stable@vger.kernel.org # v5.0+
Fixes: cad6fade ("xtensa: clean up WSR*/RSR*/get_sr/set_sr")
Signed-off-by: default avatarMax Filippov <jcmvbkbc@gmail.com>
Signed-off-by: default avatarBartosz Golaszewski <bgolaszewski@baylibre.com>
parent e42617b8
...@@ -44,15 +44,14 @@ static inline unsigned long enable_cp(unsigned long *cpenable) ...@@ -44,15 +44,14 @@ static inline unsigned long enable_cp(unsigned long *cpenable)
unsigned long flags; unsigned long flags;
local_irq_save(flags); local_irq_save(flags);
RSR_CPENABLE(*cpenable); *cpenable = xtensa_get_sr(cpenable);
WSR_CPENABLE(*cpenable | BIT(XCHAL_CP_ID_XTIOP)); xtensa_set_sr(*cpenable | BIT(XCHAL_CP_ID_XTIOP), cpenable);
return flags; return flags;
} }
static inline void disable_cp(unsigned long flags, unsigned long cpenable) static inline void disable_cp(unsigned long flags, unsigned long cpenable)
{ {
WSR_CPENABLE(cpenable); xtensa_set_sr(cpenable, cpenable);
local_irq_restore(flags); local_irq_restore(flags);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment