diff options
author | Paul Mundt <lethal@linux-sh.org> | 2010-01-25 22:58:40 -0500 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2010-01-25 22:58:40 -0500 |
commit | 9d56dd3b083a3bec56e9da35ce07baca81030b03 (patch) | |
tree | a9df9d514fbc32defc1ca8a6d7c2795f15b8a128 /arch/sh/mm/pmb.c | |
parent | a077e91690fb32a1453423b2cf1df3492fd30c3a (diff) |
sh: Mass ctrl_in/outX to __raw_read/writeX conversion.
The old ctrl in/out routines are non-portable and unsuitable for
cross-platform use. While drivers/sh has already been sanitized, there
is still quite a lot of code that is not. This converts the arch/sh/ bits
over, which permits us to flag the routines as deprecated whilst still
building with -Werror for the architecture code, and to ensure that
future users are not added.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/mm/pmb.c')
-rw-r--r-- | arch/sh/mm/pmb.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/arch/sh/mm/pmb.c b/arch/sh/mm/pmb.c index 3d5eece7e6d0..3c9bf5b5c36f 100644 --- a/arch/sh/mm/pmb.c +++ b/arch/sh/mm/pmb.c | |||
@@ -112,7 +112,7 @@ static void pmb_free(struct pmb_entry *pmbe) | |||
112 | static void __set_pmb_entry(unsigned long vpn, unsigned long ppn, | 112 | static void __set_pmb_entry(unsigned long vpn, unsigned long ppn, |
113 | unsigned long flags, int pos) | 113 | unsigned long flags, int pos) |
114 | { | 114 | { |
115 | ctrl_outl(vpn | PMB_V, mk_pmb_addr(pos)); | 115 | __raw_writel(vpn | PMB_V, mk_pmb_addr(pos)); |
116 | 116 | ||
117 | #ifdef CONFIG_CACHE_WRITETHROUGH | 117 | #ifdef CONFIG_CACHE_WRITETHROUGH |
118 | /* | 118 | /* |
@@ -124,7 +124,7 @@ static void __set_pmb_entry(unsigned long vpn, unsigned long ppn, | |||
124 | flags |= PMB_WT; | 124 | flags |= PMB_WT; |
125 | #endif | 125 | #endif |
126 | 126 | ||
127 | ctrl_outl(ppn | flags | PMB_V, mk_pmb_data(pos)); | 127 | __raw_writel(ppn | flags | PMB_V, mk_pmb_data(pos)); |
128 | } | 128 | } |
129 | 129 | ||
130 | static void set_pmb_entry(struct pmb_entry *pmbe) | 130 | static void set_pmb_entry(struct pmb_entry *pmbe) |
@@ -146,10 +146,10 @@ static void clear_pmb_entry(struct pmb_entry *pmbe) | |||
146 | 146 | ||
147 | /* Clear V-bit */ | 147 | /* Clear V-bit */ |
148 | addr = mk_pmb_addr(entry); | 148 | addr = mk_pmb_addr(entry); |
149 | ctrl_outl(ctrl_inl(addr) & ~PMB_V, addr); | 149 | __raw_writel(__raw_readl(addr) & ~PMB_V, addr); |
150 | 150 | ||
151 | addr = mk_pmb_data(entry); | 151 | addr = mk_pmb_data(entry); |
152 | ctrl_outl(ctrl_inl(addr) & ~PMB_V, addr); | 152 | __raw_writel(__raw_readl(addr) & ~PMB_V, addr); |
153 | 153 | ||
154 | back_to_cached(); | 154 | back_to_cached(); |
155 | } | 155 | } |
@@ -395,7 +395,7 @@ int pmb_init(void) | |||
395 | unsigned long vpn, ppn, flags; | 395 | unsigned long vpn, ppn, flags; |
396 | 396 | ||
397 | addr = PMB_DATA + (i << PMB_E_SHIFT); | 397 | addr = PMB_DATA + (i << PMB_E_SHIFT); |
398 | data = ctrl_inl(addr); | 398 | data = __raw_readl(addr); |
399 | if (!(data & PMB_V)) | 399 | if (!(data & PMB_V)) |
400 | continue; | 400 | continue; |
401 | 401 | ||
@@ -408,7 +408,7 @@ int pmb_init(void) | |||
408 | data &= ~(PMB_C | PMB_WT); | 408 | data &= ~(PMB_C | PMB_WT); |
409 | #endif | 409 | #endif |
410 | } | 410 | } |
411 | ctrl_outl(data, addr); | 411 | __raw_writel(data, addr); |
412 | 412 | ||
413 | ppn = data & PMB_PFN_MASK; | 413 | ppn = data & PMB_PFN_MASK; |
414 | 414 | ||
@@ -416,7 +416,7 @@ int pmb_init(void) | |||
416 | flags |= data & PMB_SZ_MASK; | 416 | flags |= data & PMB_SZ_MASK; |
417 | 417 | ||
418 | addr = PMB_ADDR + (i << PMB_E_SHIFT); | 418 | addr = PMB_ADDR + (i << PMB_E_SHIFT); |
419 | data = ctrl_inl(addr); | 419 | data = __raw_readl(addr); |
420 | 420 | ||
421 | vpn = data & PMB_PFN_MASK; | 421 | vpn = data & PMB_PFN_MASK; |
422 | 422 | ||
@@ -424,12 +424,12 @@ int pmb_init(void) | |||
424 | WARN_ON(IS_ERR(pmbe)); | 424 | WARN_ON(IS_ERR(pmbe)); |
425 | } | 425 | } |
426 | 426 | ||
427 | ctrl_outl(0, PMB_IRMCR); | 427 | __raw_writel(0, PMB_IRMCR); |
428 | 428 | ||
429 | /* Flush out the TLB */ | 429 | /* Flush out the TLB */ |
430 | i = ctrl_inl(MMUCR); | 430 | i = __raw_readl(MMUCR); |
431 | i |= MMUCR_TI; | 431 | i |= MMUCR_TI; |
432 | ctrl_outl(i, MMUCR); | 432 | __raw_writel(i, MMUCR); |
433 | 433 | ||
434 | back_to_cached(); | 434 | back_to_cached(); |
435 | 435 | ||
@@ -454,8 +454,8 @@ static int pmb_seq_show(struct seq_file *file, void *iter) | |||
454 | unsigned int size; | 454 | unsigned int size; |
455 | char *sz_str = NULL; | 455 | char *sz_str = NULL; |
456 | 456 | ||
457 | addr = ctrl_inl(mk_pmb_addr(i)); | 457 | addr = __raw_readl(mk_pmb_addr(i)); |
458 | data = ctrl_inl(mk_pmb_data(i)); | 458 | data = __raw_readl(mk_pmb_data(i)); |
459 | 459 | ||
460 | size = data & PMB_SZ_MASK; | 460 | size = data & PMB_SZ_MASK; |
461 | sz_str = (size == PMB_SZ_16M) ? " 16MB": | 461 | sz_str = (size == PMB_SZ_16M) ? " 16MB": |