1 // SPDX-License-Identifier: GPL-2.0+
3 * Copyright (c) 2013 Broadcom
21 // types of PMB devices
33 uint32_t num_sr_bits
:8;
34 uint32_t devType
:4; // see enum above
35 uint32_t reserved1
:12;
38 } BPCM_CAPABILITES_REG
;
54 uint32_t thresh_en_s
:1;
55 uint32_t thresh_en_h
:1;
56 uint32_t continuous_s
:1;
57 uint32_t continuous_h
:1;
66 } BPCM_AVS_ROSC_CONTROL_REG
;
70 uint32_t thresh_lo
:16;
71 uint32_t thresh_hi
:16;
74 } BPCM_AVS_ROSC_THRESHOLD
;
82 } BPCM_AVS_ROSC_COUNT
;
87 uint32_t pwd_alert_sel
:1;
98 } BPCM_AVS_PWD_CONTROL
;
105 } BPCM_PWD_ACCUM_CONTROL
;
121 uint32_t vdsl_arm_por_reset_n
:1;
122 uint32_t vdsl_arm_reset_n
:1;
123 uint32_t vdsl_arm_debug_reset_n
:1;
124 uint32_t vdsl_arm_l2_reset_n
:1;
125 uint32_t vdsl_arm_cdbgrstreq_en
:1;
126 uint32_t vdsl_arm_niden_a7_b0
:1;
127 uint32_t vdsl_arm_spniden_a7_b0
:1;
128 uint32_t vdsl_arm_nsocdbgreset_a7
:1;
129 uint32_t axi4_ubus4_pass_through_disable
:1;
130 uint32_t vdsl_arm_dbgen_a7_b0
:1;
131 uint32_t vdsl_arm_spiden_a7_b0
:1;
132 uint32_t vdsl_arm_scratch_reg
:21;
134 } BPCM_VDSL_ARM_RST_CTL
;
148 uint32_t iddq_bias
:1; /* 0 */
149 uint32_t ext_pwr_down
:4; /* 1-4 */
150 uint32_t force_dll_en
:1; /* 5 */
151 uint32_t iddq_global_pwr
:1; /* 6 */
152 uint32_t reserved
:25;
153 } Bits_switch_z1_qgphy
;
155 uint32_t iddq_bias
:1; /* 0 */
156 uint32_t ext_pwr_down
:1; /* 1 */
157 uint32_t force_dll_en
:1; /* 2 */
158 uint32_t iddq_global_pwd
:1; /* 3 */
159 uint32_t ck25_dis
:1; /* 4 */
160 uint32_t phy_reset
:1; /* 5 */
161 uint32_t reserved0
:2;
162 uint32_t phy_ad
:5; /* 8-12 */
163 uint32_t reserved1
:18;
164 uint32_t ctrl_en
:1; /* 31 */
167 uint32_t iddq_bias
:1; /* 0 */
168 uint32_t ext_pwr_down
:4; /* 1-4 */
169 uint32_t force_dll_en
:1; /* 5 */
170 uint32_t iddq_global_pwd
:1; /* 6 */
171 uint32_t ck25_dis
:1; /* 7 */
172 uint32_t phy_reset
:1; /* 8 */
173 uint32_t reserved0
:3;
174 uint32_t phy_ad
:5; /* 12-16 */
175 uint32_t reserved1
:14;
176 uint32_t ctrl_en
:1; /* 31 */
179 uint32_t iddq_bias
:1; /* 0 */
180 uint32_t ext_pwr_down
:4; /* 1-4 */
181 uint32_t force_dll_en
:1; /* 5 */
182 uint32_t iddq_global_pwr
:1; /* 6 */
183 uint32_t reserved0
:25; /* 7-31 */
189 uint32_t alt_bfc_vector
:12; /* 00-11 */
190 uint32_t reserved0
:3;
191 uint32_t alt_bfc_en
:1; /* 15 */
192 uint32_t reset_dly_cfg
:2; /* 16-17 */
193 uint32_t reserved1
:8;
194 uint32_t ext_mclk_en_reset
:1; /* 26 */
195 uint32_t ext_mclk_en
:1; /* 27 */
196 uint32_t por_reset_n_ctl
:1; /* 28 */
197 uint32_t reset_n_ctl
:1; /* 29 */
198 uint32_t reserved2
:1;
199 uint32_t clken
:1; /* 31 */
209 uint32_t alt_bfc_vector
:12; /* 00-11 */
210 uint32_t reserved0
:3;
211 uint32_t alt_bfc_en
:1; /* 15 */
212 uint32_t reset_dly_cfg
:2; /* 16-17 */
213 uint32_t reserved1
:8;
214 uint32_t ext_mclk_en_reset
:1; /* 26 */
215 uint32_t ext_mclk_en
:1; /* 27 */
216 uint32_t por_reset_n_ctl
:1; /* 28 */
217 uint32_t reset_n_ctl
:1; /* 29 */
218 uint32_t reserved2
:1;
219 uint32_t clken
:1; /* 31 */
220 } Bits_vdsl_mips
; /* second PHY MIPS core */
222 } BPCM_MISC_CONTROL2
;
226 uint32_t gphy_iddq_bias
:1; /* 00 */
227 uint32_t gphy_ext_pwr_down
:1; /* 01 */
228 uint32_t gphy_force_dll_en
:1; /* 02 */
229 uint32_t gphy_iddq_global_pwr
:1; /* 03 */
230 uint32_t serdes_iddq
:1; /* 04 */
231 uint32_t serdes_pwrdwn
:1; /* 05 */
232 uint32_t reserved0
:2; /* 07:06 */
233 uint32_t serdes_refclk_sel
:3; /* 10:08 */
234 uint32_t reserved1
:5; /* 15:11 */
235 uint32_t pll_clk125_250_sel
:1; /* 16 */
236 uint32_t pll_mux_clk_250_sel
:1; /* 17 */
237 uint32_t reserved2
:14; /* 31:18 */
251 uint32_t cpu_reset_n
:8; // 07:00 R/W
252 uint32_t c0l2_reset
:1; // 08:08 R/W
253 uint32_t c1l2_reset
:1; // 09:09 R/W
254 uint32_t reserved0
:6; // 15:10 R/O
255 uint32_t cpu_bpcm_init_on
:8; // 23:16 R/W
256 uint32_t c0l2_bpcm_init_on
:1; // 24:24 R/W
257 uint32_t c1l2_bpcm_init_on
:1; // 25:25 R/W
258 uint32_t ubus_sr
:1; // 26:26 R/W
259 uint32_t cci_sr
:1; // 27:27 R/W
260 uint32_t webcores_sr
:1; // 28:28 R/W
261 uint32_t hw_done
:1; // 29:29 R/O
262 uint32_t sw_done
:1; // 30:30 R/W
263 uint32_t start
:1; // 31:31 R/W
270 uint32_t mem_pwr_ok
:1; // 00:00 R/W
271 uint32_t mem_pwr_on
:1; // 01:01 R/W
272 uint32_t mem_clamp_on
:1; // 02:02 R/W
273 uint32_t reserved2
:1; // 03:03 R/W
274 uint32_t mem_pwr_ok_status
:1; // 04:04 R/O
275 uint32_t mem_pwr_on_status
:1; // 05:05 R/O
276 uint32_t reserved1
:2; // 07:06 R/W
277 uint32_t mem_pda
:4; // 11:08 R/W only LS bit for CPU0/1, all four bits for neon_l2
278 uint32_t reserved0
:3; // 14:12 R/W
279 uint32_t clamp_on
:1; // 15:15 R/W
280 uint32_t pwr_ok
:4; // 19:16 R/W ditto
281 uint32_t pwr_on
:4; // 23:20 R/W ditto
282 uint32_t pwr_ok_status
:4; // 27:24 R/O ditto
283 uint32_t pwr_on_status
:4; // 31:28 R/O only LS 2-bits for CPU1, only LS 1 bit for neon_l2
286 } ARM_CPUx_PWR_CTRL_REG
;
290 uint32_t resetb
:1; // 00:00
291 uint32_t post_resetb
:1; // 01:01
292 uint32_t pwrdwn
:1; // 02:02
293 uint32_t master_reset
:1; // 03:03
294 uint32_t pwrdwn_ldo
:1; // 04:04
295 uint32_t iso
:1; // 05:05 // only used in afepll
296 uint32_t reserved0
:2; // 07:06
297 uint32_t ldo_ctrl
:6; // 13:08
298 uint32_t reserved1
:1; // 14:14
299 uint32_t hold_ch_all
:1; // 15:15
300 uint32_t reserved2
:4; // 16:19
301 uint32_t byp_wait
:1; // 20:20 // only used in b15pll
302 uint32_t reserved3
:11; // 21:31
309 uint32_t fb_offset
:12; // 11:00
310 uint32_t fb_phase_en
:1; // 12:12
311 uint32_t _8phase_en
:1; // 13:13
312 uint32_t sr
:18; // 31:14
319 uint32_t ndiv_int
:10; // 09:00
320 uint32_t ndiv_frac
:20; // 29:10
321 uint32_t reserved0
:1; // 30
322 uint32_t ndiv_override
:1; // 31
329 uint32_t pdiv
:3; // 02:00
330 uint32_t reserved0
:28; // 30:03
331 uint32_t ndiv_pdiv_override
:1; // 31:31
338 uint32_t mdiv0
:8; // 07:00
339 uint32_t enableb_ch0
:1; // 08:08
340 uint32_t hold_ch0
:1; // 09:09
341 uint32_t load_en_ch0
:1; // 10:10
342 uint32_t mdel0
:1; // 11:11
343 uint32_t reserved0
:3; // 14:12
344 uint32_t mdiv_override0
:1; // 15:15
345 uint32_t mdiv1
:8; // 23:16
346 uint32_t enableb_ch1
:1; // 24:24
347 uint32_t hold_ch1
:1; // 25:25
348 uint32_t load_en_ch1
:1; // 26:26
349 uint32_t mdel1
:1; // 27:27
350 uint32_t reserved1
:3; // 30:28
351 uint32_t mdiv_override1
:1; // 31:31
358 uint32_t reserved0
:4; // 03:00
359 uint32_t ka
:3; // 06:04
360 uint32_t reserved1
:1; // 07:07
361 uint32_t ki
:3; // 10:08
362 uint32_t reserved2
:1; // 11:11
363 uint32_t kp
:4; // 15:12
364 uint32_t ssc_step
:16; // 31:16
371 uint32_t ssc_limit
:22; // 21:00
372 uint32_t reserved0
:2; // 23:22
373 uint32_t ssc_clkdiv
:4; // 27:24
374 uint32_t ssc_status
:1; // 28:28
375 uint32_t reserved1
:2; // 30:29
376 uint32_t ssc_mode
:1; // 31:31
383 uint32_t fdco_ctrl_bypass
:16; // 15:00
384 uint32_t fdco_bypass_en
:1; // 16:16
385 uint32_t fdco_dac_sel
:1; // 17:17
386 uint32_t state_reset
:1; // 18:18
387 uint32_t state_mode
:2; // 20:19
388 uint32_t state_sel
:3; // 23:21
389 uint32_t state_update
:1; // 24:24
390 uint32_t dco_en
:1; // 25:25
391 uint32_t dco_div2_div4
:1; // 26:26
392 uint32_t dco_bias_boost
:1; // 27:27
393 uint32_t bb_en
:1; // 28:28
394 uint32_t t2d_offset
:3; // 31:29
401 uint32_t t2d_offset_msb
:1; // 00:00
402 uint32_t t2d_clk_enable
:1; // 01:01
403 uint32_t t2d_clk_sel
:1; // 02:02
404 uint32_t kpp
:4; // 06:03
405 uint32_t pwm_ctrl
:2; // 08:07
406 uint32_t port_reset_mode
:2; // 10:09
407 uint32_t byp2_en
:1; // 11:11
408 uint32_t byp1_en
:1; // 12:12
409 uint32_t ref_diff_sel
:1; // 13:13
410 uint32_t ki_startlow
:1; // 14:14
411 uint32_t en_500ohm
:1; // 15:15
412 uint32_t refd2c_bias
:3; // 18:16
413 uint32_t post_div2_div3
:1; // 19:19
414 uint32_t ki_boost
:1; // 20:20
415 uint32_t reserved0
:11; // 31:21
422 uint32_t en_cml
:3; // 02:00
423 uint32_t tri_en
:1; // 03:03
424 uint32_t test_sel
:3; // 06:04
425 uint32_t test_en
:1; // 07:07
426 uint32_t reserved0
:24;
433 uint32_t out
:12; // 11:00
434 uint32_t reserved
:19; // 30:12
435 uint32_t lock
:1; // 31:31
442 uint32_t ndiv_int
:10; // 09:00
443 uint32_t reserved0
:2; // 11:10
444 uint32_t ndiv_frac
:20; // 31:12
451 uint32_t pdiv
:4; // 03:00
452 uint32_t reserved0
:12; // 15:04
453 uint32_t mdiv0
:8; // 23:16
454 uint32_t mdiv1
:8; // 31:24
461 uint32_t mdiv2
:8; // 07:00
462 uint32_t mdiv3
:8; // 15:08
463 uint32_t mdiv4
:8; // 23:16
464 uint32_t mdiv5
:8; // 31:24
471 uint32_t manual_clk_en
:1;
472 uint32_t manual_reset_ctl
:1;
473 uint32_t freq_scale_used
:1; // R/O
474 uint32_t dpg_capable
:1; // R/O
475 uint32_t manual_mem_pwr
:2;
476 uint32_t manual_iso_ctl
:1;
477 uint32_t manual_ctl
:1;
478 uint32_t dpg_ctl_en
:1;
479 uint32_t pwr_dn_req
:1;
480 uint32_t pwr_up_req
:1;
481 uint32_t mem_pwr_ctl_en
:1;
482 uint32_t blk_reset_assert
:1;
485 uint32_t pwr_cntl_state
:5;
486 uint32_t freq_scalar_dyn_sel
:1; // R/O
487 uint32_t pwr_off_state
:1; // R/O
488 uint32_t pwr_on_state
:1; // R/O
489 uint32_t pwr_good
:1; // R/O
490 uint32_t dpg_pwr_state
:1; // R/O
491 uint32_t mem_pwr_state
:1; // R/O
492 uint32_t iso_state
:1; // R/O
493 uint32_t reset_state
:1; // R/O
496 } BPCM_PWR_ZONE_N_CONTROL
;
500 uint32_t pwr_ok_delay_sel
:3;
501 uint32_t pwk_ok_thresh
:2;
503 uint32_t iso_on_delay
:4;
504 uint32_t iso_off_delay
:4;
505 uint32_t clock_on_delay
:4;
506 uint32_t clock_off_delay
:4;
507 uint32_t reset_on_delay
:4;
508 uint32_t reset_off_delay
:4;
511 } BPCM_PWR_ZONE_N_CONFIG1
;
515 uint32_t delay_prescale_sel
:3;
516 uint32_t slew_prescale_sel
:3;
518 uint32_t dpgn_on_delay
:4;
519 uint32_t dpg1_on_delay
:4;
520 uint32_t dpg_off_delay
:4;
521 uint32_t mem_on_delay
:4;
522 uint32_t mem_off_delay
:4;
525 } BPCM_PWR_ZONE_N_CONFIG2
;
529 uint32_t fs_bypass_en
:1;
531 uint32_t use_dyn_gear_sel
:1;
532 uint32_t reserved2
:1;
533 uint32_t low_gear_div
:3;
534 uint32_t high_gear_div
:3;
535 uint32_t reserved
:22;
538 } BPCM_ZONE_N_FREQ_SCALAR_CONTROL
;
541 BPCM_PWR_ZONE_N_CONTROL control
;
542 BPCM_PWR_ZONE_N_CONFIG1 config1
;
543 BPCM_PWR_ZONE_N_CONFIG2 config2
;
545 uint32_t timer_control
;
546 uint32_t timer_status
;
547 uint32_t reserved1
[2];
550 #define BPCMZoneOffset(reg) offsetof(BPCM_ZONE,reg)
551 #define BPCMZoneRegOffset(reg) (BPCMZoneOffset(reg) >> 2)
557 uint32_t module_id
:16;
564 uint32_t num_zones
:8;
565 uint32_t sr_reg_bits
:8;
567 uint32_t reserved0
:1;
569 uint32_t reserved1
:12;
572 } BPCM_UBUS_CAPABILITES_REG
;
576 uint32_t ctrl_eswap
:4;
577 uint32_t reserved0
:4;
579 uint32_t reserved1
:4;
580 uint32_t ctrl_seclev
:8;
581 uint32_t reqout_seclev
:8;
584 } BPCM_UBUS_CTRL_REG
;
589 uint64_t addr_out
:24;
604 uint32_t ubus_soft_rst
:1;
605 uint32_t alt_ubus_clk_sel
:1;
606 uint32_t obsv_clk_swinit
:1;
607 uint32_t reserved0
:17;
608 uint32_t wl0_rf_enable
:1;
609 uint32_t wl1_rf_enable
:1;
610 uint32_t reserved1
:10;
613 } BPCM_CLKRST_CONTROL
;
615 // There is a 20-bit address used to access any given BPCM register. The upper 8-bits
616 // is the device address and the lower 12-bits is used to represent the BPCM register
617 // set for that device. 32-bit registers are allocated on 4-byte boundaries
618 // (i.e. 0, 1, 2, 3...) rather than on byte boundaries (0x00, 0x04, 0x08, 0x0c...)
619 // Thus, to get the actual address of any given register within the device's address
620 // space, I'll use the "C" offsetof macro and divide the result by 4
622 // int regOffset = offsetof(BPCM_REGS,BPCM_AVS_PWD_CONTROL); // yields the byte offset of the target register
623 // int regAddress = regOffset/4; // yields the 32-bit word offset of the target register
624 // The ReadBPCMReg and WriteBPCMReg functions will always take a device address
625 // (address of the BPCM device) and register offset (like regOffset above). The offset
626 // will be divided by 4 and used as the lower 12-bits of the actual target address, while the
627 // device address will serve as the upper 8-bits of the actual address.
630 BPCM_ID_REG id_reg
; // offset 0x00, PMB reg index 0
631 BPCM_CAPABILITES_REG capabilities
; // offset 0x04, PMB reg index 1
632 uint32_t reserved0
[2]; // offset 0x08, PMB reg index 2/3
634 uint32_t control
; // offset 0x10, PMB reg index 4
635 BPCM_SR_CONTROL sr_control
; // offset 0x14, PMB reg index 5
636 uint32_t reserved1
[2]; // offset 0x18, PMB reg index 6/7
637 // Client-specific registers
638 uint32_t client_specific
[24]; // offset 0x20, PMB reg index 8..31
640 BPCM_ZONE zones
[]; // offset 0x80..(0x20 + MAX_ZONES*32)), PMB reg index 32..(32+(MAX_ZONES*8-1))
641 } BPCM_REGS
; // total offset space = 4096
643 #define BPCM_OFFSET(reg) (offsetof(BPCM_REGS,reg)>>2)
646 BPCM_ID_REG id_reg
; // offset = 0x00, actual offset = 0
647 BPCM_CAPABILITES_REG capabilities
; // offset = 0x04, actual offset = 1
648 uint32_t control
; // offset = 0x08, actual offset = 2
649 BPCM_STATUS_REG status
; // offset = 0x0c, actual offset = 3
650 BPCM_AVS_ROSC_CONTROL_REG rosc_control
; // offset = 0x10, actual offset = 4
651 BPCM_AVS_ROSC_THRESHOLD rosc_thresh_h
; // offset = 0x14, actual offset = 5
652 BPCM_AVS_ROSC_THRESHOLD rosc_thresh_s
; // offset = 0x18, actual offset = 6
653 BPCM_AVS_ROSC_COUNT rosc_count
; // offset = 0x1c, actual offset = 7
654 BPCM_AVS_PWD_CONTROL pwd_control
; // offset = 0x20, actual offset = 8
655 BPCM_PWD_ACCUM_CONTROL pwd_accum_control
; // offset = 0x24, actual offset = 9
656 BPCM_SR_CONTROL sr_control
; // offset = 0x28, actual offset = 10
657 BPCM_GLOBAL_CNTL global_control
; // offset = 0x2c, actual offset = 11
658 BPCM_MISC_CONTROL misc_control
; // offset = 0x30, actual offset = 12
659 BPCM_MISC_CONTROL2 misc_control2
; // offset = 0x34, actual offset = 13
661 BPCM_ZONE zones
[1020]; // offset = 0x40..0x3FFC, actual offset = 16..4095 (1020 * 4 = 4080 + 16 = 4096)
662 } BPCM_VDSL_REGS
; // total offset space = 4096
664 #define BPCMVDSLOffset(reg) offsetof(BPCM_VDSL_REGS,reg)
665 #define BPCMVDSLRegOffset(reg) (BPCMVDSLOffset(reg) >> 2)
667 #define BPCMOffset(reg) offsetof(BPCM_REGS,reg)
668 #define BPCMRegOffset(reg) (BPCMOffset(reg) >> 2)
671 BPCM_ID_REG id_reg
; // offset = 0x00, actual offset = 0
672 BPCM_CAPABILITES_REG capabilities
; // offset = 0x04, actual offset = 1
673 uint32_t reserved0
[2]; // offset = 0x08, actual offset = 2
674 uint32_t cfg_control
; // offset = 0x10, actual offset = 4
675 BPCM_SR_CONTROL sr_control
; // offset = 0x14, actual offset = 5
676 uint32_t reserved1
[6]; // offset = 0x18, actual offset = 6
677 ARM_CONTROL_REG arm_control
; // offset = 0x30, actual offset = 12
678 uint32_t biu_clk_control0
; // offset = 0x34, actual offset = 13
679 uint32_t tbd
[18]; // offset = 0x38, actual offset = 14
680 BPCM_ZONE zones
; // offset = 0x80, actual offset = 32
682 #define ARMBPCMOffset(reg) offsetof(ARM_BPCM_REGS,reg)
683 #define ARMBPCMRegOffset(reg) (ARMBPCMOffset(reg) >> 2)
686 BPCM_ID_REG id_reg
; // offset = 0x00, actual offset = 0
687 BPCM_CAPABILITES_REG capabilities
; // offset = 0x04, actual offset = 1
688 uint32_t reserved0
[2]; // offset = 0x08..0x0c, actual offset 2..3
689 PLL_CTRL_REG resets
; // offset = 0x10, actual offset = 4
690 PLL_CFG0_REG cfg0
; // offset = 0x14, actual offset = 5
691 PLL_CFG1_REG cfg1
; // offset = 0x18, actual offset = 6
692 PLL_NDIV_REG ndiv
; // offset = 0x1c, actual offset = 7
693 PLL_PDIV_REG pdiv
; // offset = 0x20, actual offset = 8
694 PLL_LOOP0_REG loop0
; // offset = 0x24, actual offset = 9
695 PLL_LOOP1_REG loop1
; // offset = 0x28, actual offset = a
696 PLL_CHCFG_REG ch01_cfg
; // offset = 0x2c, actual offset = b
697 PLL_CHCFG_REG ch23_cfg
; // offset = 0x30, actual offset = c
698 PLL_CHCFG_REG ch45_cfg
; // offset = 0x34, actual offset = d
699 PLL_OCTRL_REG octrl
; // offset = 0x38, actual offset = e
700 PLL_STAT_REG stat
; // offset = 0x3c, actual offset = f
701 uint32_t strap
; // offset = 0x40, actual offset = 0x10
702 PLL_DECNDIV_REG decndiv
; // offset = 0x44, actual offset = 0x11
703 PLL_DECPDIV_REG decpdiv
; // offset = 0x48, actual offset = 0x12
704 PLL_DECCH25_REG decch25
; // offset = 0x4c, actual offset = 0x13
707 #define PLLBPCMOffset(reg) offsetof(PLL_BPCM_REGS,reg)
708 #define PLLBPCMRegOffset(reg) (PLLBPCMOffset(reg) >> 2)
711 BPCM_UBUS_ID_REG id_reg
; /* offset = 0x00, actual offset = 0 */
712 BPCM_UBUS_CAPABILITES_REG capabilities
; /* offset = 0x04, actual offset = 1 */
713 uint32_t reserved0
; /* offset = 0x08, actual offset = 2 */
714 BPCM_UBUS_CTRL_REG ctrl
; /* offset = 0x0c, actual offset = 3 */
715 BPCM_UBUS_CFG_REG cfg
[4]; /* offset = 0x10..0x2c, actual offset = 4..11 */
718 #define UBUSBPCMOffset(reg) offsetof(BPCM_UBUS_REG,reg)
719 #define UBUSBPCMRegOffset(reg) (UBUSBPCMOffset(reg) >> 2)
723 BPCM_ID_REG id_reg
; // offset 0x00, PMB reg index 0
724 BPCM_CAPABILITES_REG capabilities
; // offset 0x04, PMB reg index 1
725 uint32_t reserved0
[7]; // offset 0x08-0x20, PMB reg index 2-8
726 uint32_t control
; // offset 0x24, PMB reg index 9
727 uint32_t observe_cntrl
; // offset 0x28, PMB reg index 10
728 uint32_t observe_div
; // offset 0x2c, PMB reg index 11
729 uint32_t observe_enable
; // offset 0x30, PMB reg index 12
730 BPCM_CLKRST_CONTROL clkrst_control
; // offset 0x34, PMB reg index 13
733 #define CLKRSTBPCMOffset(reg) offsetof(BPCM_CLKRST_REGS, reg)
734 #define CLKRSTBPCMRegOffset(reg) (CLKRSTBPCMOffset(reg) >> 2)
737 BPCM_ID_REG id_reg
; // offset 0x00, PMB reg index 0
738 BPCM_CAPABILITES_REG capabilities
; // offset 0x04, PMB reg index 1
739 uint32_t reserved0
[2]; // offset 0x08, PMB reg index 2/3
741 uint32_t control
; // offset 0x10, PMB reg index 4
742 BPCM_SR_CONTROL sr_control
; // offset 0x14, PMB reg index 5
744 uint32_t z0_pm_cntl
; // offset 0x18
745 uint32_t z0_pm_status
; // offset 0x1c
746 uint32_t z1_pm_cntl
; // offset 0x20
747 uint32_t z2_pm_cntl
; // offset 0x24
748 uint32_t reserved1
[22]; // reserved from 0x28 to 0x7F
753 #define SYSPOffset(reg) offsetof(BPCM_SYSPORT_REGS,reg)
754 #define SYSPRegOffset(reg) (SYSPOffset(reg) >> 2)
756 // *************************** macros ******************************
758 #define offsetof(TYPE, MEMBER) ((unsigned long) &((TYPE *)0)->MEMBER)