aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlof Johansson <olof@lixom.net>2013-02-05 16:10:39 -0500
committerOlof Johansson <olof@lixom.net>2013-02-05 16:10:39 -0500
commite9daa0ead197d39f024ceeb668b2407b8b1ca8b7 (patch)
tree24fca8c657105d2fa8cecad1ae2540f97497c454
parentc8bfea3636215e50b519e6fdb29f1bf776b0f166 (diff)
parent031b77afc374cf1b86dbcda5dfa6e1bbb989836c (diff)
Merge tag 'tegra-for-3.9-soc-t114' of git://git.kernel.org/pub/scm/linux/kernel/git/swarren/linux-tegra into next/soc
From Stepen Warren: ARM: tegra: add Tegra114 SoC support This pull request adds initial support for the Tegra114 SoC, which integrates a quad-core ARM Cortex-A15 CPU. I'm proud to observe that we posted the initial versions of these patches before the final official announcement of this chip. These patches are enough to boot with a UART-based console, support the Dalmore and Pluto reference/evaluation boards, instantiate the GPIO and pinctrl drivers, and enable a cpuidle state. As yet, no clocks or storage devices are supported, but patches for those will follow shortly. This pull request is based on (most of) the previous pull request with tag tegra-for-3.9-soc-cpuidle, followed by a merge of the previous pull request with tag tegra-for-3.9-scu-base-rework. * tag 'tegra-for-3.9-soc-t114' of git://git.kernel.org/pub/scm/linux/kernel/git/swarren/linux-tegra: (24 commits) ARM: DT: tegra114: add pinmux DT entry ARM: DT: tegra114: add GPIO DT entry ARM: tegra114: select PINCTRL for Tegra114 SoC ARM: tegra: add Tegra114 ARM_CPUIDLE_WFI_STATE support ARM: tegra: Add SMMU entry to Tegra114 DT ARM: tegra: add AHB entry to Tegra114 DT ARM: tegra: Add initial support for Tegra114 SoC. ARM: dt: tegra114: Add new board, Pluto ARM: dt: tegra114: Add new board, Dalmore ARM: dt: tegra114: Add new SoC base, Tegra114 SoC ARM: tegra: fuse: Add chip ID Tegra114 0x35 ARM: OMAP: Make use of available scu_a9_get_base() interface ARM: tegra: Skip scu_enable(scu_base) if not Cortex A9 ARM: Add API to detect SCU base address from CP15 ARM: tegra: Use DT /cpu node to detect number of CPU core ARM: tegra: Add CPU nodes to Tegra30 device tree ARM: tegra: Add CPU nodes to Tegra20 device tree ARM: perf: simplify __hw_perf_event_init err handling ARM: perf: remove unnecessary checks for idx < 0 ARM: perf: handle armpmu_register failing ... Signed-off-by: Olof Johansson <olof@lixom.net> Remove/add conflict in arch/arm/mach-tegra/common.c resolved. Remove/remove conflict in arch/arm/mach-tegra/platsmp.c. Leave the empty stub function for now since removing it in the merge commit is confusing; will be cleaned up in a separate commit. # # It looks like you may be committing a merge. # If this is not correct, please remove the file # .git/MERGE_HEAD # and try again.
-rw-r--r--arch/arm/boot/dts/Makefile4
-rw-r--r--arch/arm/boot/dts/tegra114-dalmore.dts21
-rw-r--r--arch/arm/boot/dts/tegra114-pluto.dts21
-rw-r--r--arch/arm/boot/dts/tegra114.dtsi153
-rw-r--r--arch/arm/boot/dts/tegra20.dtsi17
-rw-r--r--arch/arm/boot/dts/tegra30.dtsi29
-rw-r--r--arch/arm/include/asm/cputype.h33
-rw-r--r--arch/arm/include/asm/smp_scu.h17
-rw-r--r--arch/arm/kernel/perf_event.c16
-rw-r--r--arch/arm/kernel/perf_event_cpu.c51
-rw-r--r--arch/arm/kernel/perf_event_v6.c4
-rw-r--r--arch/arm/kernel/perf_event_v7.c18
-rw-r--r--arch/arm/kernel/perf_event_xscale.c2
-rw-r--r--arch/arm/mach-omap2/omap-smp.c2
-rw-r--r--arch/arm/mach-omap2/omap44xx.h1
-rw-r--r--arch/arm/mach-tegra/Kconfig12
-rw-r--r--arch/arm/mach-tegra/Makefile4
-rw-r--r--arch/arm/mach-tegra/board-dt-tegra114.c48
-rw-r--r--arch/arm/mach-tegra/cpuidle-tegra114.c61
-rw-r--r--arch/arm/mach-tegra/cpuidle.c3
-rw-r--r--arch/arm/mach-tegra/cpuidle.h6
-rw-r--r--arch/arm/mach-tegra/fuse.h1
-rw-r--r--arch/arm/mach-tegra/platsmp.c18
23 files changed, 474 insertions, 68 deletions
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index 3547d1495e4d..2e7a7e2de11a 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -144,7 +144,9 @@ dtb-$(CONFIG_ARCH_TEGRA) += tegra20-harmony.dtb \
144 tegra20-ventana.dtb \ 144 tegra20-ventana.dtb \
145 tegra20-whistler.dtb \ 145 tegra20-whistler.dtb \
146 tegra30-cardhu-a02.dtb \ 146 tegra30-cardhu-a02.dtb \
147 tegra30-cardhu-a04.dtb 147 tegra30-cardhu-a04.dtb \
148 tegra114-dalmore.dtb \
149 tegra114-pluto.dtb
148dtb-$(CONFIG_ARCH_VEXPRESS) += vexpress-v2p-ca5s.dtb \ 150dtb-$(CONFIG_ARCH_VEXPRESS) += vexpress-v2p-ca5s.dtb \
149 vexpress-v2p-ca9.dtb \ 151 vexpress-v2p-ca9.dtb \
150 vexpress-v2p-ca15-tc1.dtb \ 152 vexpress-v2p-ca15-tc1.dtb \
diff --git a/arch/arm/boot/dts/tegra114-dalmore.dts b/arch/arm/boot/dts/tegra114-dalmore.dts
new file mode 100644
index 000000000000..a30aca62658a
--- /dev/null
+++ b/arch/arm/boot/dts/tegra114-dalmore.dts
@@ -0,0 +1,21 @@
1/dts-v1/;
2
3/include/ "tegra114.dtsi"
4
5/ {
6 model = "NVIDIA Tegra114 Dalmore evaluation board";
7 compatible = "nvidia,dalmore", "nvidia,tegra114";
8
9 memory {
10 reg = <0x80000000 0x40000000>;
11 };
12
13 serial@70006300 {
14 status = "okay";
15 clock-frequency = <408000000>;
16 };
17
18 pmc {
19 nvidia,invert-interrupt;
20 };
21};
diff --git a/arch/arm/boot/dts/tegra114-pluto.dts b/arch/arm/boot/dts/tegra114-pluto.dts
new file mode 100644
index 000000000000..9bea8f57aa47
--- /dev/null
+++ b/arch/arm/boot/dts/tegra114-pluto.dts
@@ -0,0 +1,21 @@
1/dts-v1/;
2
3/include/ "tegra114.dtsi"
4
5/ {
6 model = "NVIDIA Tegra114 Pluto evaluation board";
7 compatible = "nvidia,pluto", "nvidia,tegra114";
8
9 memory {
10 reg = <0x80000000 0x40000000>;
11 };
12
13 serial@70006300 {
14 status = "okay";
15 clock-frequency = <408000000>;
16 };
17
18 pmc {
19 nvidia,invert-interrupt;
20 };
21};
diff --git a/arch/arm/boot/dts/tegra114.dtsi b/arch/arm/boot/dts/tegra114.dtsi
new file mode 100644
index 000000000000..1dfaf2874c57
--- /dev/null
+++ b/arch/arm/boot/dts/tegra114.dtsi
@@ -0,0 +1,153 @@
1/include/ "skeleton.dtsi"
2
3/ {
4 compatible = "nvidia,tegra114";
5 interrupt-parent = <&gic>;
6
7 gic: interrupt-controller {
8 compatible = "arm,cortex-a15-gic";
9 #interrupt-cells = <3>;
10 interrupt-controller;
11 reg = <0x50041000 0x1000>,
12 <0x50042000 0x1000>,
13 <0x50044000 0x2000>,
14 <0x50046000 0x2000>;
15 interrupts = <1 9 0xf04>;
16 };
17
18 timer@60005000 {
19 compatible = "nvidia,tegra114-timer", "nvidia,tegra20-timer";
20 reg = <0x60005000 0x400>;
21 interrupts = <0 0 0x04
22 0 1 0x04
23 0 41 0x04
24 0 42 0x04
25 0 121 0x04
26 0 122 0x04>;
27 };
28
29 tegra_car: clock {
30 compatible = "nvidia,tegra114-car, nvidia,tegra30-car";
31 reg = <0x60006000 0x1000>;
32 #clock-cells = <1>;
33 };
34
35 ahb: ahb {
36 compatible = "nvidia,tegra114-ahb", "nvidia,tegra30-ahb";
37 reg = <0x6000c004 0x14c>;
38 };
39
40 gpio: gpio {
41 compatible = "nvidia,tegra114-gpio", "nvidia,tegra30-gpio";
42 reg = <0x6000d000 0x1000>;
43 interrupts = <0 32 0x04
44 0 33 0x04
45 0 34 0x04
46 0 35 0x04
47 0 55 0x04
48 0 87 0x04
49 0 89 0x04
50 0 125 0x04>;
51 #gpio-cells = <2>;
52 gpio-controller;
53 #interrupt-cells = <2>;
54 interrupt-controller;
55 };
56
57 pinmux: pinmux {
58 compatible = "nvidia,tegra114-pinmux";
59 reg = <0x70000868 0x148 /* Pad control registers */
60 0x70003000 0x40c>; /* Mux registers */
61 };
62
63 serial@70006000 {
64 compatible = "nvidia,tegra114-uart", "nvidia,tegra20-uart";
65 reg = <0x70006000 0x40>;
66 reg-shift = <2>;
67 interrupts = <0 36 0x04>;
68 status = "disabled";
69 };
70
71 serial@70006040 {
72 compatible = "nvidia,tegra114-uart", "nvidia,tegra20-uart";
73 reg = <0x70006040 0x40>;
74 reg-shift = <2>;
75 interrupts = <0 37 0x04>;
76 status = "disabled";
77 };
78
79 serial@70006200 {
80 compatible = "nvidia,tegra114-uart", "nvidia,tegra20-uart";
81 reg = <0x70006200 0x100>;
82 reg-shift = <2>;
83 interrupts = <0 46 0x04>;
84 status = "disabled";
85 };
86
87 serial@70006300 {
88 compatible = "nvidia,tegra114-uart", "nvidia,tegra20-uart";
89 reg = <0x70006300 0x100>;
90 reg-shift = <2>;
91 interrupts = <0 90 0x04>;
92 status = "disabled";
93 };
94
95 rtc {
96 compatible = "nvidia,tegra114-rtc", "nvidia,tegra20-rtc";
97 reg = <0x7000e000 0x100>;
98 interrupts = <0 2 0x04>;
99 };
100
101 pmc {
102 compatible = "nvidia,tegra114-pmc", "nvidia,tegra30-pmc";
103 reg = <0x7000e400 0x400>;
104 };
105
106 iommu {
107 compatible = "nvidia,tegra114-smmu", "nvidia,tegra30-smmu";
108 reg = <0x7000f010 0x02c
109 0x7000f1f0 0x010
110 0x7000f228 0x074>;
111 nvidia,#asids = <4>;
112 dma-window = <0 0x40000000>;
113 nvidia,swgroups = <0x18659fe>;
114 nvidia,ahb = <&ahb>;
115 };
116
117 cpus {
118 #address-cells = <1>;
119 #size-cells = <0>;
120
121 cpu@0 {
122 device_type = "cpu";
123 compatible = "arm,cortex-a15";
124 reg = <0>;
125 };
126
127 cpu@1 {
128 device_type = "cpu";
129 compatible = "arm,cortex-a15";
130 reg = <1>;
131 };
132
133 cpu@2 {
134 device_type = "cpu";
135 compatible = "arm,cortex-a15";
136 reg = <2>;
137 };
138
139 cpu@3 {
140 device_type = "cpu";
141 compatible = "arm,cortex-a15";
142 reg = <3>;
143 };
144 };
145
146 timer {
147 compatible = "arm,armv7-timer";
148 interrupts = <1 13 0xf08>,
149 <1 14 0xf08>,
150 <1 11 0xf08>,
151 <1 10 0xf08>;
152 };
153};
diff --git a/arch/arm/boot/dts/tegra20.dtsi b/arch/arm/boot/dts/tegra20.dtsi
index 649391579871..2e7c83c7253b 100644
--- a/arch/arm/boot/dts/tegra20.dtsi
+++ b/arch/arm/boot/dts/tegra20.dtsi
@@ -489,6 +489,23 @@
489 status = "disabled"; 489 status = "disabled";
490 }; 490 };
491 491
492 cpus {
493 #address-cells = <1>;
494 #size-cells = <0>;
495
496 cpu@0 {
497 device_type = "cpu";
498 compatible = "arm,cortex-a9";
499 reg = <0>;
500 };
501
502 cpu@1 {
503 device_type = "cpu";
504 compatible = "arm,cortex-a9";
505 reg = <1>;
506 };
507 };
508
492 pmu { 509 pmu {
493 compatible = "arm,cortex-a9-pmu"; 510 compatible = "arm,cortex-a9-pmu";
494 interrupts = <0 56 0x04 511 interrupts = <0 56 0x04
diff --git a/arch/arm/boot/dts/tegra30.dtsi b/arch/arm/boot/dts/tegra30.dtsi
index b1483d925878..2de8b919d78c 100644
--- a/arch/arm/boot/dts/tegra30.dtsi
+++ b/arch/arm/boot/dts/tegra30.dtsi
@@ -506,6 +506,35 @@
506 status = "disabled"; 506 status = "disabled";
507 }; 507 };
508 508
509 cpus {
510 #address-cells = <1>;
511 #size-cells = <0>;
512
513 cpu@0 {
514 device_type = "cpu";
515 compatible = "arm,cortex-a9";
516 reg = <0>;
517 };
518
519 cpu@1 {
520 device_type = "cpu";
521 compatible = "arm,cortex-a9";
522 reg = <1>;
523 };
524
525 cpu@2 {
526 device_type = "cpu";
527 compatible = "arm,cortex-a9";
528 reg = <2>;
529 };
530
531 cpu@3 {
532 device_type = "cpu";
533 compatible = "arm,cortex-a9";
534 reg = <3>;
535 };
536 };
537
509 pmu { 538 pmu {
510 compatible = "arm,cortex-a9-pmu"; 539 compatible = "arm,cortex-a9-pmu";
511 interrupts = <0 144 0x04 540 interrupts = <0 144 0x04
diff --git a/arch/arm/include/asm/cputype.h b/arch/arm/include/asm/cputype.h
index a59dcb5ab5fc..ad41ec2471e8 100644
--- a/arch/arm/include/asm/cputype.h
+++ b/arch/arm/include/asm/cputype.h
@@ -64,6 +64,24 @@ extern unsigned int processor_id;
64#define read_cpuid_ext(reg) 0 64#define read_cpuid_ext(reg) 0
65#endif 65#endif
66 66
67#define ARM_CPU_IMP_ARM 0x41
68#define ARM_CPU_IMP_INTEL 0x69
69
70#define ARM_CPU_PART_ARM1136 0xB360
71#define ARM_CPU_PART_ARM1156 0xB560
72#define ARM_CPU_PART_ARM1176 0xB760
73#define ARM_CPU_PART_ARM11MPCORE 0xB020
74#define ARM_CPU_PART_CORTEX_A8 0xC080
75#define ARM_CPU_PART_CORTEX_A9 0xC090
76#define ARM_CPU_PART_CORTEX_A5 0xC050
77#define ARM_CPU_PART_CORTEX_A15 0xC0F0
78#define ARM_CPU_PART_CORTEX_A7 0xC070
79
80#define ARM_CPU_XSCALE_ARCH_MASK 0xe000
81#define ARM_CPU_XSCALE_ARCH_V1 0x2000
82#define ARM_CPU_XSCALE_ARCH_V2 0x4000
83#define ARM_CPU_XSCALE_ARCH_V3 0x6000
84
67/* 85/*
68 * The CPU ID never changes at run time, so we might as well tell the 86 * The CPU ID never changes at run time, so we might as well tell the
69 * compiler that it's constant. Use this function to read the CPU ID 87 * compiler that it's constant. Use this function to read the CPU ID
@@ -74,6 +92,21 @@ static inline unsigned int __attribute_const__ read_cpuid_id(void)
74 return read_cpuid(CPUID_ID); 92 return read_cpuid(CPUID_ID);
75} 93}
76 94
95static inline unsigned int __attribute_const__ read_cpuid_implementor(void)
96{
97 return (read_cpuid_id() & 0xFF000000) >> 24;
98}
99
100static inline unsigned int __attribute_const__ read_cpuid_part_number(void)
101{
102 return read_cpuid_id() & 0xFFF0;
103}
104
105static inline unsigned int __attribute_const__ xscale_cpu_arch_version(void)
106{
107 return read_cpuid_part_number() & ARM_CPU_XSCALE_ARCH_MASK;
108}
109
77static inline unsigned int __attribute_const__ read_cpuid_cachetype(void) 110static inline unsigned int __attribute_const__ read_cpuid_cachetype(void)
78{ 111{
79 return read_cpuid(CPUID_CACHETYPE); 112 return read_cpuid(CPUID_CACHETYPE);
diff --git a/arch/arm/include/asm/smp_scu.h b/arch/arm/include/asm/smp_scu.h
index 4eb6d005ffaa..006f02681cd8 100644
--- a/arch/arm/include/asm/smp_scu.h
+++ b/arch/arm/include/asm/smp_scu.h
@@ -6,6 +6,23 @@
6#define SCU_PM_POWEROFF 3 6#define SCU_PM_POWEROFF 3
7 7
8#ifndef __ASSEMBLER__ 8#ifndef __ASSEMBLER__
9
10#include <asm/cputype.h>
11
12static inline bool scu_a9_has_base(void)
13{
14 return read_cpuid_part_number() == ARM_CPU_PART_CORTEX_A9;
15}
16
17static inline unsigned long scu_a9_get_base(void)
18{
19 unsigned long pa;
20
21 asm("mrc p15, 4, %0, c15, c0, 0" : "=r" (pa));
22
23 return pa;
24}
25
9unsigned int scu_get_core_count(void __iomem *); 26unsigned int scu_get_core_count(void __iomem *);
10void scu_enable(void __iomem *); 27void scu_enable(void __iomem *);
11int scu_power_mode(void __iomem *, unsigned int); 28int scu_power_mode(void __iomem *, unsigned int);
diff --git a/arch/arm/kernel/perf_event.c b/arch/arm/kernel/perf_event.c
index f9e8657dd241..31e0eb353cd8 100644
--- a/arch/arm/kernel/perf_event.c
+++ b/arch/arm/kernel/perf_event.c
@@ -149,12 +149,6 @@ again:
149static void 149static void
150armpmu_read(struct perf_event *event) 150armpmu_read(struct perf_event *event)
151{ 151{
152 struct hw_perf_event *hwc = &event->hw;
153
154 /* Don't read disabled counters! */
155 if (hwc->idx < 0)
156 return;
157
158 armpmu_event_update(event); 152 armpmu_event_update(event);
159} 153}
160 154
@@ -207,8 +201,6 @@ armpmu_del(struct perf_event *event, int flags)
207 struct hw_perf_event *hwc = &event->hw; 201 struct hw_perf_event *hwc = &event->hw;
208 int idx = hwc->idx; 202 int idx = hwc->idx;
209 203
210 WARN_ON(idx < 0);
211
212 armpmu_stop(event, PERF_EF_UPDATE); 204 armpmu_stop(event, PERF_EF_UPDATE);
213 hw_events->events[idx] = NULL; 205 hw_events->events[idx] = NULL;
214 clear_bit(idx, hw_events->used_mask); 206 clear_bit(idx, hw_events->used_mask);
@@ -358,7 +350,7 @@ __hw_perf_event_init(struct perf_event *event)
358{ 350{
359 struct arm_pmu *armpmu = to_arm_pmu(event->pmu); 351 struct arm_pmu *armpmu = to_arm_pmu(event->pmu);
360 struct hw_perf_event *hwc = &event->hw; 352 struct hw_perf_event *hwc = &event->hw;
361 int mapping, err; 353 int mapping;
362 354
363 mapping = armpmu->map_event(event); 355 mapping = armpmu->map_event(event);
364 356
@@ -407,14 +399,12 @@ __hw_perf_event_init(struct perf_event *event)
407 local64_set(&hwc->period_left, hwc->sample_period); 399 local64_set(&hwc->period_left, hwc->sample_period);
408 } 400 }
409 401
410 err = 0;
411 if (event->group_leader != event) { 402 if (event->group_leader != event) {
412 err = validate_group(event); 403 if (validate_group(event) != 0);
413 if (err)
414 return -EINVAL; 404 return -EINVAL;
415 } 405 }
416 406
417 return err; 407 return 0;
418} 408}
419 409
420static int armpmu_event_init(struct perf_event *event) 410static int armpmu_event_init(struct perf_event *event)
diff --git a/arch/arm/kernel/perf_event_cpu.c b/arch/arm/kernel/perf_event_cpu.c
index 5f6620684e25..1f2740e3dbc0 100644
--- a/arch/arm/kernel/perf_event_cpu.c
+++ b/arch/arm/kernel/perf_event_cpu.c
@@ -147,7 +147,7 @@ static void cpu_pmu_init(struct arm_pmu *cpu_pmu)
147 cpu_pmu->free_irq = cpu_pmu_free_irq; 147 cpu_pmu->free_irq = cpu_pmu_free_irq;
148 148
149 /* Ensure the PMU has sane values out of reset. */ 149 /* Ensure the PMU has sane values out of reset. */
150 if (cpu_pmu && cpu_pmu->reset) 150 if (cpu_pmu->reset)
151 on_each_cpu(cpu_pmu->reset, cpu_pmu, 1); 151 on_each_cpu(cpu_pmu->reset, cpu_pmu, 1);
152} 152}
153 153
@@ -201,48 +201,46 @@ static struct platform_device_id cpu_pmu_plat_device_ids[] = {
201static int probe_current_pmu(struct arm_pmu *pmu) 201static int probe_current_pmu(struct arm_pmu *pmu)
202{ 202{
203 int cpu = get_cpu(); 203 int cpu = get_cpu();
204 unsigned long cpuid = read_cpuid_id(); 204 unsigned long implementor = read_cpuid_implementor();
205 unsigned long implementor = (cpuid & 0xFF000000) >> 24; 205 unsigned long part_number = read_cpuid_part_number();
206 unsigned long part_number = (cpuid & 0xFFF0);
207 int ret = -ENODEV; 206 int ret = -ENODEV;
208 207
209 pr_info("probing PMU on CPU %d\n", cpu); 208 pr_info("probing PMU on CPU %d\n", cpu);
210 209
211 /* ARM Ltd CPUs. */ 210 /* ARM Ltd CPUs. */
212 if (0x41 == implementor) { 211 if (implementor == ARM_CPU_IMP_ARM) {
213 switch (part_number) { 212 switch (part_number) {
214 case 0xB360: /* ARM1136 */ 213 case ARM_CPU_PART_ARM1136:
215 case 0xB560: /* ARM1156 */ 214 case ARM_CPU_PART_ARM1156:
216 case 0xB760: /* ARM1176 */ 215 case ARM_CPU_PART_ARM1176:
217 ret = armv6pmu_init(pmu); 216 ret = armv6pmu_init(pmu);
218 break; 217 break;
219 case 0xB020: /* ARM11mpcore */ 218 case ARM_CPU_PART_ARM11MPCORE:
220 ret = armv6mpcore_pmu_init(pmu); 219 ret = armv6mpcore_pmu_init(pmu);
221 break; 220 break;
222 case 0xC080: /* Cortex-A8 */ 221 case ARM_CPU_PART_CORTEX_A8:
223 ret = armv7_a8_pmu_init(pmu); 222 ret = armv7_a8_pmu_init(pmu);
224 break; 223 break;
225 case 0xC090: /* Cortex-A9 */ 224 case ARM_CPU_PART_CORTEX_A9:
226 ret = armv7_a9_pmu_init(pmu); 225 ret = armv7_a9_pmu_init(pmu);
227 break; 226 break;
228 case 0xC050: /* Cortex-A5 */ 227 case ARM_CPU_PART_CORTEX_A5:
229 ret = armv7_a5_pmu_init(pmu); 228 ret = armv7_a5_pmu_init(pmu);
230 break; 229 break;
231 case 0xC0F0: /* Cortex-A15 */ 230 case ARM_CPU_PART_CORTEX_A15:
232 ret = armv7_a15_pmu_init(pmu); 231 ret = armv7_a15_pmu_init(pmu);
233 break; 232 break;
234 case 0xC070: /* Cortex-A7 */ 233 case ARM_CPU_PART_CORTEX_A7:
235 ret = armv7_a7_pmu_init(pmu); 234 ret = armv7_a7_pmu_init(pmu);
236 break; 235 break;
237 } 236 }
238 /* Intel CPUs [xscale]. */ 237 /* Intel CPUs [xscale]. */
239 } else if (0x69 == implementor) { 238 } else if (implementor == ARM_CPU_IMP_INTEL) {
240 part_number = (cpuid >> 13) & 0x7; 239 switch (xscale_cpu_arch_version()) {
241 switch (part_number) { 240 case ARM_CPU_XSCALE_ARCH_V1:
242 case 1:
243 ret = xscale1pmu_init(pmu); 241 ret = xscale1pmu_init(pmu);
244 break; 242 break;
245 case 2: 243 case ARM_CPU_XSCALE_ARCH_V2:
246 ret = xscale2pmu_init(pmu); 244 ret = xscale2pmu_init(pmu);
247 break; 245 break;
248 } 246 }
@@ -279,17 +277,22 @@ static int cpu_pmu_device_probe(struct platform_device *pdev)
279 } 277 }
280 278
281 if (ret) { 279 if (ret) {
282 pr_info("failed to register PMU devices!"); 280 pr_info("failed to probe PMU!");
283 kfree(pmu); 281 goto out_free;
284 return ret;
285 } 282 }
286 283
287 cpu_pmu = pmu; 284 cpu_pmu = pmu;
288 cpu_pmu->plat_device = pdev; 285 cpu_pmu->plat_device = pdev;
289 cpu_pmu_init(cpu_pmu); 286 cpu_pmu_init(cpu_pmu);
290 armpmu_register(cpu_pmu, PERF_TYPE_RAW); 287 ret = armpmu_register(cpu_pmu, PERF_TYPE_RAW);
291 288
292 return 0; 289 if (!ret)
290 return 0;
291
292out_free:
293 pr_info("failed to register PMU devices!");
294 kfree(pmu);
295 return ret;
293} 296}
294 297
295static struct platform_driver cpu_pmu_driver = { 298static struct platform_driver cpu_pmu_driver = {
diff --git a/arch/arm/kernel/perf_event_v6.c b/arch/arm/kernel/perf_event_v6.c
index 041d0526a288..03664b0e8fa4 100644
--- a/arch/arm/kernel/perf_event_v6.c
+++ b/arch/arm/kernel/perf_event_v6.c
@@ -106,7 +106,7 @@ static const unsigned armv6_perf_cache_map[PERF_COUNT_HW_CACHE_MAX]
106 }, 106 },
107 [C(OP_WRITE)] = { 107 [C(OP_WRITE)] = {
108 [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, 108 [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED,
109 [C(RESULT_MISS)] = ARMV6_PERFCTR_ICACHE_MISS, 109 [C(RESULT_MISS)] = CACHE_OP_UNSUPPORTED,
110 }, 110 },
111 [C(OP_PREFETCH)] = { 111 [C(OP_PREFETCH)] = {
112 [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, 112 [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED,
@@ -259,7 +259,7 @@ static const unsigned armv6mpcore_perf_cache_map[PERF_COUNT_HW_CACHE_MAX]
259 }, 259 },
260 [C(OP_WRITE)] = { 260 [C(OP_WRITE)] = {
261 [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, 261 [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED,
262 [C(RESULT_MISS)] = ARMV6MPCORE_PERFCTR_ICACHE_MISS, 262 [C(RESULT_MISS)] = CACHE_OP_UNSUPPORTED,
263 }, 263 },
264 [C(OP_PREFETCH)] = { 264 [C(OP_PREFETCH)] = {
265 [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, 265 [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED,
diff --git a/arch/arm/kernel/perf_event_v7.c b/arch/arm/kernel/perf_event_v7.c
index 4fbc757d9cff..8c79a9e70b83 100644
--- a/arch/arm/kernel/perf_event_v7.c
+++ b/arch/arm/kernel/perf_event_v7.c
@@ -157,8 +157,8 @@ static const unsigned armv7_a8_perf_cache_map[PERF_COUNT_HW_CACHE_MAX]
157 [C(RESULT_MISS)] = ARMV7_PERFCTR_L1_ICACHE_REFILL, 157 [C(RESULT_MISS)] = ARMV7_PERFCTR_L1_ICACHE_REFILL,
158 }, 158 },
159 [C(OP_WRITE)] = { 159 [C(OP_WRITE)] = {
160 [C(RESULT_ACCESS)] = ARMV7_A8_PERFCTR_L1_ICACHE_ACCESS, 160 [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED,
161 [C(RESULT_MISS)] = ARMV7_PERFCTR_L1_ICACHE_REFILL, 161 [C(RESULT_MISS)] = CACHE_OP_UNSUPPORTED,
162 }, 162 },
163 [C(OP_PREFETCH)] = { 163 [C(OP_PREFETCH)] = {
164 [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, 164 [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED,
@@ -282,7 +282,7 @@ static const unsigned armv7_a9_perf_cache_map[PERF_COUNT_HW_CACHE_MAX]
282 }, 282 },
283 [C(OP_WRITE)] = { 283 [C(OP_WRITE)] = {
284 [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, 284 [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED,
285 [C(RESULT_MISS)] = ARMV7_PERFCTR_L1_ICACHE_REFILL, 285 [C(RESULT_MISS)] = CACHE_OP_UNSUPPORTED,
286 }, 286 },
287 [C(OP_PREFETCH)] = { 287 [C(OP_PREFETCH)] = {
288 [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, 288 [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED,
@@ -399,8 +399,8 @@ static const unsigned armv7_a5_perf_cache_map[PERF_COUNT_HW_CACHE_MAX]
399 [C(RESULT_MISS)] = ARMV7_PERFCTR_L1_ICACHE_REFILL, 399 [C(RESULT_MISS)] = ARMV7_PERFCTR_L1_ICACHE_REFILL,
400 }, 400 },
401 [C(OP_WRITE)] = { 401 [C(OP_WRITE)] = {
402 [C(RESULT_ACCESS)] = ARMV7_PERFCTR_L1_ICACHE_ACCESS, 402 [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED,
403 [C(RESULT_MISS)] = ARMV7_PERFCTR_L1_ICACHE_REFILL, 403 [C(RESULT_MISS)] = CACHE_OP_UNSUPPORTED,
404 }, 404 },
405 /* 405 /*
406 * The prefetch counters don't differentiate between the I 406 * The prefetch counters don't differentiate between the I
@@ -527,8 +527,8 @@ static const unsigned armv7_a15_perf_cache_map[PERF_COUNT_HW_CACHE_MAX]
527 [C(RESULT_MISS)] = ARMV7_PERFCTR_L1_ICACHE_REFILL, 527 [C(RESULT_MISS)] = ARMV7_PERFCTR_L1_ICACHE_REFILL,
528 }, 528 },
529 [C(OP_WRITE)] = { 529 [C(OP_WRITE)] = {
530 [C(RESULT_ACCESS)] = ARMV7_PERFCTR_L1_ICACHE_ACCESS, 530 [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED,
531 [C(RESULT_MISS)] = ARMV7_PERFCTR_L1_ICACHE_REFILL, 531 [C(RESULT_MISS)] = CACHE_OP_UNSUPPORTED,
532 }, 532 },
533 [C(OP_PREFETCH)] = { 533 [C(OP_PREFETCH)] = {
534 [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, 534 [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED,
@@ -651,8 +651,8 @@ static const unsigned armv7_a7_perf_cache_map[PERF_COUNT_HW_CACHE_MAX]
651 [C(RESULT_MISS)] = ARMV7_PERFCTR_L1_ICACHE_REFILL, 651 [C(RESULT_MISS)] = ARMV7_PERFCTR_L1_ICACHE_REFILL,
652 }, 652 },
653 [C(OP_WRITE)] = { 653 [C(OP_WRITE)] = {
654 [C(RESULT_ACCESS)] = ARMV7_PERFCTR_L1_ICACHE_ACCESS, 654 [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED,
655 [C(RESULT_MISS)] = ARMV7_PERFCTR_L1_ICACHE_REFILL, 655 [C(RESULT_MISS)] = CACHE_OP_UNSUPPORTED,
656 }, 656 },
657 [C(OP_PREFETCH)] = { 657 [C(OP_PREFETCH)] = {
658 [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, 658 [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED,
diff --git a/arch/arm/kernel/perf_event_xscale.c b/arch/arm/kernel/perf_event_xscale.c
index 2b0fe30ec12e..63990c42fac9 100644
--- a/arch/arm/kernel/perf_event_xscale.c
+++ b/arch/arm/kernel/perf_event_xscale.c
@@ -83,7 +83,7 @@ static const unsigned xscale_perf_cache_map[PERF_COUNT_HW_CACHE_MAX]
83 }, 83 },
84 [C(OP_WRITE)] = { 84 [C(OP_WRITE)] = {
85 [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, 85 [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED,
86 [C(RESULT_MISS)] = XSCALE_PERFCTR_ICACHE_MISS, 86 [C(RESULT_MISS)] = CACHE_OP_UNSUPPORTED,
87 }, 87 },
88 [C(OP_PREFETCH)] = { 88 [C(OP_PREFETCH)] = {
89 [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, 89 [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED,
diff --git a/arch/arm/mach-omap2/omap-smp.c b/arch/arm/mach-omap2/omap-smp.c
index 361677983af0..d9727218dd0a 100644
--- a/arch/arm/mach-omap2/omap-smp.c
+++ b/arch/arm/mach-omap2/omap-smp.c
@@ -215,7 +215,7 @@ static void __init omap4_smp_init_cpus(void)
215 * Currently we can't call ioremap here because 215 * Currently we can't call ioremap here because
216 * SoC detection won't work until after init_early. 216 * SoC detection won't work until after init_early.
217 */ 217 */
218 scu_base = OMAP2_L4_IO_ADDRESS(OMAP44XX_SCU_BASE); 218 scu_base = OMAP2_L4_IO_ADDRESS(scu_a9_get_base());
219 BUG_ON(!scu_base); 219 BUG_ON(!scu_base);
220 ncores = scu_get_core_count(scu_base); 220 ncores = scu_get_core_count(scu_base);
221 } else if (cpu_id == CPU_CORTEX_A15) { 221 } else if (cpu_id == CPU_CORTEX_A15) {
diff --git a/arch/arm/mach-omap2/omap44xx.h b/arch/arm/mach-omap2/omap44xx.h
index 43b927b2e2e8..8a515bb74639 100644
--- a/arch/arm/mach-omap2/omap44xx.h
+++ b/arch/arm/mach-omap2/omap44xx.h
@@ -40,7 +40,6 @@
40#define OMAP44XX_GIC_DIST_BASE 0x48241000 40#define OMAP44XX_GIC_DIST_BASE 0x48241000
41#define OMAP44XX_GIC_CPU_BASE 0x48240100 41#define OMAP44XX_GIC_CPU_BASE 0x48240100
42#define OMAP44XX_IRQ_GIC_START 32 42#define OMAP44XX_IRQ_GIC_START 32
43#define OMAP44XX_SCU_BASE 0x48240000
44#define OMAP44XX_LOCAL_TWD_BASE 0x48240600 43#define OMAP44XX_LOCAL_TWD_BASE 0x48240600
45#define OMAP44XX_L2CACHE_BASE 0x48242000 44#define OMAP44XX_L2CACHE_BASE 0x48242000
46#define OMAP44XX_WKUPGEN_BASE 0x48281000 45#define OMAP44XX_WKUPGEN_BASE 0x48281000
diff --git a/arch/arm/mach-tegra/Kconfig b/arch/arm/mach-tegra/Kconfig
index abc688fd4807..bde8197c8db8 100644
--- a/arch/arm/mach-tegra/Kconfig
+++ b/arch/arm/mach-tegra/Kconfig
@@ -45,6 +45,18 @@ config ARCH_TEGRA_3x_SOC
45 Support for NVIDIA Tegra T30 processor family, based on the 45 Support for NVIDIA Tegra T30 processor family, based on the
46 ARM CortexA9MP CPU and the ARM PL310 L2 cache controller 46 ARM CortexA9MP CPU and the ARM PL310 L2 cache controller
47 47
48config ARCH_TEGRA_114_SOC
49 bool "Enable support for Tegra114 family"
50 select ARM_GIC
51 select CPU_V7
52 select ARM_L1_CACHE_SHIFT_6
53 select ARM_ARCH_TIMER
54 select PINCTRL
55 select PINCTRL_TEGRA114
56 help
57 Support for NVIDIA Tegra T114 processor family, based on the
58 ARM CortexA15MP CPU
59
48config TEGRA_PCI 60config TEGRA_PCI
49 bool "PCI Express support" 61 bool "PCI Express support"
50 depends on ARCH_TEGRA_2x_SOC 62 depends on ARCH_TEGRA_2x_SOC
diff --git a/arch/arm/mach-tegra/Makefile b/arch/arm/mach-tegra/Makefile
index 6018a05e808c..f6b46ae2b7f8 100644
--- a/arch/arm/mach-tegra/Makefile
+++ b/arch/arm/mach-tegra/Makefile
@@ -29,6 +29,10 @@ obj-$(CONFIG_TEGRA_PCI) += pcie.o
29 29
30obj-$(CONFIG_ARCH_TEGRA_2x_SOC) += board-dt-tegra20.o 30obj-$(CONFIG_ARCH_TEGRA_2x_SOC) += board-dt-tegra20.o
31obj-$(CONFIG_ARCH_TEGRA_3x_SOC) += board-dt-tegra30.o 31obj-$(CONFIG_ARCH_TEGRA_3x_SOC) += board-dt-tegra30.o
32obj-$(CONFIG_ARCH_TEGRA_114_SOC) += board-dt-tegra114.o
33ifeq ($(CONFIG_CPU_IDLE),y)
34obj-$(CONFIG_ARCH_TEGRA_114_SOC) += cpuidle-tegra114.o
35endif
32 36
33obj-$(CONFIG_ARCH_TEGRA_2x_SOC) += board-harmony-pcie.o 37obj-$(CONFIG_ARCH_TEGRA_2x_SOC) += board-harmony-pcie.o
34 38
diff --git a/arch/arm/mach-tegra/board-dt-tegra114.c b/arch/arm/mach-tegra/board-dt-tegra114.c
new file mode 100644
index 000000000000..3ed17ce884df
--- /dev/null
+++ b/arch/arm/mach-tegra/board-dt-tegra114.c
@@ -0,0 +1,48 @@
1/*
2 * NVIDIA Tegra114 device tree board support
3 *
4 * Copyright (C) 2013 NVIDIA Corporation
5 *
6 * This software is licensed under the terms of the GNU General Public
7 * License version 2, as published by the Free Software Foundation, and
8 * may be copied, distributed, and modified under those terms.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 */
16
17#include <linux/of.h>
18#include <linux/of_platform.h>
19#include <linux/clocksource.h>
20
21#include <asm/mach/arch.h>
22#include <asm/hardware/gic.h>
23
24#include "board.h"
25#include "common.h"
26
27static void __init tegra114_dt_init(void)
28{
29 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
30}
31
32static const char * const tegra114_dt_board_compat[] = {
33 "nvidia,tegra114",
34 NULL,
35};
36
37DT_MACHINE_START(TEGRA114_DT, "NVIDIA Tegra114 (Flattened Device Tree)")
38 .smp = smp_ops(tegra_smp_ops),
39 .map_io = tegra_map_common_io,
40 .init_early = tegra30_init_early,
41 .init_irq = tegra_dt_init_irq,
42 .handle_irq = gic_handle_irq,
43 .init_time = clocksource_of_init,
44 .init_machine = tegra114_dt_init,
45 .init_late = tegra_init_late,
46 .restart = tegra_assert_system_reset,
47 .dt_compat = tegra114_dt_board_compat,
48MACHINE_END
diff --git a/arch/arm/mach-tegra/cpuidle-tegra114.c b/arch/arm/mach-tegra/cpuidle-tegra114.c
new file mode 100644
index 000000000000..0f4e8c483b34
--- /dev/null
+++ b/arch/arm/mach-tegra/cpuidle-tegra114.c
@@ -0,0 +1,61 @@
1/*
2 * Copyright (c) 2013, NVIDIA Corporation. All rights reserved.
3 *
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms and conditions of the GNU General Public License,
6 * version 2, as published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope it will be useful, but WITHOUT
9 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
11 * more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17#include <linux/kernel.h>
18#include <linux/module.h>
19#include <linux/cpuidle.h>
20
21#include <asm/cpuidle.h>
22
23static struct cpuidle_driver tegra_idle_driver = {
24 .name = "tegra_idle",
25 .owner = THIS_MODULE,
26 .en_core_tk_irqen = 1,
27 .state_count = 1,
28 .states = {
29 [0] = ARM_CPUIDLE_WFI_STATE_PWR(600),
30 },
31};
32
33static DEFINE_PER_CPU(struct cpuidle_device, tegra_idle_device);
34
35int __init tegra114_cpuidle_init(void)
36{
37 int ret;
38 unsigned int cpu;
39 struct cpuidle_device *dev;
40 struct cpuidle_driver *drv = &tegra_idle_driver;
41
42 ret = cpuidle_register_driver(&tegra_idle_driver);
43 if (ret) {
44 pr_err("CPUidle driver registration failed\n");
45 return ret;
46 }
47
48 for_each_possible_cpu(cpu) {
49 dev = &per_cpu(tegra_idle_device, cpu);
50 dev->cpu = cpu;
51
52 dev->state_count = drv->state_count;
53 ret = cpuidle_register_device(dev);
54 if (ret) {
55 pr_err("CPU%u: CPUidle device registration failed\n",
56 cpu);
57 return ret;
58 }
59 }
60 return 0;
61}
diff --git a/arch/arm/mach-tegra/cpuidle.c b/arch/arm/mach-tegra/cpuidle.c
index d0651397aec7..4b744c4661e2 100644
--- a/arch/arm/mach-tegra/cpuidle.c
+++ b/arch/arm/mach-tegra/cpuidle.c
@@ -38,6 +38,9 @@ static int __init tegra_cpuidle_init(void)
38 case TEGRA30: 38 case TEGRA30:
39 ret = tegra30_cpuidle_init(); 39 ret = tegra30_cpuidle_init();
40 break; 40 break;
41 case TEGRA114:
42 ret = tegra114_cpuidle_init();
43 break;
41 default: 44 default:
42 ret = -ENODEV; 45 ret = -ENODEV;
43 break; 46 break;
diff --git a/arch/arm/mach-tegra/cpuidle.h b/arch/arm/mach-tegra/cpuidle.h
index 496204d34e55..d733f75d0208 100644
--- a/arch/arm/mach-tegra/cpuidle.h
+++ b/arch/arm/mach-tegra/cpuidle.h
@@ -29,4 +29,10 @@ int tegra30_cpuidle_init(void);
29static inline int tegra30_cpuidle_init(void) { return -ENODEV; } 29static inline int tegra30_cpuidle_init(void) { return -ENODEV; }
30#endif 30#endif
31 31
32#ifdef CONFIG_ARCH_TEGRA_114_SOC
33int tegra114_cpuidle_init(void);
34#else
35static inline int tegra114_cpuidle_init(void) { return -ENODEV; }
36#endif
37
32#endif 38#endif
diff --git a/arch/arm/mach-tegra/fuse.h b/arch/arm/mach-tegra/fuse.h
index ff1383dd61a7..da78434678c7 100644
--- a/arch/arm/mach-tegra/fuse.h
+++ b/arch/arm/mach-tegra/fuse.h
@@ -37,6 +37,7 @@ enum tegra_revision {
37 37
38#define TEGRA20 0x20 38#define TEGRA20 0x20
39#define TEGRA30 0x30 39#define TEGRA30 0x30
40#define TEGRA114 0x35
40 41
41extern int tegra_sku_id; 42extern int tegra_sku_id;
42extern int tegra_cpu_process_id; 43extern int tegra_cpu_process_id;
diff --git a/arch/arm/mach-tegra/platsmp.c b/arch/arm/mach-tegra/platsmp.c
index c72e249e33b0..f06fc51cc27a 100644
--- a/arch/arm/mach-tegra/platsmp.c
+++ b/arch/arm/mach-tegra/platsmp.c
@@ -38,7 +38,6 @@
38extern void tegra_secondary_startup(void); 38extern void tegra_secondary_startup(void);
39 39
40static cpumask_t tegra_cpu_init_mask; 40static cpumask_t tegra_cpu_init_mask;
41static void __iomem *scu_base = IO_ADDRESS(TEGRA_ARM_PERIF_BASE);
42 41
43#define EVP_CPU_RESET_VECTOR \ 42#define EVP_CPU_RESET_VECTOR \
44 (IO_ADDRESS(TEGRA_EXCEPTION_VECTORS_BASE) + 0x100) 43 (IO_ADDRESS(TEGRA_EXCEPTION_VECTORS_BASE) + 0x100)
@@ -177,22 +176,8 @@ done:
177 return status; 176 return status;
178} 177}
179 178
180/*
181 * Initialise the CPU possible map early - this describes the CPUs
182 * which may be present or become present in the system.
183 */
184static void __init tegra_smp_init_cpus(void) 179static void __init tegra_smp_init_cpus(void)
185{ 180{
186 unsigned int i, ncores = scu_get_core_count(scu_base);
187
188 if (ncores > nr_cpu_ids) {
189 pr_warn("SMP: %u cores greater than maximum (%u), clipping\n",
190 ncores, nr_cpu_ids);
191 ncores = nr_cpu_ids;
192 }
193
194 for (i = 0; i < ncores; i++)
195 set_cpu_possible(i, true);
196} 181}
197 182
198static void __init tegra_smp_prepare_cpus(unsigned int max_cpus) 183static void __init tegra_smp_prepare_cpus(unsigned int max_cpus)
@@ -200,7 +185,8 @@ static void __init tegra_smp_prepare_cpus(unsigned int max_cpus)
200 /* Always mark the boot CPU (CPU0) as initialized. */ 185 /* Always mark the boot CPU (CPU0) as initialized. */
201 cpumask_set_cpu(0, &tegra_cpu_init_mask); 186 cpumask_set_cpu(0, &tegra_cpu_init_mask);
202 187
203 scu_enable(scu_base); 188 if (scu_a9_has_base())
189 scu_enable(IO_ADDRESS(scu_a9_get_base()));
204} 190}
205 191
206struct smp_operations tegra_smp_ops __initdata = { 192struct smp_operations tegra_smp_ops __initdata = {