Commit 74d99f39 authored by Uwe Kleine-König's avatar Uwe Kleine-König Committed by Sascha Hauer

ARM: mx5/clock-mx51: new macro that defines a clk with all members

Acked-by: default avatarJason Wang <jason77.wang@gmail.com>
Acked-by: default avatarGrant Likely <grant.likely@secretlab.ca>
Signed-off-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: default avatarSascha Hauer <s.hauer@pengutronix.de>
parent 79901478
...@@ -764,21 +764,21 @@ static struct clk kpp_clk = { ...@@ -764,21 +764,21 @@ static struct clk kpp_clk = {
.id = 0, .id = 0,
}; };
#define DEFINE_CLOCK(name, i, er, es, gr, sr, p, s) \ #define DEFINE_CLOCK_FULL(name, i, er, es, gr, sr, e, d, p, s) \
static struct clk name = { \ static struct clk name = { \
.id = i, \ .id = i, \
.enable_reg = er, \ .enable_reg = er, \
.enable_shift = es, \ .enable_shift = es, \
.get_rate = gr, \ .get_rate = gr, \
.set_rate = sr, \ .set_rate = sr, \
.enable = _clk_ccgr_enable, \ .enable = e, \
.disable = _clk_ccgr_disable, \ .disable = d, \
.parent = p, \ .parent = p, \
.secondary = s, \ .secondary = s, \
} }
/* DEFINE_CLOCK(name, id, enable_reg, enable_shift, #define DEFINE_CLOCK(name, i, er, es, gr, sr, p, s) \
get_rate, set_rate, parent, secondary); */ DEFINE_CLOCK_FULL(name, i, er, es, gr, sr, _clk_ccgr_enable, _clk_ccgr_disable, p, s)
/* Shared peripheral bus arbiter */ /* Shared peripheral bus arbiter */
DEFINE_CLOCK(spba_clk, 0, MXC_CCM_CCGR5, MXC_CCM_CCGRx_CG0_OFFSET, DEFINE_CLOCK(spba_clk, 0, MXC_CCM_CCGR5, MXC_CCM_CCGRx_CG0_OFFSET,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment