• Samuel Holland's avatar
    clk: sunxi-ng: Allow drivers to be built as modules · c8c525b0
    Samuel Holland authored
    While it is useful to build all of the CCU drivers at once, only 1-3 of
    them will be loaded at a time, or possibly none of them if the kernel is
    booted on a non-sunxi platform. These CCU drivers are relatively large;
    32-bit drivers have 30-50k of data each, while the 64-bit ones are
    50-75k due to the increased pointer overhead. About half of that data
    comes from relocations. Let's allow the user to build these drivers as
    modules so only the necessary data is loaded.
    
    As a first step, convert the CCUs that are already platform drivers.
    
    When the drivers are built as modules, normally the file name becomes
    the module name. However, the current file names are inconsistent with
    the <platform>-<peripheral> name used everywhere else: the devicetree
    bindings, the platform driver names, and the Kconfig symbols. Use
    Makfile logic to rename the modules so they follow the usual pattern.
    Signed-off-by: default avatarSamuel Holland <samuel@sholland.org>
    Signed-off-by: default avatarMaxime Ripard <maxime@cerno.tech>
    Link: https://lore.kernel.org/r/20211119033338.25486-3-samuel@sholland.org
    c8c525b0
ccu-sun8i-r40.c 43.9 KB