3 #ifndef _DENVERTON_NS_SOC_UTIL_H_
4 #define _DENVERTON_NS_SOC_UTIL_H_
18 #ifdef __SIMPLE_DEVICE__
41 void *
memcpy_s(
void *dest,
const void *src,
size_t n);
49 #define MMIO8(x) (*((volatile u8 *)(x)))
50 #define MMIO16(x) (*((volatile u16 *)(x)))
51 #define MMIO32(x) (*((volatile u32 *)(x)))
53 #define MMIO_AND_OR(bits, x, and, or) \
54 (MMIO##bits(x) = ((MMIO##bits(x) & (and)) | (or)))
56 #define MMIO8_AND_OR(x, and, or) MMIO_AND_OR(8, x, and, or)
57 #define MMIO16_AND_OR(x, and, or) MMIO_AND_OR(16, x, and, or)
58 #define MMIO32_AND_OR(x, and, or) MMIO_AND_OR(32, x, and, or)
59 #define MMIO32_OR(x, or) MMIO_AND_OR(32, x, ~0UL, or)
60 #define MMIO32_AND(x, and) MMIO_AND_OR(32, x, and, 0UL)
uint16_t get_pmbase(void)
uint32_t get_pciebase(void)
uint32_t get_pcielength(void)
uint32_t get_top_of_low_memory(void)
struct device * get_pmc_dev(void)
uint16_t get_tcobase(void)
void * memcpy_s(void *dest, const void *src, size_t n)
uint8_t silicon_stepping(void)
uint64_t get_top_of_upper_memory(void)
uint32_t get_tseg_memory(void)
struct device * get_hostbridge_dev(void)
@ SILICON_REV_DENVERTON_B0
@ SILICON_REV_DENVERTON_A0
@ SILICON_REV_DENVERTON_A1
struct device * get_lpc_dev(void)
struct device * get_smbus_dev(void)
void mmio_andthenor32(void *addr, uint32_t val2and, uint32_t val2or)
unsigned long long uint64_t