35 #ifndef __NLM_HAL_HALDEFS_H__
36 #define __NLM_HAL_HALDEFS_H__
43 #if !defined(CONFIG_64BIT) && defined(CONFIG_CPU_XLP)
44 #error "o32 compile not supported on XLP yet"
54 static inline uint32_t nlm_save_flags_kx(
void)
59 static inline uint32_t nlm_save_flags_cop2(
void)
64 static inline void nlm_restore_flags(
uint32_t sr)
115 return nlm_read_reg(base, reg);
121 nlm_write_reg(base, reg, val);
127 return nlm_read_reg64(base, reg);
133 nlm_write_reg64(base, reg, val);
139 #if defined(CONFIG_CPU_XLP)
143 return nlm_io_base + devoffset;
147 nlm_xkphys_map_pcibar0(
uint64_t pcibase)
151 paddr = nlm_read_reg(pcibase, 0x4) & ~0xf
u;
154 #elif defined(CONFIG_CPU_XLR)
159 return nlm_io_base + devoffset;