Commit 3e762c86 authored by Thomas Petazzoni's avatar Thomas Petazzoni Committed by Jason Cooper

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: default avatarThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: default avatarJason Cooper <jason@lakedaemon.net>
parent 59f16137
...@@ -402,8 +402,9 @@ static void __init orion5x_pci_master_slave_enable(void) ...@@ -402,8 +402,9 @@ static void __init orion5x_pci_master_slave_enable(void)
orion5x_pci_hw_wr_conf(bus_nr, 0, func, reg, 4, val | 0x7); orion5x_pci_hw_wr_conf(bus_nr, 0, func, reg, 4, val | 0x7);
} }
static void __init orion5x_setup_pci_wins(struct mbus_dram_target_info *dram) static void __init orion5x_setup_pci_wins(void)
{ {
const struct mbus_dram_target_info *dram = mv_mbus_dram_info();
u32 win_enable; u32 win_enable;
int bus; int bus;
int i; int i;
...@@ -420,7 +421,7 @@ static void __init orion5x_setup_pci_wins(struct mbus_dram_target_info *dram) ...@@ -420,7 +421,7 @@ static void __init orion5x_setup_pci_wins(struct mbus_dram_target_info *dram)
bus = orion5x_pci_local_bus_nr(); bus = orion5x_pci_local_bus_nr();
for (i = 0; i < dram->num_cs; i++) { for (i = 0; i < dram->num_cs; i++) {
struct mbus_dram_window *cs = dram->cs + i; const struct mbus_dram_window *cs = dram->cs + i;
u32 func = PCI_CONF_FUNC_BAR_CS(cs->cs_index); u32 func = PCI_CONF_FUNC_BAR_CS(cs->cs_index);
u32 reg; u32 reg;
u32 val; u32 val;
...@@ -467,7 +468,7 @@ static int __init pci_setup(struct pci_sys_data *sys) ...@@ -467,7 +468,7 @@ static int __init pci_setup(struct pci_sys_data *sys)
/* /*
* Point PCI unit MBUS decode windows to DRAM space. * Point PCI unit MBUS decode windows to DRAM space.
*/ */
orion5x_setup_pci_wins(&orion_mbus_dram_info); orion5x_setup_pci_wins();
/* /*
* Master + Slave enable * Master + Slave enable
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment