Skip to contentSkip to conversation

ARM DaVinci: Remove duplicate definitions of MACH_TYPE and prototype of i2c_init()

PATCH New Hugo Villeneuve 2 participants 4 messages Jul 11, 2008 – Jul 14, 2008

lore
Share & tools
lore
#0 lore raw

PATCH 1/4 ARM DaVinci: Remove duplicate definitions of MACH_TYPE and prototype of i2c_init()

ARM DaVinci: Remove duplicate definitions of MACH_TYPE and prototype of i2c_init().

---

 board/davinci/dv-evm/dv_board.c    |    3 ---
 board/davinci/schmoogie/dv_board.c |    3 ---
 board/davinci/sonata/dv_board.c    |    3 ---
 3 files changed, 0 insertions(+), 9 deletions(-)
board/davinci/dv-evm/dv_board.c +0 -3
index 88b1e57..454ac21 100644
@@ -29,11 +29,8 @@
 #include <asm/arch/hardware.h>
 #include <asm/arch/emac_defs.h>
 
-#define MACH_TYPE_DAVINCI_EVM		901
-
 DECLARE_GLOBAL_DATA_PTR;
 
-extern void	i2c_init(int speed, int slaveaddr);
 extern void	timer_init(void);
 extern int	eth_hw_init(void);
 extern phy_t	phy;
board/davinci/schmoogie/dv_board.c +0 -3
index 13d2195..529a437 100644
@@ -29,11 +29,8 @@
 #include <asm/arch/hardware.h>
 #include <asm/arch/emac_defs.h>
 
-#define MACH_TYPE_SCHMOOGIE		1255
-
 DECLARE_GLOBAL_DATA_PTR;
 
-extern void	i2c_init(int speed, int slaveaddr);
 extern void	timer_init(void);
 extern int	eth_hw_init(void);
 extern phy_t	phy;
board/davinci/sonata/dv_board.c +0 -3
index e8665e5..2db40c8 100644
@@ -29,11 +29,8 @@
 #include <asm/arch/hardware.h>
 #include <asm/arch/emac_defs.h>
 
-#define MACH_TYPE_SONATA		1254
-
 DECLARE_GLOBAL_DATA_PTR;
 
-extern void	i2c_init(int speed, int slaveaddr);
 extern void	timer_init(void);
 extern int	eth_hw_init(void);
 extern phy_t	phy;
#1 lore raw

PATCH 1/4 ARM DaVinci: Remove duplicate definitions of MACH_TYPE and prototype of i2c_init()

Quoted 12 lines · Hugo Villeneuve

ARM DaVinci: Remove duplicate definitions of MACH_TYPE and prototype of i2c_init().

---

 board/davinci/dv-evm/dv_board.c    |    3 ---
 board/davinci/schmoogie/dv_board.c |    3 ---
 board/davinci/sonata/dv_board.c    |    3 ---
 3 files changed, 0 insertions(+), 9 deletions(-)

Applied. Thanks.

Best regards,
J.

#2 lore raw

PATCH 2/4 ARM DaVinci: Remove extern phy_t declaration by moving code to proper place

ARM DaVinci: Remove extern phy_t declaration by moving code to proper place.

---

 board/davinci/dv-evm/dv_board.c    |    6 +-----
 board/davinci/schmoogie/dv_board.c |    6 +-----
 board/davinci/sffsdr/sffsdr.c      |    6 +-----
 board/davinci/sonata/dv_board.c    |    6 +-----
 cpu/arm926ejs/davinci/ether.c      |    2 ++
 5 files changed, 6 insertions(+), 20 deletions(-)
board/davinci/dv-evm/dv_board.c +1 -5
index 454ac21..834eb68 100644
@@ -33,7 +33,6 @@ DECLARE_GLOBAL_DATA_PTR;
 
 extern void	timer_init(void);
 extern int	eth_hw_init(void);
-extern phy_t	phy;
 
 
 /* Works on Always On power domain only (no PD argument) */
@@ -184,11 +183,8 @@ int misc_init_r (void)
 		}
 	}
 
-	if (!eth_hw_init()) {
+	if (!eth_hw_init())
 		printf("ethernet init failed!\n");
-	} else {
-		printf("ETH PHY   : %s\n", phy.name);
-	}
 
 	i2c_read (0x39, 0x00, 1, (u_int8_t *)&i, 1);
 
board/davinci/schmoogie/dv_board.c +1 -5
index 529a437..3017546 100644
@@ -33,7 +33,6 @@ DECLARE_GLOBAL_DATA_PTR;
 
 extern void	timer_init(void);
 extern int	eth_hw_init(void);
-extern phy_t	phy;
 
 
 /* Works on Always On power domain only (no PD argument) */
@@ -230,11 +229,8 @@ int misc_init_r (void)
 		forceenv("serial#", (char *)&tmp[0]);
 	}
 
-	if (!eth_hw_init()) {
+	if (!eth_hw_init())
 		printf("ethernet init failed!\n");
-	} else {
-		printf("ETH PHY   : %s\n", phy.name);
-	}
 
 	return(0);
 }
board/davinci/sffsdr/sffsdr.c +1 -5
index b73484a..f41081f 100644
@@ -43,7 +43,6 @@ DECLARE_GLOBAL_DATA_PTR;
 
 extern void timer_init(void);
 extern int eth_hw_init(void);
-extern phy_t phy;
 
 
 /* Works on Always On power domain only (no PD argument) */
@@ -288,11 +287,8 @@ int misc_init_r(void)
 		}
 	}
 
-	if (!eth_hw_init()) {
+	if (!eth_hw_init())
 		printf("Ethernet init failed\n");
-	} else {
-		printf("ETH PHY: %s\n", phy.name);
-	}
 
 	/* On this platform, U-Boot is copied in RAM by the UBL,
 	 * so we are always in the relocated state. */
board/davinci/sonata/dv_board.c +1 -5
index 2db40c8..a6f9bc7 100644
@@ -33,7 +33,6 @@ DECLARE_GLOBAL_DATA_PTR;
 
 extern void	timer_init(void);
 extern int	eth_hw_init(void);
-extern phy_t	phy;
 
 
 /* Works on Always On power domain only (no PD argument) */
@@ -185,11 +184,8 @@ int misc_init_r (void)
 		}
 	}
 
-	if (!eth_hw_init()) {
+	if (!eth_hw_init())
 		printf("ethernet init failed!\n");
-	} else {
-		printf("ETH PHY   : %s\n", phy.name);
-	}
 
 	return(0);
 }
cpu/arm926ejs/davinci/ether.c +2 -0
index d286ec0..5ae035b 100644
@@ -357,6 +357,8 @@ static int dm644x_eth_hw_init(void)
 			phy.auto_negotiate = gen_auto_negotiate;
 	}
 
+	printf("Ethernet PHY: %s\n", phy.name);
+
 	return(1);
 }
 
#3 lore raw

PATCH 2/4 ARM DaVinci: Remove extern phy_t declaration by moving code to proper place

Quoted 5 lines · Hugo Villeneuve

ARM DaVinci: Remove extern phy_t declaration by moving code to proper place.

Quoted 9 lines

---

 board/davinci/dv-evm/dv_board.c    |    6 +-----
 board/davinci/schmoogie/dv_board.c |    6 +-----
 board/davinci/sffsdr/sffsdr.c      |    6 +-----
 board/davinci/sonata/dv_board.c    |    6 +-----
 cpu/arm926ejs/davinci/ether.c      |    2 ++
 5 files changed, 6 insertions(+), 20 deletions(-)

Applied. Thanks.

Best regards,
J.