• C
    net: stmmac: dwmac-sun8i: Allow getting syscon regmap from external device · 49a06cae
    Chen-Yu Tsai 提交于
    On the Allwinner R40 SoC, the "GMAC clock" register is in the CCU
    address space. Using a standard syscon to access it provides no
    coordination with the CCU driver for register access. Neither does
    it prevent this and other drivers from accessing other, maybe critical,
    clock control registers. On other SoCs, the register is in the "system
    control" address space, which might also contain controls for mapping
    SRAM to devices or the CPU. This hardware has the same issues.
    
    Instead, for these types of setups, we let the device containing the
    control register create a regmap tied to it. We can then get the device
    from the existing syscon phandle, and retrieve the regmap with
    dev_get_regmap().
    Signed-off-by: NChen-Yu Tsai <wens@csie.org>
    Acked-by: NMaxime Ripard <maxime.ripard@bootlin.com>
    Signed-off-by: NDavid S. Miller <davem@davemloft.net>
    49a06cae
dwmac-sun8i.c 30.4 KB