Kirkwood: Add support for OpenRD-Client & OpenRD-Ultimate
v2 cover Kirkwood: Add support for OpenRD-Client & OpenRD-Ultimate
From: Julian Pidancet <[email protected]>
This patch modifies existing OpenRD-Base support to deal with all the three OpenRD boards (OpenRD-Base, OpenRD-Client & OpenRD-Ultimate). This is based on an original patch sent by Tanmay Upadhyay. Most of the credits goes to him.
Previous version of this patch has been reworked to separate file renaming from the actual addition of Client and Ultimate variants support.
A nice future improvement would be to add variant detection and configuration at run-time as suggested on the mailing-list in a recent email. So one could use the same binary for all board variants.
Julian Pidancet (4):
Kirkwood: Rename openrd_base board files to openrd. Change OpenRD Base board identification string. Add support for the Client variant of the OpenRD board. Add support for the Ultimate variant of the OpenRD board
MAKEALL | 2 +
board/Marvell/{openrd_base => openrd}/Makefile | 2 +-
board/Marvell/{openrd_base => openrd}/kwbimage.cfg | 0
.../{openrd_base/openrd_base.c => openrd/openrd.c} | 28 ++++-
.../{openrd_base/openrd_base.h => openrd/openrd.h} | 6 +-
boards.cfg | 4 +-
include/configs/openrd.h | 107 ++++++++++++++++++++
include/configs/openrd_base.h | 85 ++--------------
include/configs/openrd_client.h | 44 ++++++++
include/configs/openrd_ultimate.h | 44 ++++++++
10 files changed, 235 insertions(+), 87 deletions(-)
rename board/Marvell/{openrd_base => openrd}/Makefile (98%)
rename board/Marvell/{openrd_base => openrd}/kwbimage.cfg (100%)
rename board/Marvell/{openrd_base/openrd_base.c => openrd/openrd.c} (83%)
rename board/Marvell/{openrd_base/openrd_base.h => openrd/openrd.h} (95%)
create mode 100644 include/configs/openrd.h
create mode 100644 include/configs/openrd_client.h
create mode 100644 include/configs/openrd_ultimate.hSignature · 1 line
Julian Pidancet
PATCH v2 1/4 Kirkwood: Rename openrd_base board files to openrd.
From: Julian Pidancet <[email protected]>
This patch renames openrd_base to openrd in order to add support for other boards of the OpenRD family in future commits. The openrd_base board name remain in use.
rename board/Marvell/{openrd_base => openrd}/Makefile (98%)
rename board/Marvell/{openrd_base => openrd}/kwbimage.cfg (100%)
rename board/Marvell/{openrd_base/openrd_base.c => openrd/openrd.c} (97%)
rename board/Marvell/{openrd_base/openrd_base.h => openrd/openrd.h} (95%)
create mode 100644 include/configs/openrd.hboard/Marvell/openrd/Makefile renamed from board/Marvell/openrd_base/Makefile +1 -1
@@ -31,7 +31,7 @@ include $(TOPDIR)/config.mk LIB = $(obj)lib$(BOARD).o -COBJS := openrd_base.o +COBJS := openrd.o SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) OBJS := $(addprefix $(obj),$(COBJS))
board/Marvell/openrd/kwbimage.cfg renamed from board/Marvell/openrd_base/kwbimage.cfg +0 -0
board/Marvell/openrd/openrd.c renamed from board/Marvell/openrd_base/openrd_base.c +2 -2
@@ -31,7 +31,7 @@#include <miiphy.h> #include <asm/arch/kirkwood.h> #include <asm/arch/mpp.h> -#include "openrd_base.h" +#include "openrd.h" DECLARE_GLOBAL_DATA_PTR ;
@@ -110,7 +110,7 @@ int board_init(void)/* * arch number of board */ - gd->bd->bi_arch_number =MACH_TYPE_OPENRD_BASE ; + gd->bd->bi_arch_number =MACH_TYPE_OPENRD ;/* adress of boot parameters */ gd->bd->bi_boot_params =kw_sdram_bar (0 ) +0x100 ;
board/Marvell/openrd/openrd.h renamed from board/Marvell/openrd_base/openrd_base.h +3 -3
@@ -27,8 +27,8 @@* MA 02110-1301 USA */ -#ifndef __OPENRD_BASE_H -#define __OPENRD_BASE_H +#ifndef __OPENRD_H +#define __OPENRD_H#define OPENRD_OE_LOW (~(1<<28))/* RS232 / RS485 */ #define OPENRD_OE_HIGH (~(1<<2))/* SD / UART1 */
@@ -43,4 +43,4 @@#define MV88E1116_RGMII_TXTM_CTRL (1 << 4)#define MV88E1116_RGMII_RXTM_CTRL (1 << 5) -#endif /* __OPENRD_BASE_H */ +#endif /* __OPENRD_H */
boards.cfg +1 -1
@@ -96,7 +96,7 @@ davinci_sonata arm arm926ejs sonata davinci suen3 arm arm926ejs km_arm keymile kirkwood guruplug arm arm926ejs - Marvell kirkwood mv88f6281gtw_ge arm arm926ejs - Marvell kirkwood -openrd_base arm arm926ejs - Marvell kirkwood +openrd_base arm arm926ejs openrd Marvell kirkwood rd6281a arm arm926ejs - Marvell kirkwood sheevaplug arm arm926ejs - Marvell kirkwood dockstar arm arm926ejs - Seagate kirkwood
include/configs/openrd.h new file +107 -0
107 lines not on this page · raw message
include/configs/openrd_base.h +8 -75
99 lines not on this page · raw message
Signature · 1 line
Julian Pidancet
PATCH v2 1/4 Kirkwood: Rename openrd_base board files to openrd.
Quoted 67 lines
-----Original Message-----
From: Julian Pidancet [mailto:swaplinker at gmail.com] On Behalf Of julian.pidancet at citrix.com
Sent: Friday, March 25, 2011 2:19 PM
To: u-boot at lists.denx.de
Cc: tanmay.upadhyay at einfochips.com; Prafulla Wadaskar; Julian Pidancet
Subject: [PATCH v2 1/4] Kirkwood: Renameopenrd_baseboard files to openrd.From: Julian Pidancet <[email protected]>
This patch renames
openrd_baseto openrd in order to add support for other boards of the OpenRD family in future commits. Theopenrd_baseboard name remain in use.Signed-off-by Julian Pidancet <[email protected]>rename board/Marvell/{openrd_base => openrd}/Makefile (98%) rename board/Marvell/{openrd_base => openrd}/kwbimage.cfg (100%) rename board/Marvell/{openrd_base/openrd_base.c => openrd/openrd.c} (97%) rename board/Marvell/{openrd_base/openrd_base.h => openrd/openrd.h} (95%) create mode 100644 include/configs/openrd.hboard/Marvell/openrd/Makefile renamed from board/Marvell/openrd_base/Makefile +1
-1@@ -31,7 +31,7 @@ include $(TOPDIR)/config.mk LIB = $(obj)lib$(BOARD).o -COBJS := openrd_base.o +COBJS := openrd.o SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) OBJS := $(addprefix $(obj),$(COBJS))board/Marvell/openrd/kwbimage.cfg renamed from board/Marvell/openrd_base/kwbimage.cfg +0
-0board/Marvell/openrd/openrd.c renamed from board/Marvell/openrd_base/openrd_base.c +1
-1@@ -31,7 +31,7 @@#include <miiphy.h> #include <asm/arch/kirkwood.h> #include <asm/arch/mpp.h> -#include "openrd_base.h" +#include "openrd.h" DECLARE_GLOBAL_DATA_PTR ;
board/Marvell/openrd/openrd.c int board_init(void) · line 113
Quoted 5 lines
board/Marvell/openrd/openrd.c renamed from board/Marvell/openrd_base/openrd_base.c +1
-1@@ -110,7 +110,7 @@ int board_init(void)/* * arch number of board */ - gd->bd->bi_arch_number =MACH_TYPE_OPENRD_BASE ; + gd->bd->bi_arch_number =MACH_TYPE_OPENRD ;
NAK for this,
the MACH_TYPE for any board is coming form external world. Tweaking it in u-boot is not recommended.
You can have conditional code here to use different predefined MACH_TYPES instead of macros defining it.
...snip...
Quoted 8 lines
boards.cfg +0
-0@@ -96,7 +96,7 @@ davinci_sonata arm arm926ejssonata davinci
suen3 arm arm926ejskm_arm
keymile kirkwood
Quoted 8 lines
guruplug arm arm926ejs -
Marvell kirkwood
mv88f6281gtw_gearm arm926ejs -
Marvell kirkwood
-openrd_base arm arm926ejs -
Marvell kirkwood
+openrd_base arm arm926ejs openrd
Marvell Kirkwood
You can pass additional options here to identify your board uniquely out of several supported boards (to be coming) For ex:
+openrd_base arm arm926ejs openrd
+Marvell Kirkwood openrd_common:BOARD_IS_OPENRD_BASE
This approach will help better way to add conditional code for other boards type
For more details refer syntax in the top of this file.
Regards..
Prafulla . .
PATCH 1/2 Add definitions for OpenRD-Client and OpenRD-Ultimate
--- MAKEALL | 2 ++ boards.cfg | 4 +++- include/configs/openrd_base.h | 14 +++++++++++++- 3 files changed, 18 insertions(+), 2 deletions(-)
MAKEALL +2 -0
@@ -361,6 +361,8 @@ LIST_ARM9=" \ omap5912osk \ omap730p2 \ openrd_base \ + openrd_client \ + openrd_ultimate \ rd6281a \ sbc2410x \ scb9328 \
boards.cfg +3 -1
@@ -96,7 +96,9 @@ davinci_sonata arm arm926ejs sonata davinci suen3 arm arm926ejs km_arm keymile kirkwood guruplug arm arm926ejs - Marvell kirkwood mv88f6281gtw_ge arm arm926ejs - Marvell kirkwood -openrd_base arm arm926ejs - Marvell kirkwood +openrd_base arm arm926ejs openrd_base Marvell kirkwood openrd_base:BOARD_IS_OPENRD_BASE +openrd_client arm arm926ejs openrd_base Marvell kirkwood openrd_base:BOARD_IS_OPENRD_CLIENT +openrd_ultimate arm arm926ejs openrd_base Marvell kirkwood openrd_base:BOARD_IS_OPENRD_ULTIMATE rd6281a arm arm926ejs - Marvell kirkwood sheevaplug arm arm926ejs - Marvell kirkwood dockstar arm arm926ejs - Seagate kirkwood
include/configs/openrd_base.h +13 -1
@@ -33,7 +33,19 @@/* * Version number information */ -#define CONFIG_IDENT_STRING "\nOpenRD_base" +#ifdef CONFIG_BOARD_IS_OPENRD_ULTIMATE +# define CONFIG_IDENT_STRING "\nOpenRD-Ultimate" +#else +# ifdef CONFIG_BOARD_IS_OPENRD_CLIENT +# define CONFIG_IDENT_STRING "\nOpenRD-Client" +# else +# ifdef CONFIG_BOARD_IS_OPENRD_BASE +# define CONFIG_IDENT_STRING "\nOpenRD-Base" +# else +# error Unknown OpenRD board specified +# endif +# endif +#endif /* * High Level Configuration Options (easy to change)
Signature · 1 line
1.7.4.1
PATCH 2/2 Initialize second PHY on OpenRD-Client and OpenRD-Ultimate.
(rework of Julian Pidancet's patch)
--- board/Marvell/openrd_base/openrd_base.c | 22 ++++++++++++++++++---- include/configs/openrd_base.h | 14 ++++++++++++-- 2 files changed, 30 insertions(+), 6 deletions(-)
board/Marvell/openrd_base/openrd_base.c +18 -4
@@ -118,12 +118,11 @@ int board_init(void) }#ifdef CONFIG_RESET_PHY_R -/* Configure and enable MV88E1116 PHY */ -void reset_phy (void ) +/* Configure and enable MV88E1116/88E1121 PHY */ +void mv_phy_init (char *name) {u16 reg;u16 devadr; -char *name ="egiga0" ;if (miiphy_set_current_dev (name))return ;
@@ -148,6 +147,21 @@ void reset_phy(void)/* reset the phy */ miiphy_reset (name, devadr); - printf("88E1116 Initialized on %s\n", name); + printf(PHY_NO" Initialized on %s\n", name); +} + +void reset_phy (void ) +{ +mv_phy_init ("egiga0" ); + +#ifdef CONFIG_BOARD_IS_OPENRD_CLIENT +/* Kirkwood ethernet driver is written with the assumption that in case +* of multiple PHYs, their addresses are consecutive. But unfortunately +* in case of OpenRD-Client, PHY addresses are not consecutive.*/ +miiphy_write ("egiga1" ,0xEE ,0xEE ,24 ); + +/* configure and initialize both PHY's */ +mv_phy_init ("egiga1" ); +#endif }#endif /* CONFIG_RESET_PHY_R */
include/configs/openrd_base.h +12 -2
@@ -117,8 +117,18 @@* Ethernet Driver configuration */ #ifdef CONFIG_CMD_NET -#define CONFIG_MVGBE_PORTS {1, 0}/* enable port 0 only */ -#define CONFIG_PHY_BASE_ADR 0x8 +# ifdef CONFIG_BOARD_IS_OPENRD_BASE +# define CONFIG_MVGBE_PORTS {1, 0}/* enable port 0 only */ +# else +# define CONFIG_MVGBE_PORTS {1, 1}/* enable both ports */ +# endif +# ifdef CONFIG_BOARD_IS_OPENRD_ULTIMATE +# define CONFIG_PHY_BASE_ADR 0x0 +# define PHY_NO "88E1121" +# else +# define CONFIG_PHY_BASE_ADR 0x8 +# define PHY_NO "88E1116" +# endif #endif /* CONFIG_CMD_NET */ /*
Signature · 1 line
1.7.4.1
PATCH 2/2 Initialize second PHY on OpenRD-Client and OpenRD-Ultimate.
Quoted 77 lines
-----Original Message-----
From: Clint Adams [mailto:clint at debian.org]
Sent: Thursday, April 07, 2011 12:25 AM
To: u-boot at lists.denx.de
Cc: Prafulla Wadaskar; julian.pidancet at citrix.com; Clint Adams
Subject: [PATCH 2/2] Initialize second PHY on OpenRD-Client and OpenRD- Ultimate.(rework of Julian Pidancet's patch)
--- board/Marvell/openrd_base/openrd_base.c | 22 ++++++++++++++++++---- include/configs/openrd_base.h | 14 ++++++++++++-- 2 files changed, 30 insertions(+), 6 deletions(-)board/Marvell/openrd_base/openrd_base.c +11
-4@@ -118,12 +118,11 @@ int board_init(void) }#ifdef CONFIG_RESET_PHY_R -/* Configure and enable MV88E1116 PHY */ -void reset_phy (void ) +/* Configure and enable MV88E1116/88E1121 PHY */ +void mv_phy_init (char *name) {u16 reg;u16 devadr; -char *name ="egiga0" ;if (miiphy_set_current_dev (name))return ;@@ -148,6 +147,21 @@ void reset_phy(void)/* reset the phy */ miiphy_reset (name, devadr); -printf ("88E1116 Initialized on %s\n" , name); +printf (PHY_NO " Initialized on %s\n" , name); +} + +void reset_phy (void ) +{ +mv_phy_init ("egiga0" ); + +#ifdef CONFIG_BOARD_IS_OPENRD_CLIENT +/* Kirkwood ethernet driver is written with the assumption that in case
+ * of multiple PHYs, their addresses are consecutive. But
unfortunately
+ * in case of OpenRD-Client, PHY addresses are not
consecutive.*/board/Marvell/openrd_base/openrd_base.c +5
-0+miiphy_write ("egiga1" ,0xEE ,0xEE ,24 ); + +/* configure and initialize both PHY's */ +mv_phy_init ("egiga1" ); +#endif }#endif /* CONFIG_RESET_PHY_R */ include/configs/openrd_base.h +4
-2@@ -117,8 +117,18 @@* Ethernet Driver configuration */ #ifdef CONFIG_CMD_NET -#define CONFIG_MVGBE_PORTS {1, 0}/* enable port 0 only */ -#define CONFIG_PHY_BASE_ADR 0x8 +# ifdef CONFIG_BOARD_IS_OPENRD_BASE +# define CONFIG_MVGBE_PORTS {1, 0}/* enable port 0 only */ +# else +# define CONFIG_MVGBE_PORTS {1, 1}/* enable both ports */
include/configs/openrd_base.h line 133
Quoted 10 lines
include/configs/openrd_base.h +8
-0+# endif +# ifdef CONFIG_BOARD_IS_OPENRD_ULTIMATE +# define CONFIG_PHY_BASE_ADR 0x0 +# define PHY_NO "88E1121" +# else +# define CONFIG_PHY_BASE_ADR 0x8 +# define PHY_NO "88E1116" +# endif #endif /* CONFIG_CMD_NET */
This looks pretty good.
Ack for both the patches.
Regards..
Prafulla ..
PATCH 2/2 Initialize second PHY on OpenRD-Client and OpenRD-Ultimate.
Le 07/04/2011 08:17, Prafulla Wadaskar a ?crit :
Quoted 91 lines
Quoted 77 lines
-----Original Message-----
From: Clint Adams [mailto:clint at debian.org]
Sent: Thursday, April 07, 2011 12:25 AM
To: u-boot at lists.denx.de
Cc: Prafulla Wadaskar; julian.pidancet at citrix.com; Clint Adams
Subject: [PATCH 2/2] Initialize second PHY on OpenRD-Client and OpenRD- Ultimate.(rework of Julian Pidancet's patch)
--- board/Marvell/openrd_base/openrd_base.c | 22 ++++++++++++++++++---- include/configs/openrd_base.h | 14 ++++++++++++-- 2 files changed, 30 insertions(+), 6 deletions(-)board/Marvell/openrd_base/openrd_base.c +11
-4@@ -118,12 +118,11 @@ int board_init(void) }#ifdef CONFIG_RESET_PHY_R -/* Configure and enable MV88E1116 PHY */ -void reset_phy (void ) +/* Configure and enable MV88E1116/88E1121 PHY */ +void mv_phy_init (char *name) {u16 reg;u16 devadr; -char *name ="egiga0" ;if (miiphy_set_current_dev (name))return ;@@ -148,6 +147,21 @@ void reset_phy(void)/* reset the phy */ miiphy_reset (name, devadr); -printf ("88E1116 Initialized on %s\n" , name); +printf (PHY_NO " Initialized on %s\n" , name); +} + +void reset_phy (void ) +{ +mv_phy_init ("egiga0" ); + +#ifdef CONFIG_BOARD_IS_OPENRD_CLIENT +/* Kirkwood ethernet driver is written with the assumption that in case
+ * of multiple PHYs, their addresses are consecutive. But
unfortunately
+ * in case of OpenRD-Client, PHY addresses are not
consecutive.*/board/Marvell/openrd_base/openrd_base.c +5
-0+miiphy_write ("egiga1" ,0xEE ,0xEE ,24 ); + +/* configure and initialize both PHY's */ +mv_phy_init ("egiga1" ); +#endif }#endif /* CONFIG_RESET_PHY_R */ include/configs/openrd_base.h +4
-2@@ -117,8 +117,18 @@* Ethernet Driver configuration */ #ifdef CONFIG_CMD_NET -#define CONFIG_MVGBE_PORTS {1, 0}/* enable port 0 only */ -#define CONFIG_PHY_BASE_ADR 0x8 +# ifdef CONFIG_BOARD_IS_OPENRD_BASE +# define CONFIG_MVGBE_PORTS {1, 0}/* enable port 0 only */ +# else +# define CONFIG_MVGBE_PORTS {1, 1}/* enable both ports */ include/configs/openrd_base.h line 133
Quoted 10 lines
include/configs/openrd_base.h +8
-0+# endif +# ifdef CONFIG_BOARD_IS_OPENRD_ULTIMATE +# define CONFIG_PHY_BASE_ADR 0x0 +# define PHY_NO "88E1121" +# else +# define CONFIG_PHY_BASE_ADR 0x8 +# define PHY_NO "88E1116" +# endif #endif /* CONFIG_CMD_NET */ This looks pretty good.
Ack for both the patches.
Quoted 2 lines
Regards..
Prafulla ..
Didn't Julian re-post patches that actually separates Base, Client and Ultimate into distinct config header files plus a common one? How does this affect Clint's patchset?
Amicalement,
Signature · 1 line
Albert.
PATCH 2/2 Initialize second PHY on OpenRD-Client and OpenRD-Ultimate.
Quoted 105 lines
-----Original Message-----
From: Albert ARIBAUD [mailto:albert.aribaud at free.fr]
Sent: Thursday, April 07, 2011 12:48 PM
To: u-boot at lists.denx.de
Cc: Prafulla Wadaskar; Clint Adams
Subject: Re: [U-Boot] [PATCH 2/2] Initialize second PHY on OpenRD-Client and OpenRD-Ultimate.Le 07/04/2011 08:17, Prafulla Wadaskar a ?crit :
Quoted 8 lines
Quoted 8 lines
-----Original Message-----
From: Clint Adams [mailto:clint at debian.org]
Sent: Thursday, April 07, 2011 12:25 AM
To: u-boot at lists.denx.de
Cc: Prafulla Wadaskar; julian.pidancet at citrix.com; Clint Adams
Subject: [PATCH 2/2] Initialize second PHY on OpenRD-Client andOpenRD-
Quoted 5 lines
Quoted 5 lines
Ultimate.
(rework of Julian Pidancet's patch)
--- board/Marvell/openrd_base/openrd_base.c | 22 ++++++++++++++++++----
Quoted 27 lines
Quoted 27 lines
include/configs/openrd_base.h | 14 ++++++++++++-- 2 files changed, 30 insertions(+), 6 deletions(-)board/Marvell/openrd_base/openrd_base.c +2
-3@@ -118,12 +118,11 @@ int board_init(void) }#ifdef CONFIG_RESET_PHY_R -/* Configure and enable MV88E1116 PHY */ -void reset_phy (void ) +/* Configure and enable MV88E1116/88E1121 PHY */ +void mv_phy_init (char *name) {u16 reg;u16 devadr; -char *name ="egiga0" ;if (miiphy_set_current_dev (name))return ;@@ -148,6 +147,21 @@ void reset_phy(void)/* reset the phy */ miiphy_reset (name, devadr);Quoted 10 lines
board/Marvell/openrd_base/openrd_base.c void reset_phy(void)
Quoted 10 lines
board/Marvell/openrd_base/openrd_base.c +9
-1-printf ("88E1116 Initialized on %s\n" , name); +printf (PHY_NO " Initialized on %s\n" , name); +} + +void reset_phy (void ) +{ +mv_phy_init ("egiga0" ); + +#ifdef CONFIG_BOARD_IS_OPENRD_CLIENT +/* Kirkwood ethernet driver is written with the assumption that
Quoted 41 lines
Quoted 27 lines
in case
+ * of multiple PHYs, their addresses are consecutive. But
unfortunately
+ * in case of OpenRD-Client, PHY addresses are not
consecutive.*/board/Marvell/openrd_base/openrd_base.c +5
-0+miiphy_write ("egiga1" ,0xEE ,0xEE ,24 ); + +/* configure and initialize both PHY's */ +mv_phy_init ("egiga1" ); +#endif }#endif /* CONFIG_RESET_PHY_R */ include/configs/openrd_base.h +4
-2@@ -117,8 +117,18 @@* Ethernet Driver configuration */ #ifdef CONFIG_CMD_NET -#define CONFIG_MVGBE_PORTS {1, 0}/* enable port 0 only */ -#define CONFIG_PHY_BASE_ADR 0x8 +# ifdef CONFIG_BOARD_IS_OPENRD_BASE +# define CONFIG_MVGBE_PORTS {1, 0}/* enable port 0 only */ +# else +# define CONFIG_MVGBE_PORTS {1, 1}/* enable both ports */ include/configs/openrd_base.h line 133
Quoted 10 lines
include/configs/openrd_base.h +8
-0+# endif +# ifdef CONFIG_BOARD_IS_OPENRD_ULTIMATE +# define CONFIG_PHY_BASE_ADR 0x0 +# define PHY_NO "88E1121" +# else +# define CONFIG_PHY_BASE_ADR 0x8 +# define PHY_NO "88E1116" +# endif #endif /* CONFIG_CMD_NET */ This looks pretty good.
Ack for both the patches.
Quoted 6 lines
Quoted 2 lines
Regards..
Prafulla ..Didn't Julian re-post patches that actually separates Base, Client and Ultimate into distinct config header files plus a common one? How does this affect Clint's patchset?
I acked for the method used here.
We don't need separate config headers. Using CONFIG_BOARD_IS_OPENRD_* the boards related stuff can be identified.
To me this looks better that what Julian had posted
I have tested these patches and works for openRD-Base, certainly it may not work for ultimate and client since respective machine ids are not programmed.
Hi Julian/Clint
May you please provide tuned version of these patches?
Regards..
Prafulla . .
Quoted 4 lines
Amicalement,
--
Albert.
PATCH 2/2 Initialize second PHY on OpenRD-Client and OpenRD-Ultimate.
Hi Prafulle,
Le 11/04/2011 14:03, Prafulla Wadaskar a ?crit :
Quoted 11 lines
Quoted 7 lines
Quoted 1 line
Quoted 1 line
board/Marvell/openrd_base/openrd_base.c | 22 ++++++++++++++++++----
Quoted 1 line
Quoted 1 line
include/configs/openrd_base.h | 14 ++++++++++++--Didn't Julian re-post patches that actually separates Base, Client and Ultimate into distinct config header files plus a common one? How does this affect Clint's patchset?
I acked for the method used here.
We don't need separate config headers. Using CONFIG_BOARD_IS_OPENRD_* the boards related stuff can be identified.
If the two files above are to be used for all Open-RD boards (which is fine for me), then they should be renamed from openrd_base.* to openrd.* for the sake of clarity as to what they actually support.
Amicalement,
Signature · 1 line
Albert.
PATCH 2/2 Initialize second PHY on OpenRD-Client and OpenRD-Ultimate.
Quoted 25 lines
-----Original Message-----
From: Albert ARIBAUD [mailto:albert.u.boot at aribaud.net]
Sent: Monday, April 11, 2011 6:15 PM
To: Prafulla Wadaskar
Cc: u-boot at lists.denx.de; Clint Adams; Julian Pidancet
Subject: Re: [U-Boot] [PATCH 2/2] Initialize second PHY on OpenRD-Client and OpenRD-Ultimate.Hi Prafulle,
Le 11/04/2011 14:03, Prafulla Wadaskar a ?crit :
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
board/Marvell/openrd_base/openrd_base.c | 22++++++++++++++++++--
Quoted 4 lines
Quoted 4 lines
--
Quoted 1 line
Quoted 1 line
include/configs/openrd_base.h | 14 ++++++++++++--Didn't Julian re-post patches that actually separates Base, Client
and
Quoted 1 line
Quoted 1 line
Ultimate into distinct config header files plus a common one? How
does
Quoted 2 lines
Quoted 1 line
this affect Clint's patchset?
Quoted 8 lines
Quoted 3 lines
I acked for the method used here.
We don't need separate config headers. Using CONFIG_BOARD_IS_OPENRD_*
the boards related stuff can be identified.
If the two files above are to be used for all Open-RD boards (which is fine for me), then they should be renamed from openrd_base.* to openrd.* for the sake of clarity as to what they actually support.
Ack, I hope this will be addressed in next version.
Regards..
Prafulla . .
Quoted 4 lines
Amicalement,
--
Albert.
PATCH 1/3 Add definitions for OpenRD-Client and OpenRD-Ultimate
In reply to Prafulla Wadaskar--- MAKEALL | 2 ++ board/Marvell/openrd_base/openrd_base.c | 6 ++++++ boards.cfg | 4 +++- include/configs/openrd_base.h | 14 +++++++++++++- 4 files changed, 24 insertions(+), 2 deletions(-)
MAKEALL +2 -0
@@ -361,6 +361,8 @@ LIST_ARM9=" \ omap5912osk \ omap730p2 \ openrd_base \ + openrd_client \ + openrd_ultimate \ rd6281a \ sbc2410x \ scb9328 \
board/Marvell/openrd_base/openrd_base.c +6 -0
@@ -110,7 +110,13 @@ int board_init(void)/* * arch number of board */ +#if defined(CONFIG_BOARD_IS_OPENRD_BASE ) gd->bd->bi_arch_number =MACH_TYPE_OPENRD_BASE ; +#elif defined(CONFIG_BOARD_IS_OPENRD_CLIENT ) + gd->bd->bi_arch_number =MACH_TYPE_OPENRD_CLIENT ; +#elif defined(CONFIG_BOARD_IS_OPENRD_ULTIMATE ) + gd->bd->bi_arch_number =MACH_TYPE_OPENRD_ULTIMATE ; +#endif /* adress of boot parameters */ gd->bd->bi_boot_params =kw_sdram_bar (0 ) +0x100 ;
boards.cfg +3 -1
@@ -96,7 +96,9 @@ davinci_sonata arm arm926ejs sonata davinci suen3 arm arm926ejs km_arm keymile kirkwood guruplug arm arm926ejs - Marvell kirkwood mv88f6281gtw_ge arm arm926ejs - Marvell kirkwood -openrd_base arm arm926ejs - Marvell kirkwood +openrd_base arm arm926ejs openrd_base Marvell kirkwood openrd_base:BOARD_IS_OPENRD_BASE +openrd_client arm arm926ejs openrd_base Marvell kirkwood openrd_base:BOARD_IS_OPENRD_CLIENT +openrd_ultimate arm arm926ejs openrd_base Marvell kirkwood openrd_base:BOARD_IS_OPENRD_ULTIMATE rd6281a arm arm926ejs - Marvell kirkwood sheevaplug arm arm926ejs - Marvell kirkwood dockstar arm arm926ejs - Seagate kirkwood
include/configs/openrd_base.h +13 -1
@@ -33,7 +33,19 @@/* * Version number information */ -#define CONFIG_IDENT_STRING "\nOpenRD_base" +#ifdef CONFIG_BOARD_IS_OPENRD_ULTIMATE +# define CONFIG_IDENT_STRING "\nOpenRD-Ultimate" +#else +# ifdef CONFIG_BOARD_IS_OPENRD_CLIENT +# define CONFIG_IDENT_STRING "\nOpenRD-Client" +# else +# ifdef CONFIG_BOARD_IS_OPENRD_BASE +# define CONFIG_IDENT_STRING "\nOpenRD-Base" +# else +# error Unknown OpenRD board specified +# endif +# endif +#endif /* * High Level Configuration Options (easy to change)
Signature · 1 line
1.7.4.1
PATCH 2/3 Initialize second PHY on OpenRD-Client and OpenRD-Ultimate.
(rework of Julian Pidancet's patch)
--- board/Marvell/openrd_base/openrd_base.c | 22 ++++++++++++++++++---- include/configs/openrd_base.h | 14 ++++++++++++-- 2 files changed, 30 insertions(+), 6 deletions(-)
board/Marvell/openrd_base/openrd_base.c +18 -4
@@ -124,12 +124,11 @@ int board_init(void) }#ifdef CONFIG_RESET_PHY_R -/* Configure and enable MV88E1116 PHY */ -void reset_phy (void ) +/* Configure and enable MV88E1116/88E1121 PHY */ +void mv_phy_init (char *name) {u16 reg;u16 devadr; -char *name ="egiga0" ;if (miiphy_set_current_dev (name))return ;
@@ -154,6 +153,21 @@ void reset_phy(void)/* reset the phy */ miiphy_reset (name, devadr); - printf("88E1116 Initialized on %s\n", name); + printf(PHY_NO" Initialized on %s\n", name); +} + +void reset_phy (void ) +{ +mv_phy_init ("egiga0" ); + +#ifdef CONFIG_BOARD_IS_OPENRD_CLIENT +/* Kirkwood ethernet driver is written with the assumption that in case +* of multiple PHYs, their addresses are consecutive. But unfortunately +* in case of OpenRD-Client, PHY addresses are not consecutive.*/ +miiphy_write ("egiga1" ,0xEE ,0xEE ,24 ); + +/* configure and initialize both PHY's */ +mv_phy_init ("egiga1" ); +#endif }#endif /* CONFIG_RESET_PHY_R */
include/configs/openrd_base.h +12 -2
@@ -117,8 +117,18 @@* Ethernet Driver configuration */ #ifdef CONFIG_CMD_NET -#define CONFIG_MVGBE_PORTS {1, 0}/* enable port 0 only */ -#define CONFIG_PHY_BASE_ADR 0x8 +# ifdef CONFIG_BOARD_IS_OPENRD_BASE +# define CONFIG_MVGBE_PORTS {1, 0}/* enable port 0 only */ +# else +# define CONFIG_MVGBE_PORTS {1, 1}/* enable both ports */ +# endif +# ifdef CONFIG_BOARD_IS_OPENRD_ULTIMATE +# define CONFIG_PHY_BASE_ADR 0x0 +# define PHY_NO "88E1121" +# else +# define CONFIG_PHY_BASE_ADR 0x8 +# define PHY_NO "88E1116" +# endif #endif /* CONFIG_CMD_NET */ /*
Signature · 1 line
1.7.4.1
PATCH 2/3 Initialize second PHY on OpenRD-Client and OpenRD-Ultimate.
Thank you for reworking this patch.
Quoted 36 lines · Clint Adams
(rework of Julian Pidancet's patch)
--- board/Marvell/openrd_base/openrd_base.c | 22 ++++++++++++++++++---- include/configs/openrd_base.h | 14 ++++++++++++-- 2 files changed, 30 insertions(+), 6 deletions(-)board/Marvell/openrd_base/openrd_base.c +8
-4@@ -124,12 +124,11 @@ int board_init(void) }#ifdef CONFIG_RESET_PHY_R -/* Configure and enable MV88E1116 PHY */ -void reset_phy (void ) +/* Configure and enable MV88E1116/88E1121 PHY */ +void mv_phy_init (char *name) {u16 reg;u16 devadr; -char *name ="egiga0" ;if (miiphy_set_current_dev (name))return ;@@ -154,6 +153,21 @@ void reset_phy(void)/* reset the phy */ miiphy_reset (name, devadr); -printf ("88E1116 Initialized on %s\n" , name); +printf (PHY_NO " Initialized on %s\n" , name); +} + +void reset_phy (void ) +{ +mv_phy_init ("egiga0" );
board/Marvell/openrd_base/openrd_base.c void reset_phy(void) · line 171
Quoted 10 lines
board/Marvell/openrd_base/openrd_base.c +10
-0+ +#ifdef CONFIG_BOARD_IS_OPENRD_CLIENT +/* Kirkwood ethernet driver is written with the assumption that in case +* of multiple PHYs, their addresses are consecutive. But unfortunately +* in case of OpenRD-Client, PHY addresses are not consecutive.*/ +miiphy_write ("egiga1" ,0xEE ,0xEE ,24 ); + +/* configure and initialize both PHY's */ +mv_phy_init ("egiga1" ); +#endif
This part only initialize second PHY for the OpenRD-Client board and not the OpenRD-Ultimate.
I would do something like:
#if defined(CONFIG_BOARD_IS_OPENRD_CLIENT) ||defined(CONFIG_BOARD_IS_OPENRD_ULTIMATE)
#if defined(CONFIG_BOARD_IS_OPENRD_CLIENT)
miiphy_write("egiga1", 0xEE, 0xEE, 24);
#endif
mv_phy_init("egiga1");#endif
Or similar.
Quoted 17 lines
board/Marvell/openrd_base/openrd_base.c +0
-0}#endif /* CONFIG_RESET_PHY_R */ include/configs/openrd_base.h +5
-2@@ -117,8 +117,18 @@* Ethernet Driver configuration */ #ifdef CONFIG_CMD_NET -#define CONFIG_MVGBE_PORTS {1, 0}/* enable port 0 only */ -#define CONFIG_PHY_BASE_ADR 0x8 +# ifdef CONFIG_BOARD_IS_OPENRD_BASE +# define CONFIG_MVGBE_PORTS {1, 0}/* enable port 0 only */ +# else +# define CONFIG_MVGBE_PORTS {1, 1}/* enable both ports */ +# endif
include/configs/openrd_base.h line 134
Quoted 10 lines
include/configs/openrd_base.h +7
-0+# ifdef CONFIG_BOARD_IS_OPENRD_ULTIMATE +# define CONFIG_PHY_BASE_ADR 0x0 +# define PHY_NO "88E1121" +# else +# define CONFIG_PHY_BASE_ADR 0x8 +# define PHY_NO "88E1116" +# endif #endif /* CONFIG_CMD_NET */ /*
Thanks.
PATCH 1/3 Add definitions for OpenRD-Client and OpenRD-Ultimate
--- MAKEALL | 2 ++ board/Marvell/openrd_base/openrd_base.c | 6 ++++++ boards.cfg | 4 +++- include/configs/openrd_base.h | 14 +++++++++++++- 4 files changed, 24 insertions(+), 2 deletions(-)
MAKEALL +2 -0
@@ -361,6 +361,8 @@ LIST_ARM9=" \ omap5912osk \ omap730p2 \ openrd_base \ + openrd_client \ + openrd_ultimate \ rd6281a \ sbc2410x \ scb9328 \
board/Marvell/openrd_base/openrd_base.c +6 -0
@@ -110,7 +110,13 @@ int board_init(void)/* * arch number of board */ +#if defined(CONFIG_BOARD_IS_OPENRD_BASE ) gd->bd->bi_arch_number =MACH_TYPE_OPENRD_BASE ; +#elif defined(CONFIG_BOARD_IS_OPENRD_CLIENT ) + gd->bd->bi_arch_number =MACH_TYPE_OPENRD_CLIENT ; +#elif defined(CONFIG_BOARD_IS_OPENRD_ULTIMATE ) + gd->bd->bi_arch_number =MACH_TYPE_OPENRD_ULTIMATE ; +#endif /* adress of boot parameters */ gd->bd->bi_boot_params =kw_sdram_bar (0 ) +0x100 ;
boards.cfg +3 -1
@@ -96,7 +96,9 @@ davinci_sonata arm arm926ejs sonata davinci suen3 arm arm926ejs km_arm keymile kirkwood guruplug arm arm926ejs - Marvell kirkwood mv88f6281gtw_ge arm arm926ejs - Marvell kirkwood -openrd_base arm arm926ejs - Marvell kirkwood +openrd_base arm arm926ejs openrd_base Marvell kirkwood openrd_base:BOARD_IS_OPENRD_BASE +openrd_client arm arm926ejs openrd_base Marvell kirkwood openrd_base:BOARD_IS_OPENRD_CLIENT +openrd_ultimate arm arm926ejs openrd_base Marvell kirkwood openrd_base:BOARD_IS_OPENRD_ULTIMATE rd6281a arm arm926ejs - Marvell kirkwood sheevaplug arm arm926ejs - Marvell kirkwood dockstar arm arm926ejs - Seagate kirkwood
include/configs/openrd_base.h +13 -1
@@ -33,7 +33,19 @@/* * Version number information */ -#define CONFIG_IDENT_STRING "\nOpenRD_base" +#ifdef CONFIG_BOARD_IS_OPENRD_ULTIMATE +# define CONFIG_IDENT_STRING "\nOpenRD-Ultimate" +#else +# ifdef CONFIG_BOARD_IS_OPENRD_CLIENT +# define CONFIG_IDENT_STRING "\nOpenRD-Client" +# else +# ifdef CONFIG_BOARD_IS_OPENRD_BASE +# define CONFIG_IDENT_STRING "\nOpenRD-Base" +# else +# error Unknown OpenRD board specified +# endif +# endif +#endif /* * High Level Configuration Options (easy to change)
Signature · 1 line
1.7.4.1
PATCH 2/3 Initialize second PHY on OpenRD-Client and OpenRD-Ultimate.
(rework of Julian Pidancet's patch)
--- board/Marvell/openrd_base/openrd_base.c | 24 ++++++++++++++++++++---- include/configs/openrd_base.h | 14 ++++++++++++-- 2 files changed, 32 insertions(+), 6 deletions(-)
board/Marvell/openrd_base/openrd_base.c +20 -4
@@ -124,12 +124,11 @@ int board_init(void) }#ifdef CONFIG_RESET_PHY_R -/* Configure and enable MV88E1116 PHY */ -void reset_phy (void ) +/* Configure and enable MV88E1116/88E1121 PHY */ +void mv_phy_init (char *name) {u16 reg;u16 devadr; -char *name ="egiga0" ;if (miiphy_set_current_dev (name))return ;
@@ -154,6 +153,23 @@ void reset_phy(void)/* reset the phy */ miiphy_reset (name, devadr); - printf("88E1116 Initialized on %s\n", name); + printf(PHY_NO" Initialized on %s\n", name); +} + +void reset_phy (void ) +{ +mv_phy_init ("egiga0" ); + +#ifdef CONFIG_BOARD_IS_OPENRD_CLIENT +/* Kirkwood ethernet driver is written with the assumption that in case +* of multiple PHYs, their addresses are consecutive. But unfortunately +* in case of OpenRD-Client, PHY addresses are not consecutive.*/ +miiphy_write ("egiga1" ,0xEE ,0xEE ,24 ); +#endif + +#if defined(CONFIG_BOARD_IS_OPENRD_CLIENT ) || defined(CONFIG_BOARD_IS_OPENRD_ULTIMATE ) +/* configure and initialize both PHY's */ +mv_phy_init ("egiga1" ); +#endif }#endif /* CONFIG_RESET_PHY_R */
include/configs/openrd_base.h +12 -2
@@ -117,8 +117,18 @@* Ethernet Driver configuration */ #ifdef CONFIG_CMD_NET -#define CONFIG_MVGBE_PORTS {1, 0}/* enable port 0 only */ -#define CONFIG_PHY_BASE_ADR 0x8 +# ifdef CONFIG_BOARD_IS_OPENRD_BASE +# define CONFIG_MVGBE_PORTS {1, 0}/* enable port 0 only */ +# else +# define CONFIG_MVGBE_PORTS {1, 1}/* enable both ports */ +# endif +# ifdef CONFIG_BOARD_IS_OPENRD_ULTIMATE +# define CONFIG_PHY_BASE_ADR 0x0 +# define PHY_NO "88E1121" +# else +# define CONFIG_PHY_BASE_ADR 0x8 +# define PHY_NO "88E1116" +# endif #endif /* CONFIG_CMD_NET */ /*
Signature · 1 line
1.7.4.1
PATCH 2/3 Initialize second PHY on OpenRD-Client and OpenRD-Ultimate.
Hi Clint,
Quoted 5 lines
(rework of Julian Pidancet's patch)
--- board/Marvell/openrd_base/openrd_base.c | 24 ++++++++++++++++++++---- include/configs/openrd_base.h | 14 ++++++++++++-- 2 files changed, 32 insertions(+), 6 deletions(-)
Sorry to jump in a little bit late here, but can you please look at the excellent work of Andy Flemin on an universal phy infrastructure[1]? Can't we use that also as a base for your board and eliminate duplicated phy code?
Thanks for looking into this!
Detlev
[1] http://article.gmane.org/gmane.comp.boot-loaders.u-boot/97560
Signature · 7 lines
;; Self-replicator in ELisp ((lambda (l) (prin1-to-string (list l (list (quote quote) l)))) (quote (lambda (l) (prin1-to-string (list l (list (quote quote) l)))))) -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: dzu at denx.de
PATCH 2/3 Initialize second PHY on OpenRD-Client and OpenRD-Ultimate.
In reply to Clint AdamsQuoted 59 lines
-----Original Message-----
From: Clint Adams [mailto:clint at debian.org]
Sent: Wednesday, April 13, 2011 12:14 AM
To: u-boot at lists.denx.de
Cc: Prafulla Wadaskar; julian.pidancet at citrix.com; Clint Adams
Subject: [PATCH 2/3] Initialize second PHY on OpenRD-Client and OpenRD- Ultimate.(rework of Julian Pidancet's patch)
--- board/Marvell/openrd_base/openrd_base.c | 24 ++++++++++++++++++++---- include/configs/openrd_base.h | 14 ++++++++++++-- 2 files changed, 32 insertions(+), 6 deletions(-)board/Marvell/openrd_base/openrd_base.c +11
-4@@ -124,12 +124,11 @@ int board_init(void) }#ifdef CONFIG_RESET_PHY_R -/* Configure and enable MV88E1116 PHY */ -void reset_phy (void ) +/* Configure and enable MV88E1116/88E1121 PHY */ +void mv_phy_init (char *name) {u16 reg;u16 devadr; -char *name ="egiga0" ;if (miiphy_set_current_dev (name))return ;@@ -154,6 +153,23 @@ void reset_phy(void)/* reset the phy */ miiphy_reset (name, devadr); -printf ("88E1116 Initialized on %s\n" , name); +printf (PHY_NO " Initialized on %s\n" , name); +} + +void reset_phy (void ) +{ +mv_phy_init ("egiga0" ); + +#ifdef CONFIG_BOARD_IS_OPENRD_CLIENT +/* Kirkwood ethernet driver is written with the assumption that in case
+ * of multiple PHYs, their addresses are consecutive. But
unfortunately
+ * in case of OpenRD-Client, PHY addresses are not
consecutive.*/board/Marvell/openrd_base/openrd_base.c +4
-0+miiphy_write ("egiga1" ,0xEE ,0xEE ,24 ); +#endif + +#if defined(CONFIG_BOARD_IS_OPENRD_CLIENT) ||
Quoted 1 line
defined(CONFIG_BOARD_IS_OPENRD_ULTIMATE)
The line is too long >80 chars
Regards..
Prafulla . .
PATCH 3/3 Rename openrd_base files to openrd.
In reply to Clint Adams--- board/Marvell/openrd/Makefile | 56 ++++++++++ board/Marvell/openrd/kwbimage.cfg | 168 +++++++++++++++++++++++++++++ board/Marvell/openrd/openrd.c | 175 +++++++++++++++++++++++++++++++ board/Marvell/openrd/openrd.h | 46 ++++++++ board/Marvell/openrd_base/Makefile | 56 ---------- board/Marvell/openrd_base/kwbimage.cfg | 168 ----------------------------- board/Marvell/openrd_base/openrd_base.c | 175 ------------------------------- board/Marvell/openrd_base/openrd_base.h | 46 -------- boards.cfg | 6 +- include/configs/openrd.h | 142 +++++++++++++++++++++++++ include/configs/openrd_base.h | 142 ------------------------- 11 files changed, 590 insertions(+), 590 deletions(-) create mode 100644 board/Marvell/openrd/Makefile create mode 100644 board/Marvell/openrd/kwbimage.cfg create mode 100644 board/Marvell/openrd/openrd.c create mode 100644 board/Marvell/openrd/openrd.h delete mode 100644 board/Marvell/openrd_base/Makefile delete mode 100644 board/Marvell/openrd_base/kwbimage.cfg delete mode 100644 board/Marvell/openrd_base/openrd_base.c delete mode 100644 board/Marvell/openrd_base/openrd_base.h create mode 100644 include/configs/openrd.h delete mode 100644 include/configs/openrd_base.h
board/Marvell/openrd/Makefile new file +56 -0
@@ -0,0 +1,56 @@ +# +# (C) Copyright 2009 +# Net Insight <www.netinsight.net> +# Written-by: Simon Kagstrom <[email protected]> +# +# Based on sheevaplug: +# (C) Copyright 2009 +# Marvell Semiconductor <www.marvell.com> +# Written-by: Prafulla Wadaskar <[email protected]> +# +# See file CREDITS for list of people who contributed to this +# project. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of +# the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, +# MA 02110-1301 USA +# + +include $(TOPDIR)/config.mk + +LIB = $(obj)lib$(BOARD).o + +COBJS := openrd.o + +SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) +OBJS := $(addprefix $(obj),$(COBJS)) +SOBJS := $(addprefix $(obj),$(SOBJS)) + +$(LIB): $(obj).depend $(OBJS) $(SOBJS) + $(call cmd_link_o_target, $(OBJS) $(SOBJS)) + +clean: + rm -f $(SOBJS) $(OBJS) + +distclean: clean + rm -f $(LIB) core *.bak .depend + +######################################################################### + +# defines $(obj).depend target +include $(SRCTREE)/rules.mk + +sinclude $(obj).depend + +#########################################################################
board/Marvell/openrd/kwbimage.cfg new file +168 -0
168 lines not on this page · raw message
board/Marvell/openrd/openrd.c new file +175 -0
175 lines not on this page · raw message
board/Marvell/openrd/openrd.h new file +46 -0
46 lines not on this page · raw message
board/Marvell/openrd_base/Makefile deleted +0 -56
56 lines not on this page · raw message
board/Marvell/openrd_base/kwbimage.cfg deleted +0 -168
168 lines not on this page · raw message
board/Marvell/openrd_base/openrd_base.c deleted +0 -175
175 lines not on this page · raw message
board/Marvell/openrd_base/openrd_base.h deleted +0 -46
46 lines not on this page · raw message
boards.cfg +3 -3
@@ -96,9 +96,9 @@ davinci_sonata arm arm926ejs sonata davinci suen3 arm arm926ejs km_arm keymile kirkwood guruplug arm arm926ejs - Marvell kirkwood mv88f6281gtw_ge arm arm926ejs - Marvell kirkwood -openrd_base arm arm926ejs openrd_base Marvell kirkwood openrd_base:BOARD_IS_OPENRD_BASE -openrd_client arm arm926ejs openrd_base Marvell kirkwood openrd_base:BOARD_IS_OPENRD_CLIENT -openrd_ultimate arm arm926ejs openrd_base Marvell kirkwood openrd_base:BOARD_IS_OPENRD_ULTIMATE +openrd_base arm arm926ejs openrd Marvell kirkwood openrd:BOARD_IS_OPENRD_BASE +openrd_client arm arm926ejs openrd Marvell kirkwood openrd:BOARD_IS_OPENRD_CLIENT +openrd_ultimate arm arm926ejs openrd Marvell kirkwood openrd:BOARD_IS_OPENRD_ULTIMATE rd6281a arm arm926ejs - Marvell kirkwood sheevaplug arm arm926ejs - Marvell kirkwood dockstar arm arm926ejs - Seagate kirkwood
include/configs/openrd.h new file +142 -0
142 lines not on this page · raw message
include/configs/openrd_base.h deleted +0 -142
142 lines not on this page · raw message
Signature · 1 line
1.7.4.1
PATCH 3/3 Rename openrd_base files to openrd.
Quoted 30 lines
-----Original Message-----
From: Clint Adams [mailto:clint at debian.org]
Sent: Wednesday, April 13, 2011 12:14 AM
To: u-boot at lists.denx.de
Cc: Prafulla Wadaskar; julian.pidancet at citrix.com; Clint Adams
Subject: [PATCH 3/3] Renameopenrd_basefiles to openrd.--- board/Marvell/openrd/Makefile | 56 ++++++++++ board/Marvell/openrd/kwbimage.cfg | 168 +++++++++++++++++++++++++++++ board/Marvell/openrd/openrd.c | 175 +++++++++++++++++++++++++++++++ board/Marvell/openrd/openrd.h | 46 ++++++++ board/Marvell/openrd_base/Makefile | 56 ---------- board/Marvell/openrd_base/kwbimage.cfg | 168 ------------------------ ----- board/Marvell/openrd_base/openrd_base.c | 175 ------------------------ ------- board/Marvell/openrd_base/openrd_base.h | 46 -------- boards.cfg | 6 +- include/configs/openrd.h | 142 +++++++++++++++++++++++++ include/configs/openrd_base.h | 142 ------------------------ - 11 files changed, 590 insertions(+), 590 deletions(-) create mode 100644 board/Marvell/openrd/Makefile create mode 100644 board/Marvell/openrd/kwbimage.cfg
Quoted 8 lines
create mode 100644 board/Marvell/openrd/openrd.c create mode 100644 board/Marvell/openrd/openrd.h delete mode 100644 board/Marvell/openrd_base/Makefile delete mode 100644 board/Marvell/openrd_base/kwbimage.cfg delete mode 100644 board/Marvell/openrd_base/openrd_base.c delete mode 100644 board/Marvell/openrd_base/openrd_base.h create mode 100644 include/configs/openrd.h delete mode 100644 include/configs/openrd_base.h
I think it would be good if you make this your first patch in the patch series, then rest of the code changes looks more relevant.
Also take care of additional suggestions form Albert about incremental versioning, change logs, and git-rename for delete/create logs
Also keep practice of adding some more information for patch description in the beginning of each patch.
Regards..
Prafulla . .
cover OpenRD-Client and OpenRD-Ultimate support
This moves the renames to the begining, removes the unsightly periods from the commit logs, puts "V1" in the Subject headers, breaks up the >80-character line, and hopefully addresses all complaints except for Detlev Zundel's.
Clint Adams (3):
Rename openrd_base files to openrd
Add definitions for OpenRD-Client and OpenRD-Ultimate Initialize second PHY on OpenRD-Client and OpenRD-Ultimate
MAKEALL | 2 +
board/Marvell/{openrd_base => openrd}/Makefile | 2 +-
board/Marvell/{openrd_base => openrd}/kwbimage.cfg | 0
.../{openrd_base/openrd_base.c => openrd/openrd.c} | 33 +++++++++++++++++---
.../{openrd_base/openrd_base.h => openrd/openrd.h} | 0
boards.cfg | 4 ++-
include/configs/{openrd_base.h => openrd.h} | 32 ++++++++++++++++---
7 files changed, 61 insertions(+), 12 deletions(-)
rename board/Marvell/{openrd_base => openrd}/Makefile (98%)
rename board/Marvell/{openrd_base => openrd}/kwbimage.cfg (100%)
rename board/Marvell/{openrd_base/openrd_base.c => openrd/openrd.c} (79%)
rename board/Marvell/{openrd_base/openrd_base.h => openrd/openrd.h} (100%)
rename include/configs/{openrd_base.h => openrd.h} (81%)Signature · 1 line
1.7.4.1
PATCH 1/3 Rename openrd_base files to openrd
---
board/Marvell/{openrd_base => openrd}/Makefile | 2 +-
board/Marvell/{openrd_base => openrd}/kwbimage.cfg | 0
.../{openrd_base/openrd_base.c => openrd/openrd.c} | 2 +-
.../{openrd_base/openrd_base.h => openrd/openrd.h} | 0
boards.cfg | 2 +-
include/configs/{openrd_base.h => openrd.h} | 4 ++--
6 files changed, 5 insertions(+), 5 deletions(-)
rename board/Marvell/{openrd_base => openrd}/Makefile (98%)
rename board/Marvell/{openrd_base => openrd}/kwbimage.cfg (100%)
rename board/Marvell/{openrd_base/openrd_base.c => openrd/openrd.c} (99%)
rename board/Marvell/{openrd_base/openrd_base.h => openrd/openrd.h} (100%)
rename include/configs/{openrd_base.h => openrd.h} (98%)board/Marvell/openrd/Makefile renamed from board/Marvell/openrd_base/Makefile +1 -1
@@ -31,7 +31,7 @@ include $(TOPDIR)/config.mk LIB = $(obj)lib$(BOARD).o -COBJS := openrd_base.o +COBJS := openrd.o SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) OBJS := $(addprefix $(obj),$(COBJS))
board/Marvell/openrd/kwbimage.cfg renamed from board/Marvell/openrd_base/kwbimage.cfg +0 -0
board/Marvell/openrd/openrd.c renamed from board/Marvell/openrd_base/openrd_base.c +1 -1
@@ -31,7 +31,7 @@#include <miiphy.h> #include <asm/arch/kirkwood.h> #include <asm/arch/mpp.h> -#include "openrd_base.h" +#include "openrd.h" DECLARE_GLOBAL_DATA_PTR ;
board/Marvell/openrd/openrd.h renamed from board/Marvell/openrd_base/openrd_base.h +0 -0
boards.cfg +1 -1
@@ -96,7 +96,7 @@ davinci_sonata arm arm926ejs sonata davinci suen3 arm arm926ejs km_arm keymile kirkwood guruplug arm arm926ejs - Marvell kirkwood mv88f6281gtw_ge arm arm926ejs - Marvell kirkwood -openrd_base arm arm926ejs - Marvell kirkwood +openrd_base arm arm926ejs openrd Marvell kirkwood openrd:BOARD_IS_OPENRD_BASE rd6281a arm arm926ejs - Marvell kirkwood sheevaplug arm arm926ejs - Marvell kirkwood dockstar arm arm926ejs - Seagate kirkwood
include/configs/openrd.h renamed from include/configs/openrd_base.h +2 -2
@@ -27,8 +27,8 @@* MA 02110-1301 USA */ -#ifndef _CONFIG_OPENRD_BASE_H -#define _CONFIG_OPENRD_BASE_H +#ifndef _CONFIG_OPENRD_H +#define _CONFIG_OPENRD_H/* * Version number information
Signature · 1 line
1.7.4.1
PATCH 2/3 Add definitions for OpenRD-Client and OpenRD-Ultimate
In reply to Clint Adams--- MAKEALL | 2 ++ board/Marvell/openrd/openrd.c | 6 ++++++ boards.cfg | 2 ++ include/configs/openrd.h | 14 +++++++++++++- 4 files changed, 23 insertions(+), 1 deletions(-)
MAKEALL +2 -0
@@ -361,6 +361,8 @@ LIST_ARM9=" \ omap5912osk \ omap730p2 \ openrd_base \ + openrd_client \ + openrd_ultimate \ rd6281a \ sbc2410x \ scb9328 \
board/Marvell/openrd/openrd.c +6 -0
@@ -110,7 +110,13 @@ int board_init(void)/* * arch number of board */ +#if defined(CONFIG_BOARD_IS_OPENRD_BASE ) gd->bd->bi_arch_number =MACH_TYPE_OPENRD_BASE ; +#elif defined(CONFIG_BOARD_IS_OPENRD_CLIENT ) + gd->bd->bi_arch_number =MACH_TYPE_OPENRD_CLIENT ; +#elif defined(CONFIG_BOARD_IS_OPENRD_ULTIMATE ) + gd->bd->bi_arch_number =MACH_TYPE_OPENRD_ULTIMATE ; +#endif /* adress of boot parameters */ gd->bd->bi_boot_params =kw_sdram_bar (0 ) +0x100 ;
boards.cfg +2 -0
@@ -97,6 +97,8 @@ suen3 arm arm926ejs km_arm keymile guruplug arm arm926ejs - Marvell kirkwood mv88f6281gtw_ge arm arm926ejs - Marvell kirkwood openrd_base arm arm926ejs openrd Marvell kirkwood openrd:BOARD_IS_OPENRD_BASE +openrd_client arm arm926ejs openrd Marvell kirkwood openrd:BOARD_IS_OPENRD_CLIENT +openrd_ultimate arm arm926ejs openrd Marvell kirkwood openrd:BOARD_IS_OPENRD_ULTIMATE rd6281a arm arm926ejs - Marvell kirkwood sheevaplug arm arm926ejs - Marvell kirkwood dockstar arm arm926ejs - Seagate kirkwood
include/configs/openrd.h +13 -1
@@ -33,7 +33,19 @@/* * Version number information */ -#define CONFIG_IDENT_STRING "\nOpenRD_base" +#ifdef CONFIG_BOARD_IS_OPENRD_ULTIMATE +# define CONFIG_IDENT_STRING "\nOpenRD-Ultimate" +#else +# ifdef CONFIG_BOARD_IS_OPENRD_CLIENT +# define CONFIG_IDENT_STRING "\nOpenRD-Client" +# else +# ifdef CONFIG_BOARD_IS_OPENRD_BASE +# define CONFIG_IDENT_STRING "\nOpenRD-Base" +# else +# error Unknown OpenRD board specified +# endif +# endif +#endif /* * High Level Configuration Options (easy to change)
Signature · 1 line
1.7.4.1
PATCH 3/3 Initialize second PHY on OpenRD-Client and OpenRD-Ultimate
In reply to Clint Adams(rework of Julian Pidancet's patch)
--- board/Marvell/openrd/openrd.c | 25 +++++++++++++++++++++---- include/configs/openrd.h | 14 ++++++++++++-- 2 files changed, 33 insertions(+), 6 deletions(-)
board/Marvell/openrd/openrd.c +21 -4
@@ -124,12 +124,11 @@ int board_init(void) }#ifdef CONFIG_RESET_PHY_R -/* Configure and enable MV88E1116 PHY */ -void reset_phy (void ) +/* Configure and enable MV88E1116/88E1121 PHY */ +void mv_phy_init (char *name) {u16 reg;u16 devadr; -char *name ="egiga0" ;if (miiphy_set_current_dev (name))return ;
@@ -154,6 +153,24 @@ void reset_phy(void)/* reset the phy */ miiphy_reset (name, devadr); - printf("88E1116 Initialized on %s\n", name); + printf(PHY_NO" Initialized on %s\n", name); +} + +void reset_phy (void ) +{ +mv_phy_init ("egiga0" ); + +#ifdef CONFIG_BOARD_IS_OPENRD_CLIENT +/* Kirkwood ethernet driver is written with the assumption that in case +* of multiple PHYs, their addresses are consecutive. But unfortunately +* in case of OpenRD-Client, PHY addresses are not consecutive.*/ +miiphy_write ("egiga1" ,0xEE ,0xEE ,24 ); +#endif + +#if defined(CONFIG_BOARD_IS_OPENRD_CLIENT ) || \ + defined(CONFIG_BOARD_IS_OPENRD_ULTIMATE ) +/* configure and initialize both PHY's */ +mv_phy_init ("egiga1" ); +#endif }#endif /* CONFIG_RESET_PHY_R */
include/configs/openrd.h +12 -2
@@ -117,8 +117,18 @@* Ethernet Driver configuration */ #ifdef CONFIG_CMD_NET -#define CONFIG_MVGBE_PORTS {1, 0}/* enable port 0 only */ -#define CONFIG_PHY_BASE_ADR 0x8 +# ifdef CONFIG_BOARD_IS_OPENRD_BASE +# define CONFIG_MVGBE_PORTS {1, 0}/* enable port 0 only */ +# else +# define CONFIG_MVGBE_PORTS {1, 1}/* enable both ports */ +# endif +# ifdef CONFIG_BOARD_IS_OPENRD_ULTIMATE +# define CONFIG_PHY_BASE_ADR 0x0 +# define PHY_NO "88E1121" +# else +# define CONFIG_PHY_BASE_ADR 0x8 +# define PHY_NO "88E1116" +# endif #endif /* CONFIG_CMD_NET */ /*
Signature · 1 line
1.7.4.1
cover OpenRD-Client and OpenRD-Ultimate support
In reply to Clint AdamsLe 13/04/2011 18:25, Clint Adams a ?crit :
Quoted 4 lines
This moves the renames to the begining, removes the unsightly periods from the commit logs, puts "V1" in the Subject headers, breaks up the>80-character line, and hopefully addresses all complaints except for Detlev Zundel's.
If you can rework according to Detlev's suggestion before the end of the merge window, that would be perfect. If not, and unless Prafulla or Wolfgang objects, I will pull this in u-boot-arm, because it works and at last provides support for all of the Open-RD variants. PHY code convergence can come in later.
Amicalement,
Signature · 1 line
Albert.
cover OpenRD-Client and OpenRD-Ultimate support
Quoted 5 lines · Albert ARIBAUD
If you can rework according to Detlev's suggestion before the end of the merge window, that would be perfect. If not, and unless Prafulla or Wolfgang objects, I will pull this in u-boot-arm, because it works and at last provides support for all of the Open-RD variants. PHY code convergence can come in later.
Sorry for my ignorance here; how would I do that? Apply Andy Fleming's patchset and then rebase off of that?
I'd also like to enable CONFIG_SYS_MVFS for openrd; I notice that no boards are doing that now. Is this something to be avoided?
Thanks
cover OpenRD-Client and OpenRD-Ultimate support
Hi Clint,
Le 14/04/2011 02:11, Clint Adams a ?crit :
Quoted 9 lines · Albert ARIBAUD
Quoted 5 lines
If you can rework according to Detlev's suggestion before the end of the merge window, that would be perfect. If not, and unless Prafulla or Wolfgang objects, I will pull this in u-boot-arm, because it works and at last provides support for all of the Open-RD variants. PHY code convergence can come in later.
Sorry for my ignorance here; how would I do that? Apply Andy Fleming's patchset and then rebase off of that?
Yes, and then modify your code to use the phy lib.
Quoted 2 lines
I'd also like to enable
CONFIG_SYS_MVFSfor openrd; I notice that no boards are doing that now. Is this something to be avoided?
I see no reason why I would not work.
Quoted 1 line
Thanks
Amicalement,
Signature · 1 line
Albert.
v2 cover support for OpenRD-Client and OpenRD-Ultimate
In reply to Albert ARIBAUDv2: define CONFIG_SYS_MVFS
Clint Adams (4):
Rename openrd_base files to openrd
Add definitions for OpenRD-Client and OpenRD-Ultimate Initialize second PHY on OpenRD-Client and OpenRD-Ultimate Enable multiple fs options for Marvell SoC family on OpenRD boards
MAKEALL | 2 +
board/Marvell/{openrd_base => openrd}/Makefile | 2 +-
board/Marvell/{openrd_base => openrd}/kwbimage.cfg | 0
.../{openrd_base/openrd_base.c => openrd/openrd.c} | 33 +++++++++++++++++---
.../{openrd_base/openrd_base.h => openrd/openrd.h} | 0
boards.cfg | 4 ++-
include/configs/{openrd_base.h => openrd.h} | 33 +++++++++++++++++---
7 files changed, 62 insertions(+), 12 deletions(-)
rename board/Marvell/{openrd_base => openrd}/Makefile (98%)
rename board/Marvell/{openrd_base => openrd}/kwbimage.cfg (100%)
rename board/Marvell/{openrd_base/openrd_base.c => openrd/openrd.c} (79%)
rename board/Marvell/{openrd_base/openrd_base.h => openrd/openrd.h} (100%)
rename include/configs/{openrd_base.h => openrd.h} (81%)Signature · 1 line
1.7.4.1
PATCH v2 1/4 Rename openrd_base files to openrd
---
board/Marvell/{openrd_base => openrd}/Makefile | 2 +-
board/Marvell/{openrd_base => openrd}/kwbimage.cfg | 0
.../{openrd_base/openrd_base.c => openrd/openrd.c} | 2 +-
.../{openrd_base/openrd_base.h => openrd/openrd.h} | 0
boards.cfg | 2 +-
include/configs/{openrd_base.h => openrd.h} | 4 ++--
6 files changed, 5 insertions(+), 5 deletions(-)
rename board/Marvell/{openrd_base => openrd}/Makefile (98%)
rename board/Marvell/{openrd_base => openrd}/kwbimage.cfg (100%)
rename board/Marvell/{openrd_base/openrd_base.c => openrd/openrd.c} (99%)
rename board/Marvell/{openrd_base/openrd_base.h => openrd/openrd.h} (100%)
rename include/configs/{openrd_base.h => openrd.h} (98%)board/Marvell/openrd/Makefile renamed from board/Marvell/openrd_base/Makefile +1 -1
@@ -31,7 +31,7 @@ include $(TOPDIR)/config.mk LIB = $(obj)lib$(BOARD).o -COBJS := openrd_base.o +COBJS := openrd.o SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) OBJS := $(addprefix $(obj),$(COBJS))
board/Marvell/openrd/kwbimage.cfg renamed from board/Marvell/openrd_base/kwbimage.cfg +0 -0
board/Marvell/openrd/openrd.c renamed from board/Marvell/openrd_base/openrd_base.c +1 -1
@@ -31,7 +31,7 @@#include <miiphy.h> #include <asm/arch/kirkwood.h> #include <asm/arch/mpp.h> -#include "openrd_base.h" +#include "openrd.h" DECLARE_GLOBAL_DATA_PTR ;
board/Marvell/openrd/openrd.h renamed from board/Marvell/openrd_base/openrd_base.h +0 -0
boards.cfg +1 -1
@@ -96,7 +96,7 @@ davinci_sonata arm arm926ejs sonata davinci suen3 arm arm926ejs km_arm keymile kirkwood guruplug arm arm926ejs - Marvell kirkwood mv88f6281gtw_ge arm arm926ejs - Marvell kirkwood -openrd_base arm arm926ejs - Marvell kirkwood +openrd_base arm arm926ejs openrd Marvell kirkwood openrd:BOARD_IS_OPENRD_BASE rd6281a arm arm926ejs - Marvell kirkwood sheevaplug arm arm926ejs - Marvell kirkwood dockstar arm arm926ejs - Seagate kirkwood
include/configs/openrd.h renamed from include/configs/openrd_base.h +2 -2
@@ -27,8 +27,8 @@* MA 02110-1301 USA */ -#ifndef _CONFIG_OPENRD_BASE_H -#define _CONFIG_OPENRD_BASE_H +#ifndef _CONFIG_OPENRD_H +#define _CONFIG_OPENRD_H/* * Version number information
Signature · 1 line
1.7.4.1
PATCH v2 1/4 Rename openrd_base files to openrd
Dear Clint Adams,
Quoted 5 lines · In message <[email protected]> you wrote:
---
board/Marvell/{openrd_base => openrd}/Makefile | 2 +-
board/Marvell/{openrd_base => openrd}/kwbimage.cfg | 0
.../{openrd_base/openrd_base.c => openrd/openrd.c} | 2 +-
.../{openrd_base/openrd_base.h => openrd/openrd.h} | 0Quoted 8 lines
boards.cfg | 2 +-
include/configs/{openrd_base.h => openrd.h} | 4 ++--
6 files changed, 5 insertions(+), 5 deletions(-)
rename board/Marvell/{openrd_base => openrd}/Makefile (98%)
rename board/Marvell/{openrd_base => openrd}/kwbimage.cfg (100%)
rename board/Marvell/{openrd_base/openrd_base.c => openrd/openrd.c} (99%)
rename board/Marvell/{openrd_base/openrd_base.h => openrd/openrd.h} (100%)
rename include/configs/{openrd_base.h => openrd.h} (98%)Signed-off-by-line missing. NAK.
Best regards,
Wolfgang Denk
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-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Violence in reality is quite different from theory. -- Spock, "The Cloud Minders", stardate 5818.4
PATCH v2 2/4 Add definitions for OpenRD-Client and OpenRD-Ultimate
In reply to Clint Adams--- MAKEALL | 2 ++ board/Marvell/openrd/openrd.c | 6 ++++++ boards.cfg | 2 ++ include/configs/openrd.h | 14 +++++++++++++- 4 files changed, 23 insertions(+), 1 deletions(-)
MAKEALL +2 -0
@@ -361,6 +361,8 @@ LIST_ARM9=" \ omap5912osk \ omap730p2 \ openrd_base \ + openrd_client \ + openrd_ultimate \ rd6281a \ sbc2410x \ scb9328 \
board/Marvell/openrd/openrd.c +6 -0
@@ -110,7 +110,13 @@ int board_init(void)/* * arch number of board */ +#if defined(CONFIG_BOARD_IS_OPENRD_BASE ) gd->bd->bi_arch_number =MACH_TYPE_OPENRD_BASE ; +#elif defined(CONFIG_BOARD_IS_OPENRD_CLIENT ) + gd->bd->bi_arch_number =MACH_TYPE_OPENRD_CLIENT ; +#elif defined(CONFIG_BOARD_IS_OPENRD_ULTIMATE ) + gd->bd->bi_arch_number =MACH_TYPE_OPENRD_ULTIMATE ; +#endif /* adress of boot parameters */ gd->bd->bi_boot_params =kw_sdram_bar (0 ) +0x100 ;
boards.cfg +2 -0
@@ -97,6 +97,8 @@ suen3 arm arm926ejs km_arm keymile guruplug arm arm926ejs - Marvell kirkwood mv88f6281gtw_ge arm arm926ejs - Marvell kirkwood openrd_base arm arm926ejs openrd Marvell kirkwood openrd:BOARD_IS_OPENRD_BASE +openrd_client arm arm926ejs openrd Marvell kirkwood openrd:BOARD_IS_OPENRD_CLIENT +openrd_ultimate arm arm926ejs openrd Marvell kirkwood openrd:BOARD_IS_OPENRD_ULTIMATE rd6281a arm arm926ejs - Marvell kirkwood sheevaplug arm arm926ejs - Marvell kirkwood dockstar arm arm926ejs - Seagate kirkwood
include/configs/openrd.h +13 -1
@@ -33,7 +33,19 @@/* * Version number information */ -#define CONFIG_IDENT_STRING "\nOpenRD_base" +#ifdef CONFIG_BOARD_IS_OPENRD_ULTIMATE +# define CONFIG_IDENT_STRING "\nOpenRD-Ultimate" +#else +# ifdef CONFIG_BOARD_IS_OPENRD_CLIENT +# define CONFIG_IDENT_STRING "\nOpenRD-Client" +# else +# ifdef CONFIG_BOARD_IS_OPENRD_BASE +# define CONFIG_IDENT_STRING "\nOpenRD-Base" +# else +# error Unknown OpenRD board specified +# endif +# endif +#endif /* * High Level Configuration Options (easy to change)
Signature · 1 line
1.7.4.1
PATCH v2 2/4 Add definitions for OpenRD-Client and OpenRD-Ultimate
Dear Clint Adams,
Quoted 6 lines · In message <[email protected]> you wrote:
--- MAKEALL | 2 ++ board/Marvell/openrd/openrd.c | 6 ++++++ boards.cfg | 2 ++ include/configs/openrd.h | 14 +++++++++++++- 4 files changed, 23 insertions(+), 1 deletions(-)
Signed-off-by line missing. NAK.
Best regards,
Wolfgang Denk
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-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de I really hate this damned machine It never does quite what I want I wish that they would sell it. But only what I tell it.
PATCH v2 2/4 Add definitions for OpenRD-Client and OpenRD-Ultimate
In reply to Clint AdamsDear Clint Adams,
Quoted 6 lines · In message <[email protected]> you wrote:
--- MAKEALL | 2 ++ board/Marvell/openrd/openrd.c | 6 ++++++ boards.cfg | 2 ++ include/configs/openrd.h | 14 +++++++++++++- 4 files changed, 23 insertions(+), 1 deletions(-)
Signed-off-by line missing, NAK.
Also, there is a lot of Coding Style issues (indentation not by TAB).
Please fix globally, and use checkpatch to verify result.
Best regards,
Wolfgang Denk
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-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de If you're not part of the solution, then you're part of the precipi- tate.
v4 cover OpenRD-Client and OpenRD-Ultimate support
Changes for v4:
- Various commit log and whitespace tweaks
Clint Adams (4):
Rename openrd_base files to openrd
Add definitions for OpenRD-Client and OpenRD-Ultimate Initialize second PHY on OpenRD-Client and OpenRD-Ultimate Enable multiple fs options for Marvell SoC family on OpenRD boards
MAKEALL | 2 +
board/Marvell/{openrd_base => openrd}/Makefile | 2 +-
board/Marvell/{openrd_base => openrd}/kwbimage.cfg | 0
.../{openrd_base/openrd_base.c => openrd/openrd.c} | 33 +++++++++++++++++---
.../{openrd_base/openrd_base.h => openrd/openrd.h} | 0
boards.cfg | 4 ++-
include/configs/{openrd_base.h => openrd.h} | 33 +++++++++++++++++---
7 files changed, 62 insertions(+), 12 deletions(-)
rename board/Marvell/{openrd_base => openrd}/Makefile (98%)
rename board/Marvell/{openrd_base => openrd}/kwbimage.cfg (100%)
rename board/Marvell/{openrd_base/openrd_base.c => openrd/openrd.c} (80%)
rename board/Marvell/{openrd_base/openrd_base.h => openrd/openrd.h} (100%)
rename include/configs/{openrd_base.h => openrd.h} (81%)Signature · 1 line
1.7.4.1
PATCH v4 1/4 Rename openrd_base files to openrd
---
Changes for v4:
- Added Signed-off-by: line to commit message
---
board/Marvell/{openrd_base => openrd}/Makefile | 2 +-
board/Marvell/{openrd_base => openrd}/kwbimage.cfg | 0
.../{openrd_base/openrd_base.c => openrd/openrd.c} | 2 +-
.../{openrd_base/openrd_base.h => openrd/openrd.h} | 0
boards.cfg | 2 +-
include/configs/{openrd_base.h => openrd.h} | 4 ++--
6 files changed, 5 insertions(+), 5 deletions(-)
rename board/Marvell/{openrd_base => openrd}/Makefile (98%)
rename board/Marvell/{openrd_base => openrd}/kwbimage.cfg (100%)
rename board/Marvell/{openrd_base/openrd_base.c => openrd/openrd.c} (99%)
rename board/Marvell/{openrd_base/openrd_base.h => openrd/openrd.h} (100%)
rename include/configs/{openrd_base.h => openrd.h} (98%)board/Marvell/openrd/Makefile renamed from board/Marvell/openrd_base/Makefile +1 -1
@@ -31,7 +31,7 @@ include $(TOPDIR)/config.mk LIB = $(obj)lib$(BOARD).o -COBJS := openrd_base.o +COBJS := openrd.o SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) OBJS := $(addprefix $(obj),$(COBJS))
board/Marvell/openrd/kwbimage.cfg renamed from board/Marvell/openrd_base/kwbimage.cfg +0 -0
board/Marvell/openrd/openrd.c renamed from board/Marvell/openrd_base/openrd_base.c +1 -1
@@ -31,7 +31,7 @@#include <miiphy.h> #include <asm/arch/kirkwood.h> #include <asm/arch/mpp.h> -#include "openrd_base.h" +#include "openrd.h" DECLARE_GLOBAL_DATA_PTR ;
board/Marvell/openrd/openrd.h renamed from board/Marvell/openrd_base/openrd_base.h +0 -0
boards.cfg +1 -1
@@ -96,7 +96,7 @@ davinci_sonata arm arm926ejs sonata davinci suen3 arm arm926ejs km_arm keymile kirkwood guruplug arm arm926ejs - Marvell kirkwood mv88f6281gtw_ge arm arm926ejs - Marvell kirkwood -openrd_base arm arm926ejs - Marvell kirkwood +openrd_base arm arm926ejs openrd Marvell kirkwood openrd:BOARD_IS_OPENRD_BASE rd6281a arm arm926ejs - Marvell kirkwood sheevaplug arm arm926ejs - Marvell kirkwood dockstar arm arm926ejs - Seagate kirkwood
include/configs/openrd.h renamed from include/configs/openrd_base.h +2 -2
@@ -27,8 +27,8 @@* MA 02110-1301 USA */ -#ifndef _CONFIG_OPENRD_BASE_H -#define _CONFIG_OPENRD_BASE_H +#ifndef _CONFIG_OPENRD_H +#define _CONFIG_OPENRD_H/* * Version number information
Signature · 1 line
1.7.4.1
PATCH v4 2/4 Add definitions for OpenRD-Client and OpenRD-Ultimate
In reply to Clint Adams---
Changes for v4:
- Added Signed-off-by: line to commit message
--- MAKEALL | 2 ++ board/Marvell/openrd/openrd.c | 6 ++++++ boards.cfg | 2 ++ include/configs/openrd.h | 14 +++++++++++++- 4 files changed, 23 insertions(+), 1 deletions(-)
MAKEALL +2 -0
@@ -361,6 +361,8 @@ LIST_ARM9=" \ omap5912osk \ omap730p2 \ openrd_base \ + openrd_client \ + openrd_ultimate \ rd6281a \ sbc2410x \ scb9328 \
board/Marvell/openrd/openrd.c +6 -0
@@ -110,7 +110,13 @@ int board_init(void)/* * arch number of board */ +#if defined(CONFIG_BOARD_IS_OPENRD_BASE ) gd->bd->bi_arch_number =MACH_TYPE_OPENRD_BASE ; +#elif defined(CONFIG_BOARD_IS_OPENRD_CLIENT ) + gd->bd->bi_arch_number =MACH_TYPE_OPENRD_CLIENT ; +#elif defined(CONFIG_BOARD_IS_OPENRD_ULTIMATE ) + gd->bd->bi_arch_number =MACH_TYPE_OPENRD_ULTIMATE ; +#endif /* adress of boot parameters */ gd->bd->bi_boot_params =kw_sdram_bar (0 ) +0x100 ;
boards.cfg +2 -0
@@ -97,6 +97,8 @@ suen3 arm arm926ejs km_arm keymile guruplug arm arm926ejs - Marvell kirkwood mv88f6281gtw_ge arm arm926ejs - Marvell kirkwood openrd_base arm arm926ejs openrd Marvell kirkwood openrd:BOARD_IS_OPENRD_BASE +openrd_client arm arm926ejs openrd Marvell kirkwood openrd:BOARD_IS_OPENRD_CLIENT +openrd_ultimate arm arm926ejs openrd Marvell kirkwood openrd:BOARD_IS_OPENRD_ULTIMATE rd6281a arm arm926ejs - Marvell kirkwood sheevaplug arm arm926ejs - Marvell kirkwood dockstar arm arm926ejs - Seagate kirkwood
include/configs/openrd.h +13 -1
@@ -33,7 +33,19 @@/* * Version number information */ -#define CONFIG_IDENT_STRING "\nOpenRD_base" +#ifdef CONFIG_BOARD_IS_OPENRD_ULTIMATE +# define CONFIG_IDENT_STRING "\nOpenRD-Ultimate" +#else +# ifdef CONFIG_BOARD_IS_OPENRD_CLIENT +# define CONFIG_IDENT_STRING "\nOpenRD-Client" +# else +# ifdef CONFIG_BOARD_IS_OPENRD_BASE +# define CONFIG_IDENT_STRING "\nOpenRD-Base" +# else +# error Unknown OpenRD board specified +# endif +# endif +#endif /* * High Level Configuration Options (easy to change)
Signature · 1 line
1.7.4.1
PATCH v4 3/4 Initialize second PHY on OpenRD-Client and OpenRD-Ultimate
In reply to Clint AdamsThough the OpenRD-Base only has one gigabit Ethernet port, both the OpenRD-Client and OpenRD-Ultimate each have two.
On the Ultimate, the PHY addresses are consecutive, but on the Client they are not.
(based on <62a0952ce368acc725063a00a5ec680a639d6c27.1301040318.git.julian.pidancet@citrix.com> <ad0a2dc1e422698b005d6f0ceb6dd6f75a87e00a.1301040318.git.julian.pidancet@citrix.com> )
--
Changes for v3:
- lengthened commit message
Changes for v4:
- Added Signed-off-by: line to commit message
- Changed whitespace to TABs
--- board/Marvell/openrd/openrd.c | 25 +++++++++++++++++++++---- include/configs/openrd.h | 14 ++++++++++++-- 2 files changed, 33 insertions(+), 6 deletions(-)
board/Marvell/openrd/openrd.c +21 -4
@@ -124,12 +124,11 @@ int board_init(void) }#ifdef CONFIG_RESET_PHY_R -/* Configure and enable MV88E1116 PHY */ -void reset_phy (void ) +/* Configure and enable MV88E1116/88E1121 PHY */ +void mv_phy_init (char *name) {u16 reg;u16 devadr; -char *name ="egiga0" ;if (miiphy_set_current_dev (name))return ;
@@ -154,6 +153,24 @@ void reset_phy(void)/* reset the phy */ miiphy_reset (name, devadr); - printf("88E1116 Initialized on %s\n", name); + printf(PHY_NO" Initialized on %s\n", name); +} + +void reset_phy (void ) +{ +mv_phy_init ("egiga0" ); + +#ifdef CONFIG_BOARD_IS_OPENRD_CLIENT +/* Kirkwood ethernet driver is written with the assumption that in case +* of multiple PHYs, their addresses are consecutive. But unfortunately +* in case of OpenRD-Client, PHY addresses are not consecutive.*/ +miiphy_write ("egiga1" ,0xEE ,0xEE ,24 ); +#endif + +#if defined(CONFIG_BOARD_IS_OPENRD_CLIENT ) || \ + defined(CONFIG_BOARD_IS_OPENRD_ULTIMATE ) +/* configure and initialize both PHY's */ +mv_phy_init ("egiga1" ); +#endif }#endif /* CONFIG_RESET_PHY_R */
include/configs/openrd.h +12 -2
@@ -117,8 +117,18 @@* Ethernet Driver configuration */ #ifdef CONFIG_CMD_NET -#define CONFIG_MVGBE_PORTS {1, 0}/* enable port 0 only */ -#define CONFIG_PHY_BASE_ADR 0x8 +# ifdef CONFIG_BOARD_IS_OPENRD_BASE +# define CONFIG_MVGBE_PORTS {1, 0}/* enable port 0 only */ +# else +# define CONFIG_MVGBE_PORTS {1, 1}/* enable both ports */ +# endif +# ifdef CONFIG_BOARD_IS_OPENRD_ULTIMATE +# define CONFIG_PHY_BASE_ADR 0x0 +# define PHY_NO "88E1121" +# else +# define CONFIG_PHY_BASE_ADR 0x8 +# define PHY_NO "88E1116" +# endif #endif /* CONFIG_CMD_NET */ /*
Signature · 1 line
1.7.4.1
PATCH v4 4/4 Enable multiple fs options for Marvell SoC family on OpenRD boards
In reply to Clint Adams---
Changes for v4:
- Added Signed-off-by: line to commit message
--- include/configs/openrd.h | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
include/configs/openrd.h +1 -0
@@ -60,6 +60,7 @@* Commands configuration */ #define CONFIG_SYS_NO_FLASH /* Declare no flash (NOR/SPI) */ +#define CONFIG_SYS_MVFS #include <config_cmd_default.h> #define CONFIG_CMD_AUTOSCRIPT #define CONFIG_CMD_DHCP
Signature · 1 line
1.7.4.1
v4 cover OpenRD-Client and OpenRD-Ultimate support
In reply to Clint AdamsQuoted 27 lines
-----Original Message-----
From: Clint Adams [mailto:clint at debian.org]
Sent: Tuesday, April 26, 2011 6:47 AM
To: u-boot at lists.denx.de
Cc: Albert ARIBAUD; Prafulla Wadaskar; Wolfgang Denk; Clint Adams
Subject: [PATCH v4 0/4] OpenRD-Client and OpenRD-Ultimate supportChanges for v4:
- Various commit log and whitespace tweaksClint Adams (4):
Renameopenrd_basefiles to openrd
Add definitions for OpenRD-Client and OpenRD-Ultimate Initialize second PHY on OpenRD-Client and OpenRD-Ultimate Enable multiple fs options for Marvell SoC family on OpenRD boardsMAKEALL | 2 + board/Marvell/{openrd_base => openrd}/Makefile | 2 +- board/Marvell/{openrd_base => openrd}/kwbimage.cfg | 0 .../{openrd_base/openrd_base.c => openrd/openrd.c} | 33 +++++++++++++++++--- .../{openrd_base/openrd_base.h => openrd/openrd.h} | 0 boards.cfg | 4 ++- include/configs/{openrd_base.h => openrd.h} | 33+++++++++++++++++---
Quoted 9 lines
7 files changed, 62 insertions(+), 12 deletions(-)
rename board/Marvell/{openrd_base => openrd}/Makefile (98%)
rename board/Marvell/{openrd_base => openrd}/kwbimage.cfg (100%)
rename board/Marvell/{openrd_base/openrd_base.c => openrd/openrd.c}
(80%)
rename board/Marvell/{openrd_base/openrd_base.h => openrd/openrd.h}
(100%)
rename include/configs/{openrd_base.h => openrd.h} (81%)Hi Clint
I have rebased u-boot-marvell.git master branch
I am unable to apply this patch series cleanly to this rebased branch.
Kindly please provide the new patch series for the same.
Regards..
Prafulla . .
v5 cover OpenRD-Client and OpenRD-Ultimate support
Changes for v5:
- rebase against current u-boot-marvell.git/master
Clint Adams (4):
Rename openrd_base files to openrd
Add definitions for OpenRD-Client and OpenRD-Ultimate Initialize second PHY on OpenRD-Client and OpenRD-Ultimate Enable multiple fs options for Marvell SoC family on OpenRD boards
MAKEALL | 2 +
board/Marvell/{openrd_base => openrd}/Makefile | 2 +-
board/Marvell/{openrd_base => openrd}/kwbimage.cfg | 0
.../{openrd_base/openrd_base.c => openrd/openrd.c} | 33 +++++++++++++++++---
.../{openrd_base/openrd_base.h => openrd/openrd.h} | 0
boards.cfg | 4 ++-
include/configs/{openrd_base.h => openrd.h} | 33 +++++++++++++++++---
7 files changed, 62 insertions(+), 12 deletions(-)
rename board/Marvell/{openrd_base => openrd}/Makefile (98%)
rename board/Marvell/{openrd_base => openrd}/kwbimage.cfg (100%)
rename board/Marvell/{openrd_base/openrd_base.c => openrd/openrd.c} (80%)
rename board/Marvell/{openrd_base/openrd_base.h => openrd/openrd.h} (100%)
rename include/configs/{openrd_base.h => openrd.h} (81%)Signature · 1 line
1.7.4.4
PATCH v5 1/4 Rename openrd_base files to openrd
---
board/Marvell/{openrd_base => openrd}/Makefile | 2 +-
board/Marvell/{openrd_base => openrd}/kwbimage.cfg | 0
.../{openrd_base/openrd_base.c => openrd/openrd.c} | 2 +-
.../{openrd_base/openrd_base.h => openrd/openrd.h} | 0
boards.cfg | 2 +-
include/configs/{openrd_base.h => openrd.h} | 4 ++--
6 files changed, 5 insertions(+), 5 deletions(-)
rename board/Marvell/{openrd_base => openrd}/Makefile (98%)
rename board/Marvell/{openrd_base => openrd}/kwbimage.cfg (100%)
rename board/Marvell/{openrd_base/openrd_base.c => openrd/openrd.c} (99%)
rename board/Marvell/{openrd_base/openrd_base.h => openrd/openrd.h} (100%)
rename include/configs/{openrd_base.h => openrd.h} (98%)board/Marvell/openrd/Makefile renamed from board/Marvell/openrd_base/Makefile +1 -1
@@ -31,7 +31,7 @@ include $(TOPDIR)/config.mk LIB = $(obj)lib$(BOARD).o -COBJS := openrd_base.o +COBJS := openrd.o SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) OBJS := $(addprefix $(obj),$(COBJS))
board/Marvell/openrd/kwbimage.cfg renamed from board/Marvell/openrd_base/kwbimage.cfg +0 -0
board/Marvell/openrd/openrd.c renamed from board/Marvell/openrd_base/openrd_base.c +1 -1
@@ -31,7 +31,7 @@#include <miiphy.h> #include <asm/arch/kirkwood.h> #include <asm/arch/mpp.h> -#include "openrd_base.h" +#include "openrd.h" DECLARE_GLOBAL_DATA_PTR ;
board/Marvell/openrd/openrd.h renamed from board/Marvell/openrd_base/openrd_base.h +0 -0
boards.cfg +1 -1
@@ -106,7 +106,7 @@ davinci_sonata arm arm926ejs sonata davinci suen3 arm arm926ejs km_arm keymile kirkwood guruplug arm arm926ejs - Marvell kirkwood mv88f6281gtw_ge arm arm926ejs - Marvell kirkwood -openrd_base arm arm926ejs - Marvell kirkwood +openrd_base arm arm926ejs openrd Marvell kirkwood openrd:BOARD_IS_OPENRD_BASE rd6281a arm arm926ejs - Marvell kirkwood sheevaplug arm arm926ejs - Marvell kirkwood dockstar arm arm926ejs - Seagate kirkwood
include/configs/openrd.h renamed from include/configs/openrd_base.h +2 -2
@@ -27,8 +27,8 @@* MA 02110-1301 USA */ -#ifndef _CONFIG_OPENRD_BASE_H -#define _CONFIG_OPENRD_BASE_H +#ifndef _CONFIG_OPENRD_H +#define _CONFIG_OPENRD_H/* * Version number information
Signature · 1 line
1.7.4.4
PATCH v5 2/4 Add definitions for OpenRD-Client and OpenRD-Ultimate
In reply to Clint Adams--- MAKEALL | 2 ++ board/Marvell/openrd/openrd.c | 6 ++++++ boards.cfg | 2 ++ include/configs/openrd.h | 14 +++++++++++++- 4 files changed, 23 insertions(+), 1 deletions(-)
MAKEALL +2 -0
@@ -361,6 +361,8 @@ LIST_ARM9=" \ omap5912osk \ omap730p2 \ openrd_base \ + openrd_client \ + openrd_ultimate \ rd6281a \ sbc2410x \ scb9328 \
board/Marvell/openrd/openrd.c +6 -0
@@ -110,7 +110,13 @@ int board_init(void)/* * arch number of board */ +#if defined(CONFIG_BOARD_IS_OPENRD_BASE ) gd->bd->bi_arch_number =MACH_TYPE_OPENRD_BASE ; +#elif defined(CONFIG_BOARD_IS_OPENRD_CLIENT ) + gd->bd->bi_arch_number =MACH_TYPE_OPENRD_CLIENT ; +#elif defined(CONFIG_BOARD_IS_OPENRD_ULTIMATE ) + gd->bd->bi_arch_number =MACH_TYPE_OPENRD_ULTIMATE ; +#endif /* adress of boot parameters */ gd->bd->bi_boot_params =kw_sdram_bar (0 ) +0x100 ;
boards.cfg +2 -0
@@ -107,6 +107,8 @@ suen3 arm arm926ejs km_arm keymile guruplug arm arm926ejs - Marvell kirkwood mv88f6281gtw_ge arm arm926ejs - Marvell kirkwood openrd_base arm arm926ejs openrd Marvell kirkwood openrd:BOARD_IS_OPENRD_BASE +openrd_client arm arm926ejs openrd Marvell kirkwood openrd:BOARD_IS_OPENRD_CLIENT +openrd_ultimate arm arm926ejs openrd Marvell kirkwood openrd:BOARD_IS_OPENRD_ULTIMATE rd6281a arm arm926ejs - Marvell kirkwood sheevaplug arm arm926ejs - Marvell kirkwood dockstar arm arm926ejs - Seagate kirkwood
include/configs/openrd.h +13 -1
@@ -33,7 +33,19 @@/* * Version number information */ -#define CONFIG_IDENT_STRING "\nOpenRD_base" +#ifdef CONFIG_BOARD_IS_OPENRD_ULTIMATE +# define CONFIG_IDENT_STRING "\nOpenRD-Ultimate" +#else +# ifdef CONFIG_BOARD_IS_OPENRD_CLIENT +# define CONFIG_IDENT_STRING "\nOpenRD-Client" +# else +# ifdef CONFIG_BOARD_IS_OPENRD_BASE +# define CONFIG_IDENT_STRING "\nOpenRD-Base" +# else +# error Unknown OpenRD board specified +# endif +# endif +#endif /* * High Level Configuration Options (easy to change)
Signature · 1 line
1.7.4.4
PATCH v5 3/4 Initialize second PHY on OpenRD-Client and OpenRD-Ultimate
In reply to Clint AdamsThough the OpenRD-Base only has one gigabit Ethernet port, both the OpenRD-Client and OpenRD-Ultimate each have two.
On the Ultimate, the PHY addresses are consecutive, but on the Client they are not.
(based on <62a0952ce368acc725063a00a5ec680a639d6c27.1301040318.git.julian.pidancet@citrix.com> <ad0a2dc1e422698b005d6f0ceb6dd6f75a87e00a.1301040318.git.julian.pidancet@citrix.com> )
--
Changes for v3:
- lengthened commit message
Changes for v4:
- Added Signed-off-by: line to commit message
- Changed whitespace to TABs
--- board/Marvell/openrd/openrd.c | 25 +++++++++++++++++++++---- include/configs/openrd.h | 14 ++++++++++++-- 2 files changed, 33 insertions(+), 6 deletions(-)
board/Marvell/openrd/openrd.c +21 -4
@@ -124,12 +124,11 @@ int board_init(void) }#ifdef CONFIG_RESET_PHY_R -/* Configure and enable MV88E1116 PHY */ -void reset_phy (void ) +/* Configure and enable MV88E1116/88E1121 PHY */ +void mv_phy_init (char *name) {u16 reg;u16 devadr; -char *name ="egiga0" ;if (miiphy_set_current_dev (name))return ;
@@ -154,6 +153,24 @@ void reset_phy(void)/* reset the phy */ miiphy_reset (name, devadr); - printf("88E1116 Initialized on %s\n", name); + printf(PHY_NO" Initialized on %s\n", name); +} + +void reset_phy (void ) +{ +mv_phy_init ("egiga0" ); + +#ifdef CONFIG_BOARD_IS_OPENRD_CLIENT +/* Kirkwood ethernet driver is written with the assumption that in case +* of multiple PHYs, their addresses are consecutive. But unfortunately +* in case of OpenRD-Client, PHY addresses are not consecutive.*/ +miiphy_write ("egiga1" ,0xEE ,0xEE ,24 ); +#endif + +#if defined(CONFIG_BOARD_IS_OPENRD_CLIENT ) || \ + defined(CONFIG_BOARD_IS_OPENRD_ULTIMATE ) +/* configure and initialize both PHY's */ +mv_phy_init ("egiga1" ); +#endif }#endif /* CONFIG_RESET_PHY_R */
include/configs/openrd.h +12 -2
@@ -117,8 +117,18 @@* Ethernet Driver configuration */ #ifdef CONFIG_CMD_NET -#define CONFIG_MVGBE_PORTS {1, 0}/* enable port 0 only */ -#define CONFIG_PHY_BASE_ADR 0x8 +# ifdef CONFIG_BOARD_IS_OPENRD_BASE +# define CONFIG_MVGBE_PORTS {1, 0}/* enable port 0 only */ +# else +# define CONFIG_MVGBE_PORTS {1, 1}/* enable both ports */ +# endif +# ifdef CONFIG_BOARD_IS_OPENRD_ULTIMATE +# define CONFIG_PHY_BASE_ADR 0x0 +# define PHY_NO "88E1121" +# else +# define CONFIG_PHY_BASE_ADR 0x8 +# define PHY_NO "88E1116" +# endif #endif /* CONFIG_CMD_NET */ /*
Signature · 1 line
1.7.4.4
PATCH v5 4/4 Enable multiple fs options for Marvell SoC family on OpenRD boards
In reply to Clint Adams--- include/configs/openrd.h | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
include/configs/openrd.h +1 -0
@@ -60,6 +60,7 @@* Commands configuration */ #define CONFIG_SYS_NO_FLASH /* Declare no flash (NOR/SPI) */ +#define CONFIG_SYS_MVFS #include <config_cmd_default.h> #define CONFIG_CMD_AUTOSCRIPT #define CONFIG_CMD_DHCP
Signature · 1 line
1.7.4.4
v5 cover OpenRD-Client and OpenRD-Ultimate support
In reply to Clint AdamsQuoted 28 lines
-----Original Message-----
From: Clint Adams [mailto:clint at debian.org]
Sent: Tuesday, May 03, 2011 8:31 PM
To: u-boot at lists.denx.de
Cc: Albert ARIBAUD; Prafulla Wadaskar; Wolfgang Denk; Ashish Karkare; Prabhanjan Sarnaik; Clint Adams
Subject: [PATCH v5 0/4] OpenRD-Client and OpenRD-Ultimate supportChanges for v5:
- rebase against current u-boot-marvell.git/masterClint Adams (4):
Renameopenrd_basefiles to openrd
Add definitions for OpenRD-Client and OpenRD-Ultimate Initialize second PHY on OpenRD-Client and OpenRD-Ultimate Enable multiple fs options for Marvell SoC family on OpenRD boardsMAKEALL | 2 + board/Marvell/{openrd_base => openrd}/Makefile | 2 +- board/Marvell/{openrd_base => openrd}/kwbimage.cfg | 0 .../{openrd_base/openrd_base.c => openrd/openrd.c} | 33 +++++++++++++++++--- .../{openrd_base/openrd_base.h => openrd/openrd.h} | 0 boards.cfg | 4 ++- include/configs/{openrd_base.h => openrd.h} | 33+++++++++++++++++---
Quoted 9 lines
7 files changed, 62 insertions(+), 12 deletions(-)
rename board/Marvell/{openrd_base => openrd}/Makefile (98%)
rename board/Marvell/{openrd_base => openrd}/kwbimage.cfg (100%)
rename board/Marvell/{openrd_base/openrd_base.c => openrd/openrd.c}
(80%)
rename board/Marvell/{openrd_base/openrd_base.h => openrd/openrd.h}
(100%)
rename include/configs/{openrd_base.h => openrd.h} (81%)Applied this patch series to u-boot-marvell.git/master branch
Regards..
Prafulla . .
PATCH v2 2/4 Add definitions for OpenRD-Client and OpenRD-Ultimate
In reply to Wolfgang DenkQuoted 1 line · Wolfgang Denk
Please fix globally, and use checkpatch to verify result.
Thanks, that appears to be this:
http://kernel.org/pub/linux/kernel/people/apw/checkpatch/
PATCH v2 3/4 Initialize second PHY on OpenRD-Client and OpenRD-Ultimate
In reply to Clint Adams(rework of Julian Pidancet's patch)
--- board/Marvell/openrd/openrd.c | 25 +++++++++++++++++++++---- include/configs/openrd.h | 14 ++++++++++++-- 2 files changed, 33 insertions(+), 6 deletions(-)
board/Marvell/openrd/openrd.c +21 -4
@@ -124,12 +124,11 @@ int board_init(void) }#ifdef CONFIG_RESET_PHY_R -/* Configure and enable MV88E1116 PHY */ -void reset_phy (void ) +/* Configure and enable MV88E1116/88E1121 PHY */ +void mv_phy_init (char *name) {u16 reg;u16 devadr; -char *name ="egiga0" ;if (miiphy_set_current_dev (name))return ;
@@ -154,6 +153,24 @@ void reset_phy(void)/* reset the phy */ miiphy_reset (name, devadr); - printf("88E1116 Initialized on %s\n", name); + printf(PHY_NO" Initialized on %s\n", name); +} + +void reset_phy (void ) +{ +mv_phy_init ("egiga0" ); + +#ifdef CONFIG_BOARD_IS_OPENRD_CLIENT +/* Kirkwood ethernet driver is written with the assumption that in case +* of multiple PHYs, their addresses are consecutive. But unfortunately +* in case of OpenRD-Client, PHY addresses are not consecutive.*/ +miiphy_write ("egiga1" ,0xEE ,0xEE ,24 ); +#endif + +#if defined(CONFIG_BOARD_IS_OPENRD_CLIENT ) || \ + defined(CONFIG_BOARD_IS_OPENRD_ULTIMATE ) +/* configure and initialize both PHY's */ +mv_phy_init ("egiga1" ); +#endif }#endif /* CONFIG_RESET_PHY_R */
include/configs/openrd.h +12 -2
@@ -117,8 +117,18 @@* Ethernet Driver configuration */ #ifdef CONFIG_CMD_NET -#define CONFIG_MVGBE_PORTS {1, 0}/* enable port 0 only */ -#define CONFIG_PHY_BASE_ADR 0x8 +# ifdef CONFIG_BOARD_IS_OPENRD_BASE +# define CONFIG_MVGBE_PORTS {1, 0}/* enable port 0 only */ +# else +# define CONFIG_MVGBE_PORTS {1, 1}/* enable both ports */ +# endif +# ifdef CONFIG_BOARD_IS_OPENRD_ULTIMATE +# define CONFIG_PHY_BASE_ADR 0x0 +# define PHY_NO "88E1121" +# else +# define CONFIG_PHY_BASE_ADR 0x8 +# define PHY_NO "88E1116" +# endif #endif /* CONFIG_CMD_NET */ /*
Signature · 1 line
1.7.4.1
PATCH v2 3/4 Initialize second PHY on OpenRD-Client and OpenRD-Ultimate
Quoted 11 lines
-----Original Message-----
From: Clint Adams [mailto:clint at debian.org]
Sent: Tuesday, April 19, 2011 5:17 AM
To: u-boot at lists.denx.de
Cc: Albert ARIBAUD; Prafulla Wadaskar; julian.pidancet at citrix.com; Wolfgang Denk; Clint Adams
Subject: [PATCH v2 3/4] Initialize second PHY on OpenRD-Client and OpenRD-Ultimate
Quoted 1 line
(rework of Julian Pidancet's patch)
Hi Clint
Some meaning full description about this patch is useful to understand objective of this patch. It is very difficult to know which patch you are referring here. At least pointers are expected.
Quoted 1 line
---
You must have captured change log history here.
That is equally important too.
Please refer "Sending updated patch versions" @ http://denx.de/wiki/U-Boot/Patches
Regards..
Prafulla . .
Quoted 80 lines
board/Marvell/openrd/openrd.c | 25 +++++++++++++++++++++---- include/configs/openrd.h | 14 ++++++++++++-- 2 files changed, 33 insertions(+), 6 deletions(-)board/Marvell/openrd/openrd.c +11
-4@@ -124,12 +124,11 @@ int board_init(void) }#ifdef CONFIG_RESET_PHY_R -/* Configure and enable MV88E1116 PHY */ -void reset_phy (void ) +/* Configure and enable MV88E1116/88E1121 PHY */ +void mv_phy_init (char *name) {u16 reg;u16 devadr; -char *name ="egiga0" ;if (miiphy_set_current_dev (name))return ;@@ -154,6 +153,24 @@ void reset_phy(void)/* reset the phy */ miiphy_reset (name, devadr); -printf ("88E1116 Initialized on %s\n" , name); +printf (PHY_NO " Initialized on %s\n" , name); +} + +void reset_phy (void ) +{ +mv_phy_init ("egiga0" ); + +#ifdef CONFIG_BOARD_IS_OPENRD_CLIENT +/* Kirkwood ethernet driver is written with the assumption that in case
+ * of multiple PHYs, their addresses are consecutive. But
unfortunately
+ * in case of OpenRD-Client, PHY addresses are not
consecutive.*/board/Marvell/openrd/openrd.c +8
-0+miiphy_write ("egiga1" ,0xEE ,0xEE ,24 ); +#endif + +#if defined(CONFIG_BOARD_IS_OPENRD_CLIENT ) || \ + defined(CONFIG_BOARD_IS_OPENRD_ULTIMATE ) +/* configure and initialize both PHY's */ +mv_phy_init ("egiga1" ); +#endif }#endif /* CONFIG_RESET_PHY_R */ include/configs/openrd.h +12
-3@@ -117,8 +117,18 @@* Ethernet Driver configuration */ #ifdef CONFIG_CMD_NET -#define CONFIG_MVGBE_PORTS {1, 0}/* enable port 0 only */ -#define CONFIG_PHY_BASE_ADR 0x8 +# ifdef CONFIG_BOARD_IS_OPENRD_BASE +# define CONFIG_MVGBE_PORTS {1, 0}/* enable port 0 only */ +# else +# define CONFIG_MVGBE_PORTS {1, 1}/* enable both ports */ +# endif +# ifdef CONFIG_BOARD_IS_OPENRD_ULTIMATE +# define CONFIG_PHY_BASE_ADR 0x0 +# define PHY_NO "88E1121" +# else +# define CONFIG_PHY_BASE_ADR 0x8 +# define PHY_NO "88E1116" +# endif #endif /* CONFIG_CMD_NET */ /* -- 1.7.4.1
Wolfgang Denk
NAKPATCH v2 3/4 Initialize second PHY on OpenRD-Client and OpenRD-Ultimate
In reply to Clint AdamsDear Clint Adams,
Quoted 5 lines · In message <[email protected]> you wrote:
(rework of Julian Pidancet's patch)
--- board/Marvell/openrd/openrd.c | 25 +++++++++++++++++++++---- include/configs/openrd.h | 14 ++++++++++++-- 2 files changed, 33 insertions(+), 6 deletions(-)
This is actually the patch with the Coding Style issues. And it has no
Signed-off-by: line either.
NAK.
Best regards,
Wolfgang Denk
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-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de "There is no distinctly American criminal class except Congress." - Mark Twain
PATCH v2 4/4 Enable multiple fs options for Marvell SoC family on OpenRD boards
In reply to Clint Adams--- include/configs/openrd.h | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
include/configs/openrd.h +1 -0
@@ -60,6 +60,7 @@* Commands configuration */ #define CONFIG_SYS_NO_FLASH /* Declare no flash (NOR/SPI) */ +#define CONFIG_SYS_MVFS #include <config_cmd_default.h> #define CONFIG_CMD_AUTOSCRIPT #define CONFIG_CMD_DHCP
Signature · 1 line
1.7.4.1
PATCH v2 4/4 Enable multiple fs options for Marvell SoC family on OpenRD boards
Dear Clint Adams,
Quoted 3 lines · In message <[email protected]> you wrote:
--- include/configs/openrd.h | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
Best regards,
Wolfgang Denk
Signature · 4 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de "I'm not a god, I was misquoted." - Lister, Red Dwarf
cover OpenRD-Client and OpenRD-Ultimate support
In reply to Albert ARIBAUDQuoted 5 lines · Albert ARIBAUD
If you can rework according to Detlev's suggestion before the end of the merge window, that would be perfect. If not, and unless Prafulla or Wolfgang objects, I will pull this in u-boot-arm, because it works and at last provides support for all of the Open-RD variants. PHY code convergence can come in later.
Hi Albert,
It is now looking exceedingly unlikely that I will have enough free time this month to figure the PHY business out, so I am sending v2 of the patchset and hoping that convergence does indeed come later.
Thanks
PATCH 1/3 Add definitions for OpenRD-Client and OpenRD-Ultimate
In reply to Clint AdamsLe 12/04/2011 20:44, Clint Adams a ?crit :
Quoted 6 lines
--- MAKEALL | 2 ++ board/Marvell/openrd_base/openrd_base.c | 6 ++++++ boards.cfg | 4 +++- include/configs/openrd_base.h | 14 +++++++++++++- 4 files changed, 24 insertions(+), 2 deletions(-)
Is this yet another version of the patch set ? Please repost with "Vn" in the subject where n is the version number, and provide history of the versions.
P.S. Seems like my direct e-mails to you are bouncing because your mail server is trying some "sender verification callout" and failing.
Amicalement,
Signature · 1 line
Albert.
PATCH 2/3 Initialize second PHY on OpenRD-Client and OpenRD-Ultimate.
In reply to Julian PidancetQuoted 6 lines · Julian Pidancet
This part only initialize second PHY for the OpenRD-Client board and not the OpenRD-Ultimate.
I would do something like:#if
defined(CONFIG_BOARD_IS_OPENRD_CLIENT)||defined(CONFIG_BOARD_IS_OPENRD_ULTIMATE)
Quoted 7 lines
#if defined(CONFIG_BOARD_IS_OPENRD_CLIENT) miiphy_write("egiga1", 0xEE, 0xEE, 24); #endif mv_phy_init("egiga1");#endif
Or similar.
Revised patchset on its way.
PATCH 3/3 Rename openrd_base files to openrd.
In reply to Clint Adams--- board/Marvell/openrd/Makefile | 56 ++++++++++ board/Marvell/openrd/kwbimage.cfg | 168 ++++++++++++++++++++++++++++++ board/Marvell/openrd/openrd.c | 173 +++++++++++++++++++++++++++++++ board/Marvell/openrd/openrd.h | 46 ++++++++ board/Marvell/openrd_base/Makefile | 56 ---------- board/Marvell/openrd_base/kwbimage.cfg | 168 ------------------------------ board/Marvell/openrd_base/openrd_base.c | 173 ------------------------------- board/Marvell/openrd_base/openrd_base.h | 46 -------- boards.cfg | 6 +- include/configs/openrd.h | 142 +++++++++++++++++++++++++ include/configs/openrd_base.h | 142 ------------------------- 11 files changed, 588 insertions(+), 588 deletions(-) create mode 100644 board/Marvell/openrd/Makefile create mode 100644 board/Marvell/openrd/kwbimage.cfg create mode 100644 board/Marvell/openrd/openrd.c create mode 100644 board/Marvell/openrd/openrd.h delete mode 100644 board/Marvell/openrd_base/Makefile delete mode 100644 board/Marvell/openrd_base/kwbimage.cfg delete mode 100644 board/Marvell/openrd_base/openrd_base.c delete mode 100644 board/Marvell/openrd_base/openrd_base.h create mode 100644 include/configs/openrd.h delete mode 100644 include/configs/openrd_base.h
board/Marvell/openrd/Makefile new file +56 -0
@@ -0,0 +1,56 @@ +# +# (C) Copyright 2009 +# Net Insight <www.netinsight.net> +# Written-by: Simon Kagstrom <[email protected]> +# +# Based on sheevaplug: +# (C) Copyright 2009 +# Marvell Semiconductor <www.marvell.com> +# Written-by: Prafulla Wadaskar <[email protected]> +# +# See file CREDITS for list of people who contributed to this +# project. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of +# the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, +# MA 02110-1301 USA +# + +include $(TOPDIR)/config.mk + +LIB = $(obj)lib$(BOARD).o + +COBJS := openrd.o + +SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) +OBJS := $(addprefix $(obj),$(COBJS)) +SOBJS := $(addprefix $(obj),$(SOBJS)) + +$(LIB): $(obj).depend $(OBJS) $(SOBJS) + $(call cmd_link_o_target, $(OBJS) $(SOBJS)) + +clean: + rm -f $(SOBJS) $(OBJS) + +distclean: clean + rm -f $(LIB) core *.bak .depend + +######################################################################### + +# defines $(obj).depend target +include $(SRCTREE)/rules.mk + +sinclude $(obj).depend + +#########################################################################
board/Marvell/openrd/kwbimage.cfg new file +168 -0
168 lines not on this page · raw message
board/Marvell/openrd/openrd.c new file +173 -0
173 lines not on this page · raw message
board/Marvell/openrd/openrd.h new file +46 -0
46 lines not on this page · raw message
board/Marvell/openrd_base/Makefile deleted +0 -56
56 lines not on this page · raw message
board/Marvell/openrd_base/kwbimage.cfg deleted +0 -168
168 lines not on this page · raw message
board/Marvell/openrd_base/openrd_base.c deleted +0 -173
173 lines not on this page · raw message
board/Marvell/openrd_base/openrd_base.h deleted +0 -46
46 lines not on this page · raw message
boards.cfg +3 -3
@@ -96,9 +96,9 @@ davinci_sonata arm arm926ejs sonata davinci suen3 arm arm926ejs km_arm keymile kirkwood guruplug arm arm926ejs - Marvell kirkwood mv88f6281gtw_ge arm arm926ejs - Marvell kirkwood -openrd_base arm arm926ejs openrd_base Marvell kirkwood openrd_base:BOARD_IS_OPENRD_BASE -openrd_client arm arm926ejs openrd_base Marvell kirkwood openrd_base:BOARD_IS_OPENRD_CLIENT -openrd_ultimate arm arm926ejs openrd_base Marvell kirkwood openrd_base:BOARD_IS_OPENRD_ULTIMATE +openrd_base arm arm926ejs openrd Marvell kirkwood openrd:BOARD_IS_OPENRD_BASE +openrd_client arm arm926ejs openrd Marvell kirkwood openrd:BOARD_IS_OPENRD_CLIENT +openrd_ultimate arm arm926ejs openrd Marvell kirkwood openrd:BOARD_IS_OPENRD_ULTIMATE rd6281a arm arm926ejs - Marvell kirkwood sheevaplug arm arm926ejs - Marvell kirkwood dockstar arm arm926ejs - Seagate kirkwood
include/configs/openrd.h new file +142 -0
142 lines not on this page · raw message
include/configs/openrd_base.h deleted +0 -142
142 lines not on this page · raw message
Signature · 1 line
1.7.4.1
PATCH 3/3 Rename openrd_base files to openrd.
Hi Clint,
Le 12/04/2011 18:09, Clint Adams a ?crit :
Quoted 13 lines
--- board/Marvell/openrd/Makefile | 56 ++++++++++ board/Marvell/openrd/kwbimage.cfg | 168 ++++++++++++++++++++++++++++++ board/Marvell/openrd/openrd.c | 173 +++++++++++++++++++++++++++++++ board/Marvell/openrd/openrd.h | 46 ++++++++ board/Marvell/openrd_base/Makefile | 56 ---------- board/Marvell/openrd_base/kwbimage.cfg | 168 ------------------------------ board/Marvell/openrd_base/openrd_base.c | 173 ------------------------------- board/Marvell/openrd_base/openrd_base.h | 46 -------- boards.cfg | 6 +- include/configs/openrd.h | 142 +++++++++++++++++++++++++ include/configs/openrd_base.h | 142 ------------------------- 11 files changed, 588 insertions(+), 588 deletions(-)
Quoted 10 lines
create mode 100644 board/Marvell/openrd/Makefile create mode 100644 board/Marvell/openrd/kwbimage.cfg create mode 100644
board/Marvell/openrd/openrd.ccreate mode 100644board/Marvell/openrd/openrd.hdelete mode 100644 board/Marvell/openrd_base/Makefile delete mode 100644 board/Marvell/openrd_base/kwbimage.cfg delete mode 100644board/Marvell/openrd_base/openrd_base.cdelete mode 100644board/Marvell/openrd_base/openrd_base.hcreate mode 100644include/configs/openrd.hdelete mode 100644include/configs/openrd_base.h
Since these are only renames, they should appear as such. Can you redo this one in the next patchset with git-format-patch option -M or -C in order for the renames to be detected as such and not presented as delete/create pairs?
Amicalement,
Signature · 1 line
Albert.
PATCH 1/3 Add definitions for OpenRD-Client and OpenRD-Ultimate
In reply to Clint AdamsLe 12/04/2011 18:09, Clint Adams a ?crit :
Quoted 6 lines
--- MAKEALL | 2 ++ board/Marvell/openrd_base/openrd_base.c | 6 ++++++ boards.cfg | 4 +++- include/configs/openrd_base.h | 14 +++++++++++++- 4 files changed, 24 insertions(+), 2 deletions(-)
This is a new version -- please add version in subject and provide patch history.
Amicalement,
Signature · 1 line
Albert.
PATCH 2/2 Initialize second PHY on OpenRD-Client and OpenRD-Ultimate.
In reply to Prafulla WadaskarQuoted 1 line · Prafulla Wadaskar
I have tested these patches and works for openRD-Base, certainly it may not work for ultimate and client since respective machine ids are not programmed.
I can't believe I forgot this part.
Quoted 1 line
May you please provide tuned version of these patches?
Sending with the MACH_TYPE fix and the file renames.
PATCH v2 1/4 Kirkwood: Rename openrd_base board files to openrd.
In reply to Prafulla WadaskarQuoted 8 lines · Prafulla Wadaskar
You can pass additional options here to identify your board uniquely out of several supported boards (to be coming) For ex:
(quoted diff) +2
-0+openrd_base arm arm926ejs openrd +Marvell Kirkwood openrd_common:BOARD_IS_OPENRD_BASEThis approach will help better way to add conditional code for other boards type
For more details refer syntax in the top of this file.
The following two patches use that method, without the file rename.
PATCH v2 2/4 Change OpenRD Base board identification string.
In reply to julian.pidancet at citrix.comFrom: Julian Pidancet <[email protected]>
Renamed from "Openrd_base" to "OpenRD-Base"
include/configs/openrd_base.h +1 -1
@@ -35,7 +35,7 @@/* * Version number information */ -#define CONFIG_IDENT_STRING "\nOpenRD_base" +#define CONFIG_IDENT_STRING "\nOpenRD-Base"/* Machine type */ #define MACH_TYPE_OPENRD MACH_TYPE_OPENRD_BASE
Signature · 1 line
Julian Pidancet
PATCH v2 2/4 Change OpenRD Base board identification string.
Quoted 22 lines
-----Original Message-----
From: Julian Pidancet [mailto:swaplinker at gmail.com] On Behalf Of julian.pidancet at citrix.com
Sent: Friday, March 25, 2011 2:19 PM
To: u-boot at lists.denx.de
Cc: tanmay.upadhyay at einfochips.com; Prafulla Wadaskar; Julian Pidancet
Subject: [PATCH v2 2/4] Change OpenRD Base board identification string.From: Julian Pidancet <[email protected]>
Renamed from "
Openrd_base" to "OpenRD-Base"Signed-off-by Julian Pidancet <[email protected]>include/configs/openrd_base.h +0
-0
include/configs/openrd_base.h line 39
Quoted 6 lines
include/configs/openrd_base.h +1
-1@@ -35,7 +35,7 @@/* * Version number information */ -#define CONFIG_IDENT_STRING "\nOpenRD_base" +#define CONFIG_IDENT_STRING "\nOpenRD-Base"
Ack
Regards..
Prafulla . .
PATCH v2 3/4 Add support for the Client variant of the OpenRD board.
In reply to julian.pidancet at citrix.comFrom: Julian Pidancet <[email protected]>
This patch takes care of initializing the second PHY of the OpenRD board.
create mode 100644 include/configs/openrd_client.h
MAKEALL +1 -0
@@ -361,6 +361,7 @@ LIST_ARM9=" \ omap5912osk \ omap730p2 \ openrd_base \ + openrd_client \ rd6281a \ sbc2410x \ scb9328 \
board/Marvell/openrd/openrd.c +17 -3
@@ -118,12 +118,11 @@ int board_init(void) }#ifdef CONFIG_RESET_PHY_R -/* Configure and enable MV88E1116 PHY */ -void reset_phy (void ) +/* Configure and enable MV88E1116/MV88E1121 PHY */ +void mv_phy_init (char *name) {u16 reg;u16 devadr; -char *name ="egiga0" ;if (miiphy_set_current_dev (name))return ;
@@ -150,4 +149,19 @@ void reset_phy(void) printf("88E1116 Initialized on %s\n", name); } + +void reset_phy (void ) +{ +mv_phy_init ("egiga0" ); + +#if (MACH_TYPE_OPENRD ==MACH_TYPE_OPENRD_CLIENT ) +/* Kirkwood ethernet driver is written with the assumption that in case +* of multiple PHYs, their addresses are consecutive. But unfortunately +* in case of OpenRD-Client, PHY addresses are not consecutive.*/ +miiphy_write ("egiga1" ,0xEE ,0xEE ,24 ); + +/* configure and initialize both PHY's */ +mv_phy_init ("egiga1" ); +#endif +}#endif /* CONFIG_RESET_PHY_R */
boards.cfg +1 -0
@@ -97,6 +97,7 @@ suen3 arm arm926ejs km_arm keymile guruplug arm arm926ejs - Marvell kirkwood mv88f6281gtw_ge arm arm926ejs - Marvell kirkwood openrd_base arm arm926ejs openrd Marvell kirkwood +openrd_client arm arm926ejs openrd Marvell kirkwood rd6281a arm arm926ejs - Marvell kirkwood sheevaplug arm arm926ejs - Marvell kirkwood dockstar arm arm926ejs - Seagate kirkwood
include/configs/openrd_client.h new file +44 -0
44 lines not on this page · raw message
Signature · 1 line
Julian Pidancet
PATCH v2 3/4 Add support for the Client variant of the OpenRD board.
Quoted 20 lines
-----Original Message-----
From: Julian Pidancet [mailto:swaplinker at gmail.com] On Behalf Of julian.pidancet at citrix.com
Sent: Friday, March 25, 2011 2:19 PM
To: u-boot at lists.denx.de
Cc: tanmay.upadhyay at einfochips.com; Prafulla Wadaskar; Julian Pidancet
Subject: [PATCH v2 3/4] Add support for the Client variant of the OpenRD board.From: Julian Pidancet <[email protected]>
This patch takes care of initializing the second PHY of the OpenRD board.
Signed-off-by Julian Pidancet <[email protected]>create mode 100644 include/configs/openrd_client.h
...snip...
Quoted 25 lines
include/configs/openrd_client.h new file +22
-0@@ -0,0 +1,44 @@ +/* +* See file CREDITS for list of people who contributed to this +* project. +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License as +* published by the Free Software Foundation; either version 2 of +* the License, or (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software +* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, +* MA 02110-1301 USA +*/ + +#ifndef _CONFIG_OPENRD_CLIENT_H +#define _CONFIG_OPENRD_CLIENT_H
include/configs/openrd_client.h line 32
Quoted 10 lines
include/configs/openrd_client.h new file +10
-0+ +#include <configs/openrd.h> + +/* +* Version number information +*/ +#define CONFIG_IDENT_STRING "\nOpenRD-Client" + +/* Machine type */ +#define MACH_TYPE_OPENRD MACH_TYPE_OPENRD_CLIENT
NAK for this
Regards..
Prafulla . .
PATCH v2 4/4 Add support for the Ultimate variant of the OpenRD board
In reply to julian.pidancet at citrix.comFrom: Julian Pidancet <[email protected]>
This patch adds proper initialization code for the two PHYs present on the board.
create mode 100644 include/configs/openrd_ultimate.h
MAKEALL +1 -0
@@ -362,6 +362,7 @@ LIST_ARM9=" \ omap730p2 \ openrd_base \ openrd_client \ + openrd_ultimate \ rd6281a \ sbc2410x \ scb9328 \
board/Marvell/openrd/openrd.c +3 -1
@@ -147,7 +147,7 @@ void mv_phy_init(char *name)/* reset the phy */ miiphy_reset (name, devadr); -printf ("88E1116 Initialized on %s\n" , name); +printf (PHY_NO " Initialized on %s\n" , name); }void reset_phy (void )
@@ -162,6 +162,8 @@ void reset_phy(void)/* configure and initialize both PHY's */ mv_phy_init ("egiga1" ); +#elif (MACH_TYPE_OPENRD ==MACH_TYPE_OPENRD_ULTIMATE ) +mv_phy_init ("egiga1" ); #endif }#endif /* CONFIG_RESET_PHY_R */
boards.cfg +1 -0
@@ -98,6 +98,7 @@ guruplug arm arm926ejs - Marvell mv88f6281gtw_ge arm arm926ejs - Marvell kirkwood openrd_base arm arm926ejs openrd Marvell kirkwood openrd_client arm arm926ejs openrd Marvell kirkwood +openrd_ultimate arm arm926ejs openrd Marvell kirkwood rd6281a arm arm926ejs - Marvell kirkwood sheevaplug arm arm926ejs - Marvell kirkwood dockstar arm arm926ejs - Seagate kirkwood
include/configs/openrd_ultimate.h new file +44 -0
44 lines not on this page · raw message
Signature · 1 line
Julian Pidancet
v2 cover Kirkwood: Add support for OpenRD-Client & OpenRD-Ultimate
In reply to julian.pidancet at citrix.comQuoted 3 lines · Julian Pidancet
A nice future improvement would be to add variant detection and configuration at run-time as suggested on the mailing-list in a recent email. So one could use the same binary for all board variants.
Does anyone know offhand how to do this? I have heard rumors of a GPIO method but I haven't found any details.
v2 cover Kirkwood: Add support for OpenRD-Client & OpenRD-Ultimate
Quoted 11 lines
-----Original Message-----
From: u-boot-bounces at lists.denx.de [mailto:u-boot-bounces at lists.denx.de] On Behalf Of Clint Adams
Sent: Saturday, March 26, 2011 3:32 AM
To: u-boot at lists.denx.de
Subject: Re: [U-Boot] [PATCH v2 0/4] Kirkwood: Add support for OpenRD- Client & OpenRD-UltimateJulian Pidancet wrote:
Quoted 8 lines
Quoted 1 line
A nice future improvement would be to add variant detection and
configuration
Quoted 1 line
at run-time as suggested on the mailing-list in a recent email. So one
could
Quoted 1 line
use the same binary for all board variants.
Does anyone know offhand how to do this? I have heard rumors of a GPIO method but I haven't found any details.
1. One possibility is to use some GPIOs and configure them on all board to detect the board version, read these GPIOs in the u-boot code and take board variant specific execution/configuration.
2. One can have similar approach keeping some data in separate EEPROM.
3. one can read availability of specific h/w on the board.
Of which #3 will be better but may not be suitable for all boards variant.
I personally do not like this method.
Since there is always chance to have wrong configuration.
I would always prefer to have build time configuration passing as per board variant.
Regards..
Prafulla . . .
v2 cover Kirkwood: Add support for OpenRD-Client & OpenRD-Ultimate
In reply to julian.pidancet at citrix.comJulian,
U-Boot is now running on my OpenRD-Ultimate board with these patches.
Thanks,
Harro Haan
v2 cover Kirkwood: Add support for OpenRD-Client & OpenRD-Ultimate
In reply to julian.pidancet at citrix.comHi Julian,
Le 25/03/2011 09:48, julian.pidancet at citrix.com a ?crit :
Quoted 5 lines
From: Julian Pidancet<[email protected]>
Kirkwood: Rename
openrd_baseboard files to openrd. Change OpenRD Base board identification string. Add support for the Client variant of the OpenRD board.
Just a remark: short commit message does not usually end with a period.
Apart from that, it works on my OpenRD Client.
Amicalement,
Signature · 1 line
Albert.