summaryrefslogtreecommitdiffstats
path: root/arch/mips/kernel/mips-cm.c
diff options
context:
space:
mode:
authorPaul Burton <paul.burton@imgtec.com>2017-08-12 19:49:31 -0700
committerRalf Baechle <ralf@linux-mips.org>2017-08-30 00:57:26 +0200
commit846e1913f5ccf3fb822a7aa166e5a840c8bdc61b (patch)
treeb4ffc6ee44b019c5515ec237b099cfa32d867ddf /arch/mips/kernel/mips-cm.c
parented7eb5aad7d4e4945fac664c9b67d0db2a8a3db8 (diff)
downloadlinux-stable-846e1913f5ccf3fb822a7aa166e5a840c8bdc61b.tar.gz
linux-stable-846e1913f5ccf3fb822a7aa166e5a840c8bdc61b.tar.bz2
linux-stable-846e1913f5ccf3fb822a7aa166e5a840c8bdc61b.zip
MIPS: CPS: Use change_*, set_* & clear_* where appropriate
Make use of the new change_*, set_* & clear_* accessor functions for CPS (CM, CPC & GIC) registers where doing so makes the code easier to read or shortens it without adversely affecting readability. Signed-off-by: Paul Burton <paul.burton@imgtec.com> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/17005/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/kernel/mips-cm.c')
-rw-r--r--arch/mips/kernel/mips-cm.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/arch/mips/kernel/mips-cm.c b/arch/mips/kernel/mips-cm.c
index 91b861ebc907..497dbb128438 100644
--- a/arch/mips/kernel/mips-cm.c
+++ b/arch/mips/kernel/mips-cm.c
@@ -233,9 +233,7 @@ int mips_cm_probe(void)
}
/* set default target to memory */
- base_reg &= ~CM_GCR_BASE_CMDEFTGT;
- base_reg |= CM_GCR_BASE_CMDEFTGT_MEM;
- write_gcr_base(base_reg);
+ change_gcr_base(CM_GCR_BASE_CMDEFTGT, CM_GCR_BASE_CMDEFTGT_MEM);
/* disable CM regions */
write_gcr_reg0_base(CM_GCR_REGn_BASE_BASEADDR);