summaryrefslogtreecommitdiffstats
path: root/include/hw/misc/bcm2835_cprman.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/hw/misc/bcm2835_cprman.h')
-rw-r--r--include/hw/misc/bcm2835_cprman.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/include/hw/misc/bcm2835_cprman.h b/include/hw/misc/bcm2835_cprman.h
index 8ae2d4d17c..5c442e6ff9 100644
--- a/include/hw/misc/bcm2835_cprman.h
+++ b/include/hw/misc/bcm2835_cprman.h
@@ -21,6 +21,33 @@ DECLARE_INSTANCE_CHECKER(BCM2835CprmanState, CPRMAN,
#define CPRMAN_NUM_REGS (0x2000 / sizeof(uint32_t))
+typedef enum CprmanPll {
+ CPRMAN_PLLA = 0,
+ CPRMAN_PLLC,
+ CPRMAN_PLLD,
+ CPRMAN_PLLH,
+ CPRMAN_PLLB,
+
+ CPRMAN_NUM_PLL
+} CprmanPll;
+
+typedef struct CprmanPllState {
+ /*< private >*/
+ DeviceState parent_obj;
+
+ /*< public >*/
+ CprmanPll id;
+
+ uint32_t *reg_cm;
+ uint32_t *reg_a2w_ctrl;
+ uint32_t *reg_a2w_ana; /* ANA[0] .. ANA[3] */
+ uint32_t prediv_mask; /* prediv bit in ana[1] */
+ uint32_t *reg_a2w_frac;
+
+ Clock *xosc_in;
+ Clock *out;
+} CprmanPllState;
+
struct BCM2835CprmanState {
/*< private >*/
SysBusDevice parent_obj;
@@ -28,6 +55,8 @@ struct BCM2835CprmanState {
/*< public >*/
MemoryRegion iomem;
+ CprmanPllState plls[CPRMAN_NUM_PLL];
+
uint32_t regs[CPRMAN_NUM_REGS];
uint32_t xosc_freq;