mirror of https://gitee.com/openkylin/linux.git
mvebu cleanup for v3.10
- plat-orion: prep for mvebu-mbus driver -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) iQEcBAABAgAGBQJRRgjnAAoJEAi3KVZQDZAeJWsH/03OAVvN/yBHrWHoi++RWJyx sX9BL2i+dqFXpjN82OtPh3z2D1CRZSiJhGsbSZznY6Le1JhzeKXon2BErU0B9hO4 ZYWKzlDIbQ8Rls41mrDlAFhqmbw9w7lXux70yaYFyXY42JfNMDQ7yKDvcmlyOOdY X0fDSaUkSuMRQpEqOCSvp1bZ8BTcgJr3dICUYgxWvQlV/CUfUXI+FXwybZxadwGk XwXe03f4ZcKp/jl/+Ttd4wKtwowKuD/yM7Z/VYirmHSgnfGXD41EZrIZJspUVUX8 rfWnUoCJ1As+jjE3GKD17ZpD98NSdlf7PDju5RKK+6TSfjXl4Nl/AHwTsmoz3fA= =2Udw -----END PGP SIGNATURE----- Merge tag 'tags/cleanup_for_v3.10' into mvebu/soc mvebu cleanup for v3.10 - plat-orion: prep for mvebu-mbus driver
This commit is contained in:
commit
02ac5b3fc5
|
@ -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)
|
||||||
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)
|
||||||
/*
|
/*
|
||||||
* 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
|
||||||
|
|
|
@ -3,7 +3,11 @@
|
||||||
#
|
#
|
||||||
ccflags-$(CONFIG_ARCH_MULTIPLATFORM) := -I$(srctree)/$(src)/include
|
ccflags-$(CONFIG_ARCH_MULTIPLATFORM) := -I$(srctree)/$(src)/include
|
||||||
|
|
||||||
obj-y += addr-map.o
|
obj-$(CONFIG_ARCH_MVEBU) += addr-map.o
|
||||||
|
obj-$(CONFIG_ARCH_KIRKWOOD) += addr-map.o
|
||||||
|
obj-$(CONFIG_ARCH_DOVE) += addr-map.o
|
||||||
|
obj-$(CONFIG_ARCH_ORION5X) += addr-map.o
|
||||||
|
obj-$(CONFIG_ARCH_MV78XX0) += addr-map.o
|
||||||
|
|
||||||
orion-gpio-$(CONFIG_GENERIC_GPIO) += gpio.o
|
orion-gpio-$(CONFIG_GENERIC_GPIO) += gpio.o
|
||||||
obj-$(CONFIG_PLAT_ORION_LEGACY) += irq.o pcie.o time.o common.o mpp.o
|
obj-$(CONFIG_PLAT_ORION_LEGACY) += irq.o pcie.o time.o common.o mpp.o
|
||||||
|
|
|
@ -120,12 +120,14 @@ void __init orion_pcie_reset(void __iomem *base)
|
||||||
* BAR[0,2] -> disabled, BAR[1] -> covers all DRAM banks
|
* BAR[0,2] -> disabled, BAR[1] -> covers all DRAM banks
|
||||||
* WIN[0-3] -> DRAM bank[0-3]
|
* WIN[0-3] -> DRAM bank[0-3]
|
||||||
*/
|
*/
|
||||||
static void __init orion_pcie_setup_wins(void __iomem *base,
|
static void __init orion_pcie_setup_wins(void __iomem *base)
|
||||||
struct mbus_dram_target_info *dram)
|
|
||||||
{
|
{
|
||||||
|
const struct mbus_dram_target_info *dram;
|
||||||
u32 size;
|
u32 size;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
dram = mv_mbus_dram_info();
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* First, disable and clear BARs and windows.
|
* First, disable and clear BARs and windows.
|
||||||
*/
|
*/
|
||||||
|
@ -150,7 +152,7 @@ static void __init orion_pcie_setup_wins(void __iomem *base,
|
||||||
*/
|
*/
|
||||||
size = 0;
|
size = 0;
|
||||||
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;
|
||||||
|
|
||||||
writel(cs->base & 0xffff0000, base + PCIE_WIN04_BASE_OFF(i));
|
writel(cs->base & 0xffff0000, base + PCIE_WIN04_BASE_OFF(i));
|
||||||
writel(0, base + PCIE_WIN04_REMAP_OFF(i));
|
writel(0, base + PCIE_WIN04_REMAP_OFF(i));
|
||||||
|
@ -184,7 +186,7 @@ void __init orion_pcie_setup(void __iomem *base)
|
||||||
/*
|
/*
|
||||||
* Point PCIe unit MBUS decode windows to DRAM space.
|
* Point PCIe unit MBUS decode windows to DRAM space.
|
||||||
*/
|
*/
|
||||||
orion_pcie_setup_wins(base, &orion_mbus_dram_info);
|
orion_pcie_setup_wins(base);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Master + slave enable.
|
* Master + slave enable.
|
||||||
|
|
Loading…
Reference in New Issue