Lines Matching +full:bcm11351 +full:- +full:cpu +full:- +full:method
2 * Copyright (C) 2014-2015 Broadcom Corporation
20 #include <linux/irqchip/irq-bcm2836.h>
40 #define OF_SECONDARY_BOOT "secondary-boot-reg"
60 return -ENXIO; in scu_a9_enable()
67 return -ENOENT; in scu_a9_enable()
74 return -ENOMEM; in scu_a9_enable()
84 static u32 secondary_boot_addr_for(unsigned int cpu) in secondary_boot_addr_for() argument
87 struct device_node *cpu_node = of_get_cpu_node(cpu, NULL); in secondary_boot_addr_for()
90 pr_err("Failed to find device tree node for CPU%u\n", cpu); in secondary_boot_addr_for()
97 pr_err("required secondary boot register not specified for CPU%u\n", in secondary_boot_addr_for()
98 cpu); in secondary_boot_addr_for()
105 static int nsp_write_lut(unsigned int cpu) in nsp_write_lut() argument
109 const u32 secondary_boot_addr = secondary_boot_addr_for(cpu); in nsp_write_lut()
112 return -EINVAL; in nsp_write_lut()
117 pr_warn("unable to ioremap SKU-ROM LUT register for cpu %u\n", cpu); in nsp_write_lut()
118 return -ENOMEM; in nsp_write_lut()
140 /* Update the CPU present map to reflect uniprocessor mode */ in bcm_smp_prepare_cpus()
141 pr_warn("failed to enable A9 SCU - disabling SMP\n"); in bcm_smp_prepare_cpus()
157 * - Encode the (hardware) CPU id with the bottom bits of the secondary
159 * - Write that value into the secondary boot register.
160 * - Generate an event to wake up the secondary CPU(s).
161 * - Wait for the secondary boot register to be re-written, which
164 static int kona_boot_secondary(unsigned int cpu, struct task_struct *idle) in kona_boot_secondary() argument
172 const u32 secondary_boot_addr = secondary_boot_addr_for(cpu); in kona_boot_secondary()
174 cpu_id = cpu_logical_map(cpu); in kona_boot_secondary()
176 pr_err("bad cpu id (%u > %u)\n", cpu_id, BOOT_ADDR_CPUID_MASK); in kona_boot_secondary()
177 return -EINVAL; in kona_boot_secondary()
181 return -EINVAL; in kona_boot_secondary()
186 pr_err("unable to map boot register for cpu %u\n", cpu_id); in kona_boot_secondary()
187 return -ENOMEM; in kona_boot_secondary()
207 timeout = local_clock() - start_clock > SECONDARY_TIMEOUT_NS; in kona_boot_secondary()
214 pr_err("timeout waiting for cpu %u to start\n", cpu_id); in kona_boot_secondary()
216 return -ENXIO; in kona_boot_secondary()
219 /* Cluster Dormant Control command to bring CPU into a running state */
222 #define CDC_CMD_REG(cpu) (CDC_CMD_OFFSET + 4*(cpu)) argument
226 * idle state. A command needs to be sent to the block to bring the CPU
229 static int bcm23550_boot_secondary(unsigned int cpu, struct task_struct *idle) in bcm23550_boot_secondary() argument
239 name = "brcm,bcm23550-cdc"; in bcm23550_boot_secondary()
243 return -ENODEV; in bcm23550_boot_secondary()
251 return -ENOMEM; in bcm23550_boot_secondary()
255 ret = kona_boot_secondary(cpu, idle); in bcm23550_boot_secondary()
259 /* Bring this CPU to RUN state so that nIRQ nFIQ in bcm23550_boot_secondary()
262 writel_relaxed(CDC_CMD, cdc_base + CDC_CMD_REG(cpu)); in bcm23550_boot_secondary()
270 static int nsp_boot_secondary(unsigned int cpu, struct task_struct *idle) in nsp_boot_secondary() argument
278 ret = nsp_write_lut(cpu); in nsp_boot_secondary()
284 /* Send a CPU wakeup interrupt to the secondary core */ in nsp_boot_secondary()
285 arch_send_wakeup_ipi_mask(cpumask_of(cpu)); in nsp_boot_secondary()
291 static int bcm2836_boot_secondary(unsigned int cpu, struct task_struct *idle) in bcm2836_boot_secondary() argument
297 name = "brcm,bcm2836-l1-intc"; in bcm2836_boot_secondary()
301 return -ENODEV; in bcm2836_boot_secondary()
309 return -ENOMEM; in bcm2836_boot_secondary()
313 intc_base + LOCAL_MAILBOX3_SET0 + 16 * cpu); in bcm2836_boot_secondary()
327 CPU_METHOD_OF_DECLARE(bcm_smp_bcm281xx, "brcm,bcm11351-cpu-method",
340 CPU_METHOD_OF_DECLARE(bcm_smp_nsp, "brcm,bcm-nsp-smp", &nsp_smp_ops);
345 CPU_METHOD_OF_DECLARE(bcm_smp_bcm2836, "brcm,bcm2836-smp", &bcm2836_smp_ops);