• Home
  • Raw
  • Download

Lines Matching refs:pmc

204 static inline u32 pmc_reg_read(struct pmc_dev *pmc, int reg_offset)  in pmc_reg_read()  argument
206 return readl(pmc->regmap + reg_offset); in pmc_reg_read()
209 static inline void pmc_reg_write(struct pmc_dev *pmc, int reg_offset, u32 val) in pmc_reg_write() argument
211 writel(val, pmc->regmap + reg_offset); in pmc_reg_write()
216 struct pmc_dev *pmc = &pmc_device; in pmc_atom_read() local
218 if (!pmc->init) in pmc_atom_read()
221 *value = pmc_reg_read(pmc, offset); in pmc_atom_read()
242 static void pmc_hw_reg_setup(struct pmc_dev *pmc) in pmc_hw_reg_setup() argument
252 pmc_reg_write(pmc, PMC_S0IX_WAKE_EN, (u32)PMC_WAKE_EN_SETTING); in pmc_hw_reg_setup()
273 struct pmc_dev *pmc = s->private; in pmc_dev_state_show() local
274 const struct pmc_reg_map *m = pmc->map; in pmc_dev_state_show()
278 func_dis = pmc_reg_read(pmc, PMC_FUNC_DIS); in pmc_dev_state_show()
279 func_dis_2 = pmc_reg_read(pmc, PMC_FUNC_DIS_2); in pmc_dev_state_show()
280 d3_sts_0 = pmc_reg_read(pmc, PMC_D3_STS_0); in pmc_dev_state_show()
281 d3_sts_1 = pmc_reg_read(pmc, PMC_D3_STS_1); in pmc_dev_state_show()
296 struct pmc_dev *pmc = s->private; in pmc_pss_state_show() local
297 const struct pmc_bit_map *map = pmc->map->pss; in pmc_pss_state_show()
298 u32 pss = pmc_reg_read(pmc, PMC_PSS); in pmc_pss_state_show()
313 struct pmc_dev *pmc = s->private; in pmc_sleep_tmr_show() local
316 s0ir_tmr = (u64)pmc_reg_read(pmc, PMC_S0IR_TMR) << PMC_TMR_SHIFT; in pmc_sleep_tmr_show()
317 s0i1_tmr = (u64)pmc_reg_read(pmc, PMC_S0I1_TMR) << PMC_TMR_SHIFT; in pmc_sleep_tmr_show()
318 s0i2_tmr = (u64)pmc_reg_read(pmc, PMC_S0I2_TMR) << PMC_TMR_SHIFT; in pmc_sleep_tmr_show()
319 s0i3_tmr = (u64)pmc_reg_read(pmc, PMC_S0I3_TMR) << PMC_TMR_SHIFT; in pmc_sleep_tmr_show()
320 s0_tmr = (u64)pmc_reg_read(pmc, PMC_S0_TMR) << PMC_TMR_SHIFT; in pmc_sleep_tmr_show()
332 static void pmc_dbgfs_register(struct pmc_dev *pmc) in pmc_dbgfs_register() argument
338 pmc->dbgfs_dir = dir; in pmc_dbgfs_register()
340 debugfs_create_file("dev_state", S_IFREG | S_IRUGO, dir, pmc, in pmc_dbgfs_register()
342 debugfs_create_file("pss_state", S_IFREG | S_IRUGO, dir, pmc, in pmc_dbgfs_register()
344 debugfs_create_file("sleep_state", S_IFREG | S_IRUGO, dir, pmc, in pmc_dbgfs_register()
348 static void pmc_dbgfs_register(struct pmc_dev *pmc) in pmc_dbgfs_register() argument
453 struct pmc_dev *pmc = &pmc_device; in pmc_setup_dev() local
466 pci_read_config_dword(pdev, PMC_BASE_ADDR_OFFSET, &pmc->base_addr); in pmc_setup_dev()
467 pmc->base_addr &= PMC_BASE_ADDR_MASK; in pmc_setup_dev()
469 pmc->regmap = ioremap(pmc->base_addr, PMC_MMIO_REG_LEN); in pmc_setup_dev()
470 if (!pmc->regmap) { in pmc_setup_dev()
475 pmc->map = map; in pmc_setup_dev()
478 pmc_hw_reg_setup(pmc); in pmc_setup_dev()
480 pmc_dbgfs_register(pmc); in pmc_setup_dev()
483 ret = pmc_setup_clks(pdev, pmc->regmap, data); in pmc_setup_dev()
488 pmc->init = true; in pmc_setup_dev()