aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/sysdev
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/sysdev')
-rw-r--r--arch/powerpc/sysdev/mpic.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/arch/powerpc/sysdev/mpic.c b/arch/powerpc/sysdev/mpic.c
index 7dcdfcb3c984..bffe50d02c99 100644
--- a/arch/powerpc/sysdev/mpic.c
+++ b/arch/powerpc/sysdev/mpic.c
@@ -829,7 +829,27 @@ void __init mpic_init(struct mpic *mpic)
829 mpic_cpu_write(MPIC_CPU_CURRENT_TASK_PRI, 0); 829 mpic_cpu_write(MPIC_CPU_CURRENT_TASK_PRI, 0);
830} 830}
831 831
832void __init mpic_set_clk_ratio(struct mpic *mpic, u32 clock_ratio)
833{
834 u32 v;
835
836 v = mpic_read(mpic->gregs, MPIC_GREG_GLOBAL_CONF_1);
837 v &= ~MPIC_GREG_GLOBAL_CONF_1_CLK_RATIO_MASK;
838 v |= MPIC_GREG_GLOBAL_CONF_1_CLK_RATIO(clock_ratio);
839 mpic_write(mpic->gregs, MPIC_GREG_GLOBAL_CONF_1, v);
840}
832 841
842void __init mpic_set_serial_int(struct mpic *mpic, int enable)
843{
844 u32 v;
845
846 v = mpic_read(mpic->gregs, MPIC_GREG_GLOBAL_CONF_1);
847 if (enable)
848 v |= MPIC_GREG_GLOBAL_CONF_1_SIE;
849 else
850 v &= ~MPIC_GREG_GLOBAL_CONF_1_SIE;
851 mpic_write(mpic->gregs, MPIC_GREG_GLOBAL_CONF_1, v);
852}
833 853
834void mpic_irq_set_priority(unsigned int irq, unsigned int pri) 854void mpic_irq_set_priority(unsigned int irq, unsigned int pri)
835{ 855{