sunxi: mmc: remove usage of struct sunxi_ccm_reg
authorAndre Przywara <andre.przywara@arm.com>
Fri, 24 Jan 2025 23:42:46 +0000 (23:42 +0000)
committerTom Rini <trini@konsulko.com>
Mon, 28 Apr 2025 18:45:44 +0000 (12:45 -0600)
commit0527f30672482cb93a7a571bad4ecf5bc147ee49
tree977fd79b54e0b820323c7f0f38b77aad49beaf31
parent0453a1d9bb15ee30e8b4b89b4936982dbb44d71d
sunxi: mmc: remove usage of struct sunxi_ccm_reg

The Allwinner MMC code uses a complex C struct, modelling the clock
device's register frame. We rely on sharing the member names across all
Allwinner SoCs, which is fragile.

Drop the usage of the struct in the MMC code, by using #define'd
register names and their offset, and then adding those names to the base
pointer. This requires to define those offsets for all SoCs, but since we
only use between four and six clock registers in the MMC code, this is
easily done.

This removes one common user of the clock register struct.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
arch/arm/include/asm/arch-sunxi/clock_sun4i.h
arch/arm/include/asm/arch-sunxi/clock_sun50i_h6.h
arch/arm/include/asm/arch-sunxi/clock_sun6i.h
arch/arm/include/asm/arch-sunxi/clock_sun8i_a83t.h
arch/arm/include/asm/arch-sunxi/clock_sun9i.h
drivers/mmc/sunxi_mmc.c