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 16 * of the license of that module. An independent module is a module which is 17 * not 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 546588 2015-04-13 09:24:52Z $ 28 */ 29 30 #ifndef _hndlhl_h_ 31 #define _hndlhl_h_ 32 33 enum { LHL_MAC_TIMER = 0, LHL_ARM_TIMER = 1 }; 34 35 typedef struct { 36 uint16 offset; 37 uint32 mask; 38 uint32 val; 39 } lhl_reg_set_t; 40 41 #define LHL_REG_OFF(reg) OFFSETOF(gciregs_t, reg) 42 43 extern void si_lhl_timer_config(si_t *sih, osl_t *osh, int timer_type); 44 extern void si_lhl_timer_enable(si_t *sih); 45 46 extern void si_lhl_setup(si_t *sih, osl_t *osh); 47 extern void si_lhl_enable(si_t *sih, osl_t *osh, bool enable); 48 extern void si_lhl_ilp_config(si_t *sih, osl_t *osh, uint32 ilp_period); 49 extern void si_lhl_enable_sdio_wakeup(si_t *sih, osl_t *osh); 50 extern void si_lhl_disable_sdio_wakeup(si_t *sih); 51 extern int si_lhl_set_lpoclk(si_t *sih, osl_t *osh, uint32 lpo_force); 52 extern void si_set_lv_sleep_mode_lhl_config_4369(si_t *sih); 53 54 #define HIB_EXT_WAKEUP_CAP(sih) (BCM4347_CHIP(sih->chip)) 55 56 #define LHL_IS_PSMODE_0(sih) (si_lhl_ps_mode(sih) == LHL_PS_MODE_0) 57 #define LHL_IS_PSMODE_1(sih) (si_lhl_ps_mode(sih) == LHL_PS_MODE_1) 58 #endif /* _hndlhl_h_ */ 59