public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [PATCH 1/3] imx8m: clock_imx8mm: Staticize functions
@ 2020-01-14 18:54 Alifer Moraes
  2020-01-14 18:55 ` [PATCH 2/3] mx8mm_evk: spl: " Alifer Moraes
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Alifer Moraes @ 2020-01-14 18:54 UTC (permalink / raw)
  To: u-boot

Functions fracpll_configure(), decode_intpll(), decode_fracpll(),
get_root_src_clk() and get_root_clk() are used only in the scope of this
file, so make them static to fix the following sparse warnings:

arch/arm/mach-imx/imx8m/clock_imx8mm.c:50:5: warning: no previous
prototype for ‘fracpll_configure’ [-Wmissing-prototypes]
arch/arm/mach-imx/imx8m/clock_imx8mm.c:271:5: warning: no previous
prototype for ‘decode_intpll’ [-Wmissing-prototypes]
arch/arm/mach-imx/imx8m/clock_imx8mm.c:418:5: warning: no previous
prototype for ‘decode_fracpll’ [-Wmissing-prototypes]
arch/arm/mach-imx/imx8m/clock_imx8mm.c:483:5: warning: no previous
prototype for ‘get_root_src_clk’ [-Wmissing-prototypes]
arch/arm/mach-imx/imx8m/clock_imx8mm.c:527:5: warning: no previous
prototype for ‘get_root_clk’ [-Wmissing-prototypes]

Signed-off-by: Alifer Moraes <alifer.wsdm@gmail.com>
---
 arch/arm/mach-imx/imx8m/clock_imx8mm.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/arch/arm/mach-imx/imx8m/clock_imx8mm.c b/arch/arm/mach-imx/imx8m/clock_imx8mm.c
index ca4b4c05ab..c423ac0058 100644
--- a/arch/arm/mach-imx/imx8m/clock_imx8mm.c
+++ b/arch/arm/mach-imx/imx8m/clock_imx8mm.c
@@ -47,7 +47,7 @@ static struct imx_int_pll_rate_table imx8mm_fracpll_tbl[] = {
 	PLL_1443X_RATE(100000000U, 300, 9, 3, 0),
 };
 
-int fracpll_configure(enum pll_clocks pll, u32 freq)
+static int fracpll_configure(enum pll_clocks pll, u32 freq)
 {
 	int i;
 	u32 tmp, div_val;
@@ -268,7 +268,7 @@ u32 imx_get_uartclk(void)
 	return 24000000U;
 }
 
-u32 decode_intpll(enum clk_root_src intpll)
+static u32 decode_intpll(enum clk_root_src intpll)
 {
 	u32 pll_gnrl_ctl, pll_div_ctl, pll_clke_mask;
 	u32 main_div, pre_div, post_div, div;
@@ -415,7 +415,7 @@ u32 decode_intpll(enum clk_root_src intpll)
 	return lldiv(freq, pre_div * (1 << post_div) * div);
 }
 
-u32 decode_fracpll(enum clk_root_src frac_pll)
+static u32 decode_fracpll(enum clk_root_src frac_pll)
 {
 	u32 pll_gnrl_ctl, pll_fdiv_ctl0, pll_fdiv_ctl1;
 	u32 main_div, pre_div, post_div, k;
@@ -480,7 +480,7 @@ u32 decode_fracpll(enum clk_root_src frac_pll)
 		     65536 * pre_div * (1 << post_div));
 }
 
-u32 get_root_src_clk(enum clk_root_src root_src)
+static u32 get_root_src_clk(enum clk_root_src root_src)
 {
 	switch (root_src) {
 	case OSC_24M_CLK:
@@ -524,7 +524,7 @@ u32 get_root_src_clk(enum clk_root_src root_src)
 	return 0;
 }
 
-u32 get_root_clk(enum clk_root_index clock_id)
+static u32 get_root_clk(enum clk_root_index clock_id)
 {
 	enum clk_root_src root_src;
 	u32 post_podf, pre_podf, root_src_clk;
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 2/3] mx8mm_evk: spl: Staticize functions
  2020-01-14 18:54 [PATCH 1/3] imx8m: clock_imx8mm: Staticize functions Alifer Moraes
@ 2020-01-14 18:55 ` Alifer Moraes
  2020-01-20 20:18   ` sbabic at denx.de
  2020-01-14 18:55 ` [PATCH 3/3] spl: Add prototype to function spl_board_boot_device() Alifer Moraes
  2020-01-20 20:18 ` [PATCH 1/3] imx8m: clock_imx8mm: Staticize functions sbabic at denx.de
  2 siblings, 1 reply; 6+ messages in thread
From: Alifer Moraes @ 2020-01-14 18:55 UTC (permalink / raw)
  To: u-boot

Functions spl_dram_init() and power_init_board() are used only in
the scope of this file, so make them static to fix the following sparse
warnings:

board/freescale/imx8mm_evk/spl.c:40:6: warning: no previous prototype
for ‘spl_dram_init’ [-Wmissing-prototypes]

board/freescale/imx8mm_evk/spl.c:85:5: warning: no previous prototype
for ‘power_init_board’ [-Wmissing-prototypes]

Signed-off-by: Alifer Moraes <alifer.wsdm@gmail.com>
---
 board/freescale/imx8mm_evk/spl.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/board/freescale/imx8mm_evk/spl.c b/board/freescale/imx8mm_evk/spl.c
index 2d08f9a563..e28f795676 100644
--- a/board/freescale/imx8mm_evk/spl.c
+++ b/board/freescale/imx8mm_evk/spl.c
@@ -37,7 +37,7 @@ int spl_board_boot_device(enum boot_device boot_dev_spl)
 	}
 }
 
-void spl_dram_init(void)
+static void spl_dram_init(void)
 {
 	ddr_init(&dram_timing);
 }
@@ -82,7 +82,7 @@ int board_early_init_f(void)
 	return 0;
 }
 
-int power_init_board(void)
+static int power_init_board(void)
 {
 	struct udevice *dev;
 	int ret;
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 3/3] spl: Add prototype to function spl_board_boot_device()
  2020-01-14 18:54 [PATCH 1/3] imx8m: clock_imx8mm: Staticize functions Alifer Moraes
  2020-01-14 18:55 ` [PATCH 2/3] mx8mm_evk: spl: " Alifer Moraes
