Skip to contentSkip to conversation

mxs: Staticize SPL functions

PATCH New Marek Vasut 2 participants 3 messages Nov 30, 2012 – Dec 4, 2012

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mxs: Staticize SPL functions

The MXS SPL didn't mark local functions "static". Fix it. This also makes the SPL smaller by roughly 300 bytes.

Cc Stefano Babic <[email protected]>
Cc Fabio Estevam <[email protected]>
---
 arch/arm/cpu/arm926ejs/mxs/spl_boot.c       |    4 +-
 arch/arm/cpu/arm926ejs/mxs/spl_mem_init.c   |    8 ++--
 arch/arm/cpu/arm926ejs/mxs/spl_power_init.c |   56 +++++++++++++--------------
 3 files changed, 34 insertions(+), 34 deletions(-)
arch/arm/cpu/arm926ejs/mxs/spl_boot.c +2 -2
index 864ce9f..c38fd39 100644
@@ -50,7 +50,7 @@ void early_delay(int delay)
 }
 
 #define	MUX_CONFIG_BOOTMODE_PAD	(MXS_PAD_3V3 | MXS_PAD_4MA | MXS_PAD_NOPULL)
-const iomux_cfg_t iomux_boot[] = {
+static const iomux_cfg_t iomux_boot[] = {
 	MX28_PAD_LCD_D00__GPIO_1_0 | MUX_CONFIG_BOOTMODE_PAD,
 	MX28_PAD_LCD_D01__GPIO_1_1 | MUX_CONFIG_BOOTMODE_PAD,
 	MX28_PAD_LCD_D02__GPIO_1_2 | MUX_CONFIG_BOOTMODE_PAD,
@@ -59,7 +59,7 @@ const iomux_cfg_t iomux_boot[] = {
 	MX28_PAD_LCD_D05__GPIO_1_5 | MUX_CONFIG_BOOTMODE_PAD,
 };
 
-uint8_t mxs_get_bootmode_index(void)
+static uint8_t mxs_get_bootmode_index(void)
 {
 	uint8_t bootmode = 0;
 	int i;
arch/arm/cpu/arm926ejs/mxs/spl_mem_init.c +4 -4
index 8904e24..8c7f34a 100644
@@ -87,7 +87,7 @@ void __mxs_adjust_memory_params(uint32_t *dram_vals)
 void mxs_adjust_memory_params(uint32_t *dram_vals)
 	__attribute__((weak, alias("__mxs_adjust_memory_params")));
 
-void init_mx28_200mhz_ddr2(void)
+static void init_mx28_200mhz_ddr2(void)
 {
 	int i;
 
@@ -97,7 +97,7 @@ void init_mx28_200mhz_ddr2(void)
 		writel(mx28_dram_vals[i], MXS_DRAM_BASE + (4 * i));
 }
 
-void mxs_mem_init_clock(void)
+static void mxs_mem_init_clock(void)
 {
 	struct mxs_clkctrl_regs *clkctrl_regs =
 		(struct mxs_clkctrl_regs *)MXS_CLKCTRL_BASE;
@@ -128,7 +128,7 @@ void mxs_mem_init_clock(void)
 	early_delay(10000);
 }
 
-void mxs_mem_setup_cpu_and_hbus(void)
+static void mxs_mem_setup_cpu_and_hbus(void)
 {
 	struct mxs_clkctrl_regs *clkctrl_regs =
 		(struct mxs_clkctrl_regs *)MXS_CLKCTRL_BASE;
@@ -160,7 +160,7 @@ void mxs_mem_setup_cpu_and_hbus(void)
 	early_delay(15000);
 }
 
-void mxs_mem_setup_vdda(void)
+static void mxs_mem_setup_vdda(void)
 {
 	struct mxs_power_regs *power_regs =
 		(struct mxs_power_regs *)MXS_POWER_BASE;
arch/arm/cpu/arm926ejs/mxs/spl_power_init.c +28 -28

222 lines not on this page · raw message

Signature · 1 line
1.7.10.4
#1 lore raw

PATCH 1/1 mxs: Staticize SPL functions

Quoted 7 lines · Marek Vasut

The MXS SPL didn't mark local functions "static". Fix it. This also makes the SPL smaller by roughly 300 bytes.

Cc Stefano Babic <[email protected]>
Cc Fabio Estevam <[email protected]>

---

Hi Marek,

this should be better part of the previous patchset (mxs: Implement common function to setup VDDx), because it depends on them, but it never mind ;-)

Applied to u-boot-imx, thanks.

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
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
=====================================================================
#2 lore raw

PATCH 1/1 mxs: Staticize SPL functions

Dear Stefano Babic,

Quoted 9 lines · Marek Vasut
Quoted 7 lines

The MXS SPL didn't mark local functions "static". Fix it. This also makes the SPL smaller by roughly 300 bytes.

Cc Stefano Babic <[email protected]>
Cc Fabio Estevam <[email protected]>

---

Quoted 5 lines

Hi Marek,

this should be better part of the previous patchset (mxs: Implement common function to setup VDDx), because it depends on them, but it never mind ;-)

This one emerged much later, but I see your point ;-)

Quoted 1 line

Applied to u-boot-imx, thanks.

Thanks!

Quoted 2 lines

Best regards,
Stefano Babic

Best regards,
Marek Vasut