Commit 5d1190ea authored by Thomas Petazzoni's avatar Thomas Petazzoni Committed by Jason Cooper

arm: mach-orion5x: convert to use mvebu-mbus driver

This commit migrates the mach-orion5x platforms to use the mvebu-mbus
driver and therefore removes the Orion5x-specific addr-map code.

The dove_init_early() function now initializes the mvebu-mbus driver
by calling mvebu_mbus_init().

We also convert a number of orion5x_setup_xyz_win() calls to the
appropriate mvebu_mbus_add_window() calls, as each board was doing its
own setup for the NOR window or other devices. Ultimately, those
devices will be probed from the DT.

The common address decoding windows are now registered in the
orion5x_setup_wins() function. It is worth noting that the four PCIe
address decoding windows will ultimately no longer have to be
registered here: it will be done automatically by the PCIe driver once
Dove has been migrated to use the upcoming mvebu PCIe driver.
Signed-off-by: default avatarThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Acked-by: default avatarArnd Bergmann <arnd@arndb.de>
Signed-off-by: default avatarJason Cooper <jason@lakedaemon.net>
parent 7d554902
...@@ -600,6 +600,7 @@ config ARCH_ORION5X ...@@ -600,6 +600,7 @@ config ARCH_ORION5X
select GENERIC_CLOCKEVENTS select GENERIC_CLOCKEVENTS
select PCI select PCI
select PLAT_ORION_LEGACY select PLAT_ORION_LEGACY
select MVEBU_MBUS
help help
Support for the following Marvell Orion 5x series SoCs: Support for the following Marvell Orion 5x series SoCs:
Orion-1 (5181), Orion-VoIP (5181L), Orion-NAS (5182), Orion-1 (5181), Orion-VoIP (5181L), Orion-NAS (5182),
......
obj-y += common.o addr-map.o pci.o irq.o mpp.o obj-y += common.o pci.o irq.o mpp.o
obj-$(CONFIG_MACH_DB88F5281) += db88f5281-setup.o obj-$(CONFIG_MACH_DB88F5281) += db88f5281-setup.o
obj-$(CONFIG_MACH_RD88F5182) += rd88f5182-setup.o obj-$(CONFIG_MACH_RD88F5182) += rd88f5182-setup.o
obj-$(CONFIG_MACH_KUROBOX_PRO) += kurobox_pro-setup.o obj-$(CONFIG_MACH_KUROBOX_PRO) += kurobox_pro-setup.o
......
/*
* arch/arm/mach-orion5x/addr-map.c
*
* Address map functions for Marvell Orion 5x SoCs
*
* Maintainer: Tzachi Perelstein <tzachi@marvell.com>
*
* This file is licensed under the terms of the GNU General Public
* License version 2. This program is licensed "as is" without any
* warranty of any kind, whether express or implied.
*/
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/mbus.h>
#include <linux/io.h>
#include <mach/hardware.h>
#include <plat/addr-map.h>
#include "common.h"
/*
* The Orion has fully programmable address map. There's a separate address
* map for each of the device _master_ interfaces, e.g. CPU, PCI, PCIe, USB,
* Gigabit Ethernet, DMA/XOR engines, etc. Each interface has its own
* address decode windows that allow it to access any of the Orion resources.
*
* CPU address decoding --
* Linux assumes that it is the boot loader that already setup the access to
* DDR and internal registers.
* Setup access to PCI and PCIe IO/MEM space is issued by this file.
* Setup access to various devices located on the device bus interface (e.g.
* flashes, RTC, etc) should be issued by machine-setup.c according to
* specific board population (by using orion5x_setup_*_win()).
*
* Non-CPU Masters address decoding --
* Unlike the CPU, we setup the access from Orion's master interfaces to DDR
* banks only (the typical use case).
* Setup access for each master to DDR is issued by platform device setup.
*/
/*
* Generic Address Decode Windows bit settings
*/
#define TARGET_DEV_BUS 1
#define TARGET_PCI 3
#define TARGET_PCIE 4
#define TARGET_SRAM 9
#define ATTR_PCIE_MEM 0x59
#define ATTR_PCIE_IO 0x51
#define ATTR_PCIE_WA 0x79
#define ATTR_PCI_MEM 0x59
#define ATTR_PCI_IO 0x51
#define ATTR_DEV_CS0 0x1e
#define ATTR_DEV_CS1 0x1d
#define ATTR_DEV_CS2 0x1b
#define ATTR_DEV_BOOT 0xf
#define ATTR_SRAM 0x0
static int __initdata win_alloc_count;
static int __init cpu_win_can_remap(const struct orion_addr_map_cfg *cfg,
const int win)
{
u32 dev, rev;
orion5x_pcie_id(&dev, &rev);
if ((dev == MV88F5281_DEV_ID && win < 4)
|| (dev == MV88F5182_DEV_ID && win < 2)
|| (dev == MV88F5181_DEV_ID && win < 2)
|| (dev == MV88F6183_DEV_ID && win < 4))
return 1;
return 0;
}
/*
* Description of the windows needed by the platform code
*/
static struct orion_addr_map_cfg addr_map_cfg __initdata = {
.num_wins = 8,
.cpu_win_can_remap = cpu_win_can_remap,
.bridge_virt_base = ORION5X_BRIDGE_VIRT_BASE,
};
static const struct __initdata orion_addr_map_info addr_map_info[] = {
/*
* Setup windows for PCI+PCIe IO+MEM space.
*/
{ 0, ORION5X_PCIE_IO_PHYS_BASE, ORION5X_PCIE_IO_SIZE,
TARGET_PCIE, ATTR_PCIE_IO, ORION5X_PCIE_IO_BUS_BASE
},
{ 1, ORION5X_PCI_IO_PHYS_BASE, ORION5X_PCI_IO_SIZE,
TARGET_PCI, ATTR_PCI_IO, ORION5X_PCI_IO_BUS_BASE
},
{ 2, ORION5X_PCIE_MEM_PHYS_BASE, ORION5X_PCIE_MEM_SIZE,
TARGET_PCIE, ATTR_PCIE_MEM, -1
},
{ 3, ORION5X_PCI_MEM_PHYS_BASE, ORION5X_PCI_MEM_SIZE,
TARGET_PCI, ATTR_PCI_MEM, -1
},
/* End marker */
{ -1, 0, 0, 0, 0, 0 }
};
void __init orion5x_setup_cpu_mbus_bridge(void)
{
/*
* Disable, clear and configure windows.
*/
orion_config_wins(&addr_map_cfg, addr_map_info);
win_alloc_count = 4;
/*
* Setup MBUS dram target info.
*/
orion_setup_cpu_mbus_target(&addr_map_cfg,
(void __iomem *) ORION5X_DDR_WINDOW_CPU_BASE);
}
void __init orion5x_setup_dev_boot_win(u32 base, u32 size)
{
orion_setup_cpu_win(&addr_map_cfg, win_alloc_count++, base, size,
TARGET_DEV_BUS, ATTR_DEV_BOOT, -1);
}
void __init orion5x_setup_dev0_win(u32 base, u32 size)
{
orion_setup_cpu_win(&addr_map_cfg, win_alloc_count++, base, size,
TARGET_DEV_BUS, ATTR_DEV_CS0, -1);
}
void __init orion5x_setup_dev1_win(u32 base, u32 size)
{
orion_setup_cpu_win(&addr_map_cfg, win_alloc_count++, base, size,
TARGET_DEV_BUS, ATTR_DEV_CS1, -1);
}
void __init orion5x_setup_dev2_win(u32 base, u32 size)
{
orion_setup_cpu_win(&addr_map_cfg, win_alloc_count++, base, size,
TARGET_DEV_BUS, ATTR_DEV_CS2, -1);
}
void __init orion5x_setup_pcie_wa_win(u32 base, u32 size)
{
orion_setup_cpu_win(&addr_map_cfg, win_alloc_count++, base, size,
TARGET_PCIE, ATTR_PCIE_WA, -1);
}
void __init orion5x_setup_sram_win(void)
{
orion_setup_cpu_win(&addr_map_cfg, win_alloc_count++,
ORION5X_SRAM_PHYS_BASE, ORION5X_SRAM_SIZE,
TARGET_SRAM, ATTR_SRAM, -1);
}
...@@ -41,7 +41,7 @@ static void __init orion5x_dt_init(void) ...@@ -41,7 +41,7 @@ static void __init orion5x_dt_init(void)
/* /*
* Setup Orion address map * Setup Orion address map
*/ */
orion5x_setup_cpu_mbus_bridge(); orion5x_setup_wins();
/* Setup root of clk tree */ /* Setup root of clk tree */
clk_init(); clk_init();
......
...@@ -34,7 +34,6 @@ ...@@ -34,7 +34,6 @@
#include <linux/platform_data/usb-ehci-orion.h> #include <linux/platform_data/usb-ehci-orion.h>
#include <plat/time.h> #include <plat/time.h>
#include <plat/common.h> #include <plat/common.h>
#include <plat/addr-map.h>
#include "common.h" #include "common.h"
/***************************************************************************** /*****************************************************************************
...@@ -174,7 +173,8 @@ void __init orion5x_xor_init(void) ...@@ -174,7 +173,8 @@ void __init orion5x_xor_init(void)
****************************************************************************/ ****************************************************************************/
static void __init orion5x_crypto_init(void) static void __init orion5x_crypto_init(void)
{ {
orion5x_setup_sram_win(); mvebu_mbus_add_window("sram", ORION5X_SRAM_PHYS_BASE,
ORION5X_SRAM_SIZE);
orion_crypto_init(ORION5X_CRYPTO_PHYS_BASE, ORION5X_SRAM_PHYS_BASE, orion_crypto_init(ORION5X_CRYPTO_PHYS_BASE, ORION5X_SRAM_PHYS_BASE,
SZ_8K, IRQ_ORION5X_CESA); SZ_8K, IRQ_ORION5X_CESA);
} }
...@@ -193,6 +193,9 @@ void __init orion5x_wdt_init(void) ...@@ -193,6 +193,9 @@ void __init orion5x_wdt_init(void)
****************************************************************************/ ****************************************************************************/
void __init orion5x_init_early(void) void __init orion5x_init_early(void)
{ {
u32 rev, dev;
const char *mbus_soc_name;
orion_time_set_base(TIMER_VIRT_BASE); orion_time_set_base(TIMER_VIRT_BASE);
/* /*
...@@ -201,6 +204,46 @@ void __init orion5x_init_early(void) ...@@ -201,6 +204,46 @@ void __init orion5x_init_early(void)
* the allocations won't fail. * the allocations won't fail.
*/ */
init_dma_coherent_pool_size(SZ_1M); init_dma_coherent_pool_size(SZ_1M);
/* Initialize the MBUS driver */
orion5x_pcie_id(&dev, &rev);
if (dev == MV88F5281_DEV_ID)
mbus_soc_name = "marvell,orion5x-88f5281-mbus";
else if (dev == MV88F5182_DEV_ID)
mbus_soc_name = "marvell,orion5x-88f5182-mbus";
else if (dev == MV88F5181_DEV_ID)
mbus_soc_name = "marvell,orion5x-88f5181-mbus";
else if (dev == MV88F6183_DEV_ID)
mbus_soc_name = "marvell,orion5x-88f6183-mbus";
else
mbus_soc_name = NULL;
mvebu_mbus_init(mbus_soc_name, ORION5X_BRIDGE_WINS_BASE,
ORION5X_BRIDGE_WINS_SZ,
ORION5X_DDR_WINS_BASE, ORION5X_DDR_WINS_SZ);
}
void orion5x_setup_wins(void)
{
/*
* The PCIe windows will no longer be statically allocated
* here once Orion5x is migrated to the pci-mvebu driver.
*/
mvebu_mbus_add_window_remap_flags("pcie0.0", ORION5X_PCIE_IO_PHYS_BASE,
ORION5X_PCIE_IO_SIZE,
ORION5X_PCIE_IO_BUS_BASE,
MVEBU_MBUS_PCI_IO);
mvebu_mbus_add_window_remap_flags("pcie0.0", ORION5X_PCIE_MEM_PHYS_BASE,
ORION5X_PCIE_MEM_SIZE,
MVEBU_MBUS_NO_REMAP,
MVEBU_MBUS_PCI_MEM);
mvebu_mbus_add_window_remap_flags("pci0.0", ORION5X_PCI_IO_PHYS_BASE,
ORION5X_PCI_IO_SIZE,
ORION5X_PCI_IO_BUS_BASE,
MVEBU_MBUS_PCI_IO);
mvebu_mbus_add_window_remap_flags("pci0.0", ORION5X_PCI_MEM_PHYS_BASE,
ORION5X_PCI_MEM_SIZE,
MVEBU_MBUS_NO_REMAP,
MVEBU_MBUS_PCI_MEM);
} }
int orion5x_tclk; int orion5x_tclk;
...@@ -282,7 +325,7 @@ void __init orion5x_init(void) ...@@ -282,7 +325,7 @@ void __init orion5x_init(void)
/* /*
* Setup Orion address map * Setup Orion address map
*/ */
orion5x_setup_cpu_mbus_bridge(); orion5x_setup_wins();
/* Setup root of clk tree */ /* Setup root of clk tree */
clk_init(); clk_init();
......
...@@ -17,18 +17,7 @@ void clk_init(void); ...@@ -17,18 +17,7 @@ void clk_init(void);
extern int orion5x_tclk; extern int orion5x_tclk;
extern void orion5x_timer_init(void); extern void orion5x_timer_init(void);
/* void orion5x_setup_wins(void);
* Enumerations and functions for Orion windows mapping. Used by Orion core
* functions to map its interfaces and by the machine-setup to map its on-
* board devices. Details in /mach-orion/addr-map.c
*/
void orion5x_setup_cpu_mbus_bridge(void);
void orion5x_setup_dev_boot_win(u32 base, u32 size);
void orion5x_setup_dev0_win(u32 base, u32 size);
void orion5x_setup_dev1_win(u32 base, u32 size);
void orion5x_setup_dev2_win(u32 base, u32 size);
void orion5x_setup_pcie_wa_win(u32 base, u32 size);
void orion5x_setup_sram_win(void);
void orion5x_ehci0_init(void); void orion5x_ehci0_init(void);
void orion5x_ehci1_init(void); void orion5x_ehci1_init(void);
......
...@@ -317,8 +317,8 @@ static void __init d2net_init(void) ...@@ -317,8 +317,8 @@ static void __init d2net_init(void)
d2net_sata_power_init(); d2net_sata_power_init();
orion5x_sata_init(&d2net_sata_data); orion5x_sata_init(&d2net_sata_data);
orion5x_setup_dev_boot_win(D2NET_NOR_BOOT_BASE, mvebu_mbus_add_window("devbus-boot", D2NET_NOR_BOOT_BASE,
D2NET_NOR_BOOT_SIZE); D2NET_NOR_BOOT_SIZE);
platform_device_register(&d2net_nor_flash); platform_device_register(&d2net_nor_flash);
platform_device_register(&d2net_gpio_buttons); platform_device_register(&d2net_gpio_buttons);
......
...@@ -340,16 +340,19 @@ static void __init db88f5281_init(void) ...@@ -340,16 +340,19 @@ static void __init db88f5281_init(void)
orion5x_uart0_init(); orion5x_uart0_init();
orion5x_uart1_init(); orion5x_uart1_init();
orion5x_setup_dev_boot_win(DB88F5281_NOR_BOOT_BASE, mvebu_mbus_add_window("devbus-boot", DB88F5281_NOR_BOOT_BASE,
DB88F5281_NOR_BOOT_SIZE); DB88F5281_NOR_BOOT_SIZE);
platform_device_register(&db88f5281_boot_flash); platform_device_register(&db88f5281_boot_flash);
orion5x_setup_dev0_win(DB88F5281_7SEG_BASE, DB88F5281_7SEG_SIZE); mvebu_mbus_add_window("devbus-cs0", DB88F5281_7SEG_BASE,
DB88F5281_7SEG_SIZE);
orion5x_setup_dev1_win(DB88F5281_NOR_BASE, DB88F5281_NOR_SIZE); mvebu_mbus_add_window("devbus-cs1", DB88F5281_NOR_BASE,
DB88F5281_NOR_SIZE);
platform_device_register(&db88f5281_nor_flash); platform_device_register(&db88f5281_nor_flash);
orion5x_setup_dev2_win(DB88F5281_NAND_BASE, DB88F5281_NAND_SIZE); mvebu_mbus_add_window("devbus-cs2", DB88F5281_NAND_BASE,
DB88F5281_NAND_SIZE);
platform_device_register(&db88f5281_nand_flash); platform_device_register(&db88f5281_nand_flash);
i2c_register_board_info(0, &db88f5281_i2c_rtc, 1); i2c_register_board_info(0, &db88f5281_i2c_rtc, 1);
......
...@@ -611,7 +611,8 @@ static void __init dns323_init(void) ...@@ -611,7 +611,8 @@ static void __init dns323_init(void)
/* setup flash mapping /* setup flash mapping
* CS3 holds a 8 MB Spansion S29GL064M90TFIR4 * CS3 holds a 8 MB Spansion S29GL064M90TFIR4
*/ */
orion5x_setup_dev_boot_win(DNS323_NOR_BOOT_BASE, DNS323_NOR_BOOT_SIZE); mvebu_mbus_add_window("devbus-boot", DNS323_NOR_BOOT_BASE,
DNS323_NOR_BOOT_SIZE);
platform_device_register(&dns323_nor_flash); platform_device_register(&dns323_nor_flash);
/* Sort out LEDs, Buttons and i2c devices */ /* Sort out LEDs, Buttons and i2c devices */
......
...@@ -154,8 +154,8 @@ void __init edmini_v2_init(void) ...@@ -154,8 +154,8 @@ void __init edmini_v2_init(void)
orion5x_ehci0_init(); orion5x_ehci0_init();
orion5x_eth_init(&edmini_v2_eth_data); orion5x_eth_init(&edmini_v2_eth_data);
orion5x_setup_dev_boot_win(EDMINI_V2_NOR_BOOT_BASE, mvebu_mbus_add_window("devbus-boot", EDMINI_V2_NOR_BOOT_BASE,
EDMINI_V2_NOR_BOOT_SIZE); EDMINI_V2_NOR_BOOT_SIZE);
platform_device_register(&edmini_v2_nor_flash); platform_device_register(&edmini_v2_nor_flash);
pr_notice("edmini_v2: USB device port, flash write and power-off " pr_notice("edmini_v2: USB device port, flash write and power-off "
......
...@@ -66,8 +66,10 @@ ...@@ -66,8 +66,10 @@
* Orion Registers Map * Orion Registers Map
******************************************************************************/ ******************************************************************************/
#define ORION5X_DDR_PHYS_BASE (ORION5X_REGS_PHYS_BASE + 0x00000)
#define ORION5X_DDR_WINS_BASE (ORION5X_DDR_PHYS_BASE + 0x1500)
#define ORION5X_DDR_WINS_SZ (0x10)
#define ORION5X_DDR_VIRT_BASE (ORION5X_REGS_VIRT_BASE + 0x00000) #define ORION5X_DDR_VIRT_BASE (ORION5X_REGS_VIRT_BASE + 0x00000)
#define ORION5X_DDR_WINDOW_CPU_BASE (ORION5X_DDR_VIRT_BASE + 0x1500)
#define ORION5X_DEV_BUS_PHYS_BASE (ORION5X_REGS_PHYS_BASE + 0x10000) #define ORION5X_DEV_BUS_PHYS_BASE (ORION5X_REGS_PHYS_BASE + 0x10000)
#define ORION5X_DEV_BUS_VIRT_BASE (ORION5X_REGS_VIRT_BASE + 0x10000) #define ORION5X_DEV_BUS_VIRT_BASE (ORION5X_REGS_VIRT_BASE + 0x10000)
#define ORION5X_DEV_BUS_REG(x) (ORION5X_DEV_BUS_VIRT_BASE + (x)) #define ORION5X_DEV_BUS_REG(x) (ORION5X_DEV_BUS_VIRT_BASE + (x))
...@@ -81,6 +83,8 @@ ...@@ -81,6 +83,8 @@
#define ORION5X_BRIDGE_VIRT_BASE (ORION5X_REGS_VIRT_BASE + 0x20000) #define ORION5X_BRIDGE_VIRT_BASE (ORION5X_REGS_VIRT_BASE + 0x20000)
#define ORION5X_BRIDGE_PHYS_BASE (ORION5X_REGS_PHYS_BASE + 0x20000) #define ORION5X_BRIDGE_PHYS_BASE (ORION5X_REGS_PHYS_BASE + 0x20000)
#define ORION5X_BRIDGE_WINS_BASE (ORION5X_BRIDGE_PHYS_BASE)
#define ORION5X_BRIDGE_WINS_SZ (0x80)
#define ORION5X_PCI_VIRT_BASE (ORION5X_REGS_VIRT_BASE + 0x30000) #define ORION5X_PCI_VIRT_BASE (ORION5X_REGS_VIRT_BASE + 0x30000)
......
...@@ -359,13 +359,13 @@ static void __init kurobox_pro_init(void) ...@@ -359,13 +359,13 @@ static void __init kurobox_pro_init(void)
orion5x_uart1_init(); orion5x_uart1_init();
orion5x_xor_init(); orion5x_xor_init();
orion5x_setup_dev_boot_win(KUROBOX_PRO_NOR_BOOT_BASE, mvebu_mbus_add_window("devbus-boot", KUROBOX_PRO_NOR_BOOT_BASE,
KUROBOX_PRO_NOR_BOOT_SIZE); KUROBOX_PRO_NOR_BOOT_SIZE);
platform_device_register(&kurobox_pro_nor_flash); platform_device_register(&kurobox_pro_nor_flash);
if (machine_is_kurobox_pro()) { if (machine_is_kurobox_pro()) {
orion5x_setup_dev0_win(KUROBOX_PRO_NAND_BASE, mvebu_mbus_add_window("devbus-cs0", KUROBOX_PRO_NAND_BASE,
KUROBOX_PRO_NAND_SIZE); KUROBOX_PRO_NAND_SIZE);
platform_device_register(&kurobox_pro_nand_flash); platform_device_register(&kurobox_pro_nand_flash);
} }
......
...@@ -294,8 +294,8 @@ static void __init lschl_init(void) ...@@ -294,8 +294,8 @@ static void __init lschl_init(void)
orion5x_uart0_init(); orion5x_uart0_init();
orion5x_xor_init(); orion5x_xor_init();
orion5x_setup_dev_boot_win(LSCHL_NOR_BOOT_BASE, mvebu_mbus_add_window("devbus-boot", LSCHL_NOR_BOOT_BASE,
LSCHL_NOR_BOOT_SIZE); LSCHL_NOR_BOOT_SIZE);
platform_device_register(&lschl_nor_flash); platform_device_register(&lschl_nor_flash);
platform_device_register(&lschl_leds); platform_device_register(&lschl_leds);
......
...@@ -243,8 +243,8 @@ static void __init ls_hgl_init(void) ...@@ -243,8 +243,8 @@ static void __init ls_hgl_init(void)
orion5x_uart0_init(); orion5x_uart0_init();
orion5x_xor_init(); orion5x_xor_init();
orion5x_setup_dev_boot_win(LS_HGL_NOR_BOOT_BASE, mvebu_mbus_add_window("devbus-boot", LS_HGL_NOR_BOOT_BASE,
LS_HGL_NOR_BOOT_SIZE); LS_HGL_NOR_BOOT_SIZE);
platform_device_register(&ls_hgl_nor_flash); platform_device_register(&ls_hgl_nor_flash);
platform_device_register(&ls_hgl_button_device); platform_device_register(&ls_hgl_button_device);
......
...@@ -244,8 +244,8 @@ static void __init lsmini_init(void) ...@@ -244,8 +244,8 @@ static void __init lsmini_init(void)
orion5x_uart0_init(); orion5x_uart0_init();
orion5x_xor_init(); orion5x_xor_init();
orion5x_setup_dev_boot_win(LSMINI_NOR_BOOT_BASE, mvebu_mbus_add_window("devbus-boot", LSMINI_NOR_BOOT_BASE,
LSMINI_NOR_BOOT_SIZE); LSMINI_NOR_BOOT_SIZE);
platform_device_register(&lsmini_nor_flash); platform_device_register(&lsmini_nor_flash);
platform_device_register(&lsmini_button_device); platform_device_register(&lsmini_button_device);
......
...@@ -241,7 +241,8 @@ static void __init mss2_init(void) ...@@ -241,7 +241,8 @@ static void __init mss2_init(void)
orion5x_uart0_init(); orion5x_uart0_init();
orion5x_xor_init(); orion5x_xor_init();
orion5x_setup_dev_boot_win(MSS2_NOR_BOOT_BASE, MSS2_NOR_BOOT_SIZE); mvebu_mbus_add_window("devbus-boot", MSS2_NOR_BOOT_BASE,
MSS2_NOR_BOOT_SIZE);
platform_device_register(&mss2_nor_flash); platform_device_register(&mss2_nor_flash);
platform_device_register(&mss2_button_device); platform_device_register(&mss2_button_device);
......
...@@ -204,7 +204,8 @@ static void __init mv2120_init(void) ...@@ -204,7 +204,8 @@ static void __init mv2120_init(void)
orion5x_uart0_init(); orion5x_uart0_init();
orion5x_xor_init(); orion5x_xor_init();
orion5x_setup_dev_boot_win(MV2120_NOR_BOOT_BASE, MV2120_NOR_BOOT_SIZE); mvebu_mbus_add_window("devbus-boot", MV2120_NOR_BOOT_BASE,
MV2120_NOR_BOOT_SIZE);
platform_device_register(&mv2120_nor_flash); platform_device_register(&mv2120_nor_flash);
platform_device_register(&mv2120_button_device); platform_device_register(&mv2120_button_device);
......
...@@ -397,8 +397,8 @@ static void __init net2big_init(void) ...@@ -397,8 +397,8 @@ static void __init net2big_init(void)
net2big_sata_power_init(); net2big_sata_power_init();
orion5x_sata_init(&net2big_sata_data); orion5x_sata_init(&net2big_sata_data);
orion5x_setup_dev_boot_win(NET2BIG_NOR_BOOT_BASE, mvebu_mbus_add_window("devbus-boot", NET2BIG_NOR_BOOT_BASE,
NET2BIG_NOR_BOOT_SIZE); NET2BIG_NOR_BOOT_SIZE);
platform_device_register(&net2big_nor_flash); platform_device_register(&net2big_nor_flash);
platform_device_register(&net2big_gpio_buttons); platform_device_register(&net2big_gpio_buttons);
......
...@@ -157,8 +157,11 @@ static int __init pcie_setup(struct pci_sys_data *sys) ...@@ -157,8 +157,11 @@ static int __init pcie_setup(struct pci_sys_data *sys)
if (dev == MV88F5181_DEV_ID || dev == MV88F5182_DEV_ID) { if (dev == MV88F5181_DEV_ID || dev == MV88F5182_DEV_ID) {
printk(KERN_NOTICE "Applying Orion-1/Orion-NAS PCIe config " printk(KERN_NOTICE "Applying Orion-1/Orion-NAS PCIe config "
"read transaction workaround\n"); "read transaction workaround\n");
orion5x_setup_pcie_wa_win(ORION5X_PCIE_WA_PHYS_BASE, mvebu_mbus_add_window_remap_flags("pcie0.0",
ORION5X_PCIE_WA_SIZE); ORION5X_PCIE_WA_PHYS_BASE,
ORION5X_PCIE_WA_SIZE,
MVEBU_MBUS_NO_REMAP,
MVEBU_MBUS_PCI_WA);
pcie_ops.read = pcie_rd_conf_wa; pcie_ops.read = pcie_rd_conf_wa;
} }
......
...@@ -123,8 +123,8 @@ static void __init rd88f5181l_fxo_init(void) ...@@ -123,8 +123,8 @@ static void __init rd88f5181l_fxo_init(void)
orion5x_eth_switch_init(&rd88f5181l_fxo_switch_plat_data, NO_IRQ); orion5x_eth_switch_init(&rd88f5181l_fxo_switch_plat_data, NO_IRQ);
orion5x_uart0_init(); orion5x_uart0_init();
orion5x_setup_dev_boot_win(RD88F5181L_FXO_NOR_BOOT_BASE, mvebu_mbus_add_window("devbus-boot", RD88F5181L_FXO_NOR_BOOT_BASE,
RD88F5181L_FXO_NOR_BOOT_SIZE); RD88F5181L_FXO_NOR_BOOT_SIZE);
platform_device_register(&rd88f5181l_fxo_nor_boot_flash); platform_device_register(&rd88f5181l_fxo_nor_boot_flash);
} }
......
...@@ -130,8 +130,8 @@ static void __init rd88f5181l_ge_init(void) ...@@ -130,8 +130,8 @@ static void __init rd88f5181l_ge_init(void)
orion5x_i2c_init(); orion5x_i2c_init();
orion5x_uart0_init(); orion5x_uart0_init();
orion5x_setup_dev_boot_win(RD88F5181L_GE_NOR_BOOT_BASE, mvebu_mbus_add_window("devbus-boot", RD88F5181L_GE_NOR_BOOT_BASE,
RD88F5181L_GE_NOR_BOOT_SIZE); RD88F5181L_GE_NOR_BOOT_SIZE);
platform_device_register(&rd88f5181l_ge_nor_boot_flash); platform_device_register(&rd88f5181l_ge_nor_boot_flash);
i2c_register_board_info(0, &rd88f5181l_ge_i2c_rtc, 1); i2c_register_board_info(0, &rd88f5181l_ge_i2c_rtc, 1);
......
...@@ -264,10 +264,11 @@ static void __init rd88f5182_init(void) ...@@ -264,10 +264,11 @@ static void __init rd88f5182_init(void)
orion5x_uart0_init(); orion5x_uart0_init();
orion5x_xor_init(); orion5x_xor_init();
orion5x_setup_dev_boot_win(RD88F5182_NOR_BOOT_BASE, mvebu_mbus_add_window("devbus-boot", RD88F5182_NOR_BOOT_BASE,
RD88F5182_NOR_BOOT_SIZE); RD88F5182_NOR_BOOT_SIZE);
orion5x_setup_dev1_win(RD88F5182_NOR_BASE, RD88F5182_NOR_SIZE); mvebu_mbus_add_window("devbus-cs1", RD88F5182_NOR_BASE,
RD88F5182_NOR_SIZE);
platform_device_register(&rd88f5182_nor_flash); platform_device_register(&rd88f5182_nor_flash);
platform_device_register(&rd88f5182_gpio_leds); platform_device_register(&rd88f5182_gpio_leds);
......
...@@ -329,8 +329,8 @@ static void __init tsp2_init(void) ...@@ -329,8 +329,8 @@ static void __init tsp2_init(void)
/* /*
* Configure peripherals. * Configure peripherals.
*/ */
orion5x_setup_dev_boot_win(TSP2_NOR_BOOT_BASE, mvebu_mbus_add_window("devbus-boot", TSP2_NOR_BOOT_BASE,
TSP2_NOR_BOOT_SIZE); TSP2_NOR_BOOT_SIZE);
platform_device_register(&tsp2_nor_flash); platform_device_register(&tsp2_nor_flash);
orion5x_ehci0_init(); orion5x_ehci0_init();
......
...@@ -286,8 +286,8 @@ static void __init qnap_ts209_init(void) ...@@ -286,8 +286,8 @@ static void __init qnap_ts209_init(void)
/* /*
* Configure peripherals. * Configure peripherals.
*/ */
orion5x_setup_dev_boot_win(QNAP_TS209_NOR_BOOT_BASE, mvebu_mbus_add_window("devbus-boot", QNAP_TS209_NOR_BOOT_BASE,
QNAP_TS209_NOR_BOOT_SIZE); QNAP_TS209_NOR_BOOT_SIZE);
platform_device_register(&qnap_ts209_nor_flash); platform_device_register(&qnap_ts209_nor_flash);
orion5x_ehci0_init(); orion5x_ehci0_init();
......
...@@ -277,8 +277,8 @@ static void __init qnap_ts409_init(void) ...@@ -277,8 +277,8 @@ static void __init qnap_ts409_init(void)
/* /*
* Configure peripherals. * Configure peripherals.
*/ */
orion5x_setup_dev_boot_win(QNAP_TS409_NOR_BOOT_BASE, mvebu_mbus_add_window("devbus-boot", QNAP_TS409_NOR_BOOT_BASE,
QNAP_TS409_NOR_BOOT_SIZE); QNAP_TS409_NOR_BOOT_SIZE);
platform_device_register(&qnap_ts409_nor_flash); platform_device_register(&qnap_ts409_nor_flash);
orion5x_ehci0_init(); orion5x_ehci0_init();
......
...@@ -127,8 +127,8 @@ static void __init wnr854t_init(void) ...@@ -127,8 +127,8 @@ static void __init wnr854t_init(void)
orion5x_eth_switch_init(&wnr854t_switch_plat_data, NO_IRQ); orion5x_eth_switch_init(&wnr854t_switch_plat_data, NO_IRQ);
orion5x_uart0_init(); orion5x_uart0_init();
orion5x_setup_dev_boot_win(WNR854T_NOR_BOOT_BASE, mvebu_mbus_add_window("devbus-boot", WNR854T_NOR_BOOT_BASE,
WNR854T_NOR_BOOT_SIZE); WNR854T_NOR_BOOT_SIZE);
platform_device_register(&wnr854t_nor_flash); platform_device_register(&wnr854t_nor_flash);
} }
......
...@@ -213,8 +213,8 @@ static void __init wrt350n_v2_init(void) ...@@ -213,8 +213,8 @@ static void __init wrt350n_v2_init(void)
orion5x_eth_switch_init(&wrt350n_v2_switch_plat_data, NO_IRQ); orion5x_eth_switch_init(&wrt350n_v2_switch_plat_data, NO_IRQ);
orion5x_uart0_init(); orion5x_uart0_init();
orion5x_setup_dev_boot_win(WRT350N_V2_NOR_BOOT_BASE, mvebu_mbus_add_window("devbus-boot", WRT350N_V2_NOR_BOOT_BASE,
WRT350N_V2_NOR_BOOT_SIZE); WRT350N_V2_NOR_BOOT_SIZE);
platform_device_register(&wrt350n_v2_nor_flash); platform_device_register(&wrt350n_v2_nor_flash);
platform_device_register(&wrt350n_v2_leds); platform_device_register(&wrt350n_v2_leds);
platform_device_register(&wrt350n_v2_button_device); platform_device_register(&wrt350n_v2_button_device);
......
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
# #
ccflags-$(CONFIG_ARCH_MULTIPLATFORM) := -I$(srctree)/$(src)/include ccflags-$(CONFIG_ARCH_MULTIPLATFORM) := -I$(srctree)/$(src)/include
obj-$(CONFIG_ARCH_ORION5X) += addr-map.o
obj-$(CONFIG_ARCH_MV78XX0) += addr-map.o obj-$(CONFIG_ARCH_MV78XX0) += addr-map.o
orion-gpio-$(CONFIG_GENERIC_GPIO) += gpio.o orion-gpio-$(CONFIG_GENERIC_GPIO) += gpio.o
......
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