mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-26 08:31:13 +00:00
ARM: SoC driver updates
Driver updates for ARM SoCs. * Reset subsystem, merged through arm-soc by tradition: - Make bool drivers explicitly non-modular - New support for i.MX7 and Arria10 reset controllers * PATA driver for Palmchip BK371 (acked by Tejun) * Power domain drivers for i.MX (GPC, GPCv2) - Moved out of mach-imx for GPC - Bunch of tweaks, fixes, etc * PMC support for Tegra186 * SoC detection support for Renesas RZ/G1H and RZ/G1N * Move Tegra flow controller driver from mach directory to drivers/soc - (Power management / CPU power driver) * Misc smaller tweaks for other platforms -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAABAgAGBQJZEAZuAAoJEIwa5zzehBx3jCEP/1dcXY746rQoOMUDPyWF5+SZ w0l8dHUQhu4WjNGryfb9DbyiE3d6xlvPVzr9AJeAg6c5I+iikgeogS0XHNpWCU96 FR1Ftb6zo8DIaGognBL9bK5HM7NXjd/EKBkMk0Ggs9/NRFUnakkbpdfivsl2BACx mCGo15+kbgQSQsMJtd5/KfsgY5h7lXJG0fZ8LV5E1E5BSa/AofZtKVgCKfhbd0zV gQqm7xfxtURHtucc7MYNEoKNk5rlrZhOlG6DdG0d6+rscCBrmL1I5giqm8y24+wW z+JJuk21+oVtltLz09JuX51xur3CGyJ+qNJdRPE1P1Udn7wj5zA+ew9qqJi1cgNf 63tBxooBpH6R8dGcOfjKECD6lBBqBr/Dd8ReWbMyn0XF1HMAxgpfPtExu9WcDzGu 9Fr/shUiEA3jqhbzSy6DCHugpnHPdHPyY64MqzisgOEVsituQ7MSefTIGSNusDlk K36I7j93mDAF5y2fTXqbjZKoRuu6KCySvGDXzBqGwhcNzUQk14iPwjtMDZ/l9Raj sQJCUxHntUovHs+VTCwS7ahqZyn0VRNx2bt1aJXNHKzuUovpA9/X5X9HCRZJDovB 0bCGQZ124+H/VsWvSjVtIh7oknU3vSQJPxS6KLKoi3rvywuqW562lGjCTqvjBJKD FMZ5NA8VoWXM2rgTDOyx =B43K -----END PGP SIGNATURE----- Merge tag 'armsoc-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull ARM SoC driver updates from Olof Johansson: "Driver updates for ARM SoCs: Reset subsystem, merged through arm-soc by tradition: - Make bool drivers explicitly non-modular - New support for i.MX7 and Arria10 reset controllers PATA driver for Palmchip BK371 (acked by Tejun) Power domain drivers for i.MX (GPC, GPCv2) - Moved out of mach-imx for GPC - Bunch of tweaks, fixes, etc PMC support for Tegra186 SoC detection support for Renesas RZ/G1H and RZ/G1N Move Tegra flow controller driver from mach directory to drivers/soc - (Power management / CPU power driver) Misc smaller tweaks for other platforms" * tag 'armsoc-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (60 commits) soc: pm-domain: Fix the mangled urls soc: renesas: rcar-sysc: Add support for R-Car H3 ES2.0 soc: renesas: rcar-sysc: Add support for fixing up power area tables soc: renesas: Register SoC device early soc: imx: gpc: add workaround for i.MX6QP to the GPC PD driver dt-bindings: imx-gpc: add i.MX6 QuadPlus compatible soc: imx: gpc: add defines for domain index soc: imx: Add GPCv2 power gating driver dt-bindings: Add GPCv2 power gating driver ARM/clk: move the ICST library to drivers/clk ARM: plat-versatile: remove stale clock header ARM: keystone: Drop PM domain support for k2g soc: ti: Add ti_sci_pm_domains driver dt-bindings: Add TI SCI PM Domains PM / Domains: Do not check if simple providers have phandle cells PM / Domains: Add generic data pointer to genpd data struct soc/tegra: Add initial flowctrl support for Tegra132/210 soc/tegra: flowctrl: Add basic platform driver soc/tegra: Move Tegra flowctrl driver ARM: tegra: Remove unnecessary inclusion of flowctrl header ...
This commit is contained in:
commit
0160e00ae8
88 changed files with 2947 additions and 438 deletions
82
include/soc/tegra/flowctrl.h
Normal file
82
include/soc/tegra/flowctrl.h
Normal file
|
@ -0,0 +1,82 @@
|
|||
/*
|
||||
* Functions and macros to control the flowcontroller
|
||||
*
|
||||
* Copyright (c) 2010-2012, NVIDIA Corporation. All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms and conditions of the GNU General Public License,
|
||||
* version 2, as published by the Free Software Foundation.
|
||||
*
|
||||
* 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, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __SOC_TEGRA_FLOWCTRL_H__
|
||||
#define __SOC_TEGRA_FLOWCTRL_H__
|
||||
|
||||
#define FLOW_CTRL_HALT_CPU0_EVENTS 0x0
|
||||
#define FLOW_CTRL_WAITEVENT (2 << 29)
|
||||
#define FLOW_CTRL_WAIT_FOR_INTERRUPT (4 << 29)
|
||||
#define FLOW_CTRL_JTAG_RESUME (1 << 28)
|
||||
#define FLOW_CTRL_SCLK_RESUME (1 << 27)
|
||||
#define FLOW_CTRL_HALT_CPU_IRQ (1 << 10)
|
||||
#define FLOW_CTRL_HALT_CPU_FIQ (1 << 8)
|
||||
#define FLOW_CTRL_HALT_LIC_IRQ (1 << 11)
|
||||
#define FLOW_CTRL_HALT_LIC_FIQ (1 << 10)
|
||||
#define FLOW_CTRL_HALT_GIC_IRQ (1 << 9)
|
||||
#define FLOW_CTRL_HALT_GIC_FIQ (1 << 8)
|
||||
#define FLOW_CTRL_CPU0_CSR 0x8
|
||||
#define FLOW_CTRL_CSR_INTR_FLAG (1 << 15)
|
||||
#define FLOW_CTRL_CSR_EVENT_FLAG (1 << 14)
|
||||
#define FLOW_CTRL_CSR_ENABLE_EXT_CRAIL (1 << 13)
|
||||
#define FLOW_CTRL_CSR_ENABLE_EXT_NCPU (1 << 12)
|
||||
#define FLOW_CTRL_CSR_ENABLE_EXT_MASK ( \
|
||||
FLOW_CTRL_CSR_ENABLE_EXT_NCPU | \
|
||||
FLOW_CTRL_CSR_ENABLE_EXT_CRAIL)
|
||||
#define FLOW_CTRL_CSR_ENABLE (1 << 0)
|
||||
#define FLOW_CTRL_HALT_CPU1_EVENTS 0x14
|
||||
#define FLOW_CTRL_CPU1_CSR 0x18
|
||||
|
||||
#define TEGRA20_FLOW_CTRL_CSR_WFE_CPU0 (1 << 4)
|
||||
#define TEGRA20_FLOW_CTRL_CSR_WFE_BITMAP (3 << 4)
|
||||
#define TEGRA20_FLOW_CTRL_CSR_WFI_BITMAP 0
|
||||
|
||||
#define TEGRA30_FLOW_CTRL_CSR_WFI_CPU0 (1 << 8)
|
||||
#define TEGRA30_FLOW_CTRL_CSR_WFE_BITMAP (0xF << 4)
|
||||
#define TEGRA30_FLOW_CTRL_CSR_WFI_BITMAP (0xF << 8)
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
#ifdef CONFIG_SOC_TEGRA_FLOWCTRL
|
||||
u32 flowctrl_read_cpu_csr(unsigned int cpuid);
|
||||
void flowctrl_write_cpu_csr(unsigned int cpuid, u32 value);
|
||||
void flowctrl_write_cpu_halt(unsigned int cpuid, u32 value);
|
||||
|
||||
void flowctrl_cpu_suspend_enter(unsigned int cpuid);
|
||||
void flowctrl_cpu_suspend_exit(unsigned int cpuid);
|
||||
#else
|
||||
static inline u32 flowctrl_read_cpu_csr(unsigned int cpuid)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline void flowctrl_write_cpu_csr(unsigned int cpuid, u32 value)
|
||||
{
|
||||
}
|
||||
|
||||
static inline void flowctrl_write_cpu_halt(unsigned int cpuid, u32 value) {}
|
||||
|
||||
static inline void flowctrl_cpu_suspend_enter(unsigned int cpuid)
|
||||
{
|
||||
}
|
||||
|
||||
static inline void flowctrl_cpu_suspend_exit(unsigned int cpuid)
|
||||
{
|
||||
}
|
||||
#endif /* CONFIG_SOC_TEGRA_FLOWCTRL */
|
||||
#endif /* __ASSEMBLY */
|
||||
#endif /* __SOC_TEGRA_FLOWCTRL_H__ */
|
|
@ -26,12 +26,6 @@
|
|||
struct clk;
|
||||
struct reset_control;
|
||||
|
||||
#ifdef CONFIG_PM_SLEEP
|
||||
enum tegra_suspend_mode tegra_pmc_get_suspend_mode(void);
|
||||
void tegra_pmc_set_suspend_mode(enum tegra_suspend_mode mode);
|
||||
void tegra_pmc_enter_suspend_mode(enum tegra_suspend_mode mode);
|
||||
#endif /* CONFIG_PM_SLEEP */
|
||||
|
||||
#ifdef CONFIG_SMP
|
||||
bool tegra_pmc_cpu_is_powered(unsigned int cpuid);
|
||||
int tegra_pmc_cpu_power_on(unsigned int cpuid);
|
||||
|
@ -144,7 +138,7 @@ enum tegra_io_pad_voltage {
|
|||
TEGRA_IO_PAD_3300000UV,
|
||||
};
|
||||
|
||||
#ifdef CONFIG_ARCH_TEGRA
|
||||
#ifdef CONFIG_SOC_TEGRA_PMC
|
||||
int tegra_powergate_is_powered(unsigned int id);
|
||||
int tegra_powergate_power_on(unsigned int id);
|
||||
int tegra_powergate_power_off(unsigned int id);
|
||||
|
@ -163,6 +157,11 @@ int tegra_io_pad_get_voltage(enum tegra_io_pad id);
|
|||
/* deprecated, use tegra_io_pad_power_{enable,disable}() instead */
|
||||
int tegra_io_rail_power_on(unsigned int id);
|
||||
int tegra_io_rail_power_off(unsigned int id);
|
||||
|
||||
enum tegra_suspend_mode tegra_pmc_get_suspend_mode(void);
|
||||
void tegra_pmc_set_suspend_mode(enum tegra_suspend_mode mode);
|
||||
void tegra_pmc_enter_suspend_mode(enum tegra_suspend_mode mode);
|
||||
|
||||
#else
|
||||
static inline int tegra_powergate_is_powered(unsigned int id)
|
||||
{
|
||||
|
@ -221,6 +220,20 @@ static inline int tegra_io_rail_power_off(unsigned int id)
|
|||
{
|
||||
return -ENOSYS;
|
||||
}
|
||||
#endif /* CONFIG_ARCH_TEGRA */
|
||||
|
||||
static inline enum tegra_suspend_mode tegra_pmc_get_suspend_mode(void)
|
||||
{
|
||||
return TEGRA_SUSPEND_NONE;
|
||||
}
|
||||
|
||||
static inline void tegra_pmc_set_suspend_mode(enum tegra_suspend_mode mode)
|
||||
{
|
||||
}
|
||||
|
||||
static inline void tegra_pmc_enter_suspend_mode(enum tegra_suspend_mode mode)
|
||||
{
|
||||
}
|
||||
|
||||
#endif /* CONFIG_SOC_TEGRA_PMC */
|
||||
|
||||
#endif /* __SOC_TEGRA_PMC_H__ */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue