Resurrect the unused function to print the imx25 silicon revision at
startup.
This patch set is blocking Arnd's work on enabling -Werror=missing-prototypes.
Arnd, could you pick up these patches in your tree as suggested by Stephen?
Thanks,
Martin
changes in v7:
- rebase against today's linux-next
- add Acked-by from Stephen
changes in v6:
- rebase against today's linux-next
- add Acked-by from Arnd
changes in v5:
- rebase against today's linux-next
changes in v4:
- rebase against today's linux-next
- add Fabio's Reviewed-by tags
changes in v3:
- rebase against today's linux-next
changes in v2:
- drop the patch about silicon revision 1.2. It has already been merged
by Shawn Guo.
- send the changeset to the clk maintainers
Martin Kaiser (2):
clk: imx25: print silicon revision during init
clk: imx25: make __mx25_clocks_init return void
drivers/clk/imx/clk-imx25.c | 5 +++--
include/soc/imx/revision.h | 1 +
2 files changed, 4 insertions(+), 2 deletions(-)
--
2.39.2
The __mx25_clocks_init function always returns 0 and its only
caller does not check the return value. Let's remove it.
Signed-off-by: Martin Kaiser <[email protected]>
Reviewed-by: Fabio Estevam <[email protected]>
Acked-by: Arnd Bergmann <[email protected]>
Acked-by: Stephen Boyd <[email protected]>
---
drivers/clk/imx/clk-imx25.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/clk/imx/clk-imx25.c b/drivers/clk/imx/clk-imx25.c
index bee3da2e21e1..c566be848c2d 100644
--- a/drivers/clk/imx/clk-imx25.c
+++ b/drivers/clk/imx/clk-imx25.c
@@ -74,7 +74,7 @@ enum mx25_clks {
static struct clk *clk[clk_max];
-static int __init __mx25_clocks_init(void __iomem *ccm_base)
+static void __init __mx25_clocks_init(void __iomem *ccm_base)
{
BUG_ON(!ccm_base);
@@ -222,8 +222,6 @@ static int __init __mx25_clocks_init(void __iomem *ccm_base)
imx_register_uart_clocks();
imx_print_silicon_rev("i.MX25", mx25_revision());
-
- return 0;
}
static void __init mx25_clocks_init_dt(struct device_node *np)
--
2.39.2
Print the imx25 silicon revision when the clocks are initialised.
Use the same mechanism as for imx27, i.e. call mx25_revision.
This function is unused at the moment.
Signed-off-by: Martin Kaiser <[email protected]>
Reviewed-by: Fabio Estevam <[email protected]>
Acked-by: Arnd Bergmann <[email protected]>
Acked-by: Stephen Boyd <[email protected]>
---
drivers/clk/imx/clk-imx25.c | 3 +++
include/soc/imx/revision.h | 1 +
2 files changed, 4 insertions(+)
diff --git a/drivers/clk/imx/clk-imx25.c b/drivers/clk/imx/clk-imx25.c
index cc013b343e62..bee3da2e21e1 100644
--- a/drivers/clk/imx/clk-imx25.c
+++ b/drivers/clk/imx/clk-imx25.c
@@ -13,6 +13,7 @@
#include <linux/of.h>
#include <linux/of_address.h>
#include <linux/of_irq.h>
+#include <soc/imx/revision.h>
#include "clk.h"
@@ -220,6 +221,8 @@ static int __init __mx25_clocks_init(void __iomem *ccm_base)
imx_register_uart_clocks();
+ imx_print_silicon_rev("i.MX25", mx25_revision());
+
return 0;
}
diff --git a/include/soc/imx/revision.h b/include/soc/imx/revision.h
index b2a55dafaf0a..b122d2fc8881 100644
--- a/include/soc/imx/revision.h
+++ b/include/soc/imx/revision.h
@@ -22,6 +22,7 @@
#define IMX_CHIP_REVISION_3_3 0x33
#define IMX_CHIP_REVISION_UNKNOWN 0xff
+int mx25_revision(void);
int mx27_revision(void);
int mx31_revision(void);
int mx35_revision(void);
--
2.39.2
On Wed, 02 Aug 2023 20:40:44 +0200, Martin Kaiser wrote:
> Resurrect the unused function to print the imx25 silicon revision at
> startup.
>
> This patch set is blocking Arnd's work on enabling -Werror=missing-prototypes.
>
> Arnd, could you pick up these patches in your tree as suggested by Stephen?
>
> [...]
Applied, thanks!
[1/2] clk: imx25: print silicon revision during init
commit: b8a06b125c245eb946d88847e052294a85b206c3
[2/2] clk: imx25: make __mx25_clocks_init return void
commit: 5dc176079b7a8ba7ff89db10e0c9784856c79d7f
Best regards,
--
Abel Vesa <[email protected]>