Thread (6 messages) 6 messages, 2 authors, 2012-06-04
STALE5121d

[PATCH V2 1/3] ARM: tegra: trimslice: enable PCIe when booting from device tree

From: Ben Dooks <hidden>
Date: 2012-05-22 10:17:04
Also in: linux-tegra

On 17/05/12 22:21, Stephen Warren wrote:
quoted hunk ↗ jump to hunk
From: Stephen Warren<redacted>

There currently aren't bindings for the Tegra PCIe controller. Work on
this is in progress, but not yet complete. Manually initialize PCIe when
booting from device tree, in order to bring DT support to the same
feature level as board files, which will in turn allow board files to be
deprecated.

PCIe hosts the wired Ethernet controller on TrimSlice.

To support this, add infra-structure to board-dt-tegra20.c for board-
specific initialization code. Once device tree support for the relevant
features is in place, this code will be removed.

Signed-off-by: Stephen Warren<redacted>
---
v2: Use .init_late hook in DT_MACHINE_START instead of an explicit late
initcall.
---
  arch/arm/mach-tegra/board-dt-tegra20.c |   36 +++++++++++++++++++++++++++++++-
  1 files changed, 35 insertions(+), 1 deletions(-)
diff --git a/arch/arm/mach-tegra/board-dt-tegra20.c b/arch/arm/mach-tegra/board-dt-tegra20.c
index eb7249d..9537f20 100644
--- a/arch/arm/mach-tegra/board-dt-tegra20.c
+++ b/arch/arm/mach-tegra/board-dt-tegra20.c
@@ -98,6 +98,40 @@ static void __init tegra_dt_init(void)
  				tegra20_auxdata_lookup, NULL);
  }

+#ifdef CONFIG_MACH_TRIMSLICE
+static void __init trimslice_init(void)
+{
+	int ret;
+
+	ret = tegra_pcie_init(true, true);
+	if (ret)
+		pr_err("tegra_pci_init() failed: %d\n", ret);
+}
+#endif
Given the size of some of these functions, is it worth even
bothering with an #ifdef around them, especially as they are
marked init.

How about having some sort of standard pcie binding for the pcie
part?

-- 
Ben Dooks				http://www.codethink.co.uk/
Senior Engineer				Codethink - Providing Genius
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help