linux/arch/mips
Paul Burton 93c5bba575 MIPS: CM: Use BIT/GENMASK for register fields, order & drop shifts
There's no reason for us not to use BIT() & GENMASK() in asm/mips-cm.h
when declaring macros corresponding to register fields. This patch
modifies our definitions to do so.

The *_SHF definitions are removed entirely - they duplicate information
found in the masks, are infrequently used & can be replaced with use of
__ffs() where needed.

The *_MSK definitions then lose their _MSK suffix which is now somewhat
redundant, and users are modified to match.

The field definitions are moved to follow the appropriate register's
accessor functions, which helps to keep the field definitions in order &
to find the appropriate fields for a given register. Whilst here a
comment is added describing each register & including its name, which is
helpful both for linking the register back to hardware documentation &
for grepping purposes.

This also cleans up a couple of issues that became obvious as a result
of making the changes described above:

  - We previously had definitions for GCR_Cx_RESET_EXT_BASE & a phony
    copy of that named GCR_RESET_EXT_BASE - a register which does not
    exist. The bad definitions were added by commit 497e803ebf ("MIPS:
    smp-cps: Ensure secondary cores start with EVA disabled") and made
    use of from boot_core(), which is now modified to use the
    GCR_Cx_RESET_EXT_BASE definitions.

  - We had a typo in CM_GCR_ERROR_CAUSE_ERRINGO_MSK - we now correctly
    define this as inFo rather than inGo.

Now that we don't duplicate field information between _SHF & _MSK
definitions, and keep the fields next to the register accessors, it will
be much easier to spot & prevent any similar oddities being introduced
in the future.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Acked-by: Thomas Gleixner <tglx@linutronix.de
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/17001/
Patchwork: https://patchwork.linux-mips.org/patch/17216/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2017-08-29 15:21:57 +02:00
..
alchemy MIPS: Alchemy: Threaded carddetect irqs for devboards 2017-08-29 15:21:53 +02:00
ar7 MIPS: Audit and remove any unnecessary uses of module.h 2017-02-14 09:00:25 +00:00
ath25 genirq: Remove irq argument from irq flow handlers 2015-09-16 15:47:51 +02:00
ath79 MIPS: Convert to using %pOF instead of full_name 2017-08-29 15:21:50 +02:00
bcm47xx MIPS: BCM47XX: Fix button inversion for Asus WL-500W 2017-02-17 11:16:46 +00:00
bcm63xx MIPS: Audit and remove any unnecessary uses of module.h 2017-02-14 09:00:25 +00:00
bmips MIPS: BMIPS: Support APPENDED_DTB 2016-10-06 17:31:02 +02:00
boot MIPS: Add Onion Omega2+ board 2017-08-29 15:21:54 +02:00
cavium-octeon MIPS: SMP: Constify smp ops 2017-08-29 15:21:50 +02:00
cobalt MIPS: Cobalt: Fix typo 2016-08-03 08:16:30 +02:00
configs MIPS: configs: Add Onion Omega2+ defconfig 2017-08-29 15:21:54 +02:00
dec MIPS: DEC: Fix an int-handler.S CPU_DADDI_WORKAROUNDS regression 2017-08-07 16:31:03 +02:00
emma MIPS: Avoid old-style declaration 2017-01-25 02:51:11 +01:00
fw MIPS: SMP: Constify smp ops 2017-08-29 15:21:50 +02:00
generic MIPS: generic: Include asm/time.h for get_c0_*_int() 2017-08-29 15:21:54 +02:00
include MIPS: CM: Use BIT/GENMASK for register fields, order & drop shifts 2017-08-29 15:21:57 +02:00
jazz MIPS: Audit and remove any unnecessary uses of module.h 2017-02-14 09:00:25 +00:00
jz4740 MIPS: jz4740: Remove custom GPIO code 2017-05-22 17:26:34 +02:00
kernel MIPS: CM: Use BIT/GENMASK for register fields, order & drop shifts 2017-08-29 15:21:57 +02:00
kvm PPC: 2017-07-06 18:38:31 -07:00
lantiq clk: Provide dummy of_clk_get_from_provider() for compile-testing 2017-06-02 10:51:34 -07:00
lasat MIPS: Audit and remove any unnecessary uses of module.h 2017-02-14 09:00:25 +00:00
lib MIPS: Include asm/delay.h for __{,n,u}delay() 2017-08-29 15:21:54 +02:00
loongson32 MIPS: clockevent drivers: Set ->min_delta_ticks and ->max_delta_ticks 2017-04-14 13:11:16 -07:00
loongson64 MIPS: SMP: Constify smp ops 2017-08-29 15:21:50 +02:00
math-emu MIPS: math-emu: Add FP emu debugfs stats for individual instructions 2017-08-29 15:21:57 +02:00
mm MIPS: CM: Use BIT/GENMASK for register fields, order & drop shifts 2017-08-29 15:21:57 +02:00
mti-malta MIPS: CM: Use BIT/GENMASK for register fields, order & drop shifts 2017-08-29 15:21:57 +02:00
net MIPS: Add missing file for eBPF JIT. 2017-08-04 11:23:58 -07:00
netlogic MIPS: SMP: Constify smp ops 2017-08-29 15:21:50 +02:00
oprofile mips: sanitize __access_ok() 2017-04-06 02:08:06 -04:00
paravirt MIPS: SMP: Constify smp ops 2017-08-29 15:21:50 +02:00
pci MIPS: pci-mt7620: explicitly request exclusive reset control 2017-08-29 15:21:51 +02:00
pic32 clocksource/drivers: Rename clocksource_probe to timer_probe 2017-06-14 11:59:16 +02:00
pistachio clocksource/drivers: Rename clocksource_probe to timer_probe 2017-06-14 11:59:16 +02:00
pmcs-msp71xx MIPS: Audit and remove any unnecessary uses of module.h 2017-02-14 09:00:25 +00:00
pnx833x MIPS: Squash lines for simple wrapper functions 2016-10-04 16:13:57 +02:00
power MIPS: Hibernate: flush TLB entries earlier 2015-04-10 15:41:52 +02:00
ralink MIPS: Add Onion Omega2+ board 2017-08-29 15:21:54 +02:00
rb532 MIPS: Audit and remove any unnecessary uses of module.h 2017-02-14 09:00:25 +00:00
sgi-ip22 mips: sgi-ip22: ecard: use dev_groups and not dev_attrs for bus_type 2017-06-09 11:00:45 +02:00
sgi-ip27 MIPS: SMP: Constify smp ops 2017-08-29 15:21:50 +02:00
sgi-ip32 MIPS: Add missing include files 2017-03-08 10:38:06 +01:00
sibyte MIPS: SMP: Constify smp ops 2017-08-29 15:21:50 +02:00
sni char/genrtc: remove asm-generic/rtc.h from mips 2016-06-04 00:23:36 +02:00
txx9 MIPS: Audit and remove any unnecessary uses of module.h 2017-02-14 09:00:25 +00:00
vdso MIPS: VDSO: Fix clobber lists in fallback code paths 2017-08-07 13:53:25 +02:00
vr41xx MIPS: Audit and remove any unnecessary uses of module.h 2017-02-14 09:00:25 +00:00
xilfpga clocksource/drivers: Rename clocksource_probe to timer_probe 2017-06-14 11:59:16 +02:00
Kbuild MIPS: Disable Werror when W= is set 2017-04-10 11:56:07 +02:00
Kbuild.platforms MIPS: generic: Convert SEAD-3 to a generic board 2016-10-06 18:04:20 +02:00
Kconfig MIPS: Move r4k FP code from r4k_switch.S to r4k_fpu.S 2017-08-29 15:21:51 +02:00
Kconfig.debug MIPS: Sibyte: Fix Kconfig warning. 2017-04-21 03:34:01 +02:00
Makefile MIPS: Allow platform to specify multiple its.S files 2017-08-29 15:21:52 +02:00
Makefile.postlink MIPS: Fix distclean with Makefile.postlink 2017-02-13 18:57:34 +00:00