diff options
author | Tzachi Perelstein <tzachi@marvell.com> | 2007-10-23 15:14:42 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2008-01-26 10:03:44 -0500 |
commit | c67de5b3c0bb48ac56f14928e11f1f7d76add26f (patch) | |
tree | fe611cc5bc571fc8d9068330b3ac95f2c85be19a /arch/arm/mach-orion/common.c | |
parent | 038ee0832ee1b1e2bd2be4599cd535ea9aaaf658 (diff) |
[ARM] Orion: programable address map support
The Orion has fully programable 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.
Signed-off-by: Tzachi Perelstein <tzachi@marvell.com>
Reviewed-by: Nicolas Pitre <nico@marvell.com>
Reviewed-by: Lennert Buytenhek <buytenh@marvell.com>
Diffstat (limited to 'arch/arm/mach-orion/common.c')
-rw-r--r-- | arch/arm/mach-orion/common.c | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/arch/arm/mach-orion/common.c b/arch/arm/mach-orion/common.c index e04f3f07cac0..69363cbcb63b 100644 --- a/arch/arm/mach-orion/common.c +++ b/arch/arm/mach-orion/common.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
14 | #include <linux/init.h> | 14 | #include <linux/init.h> |
15 | #include <asm/page.h> | 15 | #include <asm/page.h> |
16 | #include <asm/timex.h> | ||
16 | #include <asm/mach/map.h> | 17 | #include <asm/mach/map.h> |
17 | #include <asm/arch/orion.h> | 18 | #include <asm/arch/orion.h> |
18 | #include "common.h" | 19 | #include "common.h" |
@@ -51,3 +52,53 @@ void __init orion_map_io(void) | |||
51 | { | 52 | { |
52 | iotable_init(orion_io_desc, ARRAY_SIZE(orion_io_desc)); | 53 | iotable_init(orion_io_desc, ARRAY_SIZE(orion_io_desc)); |
53 | } | 54 | } |
55 | |||
56 | /***************************************************************************** | ||
57 | * General | ||
58 | ****************************************************************************/ | ||
59 | |||
60 | /* | ||
61 | * Identify device ID and rev from PCIE configuration header space '0'. | ||
62 | */ | ||
63 | static void orion_id(u32 *dev, u32 *rev, char **dev_name) | ||
64 | { | ||
65 | orion_pcie_id(dev, rev); | ||
66 | |||
67 | if (*dev == MV88F5281_DEV_ID) { | ||
68 | if (*rev == MV88F5281_REV_D2) { | ||
69 | *dev_name = "MV88F5281-D2"; | ||
70 | } else if (*rev == MV88F5281_REV_D1) { | ||
71 | *dev_name = "MV88F5281-D1"; | ||
72 | } else { | ||
73 | *dev_name = "MV88F5281-Rev-Unsupported"; | ||
74 | } | ||
75 | } else if (*dev == MV88F5182_DEV_ID) { | ||
76 | if (*rev == MV88F5182_REV_A2) { | ||
77 | *dev_name = "MV88F5182-A2"; | ||
78 | } else { | ||
79 | *dev_name = "MV88F5182-Rev-Unsupported"; | ||
80 | } | ||
81 | } else { | ||
82 | *dev_name = "Device-Unknown"; | ||
83 | } | ||
84 | } | ||
85 | |||
86 | void __init orion_init(void) | ||
87 | { | ||
88 | char *dev_name; | ||
89 | u32 dev, rev; | ||
90 | |||
91 | orion_id(&dev, &rev, &dev_name); | ||
92 | printk(KERN_INFO "Orion ID: %s. TCLK=%d.\n", dev_name, ORION_TCLK); | ||
93 | |||
94 | /* | ||
95 | * Setup Orion address map | ||
96 | */ | ||
97 | orion_setup_cpu_wins(); | ||
98 | orion_setup_usb_wins(); | ||
99 | orion_setup_eth_wins(); | ||
100 | orion_setup_pci_wins(); | ||
101 | orion_setup_pcie_wins(); | ||
102 | if (dev == MV88F5182_DEV_ID) | ||
103 | orion_setup_sata_wins(); | ||
104 | } | ||