ARM: l2c: clean up OF initialisation a bit
authorRussell King <rmk+kernel@arm.linux.org.uk>
Sat, 15 Mar 2014 16:47:52 +0000 (16:47 +0000)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Thu, 29 May 2014 23:47:43 +0000 (00:47 +0100)
commit96054b0a99f4b7104c02e5521ee5c0d7b1fb09bc
tree5f89df251a271ab88261cb930de6ae447bb748b6
parent14b882cfa3f9db3430037dca6038e161eda953a1
ARM: l2c: clean up OF initialisation a bit

Rather than having a boolean and other tricks to disable some bits of
l2x0_init(), split this function into two parts: a common part shared
between OF and non-OF, and the non-OF part.

The common part can take a block of function pointers, and the cache
ID (to cope with Aurora's DT specified ID.)  Eliminate the redundant
setting of l2x0_base in the OF case, moving it to the non-OF init
function.

This allows us to localise the OF-specific initialisation handling
from the non-OF handling.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/mm/cache-l2x0.c