/*******************************************************************************
 * Enable secure interrupts and set the priority mask register to allow all
 * interrupts to trickle in.
 ******************************************************************************/
static void tegra_gic_cpuif_setup(unsigned int gicc_base)
{
    unsigned int val;

    val = ENABLE_GRP0 | ENABLE_GRP1 | FIQ_EN | FIQ_BYP_DIS_GRP0;
    val |= IRQ_BYP_DIS_GRP0 | FIQ_BYP_DIS_GRP1 | IRQ_BYP_DIS_GRP1;

    gicc_write_ctlr(gicc_base, val);
    gicc_write_pmr(gicc_base, GIC_PRI_MASK);
}
示例#2
0
/*******************************************************************************
 * Place the cpu interface in a state where it can never make a cpu exit wfi as
 * as result of an asserted interrupt. This is critical for powering down a cpu
 ******************************************************************************/
void gic_cpuif_deactivate(unsigned int gicc_base)
{
    unsigned int val;

    /* Disable secure, non-secure interrupts and disable their bypass */
    val = gicc_read_ctlr(gicc_base);
    val &= ~(ENABLE_GRP0 | ENABLE_GRP1);
    val |= FIQ_BYP_DIS_GRP1 | FIQ_BYP_DIS_GRP0;
    val |= IRQ_BYP_DIS_GRP0 | IRQ_BYP_DIS_GRP1;
    gicc_write_ctlr(gicc_base, val);
}
示例#3
0
/*******************************************************************************
 * Enable secure interrupts and use FIQs to route them. Disable legacy bypass
 * and set the priority mask register to allow all interrupts to trickle in.
 ******************************************************************************/
void gic_cpuif_setup(unsigned int gicc_base)
{
    unsigned int val;

    gicc_write_pmr(gicc_base, GIC_PRI_MASK);

    val = ENABLE_GRP0 | FIQ_EN;
    val |= FIQ_BYP_DIS_GRP0 | IRQ_BYP_DIS_GRP0;
    val |= FIQ_BYP_DIS_GRP1 | IRQ_BYP_DIS_GRP1;
    gicc_write_ctlr(gicc_base, val);
}
示例#4
0
/*******************************************************************************
 * Place the cpu interface in a state where it can never make a cpu exit wfi as
 * as result of an asserted interrupt. This is critical for powering down a cpu
 ******************************************************************************/
void tegra_gic_cpuif_deactivate(void)
{
	unsigned int val;

	/* Disable secure, non-secure interrupts and disable their bypass */
	val = gicc_read_ctlr(TEGRA_GICC_BASE);
	val &= ~(ENABLE_GRP0 | ENABLE_GRP1);
	val |= FIQ_BYP_DIS_GRP1 | FIQ_BYP_DIS_GRP0;
	val |= IRQ_BYP_DIS_GRP0 | IRQ_BYP_DIS_GRP1;
	gicc_write_ctlr(TEGRA_GICC_BASE, val);
}
示例#5
0
/*******************************************************************************
 * Enable secure interrupts and set the priority mask register to allow all
 * interrupts to trickle in.
 ******************************************************************************/
static void tegra_gic_cpuif_setup(unsigned int gicc_base)
{
	gicc_write_ctlr(gicc_base, ENABLE_GRP0 | ENABLE_GRP1);
	gicc_write_pmr(gicc_base, GIC_PRI_MASK);
}