diff options
author | Linus Walleij <linus.walleij@linaro.org> | 2013-02-02 23:16:57 +0100 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2013-06-03 08:04:35 +0200 |
commit | 86adc39ffc9360eee43ff5913468620a3fdd7289 (patch) | |
tree | 4cbfd727c8f96f5df60820473ba59a00b54e7f77 /arch/arm/mach-integrator/integrator_ap.c | |
parent | f4bc4f0ab4081b5bf99c92663877a41adf8c843a (diff) | |
download | op-kernel-dev-86adc39ffc9360eee43ff5913468620a3fdd7289.zip op-kernel-dev-86adc39ffc9360eee43ff5913468620a3fdd7289.tar.gz |
ARM: integrator: convert PCIv3 bridge to platform device
This converts the PCIv3 driver to a platform device driver, and
registers the device only on the Integrator/AP instead of bailing
out in the initcall if the platform is not correct.
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'arch/arm/mach-integrator/integrator_ap.c')
-rw-r--r-- | arch/arm/mach-integrator/integrator_ap.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/arch/arm/mach-integrator/integrator_ap.c b/arch/arm/mach-integrator/integrator_ap.c index b23c8e4..0fff21c 100644 --- a/arch/arm/mach-integrator/integrator_ap.c +++ b/arch/arm/mach-integrator/integrator_ap.c @@ -494,6 +494,15 @@ static struct of_dev_auxdata ap_auxdata_lookup[] __initdata = { { /* sentinel */ }, }; +/* + * This is a placeholder that will get deleted when we move the PCI + * device over to the device tree. + */ +static struct platform_device pci_v3_device_of = { + .name = "pci-v3", + .id = 0, +}; + static void __init ap_init_of(void) { unsigned long sc_dec; @@ -548,6 +557,8 @@ static void __init ap_init_of(void) of_platform_populate(root, of_default_bus_match_table, ap_auxdata_lookup, parent); + platform_device_register(&pci_v3_device_of); + sc_dec = readl(ap_syscon_base + INTEGRATOR_SC_DEC_OFFSET); for (i = 0; i < 4; i++) { struct lm_device *lmdev; @@ -615,6 +626,11 @@ static void __init ap_map_io_atag(void) * for eventual deletion. */ +static struct platform_device pci_v3_device = { + .name = "pci-v3", + .id = 0, +}; + static struct resource cfi_flash_resource = { .start = INTEGRATOR_FLASH_BASE, .end = INTEGRATOR_FLASH_BASE + INTEGRATOR_FLASH_SIZE - 1, @@ -672,6 +688,7 @@ static void __init ap_init(void) unsigned long sc_dec; int i; + platform_device_register(&pci_v3_device); platform_device_register(&cfi_flash_device); ap_syscon_base = __io_address(INTEGRATOR_SC_BASE); |