From e28fd3626fb740a6b7679bef8a56d109bfa90014 Mon Sep 17 00:00:00 2001 From: Joseph Lo Date: Fri, 21 Nov 2014 08:54:15 +0800 Subject: tegra132: psci: add cpu_on/off support The CPU on/off functions are the method for the Kernel to support CPU hot-plug function in PSCI. To support this, we still need flow controller support to capture the WFI from the CPU and inform PMC to power gate the CPU core. On the other path, we turn on the CPU by toggling the PMC and use flow controller to let go when the power is steady. BUG=chrome-os-partner:32136 BRANCH=None TEST=built the kernel with PSCI enabled, check both of the CPUs are coming up, test the CPU hot-plug is working on Ryu Change-Id: If2c529b6719c5747d5aea95fb5049b2d7353ff17 Signed-off-by: Patrick Georgi Original-Commit-Id: 0f078e89daad1c4d8b342a395f36b3e922af66f5 Original-Change-Id: Ie49940adb2966dcc9967d2fcc9b1e0dcd6d98743 Original-Signed-off-by: Joseph Lo Original-Reviewed-on: https://chromium-review.googlesource.com/231267 Original-Reviewed-by: Aaron Durbin Reviewed-on: http://review.coreboot.org/9542 Reviewed-by: Paul Menzel Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer --- src/soc/nvidia/tegra132/include/soc/flow_ctrl.h | 26 +++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 src/soc/nvidia/tegra132/include/soc/flow_ctrl.h (limited to 'src/soc/nvidia/tegra132/include') diff --git a/src/soc/nvidia/tegra132/include/soc/flow_ctrl.h b/src/soc/nvidia/tegra132/include/soc/flow_ctrl.h new file mode 100644 index 0000000000..28fe8466fd --- /dev/null +++ b/src/soc/nvidia/tegra132/include/soc/flow_ctrl.h @@ -0,0 +1,26 @@ +/* + * This file is part of the coreboot project. + * + * Copyright (c) 2014, NVIDIA CORPORATION. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef _TEGRA132_FLOW_CTRL_H_ +#define _TEGRA132_FLOW_CTRL_H_ + +void flowctrl_cpu_off(int cpu); +void flowctrl_write_cpu_halt(int cpu, uint32_t val); + +#endif -- cgit v1.2.3