UPSTREAM: clk: rockchip: add a COMPOSITE_FRACMUX_NOGATE type
authorXing Zheng <zhengxing@rock-chips.com>
Wed, 9 Mar 2016 02:43:31 +0000 (10:43 +0800)
committerHuang, Tao <huangtao@rock-chips.com>
Mon, 14 Mar 2016 07:45:56 +0000 (15:45 +0800)
Because there are some frac clock mux nodes don't have a gate node on
the RK3399.

Change-Id: I4791b90a08faab286743a5cba30738cfb046594c
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
(cherry picked from git.kernel.org mmind/linux-rockchip.git v4.7-clk/next
 commit ffd9d4d39ef7ff90364d3abd6c39919e6582b605)

drivers/clk/rockchip/clk.h

index cb8f405b607d3dde50b1bf6090019d8af07a44bd..f0f07ce14723ac8d70a15927531dd311308bb011 100644 (file)
@@ -420,6 +420,22 @@ struct rockchip_clk_branch {
                .child          = ch,                           \
        }
 
                .child          = ch,                           \
        }
 
+#define COMPOSITE_FRACMUX_NOGATE(_id, cname, pname, f, mo, df, ch) \
+       {                                                       \
+               .id             = _id,                          \
+               .branch_type    = branch_fraction_divider,      \
+               .name           = cname,                        \
+               .parent_names   = (const char *[]){ pname },    \
+               .num_parents    = 1,                            \
+               .flags          = f,                            \
+               .muxdiv_offset  = mo,                           \
+               .div_shift      = 16,                           \
+               .div_width      = 16,                           \
+               .div_flags      = df,                           \
+               .gate_offset    = -1,                           \
+               .child          = ch,                           \
+       }
+
 #define MUX(_id, cname, pnames, f, o, s, w, mf)                        \
        {                                                       \
                .id             = _id,                          \
 #define MUX(_id, cname, pnames, f, o, s, w, mf)                        \
        {                                                       \
                .id             = _id,                          \