support for OpenRD-Client and OpenRD-Ultimate
A message that is not in the archive (sent off-list or not yet received): [email protected]
v3 cover support for OpenRD-Client and OpenRD-Ultimate
This patchset introduces support for Marvell OpenRD-Client and OpenRD-Ultimate boards.
Changes for v3:
- lengthen commit log for second PHY initialization patch
Changes for v2:
- 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 v3 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 v3 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 v3 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
--- 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 v3 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