Skip to content

Commit 761d3d2

Browse files
committed
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 <[email protected]>
2 parents 09c4e03 + 7ac13f6 commit 761d3d2

File tree

3 files changed

+23
-2
lines changed

3 files changed

+23
-2
lines changed

drivers/soc/tegra/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ config ARCH_TEGRA_186_SOC
109109
config ARCH_TEGRA_194_SOC
110110
bool "NVIDIA Tegra194 SoC"
111111
select MAILBOX
112+
select PINCTRL_TEGRA194
112113
select TEGRA_BPMP
113114
select TEGRA_HSP_MBOX
114115
select TEGRA_IVC

drivers/soc/tegra/fuse/fuse-tegra.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,10 @@ static int tegra_fuse_probe(struct platform_device *pdev)
133133

134134
fuse->clk = devm_clk_get(&pdev->dev, "fuse");
135135
if (IS_ERR(fuse->clk)) {
136-
dev_err(&pdev->dev, "failed to get FUSE clock: %ld",
137-
PTR_ERR(fuse->clk));
136+
if (PTR_ERR(fuse->clk) != -EPROBE_DEFER)
137+
dev_err(&pdev->dev, "failed to get FUSE clock: %ld",
138+
PTR_ERR(fuse->clk));
139+
138140
fuse->base = base;
139141
return PTR_ERR(fuse->clk);
140142
}

drivers/soc/tegra/pmc.c

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,11 @@ struct tegra_pmc_soc {
232232
const char * const *reset_levels;
233233
unsigned int num_reset_levels;
234234

235+
/*
236+
* These describe events that can wake the system from sleep (i.e.
237+
* LP0 or SC7). Wakeup from other sleep states (such as LP1 or LP2)
238+
* are dealt with in the LIC.
239+
*/
235240
const struct tegra_wake_event *wake_events;
236241
unsigned int num_wake_events;
237242
};
@@ -1854,6 +1859,9 @@ static int tegra_pmc_irq_alloc(struct irq_domain *domain, unsigned int virq,
18541859
unsigned int i;
18551860
int err = 0;
18561861

1862+
if (WARN_ON(num_irqs > 1))
1863+
return -EINVAL;
1864+
18571865
for (i = 0; i < soc->num_wake_events; i++) {
18581866
const struct tegra_wake_event *event = &soc->wake_events[i];
18591867

@@ -1894,6 +1902,11 @@ static int tegra_pmc_irq_alloc(struct irq_domain *domain, unsigned int virq,
18941902
}
18951903
}
18961904

1905+
/*
1906+
* For interrupts that don't have associated wake events, assign a
1907+
* dummy hardware IRQ number. This is used in the ->irq_set_type()
1908+
* and ->irq_set_wake() callbacks to return early for these IRQs.
1909+
*/
18971910
if (i == soc->num_wake_events)
18981911
err = irq_domain_set_hwirq_and_chip(domain, virq, ULONG_MAX,
18991912
&pmc->irq, pmc);
@@ -1912,6 +1925,10 @@ static int tegra_pmc_irq_set_wake(struct irq_data *data, unsigned int on)
19121925
unsigned int offset, bit;
19131926
u32 value;
19141927

1928+
/* nothing to do if there's no associated wake event */
1929+
if (WARN_ON(data->hwirq == ULONG_MAX))
1930+
return 0;
1931+
19151932
offset = data->hwirq / 32;
19161933
bit = data->hwirq % 32;
19171934

@@ -1939,6 +1956,7 @@ static int tegra_pmc_irq_set_type(struct irq_data *data, unsigned int type)
19391956
struct tegra_pmc *pmc = irq_data_get_irq_chip_data(data);
19401957
u32 value;
19411958

1959+
/* nothing to do if there's no associated wake event */
19421960
if (data->hwirq == ULONG_MAX)
19431961
return 0;
19441962

0 commit comments

Comments
 (0)