• Lorenzo Pieralisi's avatar
    ARM: vexpress/TC2: add Serial Power Controller (SPC) support · 63819cb1
    Lorenzo Pieralisi authored
    The TC2 versatile express core tile integrates a logic block that provides
    the interface between the dual cluster test-chip and the M3 microcontroller
    that carries out power management. The logic block, called Serial Power
    Controller (SPC), contains several memory mapped registers to control among
    other things low-power states, wake-up irqs and per-CPU jump addresses
    registers.
    
    This patch provides a driver that enables run-time control of features
    implemented by the SPC power management control logic with an API to
    be used by different subsystem drivers on top.
    
    The SPC control logic is required to be programmed very early in the boot
    process to reset secondary CPUs on the TC2 testchip, set-up jump addresses
    and wake-up IRQs for power management. Hence, waiting for core changes to
    be made in the device core code to enable early registration of platform
    devices, the driver puts in place an early init scheme that allows kernel
    drivers to initialize the SPC driver directly from the components requiring
    it, if their initialization routine is called before this driver init
    function during the boot process.
    
    Device tree bindings documentation for the SPC component is also provided.
    
    Cc: Olof Johansson <olof@lixom.net>
    Cc: Amit Kucheria <amit.kucheria@linaro.org>
    Cc: Jon Medhurst <tixy@linaro.org>
    Signed-off-by: default avatarAchin Gupta <achin.gupta@arm.com>
    Signed-off-by: default avatarLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
    Signed-off-by: default avatarSudeep KarkadaNagesha <Sudeep.KarkadaNagesha@arm.com>
    Acked-by: default avatarPawel Moll <pawel.moll@arm.com>
    [ np: moved from drivers/mfd/ to drivers/platform/vexpress/ ]
    Signed-off-by: default avatarNicolas Pitre <nico@linaro.org>
    [ PM: moved again to arch/arm/mach-vexpress, requested by Olof ]
    [ PM: removed useless printk, from Olof ]
    [ PM: made the driver SPC-only ]
    Signed-off-by: default avatarPawel Moll <pawel.moll@arm.com>
    63819cb1
spc.c 4.5 KB