soc: tegra: Changes for v5.3-rc1
This contains a set of minor fixes and cleanups for core Tegra drivers. -----BEGIN PGP SIGNATURE----- iQJHBAABCAAxFiEEiOrDCAFJzPfAjcif3SOs138+s6EFAl0M61oTHHRyZWRpbmdA bnZpZGlhLmNvbQAKCRDdI6zXfz6zoYZAD/487VTni+jaefO8Vop87r1+nAbQNG9Y i+QGdZwBTggHhE7rPKHMPPgmTqjAcTLezyM1kUx7nUF5eK4R/Rz1ND1MzutYt6/v vS12SOfclPalZuO6DuR7vwCDeqpLy/WXFt4OZZzm/F/WxTBzc86BvOWSF7LvTXvl kAK7TmOSUrItzvfyi/GPfdQsSZLg+3FWOwKf13Fp99n+/4IUDm+hdOeNaBnkvJSp pLt0+bVctCp4i4VGwGzFw5kPVLLl/HotM8hEnAAlGr7bPXP+oEQAN0EYZIUirqM5 4HEYH2zkmK7ffy7FIARrvBKrE0krihtYFm931pCMzlQzzWGOfAOyoVwPCZq+Rg0R yXpk8QSObc2o8ywnihfDYstiMToU9c8Et3IjpQUJ1hzH2kMofcJJ9PclVjSv7GWw B9e6Fm14Za6Cp1Ec+X4VYJrWGI7dF8131Tsp0L7uVUk5ypqdV3rqv2hWnViZm72q BBaTldmA5NzmBmwRWzxmRkFrl/WxsQQ2DN0NLIOJ4dUWn1MtCwZxvFuec/X3g8/f dYwsKcFrG0oT+mYBBFZ7c7adpGTM2+hjuksolZPmRjGWRTPkjeISlbruG3UtWVuT OhyUJDFQLpdenOTJJ9ZfVY5tgsItwibbTlhgKC4WFw/zd32Qs8fjIuPXrqzPIQHQ jtbtAYYOp0r+cA== =bqwE -----END PGP SIGNATURE----- Merge tag 'tegra-for-5.3-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into arm/drivers soc: tegra: Changes for v5.3-rc1 This contains a set of minor fixes and cleanups for core Tegra drivers. * tag 'tegra-for-5.3-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: soc/tegra: Select pinctrl for Tegra194 soc/tegra: fuse: Do not log error message on deferred probe soc/tegra: pmc: Add comments clarifying wake events soc/tegra: pmc: Avoid crash for non-wake IRQs soc/tegra: pmc: Fail to allocate more than one wake IRQ Signed-off-by: Olof Johansson <olof@lixom.net>
This commit is contained in:
commit
761d3d22fb
|
@ -109,6 +109,7 @@ config ARCH_TEGRA_186_SOC
|
||||||
config ARCH_TEGRA_194_SOC
|
config ARCH_TEGRA_194_SOC
|
||||||
bool "NVIDIA Tegra194 SoC"
|
bool "NVIDIA Tegra194 SoC"
|
||||||
select MAILBOX
|
select MAILBOX
|
||||||
|
select PINCTRL_TEGRA194
|
||||||
select TEGRA_BPMP
|
select TEGRA_BPMP
|
||||||
select TEGRA_HSP_MBOX
|
select TEGRA_HSP_MBOX
|
||||||
select TEGRA_IVC
|
select TEGRA_IVC
|
||||||
|
|
|
@ -133,8 +133,10 @@ static int tegra_fuse_probe(struct platform_device *pdev)
|
||||||
|
|
||||||
fuse->clk = devm_clk_get(&pdev->dev, "fuse");
|
fuse->clk = devm_clk_get(&pdev->dev, "fuse");
|
||||||
if (IS_ERR(fuse->clk)) {
|
if (IS_ERR(fuse->clk)) {
|
||||||
dev_err(&pdev->dev, "failed to get FUSE clock: %ld",
|
if (PTR_ERR(fuse->clk) != -EPROBE_DEFER)
|
||||||
PTR_ERR(fuse->clk));
|
dev_err(&pdev->dev, "failed to get FUSE clock: %ld",
|
||||||
|
PTR_ERR(fuse->clk));
|
||||||
|
|
||||||
fuse->base = base;
|
fuse->base = base;
|
||||||
return PTR_ERR(fuse->clk);
|
return PTR_ERR(fuse->clk);
|
||||||
}
|
}
|
||||||
|
|
|
@ -232,6 +232,11 @@ struct tegra_pmc_soc {
|
||||||
const char * const *reset_levels;
|
const char * const *reset_levels;
|
||||||
unsigned int num_reset_levels;
|
unsigned int num_reset_levels;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* These describe events that can wake the system from sleep (i.e.
|
||||||
|
* LP0 or SC7). Wakeup from other sleep states (such as LP1 or LP2)
|
||||||
|
* are dealt with in the LIC.
|
||||||
|
*/
|
||||||
const struct tegra_wake_event *wake_events;
|
const struct tegra_wake_event *wake_events;
|
||||||
unsigned int num_wake_events;
|
unsigned int num_wake_events;
|
||||||
};
|
};
|
||||||
|
@ -1854,6 +1859,9 @@ static int tegra_pmc_irq_alloc(struct irq_domain *domain, unsigned int virq,
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
int err = 0;
|
int err = 0;
|
||||||
|
|
||||||
|
if (WARN_ON(num_irqs > 1))
|
||||||
|
return -EINVAL;
|
||||||
|
|
||||||
for (i = 0; i < soc->num_wake_events; i++) {
|
for (i = 0; i < soc->num_wake_events; i++) {
|
||||||
const struct tegra_wake_event *event = &soc->wake_events[i];
|
const struct tegra_wake_event *event = &soc->wake_events[i];
|
||||||
|
|
||||||
|
@ -1894,6 +1902,11 @@ static int tegra_pmc_irq_alloc(struct irq_domain *domain, unsigned int virq,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* For interrupts that don't have associated wake events, assign a
|
||||||
|
* dummy hardware IRQ number. This is used in the ->irq_set_type()
|
||||||
|
* and ->irq_set_wake() callbacks to return early for these IRQs.
|
||||||
|
*/
|
||||||
if (i == soc->num_wake_events)
|
if (i == soc->num_wake_events)
|
||||||
err = irq_domain_set_hwirq_and_chip(domain, virq, ULONG_MAX,
|
err = irq_domain_set_hwirq_and_chip(domain, virq, ULONG_MAX,
|
||||||
&pmc->irq, pmc);
|
&pmc->irq, pmc);
|
||||||
|
@ -1912,6 +1925,10 @@ static int tegra_pmc_irq_set_wake(struct irq_data *data, unsigned int on)
|
||||||
unsigned int offset, bit;
|
unsigned int offset, bit;
|
||||||
u32 value;
|
u32 value;
|
||||||
|
|
||||||
|
/* nothing to do if there's no associated wake event */
|
||||||
|
if (WARN_ON(data->hwirq == ULONG_MAX))
|
||||||
|
return 0;
|
||||||
|
|
||||||
offset = data->hwirq / 32;
|
offset = data->hwirq / 32;
|
||||||
bit = data->hwirq % 32;
|
bit = data->hwirq % 32;
|
||||||
|
|
||||||
|
@ -1939,6 +1956,7 @@ static int tegra_pmc_irq_set_type(struct irq_data *data, unsigned int type)
|
||||||
struct tegra_pmc *pmc = irq_data_get_irq_chip_data(data);
|
struct tegra_pmc *pmc = irq_data_get_irq_chip_data(data);
|
||||||
u32 value;
|
u32 value;
|
||||||
|
|
||||||
|
/* nothing to do if there's no associated wake event */
|
||||||
if (data->hwirq == ULONG_MAX)
|
if (data->hwirq == ULONG_MAX)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue