diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-09-10 20:28:46 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-09-10 20:28:46 -0400 |
commit | d0a77454c70d0449a5f87087deb8f0cb15145e90 (patch) | |
tree | a6efb34357756faede3fd63f5a72e72977c68321 /arch | |
parent | c338bfb5ecf6c36b2112479691d69db4c2b5a78a (diff) | |
parent | 6c6d8deb5d95a0675a8edd588bbc2249cbce5b34 (diff) |
Merge branch 'fixes' of http://ftp.arm.linux.org.uk/pub/linux/arm/kernel/git-cur/linux-2.6-arm
* 'fixes' of http://ftp.arm.linux.org.uk/pub/linux/arm/kernel/git-cur/linux-2.6-arm:
ARM: 7088/1: entry: fix wrong parameter name used in do_thumb_abort
ARM: 7080/1: l2x0: make sure I&D are not locked down on init
ARM: 7081/1: mach-integrator: fix the clocksource
NET: am79c961: fix race in link status code
ARM: 7067/1: mm: keep significant bits in pfn_valid
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/include/asm/hardware/cache-l2x0.h | 9 | ||||
-rw-r--r-- | arch/arm/mach-integrator/integrator_ap.c | 6 | ||||
-rw-r--r-- | arch/arm/mm/abort-macro.S | 2 | ||||
-rw-r--r-- | arch/arm/mm/cache-l2x0.c | 21 | ||||
-rw-r--r-- | arch/arm/mm/init.c | 2 |
5 files changed, 33 insertions, 7 deletions
diff --git a/arch/arm/include/asm/hardware/cache-l2x0.h b/arch/arm/include/asm/hardware/cache-l2x0.h index bfa706ffd968..99a6ed7e1bfd 100644 --- a/arch/arm/include/asm/hardware/cache-l2x0.h +++ b/arch/arm/include/asm/hardware/cache-l2x0.h | |||
@@ -45,8 +45,13 @@ | |||
45 | #define L2X0_CLEAN_INV_LINE_PA 0x7F0 | 45 | #define L2X0_CLEAN_INV_LINE_PA 0x7F0 |
46 | #define L2X0_CLEAN_INV_LINE_IDX 0x7F8 | 46 | #define L2X0_CLEAN_INV_LINE_IDX 0x7F8 |
47 | #define L2X0_CLEAN_INV_WAY 0x7FC | 47 | #define L2X0_CLEAN_INV_WAY 0x7FC |
48 | #define L2X0_LOCKDOWN_WAY_D 0x900 | 48 | /* |
49 | #define L2X0_LOCKDOWN_WAY_I 0x904 | 49 | * The lockdown registers repeat 8 times for L310, the L210 has only one |
50 | * D and one I lockdown register at 0x0900 and 0x0904. | ||
51 | */ | ||
52 | #define L2X0_LOCKDOWN_WAY_D_BASE 0x900 | ||
53 | #define L2X0_LOCKDOWN_WAY_I_BASE 0x904 | ||
54 | #define L2X0_LOCKDOWN_STRIDE 0x08 | ||
50 | #define L2X0_TEST_OPERATION 0xF00 | 55 | #define L2X0_TEST_OPERATION 0xF00 |
51 | #define L2X0_LINE_DATA 0xF10 | 56 | #define L2X0_LINE_DATA 0xF10 |
52 | #define L2X0_LINE_TAG 0xF30 | 57 | #define L2X0_LINE_TAG 0xF30 |
diff --git a/arch/arm/mach-integrator/integrator_ap.c b/arch/arm/mach-integrator/integrator_ap.c index 2fbbdd5eac35..fcf0ae95651f 100644 --- a/arch/arm/mach-integrator/integrator_ap.c +++ b/arch/arm/mach-integrator/integrator_ap.c | |||
@@ -337,15 +337,15 @@ static unsigned long timer_reload; | |||
337 | static void integrator_clocksource_init(u32 khz) | 337 | static void integrator_clocksource_init(u32 khz) |
338 | { | 338 | { |
339 | void __iomem *base = (void __iomem *)TIMER2_VA_BASE; | 339 | void __iomem *base = (void __iomem *)TIMER2_VA_BASE; |
340 | u32 ctrl = TIMER_CTRL_ENABLE; | 340 | u32 ctrl = TIMER_CTRL_ENABLE | TIMER_CTRL_PERIODIC; |
341 | 341 | ||
342 | if (khz >= 1500) { | 342 | if (khz >= 1500) { |
343 | khz /= 16; | 343 | khz /= 16; |
344 | ctrl = TIMER_CTRL_DIV16; | 344 | ctrl |= TIMER_CTRL_DIV16; |
345 | } | 345 | } |
346 | 346 | ||
347 | writel(ctrl, base + TIMER_CTRL); | ||
348 | writel(0xffff, base + TIMER_LOAD); | 347 | writel(0xffff, base + TIMER_LOAD); |
348 | writel(ctrl, base + TIMER_CTRL); | ||
349 | 349 | ||
350 | clocksource_mmio_init(base + TIMER_VALUE, "timer2", | 350 | clocksource_mmio_init(base + TIMER_VALUE, "timer2", |
351 | khz * 1000, 200, 16, clocksource_mmio_readl_down); | 351 | khz * 1000, 200, 16, clocksource_mmio_readl_down); |
diff --git a/arch/arm/mm/abort-macro.S b/arch/arm/mm/abort-macro.S index 52162d59407a..2cbf68ef0e83 100644 --- a/arch/arm/mm/abort-macro.S +++ b/arch/arm/mm/abort-macro.S | |||
@@ -17,7 +17,7 @@ | |||
17 | cmp \tmp, # 0x5600 @ Is it ldrsb? | 17 | cmp \tmp, # 0x5600 @ Is it ldrsb? |
18 | orreq \tmp, \tmp, #1 << 11 @ Set L-bit if yes | 18 | orreq \tmp, \tmp, #1 << 11 @ Set L-bit if yes |
19 | tst \tmp, #1 << 11 @ L = 0 -> write | 19 | tst \tmp, #1 << 11 @ L = 0 -> write |
20 | orreq \psr, \psr, #1 << 11 @ yes. | 20 | orreq \fsr, \fsr, #1 << 11 @ yes. |
21 | b do_DataAbort | 21 | b do_DataAbort |
22 | not_thumb: | 22 | not_thumb: |
23 | .endm | 23 | .endm |
diff --git a/arch/arm/mm/cache-l2x0.c b/arch/arm/mm/cache-l2x0.c index 44c086710d2b..9ecfdb511951 100644 --- a/arch/arm/mm/cache-l2x0.c +++ b/arch/arm/mm/cache-l2x0.c | |||
@@ -277,6 +277,25 @@ static void l2x0_disable(void) | |||
277 | spin_unlock_irqrestore(&l2x0_lock, flags); | 277 | spin_unlock_irqrestore(&l2x0_lock, flags); |
278 | } | 278 | } |
279 | 279 | ||
280 | static void __init l2x0_unlock(__u32 cache_id) | ||
281 | { | ||
282 | int lockregs; | ||
283 | int i; | ||
284 | |||
285 | if (cache_id == L2X0_CACHE_ID_PART_L310) | ||
286 | lockregs = 8; | ||
287 | else | ||
288 | /* L210 and unknown types */ | ||
289 | lockregs = 1; | ||
290 | |||
291 | for (i = 0; i < lockregs; i++) { | ||
292 | writel_relaxed(0x0, l2x0_base + L2X0_LOCKDOWN_WAY_D_BASE + | ||
293 | i * L2X0_LOCKDOWN_STRIDE); | ||
294 | writel_relaxed(0x0, l2x0_base + L2X0_LOCKDOWN_WAY_I_BASE + | ||
295 | i * L2X0_LOCKDOWN_STRIDE); | ||
296 | } | ||
297 | } | ||
298 | |||
280 | void __init l2x0_init(void __iomem *base, __u32 aux_val, __u32 aux_mask) | 299 | void __init l2x0_init(void __iomem *base, __u32 aux_val, __u32 aux_mask) |
281 | { | 300 | { |
282 | __u32 aux; | 301 | __u32 aux; |
@@ -328,6 +347,8 @@ void __init l2x0_init(void __iomem *base, __u32 aux_val, __u32 aux_mask) | |||
328 | * accessing the below registers will fault. | 347 | * accessing the below registers will fault. |
329 | */ | 348 | */ |
330 | if (!(readl_relaxed(l2x0_base + L2X0_CTRL) & 1)) { | 349 | if (!(readl_relaxed(l2x0_base + L2X0_CTRL) & 1)) { |
350 | /* Make sure that I&D is not locked down when starting */ | ||
351 | l2x0_unlock(cache_id); | ||
331 | 352 | ||
332 | /* l2x0 controller is disabled */ | 353 | /* l2x0 controller is disabled */ |
333 | writel_relaxed(aux, l2x0_base + L2X0_AUX_CTRL); | 354 | writel_relaxed(aux, l2x0_base + L2X0_AUX_CTRL); |
diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c index 91bca355cd31..cc7e2d8be9aa 100644 --- a/arch/arm/mm/init.c +++ b/arch/arm/mm/init.c | |||
@@ -298,7 +298,7 @@ static void __init arm_bootmem_free(unsigned long min, unsigned long max_low, | |||
298 | #ifdef CONFIG_HAVE_ARCH_PFN_VALID | 298 | #ifdef CONFIG_HAVE_ARCH_PFN_VALID |
299 | int pfn_valid(unsigned long pfn) | 299 | int pfn_valid(unsigned long pfn) |
300 | { | 300 | { |
301 | return memblock_is_memory(pfn << PAGE_SHIFT); | 301 | return memblock_is_memory(__pfn_to_phys(pfn)); |
302 | } | 302 | } |
303 | EXPORT_SYMBOL(pfn_valid); | 303 | EXPORT_SYMBOL(pfn_valid); |
304 | #endif | 304 | #endif |