Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 163435
b: refs/heads/master
c: 7dd6662
h: refs/heads/master
i:
  163433: 74eefe5
  163431: f2ba248
v: v3
  • Loading branch information
Paul Mundt committed Aug 14, 2009
1 parent 51c4dc0 commit 1889eb7
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7a90e00dda0bae66b5232d5a37155f13a0581369
refs/heads/master: 7dd6662a92fe9a15ad565045aa60367995cc533d
34 changes: 33 additions & 1 deletion trunk/arch/sh/kernel/cpu/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* CPU init code
*
* Copyright (C) 2002 - 2007 Paul Mundt
* Copyright (C) 2002 - 2009 Paul Mundt
* Copyright (C) 2003 Richard Curnow
*
* This file is subject to the terms and conditions of the GNU General Public
Expand Down Expand Up @@ -62,6 +62,37 @@ static void __init speculative_execution_init(void)
#define speculative_execution_init() do { } while (0)
#endif

#ifdef CONFIG_CPU_SH4A
#define EXPMASK 0xff2f0004
#define EXPMASK_RTEDS (1 << 0)
#define EXPMASK_BRDSSLP (1 << 1)
#define EXPMASK_MMCAW (1 << 4)

static void __init expmask_init(void)
{
unsigned long expmask = __raw_readl(EXPMASK);

/*
* Future proofing.
*
* Disable support for slottable sleep instruction
* and non-nop instructions in the rte delay slot.
*/
expmask &= ~(EXPMASK_RTEDS | EXPMASK_BRDSSLP);

/*
* Enable associative writes to the memory-mapped cache array
* until the cache flush ops have been rewritten.
*/
expmask |= EXPMASK_MMCAW;

__raw_writel(expmask, EXPMASK);
ctrl_barrier();
}
#else
#define expmask_init() do { } while (0)
#endif

/* 2nd-level cache init */
void __uses_jump_to_uncached __attribute__ ((weak)) l2_cache_init(void)
{
Expand Down Expand Up @@ -321,4 +352,5 @@ asmlinkage void __init sh_cpu_init(void)
#endif

speculative_execution_init();
expmask_init();
}

0 comments on commit 1889eb7

Please sign in to comment.