diff options
author | Alex Elder <elder@linaro.org> | 2014-02-19 16:02:57 -0600 |
---|---|---|
committer | Alex Elder <elder@linaro.org> | 2014-03-31 08:01:18 -0500 |
commit | b2ea9a4e4904f2febe0745621e20a3ec126812ae (patch) | |
tree | ca037fe27e772d789e4d878195684269396a14e8 /drivers/clk | |
parent | c873a98294afa2b69e9fb507b9aa15facd229afb (diff) |
clk: bcm281xx: define a bus clock
Define the bus clock "bsc3_apb". This bus clock has to be managed
using the CCU policy mechanism, so add the definitions required for
that to the clock and its CCU.
This one bus clock in particular is defined because it is needed
by peripheral clock "bsc3". Our boot loader does not properly
activate "bsc3_apb", and as a result, "bsc3" isn't able to function
properly. With "bsc3_apb" specified as a prerequisite clock for
"bsc3", the latter works correctly.
For now only this one bus clock is defined, because it allows
correct operation of "bsc3". Others can be added later as needed
(and this patch serves to show how that's done).
Signed-off-by: Alex Elder <elder@linaro.org>
Diffstat (limited to 'drivers/clk')
-rw-r--r-- | drivers/clk/bcm/clk-bcm281xx.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/drivers/clk/bcm/clk-bcm281xx.c b/drivers/clk/bcm/clk-bcm281xx.c index 43fa0b6301e..40ed2c12590 100644 --- a/drivers/clk/bcm/clk-bcm281xx.c +++ b/drivers/clk/bcm/clk-bcm281xx.c @@ -321,8 +321,17 @@ static struct peri_clk_data pwm_data = { .trig = TRIGGER(0x0afc, 15), }; +static struct bus_clk_data bsc3_apb_data = { + .policy = POLICY(0x0048, 4), + .gate = HW_SW_GATE(0x0484, 16, 0, 1), +}; + static struct ccu_data slave_ccu_data = { BCM281XX_CCU_COMMON(slave, SLAVE), + .policy = { + .enable = CCU_LVM_EN(0x0034, 0), + .control = CCU_POLICY_CTL(0x000c, 0, 1, 2), + }, .kona_clks = { [BCM281XX_SLAVE_CCU_UARTB] = KONA_CLK(slave, uartb, peri), @@ -341,9 +350,11 @@ static struct ccu_data slave_ccu_data = { [BCM281XX_SLAVE_CCU_BSC2] = KONA_CLK(slave, bsc2, peri), [BCM281XX_SLAVE_CCU_BSC3] = - KONA_CLK(slave, bsc3, peri), + KONA_CLK_PREREQ(slave, bsc3, peri, bsc3_apb), [BCM281XX_SLAVE_CCU_PWM] = KONA_CLK(slave, pwm, peri), + [BCM281XX_SLAVE_CCU_BSC3_APB] = + KONA_CLK(slave, bsc3_apb, bus), [BCM281XX_SLAVE_CCU_CLOCK_COUNT] = LAST_KONA_CLK, }, }; |