[PATCH v4 0/2] ARM: imx25: print silicon revision at startup

Martin Kaiser posted 2 patches 3 years, 7 months ago
There is a newer version of this series
drivers/clk/imx/clk-imx25.c | 5 +++--
include/soc/imx/revision.h  | 1 +
2 files changed, 4 insertions(+), 2 deletions(-)
[PATCH v4 0/2] ARM: imx25: print silicon revision at startup
Posted by Martin Kaiser 3 years, 7 months ago
Resurrect the unused function to print the imx25 silicon revision at
startup.

Now that 6.0-rc1 is out, I hope that the clk maintainers have a moment
to review this simple patch set ;-)

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.30.2
[PATCH v5 0/2] ARM: imx25: print silicon revision at startup
Posted by Martin Kaiser 2 years, 10 months ago
Resurrect the unused function to print the imx25 silicon revision at
startup.

This patchset has been mentioned in a discussion today. Let's bring it to the
attention of the clk maintainers again. 

Thanks & best regards,
Martin

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.30.2
Re: [PATCH v5 0/2] ARM: imx25: print silicon revision at startup
Posted by Arnd Bergmann 2 years, 10 months ago
On Wed, May 17, 2023, at 17:39, Martin Kaiser wrote:
> Resurrect the unused function to print the imx25 silicon revision at
> startup.
>
> This patchset has been mentioned in a discussion today. Let's bring it to the
> attention of the clk maintainers again. 

Looks good to me, and fixes the warning about the function having
no prototype, so

Acked-by: Arnd Bergmann <arnd@arndb.de>
[PATCH v5 1/2] clk: imx25: print silicon revision during init
Posted by Martin Kaiser 2 years, 10 months ago
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 <martin@kaiser.cx>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
---
changes in v5:
- rebase against today's linux-next

changes in v4:
- rebase against today's linux-next
- add Fabio's Reviewed-by tag

changes in v3:
- rebase against today's linux-next

changes in v2:
- send the patch to the clk maintainers

 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.30.2
[PATCH v5 2/2] clk: imx25: make __mx25_clocks_init return void
Posted by Martin Kaiser 2 years, 10 months ago
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 <martin@kaiser.cx>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
---
changes in v5:
- rebase against today's linux-next

changes in v4:
- rebase against today's linux-next
- add Fabio's Reviewed-by tag

changes in v3:
- rebase against today's linux-next

changes in v2:
- send the patch to the clk maintainers

 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.30.2