Re: Interrupt questions
Robert Swindells <[email protected]>
| Newsgroups | gmane.os.netbsd.ports.arm |
|---|---|
| Message-ID | <[email protected]> |
Vincent DEFERT <[email protected]> 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.