summaryrefslogtreecommitdiff
path: root/drivers/clk/starfive/clk-starfive-jh71x0.h
diff options
context:
space:
mode:
authorEmil Renner Berthing <emil.renner.berthing@canonical.com>2023-12-20 02:24:39 +0300
committerStephen Boyd <sboyd@kernel.org>2024-01-04 02:51:55 +0300
commita242b2051ba2ec2d042680c381fdb7e34e66278d (patch)
treec75d245e8fcdb1105180e92a642783c4c139d30d /drivers/clk/starfive/clk-starfive-jh71x0.h
parentb85ea95d086471afb4ad062012a4d73cd328fa86 (diff)
downloadlinux-a242b2051ba2ec2d042680c381fdb7e34e66278d.tar.xz
clk: starfive: Add flags argument to JH71X0__MUX macro
This flag is needed to add the CLK_SET_RATE_PARENT flag on the gmac_tx clock on the JH7100, which in turn is needed by the dwmac-starfive driver to set the clock properly for 1000, 100 and 10 Mbps links. This change was mostly made using coccinelle: @ match @ expression idx, name, nparents; @@ JH71X0__MUX( -idx, name, nparents, +idx, name, 0, nparents, ...) Signed-off-by: Emil Renner Berthing <emil.renner.berthing@canonical.com> Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com> Reviewed-by: Jacob Keller <jacob.e.keller@intel.com> Link: https://lore.kernel.org/r/20231219232442.2460166-2-cristian.ciocaltea@collabora.com Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Diffstat (limited to 'drivers/clk/starfive/clk-starfive-jh71x0.h')
-rw-r--r--drivers/clk/starfive/clk-starfive-jh71x0.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/clk/starfive/clk-starfive-jh71x0.h b/drivers/clk/starfive/clk-starfive-jh71x0.h
index 34bb11c72eb7..23e052fc1549 100644
--- a/drivers/clk/starfive/clk-starfive-jh71x0.h
+++ b/drivers/clk/starfive/clk-starfive-jh71x0.h
@@ -61,10 +61,10 @@ struct jh71x0_clk_data {
.parents = { [0] = _parent }, \
}
-#define JH71X0__MUX(_idx, _name, _nparents, ...) \
+#define JH71X0__MUX(_idx, _name, _flags, _nparents, ...) \
[_idx] = { \
.name = _name, \
- .flags = 0, \
+ .flags = _flags, \
.max = ((_nparents) - 1) << JH71X0_CLK_MUX_SHIFT, \
.parents = { __VA_ARGS__ }, \
}