Commit c8f7341b authored by Arnd Bergmann's avatar Arnd Bergmann

Merge tag 'tegra-for-4.7-soc' of...

Merge tag 'tegra-for-4.7-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into next/drivers

Merge "soc/tegra: Changes for v4.7-rc1" from Thierry Reding:

This contains a bunch of preparatory patches to the PMC driver which are
a prerequisite to moving the driver to generic power domains.

* tag 'tegra-for-4.7-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux:
  dt-bindings: Update NVIDIA PMC for Tegra
  soc/tegra: pmc: Wait for powergate state to change
  soc/tegra: pmc: Ensure GPU partition can be toggled on/off by PMC
  soc/tegra: pmc: Remove additional check for a valid partition
  soc/tegra: pmc: Fix verification of valid partitions
  soc/tegra: pmc: Fix testing of powergate state
  soc/tegra: pmc: Change powergate and rail IDs to be an unsigned type
  soc/tegra: pmc: Protect public functions from potential race conditions
  soc/tegra: pmc: Restore base address on probe failure
  soc/tegra: pmc: Remove non-existing L2 partition for Tegra124
  soc/tegra: pmc: Remove non-existing power partitions for Tegra210
  soc/tegra: pmc: Remove debugfs entry on probe failure
  soc/tegra: pmc: Fix sparse warning for tegra_pmc_init_tsense_reset()
  soc/tegra: pmc: Add missing structure members to kernel-doc
parents 26a8eb59 605aa5e4
......@@ -6,11 +6,13 @@ modes. It provides power-gating controllers for SoC and CPU power-islands.
Required properties:
- name : Should be pmc
- compatible : For Tegra20, must contain "nvidia,tegra20-pmc". For Tegra30,
must contain "nvidia,tegra30-pmc". For Tegra114, must contain
"nvidia,tegra114-pmc". For Tegra124, must contain "nvidia,tegra124-pmc".
Otherwise, must contain "nvidia,<chip>-pmc", plus at least one of the
above, where <chip> is tegra132.
- compatible : Should contain one of the following:
For Tegra20 must contain "nvidia,tegra20-pmc".
For Tegra30 must contain "nvidia,tegra30-pmc".
For Tegra114 must contain "nvidia,tegra114-pmc"
For Tegra124 must contain "nvidia,tegra124-pmc"
For Tegra132 must contain "nvidia,tegra124-pmc"
For Tegra210 must contain "nvidia,tegra210-pmc"
- reg : Offset and length of the register set for the device
- clocks : Must contain an entry for each entry in clock-names.
See ../clocks/clock-bindings.txt for details.
......
......@@ -108,19 +108,9 @@ static int tegra30_boot_secondary(unsigned int cpu, struct task_struct *idle)
* be un-gated by un-toggling the power gate register
* manually.
*/
if (!tegra_pmc_cpu_is_powered(cpu)) {
ret = tegra_pmc_cpu_power_on(cpu);
if (ret)
return ret;
/* Wait for the power to come up. */
timeout = jiffies + msecs_to_jiffies(100);
while (!tegra_pmc_cpu_is_powered(cpu)) {
if (time_after(jiffies, timeout))
return -ETIMEDOUT;
udelay(10);
}
}
ret = tegra_pmc_cpu_power_on(cpu);
if (ret)
return ret;
remove_clamps:
/* CPU partition is powered. Enable the CPU clock. */
......
......@@ -121,7 +121,7 @@ struct tegra_dc {
spinlock_t lock;
struct drm_crtc base;
int powergate;
unsigned int powergate;
int pipe;
struct clk *clk;
......
This diff is collapsed.
......@@ -33,9 +33,9 @@ void tegra_pmc_enter_suspend_mode(enum tegra_suspend_mode mode);
#endif /* CONFIG_PM_SLEEP */
#ifdef CONFIG_SMP
bool tegra_pmc_cpu_is_powered(int cpuid);
int tegra_pmc_cpu_power_on(int cpuid);
int tegra_pmc_cpu_remove_clamping(int cpuid);
bool tegra_pmc_cpu_is_powered(unsigned int cpuid);
int tegra_pmc_cpu_power_on(unsigned int cpuid);
int tegra_pmc_cpu_remove_clamping(unsigned int cpuid);
#endif /* CONFIG_SMP */
/*
......@@ -108,50 +108,51 @@ int tegra_pmc_cpu_remove_clamping(int cpuid);
#define TEGRA_IO_RAIL_SYS_DDC 58
#ifdef CONFIG_ARCH_TEGRA
int tegra_powergate_is_powered(int id);
int tegra_powergate_power_on(int id);
int tegra_powergate_power_off(int id);
int tegra_powergate_remove_clamping(int id);
int tegra_powergate_is_powered(unsigned int id);
int tegra_powergate_power_on(unsigned int id);
int tegra_powergate_power_off(unsigned int id);
int tegra_powergate_remove_clamping(unsigned int id);
/* Must be called with clk disabled, and returns with clk enabled */
int tegra_powergate_sequence_power_up(int id, struct clk *clk,
int tegra_powergate_sequence_power_up(unsigned int id, struct clk *clk,
struct reset_control *rst);
int tegra_io_rail_power_on(int id);
int tegra_io_rail_power_off(int id);
int tegra_io_rail_power_on(unsigned int id);
int tegra_io_rail_power_off(unsigned int id);
#else
static inline int tegra_powergate_is_powered(int id)
static inline int tegra_powergate_is_powered(unsigned int id)
{
return -ENOSYS;
}
static inline int tegra_powergate_power_on(int id)
static inline int tegra_powergate_power_on(unsigned int id)
{
return -ENOSYS;
}
static inline int tegra_powergate_power_off(int id)
static inline int tegra_powergate_power_off(unsigned int id)
{
return -ENOSYS;
}
static inline int tegra_powergate_remove_clamping(int id)
static inline int tegra_powergate_remove_clamping(unsigned int id)
{
return -ENOSYS;
}
static inline int tegra_powergate_sequence_power_up(int id, struct clk *clk,
static inline int tegra_powergate_sequence_power_up(unsigned int id,
struct clk *clk,
struct reset_control *rst)
{
return -ENOSYS;
}
static inline int tegra_io_rail_power_on(int id)
static inline int tegra_io_rail_power_on(unsigned int id)
{
return -ENOSYS;
}
static inline int tegra_io_rail_power_off(int id)
static inline int tegra_io_rail_power_off(unsigned int id)
{
return -ENOSYS;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment