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>
This commit is contained in:
parent
59f16137b2
commit
3e762c86b3
@ -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);
|
||||
}
|
||||
|
||||
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;
|
||||
int bus;
|
||||
int i;
|
||||
@ -420,7 +421,7 @@ static void __init orion5x_setup_pci_wins(struct mbus_dram_target_info *dram)
|
||||
bus = orion5x_pci_local_bus_nr();
|
||||
|
||||
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 reg;
|
||||
u32 val;
|
||||
@ -467,7 +468,7 @@ static int __init pci_setup(struct pci_sys_data *sys)
|
||||
/*
|
||||
* Point PCI unit MBUS decode windows to DRAM space.
|
||||
*/
|
||||
orion5x_setup_pci_wins(&orion_mbus_dram_info);
|
||||
orion5x_setup_pci_wins();
|
||||
|
||||
/*
|
||||
* Master + Slave enable
|
||||
|
Loading…
Reference in New Issue
Block a user