summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-orion/addr-map.c49
-rw-r--r--arch/arm/mach-orion/common.c8
-rw-r--r--arch/arm/mach-orion/common.h1
3 files changed, 7 insertions, 51 deletions
diff --git a/arch/arm/mach-orion/addr-map.c b/arch/arm/mach-orion/addr-map.c
index 69cd0876f6b9..40bcb986ab96 100644
--- a/arch/arm/mach-orion/addr-map.c
+++ b/arch/arm/mach-orion/addr-map.c
@@ -104,15 +104,6 @@
#define ETH_MAX_REMAP_WIN 4
/*
- * USB Address Decode Windows registers
- */
-#define USB_WIN_CTRL(i, w) ((i == 0) ? ORION_USB0_REG(0x320 + ((w) << 4)) \
- : ORION_USB1_REG(0x320 + ((w) << 4)))
-#define USB_WIN_BASE(i, w) ((i == 0) ? ORION_USB0_REG(0x324 + ((w) << 4)) \
- : ORION_USB1_REG(0x324 + ((w) << 4)))
-#define USB_MAX_WIN 4
-
-/*
* SATA Address Decode Windows registers
*/
#define SATA_WIN_CTRL(win) ORION_SATA_REG(0x30 + ((win) * 0x10))
@@ -262,46 +253,6 @@ void __init orion_setup_cpu_wins(void)
orion_mbus_dram_info.num_cs = cs;
}
-void __init orion_setup_usb_wins(void)
-{
- int i;
- u32 usb_if, dev, rev;
- u32 max_usb_if = 1;
-
- orion_pcie_id(&dev, &rev);
- if (dev == MV88F5182_DEV_ID)
- max_usb_if = 2;
-
- for (usb_if = 0; usb_if < max_usb_if; usb_if++) {
- /*
- * First, disable and clear windows
- */
- for (i = 0; i < USB_MAX_WIN; i++) {
- orion_write(USB_WIN_BASE(usb_if, i), 0);
- orion_write(USB_WIN_CTRL(usb_if, i), 0);
- }
-
- /*
- * Setup windows for DDR banks.
- */
- for (i = 0; i < DDR_MAX_CS; i++) {
- u32 base, size;
- size = orion_read(DDR_SIZE_CS(i));
- base = orion_read(DDR_BASE_CS(i));
- if (size & DDR_BANK_EN) {
- base = DDR_REG_TO_BASE(base);
- size = DDR_REG_TO_SIZE(size);
- orion_write(USB_WIN_CTRL(usb_if, i),
- ((size-1) & 0xffff0000) |
- (ATTR_DDR_CS(i) << 8) |
- (TARGET_DDR << 4) | WIN_EN);
- orion_write(USB_WIN_BASE(usb_if, i),
- base & 0xffff0000);
- }
- }
- }
-}
-
void __init orion_setup_eth_wins(void)
{
int i;
diff --git a/arch/arm/mach-orion/common.c b/arch/arm/mach-orion/common.c
index cc16588e8c0c..d33c01dfc3f2 100644
--- a/arch/arm/mach-orion/common.c
+++ b/arch/arm/mach-orion/common.c
@@ -23,6 +23,7 @@
#include <asm/mach/arch.h>
#include <asm/mach/map.h>
#include <asm/arch/hardware.h>
+#include <asm/arch/platform.h>
#include "common.h"
/*****************************************************************************
@@ -149,6 +150,10 @@ static struct resource orion_ehci1_resources[] = {
},
};
+static struct orion_ehci_data orion_ehci_data = {
+ .dram = &orion_mbus_dram_info,
+};
+
static u64 ehci_dmamask = 0xffffffffUL;
static struct platform_device orion_ehci0 = {
@@ -157,6 +162,7 @@ static struct platform_device orion_ehci0 = {
.dev = {
.dma_mask = &ehci_dmamask,
.coherent_dma_mask = 0xffffffff,
+ .platform_data = &orion_ehci_data,
},
.resource = orion_ehci0_resources,
.num_resources = ARRAY_SIZE(orion_ehci0_resources),
@@ -168,6 +174,7 @@ static struct platform_device orion_ehci1 = {
.dev = {
.dma_mask = &ehci_dmamask,
.coherent_dma_mask = 0xffffffff,
+ .platform_data = &orion_ehci_data,
},
.resource = orion_ehci1_resources,
.num_resources = ARRAY_SIZE(orion_ehci1_resources),
@@ -334,7 +341,6 @@ void __init orion_init(void)
* Setup Orion address map
*/
orion_setup_cpu_wins();
- orion_setup_usb_wins();
orion_setup_eth_wins();
if (dev == MV88F5182_DEV_ID)
orion_setup_sata_wins();
diff --git a/arch/arm/mach-orion/common.h b/arch/arm/mach-orion/common.h
index 961daaa0b91b..c100355754f3 100644
--- a/arch/arm/mach-orion/common.h
+++ b/arch/arm/mach-orion/common.h
@@ -33,7 +33,6 @@ extern struct mbus_dram_target_info orion_mbus_dram_info;
void orion_setup_cpu_win(enum orion_target target, u32 base, u32 size, int remap);
void orion_setup_cpu_wins(void);
void orion_setup_eth_wins(void);
-void orion_setup_usb_wins(void);
void orion_setup_sata_wins(void);
/*
OpenPOWER on IntegriCloud