Port-arm archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Interrupt questions



Vincent DEFERT <vincent.defert%posteo.net@localhost> wrote:
> To enable the clock, I do:
>
>     sc->clk = fdtbus_clock_get_index(phandle, 0);
>
>     if (sc->clk == NULL || clk_enable(sc->clk) != 0) {
>         aprint_error_dev(self, "couldn't enable clock\n");
>         return;
>     }

That looks fine.

The clock definitions look fine to me as well:

The line that controls it in mesongxbb_clkc.c is this:

        MESON_CLK_GATE(MESONGXBB_CLOCK_I2C, "i2c", "clk81", HHI_GCLK_MPEG0, 9),

MESONGXBB_CLOCK_I2C is 22, that is what matches against the value of the
'clocks' property in the device tree node.

The rest of it just specifies bit 9 of the register at 0x50 (HHI_GCLK_MPEG0)
to enable it.


Home | Main Index | Thread Index | Old Index