mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 19:08:57 +09:00
soc: rockchip: amp: Add 'boot-on' property assignment support
boot-on is absent or boot-on = <1>: bring up this cpu when driver probe. Signed-off-by: Joseph Chen <chenjh@rock-chips.com> Change-Id: I0157e72b53f5c35e5478408804a72bab5fd02837
This commit is contained in:
@@ -207,7 +207,7 @@ static int rockchip_amp_boot_cpus(struct device *dev,
|
||||
struct device_node *cpu_node, int idx)
|
||||
{
|
||||
u64 cpu_entry, cpu_id;
|
||||
u32 cpu_mode;
|
||||
u32 cpu_mode, boot_on;
|
||||
int ret;
|
||||
|
||||
if (idx >= CONFIG_NR_CPUS)
|
||||
@@ -233,6 +233,9 @@ static int rockchip_amp_boot_cpus(struct device *dev,
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (of_property_read_u32_array(cpu_node, "boot-on", &boot_on, 1))
|
||||
boot_on = 1; /* compatible old action */
|
||||
|
||||
cpu_boot_info[idx].entry = cpu_entry;
|
||||
cpu_boot_info[idx].mode = cpu_mode;
|
||||
cpu_boot_info[idx].cpu_id = cpu_id;
|
||||
@@ -243,10 +246,12 @@ static int rockchip_amp_boot_cpus(struct device *dev,
|
||||
return ret;
|
||||
}
|
||||
|
||||
ret = sip_smc_amp_config(RK_AMP_SUB_FUNC_CPU_ON, cpu_id, cpu_entry, 0);
|
||||
if (ret) {
|
||||
dev_warn(dev, "booting up a cpu is error(%d)!\n", ret);
|
||||
return ret;
|
||||
if (boot_on) {
|
||||
ret = sip_smc_amp_config(RK_AMP_SUB_FUNC_CPU_ON, cpu_id, cpu_entry, 0);
|
||||
if (ret) {
|
||||
dev_warn(dev, "booting up a cpu is error(%d)!\n", ret);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
cpu_boot_info[idx].en = 1;
|
||||
|
||||
Reference in New Issue
Block a user