diff options
author | Stephen Warren <swarren@nvidia.com> | 2012-05-02 15:47:12 -0600 |
---|---|---|
committer | Stephen Warren <swarren@nvidia.com> | 2012-06-20 12:37:42 -0600 |
commit | a12c0efc7a3f433377add0fa1fd0ed4836cc595e (patch) | |
tree | 5dd8af8833d4dc4361a118da90324f86e26b407e /arch/arm/mach-tegra/board-harmony-pcie.c | |
parent | c554dee35c3e6b0c19db5fb75193d4cd99736c6b (diff) | |
download | blackbird-op-linux-a12c0efc7a3f433377add0fa1fd0ed4836cc595e.tar.gz blackbird-op-linux-a12c0efc7a3f433377add0fa1fd0ed4836cc595e.zip |
ARM: tegra: harmony: init regulators, PCIe when booting from DT
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 on Harmony requires various regulators to be registered and enabled
before initializing the PCIe controller. Note that since the I2C
controllers are instantiated from DT, we must use i2c_new_device() to
register the PMU rather than i2c_register_board_info().
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Diffstat (limited to 'arch/arm/mach-tegra/board-harmony-pcie.c')
-rw-r--r-- | arch/arm/mach-tegra/board-harmony-pcie.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/arch/arm/mach-tegra/board-harmony-pcie.c b/arch/arm/mach-tegra/board-harmony-pcie.c index 33c4fedab840..e8c3fda9bec2 100644 --- a/arch/arm/mach-tegra/board-harmony-pcie.c +++ b/arch/arm/mach-tegra/board-harmony-pcie.c @@ -27,14 +27,11 @@ #ifdef CONFIG_TEGRA_PCI -static int __init harmony_pcie_init(void) +int __init harmony_pcie_init(void) { struct regulator *regulator = NULL; int err; - if (!machine_is_harmony()) - return 0; - err = gpio_request(TEGRA_GPIO_EN_VDD_1V05_GPIO, "EN_VDD_1V05"); if (err) return err; @@ -62,7 +59,15 @@ err_reg: return err; } +static int __init harmony_pcie_initcall(void) +{ + if (!machine_is_harmony()) + return 0; + + return harmony_pcie_init(); +} + /* PCI should be initialized after I2C, mfd and regulators */ -subsys_initcall_sync(harmony_pcie_init); +subsys_initcall_sync(harmony_pcie_initcall); #endif |