* [PATCH 1/2] clk: cosmetic: reorder include files @ 2021-11-19 14:12 Patrick Delaunay 2021-11-19 14:12 ` [PATCH 2/2] clk: define LOG_CATEGORY for generic and ccf clocks Patrick Delaunay ` (2 more replies) 0 siblings, 3 replies; 5+ messages in thread From: Patrick Delaunay @ 2021-11-19 14:12 UTC (permalink / raw) To: u-boot; +Cc: Patrick Delaunay, Lukasz Majewski, U-Boot STM32 Reorder include files in the U-Boot expected order: the common.h header should always be first, followed by other headers in order, then headers with directories, then local files. It is a preliminary step for next patch. Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> --- drivers/clk/clk-composite.c | 6 +++--- drivers/clk/clk-fixed-factor.c | 9 +++++---- drivers/clk/clk-gate.c | 9 +++++---- drivers/clk/clk-mux.c | 5 +++-- drivers/clk/clk-uclass.c | 2 +- drivers/clk/clk.c | 2 +- 6 files changed, 18 insertions(+), 15 deletions(-) diff --git a/drivers/clk/clk-composite.c b/drivers/clk/clk-composite.c index bb5351ebc0..12288e10b3 100644 --- a/drivers/clk/clk-composite.c +++ b/drivers/clk/clk-composite.c @@ -5,13 +5,13 @@ */ #include <common.h> -#include <asm/io.h> -#include <malloc.h> +#include <clk.h> #include <clk-uclass.h> +#include <malloc.h> +#include <asm/io.h> #include <dm/device.h> #include <dm/devres.h> #include <linux/clk-provider.h> -#include <clk.h> #include <linux/err.h> #include "clk.h" diff --git a/drivers/clk/clk-fixed-factor.c b/drivers/clk/clk-fixed-factor.c index 8d9823bdab..9fcf30fd2e 100644 --- a/drivers/clk/clk-fixed-factor.c +++ b/drivers/clk/clk-fixed-factor.c @@ -6,16 +6,17 @@ * Copyright (C) 2011 Sascha Hauer, Pengutronix <s.hauer@pengutronix.de> */ #include <common.h> -#include <malloc.h> +#include <clk.h> #include <clk-uclass.h> +#include <div64.h> +#include <malloc.h> #include <dm/device.h> #include <dm/devres.h> #include <linux/clk-provider.h> -#include <div64.h> -#include <clk.h> -#include "clk.h" #include <linux/err.h> +#include "clk.h" + #define UBOOT_DM_CLK_IMX_FIXED_FACTOR "ccf_clk_fixed_factor" static ulong clk_factor_recalc_rate(struct clk *clk) diff --git a/drivers/clk/clk-gate.c b/drivers/clk/clk-gate.c index 006d3b6629..708499d95a 100644 --- a/drivers/clk/clk-gate.c +++ b/drivers/clk/clk-gate.c @@ -8,17 +8,18 @@ */ #include <common.h> -#include <asm/io.h> -#include <malloc.h> +#include <clk.h> #include <clk-uclass.h> +#include <malloc.h> +#include <asm/io.h> #include <dm/device.h> #include <dm/devres.h> #include <linux/bitops.h> #include <linux/clk-provider.h> -#include <clk.h> -#include "clk.h" #include <linux/err.h> +#include "clk.h" + #define UBOOT_DM_CLK_GATE "clk_gate" /** diff --git a/drivers/clk/clk-mux.c b/drivers/clk/clk-mux.c index f1becd20d8..fd746f2de3 100644 --- a/drivers/clk/clk-mux.c +++ b/drivers/clk/clk-mux.c @@ -24,14 +24,15 @@ #include <common.h> #include <clk.h> #include <clk-uclass.h> +#include <malloc.h> +#include <asm/io.h> #include <dm/device.h> #include <dm/devres.h> #include <dm/uclass.h> #include <linux/bitops.h> -#include <malloc.h> -#include <asm/io.h> #include <linux/clk-provider.h> #include <linux/err.h> + #include "clk.h" #define UBOOT_DM_CLK_CCF_MUX "ccf_clk_mux" diff --git a/drivers/clk/clk-uclass.c b/drivers/clk/clk-uclass.c index 493018b33e..f2d2642754 100644 --- a/drivers/clk/clk-uclass.c +++ b/drivers/clk/clk-uclass.c @@ -16,6 +16,7 @@ #include <errno.h> #include <log.h> #include <malloc.h> +#include <asm/global_data.h> #include <dm/device_compat.h> #include <dm/device-internal.h> #include <dm/devres.h> @@ -23,7 +24,6 @@ #include <linux/bug.h> #include <linux/clk-provider.h> #include <linux/err.h> -#include <asm/global_data.h> static inline const struct clk_ops *clk_dev_ops(struct udevice *dev) { diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c index 1efb7fe9f3..d1a9787071 100644 --- a/drivers/clk/clk.c +++ b/drivers/clk/clk.c @@ -5,13 +5,13 @@ */ #include <common.h> +#include <clk.h> #include <clk-uclass.h> #include <log.h> #include <dm/device.h> #include <dm/uclass.h> #include <dm/lists.h> #include <dm/device-internal.h> -#include <clk.h> int clk_register(struct clk *clk, const char *drv_name, const char *name, const char *parent_name) -- 2.25.1 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/2] clk: define LOG_CATEGORY for generic and ccf clocks 2021-11-19 14:12 [PATCH 1/2] clk: cosmetic: reorder include files Patrick Delaunay @ 2021-11-19 14:12 ` Patrick Delaunay 2021-11-21 19:16 ` Sean Anderson 2021-11-21 19:14 ` [PATCH 1/2] clk: cosmetic: reorder include files Sean Anderson 2021-12-15 19:05 ` Sean Anderson 2 siblings, 1 reply; 5+ messages in thread From: Patrick Delaunay @ 2021-11-19 14:12 UTC (permalink / raw) To: u-boot; +Cc: Patrick Delaunay, Lukasz Majewski, U-Boot STM32 Define LOG_CATEGORY to allow filtering with log command for generic clock and CCF clocks. This patch also change existing printf, debug and pr_ macro to log_ or dev_ macro. Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> --- drivers/clk/clk-composite.c | 3 +++ drivers/clk/clk-divider.c | 6 +++++- drivers/clk/clk-fixed-factor.c | 4 ++++ drivers/clk/clk-gate.c | 6 +++++- drivers/clk/clk-mux.c | 8 ++++++-- drivers/clk/clk.c | 18 ++++++++++-------- drivers/clk/clk_fixed_factor.c | 3 +++ drivers/clk/clk_fixed_rate.c | 3 +++ 8 files changed, 39 insertions(+), 12 deletions(-) diff --git a/drivers/clk/clk-composite.c b/drivers/clk/clk-composite.c index 12288e10b3..6eb2b8133a 100644 --- a/drivers/clk/clk-composite.c +++ b/drivers/clk/clk-composite.c @@ -4,9 +4,12 @@ * Copyright 2019 NXP */ +#define LOG_CATEGORY UCLASS_CLK + #include <common.h> #include <clk.h> #include <clk-uclass.h> +#include <log.h> #include <malloc.h> #include <asm/io.h> #include <dm/device.h> diff --git a/drivers/clk/clk-divider.c b/drivers/clk/clk-divider.c index 9df50a5e72..7e8e62feee 100644 --- a/drivers/clk/clk-divider.c +++ b/drivers/clk/clk-divider.c @@ -9,14 +9,18 @@ * */ +#define LOG_CATEGORY UCLASS_CLK + #include <common.h> #include <asm/io.h> #include <malloc.h> #include <clk-uclass.h> +#include <log.h> #include <dm/device.h> #include <dm/devres.h> #include <dm/uclass.h> #include <dm/lists.h> +#include <dm/device_compat.h> #include <dm/device-internal.h> #include <linux/bug.h> #include <linux/clk-provider.h> @@ -190,7 +194,7 @@ static struct clk *_register_divider(struct device *dev, const char *name, if (clk_divider_flags & CLK_DIVIDER_HIWORD_MASK) { if (width + shift > 16) { - pr_warn("divider value exceeds LOWORD field\n"); + dev_warn(dev, "divider value exceeds LOWORD field\n"); return ERR_PTR(-EINVAL); } } diff --git a/drivers/clk/clk-fixed-factor.c b/drivers/clk/clk-fixed-factor.c index 9fcf30fd2e..2a446788e1 100644 --- a/drivers/clk/clk-fixed-factor.c +++ b/drivers/clk/clk-fixed-factor.c @@ -5,10 +5,14 @@ * * Copyright (C) 2011 Sascha Hauer, Pengutronix <s.hauer@pengutronix.de> */ + +#define LOG_CATEGORY UCLASS_CLK + #include <common.h> #include <clk.h> #include <clk-uclass.h> #include <div64.h> +#include <log.h> #include <malloc.h> #include <dm/device.h> #include <dm/devres.h> diff --git a/drivers/clk/clk-gate.c b/drivers/clk/clk-gate.c index 708499d95a..aa40daf3d7 100644 --- a/drivers/clk/clk-gate.c +++ b/drivers/clk/clk-gate.c @@ -7,12 +7,16 @@ * Gated clock implementation */ +#define LOG_CATEGORY UCLASS_CLK + #include <common.h> #include <clk.h> +#include <log.h> #include <clk-uclass.h> #include <malloc.h> #include <asm/io.h> #include <dm/device.h> +#include <dm/device_compat.h> #include <dm/devres.h> #include <linux/bitops.h> #include <linux/clk-provider.h> @@ -124,7 +128,7 @@ struct clk *clk_register_gate(struct device *dev, const char *name, if (clk_gate_flags & CLK_GATE_HIWORD_MASK) { if (bit_idx > 15) { - pr_err("gate bit exceeds LOWORD field\n"); + dev_err(dev, "gate bit exceeds LOWORD field\n"); return ERR_PTR(-EINVAL); } } diff --git a/drivers/clk/clk-mux.c b/drivers/clk/clk-mux.c index fd746f2de3..b49946fbcd 100644 --- a/drivers/clk/clk-mux.c +++ b/drivers/clk/clk-mux.c @@ -21,12 +21,16 @@ * clock. */ +#define LOG_CATEGORY UCLASS_CLK + #include <common.h> #include <clk.h> #include <clk-uclass.h> +#include <log.h> #include <malloc.h> #include <asm/io.h> #include <dm/device.h> +#include <dm/device_compat.h> #include <dm/devres.h> #include <dm/uclass.h> #include <linux/bitops.h> @@ -124,7 +128,7 @@ static int clk_mux_set_parent(struct clk *clk, struct clk *parent) index = clk_fetch_parent_index(clk, parent); if (index < 0) { - printf("Could not fetch index\n"); + log_err("Could not fetch index\n"); return index; } @@ -170,7 +174,7 @@ struct clk *clk_hw_register_mux_table(struct device *dev, const char *name, if (clk_mux_flags & CLK_MUX_HIWORD_MASK) { width = fls(mask) - ffs(mask) + 1; if (width + shift > 16) { - pr_err("mux value exceeds LOWORD field\n"); + dev_err(dev, "mux value exceeds LOWORD field\n"); return ERR_PTR(-EINVAL); } } diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c index d1a9787071..eff0fa134f 100644 --- a/drivers/clk/clk.c +++ b/drivers/clk/clk.c @@ -4,6 +4,8 @@ * Lukasz Majewski, DENX Software Engineering, lukma@denx.de */ +#define LOG_CATEGORY UCLASS_CLK + #include <common.h> #include <clk.h> #include <clk-uclass.h> @@ -22,24 +24,24 @@ int clk_register(struct clk *clk, const char *drv_name, ret = uclass_get_device_by_name(UCLASS_CLK, parent_name, &parent); if (ret) { - printf("%s: failed to get %s device (parent of %s)\n", - __func__, parent_name, name); + log_err("%s: failed to get %s device (parent of %s)\n", + __func__, parent_name, name); } else { - debug("%s: name: %s parent: %s [0x%p]\n", __func__, name, - parent->name, parent); + log_debug("%s: name: %s parent: %s [0x%p]\n", __func__, name, + parent->name, parent); } drv = lists_driver_lookup_name(drv_name); if (!drv) { - printf("%s: %s is not a valid driver name\n", - __func__, drv_name); + log_err("%s: %s is not a valid driver name\n", + __func__, drv_name); return -ENOENT; } ret = device_bind(parent, drv, name, NULL, ofnode_null(), &clk->dev); if (ret) { - printf("%s: CLK: %s driver bind error [%d]!\n", __func__, name, - ret); + log_err("%s: CLK: %s driver bind error [%d]!\n", __func__, name, + ret); return ret; } diff --git a/drivers/clk/clk_fixed_factor.c b/drivers/clk/clk_fixed_factor.c index 41b0d9c060..6c1139e5c5 100644 --- a/drivers/clk/clk_fixed_factor.c +++ b/drivers/clk/clk_fixed_factor.c @@ -5,10 +5,13 @@ * Author: Anup Patel <anup.patel@wdc.com> */ +#define LOG_CATEGORY UCLASS_CLK + #include <common.h> #include <clk-uclass.h> #include <div64.h> #include <dm.h> +#include <log.h> #include <linux/err.h> struct clk_fixed_factor { diff --git a/drivers/clk/clk_fixed_rate.c b/drivers/clk/clk_fixed_rate.c index c5a2a42c92..b5e78c7055 100644 --- a/drivers/clk/clk_fixed_rate.c +++ b/drivers/clk/clk_fixed_rate.c @@ -3,9 +3,12 @@ * Copyright (C) 2016 Masahiro Yamada <yamada.masahiro@socionext.com> */ +#define LOG_CATEGORY UCLASS_CLK + #include <common.h> #include <clk-uclass.h> #include <dm.h> +#include <log.h> #include <dm/device-internal.h> #include <linux/clk-provider.h> -- 2.25.1 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] clk: define LOG_CATEGORY for generic and ccf clocks 2021-11-19 14:12 ` [PATCH 2/2] clk: define LOG_CATEGORY for generic and ccf clocks Patrick Delaunay @ 2021-11-21 19:16 ` Sean Anderson 0 siblings, 0 replies; 5+ messages in thread From: Sean Anderson @ 2021-11-21 19:16 UTC (permalink / raw) To: Patrick Delaunay, u-boot; +Cc: Lukasz Majewski, U-Boot STM32 On 11/19/21 9:12 AM, Patrick Delaunay wrote: > Define LOG_CATEGORY to allow filtering with log command > for generic clock and CCF clocks. > > This patch also change existing printf, debug and pr_ macro > to log_ or dev_ macro. > > Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> > --- > > drivers/clk/clk-composite.c | 3 +++ > drivers/clk/clk-divider.c | 6 +++++- > drivers/clk/clk-fixed-factor.c | 4 ++++ > drivers/clk/clk-gate.c | 6 +++++- > drivers/clk/clk-mux.c | 8 ++++++-- > drivers/clk/clk.c | 18 ++++++++++-------- > drivers/clk/clk_fixed_factor.c | 3 +++ > drivers/clk/clk_fixed_rate.c | 3 +++ > 8 files changed, 39 insertions(+), 12 deletions(-) > > diff --git a/drivers/clk/clk-composite.c b/drivers/clk/clk-composite.c > index 12288e10b3..6eb2b8133a 100644 > --- a/drivers/clk/clk-composite.c > +++ b/drivers/clk/clk-composite.c > @@ -4,9 +4,12 @@ > * Copyright 2019 NXP > */ > > +#define LOG_CATEGORY UCLASS_CLK > + > #include <common.h> > #include <clk.h> > #include <clk-uclass.h> > +#include <log.h> > #include <malloc.h> > #include <asm/io.h> > #include <dm/device.h> > diff --git a/drivers/clk/clk-divider.c b/drivers/clk/clk-divider.c > index 9df50a5e72..7e8e62feee 100644 > --- a/drivers/clk/clk-divider.c > +++ b/drivers/clk/clk-divider.c > @@ -9,14 +9,18 @@ > * > */ > > +#define LOG_CATEGORY UCLASS_CLK > + > #include <common.h> > #include <asm/io.h> > #include <malloc.h> > #include <clk-uclass.h> > +#include <log.h> > #include <dm/device.h> > #include <dm/devres.h> > #include <dm/uclass.h> > #include <dm/lists.h> > +#include <dm/device_compat.h> > #include <dm/device-internal.h> > #include <linux/bug.h> > #include <linux/clk-provider.h> > @@ -190,7 +194,7 @@ static struct clk *_register_divider(struct device *dev, const char *name, > > if (clk_divider_flags & CLK_DIVIDER_HIWORD_MASK) { > if (width + shift > 16) { > - pr_warn("divider value exceeds LOWORD field\n"); > + dev_warn(dev, "divider value exceeds LOWORD field\n"); > return ERR_PTR(-EINVAL); > } > } > diff --git a/drivers/clk/clk-fixed-factor.c b/drivers/clk/clk-fixed-factor.c > index 9fcf30fd2e..2a446788e1 100644 > --- a/drivers/clk/clk-fixed-factor.c > +++ b/drivers/clk/clk-fixed-factor.c > @@ -5,10 +5,14 @@ > * > * Copyright (C) 2011 Sascha Hauer, Pengutronix <s.hauer@pengutronix.de> > */ > + > +#define LOG_CATEGORY UCLASS_CLK > + > #include <common.h> > #include <clk.h> > #include <clk-uclass.h> > #include <div64.h> > +#include <log.h> > #include <malloc.h> > #include <dm/device.h> > #include <dm/devres.h> > diff --git a/drivers/clk/clk-gate.c b/drivers/clk/clk-gate.c > index 708499d95a..aa40daf3d7 100644 > --- a/drivers/clk/clk-gate.c > +++ b/drivers/clk/clk-gate.c > @@ -7,12 +7,16 @@ > * Gated clock implementation > */ > > +#define LOG_CATEGORY UCLASS_CLK > + > #include <common.h> > #include <clk.h> > +#include <log.h> > #include <clk-uclass.h> > #include <malloc.h> > #include <asm/io.h> > #include <dm/device.h> > +#include <dm/device_compat.h> > #include <dm/devres.h> > #include <linux/bitops.h> > #include <linux/clk-provider.h> > @@ -124,7 +128,7 @@ struct clk *clk_register_gate(struct device *dev, const char *name, > > if (clk_gate_flags & CLK_GATE_HIWORD_MASK) { > if (bit_idx > 15) { > - pr_err("gate bit exceeds LOWORD field\n"); > + dev_err(dev, "gate bit exceeds LOWORD field\n"); > return ERR_PTR(-EINVAL); > } > } > diff --git a/drivers/clk/clk-mux.c b/drivers/clk/clk-mux.c > index fd746f2de3..b49946fbcd 100644 > --- a/drivers/clk/clk-mux.c > +++ b/drivers/clk/clk-mux.c > @@ -21,12 +21,16 @@ > * clock. > */ > > +#define LOG_CATEGORY UCLASS_CLK > + > #include <common.h> > #include <clk.h> > #include <clk-uclass.h> > +#include <log.h> > #include <malloc.h> > #include <asm/io.h> > #include <dm/device.h> > +#include <dm/device_compat.h> > #include <dm/devres.h> > #include <dm/uclass.h> > #include <linux/bitops.h> > @@ -124,7 +128,7 @@ static int clk_mux_set_parent(struct clk *clk, struct clk *parent) > > index = clk_fetch_parent_index(clk, parent); > if (index < 0) { > - printf("Could not fetch index\n"); > + log_err("Could not fetch index\n"); > return index; > } > > @@ -170,7 +174,7 @@ struct clk *clk_hw_register_mux_table(struct device *dev, const char *name, > if (clk_mux_flags & CLK_MUX_HIWORD_MASK) { > width = fls(mask) - ffs(mask) + 1; > if (width + shift > 16) { > - pr_err("mux value exceeds LOWORD field\n"); > + dev_err(dev, "mux value exceeds LOWORD field\n"); > return ERR_PTR(-EINVAL); > } > } > diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c > index d1a9787071..eff0fa134f 100644 > --- a/drivers/clk/clk.c > +++ b/drivers/clk/clk.c > @@ -4,6 +4,8 @@ > * Lukasz Majewski, DENX Software Engineering, lukma@denx.de > */ > > +#define LOG_CATEGORY UCLASS_CLK > + > #include <common.h> > #include <clk.h> > #include <clk-uclass.h> > @@ -22,24 +24,24 @@ int clk_register(struct clk *clk, const char *drv_name, > > ret = uclass_get_device_by_name(UCLASS_CLK, parent_name, &parent); > if (ret) { > - printf("%s: failed to get %s device (parent of %s)\n", > - __func__, parent_name, name); > + log_err("%s: failed to get %s device (parent of %s)\n", > + __func__, parent_name, name); > } else { > - debug("%s: name: %s parent: %s [0x%p]\n", __func__, name, > - parent->name, parent); > + log_debug("%s: name: %s parent: %s [0x%p]\n", __func__, name, > + parent->name, parent); > } > > drv = lists_driver_lookup_name(drv_name); > if (!drv) { > - printf("%s: %s is not a valid driver name\n", > - __func__, drv_name); > + log_err("%s: %s is not a valid driver name\n", > + __func__, drv_name); > return -ENOENT; > } > > ret = device_bind(parent, drv, name, NULL, ofnode_null(), &clk->dev); > if (ret) { > - printf("%s: CLK: %s driver bind error [%d]!\n", __func__, name, > - ret); > + log_err("%s: CLK: %s driver bind error [%d]!\n", __func__, name, > + ret); > return ret; > } > > diff --git a/drivers/clk/clk_fixed_factor.c b/drivers/clk/clk_fixed_factor.c > index 41b0d9c060..6c1139e5c5 100644 > --- a/drivers/clk/clk_fixed_factor.c > +++ b/drivers/clk/clk_fixed_factor.c > @@ -5,10 +5,13 @@ > * Author: Anup Patel <anup.patel@wdc.com> > */ > > +#define LOG_CATEGORY UCLASS_CLK > + > #include <common.h> > #include <clk-uclass.h> > #include <div64.h> > #include <dm.h> > +#include <log.h> > #include <linux/err.h> > > struct clk_fixed_factor { > diff --git a/drivers/clk/clk_fixed_rate.c b/drivers/clk/clk_fixed_rate.c > index c5a2a42c92..b5e78c7055 100644 > --- a/drivers/clk/clk_fixed_rate.c > +++ b/drivers/clk/clk_fixed_rate.c > @@ -3,9 +3,12 @@ > * Copyright (C) 2016 Masahiro Yamada <yamada.masahiro@socionext.com> > */ > > +#define LOG_CATEGORY UCLASS_CLK > + > #include <common.h> > #include <clk-uclass.h> > #include <dm.h> > +#include <log.h> > #include <dm/device-internal.h> > #include <linux/clk-provider.h> > > Reviewed-by: Sean Anderson <seanga2@gmail.com> ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] clk: cosmetic: reorder include files 2021-11-19 14:12 [PATCH 1/2] clk: cosmetic: reorder include files Patrick Delaunay 2021-11-19 14:12 ` [PATCH 2/2] clk: define LOG_CATEGORY for generic and ccf clocks Patrick Delaunay @ 2021-11-21 19:14 ` Sean Anderson 2021-12-15 19:05 ` Sean Anderson 2 siblings, 0 replies; 5+ messages in thread From: Sean Anderson @ 2021-11-21 19:14 UTC (permalink / raw) To: Patrick Delaunay, u-boot; +Cc: Lukasz Majewski, U-Boot STM32 On 11/19/21 9:12 AM, Patrick Delaunay wrote: > Reorder include files in the U-Boot expected order: > > the common.h header should always be first, > followed by other headers in order, > then headers with directories, > then local files. > > It is a preliminary step for next patch. > > Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> > --- > > drivers/clk/clk-composite.c | 6 +++--- > drivers/clk/clk-fixed-factor.c | 9 +++++---- > drivers/clk/clk-gate.c | 9 +++++---- > drivers/clk/clk-mux.c | 5 +++-- > drivers/clk/clk-uclass.c | 2 +- > drivers/clk/clk.c | 2 +- > 6 files changed, 18 insertions(+), 15 deletions(-) > > diff --git a/drivers/clk/clk-composite.c b/drivers/clk/clk-composite.c > index bb5351ebc0..12288e10b3 100644 > --- a/drivers/clk/clk-composite.c > +++ b/drivers/clk/clk-composite.c > @@ -5,13 +5,13 @@ > */ > > #include <common.h> > -#include <asm/io.h> > -#include <malloc.h> > +#include <clk.h> > #include <clk-uclass.h> > +#include <malloc.h> > +#include <asm/io.h> > #include <dm/device.h> > #include <dm/devres.h> > #include <linux/clk-provider.h> > -#include <clk.h> > #include <linux/err.h> > > #include "clk.h" > diff --git a/drivers/clk/clk-fixed-factor.c b/drivers/clk/clk-fixed-factor.c > index 8d9823bdab..9fcf30fd2e 100644 > --- a/drivers/clk/clk-fixed-factor.c > +++ b/drivers/clk/clk-fixed-factor.c > @@ -6,16 +6,17 @@ > * Copyright (C) 2011 Sascha Hauer, Pengutronix <s.hauer@pengutronix.de> > */ > #include <common.h> > -#include <malloc.h> > +#include <clk.h> > #include <clk-uclass.h> > +#include <div64.h> > +#include <malloc.h> > #include <dm/device.h> > #include <dm/devres.h> > #include <linux/clk-provider.h> > -#include <div64.h> > -#include <clk.h> > -#include "clk.h" > #include <linux/err.h> > > +#include "clk.h" > + > #define UBOOT_DM_CLK_IMX_FIXED_FACTOR "ccf_clk_fixed_factor" > > static ulong clk_factor_recalc_rate(struct clk *clk) > diff --git a/drivers/clk/clk-gate.c b/drivers/clk/clk-gate.c > index 006d3b6629..708499d95a 100644 > --- a/drivers/clk/clk-gate.c > +++ b/drivers/clk/clk-gate.c > @@ -8,17 +8,18 @@ > */ > > #include <common.h> > -#include <asm/io.h> > -#include <malloc.h> > +#include <clk.h> > #include <clk-uclass.h> > +#include <malloc.h> > +#include <asm/io.h> > #include <dm/device.h> > #include <dm/devres.h> > #include <linux/bitops.h> > #include <linux/clk-provider.h> > -#include <clk.h> > -#include "clk.h" > #include <linux/err.h> > > +#include "clk.h" > + > #define UBOOT_DM_CLK_GATE "clk_gate" > > /** > diff --git a/drivers/clk/clk-mux.c b/drivers/clk/clk-mux.c > index f1becd20d8..fd746f2de3 100644 > --- a/drivers/clk/clk-mux.c > +++ b/drivers/clk/clk-mux.c > @@ -24,14 +24,15 @@ > #include <common.h> > #include <clk.h> > #include <clk-uclass.h> > +#include <malloc.h> > +#include <asm/io.h> > #include <dm/device.h> > #include <dm/devres.h> > #include <dm/uclass.h> > #include <linux/bitops.h> > -#include <malloc.h> > -#include <asm/io.h> > #include <linux/clk-provider.h> > #include <linux/err.h> > + > #include "clk.h" > > #define UBOOT_DM_CLK_CCF_MUX "ccf_clk_mux" > diff --git a/drivers/clk/clk-uclass.c b/drivers/clk/clk-uclass.c > index 493018b33e..f2d2642754 100644 > --- a/drivers/clk/clk-uclass.c > +++ b/drivers/clk/clk-uclass.c > @@ -16,6 +16,7 @@ > #include <errno.h> > #include <log.h> > #include <malloc.h> > +#include <asm/global_data.h> > #include <dm/device_compat.h> > #include <dm/device-internal.h> > #include <dm/devres.h> > @@ -23,7 +24,6 @@ > #include <linux/bug.h> > #include <linux/clk-provider.h> > #include <linux/err.h> > -#include <asm/global_data.h> > > static inline const struct clk_ops *clk_dev_ops(struct udevice *dev) > { > diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c > index 1efb7fe9f3..d1a9787071 100644 > --- a/drivers/clk/clk.c > +++ b/drivers/clk/clk.c > @@ -5,13 +5,13 @@ > */ > > #include <common.h> > +#include <clk.h> > #include <clk-uclass.h> > #include <log.h> > #include <dm/device.h> > #include <dm/uclass.h> > #include <dm/lists.h> > #include <dm/device-internal.h> > -#include <clk.h> > > int clk_register(struct clk *clk, const char *drv_name, > const char *name, const char *parent_name) > Reviewed-by: Sean Anderson <seanga2@gmail.com> ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] clk: cosmetic: reorder include files 2021-11-19 14:12 [PATCH 1/2] clk: cosmetic: reorder include files Patrick Delaunay 2021-11-19 14:12 ` [PATCH 2/2] clk: define LOG_CATEGORY for generic and ccf clocks Patrick Delaunay 2021-11-21 19:14 ` [PATCH 1/2] clk: cosmetic: reorder include files Sean Anderson @ 2021-12-15 19:05 ` Sean Anderson 2 siblings, 0 replies; 5+ messages in thread From: Sean Anderson @ 2021-12-15 19:05 UTC (permalink / raw) To: Patrick Delaunay, u-boot; +Cc: Sean Anderson, U-Boot STM32, Lukasz Majewski On Fri, 19 Nov 2021 15:12:06 +0100, Patrick Delaunay wrote: > Reorder include files in the U-Boot expected order: > > the common.h header should always be first, > followed by other headers in order, > then headers with directories, > then local files. > > [...] Applied, thanks! [1/2] clk: cosmetic: reorder include files commit: 572c446e98e224555be1ae2add1b49ff1a60ed7a [2/2] clk: define LOG_CATEGORY for generic and ccf clocks commit: 560e1e005093b1d62c53391d68960237294e7f89 Best regards, -- Sean Anderson <seanga2@gmail.com> ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-12-15 19:07 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2021-11-19 14:12 [PATCH 1/2] clk: cosmetic: reorder include files Patrick Delaunay 2021-11-19 14:12 ` [PATCH 2/2] clk: define LOG_CATEGORY for generic and ccf clocks Patrick Delaunay 2021-11-21 19:16 ` Sean Anderson 2021-11-21 19:14 ` [PATCH 1/2] clk: cosmetic: reorder include files Sean Anderson 2021-12-15 19:05 ` Sean Anderson
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).