]> git.baikalelectronics.ru Git - kernel.git/commit
clk: aspeed: Register gated clocks
authorJoel Stanley <joel@jms.id.au>
Fri, 22 Dec 2017 02:45:21 +0000 (13:15 +1030)
committerStephen Boyd <sboyd@codeaurora.org>
Sat, 27 Jan 2018 00:22:45 +0000 (16:22 -0800)
commit5356c904a8aa74d5fffd60ab4ea6d495a973f0cc
tree5172f55b266a83d7a9bb1ce5b0addf40723a5ce3
parentc47555e10978b92955c8f31914bec85caabe767a
clk: aspeed: Register gated clocks

The majority of the clocks in the system are gates paired with a reset
controller that holds the IP in reset.

This borrows from clk_hw_register_gate, but registers two 'gates', one
to control the clock enable register and the other to control the reset
IP. This allows us to enforce the ordering:

 1. Place IP in reset
 2. Enable clock
 3. Delay
 4. Release reset

There are some gates that do not have an associated reset; these are
handled by using -1 as the index for the reset.

Reviewed-by: Andrew Jeffery <andrew@aj.id.au>
Signed-off-by: Joel Stanley <joel@jms.id.au>
Reviewed-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
drivers/clk/clk-aspeed.c