-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Yoshihiro Shimoda
authored and
Paul Mundt
committed
Mar 10, 2009
1 parent
140f376
commit d3c64c2
Showing
10 changed files
with
105 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
--- | ||
refs/heads/master: a29b99eccecefe5026713b226f66f117c8837ad5 | ||
refs/heads/master: 2f47f44790a9c8fc43e515df3c6be19a35ee5de5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
/* | ||
* arch/sh/mm/fixed_pmb.c | ||
* | ||
* Copyright (C) 2009 Renesas Solutions Corp. | ||
* | ||
* This file is subject to the terms and conditions of the GNU General Public | ||
* License. See the file "COPYING" in the main directory of this archive | ||
* for more details. | ||
*/ | ||
#include <linux/init.h> | ||
#include <linux/mm.h> | ||
#include <linux/io.h> | ||
#include <asm/mmu.h> | ||
#include <asm/mmu_context.h> | ||
|
||
static int __uses_jump_to_uncached fixed_pmb_init(void) | ||
{ | ||
int i; | ||
unsigned long addr, data; | ||
|
||
jump_to_uncached(); | ||
|
||
for (i = 0; i < PMB_ENTRY_MAX; i++) { | ||
addr = PMB_DATA + (i << PMB_E_SHIFT); | ||
data = ctrl_inl(addr); | ||
if (!(data & PMB_V)) | ||
continue; | ||
|
||
if (data & PMB_C) { | ||
#if defined(CONFIG_CACHE_WRITETHROUGH) | ||
data |= PMB_WT; | ||
#elif defined(CONFIG_CACHE_WRITEBACK) | ||
data &= ~PMB_WT; | ||
#else | ||
data &= ~(PMB_C | PMB_WT); | ||
#endif | ||
} | ||
ctrl_outl(data, addr); | ||
} | ||
|
||
back_to_cached(); | ||
|
||
return 0; | ||
} | ||
arch_initcall(fixed_pmb_init); |