@ 2020-01-14 18:55 ` Alifer Moraes
  2020-01-20 20:17   ` sbabic at denx.de
  2020-01-20 20:18 ` [PATCH 1/3] imx8m: clock_imx8mm: Staticize functions sbabic at denx.de
  2 siblings, 1 reply; 6+ messages in thread
From: Alifer Moraes @ 2020-01-14 18:55 UTC (permalink / raw)
  To: u-boot

Add prototype to function spl_board_boot_device to fix the following
sparse warning:

board/freescale/imx8mm_evk/spl.c:26:5: warning: no previous prototype
for ‘spl_board_boot_device’ [-Wmissing-prototypes]

Signed-off-by: Alifer Moraes <alifer.wsdm@gmail.com>
---
 include/spl.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/spl.h b/include/spl.h
index 02aa1ff85d..8a311fefad 100644
--- a/include/spl.h
+++ b/include/spl.h
@@ -269,6 +269,7 @@ int spl_parse_image_header(struct spl_image_info *spl_image,
 void spl_board_prepare_for_linux(void);
 void spl_board_prepare_for_boot(void);
 int spl_board_ubi_load_image(u32 boot_device);
+int spl_board_boot_device(u32 boot_device);
 
 /**
  * jump_to_image_linux() - Jump to a Linux kernel from SPL
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 3/3] spl: Add prototype to function spl_board_boot_device()
  2020-01-14 18:55 ` [PATCH 3/3] spl: Add prototype to function spl_board_boot_device() Alifer Moraes
