From patchwork Tue Jan 14 18:54:59 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Alifer Moraes X-Patchwork-Id: 239601 List-Id: U-Boot discussion From: alifer.wsdm at gmail.com (Alifer Moraes) Date: Tue, 14 Jan 2020 15:54:59 -0300 Subject: [PATCH 1/3] imx8m: clock_imx8mm: Staticize functions Message-ID: <20200114185501.4993-1-alifer.wsdm@gmail.com> 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 --- 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; From patchwork Tue Jan 14 18:55:00 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Alifer Moraes X-Patchwork-Id: 239602 List-Id: U-Boot discussion From: alifer.wsdm at gmail.com (Alifer Moraes) Date: Tue, 14 Jan 2020 15:55:00 -0300 Subject: [PATCH 2/3] mx8mm_evk: spl: Staticize functions In-Reply-To: <20200114185501.4993-1-alifer.wsdm@gmail.com> References: <20200114185501.4993-1-alifer.wsdm@gmail.com> Message-ID: <20200114185501.4993-2-alifer.wsdm@gmail.com> 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 --- 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; From patchwork Tue Jan 14 18:55:01 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Alifer Moraes X-Patchwork-Id: 239603 List-Id: U-Boot discussion From: alifer.wsdm at gmail.com (Alifer Moraes) Date: Tue, 14 Jan 2020 15:55:01 -0300 Subject: [PATCH 3/3] spl: Add prototype to function spl_board_boot_device() In-Reply-To: <20200114185501.4993-1-alifer.wsdm@gmail.com> References: <20200114185501.4993-1-alifer.wsdm@gmail.com> Message-ID: <20200114185501.4993-3-alifer.wsdm@gmail.com> 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 --- 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