1 /* 2 * HND SiliconBackplane PMU support. 3 * 4 * Copyright (C) 1999-2019, Broadcom. 5 * 6 * Unless you and Broadcom execute a separate written software license 7 * agreement governing use of this software, this software is licensed to you 8 * under the terms of the GNU General Public License version 2 (the "GPL"), 9 * available at http://www.broadcom.com/licenses/GPLv2.php, with the 10 * following added to such license: 11 * 12 * As a special exception, the copyright holders of this software give you 13 * permission to link this software with independent modules, and to copy and 14 * distribute the resulting executable under terms of your choice, provided that 15 * you also meet, for each linked independent module, the terms and conditions of 16 * the license of that module. An independent module is a module which is not 17 * derived from this software. The special exception does not apply to any 18 * modifications of the software. 19 * 20 * Notwithstanding the above, under no circumstances may you combine this 21 * software in any way with any other Broadcom software provided under a license 22 * other than the GPL, without Broadcom's express prior written consent. 23 * 24 * 25 * <<Broadcom-WL-IPTag/Open:>> 26 * 27 * $Id: hndpmu.h 700376 2017-05-18 22:55:43Z $ 28 */ 29 30 #ifndef _hndpmu_h_ 31 #define _hndpmu_h_ 32 33 #include <typedefs.h> 34 #include <osl_decl.h> 35 #include <siutils.h> 36 #include <sbchipc.h> 37 38 extern uint32 si_pmu_rsrc_macphy_clk_deps(si_t *sih, osl_t *osh, int maccore_index); 39 extern uint32 si_pmu_rsrc_ht_avail_clk_deps(si_t *sih, osl_t *osh); 40 41 extern void si_pmu_otp_power(si_t *sih, osl_t *osh, bool on, uint32* min_res_mask); 42 extern void si_sdiod_drive_strength_init(si_t *sih, osl_t *osh, uint32 drivestrength); 43 44 extern void si_pmu_slow_clk_reinit(si_t *sih, osl_t *osh); 45 extern void si_pmu_avbtimer_enable(si_t *sih, osl_t *osh, bool set_flag); 46 extern uint32 si_pmu_dump_pmucap_binary(si_t *sih, uchar *p); 47 extern uint32 si_pmu_dump_buf_size_pmucap(si_t *sih); 48 extern int si_pmu_wait_for_steady_state(si_t *sih, osl_t *osh, pmuregs_t *pmu); 49 extern uint32 si_pmu_wake_bit_offset(si_t *sih); 50 #if defined(BCMULP) 51 int si_pmu_ulp_register(si_t *sih); 52 extern void si_pmu_ulp_chipconfig(si_t *sih, osl_t *osh); 53 extern void si_pmu_ulp_ilp_config(si_t *sih, osl_t *osh, uint32 ilp_period); 54 extern void si_pmu_ds1_res_init(si_t *sih, osl_t *osh); 55 #endif /* BCMULP */ 56 extern uint32 si_pmu_get_pmutimer(si_t *sih); 57 extern void si_switch_pmu_dependency(si_t *sih, uint mode); 58 extern void si_pmu_set_min_res_mask(si_t *sih, osl_t *osh, uint min_res_mask); 59 extern void si_pmu_set_mac_rsrc_req(si_t *sih, int macunit); 60 extern bool si_pmu_fast_lpo_enable_pcie(si_t *sih); 61 extern bool si_pmu_fast_lpo_enable_pmu(si_t *sih); 62 extern void si_pmu_chipcontrol_xtal_settings_4369(si_t *sih); 63 extern uint32 si_cur_pmu_time(si_t *sih); 64 extern bool si_pmu_cap_fast_lpo(si_t *sih); 65 extern int si_pmu_fast_lpo_disable(si_t *sih); 66 #ifdef BCMPMU_STATS 67 extern void si_pmustatstimer_init(si_t *sih); 68 extern void si_pmustatstimer_dump(si_t *sih); 69 extern void si_pmustatstimer_start(si_t *sih, uint8 timerid); 70 extern void si_pmustatstimer_stop(si_t *sih, uint8 timerid); 71 extern void si_pmustatstimer_clear(si_t *sih, uint8 timerid); 72 extern void si_pmustatstimer_clear_overflow(si_t *sih); 73 extern uint32 si_pmustatstimer_read(si_t *sih, uint8 timerid); 74 extern void si_pmustatstimer_cfg_src_num(si_t *sih, uint8 src_num, uint8 timerid); 75 extern void si_pmustatstimer_cfg_cnt_mode(si_t *sih, uint8 cnt_mode, uint8 timerid); 76 extern void si_pmustatstimer_int_enable(si_t *sih); 77 extern void si_pmustatstimer_int_disable(si_t *sih); 78 #endif /* BCMPMU_STATS */ 79 #endif /* _hndpmu_h_ */ 80