@ 2020-01-20 20:17   ` sbabic at denx.de
  0 siblings, 0 replies; 6+ messages in thread
From: sbabic at denx.de @ 2020-01-20 20:17 UTC (permalink / raw)
  To: u-boot

> Add prototype to function spl_board_boot_device to fix the following
> sparse warning:
> board/freescale/imx8mm_evk/spl.c:26:5: warning: no previous prototype
> for ‘spl_board_boot_device’ [-Wmissing-prototypes]
> Signed-off-by: Alifer Moraes <alifer.wsdm@gmail.com>
Applied to u-boot-imx, master, thanks !

Best regards,
Stefano Babic

-- 
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 2/3] mx8mm_evk: spl: Staticize functions
  2020-01-14 18:55 ` [PATCH 2/3] mx8mm_evk: spl: " Alifer Moraes
@ 2020-01-20 20:18   ` sbabic at denx.de
  0 siblings, 0 replies; 6+ messages in thread
From: sbabic at denx.de @ 2020-01-20 20:18 UTC (permalink / raw)
  To: u-boot

> Functions spl_dram_init() and power_init_board() are used only in
> the scope of this file, so make them static to fix the following sparse
> warnings:
> board/freescale/imx8mm_evk/spl.c:40:6: warning: no previous prototype
> for ‘spl_dram_init’ [-Wmissing-prototypes]
> board/freescale/imx8mm_evk/spl.c:85:5: warning: no previous prototype
> for ‘power_init_board’ [-Wmissing-prototypes]
> Signed-off-by: Alifer Moraes <alifer.wsdm@gmail.com>
Applied to u-boot-imx, master, thanks !

Best regards,
Stefano Babic

-- 
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 1/3] imx8m: clock_imx8mm: Staticize functions
  2020-01-14 18:54 [PATCH 1/3] imx8m: clock_imx8mm: Staticize functions Alifer Moraes
  2020-01-14 18:55 ` [PATCH 2/3] mx8mm_evk: spl: " Alifer Moraes
  2020-01-14 18:55 ` [PATCH 3/3] spl: Add prototype to function spl_board_boot_device() Alifer Moraes
@ 2020-01-20 20:18 ` sbabic at denx.de
  2 siblings, 0 replies; 6+ messages in thread
From: sbabic at denx.de @ 2020-01-20 20:18 UTC (permalink / raw)
  To: u-boot

> Functions fracpll_configure(), decode_intpll(), decode_fracpll(),
> get_root_src_clk() and get_root_clk() are used only in the scope of this
> file, so make them static to fix the following sparse warnings:
> arch/arm/mach-imx/imx8m/clock_imx8mm.c:50:5: warning: no previous
> prototype for ‘fracpll_configure’ [-Wmissing-prototypes]
> arch/arm/mach-imx/imx8m/clock_imx8mm.c:271:5: warning: no previous
> prototype for ‘decode_intpll’ [-Wmissing-prototypes]
> arch/arm/mach-imx/imx8m/clock_imx8mm.c:418:5: warning: no previous
> prototype for ‘decode_fracpll’ [-Wmissing-prototypes]
> arch/arm/mach-imx/imx8m/clock_imx8mm.c:483:5: warning: no previous
> prototype for ‘get_root_src_clk’ [-Wmissing-prototypes]
> arch/arm/mach-imx/imx8m/clock_imx8mm.c:527:5: warning: no previous
> prototype for ‘get_root_clk’ [-Wmissing-prototypes]
> Signed-off-by: Alifer Moraes <alifer.wsdm@gmail.com>
Applied to u-boot-imx, master, thanks !

Best regards,
Stefano Babic

-- 
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-01-20 20:18 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-01-14 18:54 [PATCH 1/3] imx8m: clock_imx8mm: Staticize functions Alifer Moraes
2020-01-14 18:55 ` [PATCH 2/3] mx8mm_evk: spl: " Alifer Moraes
2020-01-20 20:18   ` sbabic at denx.de
2020-01-14 18:55 ` [PATCH 3/3] spl: Add prototype to function spl_board_boot_device() Alifer Moraes
2020-01-20 20:17   ` sbabic at denx.de
2020-01-20 20:18 ` [PATCH 1/3] imx8m: clock_imx8mm: Staticize functions sbabic at denx.de

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox