* [PATCH 0/2] ARM: tegra: a late cleanup and a build fix
@ 2013-08-27 18:52 Stephen Warren
[not found] ` <1377629554-17490-1-git-send-email-swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
0 siblings, 1 reply; 5+ messages in thread
From: Stephen Warren @ 2013-08-27 18:52 UTC (permalink / raw)
To: arm-DgEjT+Ai2ygdnm+yROfE0A
Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA, Stephen Warren
From: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
Both of these patches should apply wherever Tegra's for-3.12/soc branch
was applied. One is a late cleanup re: ioremap, and the other fixes a
build issue in the cpuidle<->PCIe driver coupling.
Julia Lawall (1):
PCI: tegra: replace devm_request_and_ioremap by devm_ioremap_resource
Kyle McMartin (1):
tegra-cpuidle: provide stub when !CONFIG_CPU_IDLE
drivers/pci/host/pci-tegra.c | 31 ++++++++++---------------------
include/linux/tegra-cpuidle.h | 6 ++++++
2 files changed, 16 insertions(+), 21 deletions(-)
--
1.8.1.5
^ permalink raw reply [flat|nested] 5+ messages in thread[parent not found: <1377629554-17490-1-git-send-email-swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>]
* [PATCH 1/2] PCI: tegra: replace devm_request_and_ioremap by devm_ioremap_resource [not found] ` <1377629554-17490-1-git-send-email-swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org> @ 2013-08-27 18:52 ` Stephen Warren [not found] ` <1377629554-17490-2-git-send-email-swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org> 2013-08-27 18:52 ` [PATCH 2/2] tegra-cpuidle: provide stub when !CONFIG_CPU_IDLE Stephen Warren 1 sibling, 1 reply; 5+ messages in thread From: Stephen Warren @ 2013-08-27 18:52 UTC (permalink / raw) To: arm-DgEjT+Ai2ygdnm+yROfE0A Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA, Julia Lawall, Stephen Warren From: Julia Lawall <Julia.Lawall-L2FTfq7BK8M@public.gmane.org> Use devm_ioremap_resource instead of devm_request_and_ioremap. This was done using the semantic patch scripts/coccinelle/api/devm_ioremap_resource.cocci Error-handling code was manually removed from the associated calls to platform_get_resource. Adjust the comment at the third platform_get_resource_byname to make clear why ioremap is not done at this point. Signed-off-by: Julia Lawall <Julia.Lawall-L2FTfq7BK8M@public.gmane.org> Acked-by: Thierry Reding <thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> Tested-by: Thierry Reding <thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> Acked-by: Bjorn Helgaas <bhelgaas-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org> Signed-off-by: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org> --- drivers/pci/host/pci-tegra.c | 31 ++++++++++--------------------- 1 file changed, 10 insertions(+), 21 deletions(-) diff --git a/drivers/pci/host/pci-tegra.c b/drivers/pci/host/pci-tegra.c index 7356741..2e9888a 100644 --- a/drivers/pci/host/pci-tegra.c +++ b/drivers/pci/host/pci-tegra.c @@ -1031,32 +1031,21 @@ static int tegra_pcie_get_resources(struct tegra_pcie *pcie) return err; } - /* request and remap controller registers */ pads = platform_get_resource_byname(pdev, IORESOURCE_MEM, "pads"); - if (!pads) { - err = -EADDRNOTAVAIL; + pcie->pads = devm_ioremap_resource(&pdev->dev, pads); + if (IS_ERR(pcie->pads)) { + err = PTR_ERR(pcie->pads); goto poweroff; } afi = platform_get_resource_byname(pdev, IORESOURCE_MEM, "afi"); - if (!afi) { - err = -EADDRNOTAVAIL; - goto poweroff; - } - - pcie->pads = devm_request_and_ioremap(&pdev->dev, pads); - if (!pcie->pads) { - err = -EADDRNOTAVAIL; - goto poweroff; - } - - pcie->afi = devm_request_and_ioremap(&pdev->dev, afi); - if (!pcie->afi) { - err = -EADDRNOTAVAIL; + pcie->afi = devm_ioremap_resource(&pdev->dev, afi); + if (IS_ERR(pcie->afi)) { + err = PTR_ERR(pcie->afi); goto poweroff; } - /* request and remap configuration space */ + /* request configuration space, but remap later, on demand */ res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "cs"); if (!res) { err = -EADDRNOTAVAIL; @@ -1492,9 +1481,9 @@ static int tegra_pcie_parse_dt(struct tegra_pcie *pcie) rp->lanes = value; rp->pcie = pcie; - rp->base = devm_request_and_ioremap(pcie->dev, &rp->regs); - if (!rp->base) - return -EADDRNOTAVAIL; + rp->base = devm_ioremap_resource(pcie->dev, &rp->regs); + if (IS_ERR(rp->base)) + return PTR_ERR(rp->base); list_add_tail(&rp->list, &pcie->ports); } -- 1.8.1.5 ^ permalink raw reply related [flat|nested] 5+ messages in thread
[parent not found: <1377629554-17490-2-git-send-email-swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>]
* Re: [PATCH 1/2] PCI: tegra: replace devm_request_and_ioremap by devm_ioremap_resource [not found] ` <1377629554-17490-2-git-send-email-swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org> @ 2013-08-28 6:38 ` Thierry Reding 0 siblings, 0 replies; 5+ messages in thread From: Thierry Reding @ 2013-08-28 6:38 UTC (permalink / raw) To: Stephen Warren Cc: arm-DgEjT+Ai2ygdnm+yROfE0A, linux-tegra-u79uwXL29TY76Z2rM5mHXA, Julia Lawall, Stephen Warren [-- Attachment #1: Type: text/plain, Size: 1284 bytes --] On Tue, Aug 27, 2013 at 12:52:33PM -0600, Stephen Warren wrote: > From: Julia Lawall <Julia.Lawall-L2FTfq7BK8M@public.gmane.org> > > Use devm_ioremap_resource instead of devm_request_and_ioremap. > > This was done using the semantic patch > scripts/coccinelle/api/devm_ioremap_resource.cocci > > Error-handling code was manually removed from the associated calls to > platform_get_resource. > > Adjust the comment at the third platform_get_resource_byname to make clear > why ioremap is not done at this point. > > Signed-off-by: Julia Lawall <Julia.Lawall-L2FTfq7BK8M@public.gmane.org> > Acked-by: Thierry Reding <thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > Tested-by: Thierry Reding <thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > Acked-by: Bjorn Helgaas <bhelgaas-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org> > Signed-off-by: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org> > --- > drivers/pci/host/pci-tegra.c | 31 ++++++++++--------------------- > 1 file changed, 10 insertions(+), 21 deletions(-) I bounced that patch to arm-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org a few days ago but haven't received a response yet. In case it already got applied someone will probably notice, so no harm done. Thierry [-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --] ^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 2/2] tegra-cpuidle: provide stub when !CONFIG_CPU_IDLE [not found] ` <1377629554-17490-1-git-send-email-swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org> 2013-08-27 18:52 ` [PATCH 1/2] PCI: tegra: replace devm_request_and_ioremap by devm_ioremap_resource Stephen Warren @ 2013-08-27 18:52 ` Stephen Warren [not found] ` <1377629554-17490-3-git-send-email-swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org> 1 sibling, 1 reply; 5+ messages in thread From: Stephen Warren @ 2013-08-27 18:52 UTC (permalink / raw) To: arm-DgEjT+Ai2ygdnm+yROfE0A Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA, Kyle McMartin, Stephen Warren From: Kyle McMartin <kyle-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> While poking at something using the for-3.12/* trees, I hit the following compile error: drivers/built-in.o: In function `tegra_pcie_map_irq': /builddir/build/BUILD/kernel-3.10.fc20/linux-3.11.0-0.rc6.git4.1.fc20.armv7hl/drivers/pci/host/pci-tegra.c:640: undefined reference to `tegra_cpuidle_pcie_irqs_in_use' drivers/built-in.o: In function `tegra_msi_map': /builddir/build/BUILD/kernel-3.10.fc20/linux-3.11.0-0.rc6.git4.1.fc20.armv7hl/drivers/pci/host/pci-tegra.c:1227: undefined reference to `tegra_cpuidle_pcie_irqs_in_use' make: *** [vmlinux] Error 1 Since our .config had CONFIG_CPU_IDLE off. We should probably provide an empty function to handle this to avoid cluttering up pci-tegra.c with conditionals. Signed-off-by: Kyle McMartin <kyle-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> Reviewed-by: Thierry Reding <treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org> [swarren, removed unnecessary return statement] Signed-off-by: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org> --- include/linux/tegra-cpuidle.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/linux/tegra-cpuidle.h b/include/linux/tegra-cpuidle.h index dda3647..9c6286b 100644 --- a/include/linux/tegra-cpuidle.h +++ b/include/linux/tegra-cpuidle.h @@ -14,6 +14,12 @@ #ifndef __LINUX_TEGRA_CPUIDLE_H__ #define __LINUX_TEGRA_CPUIDLE_H__ +#ifdef CONFIG_CPU_IDLE void tegra_cpuidle_pcie_irqs_in_use(void); +#else +static inline void tegra_cpuidle_pcie_irqs_in_use(void) +{ +} +#endif #endif -- 1.8.1.5 ^ permalink raw reply related [flat|nested] 5+ messages in thread
[parent not found: <1377629554-17490-3-git-send-email-swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>]
* Re: [PATCH 2/2] tegra-cpuidle: provide stub when !CONFIG_CPU_IDLE [not found] ` <1377629554-17490-3-git-send-email-swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org> @ 2013-08-29 20:54 ` Olof Johansson 0 siblings, 0 replies; 5+ messages in thread From: Olof Johansson @ 2013-08-29 20:54 UTC (permalink / raw) To: Stephen Warren Cc: arm-DgEjT+Ai2ygdnm+yROfE0A, linux-tegra-u79uwXL29TY76Z2rM5mHXA, Kyle McMartin, Stephen Warren On Tue, Aug 27, 2013 at 12:52:34PM -0600, Stephen Warren wrote: > From: Kyle McMartin <kyle-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> > > While poking at something using the for-3.12/* trees, I hit the > following compile error: > drivers/built-in.o: In function `tegra_pcie_map_irq': > /builddir/build/BUILD/kernel-3.10.fc20/linux-3.11.0-0.rc6.git4.1.fc20.armv7hl/drivers/pci/host/pci-tegra.c:640: > undefined reference to `tegra_cpuidle_pcie_irqs_in_use' > drivers/built-in.o: In function `tegra_msi_map': > /builddir/build/BUILD/kernel-3.10.fc20/linux-3.11.0-0.rc6.git4.1.fc20.armv7hl/drivers/pci/host/pci-tegra.c:1227: > undefined reference to `tegra_cpuidle_pcie_irqs_in_use' > make: *** [vmlinux] Error 1 > > Since our .config had CONFIG_CPU_IDLE off. We should probably provide > an empty function to handle this to avoid cluttering up pci-tegra.c > with conditionals. > > Signed-off-by: Kyle McMartin <kyle-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> > Reviewed-by: Thierry Reding <treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org> > [swarren, removed unnecessary return statement] > Signed-off-by: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org> > --- Applied. -Olof ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-08-29 20:54 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-27 18:52 [PATCH 0/2] ARM: tegra: a late cleanup and a build fix Stephen Warren
[not found] ` <1377629554-17490-1-git-send-email-swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-08-27 18:52 ` [PATCH 1/2] PCI: tegra: replace devm_request_and_ioremap by devm_ioremap_resource Stephen Warren
[not found] ` <1377629554-17490-2-git-send-email-swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-08-28 6:38 ` Thierry Reding
2013-08-27 18:52 ` [PATCH 2/2] tegra-cpuidle: provide stub when !CONFIG_CPU_IDLE Stephen Warren
[not found] ` <1377629554-17490-3-git-send-email-swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-08-29 20:54 ` Olof Johansson
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox