Commit 4cfa8e75 authored by Paul Mundt's avatar Paul Mundt

sh: make pmb iomapping configurable.

This plugs in an early_param for permitting transparent PMB-backed
ioremapping to be enabled/disabled. For the time being, we use a
default-disabled policy.
Signed-off-by: default avatarPaul Mundt <lethal@linux-sh.org>
parent 90e7d649
...@@ -68,6 +68,8 @@ static DEFINE_RWLOCK(pmb_rwlock); ...@@ -68,6 +68,8 @@ static DEFINE_RWLOCK(pmb_rwlock);
static struct pmb_entry pmb_entry_list[NR_PMB_ENTRIES]; static struct pmb_entry pmb_entry_list[NR_PMB_ENTRIES];
static DECLARE_BITMAP(pmb_map, NR_PMB_ENTRIES); static DECLARE_BITMAP(pmb_map, NR_PMB_ENTRIES);
static unsigned int pmb_iomapping_enabled;
static __always_inline unsigned long mk_pmb_entry(unsigned int entry) static __always_inline unsigned long mk_pmb_entry(unsigned int entry)
{ {
return (entry & PMB_E_MASK) << PMB_E_SHIFT; return (entry & PMB_E_MASK) << PMB_E_SHIFT;
...@@ -284,6 +286,9 @@ void __iomem *pmb_remap_caller(phys_addr_t phys, unsigned long size, ...@@ -284,6 +286,9 @@ void __iomem *pmb_remap_caller(phys_addr_t phys, unsigned long size,
unsigned long aligned; unsigned long aligned;
struct vm_struct *area; struct vm_struct *area;
if (!pmb_iomapping_enabled)
return NULL;
/* /*
* Small mappings need to go through the TLB. * Small mappings need to go through the TLB.
*/ */
...@@ -684,6 +689,18 @@ static void __init pmb_resize(void) ...@@ -684,6 +689,18 @@ static void __init pmb_resize(void)
} }
#endif #endif
static int __init early_pmb(char *p)
{
if (!p)
return 0;
if (strstr(p, "iomap"))
pmb_iomapping_enabled = 1;
return 0;
}
early_param("pmb", early_pmb);
void __init pmb_init(void) void __init pmb_init(void)
{ {
/* Synchronize software state */ /* Synchronize software state */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment