Re: [PATCH 40/41] [TO BE REBASED] ARM: OMAP1: clock: Convert to CCF

Tony Lindgren
2022-04-22T13:55:01Z

* Arnd Bergmann <arnd@kernel.org> [220419 13:39]:
> From: Janusz Krzysztofik <jmkrzyszt@gmail.com>
> + /* protect clk->enable_reg from concurrent access via clk_set_rate() */
> + if (clk->enable_reg == OMAP1_IO_ADDRESS(ARM_CKCTL))
> + spin_lock_irqsave(&arm_ckctl_lock, flags);
> + else if (clk->enable_reg == OMAP1_IO_ADDRESS(ARM_IDLECT2))
> + spin_lock_irqsave(&arm_idlect2_lock, flags);
> + else if (clk->enable_reg == OMAP1_IO_ADDRESS(MOD_CONF_CTRL_0))
> + spin_lock_irqsave(&mod_conf_ctrl_0_lock, flags);
> + else if (clk->enable_reg == OMAP1_IO_ADDRESS(MOD_CONF_CTRL_1))
> + spin_lock_irqsave(&mod_conf_ctrl_1_lock, flags);
> + else if (clk->enable_reg == OMAP1_IO_ADDRESS(SWD_CLK_DIV_CTRL_SEL))
> + spin_lock_irqsave(&swd_clk_div_ctrl_sel_lock, flags);
> +

Eventually there should be just separate clock controller instances for
the clock registers banks, and then this should all disappear as the
lock is instance specific. Anyways, that's probably best done as a separate
changes later on.

Regards,

Tony