OpenRISC updates for 5.4

Few small things for 5.4:
  - Fixup ethoc ethernet device tree descriptors which were previously
    broken, now ethernet works on FPGAs running OpenRISC!
  - Switch ioremap to use uncached semantics - from Christoph Hellwig
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEE2cRzVK74bBA6Je/xw7McLV5mJ+QFAl2AAJUACgkQw7McLV5m
 J+R/eA//c6MbD18UZLlX7Q4khBc+1bMEwhRWPa7nnAV28Fy+0dAoa/2BUJU4KmEn
 +zeBvl0kUqPtAA1/jqGNRU32kz0DrT8A2Mos2VgHW5nhr5Uo99FPSF+GFNkIogAw
 U1KBviJs5R/Ujpp49adU4nDz8sOmZoNgs/J4AWBe8SPFtRQTCcYgjwxKz1P/Rx30
 uTc3EUpcxZQZATEzl+fih4F9DGJ03B+TcP7yg+NFiW8zXsHVtRU0/sf72YPTRkJZ
 rb34FCJwgpR2I3qxwk6fpSZQFP+EAaWAlkGfiFCur95r//x7fNItQ4CY1lqiOyYI
 aCznCwHLXVyTk83Wk0usgtoPwpVLiv/84OkO7FZiwZ6g5ewgjB/ELTMht14d38NC
 7GFzHg04Zq7z1twJ9o0MhDx/Ycj2i/zqKU0xl+aLAjGhiQkcNFOO8e0QfZGefaxc
 9DDrMcKH4XUbFDs5UJiMgZo+NjcrOcbkiUCiFj4TAWL/n+Tz/wYIMJkqDyDQYBzy
 vh2DkDFqmm4bFyOQdYBiFa1aors93JvfkNet9yYMwpjWJRZozBaHBAuQOkal2mo/
 9kXQnmHg0UxS/T7bwCNvfTfdIkyVAa3VJ/YHJNTg3dMhZpP73lEbzhveTilm6JE2
 13D4K6ln8+2S/JzyGnA96yYSrVJfsOFSuRn5gOgqCWXAXu8sNUY=
 =9DBC
 -----END PGP SIGNATURE-----

Merge tag 'for-linus' of git://github.com/openrisc/linux

Pull OpenRISC updates from Stafford Horne:
 "Few small things for 5.4:

   - Fixup ethoc ethernet device tree descriptors which were previously
     broken, now ethernet works on FPGAs running OpenRISC!

   - Switch ioremap to use uncached semantics - from Christoph Hellwig"

* tag 'for-linus' of git://github.com/openrisc/linux:
  openrisc: map as uncached in ioremap
  or1k: dts: Add ethoc device to SMP devicetree
  or1k: dts: Fix ethoc network configuration in or1ksim devicetree
This commit is contained in:
Linus Torvalds 2019-09-17 13:46:44 -07:00
commit 1e24aaabde
5 changed files with 17 additions and 24 deletions

View File

@ -49,8 +49,9 @@
};
enet0: ethoc@92000000 {
compatible = "opencores,ethmac-rtlsvn338";
reg = <0x92000000 0x100>;
compatible = "opencores,ethoc";
reg = <0x92000000 0x800>;
interrupts = <4>;
big-endian;
};
};

View File

@ -60,4 +60,10 @@
clock-frequency = <20000000>;
};
enet0: ethoc@92000000 {
compatible = "opencores,ethoc";
reg = <0x92000000 0x800>;
interrupts = <4>;
big-endian;
};
};

View File

@ -25,25 +25,11 @@
#define PIO_OFFSET 0
#define PIO_MASK 0
#define ioremap_nocache ioremap_nocache
#define ioremap_nocache ioremap
#include <asm-generic/io.h>
#include <asm/pgtable.h>
extern void __iomem *__ioremap(phys_addr_t offset, unsigned long size,
pgprot_t prot);
static inline void __iomem *ioremap(phys_addr_t offset, size_t size)
{
return __ioremap(offset, size, PAGE_KERNEL);
}
/* #define _PAGE_CI 0x002 */
static inline void __iomem *ioremap_nocache(phys_addr_t offset,
unsigned long size)
{
return __ioremap(offset, size,
__pgprot(pgprot_val(PAGE_KERNEL) | _PAGE_CI));
}
void __iomem *ioremap(phys_addr_t offset, unsigned long size);
extern void iounmap(void *addr);
#endif

View File

@ -97,7 +97,7 @@ extern void paging_init(void);
/* Define some higher level generic page attributes.
*
* If you change _PAGE_CI definition be sure to change it in
* io.h for ioremap_nocache() too.
* io.h for ioremap() too.
*/
/*

View File

@ -34,8 +34,7 @@ static unsigned int fixmaps_used __initdata;
* have to convert them into an offset in a page-aligned mapping, but the
* caller shouldn't need to know that small detail.
*/
void __iomem *__ref
__ioremap(phys_addr_t addr, unsigned long size, pgprot_t prot)
void __iomem *__ref ioremap(phys_addr_t addr, unsigned long size)
{
phys_addr_t p;
unsigned long v;
@ -66,7 +65,8 @@ __ioremap(phys_addr_t addr, unsigned long size, pgprot_t prot)
fixmaps_used += (size >> PAGE_SHIFT);
}
if (ioremap_page_range(v, v + size, p, prot)) {
if (ioremap_page_range(v, v + size, p,
__pgprot(pgprot_val(PAGE_KERNEL) | _PAGE_CI))) {
if (likely(mem_init_done))
vfree(area->addr);
else
@ -76,7 +76,7 @@ __ioremap(phys_addr_t addr, unsigned long size, pgprot_t prot)
return (void __iomem *)(offset + (char *)v);
}
EXPORT_SYMBOL(__ioremap);
EXPORT_SYMBOL(ioremap);
void iounmap(void *addr)
{