Skip to content
Snippets Groups Projects
Commit e31736d9 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull nios2 fix from Ley Foon Tan:
 "Fix nios2 ioremap regression"

* tag 'nios2-v5.5-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/lftan/nios2:
  nios2: Fix ioremap
parents 1482e664 e32ea127
No related branches found
No related tags found
No related merge requests found
...@@ -138,6 +138,14 @@ void __iomem *ioremap(unsigned long phys_addr, unsigned long size) ...@@ -138,6 +138,14 @@ void __iomem *ioremap(unsigned long phys_addr, unsigned long size)
return NULL; return NULL;
} }
/*
* Map uncached objects in the low part of address space to
* CONFIG_NIOS2_IO_REGION_BASE
*/
if (IS_MAPPABLE_UNCACHEABLE(phys_addr) &&
IS_MAPPABLE_UNCACHEABLE(last_addr))
return (void __iomem *)(CONFIG_NIOS2_IO_REGION_BASE + phys_addr);
/* Mappings have to be page-aligned */ /* Mappings have to be page-aligned */
offset = phys_addr & ~PAGE_MASK; offset = phys_addr & ~PAGE_MASK;
phys_addr &= PAGE_MASK; phys_addr &= PAGE_MASK;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment