// SPDX-License-Identifier: GPL-2.0-only /* * Au1300 media block power gating (VSS) * * This is a stop-gap solution until I have the clock framework integration * ready. This stuff here really must be handled transparently when clocks * for various media blocks are enabled/disabled.
*/
/* disable a block as outlined in the databook */ staticinlinevoid __disable_block(int block)
{ void __iomem *base = (void __iomem *)VSS_ADDR(block);
__raw_writel(0x0f, base + VSS_FTR); /* disable isolation cells */
wmb();
__raw_writel(0, base + VSS_GATE); /* disable FSM */
wmb();
__raw_writel(3, base + VSS_CLKRST); /* assert reset */
wmb();
__raw_writel(1, base + VSS_CLKRST); /* disable clock */
wmb();
__raw_writel(0, base + VSS_FTR); /* disable all footers */
wmb();
}
void au1300_vss_block_control(int block, int enable)
{ unsignedlong flags;
if (alchemy_get_cputype() != ALCHEMY_CPU_AU1300) return;
/* only one block at a time */
spin_lock_irqsave(&au1300_vss_lock, flags); if (enable)
__enable_block(block); else
__disable_block(block);
spin_unlock_irqrestore(&au1300_vss_lock, flags);
}
EXPORT_SYMBOL_GPL(au1300_vss_block_control);
Messung V0.5
¤ Dauer der Verarbeitung: 0.13 Sekunden
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.