]> git.baikalelectronics.ru Git - kernel.git/commit
MIPS: Add generic CM probe & access code
authorPaul Burton <paul.burton@imgtec.com>
Wed, 15 Jan 2014 10:31:51 +0000 (10:31 +0000)
committerRalf Baechle <ralf@linux-mips.org>
Thu, 6 Mar 2014 20:25:22 +0000 (21:25 +0100)
commit6dc9649484b5f2b0b517c6bf107d37ed3730376b
treeb3d8cc3717fba316962701c4daefd1aa0a1d9459
parent46e4f7c147152fa7179efc7d22f2f6c2738e1e3b
MIPS: Add generic CM probe & access code

The kernel currently only probes for a MIPS Coherence Manager in the
Malta interrupt code in order to detect & enable the GIC. However CM is
not Malta-specific, so this should really be more generic. This patch
introduces some non-Malta-specific code which probes for a CM and
performs some basic initialisation.

A new header, with temporarily duplicated register definitions, is
introduced in order to:

  1) Allow the new definitions to be correct with regards to the
     CM documentation, as many of those in gcmpregs.h aren't.

  2) Allow switching away from the REG() macro used via a few layers of
     nested macros in order to access registers in gcmpregs.h. This
     patch instead introduced accessor functions akin to the
     {read,write}_c0_* functions used for cop0 registers.

  3) Allow users of the CM to be migrated one by one.

  4) Switch from the name 'GCMP' to 'CM' since the Coherence Manager is
     what this code is actually dealing with.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/6360/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/Kconfig
arch/mips/include/asm/mips-cm.h [new file with mode: 0644]
arch/mips/kernel/Makefile
arch/mips/kernel/mips-cm.c [new file with mode: 0644]