diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-14 16:42:43 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-14 16:42:43 -0400 |
commit | 2cf4d4514d5b43c1f3b64bd0ec8b9853bde8f1dc (patch) | |
tree | e35a625496acc6ac852846d40b8851186b9d1ac4 /arch/arm/mach-orion5x/addr-map.c | |
parent | 44b7532b8b464f606053562400719c9c21276037 (diff) | |
parent | ce53895a5d24e0ee19fb92f56c17323fb4c9ab27 (diff) |
Merge branch 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm
* 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm: (417 commits)
MAINTAINERS: EB110ATX is not ebsa110
MAINTAINERS: update Eric Miao's email address and status
fb: add support of LCD display controller on pxa168/910 (base layer)
[ARM] 5552/1: ep93xx get_uart_rate(): use EP93XX_SYSCON_PWRCNT and EP93XX_SYSCON_PWRCN
[ARM] pxa/sharpsl_pm: zaurus needs generic pxa suspend/resume routines
[ARM] 5544/1: Trust PrimeCell resource sizes
[ARM] pxa/sharpsl_pm: cleanup of gpio-related code.
[ARM] pxa/sharpsl_pm: drop set_irq_type calls
[ARM] pxa/sharpsl_pm: merge pxa-specific code into generic one
[ARM] pxa/sharpsl_pm: merge the two sharpsl_pm.c since it's now pxa specific
[ARM] sa1100: remove unused collie_pm.c
[ARM] pxa: fix the conflicting non-static declarations of global_gpios[]
[ARM] 5550/1: Add default configure file for w90p910 platform
[ARM] 5549/1: Add clock api for w90p910 platform.
[ARM] 5548/1: Add gpio api for w90p910 platform
[ARM] 5551/1: Add multi-function pin api for w90p910 platform.
[ARM] Make ARM_VIC_NR depend on ARM_VIC
[ARM] 5546/1: ARM PL022 SSP/SPI driver v3
ARM: OMAP4: SMP: Update defconfig for OMAP4430
ARM: OMAP4: SMP: Enable SMP support for OMAP4430
...
Diffstat (limited to 'arch/arm/mach-orion5x/addr-map.c')
-rw-r--r-- | arch/arm/mach-orion5x/addr-map.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/arch/arm/mach-orion5x/addr-map.c b/arch/arm/mach-orion5x/addr-map.c index c14d12137276..6f3f77d031d0 100644 --- a/arch/arm/mach-orion5x/addr-map.c +++ b/arch/arm/mach-orion5x/addr-map.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/init.h> | 14 | #include <linux/init.h> |
15 | #include <linux/mbus.h> | 15 | #include <linux/mbus.h> |
16 | #include <linux/io.h> | 16 | #include <linux/io.h> |
17 | #include <linux/errno.h> | ||
17 | #include <mach/hardware.h> | 18 | #include <mach/hardware.h> |
18 | #include "common.h" | 19 | #include "common.h" |
19 | 20 | ||
@@ -44,6 +45,7 @@ | |||
44 | #define TARGET_DEV_BUS 1 | 45 | #define TARGET_DEV_BUS 1 |
45 | #define TARGET_PCI 3 | 46 | #define TARGET_PCI 3 |
46 | #define TARGET_PCIE 4 | 47 | #define TARGET_PCIE 4 |
48 | #define TARGET_SRAM 9 | ||
47 | #define ATTR_PCIE_MEM 0x59 | 49 | #define ATTR_PCIE_MEM 0x59 |
48 | #define ATTR_PCIE_IO 0x51 | 50 | #define ATTR_PCIE_IO 0x51 |
49 | #define ATTR_PCIE_WA 0x79 | 51 | #define ATTR_PCIE_WA 0x79 |
@@ -53,6 +55,7 @@ | |||
53 | #define ATTR_DEV_CS1 0x1d | 55 | #define ATTR_DEV_CS1 0x1d |
54 | #define ATTR_DEV_CS2 0x1b | 56 | #define ATTR_DEV_CS2 0x1b |
55 | #define ATTR_DEV_BOOT 0xf | 57 | #define ATTR_DEV_BOOT 0xf |
58 | #define ATTR_SRAM 0x0 | ||
56 | 59 | ||
57 | /* | 60 | /* |
58 | * Helpers to get DDR bank info | 61 | * Helpers to get DDR bank info |
@@ -87,13 +90,13 @@ static int __init orion5x_cpu_win_can_remap(int win) | |||
87 | return 0; | 90 | return 0; |
88 | } | 91 | } |
89 | 92 | ||
90 | static void __init setup_cpu_win(int win, u32 base, u32 size, | 93 | static int __init setup_cpu_win(int win, u32 base, u32 size, |
91 | u8 target, u8 attr, int remap) | 94 | u8 target, u8 attr, int remap) |
92 | { | 95 | { |
93 | if (win >= 8) { | 96 | if (win >= 8) { |
94 | printk(KERN_ERR "setup_cpu_win: trying to allocate " | 97 | printk(KERN_ERR "setup_cpu_win: trying to allocate " |
95 | "window %d\n", win); | 98 | "window %d\n", win); |
96 | return; | 99 | return -ENOSPC; |
97 | } | 100 | } |
98 | 101 | ||
99 | writel(base & 0xffff0000, CPU_WIN_BASE(win)); | 102 | writel(base & 0xffff0000, CPU_WIN_BASE(win)); |
@@ -107,6 +110,7 @@ static void __init setup_cpu_win(int win, u32 base, u32 size, | |||
107 | writel(remap & 0xffff0000, CPU_WIN_REMAP_LO(win)); | 110 | writel(remap & 0xffff0000, CPU_WIN_REMAP_LO(win)); |
108 | writel(0, CPU_WIN_REMAP_HI(win)); | 111 | writel(0, CPU_WIN_REMAP_HI(win)); |
109 | } | 112 | } |
113 | return 0; | ||
110 | } | 114 | } |
111 | 115 | ||
112 | void __init orion5x_setup_cpu_mbus_bridge(void) | 116 | void __init orion5x_setup_cpu_mbus_bridge(void) |
@@ -193,3 +197,9 @@ void __init orion5x_setup_pcie_wa_win(u32 base, u32 size) | |||
193 | setup_cpu_win(win_alloc_count++, base, size, | 197 | setup_cpu_win(win_alloc_count++, base, size, |
194 | TARGET_PCIE, ATTR_PCIE_WA, -1); | 198 | TARGET_PCIE, ATTR_PCIE_WA, -1); |
195 | } | 199 | } |
200 | |||
201 | int __init orion5x_setup_sram_win(void) | ||
202 | { | ||
203 | return setup_cpu_win(win_alloc_count, ORION5X_SRAM_PHYS_BASE, | ||
204 | ORION5X_SRAM_SIZE, TARGET_SRAM, ATTR_SRAM, -1); | ||
205 | } | ||