diff options
author | Thomas Petazzoni <thomas.petazzoni@free-electrons.com> | 2013-03-06 11:59:58 -0500 |
---|---|---|
committer | Jason Cooper <jason@lakedaemon.net> | 2013-03-17 14:03:48 -0400 |
commit | 3e762c86b337f6990cdbd71890921b4dd9351ed9 (patch) | |
tree | eab801d04953442c6fdaed5dab398dcbe8d7d495 /arch/arm/mach-orion5x | |
parent | 59f16137b2a09b2fba7e4d00088f99ce0ea9a6de (diff) |
arm: mach-orion5x: use mv_mbus_dram_info() in PCI code
The PCI code was directly accessing the orion_mbus_dram_info structure
to get access to a description of the SDRAM chip selects in order to
configure the PCIe -> SDRAM address decoding windows.
However, with the introduction of the mvebu-mbus driver, we are going
to remove this global structure and instead leave only the exported
mv_mbus_dram_info() function to access this description of the SDRAM
chip selects. Therefore, we simply switch to using this API.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
Diffstat (limited to 'arch/arm/mach-orion5x')
-rw-r--r-- | arch/arm/mach-orion5x/pci.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/arch/arm/mach-orion5x/pci.c b/arch/arm/mach-orion5x/pci.c index d9c7c3bf0d9c..973db98a3c27 100644 --- a/arch/arm/mach-orion5x/pci.c +++ b/arch/arm/mach-orion5x/pci.c | |||
@@ -402,8 +402,9 @@ static void __init orion5x_pci_master_slave_enable(void) | |||
402 | orion5x_pci_hw_wr_conf(bus_nr, 0, func, reg, 4, val | 0x7); | 402 | orion5x_pci_hw_wr_conf(bus_nr, 0, func, reg, 4, val | 0x7); |
403 | } | 403 | } |
404 | 404 | ||
405 | static void __init orion5x_setup_pci_wins(struct mbus_dram_target_info *dram) | 405 | static void __init orion5x_setup_pci_wins(void) |
406 | { | 406 | { |
407 | const struct mbus_dram_target_info *dram = mv_mbus_dram_info(); | ||
407 | u32 win_enable; | 408 | u32 win_enable; |
408 | int bus; | 409 | int bus; |
409 | int i; | 410 | int i; |
@@ -420,7 +421,7 @@ static void __init orion5x_setup_pci_wins(struct mbus_dram_target_info *dram) | |||
420 | bus = orion5x_pci_local_bus_nr(); | 421 | bus = orion5x_pci_local_bus_nr(); |
421 | 422 | ||
422 | for (i = 0; i < dram->num_cs; i++) { | 423 | for (i = 0; i < dram->num_cs; i++) { |
423 | struct mbus_dram_window *cs = dram->cs + i; | 424 | const struct mbus_dram_window *cs = dram->cs + i; |
424 | u32 func = PCI_CONF_FUNC_BAR_CS(cs->cs_index); | 425 | u32 func = PCI_CONF_FUNC_BAR_CS(cs->cs_index); |
425 | u32 reg; | 426 | u32 reg; |
426 | u32 val; | 427 | u32 val; |
@@ -467,7 +468,7 @@ static int __init pci_setup(struct pci_sys_data *sys) | |||
467 | /* | 468 | /* |
468 | * Point PCI unit MBUS decode windows to DRAM space. | 469 | * Point PCI unit MBUS decode windows to DRAM space. |
469 | */ | 470 | */ |
470 | orion5x_setup_pci_wins(&orion_mbus_dram_info); | 471 | orion5x_setup_pci_wins(); |
471 | 472 | ||
472 | /* | 473 | /* |
473 | * Master + Slave enable | 474 | * Master + Slave enable |