Lines Matching full:wake

373 	 * These describe events that can wake the system from sleep (i.e.
394 * @wake: pointer to I/O remapped region for WAKE registers
422 * @wake_type_dual_edge_map: Bitmap indicating if a wake is dual-edge or not
424 * @wake_cntrl_level_map: Bitmap to hold wake levels to be programmed in
425 * cntrl register associated with each wake during system suspend.
430 void __iomem *wake; member
2241 /* IRQ and simple wake events */ in tegra_pmc_irq_alloc()
2272 /* GPIO wake events */ in tegra_pmc_irq_alloc()
2290 /* If there is no wake-up event, there is no PMC mapping */ in tegra_pmc_irq_alloc()
2311 /* clear wake status */ in tegra210_pmc_irq_set_wake()
2318 /* enable PMC wake */ in tegra210_pmc_irq_set_wake()
2380 /* SW Wake (wake83) needs SR_CAPTURE filter to be enabled */ in tegra186_pmc_set_wake_filters()
2381 value = readl(pmc->wake + WAKE_AOWAKE_CNTRL(SW_WAKE_ID)); in tegra186_pmc_set_wake_filters()
2383 writel(value, pmc->wake + WAKE_AOWAKE_CNTRL(SW_WAKE_ID)); in tegra186_pmc_set_wake_filters()
2396 /* clear wake status */ in tegra186_pmc_irq_set_wake()
2397 writel(0x1, pmc->wake + WAKE_AOWAKE_STATUS_W(data->hwirq)); in tegra186_pmc_irq_set_wake()
2399 /* route wake to tier 2 */ in tegra186_pmc_irq_set_wake()
2400 value = readl(pmc->wake + WAKE_AOWAKE_TIER2_ROUTING(offset)); in tegra186_pmc_irq_set_wake()
2407 writel(value, pmc->wake + WAKE_AOWAKE_TIER2_ROUTING(offset)); in tegra186_pmc_irq_set_wake()
2410 writel(!!on, pmc->wake + WAKE_AOWAKE_MASK_W(data->hwirq)); in tegra186_pmc_irq_set_wake()
2420 value = readl(pmc->wake + WAKE_AOWAKE_CNTRL(data->hwirq)); in tegra186_pmc_irq_set_type()
2447 writel(value, pmc->wake + WAKE_AOWAKE_CNTRL(data->hwirq)); in tegra186_pmc_irq_set_type()
2886 pmc->wake = base; in tegra_pmc_probe()
2890 pmc->wake = devm_platform_ioremap_resource_byname(pdev, "wake"); in tegra_pmc_probe()
2891 if (IS_ERR(pmc->wake)) in tegra_pmc_probe()
2892 return PTR_ERR(pmc->wake); in tegra_pmc_probe()
3032 writel(value, pmc->wake + offset); in wke_32kwritel()
3036 static void wke_write_wake_level(struct tegra_pmc *pmc, int wake, int level) in wke_write_wake_level() argument
3038 unsigned int offset = WAKE_AOWAKE_CNTRL(wake); in wke_write_wake_level()
3041 value = readl(pmc->wake + offset); in wke_write_wake_level()
3047 writel(value, pmc->wake + offset); in wke_write_wake_level()
3066 unsigned int wake, i; in wke_read_sw_wake_status() local
3077 * obtain the current status of the input wake signals, change in wke_read_sw_wake_status()
3078 * the polarity of the wake level from 0->1 while latching to force in wke_read_sw_wake_status()
3086 * and let enough time lapse, so that the wake signals have time to in wke_read_sw_wake_status()
3096 status = readl(pmc->wake + WAKE_AOWAKE_SW_STATUS(i)); in wke_read_sw_wake_status()
3098 for_each_set_bit(wake, &status, 32) in wke_read_sw_wake_status()
3099 set_bit(wake + (i * 32), pmc->wake_sw_status_map); in wke_read_sw_wake_status()
3106 unsigned int i, wake; in wke_clear_wake_status() local
3110 mask = readl(pmc->wake + WAKE_AOWAKE_TIER2_ROUTING(i)); in wke_clear_wake_status()
3111 status = readl(pmc->wake + WAKE_AOWAKE_STATUS_R(i)) & mask; in wke_clear_wake_status()
3113 for_each_set_bit(wake, &status, 32) in wke_clear_wake_status()
3114 wke_32kwritel(pmc, 0x1, WAKE_AOWAKE_STATUS_W((i * 32) + wake)); in wke_clear_wake_status()
3118 /* translate sc7 wake sources back into IRQs to catch edge triggered wakeups */
3122 unsigned int wake; in tegra186_pmc_process_wake_events() local
3124 dev_dbg(pmc->dev, "Wake[%d:%d] status=%#lx\n", (index * 32) + 31, index * 32, status); in tegra186_pmc_process_wake_events()
3126 for_each_set_bit(wake, &status, 32) { in tegra186_pmc_process_wake_events()
3127 irq_hw_number_t hwirq = wake + 32 * index; in tegra186_pmc_process_wake_events()
3135 dev_dbg(pmc->dev, "Resume caused by WAKE%ld, IRQ %d\n", hwirq, irq); in tegra186_pmc_process_wake_events()
3139 dev_dbg(pmc->dev, "Resume caused by WAKE%ld, %s\n", hwirq, desc->action->name); in tegra186_pmc_process_wake_events()
3150 mask = readl(pmc->wake + WAKE_AOWAKE_TIER2_ROUTING(i)); in tegra186_pmc_wake_syscore_resume()
3151 status = readl(pmc->wake + WAKE_AOWAKE_STATUS_R(i)) & mask; in tegra186_pmc_wake_syscore_resume()
3169 /* Clear PMC Wake Status registers while going to suspend */ in tegra186_pmc_wake_syscore_suspend()
3837 void __iomem *wake; in tegra186_pmc_setup_irq_polarity() local
3841 index = of_property_match_string(np, "reg-names", "wake"); in tegra186_pmc_setup_irq_polarity()
3843 dev_err(pmc->dev, "failed to find PMC wake registers\n"); in tegra186_pmc_setup_irq_polarity()
3849 wake = ioremap(regs.start, resource_size(&regs)); in tegra186_pmc_setup_irq_polarity()
3850 if (!wake) { in tegra186_pmc_setup_irq_polarity()
3851 dev_err(pmc->dev, "failed to map PMC wake registers\n"); in tegra186_pmc_setup_irq_polarity()
3855 value = readl(wake + WAKE_AOWAKE_CTRL); in tegra186_pmc_setup_irq_polarity()
3862 writel(value, wake + WAKE_AOWAKE_CTRL); in tegra186_pmc_setup_irq_polarity()
3864 iounmap(wake); in tegra186_pmc_setup_irq_polarity()
4205 TEGRA_WAKE_GPIO("sd-wake", 8, 0, TEGRA234_MAIN_GPIO(G, 7)),
4211 TEGRA_WAKE_IRQ("sw-wake", SW_WAKE_ID, 179),