2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-16 01:04:08 +08:00

gpio: xtensa: fix driver build

Commit cad6fade6e ("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: cad6fade6e ("xtensa: clean up WSR*/RSR*/get_sr/set_sr")
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
This commit is contained in:
Max Filippov 2019-11-26 11:30:27 -08:00 committed by Bartosz Golaszewski
parent e42617b825
commit 634f0348fe

View File

@ -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);
} }