public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 1/5] mx7dsabresd: Staticize when possible
@ 2015-09-13 16:06 Fabio Estevam
  2015-09-13 16:06 ` [U-Boot] [PATCH 2/5] mx7dsabreasd: Remove dead code Fabio Estevam
                   ` (4 more replies)
  0 siblings, 5 replies; 10+ messages in thread
From: Fabio Estevam @ 2015-09-13 16:06 UTC (permalink / raw)
  To: u-boot

From: Fabio Estevam <fabio.estevam@freescale.com>

Make the internal symbols static when possible.

This prevents sparse build warnings.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
 board/freescale/mx7dsabresd/mx7dsabresd.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/board/freescale/mx7dsabresd/mx7dsabresd.c b/board/freescale/mx7dsabresd/mx7dsabresd.c
index d163bee..6bd47df 100644
--- a/board/freescale/mx7dsabresd/mx7dsabresd.c
+++ b/board/freescale/mx7dsabresd/mx7dsabresd.c
@@ -44,7 +44,7 @@ DECLARE_GLOBAL_DATA_PTR;
 #ifdef CONFIG_SYS_I2C_MXC
 #define PC MUX_PAD_CTRL(I2C_PAD_CTRL)
 /* I2C1 for PMIC */
-struct i2c_pads_info i2c_pad_info1 = {
+static struct i2c_pads_info i2c_pad_info1 = {
 	.scl = {
 		.i2c_mode = MX7D_PAD_I2C1_SCL__I2C1_SCL | PC,
 		.gpio_mode = MX7D_PAD_I2C1_SCL__GPIO4_IO8 | PC,
@@ -156,7 +156,7 @@ static enum qn_func qn_output[8] = {
 	qn_enable
 };
 
-void iox74lv_init(void)
+static void iox74lv_init(void)
 {
 	int i;
 
@@ -527,11 +527,11 @@ int checkboard(void)
 }
 
 #ifdef CONFIG_USB_EHCI_MX7
-iomux_v3_cfg_t const usb_otg1_pads[] = {
+static iomux_v3_cfg_t const usb_otg1_pads[] = {
 	MX7D_PAD_GPIO1_IO05__USB_OTG1_PWR | MUX_PAD_CTRL(NO_PAD_CTRL),
 };
 
-iomux_v3_cfg_t const usb_otg2_pads[] = {
+static iomux_v3_cfg_t const usb_otg2_pads[] = {
 	MX7D_PAD_UART3_CTS_B__USB_OTG2_PWR | MUX_PAD_CTRL(NO_PAD_CTRL),
 };
 
-- 
1.9.1

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

* [U-Boot] [PATCH 2/5] mx7dsabreasd: Remove dead code
  2015-09-13 16:06 [U-Boot] [PATCH 1/5] mx7dsabresd: Staticize when possible Fabio Estevam
@ 2015-09-13 16:06 ` Fabio Estevam
  2015-09-20  7:52   ` Stefano Babic
  2015-09-13 16:06 ` [U-Boot] [PATCH 3/5] mx7dsabresd: Include USB header Fabio Estevam
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 10+ messages in thread
From: Fabio Estevam @ 2015-09-13 16:06 UTC (permalink / raw)
  To: u-boot

From: Fabio Estevam <fabio.estevam@freescale.com>

iox74lv_set() is not used anywhere, so let's remove it.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
 board/freescale/mx7dsabresd/mx7dsabresd.c | 38 -------------------------------
 1 file changed, 38 deletions(-)

diff --git a/board/freescale/mx7dsabresd/mx7dsabresd.c b/board/freescale/mx7dsabresd/mx7dsabresd.c
index 6bd47df..6c2fc98 100644
--- a/board/freescale/mx7dsabresd/mx7dsabresd.c
+++ b/board/freescale/mx7dsabresd/mx7dsabresd.c
@@ -190,44 +190,6 @@ static void iox74lv_init(void)
 	gpio_direction_output(IOX_STCP, 1);
 };
 
-void iox74lv_set(int index)
-{
-	int i;
-	for (i = 7; i >= 0; i--) {
-		gpio_direction_output(IOX_SHCP, 0);
-
-		if (i == index)
-			gpio_direction_output(IOX_SDI, seq[qn_output[i]][0]);
-		else
-			gpio_direction_output(IOX_SDI, seq[qn_output[i]][1]);
-		udelay(500);
-		gpio_direction_output(IOX_SHCP, 1);
-		udelay(500);
-	}
-
-	gpio_direction_output(IOX_STCP, 0);
-	udelay(500);
-	/*
-	  * shift register will be output to pins
-	  */
-	gpio_direction_output(IOX_STCP, 1);
-
-	for (i = 7; i >= 0; i--) {
-		gpio_direction_output(IOX_SHCP, 0);
-		gpio_direction_output(IOX_SDI, seq[qn_output[i]][1]);
-		udelay(500);
-		gpio_direction_output(IOX_SHCP, 1);
-		udelay(500);
-	}
-
-	gpio_direction_output(IOX_STCP, 0);
-	udelay(500);
-	/*
-	  * shift register will be output to pins
-	  */
-	gpio_direction_output(IOX_STCP, 1);
-};
-
 #ifdef CONFIG_FEC_MXC
 static iomux_v3_cfg_t const fec1_pads[] = {
 	MX7D_PAD_ENET1_RGMII_RX_CTL__ENET1_RGMII_RX_CTL | MUX_PAD_CTRL(ENET_RX_PAD_CTRL),
-- 
1.9.1

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

* [U-Boot] [PATCH 3/5] mx7dsabresd: Include USB header
  2015-09-13 16:06 [U-Boot] [PATCH 1/5] mx7dsabresd: Staticize when possible Fabio Estevam
  2015-09-13 16:06 ` [U-Boot] [PATCH 2/5] mx7dsabreasd: Remove dead code Fabio Estevam
@ 2015-09-13 16:06 ` Fabio Estevam
  2015-09-20  7:53   ` Stefano Babic
  2015-09-13 16:06 ` [U-Boot] [PATCH 4/5] mx7dsabresd: Remove get_board_rev() Fabio Estevam
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 10+ messages in thread
From: Fabio Estevam @ 2015-09-13 16:06 UTC (permalink / raw)
  To: u-boot

From: Fabio Estevam <fabio.estevam@freescale.com>

Include <usb/ehci-fsl.h> in order to fix the following sparse warning:

board/freescale/mx7dsabresd/mx7dsabresd.c:538:5: warning: symbol 'board_ehci_hcd_init' was not declared. Should it be static?

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
 board/freescale/mx7dsabresd/mx7dsabresd.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/board/freescale/mx7dsabresd/mx7dsabresd.c b/board/freescale/mx7dsabresd/mx7dsabresd.c
index 6c2fc98..4c18b5a 100644
--- a/board/freescale/mx7dsabresd/mx7dsabresd.c
+++ b/board/freescale/mx7dsabresd/mx7dsabresd.c
@@ -24,6 +24,7 @@
 #include <i2c.h>
 #include <asm/imx-common/mxc_i2c.h>
 #include <asm/arch/crm_regs.h>
+#include <usb/ehci-fsl.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
-- 
1.9.1

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

* [U-Boot] [PATCH 4/5] mx7dsabresd: Remove get_board_rev()
  2015-09-13 16:06 [U-Boot] [PATCH 1/5] mx7dsabresd: Staticize when possible Fabio Estevam
  2015-09-13 16:06 ` [U-Boot] [PATCH 2/5] mx7dsabreasd: Remove dead code Fabio Estevam
  2015-09-13 16:06 ` [U-Boot] [PATCH 3/5] mx7dsabresd: Include USB header Fabio Estevam
@ 2015-09-13 16:06 ` Fabio Estevam
  2015-09-20  7:53   ` Stefano Babic
  2015-09-13 16:06 ` [U-Boot] [PATCH 5/5] mx7dsabresd: Remove unused config option Fabio Estevam
  2015-09-20  7:52 ` [U-Boot] [PATCH 1/5] mx7dsabresd: Staticize when possible Stefano Babic
  4 siblings, 1 reply; 10+ messages in thread
From: Fabio Estevam @ 2015-09-13 16:06 UTC (permalink / raw)
  To: u-boot

From: Fabio Estevam <fabio.estevam@freescale.com>

get_board_rev() is not actually providing the board revision.

It just returns the CPU revision instead.

As the CPU revision is already printed on boot, there is no
reason to have get_board_rev(), so let's remove it.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
 board/freescale/mx7dsabresd/mx7dsabresd.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/board/freescale/mx7dsabresd/mx7dsabresd.c b/board/freescale/mx7dsabresd/mx7dsabresd.c
index 4c18b5a..5c37df5 100644
--- a/board/freescale/mx7dsabresd/mx7dsabresd.c
+++ b/board/freescale/mx7dsabresd/mx7dsabresd.c
@@ -477,11 +477,6 @@ int board_late_init(void)
 	return 0;
 }
 
-u32 get_board_rev(void)
-{
-	return get_cpu_rev();
-}
-
 int checkboard(void)
 {
 	puts("Board: i.MX7D SABRESD\n");
-- 
1.9.1

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

* [U-Boot] [PATCH 5/5] mx7dsabresd: Remove unused config option
  2015-09-13 16:06 [U-Boot] [PATCH 1/5] mx7dsabresd: Staticize when possible Fabio Estevam
                   ` (2 preceding siblings ...)
  2015-09-13 16:06 ` [U-Boot] [PATCH 4/5] mx7dsabresd: Remove get_board_rev() Fabio Estevam
@ 2015-09-13 16:06 ` Fabio Estevam
  2015-09-20  7:53   ` Stefano Babic
  2015-09-20  7:52 ` [U-Boot] [PATCH 1/5] mx7dsabresd: Staticize when possible Stefano Babic
  4 siblings, 1 reply; 10+ messages in thread
From: Fabio Estevam @ 2015-09-13 16:06 UTC (permalink / raw)
  To: u-boot

From: Fabio Estevam <fabio.estevam@freescale.com>

CONFIG_FEC_DMA_MINALIGN is not used anywhere, so let's remove it.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
 include/configs/mx7dsabresd.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/include/configs/mx7dsabresd.h b/include/configs/mx7dsabresd.h
index ec6e0a6..2a736c4 100644
--- a/include/configs/mx7dsabresd.h
+++ b/include/configs/mx7dsabresd.h
@@ -24,7 +24,6 @@
 
 #define CONFIG_PHYLIB
 #define CONFIG_PHY_BROADCOM
-#define CONFIG_FEC_DMA_MINALIGN		64
 /* ENET1 */
 #define IMX_FEC_BASE			ENET_IPS_BASE_ADDR
 
-- 
1.9.1

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

* [U-Boot] [PATCH 1/5] mx7dsabresd: Staticize when possible
  2015-09-13 16:06 [U-Boot] [PATCH 1/5] mx7dsabresd: Staticize when possible Fabio Estevam
                   ` (3 preceding siblings ...)
  2015-09-13 16:06 ` [U-Boot] [PATCH 5/5] mx7dsabresd: Remove unused config option Fabio Estevam
@ 2015-09-20  7:52 ` Stefano Babic
  4 siblings, 0 replies; 10+ messages in thread
From: Stefano Babic @ 2015-09-20  7:52 UTC (permalink / raw)
  To: u-boot



On 13/09/2015 18:06, Fabio Estevam wrote:
> From: Fabio Estevam <fabio.estevam@freescale.com>
> 
> Make the internal symbols static when possible.
> 
> This prevents sparse build warnings.
> 
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
> ---

Applied to u-boot-imx, 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] 10+ messages in thread

* [U-Boot] [PATCH 2/5] mx7dsabreasd: Remove dead code
  2015-09-13 16:06 ` [U-Boot] [PATCH 2/5] mx7dsabreasd: Remove dead code Fabio Estevam
@ 2015-09-20  7:52   ` Stefano Babic
  0 siblings, 0 replies; 10+ messages in thread
From: Stefano Babic @ 2015-09-20  7:52 UTC (permalink / raw)
  To: u-boot



On 13/09/2015 18:06, Fabio Estevam wrote:
> From: Fabio Estevam <fabio.estevam@freescale.com>
> 
> iox74lv_set() is not used anywhere, so let's remove it.
> 
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
> ---

Applied to u-boot-imx, 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] 10+ messages in thread

* [U-Boot] [PATCH 3/5] mx7dsabresd: Include USB header
  2015-09-13 16:06 ` [U-Boot] [PATCH 3/5] mx7dsabresd: Include USB header Fabio Estevam
@ 2015-09-20  7:53   ` Stefano Babic
  0 siblings, 0 replies; 10+ messages in thread
From: Stefano Babic @ 2015-09-20  7:53 UTC (permalink / raw)
  To: u-boot



On 13/09/2015 18:06, Fabio Estevam wrote:
> From: Fabio Estevam <fabio.estevam@freescale.com>
> 
> Include <usb/ehci-fsl.h> in order to fix the following sparse warning:
> 
> board/freescale/mx7dsabresd/mx7dsabresd.c:538:5: warning: symbol 'board_ehci_hcd_init' was not declared. Should it be static?
> 
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
> ---

Applied to u-boot-imx, 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] 10+ messages in thread

* [U-Boot] [PATCH 4/5] mx7dsabresd: Remove get_board_rev()
  2015-09-13 16:06 ` [U-Boot] [PATCH 4/5] mx7dsabresd: Remove get_board_rev() Fabio Estevam
@ 2015-09-20  7:53   ` Stefano Babic
  0 siblings, 0 replies; 10+ messages in thread
From: Stefano Babic @ 2015-09-20  7:53 UTC (permalink / raw)
  To: u-boot



On 13/09/2015 18:06, Fabio Estevam wrote:
> From: Fabio Estevam <fabio.estevam@freescale.com>
> 
> get_board_rev() is not actually providing the board revision.
> 
> It just returns the CPU revision instead.
> 
> As the CPU revision is already printed on boot, there is no
> reason to have get_board_rev(), so let's remove it.
> 
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
> ---

Applied to u-boot-imx, 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] 10+ messages in thread

* [U-Boot] [PATCH 5/5] mx7dsabresd: Remove unused config option
  2015-09-13 16:06 ` [U-Boot] [PATCH 5/5] mx7dsabresd: Remove unused config option Fabio Estevam
@ 2015-09-20  7:53   ` Stefano Babic
  0 siblings, 0 replies; 10+ messages in thread
From: Stefano Babic @ 2015-09-20  7:53 UTC (permalink / raw)
  To: u-boot



On 13/09/2015 18:06, Fabio Estevam wrote:
> From: Fabio Estevam <fabio.estevam@freescale.com>
> 
> CONFIG_FEC_DMA_MINALIGN is not used anywhere, so let's remove it.
> 
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
> ---

Applied to u-boot-imx, 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] 10+ messages in thread

end of thread, other threads:[~2015-09-20  7:53 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-13 16:06 [U-Boot] [PATCH 1/5] mx7dsabresd: Staticize when possible Fabio Estevam
2015-09-13 16:06 ` [U-Boot] [PATCH 2/5] mx7dsabreasd: Remove dead code Fabio Estevam
2015-09-20  7:52   ` Stefano Babic
2015-09-13 16:06 ` [U-Boot] [PATCH 3/5] mx7dsabresd: Include USB header Fabio Estevam
2015-09-20  7:53   ` Stefano Babic
2015-09-13 16:06 ` [U-Boot] [PATCH 4/5] mx7dsabresd: Remove get_board_rev() Fabio Estevam
2015-09-20  7:53   ` Stefano Babic
2015-09-13 16:06 ` [U-Boot] [PATCH 5/5] mx7dsabresd: Remove unused config option Fabio Estevam
2015-09-20  7:53   ` Stefano Babic
2015-09-20  7:52 ` [U-Boot] [PATCH 1/5] mx7dsabresd: Staticize when possible Stefano Babic

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