Changeset View
Changeset View
Standalone View
Standalone View
sys/mips/broadcom/bcm_socinfo.h
- This file was copied to sys/mips/broadcom/bcm_siba.c.
Show All 38 Lines | struct bcm_socinfo { | ||||
uint32_t cpurate; /* in MHz */ | uint32_t cpurate; /* in MHz */ | ||||
uint32_t uartrate; /* in Hz */ | uint32_t uartrate; /* in Hz */ | ||||
int double_count; | int double_count; | ||||
}; | }; | ||||
struct bcm_socinfo* bcm_get_socinfo_by_socid(uint32_t key); | struct bcm_socinfo* bcm_get_socinfo_by_socid(uint32_t key); | ||||
struct bcm_socinfo* bcm_get_socinfo(void); | struct bcm_socinfo* bcm_get_socinfo(void); | ||||
#define BCM_SOCADDR 0x18000000 | |||||
#define BCM_REG_CHIPC_ID 0x0 | |||||
#define BCM_REG_CHIPC_UART 0x300 | |||||
#define BCM_REG_CHIPC_PMUWD_OFFS 0x634 | |||||
#define BCM_SOCREG(reg) \ | |||||
MIPS_PHYS_TO_KSEG1((BCM_SOCADDR + (reg))) | |||||
#define BCM_READ_REG32(reg) \ | |||||
*((volatile uint32_t *)BCM_SOCREG(reg)) | |||||
#define BCM_WRITE_REG32(reg, value) \ | |||||
do { \ | |||||
writel((void*)BCM_SOCREG((reg)),value); \ | |||||
} while (0); | |||||
#endif /* _MIPS_BROADCOM_BCM_SOCINFO_H_ */ | #endif /* _MIPS_BROADCOM_BCM_SOCINFO_H_ */ |