Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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.

+474 -68
+3 -1
arch/arm/boot/dts/Makefile
··· 144 144 tegra20-ventana.dtb \ 145 145 tegra20-whistler.dtb \ 146 146 tegra30-cardhu-a02.dtb \ 147 - tegra30-cardhu-a04.dtb 147 + tegra30-cardhu-a04.dtb \ 148 + tegra114-dalmore.dtb \ 149 + tegra114-pluto.dtb 148 150 dtb-$(CONFIG_ARCH_VEXPRESS) += vexpress-v2p-ca5s.dtb \ 149 151 vexpress-v2p-ca9.dtb \ 150 152 vexpress-v2p-ca15-tc1.dtb \
+21
arch/arm/boot/dts/tegra114-dalmore.dts
··· 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 + };
+21
arch/arm/boot/dts/tegra114-pluto.dts
··· 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 + };
+153
arch/arm/boot/dts/tegra114.dtsi
··· 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 + };
+17
arch/arm/boot/dts/tegra20.dtsi
··· 489 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 509 pmu { 493 510 compatible = "arm,cortex-a9-pmu"; 494 511 interrupts = <0 56 0x04
+29
arch/arm/boot/dts/tegra30.dtsi
··· 506 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 538 pmu { 510 539 compatible = "arm,cortex-a9-pmu"; 511 540 interrupts = <0 144 0x04
+33
arch/arm/include/asm/cputype.h
··· 64 64 #define read_cpuid_ext(reg) 0 65 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 86 * The CPU ID never changes at run time, so we might as well tell the 69 87 * compiler that it's constant. Use this function to read the CPU ID ··· 90 72 static inline unsigned int __attribute_const__ read_cpuid_id(void) 91 73 { 92 74 return read_cpuid(CPUID_ID); 75 + } 76 + 77 + static inline unsigned int __attribute_const__ read_cpuid_implementor(void) 78 + { 79 + return (read_cpuid_id() & 0xFF000000) >> 24; 80 + } 81 + 82 + static inline unsigned int __attribute_const__ read_cpuid_part_number(void) 83 + { 84 + return read_cpuid_id() & 0xFFF0; 85 + } 86 + 87 + static inline unsigned int __attribute_const__ xscale_cpu_arch_version(void) 88 + { 89 + return read_cpuid_part_number() & ARM_CPU_XSCALE_ARCH_MASK; 93 90 } 94 91 95 92 static inline unsigned int __attribute_const__ read_cpuid_cachetype(void)
+17
arch/arm/include/asm/smp_scu.h
··· 6 6 #define SCU_PM_POWEROFF 3 7 7 8 8 #ifndef __ASSEMBLER__ 9 + 10 + #include <asm/cputype.h> 11 + 12 + static inline bool scu_a9_has_base(void) 13 + { 14 + return read_cpuid_part_number() == ARM_CPU_PART_CORTEX_A9; 15 + } 16 + 17 + static 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 + 9 26 unsigned int scu_get_core_count(void __iomem *); 10 27 void scu_enable(void __iomem *); 11 28 int scu_power_mode(void __iomem *, unsigned int);
+3 -13
arch/arm/kernel/perf_event.c
··· 149 149 static void 150 150 armpmu_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 152 armpmu_event_update(event); 159 153 } 160 154 ··· 200 206 struct pmu_hw_events *hw_events = armpmu->get_hw_events(); 201 207 struct hw_perf_event *hwc = &event->hw; 202 208 int idx = hwc->idx; 203 - 204 - WARN_ON(idx < 0); 205 209 206 210 armpmu_stop(event, PERF_EF_UPDATE); 207 211 hw_events->events[idx] = NULL; ··· 350 358 { 351 359 struct arm_pmu *armpmu = to_arm_pmu(event->pmu); 352 360 struct hw_perf_event *hwc = &event->hw; 353 - int mapping, err; 361 + int mapping; 354 362 355 363 mapping = armpmu->map_event(event); 356 364 ··· 399 407 local64_set(&hwc->period_left, hwc->sample_period); 400 408 } 401 409 402 - err = 0; 403 410 if (event->group_leader != event) { 404 - err = validate_group(event); 405 - if (err) 411 + if (validate_group(event) != 0); 406 412 return -EINVAL; 407 413 } 408 414 409 - return err; 415 + return 0; 410 416 } 411 417 412 418 static int armpmu_event_init(struct perf_event *event)
+27 -24
arch/arm/kernel/perf_event_cpu.c
··· 147 147 cpu_pmu->free_irq = cpu_pmu_free_irq; 148 148 149 149 /* Ensure the PMU has sane values out of reset. */ 150 - if (cpu_pmu && cpu_pmu->reset) 150 + if (cpu_pmu->reset) 151 151 on_each_cpu(cpu_pmu->reset, cpu_pmu, 1); 152 152 } 153 153 ··· 201 201 static int probe_current_pmu(struct arm_pmu *pmu) 202 202 { 203 203 int cpu = get_cpu(); 204 - unsigned long cpuid = read_cpuid_id(); 205 - unsigned long implementor = (cpuid & 0xFF000000) >> 24; 206 - unsigned long part_number = (cpuid & 0xFFF0); 204 + unsigned long implementor = read_cpuid_implementor(); 205 + unsigned long part_number = read_cpuid_part_number(); 207 206 int ret = -ENODEV; 208 207 209 208 pr_info("probing PMU on CPU %d\n", cpu); 210 209 211 210 /* ARM Ltd CPUs. */ 212 - if (0x41 == implementor) { 211 + if (implementor == ARM_CPU_IMP_ARM) { 213 212 switch (part_number) { 214 - case 0xB360: /* ARM1136 */ 215 - case 0xB560: /* ARM1156 */ 216 - case 0xB760: /* ARM1176 */ 213 + case ARM_CPU_PART_ARM1136: 214 + case ARM_CPU_PART_ARM1156: 215 + case ARM_CPU_PART_ARM1176: 217 216 ret = armv6pmu_init(pmu); 218 217 break; 219 - case 0xB020: /* ARM11mpcore */ 218 + case ARM_CPU_PART_ARM11MPCORE: 220 219 ret = armv6mpcore_pmu_init(pmu); 221 220 break; 222 - case 0xC080: /* Cortex-A8 */ 221 + case ARM_CPU_PART_CORTEX_A8: 223 222 ret = armv7_a8_pmu_init(pmu); 224 223 break; 225 - case 0xC090: /* Cortex-A9 */ 224 + case ARM_CPU_PART_CORTEX_A9: 226 225 ret = armv7_a9_pmu_init(pmu); 227 226 break; 228 - case 0xC050: /* Cortex-A5 */ 227 + case ARM_CPU_PART_CORTEX_A5: 229 228 ret = armv7_a5_pmu_init(pmu); 230 229 break; 231 - case 0xC0F0: /* Cortex-A15 */ 230 + case ARM_CPU_PART_CORTEX_A15: 232 231 ret = armv7_a15_pmu_init(pmu); 233 232 break; 234 - case 0xC070: /* Cortex-A7 */ 233 + case ARM_CPU_PART_CORTEX_A7: 235 234 ret = armv7_a7_pmu_init(pmu); 236 235 break; 237 236 } 238 237 /* Intel CPUs [xscale]. */ 239 - } else if (0x69 == implementor) { 240 - part_number = (cpuid >> 13) & 0x7; 241 - switch (part_number) { 242 - case 1: 238 + } else if (implementor == ARM_CPU_IMP_INTEL) { 239 + switch (xscale_cpu_arch_version()) { 240 + case ARM_CPU_XSCALE_ARCH_V1: 243 241 ret = xscale1pmu_init(pmu); 244 242 break; 245 - case 2: 243 + case ARM_CPU_XSCALE_ARCH_V2: 246 244 ret = xscale2pmu_init(pmu); 247 245 break; 248 246 } ··· 277 279 } 278 280 279 281 if (ret) { 280 - pr_info("failed to register PMU devices!"); 281 - kfree(pmu); 282 - return ret; 282 + pr_info("failed to probe PMU!"); 283 + goto out_free; 283 284 } 284 285 285 286 cpu_pmu = pmu; 286 287 cpu_pmu->plat_device = pdev; 287 288 cpu_pmu_init(cpu_pmu); 288 - armpmu_register(cpu_pmu, PERF_TYPE_RAW); 289 + ret = armpmu_register(cpu_pmu, PERF_TYPE_RAW); 289 290 290 - return 0; 291 + if (!ret) 292 + return 0; 293 + 294 + out_free: 295 + pr_info("failed to register PMU devices!"); 296 + kfree(pmu); 297 + return ret; 291 298 } 292 299 293 300 static struct platform_driver cpu_pmu_driver = {
+2 -2
arch/arm/kernel/perf_event_v6.c
··· 106 106 }, 107 107 [C(OP_WRITE)] = { 108 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 111 [C(OP_PREFETCH)] = { 112 112 [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, ··· 259 259 }, 260 260 [C(OP_WRITE)] = { 261 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 264 [C(OP_PREFETCH)] = { 265 265 [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED,
+9 -9
arch/arm/kernel/perf_event_v7.c
··· 157 157 [C(RESULT_MISS)] = ARMV7_PERFCTR_L1_ICACHE_REFILL, 158 158 }, 159 159 [C(OP_WRITE)] = { 160 - [C(RESULT_ACCESS)] = ARMV7_A8_PERFCTR_L1_ICACHE_ACCESS, 161 - [C(RESULT_MISS)] = ARMV7_PERFCTR_L1_ICACHE_REFILL, 160 + [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, 161 + [C(RESULT_MISS)] = CACHE_OP_UNSUPPORTED, 162 162 }, 163 163 [C(OP_PREFETCH)] = { 164 164 [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, ··· 282 282 }, 283 283 [C(OP_WRITE)] = { 284 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 287 [C(OP_PREFETCH)] = { 288 288 [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, ··· 399 399 [C(RESULT_MISS)] = ARMV7_PERFCTR_L1_ICACHE_REFILL, 400 400 }, 401 401 [C(OP_WRITE)] = { 402 - [C(RESULT_ACCESS)] = ARMV7_PERFCTR_L1_ICACHE_ACCESS, 403 - [C(RESULT_MISS)] = ARMV7_PERFCTR_L1_ICACHE_REFILL, 402 + [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, 403 + [C(RESULT_MISS)] = CACHE_OP_UNSUPPORTED, 404 404 }, 405 405 /* 406 406 * The prefetch counters don't differentiate between the I ··· 527 527 [C(RESULT_MISS)] = ARMV7_PERFCTR_L1_ICACHE_REFILL, 528 528 }, 529 529 [C(OP_WRITE)] = { 530 - [C(RESULT_ACCESS)] = ARMV7_PERFCTR_L1_ICACHE_ACCESS, 531 - [C(RESULT_MISS)] = ARMV7_PERFCTR_L1_ICACHE_REFILL, 530 + [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, 531 + [C(RESULT_MISS)] = CACHE_OP_UNSUPPORTED, 532 532 }, 533 533 [C(OP_PREFETCH)] = { 534 534 [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, ··· 651 651 [C(RESULT_MISS)] = ARMV7_PERFCTR_L1_ICACHE_REFILL, 652 652 }, 653 653 [C(OP_WRITE)] = { 654 - [C(RESULT_ACCESS)] = ARMV7_PERFCTR_L1_ICACHE_ACCESS, 655 - [C(RESULT_MISS)] = ARMV7_PERFCTR_L1_ICACHE_REFILL, 654 + [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, 655 + [C(RESULT_MISS)] = CACHE_OP_UNSUPPORTED, 656 656 }, 657 657 [C(OP_PREFETCH)] = { 658 658 [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED,
+1 -1
arch/arm/kernel/perf_event_xscale.c
··· 83 83 }, 84 84 [C(OP_WRITE)] = { 85 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 88 [C(OP_PREFETCH)] = { 89 89 [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED,
+1 -1
arch/arm/mach-omap2/omap-smp.c
··· 215 215 * Currently we can't call ioremap here because 216 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 219 BUG_ON(!scu_base); 220 220 ncores = scu_get_core_count(scu_base); 221 221 } else if (cpu_id == CPU_CORTEX_A15) {
-1
arch/arm/mach-omap2/omap44xx.h
··· 40 40 #define OMAP44XX_GIC_DIST_BASE 0x48241000 41 41 #define OMAP44XX_GIC_CPU_BASE 0x48240100 42 42 #define OMAP44XX_IRQ_GIC_START 32 43 - #define OMAP44XX_SCU_BASE 0x48240000 44 43 #define OMAP44XX_LOCAL_TWD_BASE 0x48240600 45 44 #define OMAP44XX_L2CACHE_BASE 0x48242000 46 45 #define OMAP44XX_WKUPGEN_BASE 0x48281000
+12
arch/arm/mach-tegra/Kconfig
··· 45 45 Support for NVIDIA Tegra T30 processor family, based on the 46 46 ARM CortexA9MP CPU and the ARM PL310 L2 cache controller 47 47 48 + config 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 + 48 60 config TEGRA_PCI 49 61 bool "PCI Express support" 50 62 depends on ARCH_TEGRA_2x_SOC
+4
arch/arm/mach-tegra/Makefile
··· 29 29 30 30 obj-$(CONFIG_ARCH_TEGRA_2x_SOC) += board-dt-tegra20.o 31 31 obj-$(CONFIG_ARCH_TEGRA_3x_SOC) += board-dt-tegra30.o 32 + obj-$(CONFIG_ARCH_TEGRA_114_SOC) += board-dt-tegra114.o 33 + ifeq ($(CONFIG_CPU_IDLE),y) 34 + obj-$(CONFIG_ARCH_TEGRA_114_SOC) += cpuidle-tegra114.o 35 + endif 32 36 33 37 obj-$(CONFIG_ARCH_TEGRA_2x_SOC) += board-harmony-pcie.o 34 38
+48
arch/arm/mach-tegra/board-dt-tegra114.c
··· 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 + 27 + static void __init tegra114_dt_init(void) 28 + { 29 + of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); 30 + } 31 + 32 + static const char * const tegra114_dt_board_compat[] = { 33 + "nvidia,tegra114", 34 + NULL, 35 + }; 36 + 37 + DT_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, 48 + MACHINE_END
+61
arch/arm/mach-tegra/cpuidle-tegra114.c
··· 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 + 23 + static 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 + 33 + static DEFINE_PER_CPU(struct cpuidle_device, tegra_idle_device); 34 + 35 + int __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 + }
+3
arch/arm/mach-tegra/cpuidle.c
··· 38 38 case TEGRA30: 39 39 ret = tegra30_cpuidle_init(); 40 40 break; 41 + case TEGRA114: 42 + ret = tegra114_cpuidle_init(); 43 + break; 41 44 default: 42 45 ret = -ENODEV; 43 46 break;
+6
arch/arm/mach-tegra/cpuidle.h
··· 29 29 static inline int tegra30_cpuidle_init(void) { return -ENODEV; } 30 30 #endif 31 31 32 + #ifdef CONFIG_ARCH_TEGRA_114_SOC 33 + int tegra114_cpuidle_init(void); 34 + #else 35 + static inline int tegra114_cpuidle_init(void) { return -ENODEV; } 36 + #endif 37 + 32 38 #endif
+1
arch/arm/mach-tegra/fuse.h
··· 37 37 38 38 #define TEGRA20 0x20 39 39 #define TEGRA30 0x30 40 + #define TEGRA114 0x35 40 41 41 42 extern int tegra_sku_id; 42 43 extern int tegra_cpu_process_id;
+2 -16
arch/arm/mach-tegra/platsmp.c
··· 38 38 extern void tegra_secondary_startup(void); 39 39 40 40 static cpumask_t tegra_cpu_init_mask; 41 - static void __iomem *scu_base = IO_ADDRESS(TEGRA_ARM_PERIF_BASE); 42 41 43 42 #define EVP_CPU_RESET_VECTOR \ 44 43 (IO_ADDRESS(TEGRA_EXCEPTION_VECTORS_BASE) + 0x100) ··· 176 177 return status; 177 178 } 178 179 179 - /* 180 - * Initialise the CPU possible map early - this describes the CPUs 181 - * which may be present or become present in the system. 182 - */ 183 180 static void __init tegra_smp_init_cpus(void) 184 181 { 185 - unsigned int i, ncores = scu_get_core_count(scu_base); 186 - 187 - if (ncores > nr_cpu_ids) { 188 - pr_warn("SMP: %u cores greater than maximum (%u), clipping\n", 189 - ncores, nr_cpu_ids); 190 - ncores = nr_cpu_ids; 191 - } 192 - 193 - for (i = 0; i < ncores; i++) 194 - set_cpu_possible(i, true); 195 182 } 196 183 197 184 static void __init tegra_smp_prepare_cpus(unsigned int max_cpus) ··· 185 200 /* Always mark the boot CPU (CPU0) as initialized. */ 186 201 cpumask_set_cpu(0, &tegra_cpu_init_mask); 187 202 188 - scu_enable(scu_base); 203 + if (scu_a9_has_base()) 204 + scu_enable(IO_ADDRESS(scu_a9_get_base())); 189 205 } 190 206 191 207 struct smp_operations tegra_smp_ops __initdata = {