Commit a5d4506d authored by Chao Xie Linux's avatar Chao Xie Linux Committed by Russell King

ARM: 8016/1: Check cpu id in pj4_cp0_init.

Check cpu id in pj4_cp0_init. So for no-PJ4 V7 cpus,
pj4_cpu0_init just return.
This fix will help to make the all the V7 cpus(PJ4 and no-PJ4)
can use code.
Signed-off-by: default avatarChao Xie <chao.xie@marvell.com>
Reviewed-by: default avatarKevin Hilman <khilman@linaro.org>
Tested-by: default avatarKevin Hilman <khilman@linaro.org>
Tested-by: default avatarStephen Warren <swarren@nvidia.com>
Reviewed-by: default avatarStephen Warren <swarren@nvidia.com>
Tested-by: default avatarMatt Porter <mporter@linaro.org>
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent fdb487f5
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
#include <linux/init.h> #include <linux/init.h>
#include <linux/io.h> #include <linux/io.h>
#include <asm/thread_notify.h> #include <asm/thread_notify.h>
#include <asm/cputype.h>
static int iwmmxt_do(struct notifier_block *self, unsigned long cmd, void *t) static int iwmmxt_do(struct notifier_block *self, unsigned long cmd, void *t)
{ {
...@@ -80,6 +81,9 @@ static int __init pj4_cp0_init(void) ...@@ -80,6 +81,9 @@ static int __init pj4_cp0_init(void)
{ {
u32 cp_access; u32 cp_access;
if (!cpu_is_pj4())
return 0;
cp_access = pj4_cp_access_read() & ~0xf; cp_access = pj4_cp_access_read() & ~0xf;
pj4_cp_access_write(cp_access); pj4_cp_access_write(cp_access);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment