diff options
author | Jayachandran C <jayachandranc@netlogicmicro.com> | 2011-11-16 00:21:28 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2011-12-07 22:04:56 +0000 |
commit | 65040e224e5b214a93fa0c790add5d69b054ecae (patch) | |
tree | 3d6b02575e61c04ad48535662398eae195f26ee1 /arch/mips/include/asm/netlogic/haldefs.h | |
parent | a3d4fb2d2a4c52b22cde90049a78e323cde187e5 (diff) |
MIPS: Netlogic: Add XLP platform files for XLP SoC
- Update common files to support XLP.
- Add arch/mips/include/asm/netlogic/xlp-hal for register definitions
and access macros
- Add arch/mips/netlogic/xlp/ for XLP specific files.
Signed-off-by: Jayachandran C <jayachandranc@netlogicmicro.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/2967/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/include/asm/netlogic/haldefs.h')
-rw-r--r-- | arch/mips/include/asm/netlogic/haldefs.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/arch/mips/include/asm/netlogic/haldefs.h b/arch/mips/include/asm/netlogic/haldefs.h index e3264c19aab..72a0c788b47 100644 --- a/arch/mips/include/asm/netlogic/haldefs.h +++ b/arch/mips/include/asm/netlogic/haldefs.h @@ -40,6 +40,9 @@ * and will provide a way to read 32/64 bit memory mapped registers in * all ABIs */ +#if !defined(CONFIG_64BIT) && defined(CONFIG_CPU_XLP) +#error "o32 compile not supported on XLP yet" +#endif /* * For o32 compilation, we have to disable interrupts and enable KX bit to * access 64 bit addresses or data. @@ -133,10 +136,28 @@ nlm_write_reg64_xkphys(uint64_t base, uint32_t reg, uint64_t val) /* Location where IO base is mapped */ extern uint64_t nlm_io_base; +#if defined(CONFIG_CPU_XLP) +static inline uint64_t +nlm_pcicfg_base(uint32_t devoffset) +{ + return nlm_io_base + devoffset; +} + +static inline uint64_t +nlm_xkphys_map_pcibar0(uint64_t pcibase) +{ + uint64_t paddr; + + paddr = nlm_read_reg(pcibase, 0x4) & ~0xfu; + return (uint64_t)0x9000000000000000 | paddr; +} +#elif defined(CONFIG_CPU_XLR) + static inline uint64_t nlm_mmio_base(uint32_t devoffset) { return nlm_io_base + devoffset; } +#endif #endif |