Add support for LaCie NAS Network Space v2
v7 cover Add support for LaCie NAS Network Space v2
This patch series adds support for Network Space v2 board and parents.
Changes for v2:
- netconsole: restore NetOurIP check
- add entries to MAINTAINERS file
- move boards from root Makefile to boards.cfg
- move MACH_TYPE definition into netspace_v2.h
- remove CONFIG_SYS_HZ redefinition
- turn PHY initialization message into debug()
Changes for v3:
- drop patch for Macronix MX25L4005A
- rewrite patch "sf: disable write protection for Macronix flash", using the common spi flash code
- fix "Definitions" typo in mv-common.h
- netconsole: add a "/* Fall through */" comment before the NETCONS case label
Changes for v4:
- sf macronix: use spi_flash_cmd_write_enable()
- enhance commit message for patch "Add support for Network Space v2"
Changes for v5:
- add a changelog per patch
Changes for v6:
- drop accepted patches
- enable device tree support for netspace_v2
- clean some "#define" in netspace_v2.h
- enhance commit message for patch "Add support for Network Space v2":
provide description URL and mention SoC family
- rebase patch "Add support for Network Space v2" against u-boot-{arm,marvell}/master branches
- enhance commit message for patch "netconsole: remove `serverip' check"
Changes for v7:
- rebase patch "Add support for Network Space v2" against u-boot-marvell branch
Simon Guinot (2):
netconsole: remove `serverip' check
Add support for Network Space v2
MAINTAINERS | 6 + board/LaCie/netspace_v2/Makefile | 49 ++++++++++ board/LaCie/netspace_v2/kwbimage.cfg | 162 +++++++++++++++++++++++++++++++++ board/LaCie/netspace_v2/netspace_v2.c | 144 +++++++++++++++++++++++++++++ board/LaCie/netspace_v2/netspace_v2.h | 39 ++++++++ boards.cfg | 3 + include/configs/netspace_v2.h | 153 +++++++++++++++++++++++++++++++ net/net.c | 3 +- 8 files changed, 558 insertions(+), 1 deletions(-) create mode 100644 board/LaCie/netspace_v2/Makefile create mode 100644 board/LaCie/netspace_v2/kwbimage.cfg create mode 100644 board/LaCie/netspace_v2/netspace_v2.c create mode 100644 board/LaCie/netspace_v2/netspace_v2.h create mode 100644 include/configs/netspace_v2.h
PATCH v7 1/2 netconsole: remove `serverip' check
This patch allows to enable the netconsole even if `serverip' is not set.
Because netconsole use the environment variable ncip' to configure the destination IP, serverip' don't need to be defined.
---
Changes for v2:
- restore NetOurIP check
Changes for v3:
- add a "/* Fall through */" comment before the NETCONS case label
Changes for v4,5: none
Changes for v6:
- enhance commit message
Changes for v7: none
net/net.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
net/net.c +2 -1
@@ -1718,7 +1718,6 @@ static int net_check_prereq (proto_t protocol)#if defined(CONFIG_CMD_NFS )case NFS :#endif -case NETCONS :case TFTP :if (NetServerIP ==0 ) {puts ("*** ERROR: `serverip' not set\n" );
@@ -1728,7 +1727,9 @@ static int net_check_prereq (proto_t protocol) defined(CONFIG_CMD_DNS) common:#endif +/* Fall through */ +case NETCONS :if (NetOurIP ==0 ) {puts ("*** ERROR: `ipaddr' not set\n" );return (1 );
Signature · 1 line
1.6.3.1
PATCH v7 1/2 netconsole: remove `serverip' check
Quoted 25 lines
-----Original Message-----
From: Simon Guinot [mailto:simon.guinot at sequanux.org]
Sent: Thursday, May 12, 2011 3:19 PM
To: Prafulla Wadaskar
Cc: Albert ARIBAUD; u-boot at lists.denx.de; Simon Guinot
Subject: [PATH v7 1/2] netconsole: remove `serverip' checkThis patch allows to enable the netconsole even if `serverip' is not set.
Because netconsole use the environment variable
ncip' to configure the destination IP,serverip' don't need to be defined.Signed-off-by Simon Guinot <[email protected]>---
Changes for v2:
- restore NetOurIP checkChanges for v3:
- add a "/* Fall through */" comment before the NETCONS case labelChanges for v4,5: none
Quoted 7 lines
Changes for v6:
- enhance commit messageChanges for v7: none
net/net.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
This patch looks to be independent.
I don't have any comments for this.
Should be applied to u-boot-net.git.
Hi Ben/Wolfgang
Can you pls review/comment/pull it ?
Regards..
Prafulla . . .
PATCH v7 1/2 netconsole: remove `serverip' check
Hi Prafulla,
Quoted 28 lines · Prafulla Wadaskar
Quoted 28 lines
-----Original Message-----
From: Simon Guinot [mailto:simon.guinot at sequanux.org]
Sent: Thursday, May 12, 2011 3:19 PM
To: Prafulla Wadaskar
Cc: Albert ARIBAUD; u-boot at lists.denx.de; Simon Guinot
Subject: [PATH v7 1/2] netconsole: remove `serverip' checkThis patch allows to enable the netconsole even if `serverip' is not set.
Because netconsole use the environment variable
ncip' to configure the destination IP,serverip' don't need to be defined.Signed-off-by Simon Guinot <[email protected]>---
Changes for v2:
- restore NetOurIP checkChanges for v3:
- add a "/* Fall through */" comment before the NETCONS case labelChanges for v4,5: none
Changes for v6:
- enhance commit message
Quoted 8 lines
Quoted 4 lines
Changes for v7: none
net/net.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)This patch looks to be independent.
I don't have any comments for this.
Should be applied to u-boot-net.git.
The patch itself is independent but the Network Space v2 board setup rely on it. Without this patch, the netconsole is not usable and the netconsole is needed to update the stock U-Boot.
IMHO, this two patches should go in the same tree, to avoid a breakage situation.
Regards,
Simon
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
Url : http://lists.denx.de/pipermail/u-boot/attachments/20110512/b3bfb004/attachment.pgp
PATCH v7 1/2 netconsole: remove `serverip' check
Quoted 51 lines
-----Original Message-----
From: Simon Guinot [mailto:simon at sequanux.org]
Sent: Thursday, May 12, 2011 5:25 PM
To: Prafulla Wadaskar
Cc: Simon Guinot; Albert ARIBAUD; u-boot at lists.denx.de; Wolfgang Denk; Ashish Karkare; Prabhanjan Sarnaik
Subject: Re: [PATH v7 1/2] netconsole: remove `serverip' checkHi Prafulla,
Quoted 9 lines · Prafulla Wadaskar
Quoted 9 lines
-----Original Message-----
From: Simon Guinot [mailto:simon.guinot at sequanux.org]
Sent: Thursday, May 12, 2011 3:19 PM
To: Prafulla Wadaskar
Cc: Albert ARIBAUD; u-boot at lists.denx.de; Simon Guinot
Subject: [PATH v7 1/2] netconsole: remove `serverip' checkQuoted 4 lines
Quoted 4 lines
This patch allows to enable the netconsole even if `serverip' is not set.
Because netconsole use the environment variable `ncip' to configure
the
Quoted 15 lines
Quoted 15 lines
destination IP, `serverip' don't need to be defined.
Signed-off-by Simon Guinot <[email protected]>---
Changes for v2:
- restore NetOurIP checkChanges for v3:
- add a "/* Fall through */" comment before the NETCONS case labelChanges for v4,5: none
Changes for v6:
- enhance commit messageQuoted 8 lines
Quoted 4 lines
Changes for v7: none
net/net.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)This patch looks to be independent.
I don't have any comments for this.
Should be applied to u-boot-net.git.
Quoted 6 lines
The patch itself is independent but the Network Space v2 board setup rely on it. Without this patch, the netconsole is not usable and the netconsole is needed to update the stock U-Boot.
IMHO, this two patches should go in the same tree, to avoid a breakage situation.
I understand the situation, at least we need acked by respective custodians.
Copying Wolfgang for the same
Regards..
Prafulla . .
PATCH v7 1/2 netconsole: remove `serverip' check
In reply to Simon GuinotDear Simon Guinot,
Quoted 11 lines · In message <[email protected]> you wrote:
Quoted 4 lines
This patch looks to be independent.
I don't have any comments for this.
Should be applied to u-boot-net.git.The patch itself is independent but the Network Space v2 board setup rely on it. Without this patch, the netconsole is not usable and the netconsole is needed to update the stock U-Boot.
IMHO, this two patches should go in the same tree, to avoid a breakage situation.
No. This will go into master. Soon.
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 Yes, it is written. Good shall always destroy evil. -- Sirah the Yang, "The Omega Glory", stardate unknown
PATCH v7 1/2 netconsole: remove `serverip' check
In reply to Prafulla WadaskarQuoted 2 lines · On Thursday, May 12, 2011 06:17:24 Prafulla Wadaskar wrote:
Hi Ben/Wolfgang
Can you pls review/comment/pull it ?
Ben is no longer here, and the u-boot-net tree is dead. Wolfgang is currently covering things.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20110512/fa767e3b/attachment.pgp
Wolfgang Denk
AppliedPATCH v7 1/2 netconsole: remove `serverip' check
In reply to Simon GuinotDear Simon Guinot,
Quoted 15 lines · In message <[email protected]> you…
This patch allows to enable the netconsole even if `serverip' is not set.
Because netconsole use the environment variable
ncip' to configure the destination IP,serverip' don't need to be defined.Signed-off-by Simon Guinot <[email protected]>---
Changes for v2:
- restore NetOurIP checkChanges for v3:
- add a "/* Fall through */" comment before the NETCONS case labelChanges for v4,5: none
Quoted 7 lines
Changes for v6:
- enhance commit messageChanges for v7: none
net/net.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
Applied, thanks.
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 In an organization, each person rises to the level of his own incom- petency - The Peter Principle
PATCH v7 1/2 netconsole: remove `serverip' check
Quoted 33 lines
-----Original Message-----
From: Wolfgang Denk [mailto:wd at denx.de]
Sent: Thursday, May 12, 2011 10:42 PM
To: Simon Guinot
Cc: Prafulla Wadaskar; u-boot at lists.denx.de
Subject: Re: [U-Boot] [PATH v7 1/2] netconsole: remove `serverip' checkDear Simon Guinot,
In message <[email protected]>
Quoted 1 line · you
This patch allows to enable the netconsole even if `serverip' is not
set.
Quoted 2 lines
Because netconsole use the environment variable `ncip' to configure
the
Quoted 15 lines
destination IP, `serverip' don't need to be defined.
Signed-off-by Simon Guinot <[email protected]>---
Changes for v2:
- restore NetOurIP checkChanges for v3:
- add a "/* Fall through */" comment before the NETCONS case labelChanges for v4,5: none
Changes for v6:
- enhance commit message
Quoted 6 lines
Quoted 4 lines
Changes for v7: none
net/net.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)Applied, thanks.
Hi Albert
Since this patch is applied, Simon can post only one patch. May you please pull it in u-boot-arm.git ?
Regards..
Prafulla . .
PATCH v7 2/2 Add support for Network Space v2
In reply to Simon GuinotThis patch add support for the Network Space v2 board and parents, based on the Marvell Kirkwood 6281 SoC. This include Network Space (Max) v2 and Internet Space v2.
Additional information is available at:
http://lacie-nas.org/doku.php?id=network_space_v2
---
Changes for v2:
- add entries to MAINTAINERS file
- move boards from root Makefile to boards.cfg
- move MACH_TYPE definition into netspace_v2.h
- remove CONFIG_SYS_HZ redefinition
- turn PHY initialization message into debug()
Changes for v3: none
Changes for v4:
- enhance commit message: add SoC information
Changes for v5: none
Changes for v6:
- enable device tree support
- clean some "#define" in netspace_v2.h
- enhance commit message: provide description URL and mention SoC family
- rebase against u-boot-{arm,marvell}/master branches
Changes for v7:
- rebase against u-boot-marvell/master branch
MAINTAINERS | 6 + board/LaCie/netspace_v2/Makefile | 49 ++++++++++ board/LaCie/netspace_v2/kwbimage.cfg | 162 +++++++++++++++++++++++++++++++++ board/LaCie/netspace_v2/netspace_v2.c | 144 +++++++++++++++++++++++++++++ board/LaCie/netspace_v2/netspace_v2.h | 39 ++++++++ boards.cfg | 3 + include/configs/netspace_v2.h | 153 +++++++++++++++++++++++++++++++ 7 files changed, 556 insertions(+), 0 deletions(-) create mode 100644 board/LaCie/netspace_v2/Makefile create mode 100644 board/LaCie/netspace_v2/kwbimage.cfg create mode 100644 board/LaCie/netspace_v2/netspace_v2.c create mode 100644 board/LaCie/netspace_v2/netspace_v2.h create mode 100644 include/configs/netspace_v2.h
MAINTAINERS +6 -0
@@ -645,6 +645,12 @@ Sedji Gaouaou<[email protected]> at91sam9g10ek ARM926EJS (AT91SAM9G10 SoC) at91sam9m10g45ek ARM926EJS (AT91SAM9G45 SoC) +Simon Guinot <[email protected]> + + inetspace_v2 ARM926EJS (Kirkwood SoC) + netspace_v2 ARM926EJS (Kirkwood SoC) + netspace_max_v2 ARM926EJS (Kirkwood SoC) + Marius Gr?ger <[email protected]> impa7 ARM720T (EP7211)
board/LaCie/netspace_v2/Makefile new file +49 -0
49 lines not on this page · raw message
board/LaCie/netspace_v2/kwbimage.cfg new file +162 -0
162 lines not on this page · raw message
board/LaCie/netspace_v2/netspace_v2.c new file +144 -0
144 lines not on this page · raw message
board/LaCie/netspace_v2/netspace_v2.h new file +39 -0
@@ -0,0 +1,39 @@ +/* +* Copyright (C) 2011 Simon Guinot <[email protected]> +* +* Based on Kirkwood support: +* (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. +*/ + +#ifndef NETSPACE_V2_H +#define NETSPACE_V2_H + +#define NETSPACE_V2_OE_LOW 0x06004000 +#define NETSPACE_V2_OE_HIGH 0x00000031 +#define NETSPACE_V2_OE_VAL_LOW 0x10030000 +#define NETSPACE_V2_OE_VAL_HIGH 0x00000000 + +/* PHY related */ +#define MV88E1116_LED_FCTRL_REG 10 +#define MV88E1116_CPRSP_CR3_REG 21 +#define MV88E1116_MAC_CTRL_REG 21 +#define MV88E1116_PGADR_REG 22 +#define MV88E1116_RGMII_TXTM_CTRL (1 << 4) +#define MV88E1116_RGMII_RXTM_CTRL (1 << 5) + +#endif /* NETSPACE_V2_H */
boards.cfg +3 -0
@@ -104,6 +104,9 @@ davinci_schmoogie arm arm926ejs schmoogie davinci davinci_sffsdr arm arm926ejs sffsdr davinci davinci davinci_sonata arm arm926ejs sonata davinci davinci suen3 arm arm926ejs km_arm keymile kirkwood +inetspace_v2 arm arm926ejs netspace_v2 LaCie kirkwood netspace_v2:INETSPACE_V2 +netspace_v2 arm arm926ejs netspace_v2 LaCie kirkwood netspace_v2:NETSPACE_V2 +netspace_max_v2 arm arm926ejs netspace_v2 LaCie kirkwood netspace_v2:NETSPACE_MAX_V2 guruplug arm arm926ejs - Marvell kirkwood mv88f6281gtw_ge arm arm926ejs - Marvell kirkwood openrd_base arm arm926ejs openrd Marvell kirkwood openrd:BOARD_IS_OPENRD_BASE
include/configs/netspace_v2.h new file +153 -0
153 lines not on this page · raw message
Signature · 1 line
1.6.3.1
PATCH v7 2/2 Add support for Network Space v2
Quoted 64 lines
-----Original Message-----
From: Simon Guinot [mailto:simon.guinot at sequanux.org]
Sent: Thursday, May 12, 2011 3:19 PM
To: Prafulla Wadaskar
Cc: Albert ARIBAUD; u-boot at lists.denx.de; Simon Guinot
Subject: [PATH v7 2/2] Add support for Network Space v2This patch add support for the Network Space v2 board and parents, based on the Marvell Kirkwood 6281 SoC. This include Network Space (Max) v2 and Internet Space v2.
Additional information is available at:
http://lacie-nas.org/doku.php?id=network_space_v2Signed-off-by Simon Guinot <[email protected]>---
Changes for v2:
- add entries toMAINTAINERSfile
- move boards from rootMakefileto boards.cfg
- moveMACH_TYPEdefinition intonetspace_v2.h
- removeCONFIG_SYS_HZredefinition
- turn PHY initialization message intodebug()Changes for v3: none
Changes for v4:
- enhance commit message: add SoC informationChanges for v5: none
Changes for v6:
- enable device tree support
- clean some "#define" innetspace_v2.h
- enhance commit message: provide description URL and mention SoC family
- rebase against u-boot-{arm,marvell}/master branchesChanges for v7:
- rebase against u-boot-marvell/master branchMAINTAINERS | 6 + board/LaCie/netspace_v2/Makefile | 49 ++++++++++ board/LaCie/netspace_v2/kwbimage.cfg | 162 +++++++++++++++++++++++++++++++++ board/LaCie/netspace_v2/netspace_v2.c | 144 +++++++++++++++++++++++++++++ board/LaCie/netspace_v2/netspace_v2.h | 39 ++++++++ boards.cfg | 3 + include/configs/netspace_v2.h | 153 +++++++++++++++++++++++++++++++ 7 files changed, 556 insertions(+), 0 deletions(-) create mode 100644 board/LaCie/netspace_v2/Makefile create mode 100644 board/LaCie/netspace_v2/kwbimage.cfg create mode 100644 board/LaCie/netspace_v2/netspace_v2.c create mode 100644 board/LaCie/netspace_v2/netspace_v2.h create mode 100644 include/configs/netspace_v2.hMAINTAINERS +0
-0
MAINTAINERS Sedji Gaouaou<[email protected]> · line 652
Quoted 8 lines
MAINTAINERS +5
-0@@ -645,6 +645,12 @@ Sedji Gaouaou<[email protected]> at91sam9g10ek ARM926EJS (AT91SAM9G10 SoC) at91sam9m10g45ek ARM926EJS (AT91SAM9G45 SoC) +Simon Guinot <[email protected]> + + inetspace_v2 ARM926EJS (Kirkwood SoC) + netspace_v2 ARM926EJS (Kirkwood SoC) + netspace_max_v2 ARM926EJS (Kirkwood SoC)
You are adding three boards support, the subject does not say the same.
Quoted 366 lines
MAINTAINERS +1
-0+ Marius Gr?ger <[email protected]> impa7 ARM720T (EP7211)board/LaCie/netspace_v2/Makefile new file +42
-0@@ -0,0 +1,49 @@ +# +# Copyright (C) 2011 Simon Guinot <[email protected]> +# +# Based on Kirkwood support: +# (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. +# + +include $(TOPDIR)/config.mk + +LIB = $(obj)lib$(BOARD).o + +COBJS := netspace_v2.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 + +#########################################################################
board/LaCie/netspace_v2/Makefile new file +7
-0+ +# defines $(obj).depend target +include $(SRCTREE)/rules.mk + +sinclude $(obj).depend + +#########################################################################
board/LaCie/netspace_v2/kwbimage.cfg new file +50
-0@@ -0,0 +1,162 @@ +# +# Copyright (C) 2011 Simon Guinot <[email protected]> +# +# Based on Kirkwood support: +# (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. +# +# Refer docs/README.kwimage for more details about how-to configure +# and create kirkwood boot image +# + +# Boot Media configurations +BOOT_FROM spi # Boot from SPI flash + +# SOC registers configuration using bootrom header extension +# Maximum KWBIMAGE_MAX_CONFIG configurations allowed + +# Configure RGMII-0 interface pad voltage to 1.8V +DATA 0xFFD100e0 0x1B1B1B9B + +#Dram initalization for SINGLE x16 CL=5 @ 400MHz +DATA 0xFFD01400 0x43000618 # DDR Configuration register +# bit13-0: 0xa00 (2560 DDR2 clks refresh rate) +# bit23-14: zero +# bit24: 1= enable exit self refresh mode on DDR access +# bit25: 1 required +# bit29-26: zero +# bit31-30: 01 + +DATA 0xFFD01404 0x35143000 # DDR Controller Control Low +# bit 4: 0=addr/cmd in smame cycle +# bit 5: 0=clk is driven during self refresh, we don't care for APX +# bit 6: 0=use recommended falling edge of clk for addr/cmd +# bit14: 0=input buffer always powered up +# bit18: 1=cpu lock transaction enabled +# bit23-20: 5=recommended value for CL=5 and STARTBURST_DEL disabledbit31=0
+# bit27-24: 8= CL+3, STARTBURST sample stages, for freqs 400MHz, unbuffered DIMMboard/LaCie/netspace_v2/kwbimage.cfg new file +72
-0+# bit30-28: 3 required +# bit31: 0=no additional STARTBURST delay + +DATA 0xFFD01408 0x11012228 # DDR Timing (Low) (active cycles value +1) +# bit7-4: TRCD +# bit11- 8: TRP +# bit15-12: TWR +# bit19-16: TWTR +# bit20: TRAS msb +# bit23-21: 0x0 +# bit27-24: TRRD +# bit31-28: TRTP + +DATA 0xFFD0140C 0x00000A19 # DDR Timing (High) +# bit6-0: TRFC +# bit8-7: TR2R +# bit10-9: TR2W +# bit12-11: TW2W +# bit31-13: zero required + +DATA 0xFFD01410 0x0000CCCC # DDR Address Control +# bit1-0: 01, Cs0width=x16 +# bit3-2: 11, Cs0size=1Gb +# bit5-4: 00, Cs2width=nonexistent +# bit7-6: 00, Cs1size =nonexistent +# bit9-8: 00, Cs2width=nonexistent +# bit11-10: 00, Cs2size =nonexistent +# bit13-12: 00, Cs3width=nonexistent +# bit15-14: 00, Cs3size =nonexistent +# bit16: 0, Cs0AddrSel +# bit17: 0, Cs1AddrSel +# bit18: 0, Cs2AddrSel +# bit19: 0, Cs3AddrSel +# bit31-20: 0 required + +DATA 0xFFD01414 0x00000000 # DDR Open Pages Control +# bit0: 0, OpenPage enabled +# bit31-1: 0 required + +DATA 0xFFD01418 0x00000000 # DDR Operation +# bit3-0: 0x0, DDR cmd +# bit31-4: 0 required + +DATA 0xFFD0141C 0x00000632 # DDR Mode +# bit2-0: 2, BurstLen=2 required +# bit3: 0, BurstType=0 required +# bit6-4: 4, CL=5 +# bit7: 0, TestMode=0 normal +# bit8: 0, DLL reset=0 normal +# bit11-9: 6, auto-precharge write recovery ???????????? +# bit12: 0, PD must be zero +# bit31-13: 0 required + +DATA 0xFFD01420 0x00000004 # DDR Extended Mode +# bit0: 0, DDR DLL enabled +# bit1: 1, DDR drive strenght reduced +# bit2: 1, DDR ODT control lsd enabled +# bit5-3: 000, required +# bit6: 1, DDR ODT control msb, enabled +# bit9-7: 000, required +# bit10: 0, differential DQS enabled +# bit11: 0, required +# bit12: 0, DDR output buffer enabled +# bit31-13: 0 required + +DATA 0xFFD01424 0x0000F07F # DDR Controller Control High +# bit2-0: 111, required +# bit3 : 1 , MBUS Burst Chop disabled +# bit6-4: 111, required +# bit7 : 1 , D2P Latency enabled +# bit8 : 1 , add writepath sample stage, must be 1 for DDR freq >=300MHz
board/LaCie/netspace_v2/kwbimage.cfg new file +40
-0+# bit9 : 0 , no half clock cycle addition to dataout +# bit10 : 0 , 1/4 clock cycle skew enabled for addr/ctl signals +# bit11 : 0 , 1/4 clock cycle skew disabled for write mesh +# bit15-12: 1111 required +# bit31-16: 0 required + +DATA 0xFFD01428 0x00085520 # DDR2 ODT Read Timing (default values) +DATA 0xFFD0147C 0x00008552 # DDR2 ODT Write Timing (default values) + +DATA 0xFFD01500 0x00000000 # CS[0]n Base address to 0x0 +DATA 0xFFD01504 0x0FFFFFF1 # CS[0]n Size +# bit0: 1, Window enabled +# bit1: 0, Write Protect disabled +# bit3-2: 00, CS0 hit selected +# bit23-4: ones, required +# bit31-24: 0x07, Size (i.e. 128MB) + +DATA 0xFFD0150C 0x00000000 # CS[1]n Size, window disabled +DATA 0xFFD01514 0x00000000 # CS[2]n Size, window disabled +DATA 0xFFD0151C 0x00000000 # CS[3]n Size, window disabled + +DATA 0xFFD01494 0x00010000 # DDR ODT Control (Low) +# bit3-0: 1, ODT0Rd, MODT[0] asserted during read from DRAM CS0 +# bit19-16:1, ODT0Wr, MODT[0] asserted during write to DRAM CS0 + +DATA 0xFFD01498 0x00000000 # DDR ODT Control (High) +# bit1-0: 00, ODT0 controlled by ODT Control (low) register above +# bit3-2: 01, ODT1 active NEVER! +# bit31-4: zero, required + +DATA 0xFFD0149C 0x0000E40F # CPU ODT Control +# bit3-0: 1, ODT0Rd, Internal ODT asserted during read from DRAM bank0 +# bit7-4: 1, ODT0Wr, Internal ODT asserted during write to DRAM bank0 +# bit11-10:1, DQ_ODTSel. ODT select turned on + +DATA 0xFFD01480 0x00000001 # DDR Initialization Control +#bit0=1, enable DDR init upon this register write + +# End of Header extension +DATA 0x0 0x0board/LaCie/netspace_v2/netspace_v2.c new file +124
-0@@ -0,0 +1,144 @@ +/* +* Copyright (C) 2011 Simon Guinot <[email protected]> +* +* Based on Kirkwood support: +* (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. +*/ + +#include <common.h> +#include <miiphy.h> +#include <netdev.h> +#include <command.h> +#include <asm/arch/kirkwood.h> +#include <asm/arch/mpp.h> +#include <asm/arch/gpio.h> +#include "netspace_v2.h" + +DECLARE_GLOBAL_DATA_PTR ; + +int board_early_init_f (void ) +{ +/* Gpio configuration */ +kw_config_gpio (NETSPACE_V2_OE_VAL_LOW ,NETSPACE_V2_OE_VAL_HIGH , +NETSPACE_V2_OE_LOW ,NETSPACE_V2_OE_HIGH ); + +/* Multi-Purpose Pins Functionality configuration */ +u32 kwmpp_config[] = { + MPP0_SPI_SCn, +MPP1_SPI_MOSI , +MPP2_SPI_SCK , +MPP3_SPI_MISO , +MPP4_NF_IO6 , +MPP5_NF_IO7 , + MPP6_SYSRST_OUTn, +MPP7_GPO ,/* Fan speed (bit 1) */ +MPP8_TW_SDA , +MPP9_TW_SCK , +MPP10_UART0_TXD , +MPP11_UART0_RXD , +MPP12_GPO ,/* Red led */ +MPP14_GPIO ,/* USB fuse */ +MPP16_GPIO ,/* SATA 0 power */ +MPP17_GPIO ,/* SATA 1 power */ +MPP18_NF_IO0 , +MPP19_NF_IO1 , + MPP20_SATA1_ACTn, + MPP21_SATA0_ACTn, +MPP22_GPIO ,/* Fan speed (bit 0) */ +MPP23_GPIO ,/* Fan power */ +MPP24_GPIO ,/* USB mode select */ +MPP25_GPIO ,/* Fan rotation fail */ +MPP26_GPIO ,/* USB vbus-in detection */ +MPP28_GPIO ,/* USB enable vbus-out */ +MPP29_GPIO ,/* Blue led (slow register) */ +MPP30_GPIO ,/* Blue led (command register) */ +MPP31_GPIO ,/* Board power off */ +MPP32_GPIO ,/* Button (0 = Released, 1 = Pushed) */ +MPP33_GPIO ,/* Fan speed (bit 2) */ +0 + }; +kirkwood_mpp_conf (kwmpp_config); + +return 0 ; +} + +int board_init (void ) +{ +/* Machine number */ + gd->bd->bi_arch_number =CONFIG_MACH_TYPE ; + +/* Boot parameters address */ + gd->bd->bi_boot_params =kw_sdram_bar (0 ) +0x100 ; + +return 0 ; +} + +void mv_phy_88e1116_init (char *name) +{ +u16 reg; +u16 devadr; + +if (miiphy_set_current_dev (name)) +return ; + +/* command to read PHY dev address */ +if (miiphy_read (name,0xEE ,0xEE , (u16 *) &devadr)) { +printf ("Err..(%s) could not read PHY dev address\n" , __func__); +return ; + } + +/* +* Enable RGMII delay on Tx and Rx for CPU port +* Ref: sec 4.7.2 of chip datasheet +*/ +miiphy_write (name, devadr,MV88E1116_PGADR_REG ,2 ); +miiphy_read (name, devadr,MV88E1116_MAC_CTRL_REG , ®); + reg |= (MV88E1116_RGMII_RXTM_CTRL |MV88E1116_RGMII_TXTM_CTRL ); +miiphy_write (name, devadr,MV88E1116_MAC_CTRL_REG , reg); +miiphy_write (name, devadr,MV88E1116_PGADR_REG ,0 ); + +/* reset the phy */ +if (miiphy_read (name, devadr,MII_BMCR , ®) !=0 ) { +printf ("Err..(%s) PHY status read failed\n" , __func__); +return ; + } +if (miiphy_write (name, devadr,MII_BMCR , reg |0x8000 ) !=0 ) { +printf ("Err..(%s) PHY reset failed\n" , __func__); +return ; + } +
board/LaCie/netspace_v2/netspace_v2.c line 134
Quoted 10 lines
board/LaCie/netspace_v2/netspace_v2.c new file +10
-0+debug ("88E1116 Initialized on %s\n" , name); +} + +/* Configure and initialize PHY */ +void reset_phy (void ) +{ +mv_phy_88e1116_init ("egiga0" ); +} + +#define NETSPACE_V2_GPIO_BUTTON 32
How about defining this in header file ?
Quoted 104 lines
board/LaCie/netspace_v2/netspace_v2.c new file +4
-0+ +/* Return GPIO button status */ +static int +do_read_button(cmd_tbl_t *cmdtp, int flag, int argc, char * constargv[])
board/LaCie/netspace_v2/netspace_v2.c new file +6
-0+{ +return kw_gpio_get_value (NETSPACE_V2_GPIO_BUTTON ); +} + +U_BOOT_CMD (button,1 ,1 , do_read_button, +"Return GPIO button status 0=off 1=on" ,"" );board/LaCie/netspace_v2/netspace_v2.h new file +39
-0@@ -0,0 +1,39 @@ +/* +* Copyright (C) 2011 Simon Guinot <[email protected]> +* +* Based on Kirkwood support: +* (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. +*/ + +#ifndef NETSPACE_V2_H +#define NETSPACE_V2_H + +#define NETSPACE_V2_OE_LOW 0x06004000 +#define NETSPACE_V2_OE_HIGH 0x00000031 +#define NETSPACE_V2_OE_VAL_LOW 0x10030000 +#define NETSPACE_V2_OE_VAL_HIGH 0x00000000 + +/* PHY related */ +#define MV88E1116_LED_FCTRL_REG 10 +#define MV88E1116_CPRSP_CR3_REG 21 +#define MV88E1116_MAC_CTRL_REG 21 +#define MV88E1116_PGADR_REG 22 +#define MV88E1116_RGMII_TXTM_CTRL (1 << 4) +#define MV88E1116_RGMII_RXTM_CTRL (1 << 5) + +#endif /* NETSPACE_V2_H */ boards.cfg +0
-0@@ -104,6 +104,9 @@ davinci_schmoogie arm arm926ejsschmoogie davinci
davinci_sffsdrarm arm926ejs sffsdr
davinci davinci
davinci_sonataarm arm926ejs sonata
davinci davinci
suen3 arm arm926ejskm_arm
keymile kirkwood
+inetspace_v2 arm arm926ejsnetspace_v2
LaCie kirkwood netspace_v2:INETSPACE_V2
+netspace_v2 arm arm926ejsnetspace_v2
LaCie kirkwood netspace_v2:NETSPACE_V2
+netspace_max_v2 arm arm926ejsnetspace_v2
LaCie kirkwood netspace_v2:NETSPACE_MAX_V2
guruplug arm arm926ejs -
Marvell kirkwood
mv88f6281gtw_gearm arm926ejs -
Marvell kirkwood
openrd_basearm arm926ejs openrd
Marvell kirkwood openrd:BOARD_IS_OPENRD_BASEinclude/configs/netspace_v2.h new file +16
-0@@ -0,0 +1,153 @@ +/* +* Copyright (C) 2011 Simon Guinot <[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. +*/
include/configs/netspace_v2.h line 26
Quoted 10 lines
include/configs/netspace_v2.h new file +10
-0+ +#ifndef _CONFIG_NETSPACE_V2_H +#define _CONFIG_NETSPACE_V2_H + +/* +* Machine number definition +*/ +#if defined(CONFIG_INETSPACE_V2 ) +#define CONFIG_MACH_TYPE MACH_TYPE_INETSPACE_V2 +#define CONFIG_IDENT_STRING " LaCie Internet Space v2"
Ident strings defined for each board are very long, can you use short names? The console logs with such long ident looks ugly.
include/configs/netspace_v2.h line 33
Quoted 7 lines
include/configs/netspace_v2.h new file +7
-0+#elif defined(CONFIG_NETSPACE_V2 ) +#define CONFIG_MACH_TYPE MACH_TYPE_NETSPACE_V2 +#define CONFIG_IDENT_STRING " LaCie Network Space v2" +#elif defined(CONFIG_NETSPACE_MAX_V2 ) +#define CONFIG_MACH_TYPE MACH_TYPE_NETSPACE_MAX_V2 +#define CONFIG_IDENT_STRING " LaCie Network Space Max v2" +#endif
There should be #elif for third board and #error for #else part
Quoted 16 lines
include/configs/netspace_v2.h new file +16
-0+ +/* +* High Level Configuration Options (easy to change) +*/ +#define CONFIG_FEROCEON_88FR131 /* CPU Core subversion */ +#define CONFIG_KIRKWOOD /* SOC Family Name */ +#define CONFIG_KW88F6281 /* SOC Name */ +#define CONFIG_SKIP_LOWLEVEL_INIT /* disable board lowlevel_init */ + +/* +* Commands configuration +*/ +#define CONFIG_SYS_NO_FLASH /* Declare no flash (NOR/SPI) */ +#include <config_cmd_default.h> +#define CONFIG_CMD_ENV +#define CONFIG_CMD_DHCP
include/configs/netspace_v2.h line 59
Quoted 10 lines
include/configs/netspace_v2.h new file +10
-0+#define CONFIG_CMD_PING +#define CONFIG_CMD_SF +#define CONFIG_CMD_I2C +#define CONFIG_CMD_IDE +#define CONFIG_CMD_USB + +/* +* Core clock definition. +*/ +#define CONFIG_SYS_TCLK 166000000/* 166MHz */
This is not needed, defined in ..arch-kirkwood/kw88f6xxx.h
Quoted 38 lines
include/configs/netspace_v2.h new file +38
-0+ +/* +* mv-common.h should be defined after CMD configs since it used them +* to enable certain macros +*/ +#define CONFIG_NR_DRAM_BANKS 2 +#include "mv-common.h" + +/* Remove or override few declarations from mv-common.h */ +#undef CONFIG_RBTREE +#undef CONFIG_ENV_SPI_MAX_HZ +#undef CONFIG_SYS_IDE_MAXBUS +#undef CONFIG_SYS_IDE_MAXDEVICE +#undef CONFIG_SYS_PROMPT +#define CONFIG_ENV_SPI_MAX_HZ 20000000/* 20Mhz */ +#define CONFIG_SYS_IDE_MAXBUS 1 +#define CONFIG_SYS_IDE_MAXDEVICE 1 +#define CONFIG_SYS_PROMPT "ns2> " + +/* +* Ethernet Driver configuration +*/ +#ifdef CONFIG_CMD_NET +#define CONFIG_MVGBE_PORTS {1, 0}/* enable port 0 only */ +#define CONFIG_NETCONSOLE +#endif + +/* +* SATA Driver configuration +*/ +#ifdef CONFIG_MVSATA_IDE +#define CONFIG_SYS_ATA_IDE0_OFFSET MV_SATA_PORT0_OFFSET +/* Network Space Max v2 use 2 SATA ports */ +#ifdef CONFIG_NETSPACE_MAX_V2 +#define CONFIG_SYS_ATA_IDE1_OFFSET MV_SATA_PORT1_OFFSET +#endif +#endif +
include/configs/netspace_v2.h line 107
Quoted 10 lines
include/configs/netspace_v2.h new file +10
-0+/* +* Enable GPI0 support +*/ +#define CONFIG_KIRKWOOD_GPIO + +/* +* File systems support +*/ +#define CONFIG_CMD_EXT2 +#define CONFIG_CMD_FAT
Get rid of this, use CONFIG_SYS_MVFS
Quoted 30 lines
include/configs/netspace_v2.h new file +30
-0+ +/* +* Use the HUSH parser +*/ +#define CONFIG_SYS_HUSH_PARSER +#define CONFIG_SYS_PROMPT_HUSH_PS2 "> " + +/* +* Console configuration +*/ +#define CONFIG_CONSOLE_MUX +#define CONFIG_SYS_CONSOLE_IS_IN_ENV + +/* +* Enable device tree support +*/ +#define CONFIG_OF_LIBFDT + +/* +* Environment variables configurations +*/ +#define CONFIG_ENV_IS_IN_SPI_FLASH +#define CONFIG_ENV_SECT_SIZE 0x10000/* 64KB */ +#define CONFIG_ENV_SIZE 0x1000/* 4KB */ +#define CONFIG_ENV_ADDR 0x70000 +#define CONFIG_ENV_OFFSET 0x70000/* env starts here */ + +/* +* Default environment variables +*/
include/configs/netspace_v2.h line 147
Quoted 10 lines
include/configs/netspace_v2.h new file +10
-0+#define CONFIG_BOOTARGS "console=ttyS0,115200" + +#define CONFIG_BOOTCOMMAND \ + "if run usbload || run diskload; then bootm 0x800000; fi" + +#define CONFIG_EXTRA_ENV_SETTINGS \ + "stdin=serial,nc\0" \ + "stdout=serial,nc\0" \ + "stderr=serial,nc\0" \ + "ipaddr=192.168.1.111\0" \
NAK for ipaddr, no ip address should be defined by default.
include/configs/netspace_v2.h line 153
Quoted 6 lines
include/configs/netspace_v2.h new file +6
-0+"diskload=ide reset && " \ +"ext2load ide 0:1 0x800000 /boot/uImage\0" \ +"usbload=usb start && " \ + "fatload usb 0:1 0x800000 /boot/uImage\0" + +#endif /* _CONFIG_NETSPACE_V2_H */
Regards..
Praufulla . .
Quoted 2 lines
--
1.6.3.1
PATCH v7 2/2 Add support for Network Space v2
Hi Prafulla,
Quoted 67 lines · Prafulla Wadaskar
Quoted 67 lines
-----Original Message-----
From: Simon Guinot [mailto:simon.guinot at sequanux.org]
Sent: Thursday, May 12, 2011 3:19 PM
To: Prafulla Wadaskar
Cc: Albert ARIBAUD; u-boot at lists.denx.de; Simon Guinot
Subject: [PATH v7 2/2] Add support for Network Space v2This patch add support for the Network Space v2 board and parents, based on the Marvell Kirkwood 6281 SoC. This include Network Space (Max) v2 and Internet Space v2.
Additional information is available at:
http://lacie-nas.org/doku.php?id=network_space_v2Signed-off-by Simon Guinot <[email protected]>---
Changes for v2:
- add entries toMAINTAINERSfile
- move boards from rootMakefileto boards.cfg
- moveMACH_TYPEdefinition intonetspace_v2.h
- removeCONFIG_SYS_HZredefinition
- turn PHY initialization message intodebug()Changes for v3: none
Changes for v4:
- enhance commit message: add SoC informationChanges for v5: none
Changes for v6:
- enable device tree support
- clean some "#define" innetspace_v2.h
- enhance commit message: provide description URL and mention SoC family
- rebase against u-boot-{arm,marvell}/master branchesChanges for v7:
- rebase against u-boot-marvell/master branchMAINTAINERS | 6 + board/LaCie/netspace_v2/Makefile | 49 ++++++++++ board/LaCie/netspace_v2/kwbimage.cfg | 162 +++++++++++++++++++++++++++++++++ board/LaCie/netspace_v2/netspace_v2.c | 144 +++++++++++++++++++++++++++++ board/LaCie/netspace_v2/netspace_v2.h | 39 ++++++++ boards.cfg | 3 + include/configs/netspace_v2.h | 153 +++++++++++++++++++++++++++++++ 7 files changed, 556 insertions(+), 0 deletions(-) create mode 100644 board/LaCie/netspace_v2/Makefile create mode 100644 board/LaCie/netspace_v2/kwbimage.cfg create mode 100644 board/LaCie/netspace_v2/netspace_v2.c create mode 100644 board/LaCie/netspace_v2/netspace_v2.h create mode 100644 include/configs/netspace_v2.hMAINTAINERS +0
-0@@ -645,6 +645,12 @@ Sedji Gaouaou<[email protected]> at91sam9g10ek ARM926EJS (AT91SAM9G10 SoC) at91sam9m10g45ek ARM926EJS (AT91SAM9G45 SoC)
Quoted 7 lines
MAINTAINERS Sedji Gaouaou<[email protected]> · line 652
Quoted 5 lines
MAINTAINERS +5
-0+Simon Guinot <[email protected]> + + inetspace_v2 ARM926EJS (Kirkwood SoC) + netspace_v2 ARM926EJS (Kirkwood SoC) + netspace_max_v2 ARM926EJS (Kirkwood SoC)You are adding three boards support, the subject does not say the same.
OK, I will enhance the subject description.
[ snip ]
Quoted 135 lines
Quoted 135 lines
board/LaCie/netspace_v2/netspace_v2.c new file +128
-0@@ -0,0 +1,144 @@ +/* +* Copyright (C) 2011 Simon Guinot <[email protected]> +* +* Based on Kirkwood support: +* (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. +*/ + +#include <common.h> +#include <miiphy.h> +#include <netdev.h> +#include <command.h> +#include <asm/arch/kirkwood.h> +#include <asm/arch/mpp.h> +#include <asm/arch/gpio.h> +#include "netspace_v2.h" + +DECLARE_GLOBAL_DATA_PTR ; + +int board_early_init_f (void ) +{ +/* Gpio configuration */ +kw_config_gpio (NETSPACE_V2_OE_VAL_LOW ,NETSPACE_V2_OE_VAL_HIGH , +NETSPACE_V2_OE_LOW ,NETSPACE_V2_OE_HIGH ); + +/* Multi-Purpose Pins Functionality configuration */ +u32 kwmpp_config[] = { + MPP0_SPI_SCn, +MPP1_SPI_MOSI , +MPP2_SPI_SCK , +MPP3_SPI_MISO , +MPP4_NF_IO6 , +MPP5_NF_IO7 , + MPP6_SYSRST_OUTn, +MPP7_GPO ,/* Fan speed (bit 1) */ +MPP8_TW_SDA , +MPP9_TW_SCK , +MPP10_UART0_TXD , +MPP11_UART0_RXD , +MPP12_GPO ,/* Red led */ +MPP14_GPIO ,/* USB fuse */ +MPP16_GPIO ,/* SATA 0 power */ +MPP17_GPIO ,/* SATA 1 power */ +MPP18_NF_IO0 , +MPP19_NF_IO1 , + MPP20_SATA1_ACTn, + MPP21_SATA0_ACTn, +MPP22_GPIO ,/* Fan speed (bit 0) */ +MPP23_GPIO ,/* Fan power */ +MPP24_GPIO ,/* USB mode select */ +MPP25_GPIO ,/* Fan rotation fail */ +MPP26_GPIO ,/* USB vbus-in detection */ +MPP28_GPIO ,/* USB enable vbus-out */ +MPP29_GPIO ,/* Blue led (slow register) */ +MPP30_GPIO ,/* Blue led (command register) */ +MPP31_GPIO ,/* Board power off */ +MPP32_GPIO ,/* Button (0 = Released, 1 = Pushed) */ +MPP33_GPIO ,/* Fan speed (bit 2) */ +0 + }; +kirkwood_mpp_conf (kwmpp_config); + +return 0 ; +} + +int board_init (void ) +{ +/* Machine number */ + gd->bd->bi_arch_number =CONFIG_MACH_TYPE ; + +/* Boot parameters address */ + gd->bd->bi_boot_params =kw_sdram_bar (0 ) +0x100 ; + +return 0 ; +} + +void mv_phy_88e1116_init (char *name) +{ +u16 reg; +u16 devadr; + +if (miiphy_set_current_dev (name)) +return ; + +/* command to read PHY dev address */ +if (miiphy_read (name,0xEE ,0xEE , (u16 *) &devadr)) { +printf ("Err..(%s) could not read PHY dev address\n" , __func__); +return ; + } + +/* +* Enable RGMII delay on Tx and Rx for CPU port +* Ref: sec 4.7.2 of chip datasheet +*/ +miiphy_write (name, devadr,MV88E1116_PGADR_REG ,2 ); +miiphy_read (name, devadr,MV88E1116_MAC_CTRL_REG , ®); + reg |= (MV88E1116_RGMII_RXTM_CTRL |MV88E1116_RGMII_TXTM_CTRL ); +miiphy_write (name, devadr,MV88E1116_MAC_CTRL_REG , reg); +miiphy_write (name, devadr,MV88E1116_PGADR_REG ,0 ); + +/* reset the phy */ +if (miiphy_read (name, devadr,MII_BMCR , ®) !=0 ) { +printf ("Err..(%s) PHY status read failed\n" , __func__); +return ; + } +if (miiphy_write (name, devadr,MII_BMCR , reg |0x8000 ) !=0 ) { +printf ("Err..(%s) PHY reset failed\n" , __func__); +return ; + } + +debug ("88E1116 Initialized on %s\n" , name); +} + +/* Configure and initialize PHY */
Quoted 8 lines
board/LaCie/netspace_v2/netspace_v2.c line 134
Quoted 6 lines
board/LaCie/netspace_v2/netspace_v2.c new file +6
-0+void reset_phy (void ) +{ +mv_phy_88e1116_init ("egiga0" ); +} + +#define NETSPACE_V2_GPIO_BUTTON 32How about defining this in header file ?
I don't know. The GPIO button value is only useful within this file. Visualise both the define and the usage on the same screen is rather comfortable. As an alternative, I could drop the define...
What is your opinion ?
Quoted 109 lines
Quoted 109 lines
board/LaCie/netspace_v2/netspace_v2.c new file +4
-0+ +/* Return GPIO button status */ +static int +do_read_button(cmd_tbl_t *cmdtp, int flag, int argc, char * constargv[])
board/LaCie/netspace_v2/netspace_v2.c new file +6
-0+{ +return kw_gpio_get_value (NETSPACE_V2_GPIO_BUTTON ); +} + +U_BOOT_CMD (button,1 ,1 , do_read_button, +"Return GPIO button status 0=off 1=on" ,"" );board/LaCie/netspace_v2/netspace_v2.h new file +39
-0@@ -0,0 +1,39 @@ +/* +* Copyright (C) 2011 Simon Guinot <[email protected]> +* +* Based on Kirkwood support: +* (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. +*/ + +#ifndef NETSPACE_V2_H +#define NETSPACE_V2_H + +#define NETSPACE_V2_OE_LOW 0x06004000 +#define NETSPACE_V2_OE_HIGH 0x00000031 +#define NETSPACE_V2_OE_VAL_LOW 0x10030000 +#define NETSPACE_V2_OE_VAL_HIGH 0x00000000 + +/* PHY related */ +#define MV88E1116_LED_FCTRL_REG 10 +#define MV88E1116_CPRSP_CR3_REG 21 +#define MV88E1116_MAC_CTRL_REG 21 +#define MV88E1116_PGADR_REG 22 +#define MV88E1116_RGMII_TXTM_CTRL (1 << 4) +#define MV88E1116_RGMII_RXTM_CTRL (1 << 5) + +#endif /* NETSPACE_V2_H */ boards.cfg +0
-0@@ -104,6 +104,9 @@ davinci_schmoogie arm arm926ejsschmoogie davinci
davinci_sffsdrarm arm926ejs sffsdr
davinci davinci
davinci_sonataarm arm926ejs sonata
davinci davinci
suen3 arm arm926ejskm_arm
keymile kirkwood
+inetspace_v2 arm arm926ejsnetspace_v2
LaCie kirkwood netspace_v2:INETSPACE_V2
+netspace_v2 arm arm926ejsnetspace_v2
LaCie kirkwood netspace_v2:NETSPACE_V2
+netspace_max_v2 arm arm926ejsnetspace_v2
LaCie kirkwood netspace_v2:NETSPACE_MAX_V2
guruplug arm arm926ejs -
Marvell kirkwood
mv88f6281gtw_gearm arm926ejs -
Marvell kirkwood
openrd_basearm arm926ejs openrd
Marvell kirkwood openrd:BOARD_IS_OPENRD_BASEinclude/configs/netspace_v2.h new file +20
-0@@ -0,0 +1,153 @@ +/* +* Copyright (C) 2011 Simon Guinot <[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. +*/ + +#ifndef _CONFIG_NETSPACE_V2_H +#define _CONFIG_NETSPACE_V2_H +
Quoted 8 lines
include/configs/netspace_v2.h line 26
Quoted 6 lines
include/configs/netspace_v2.h new file +6
-0+/* +* Machine number definition +*/ +#if defined(CONFIG_INETSPACE_V2 ) +#define CONFIG_MACH_TYPE MACH_TYPE_INETSPACE_V2 +#define CONFIG_IDENT_STRING " LaCie Internet Space v2"Ident strings defined for each board are very long, can you use short names? The console logs with such long ident looks ugly.
Ok, I could drop the LaCie prefix. Is it enough ? Otherwise, I could use some alias but it could be confusing for board identification.
Quoted 10 lines
include/configs/netspace_v2.h line 33
Quoted 8 lines
include/configs/netspace_v2.h new file +7
-0+#elif defined(CONFIG_NETSPACE_V2 ) +#define CONFIG_MACH_TYPE MACH_TYPE_NETSPACE_V2 +#define CONFIG_IDENT_STRING " LaCie Network Space v2" +#elif defined(CONFIG_NETSPACE_MAX_V2 ) +#define CONFIG_MACH_TYPE MACH_TYPE_NETSPACE_MAX_V2 +#define CONFIG_IDENT_STRING " LaCie Network Space Max v2" +#endif There should be #elif for third board and #error for #else part
I have noticed this #error in the other board include files. Is it really needed ? This file is only included if one machine is selected.
Quoted 21 lines
Quoted 21 lines
include/configs/netspace_v2.h new file +20
-0+ +/* +* High Level Configuration Options (easy to change) +*/ +#define CONFIG_FEROCEON_88FR131 /* CPU Core subversion */ +#define CONFIG_KIRKWOOD /* SOC Family Name */ +#define CONFIG_KW88F6281 /* SOC Name */ +#define CONFIG_SKIP_LOWLEVEL_INIT /* disable board lowlevel_init */ + +/* +* Commands configuration +*/ +#define CONFIG_SYS_NO_FLASH /* Declare no flash (NOR/SPI) */ +#include <config_cmd_default.h> +#define CONFIG_CMD_ENV +#define CONFIG_CMD_DHCP +#define CONFIG_CMD_PING +#define CONFIG_CMD_SF +#define CONFIG_CMD_I2C +#define CONFIG_CMD_IDE
Quoted 8 lines
include/configs/netspace_v2.h line 59
Quoted 6 lines
include/configs/netspace_v2.h new file +6
-0+#define CONFIG_CMD_USB + +/* +* Core clock definition. +*/ +#define CONFIG_SYS_TCLK 166000000/* 166MHz */ This is not needed, defined in
..arch-kirkwood/kw88f6xxx.h
Actually it is. The core clock value is not standard for this boards. For a 6281 SoC, TCLK is defined to 200MHz and Network Space v2 TCLK is 166MHz.
This define has been introduced with a previous patch (already merged):18c4cb0f: Kirkwood: allow to override CONFIG_SYS_TCLK
Quoted 43 lines
Quoted 43 lines
include/configs/netspace_v2.h new file +42
-0+ +/* +* mv-common.h should be defined after CMD configs since it used them +* to enable certain macros +*/ +#define CONFIG_NR_DRAM_BANKS 2 +#include "mv-common.h" + +/* Remove or override few declarations from mv-common.h */ +#undef CONFIG_RBTREE +#undef CONFIG_ENV_SPI_MAX_HZ +#undef CONFIG_SYS_IDE_MAXBUS +#undef CONFIG_SYS_IDE_MAXDEVICE +#undef CONFIG_SYS_PROMPT +#define CONFIG_ENV_SPI_MAX_HZ 20000000/* 20Mhz */ +#define CONFIG_SYS_IDE_MAXBUS 1 +#define CONFIG_SYS_IDE_MAXDEVICE 1 +#define CONFIG_SYS_PROMPT "ns2> " + +/* +* Ethernet Driver configuration +*/ +#ifdef CONFIG_CMD_NET +#define CONFIG_MVGBE_PORTS {1, 0}/* enable port 0 only */ +#define CONFIG_NETCONSOLE +#endif + +/* +* SATA Driver configuration +*/ +#ifdef CONFIG_MVSATA_IDE +#define CONFIG_SYS_ATA_IDE0_OFFSET MV_SATA_PORT0_OFFSET +/* Network Space Max v2 use 2 SATA ports */ +#ifdef CONFIG_NETSPACE_MAX_V2 +#define CONFIG_SYS_ATA_IDE1_OFFSET MV_SATA_PORT1_OFFSET +#endif +#endif + +/* +* Enable GPI0 support +*/ +#define CONFIG_KIRKWOOD_GPIO
Quoted 8 lines
include/configs/netspace_v2.h line 107
Quoted 6 lines
include/configs/netspace_v2.h new file +6
-0+ +/* +* File systems support +*/ +#define CONFIG_CMD_EXT2 +#define CONFIG_CMD_FAT Get rid of this, use
CONFIG_SYS_MVFS
Outch. Please no :)
CONFIG_SYS_MVFS enable support for mtd, jffs2 and ubifs. It is completely useless for a Network Space v2 board where the SPI flash size is 512KB. The whole space is for U-Boot.
Quoted 35 lines
Quoted 35 lines
include/configs/netspace_v2.h new file +34
-0+ +/* +* Use the HUSH parser +*/ +#define CONFIG_SYS_HUSH_PARSER +#define CONFIG_SYS_PROMPT_HUSH_PS2 "> " + +/* +* Console configuration +*/ +#define CONFIG_CONSOLE_MUX +#define CONFIG_SYS_CONSOLE_IS_IN_ENV + +/* +* Enable device tree support +*/ +#define CONFIG_OF_LIBFDT + +/* +* Environment variables configurations +*/ +#define CONFIG_ENV_IS_IN_SPI_FLASH +#define CONFIG_ENV_SECT_SIZE 0x10000/* 64KB */ +#define CONFIG_ENV_SIZE 0x1000/* 4KB */ +#define CONFIG_ENV_ADDR 0x70000 +#define CONFIG_ENV_OFFSET 0x70000/* env starts here */ + +/* +* Default environment variables +*/ +#define CONFIG_BOOTARGS "console=ttyS0,115200" + +#define CONFIG_BOOTCOMMAND \ + "if run usbload || run diskload; then bootm 0x800000; fi"
Quoted 8 lines
include/configs/netspace_v2.h line 147
Quoted 6 lines
include/configs/netspace_v2.h new file +6
-0+ +#define CONFIG_EXTRA_ENV_SETTINGS \ + "stdin=serial,nc\0" \ + "stdout=serial,nc\0" \ + "stderr=serial,nc\0" \ + "ipaddr=192.168.1.111\0" \NAK for ipaddr, no ip address should be defined by default.
I understand, but I need a known IP address.
I want people to be able to update the stock U-Boot using netconsole (without a serial link which require to open the case). At restart, right after the update, a user must be able to figure out the board IP.
An alternative could be using a DHCP configuration.
Quoted 7 lines
include/configs/netspace_v2.h line 153
Quoted 7 lines
include/configs/netspace_v2.h new file +6
-0+"diskload=ide reset && " \ +"ext2load ide 0:1 0x800000 /boot/uImage\0" \ +"usbload=usb start && " \ + "fatload usb 0:1 0x800000 /boot/uImage\0" + +#endif /* _CONFIG_NETSPACE_V2_H */
Thanks for your comments.
Regards,
Simon
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
Url : http://lists.denx.de/pipermail/u-boot/attachments/20110512/a0fce3c1/attachment.pgp
PATCH v7 2/2 Add support for Network Space v2
Quoted 74 lines
-----Original Message-----
From: Simon Guinot [mailto:simon at sequanux.org]
Sent: Thursday, May 12, 2011 5:17 PM
To: Prafulla Wadaskar
Cc: Simon Guinot; Albert ARIBAUD; u-boot at lists.denx.de; Ashish Karkare; Prabhanjan Sarnaik
Subject: Re: [PATH v7 2/2] Add support for Network Space v2Hi Prafulla,
Quoted 10 lines · Prafulla Wadaskar
Quoted 10 lines
-----Original Message-----
From: Simon Guinot [mailto:simon.guinot at sequanux.org]
Sent: Thursday, May 12, 2011 3:19 PM
To: Prafulla Wadaskar
Cc: Albert ARIBAUD; u-boot at lists.denx.de; Simon Guinot
Subject: [PATH v7 2/2] Add support for Network Space v2This patch add support for the Network Space v2 board and parents,
based
Quoted 1 line
Quoted 1 line
on the Marvell Kirkwood 6281 SoC. This include Network Space (Max)
v2
Quoted 48 lines
Quoted 48 lines
and Internet Space v2.
Additional information is available at:
http://lacie-nas.org/doku.php?id=network_space_v2Signed-off-by Simon Guinot <[email protected]>---
Changes for v2:
- add entries toMAINTAINERSfile
- move boards from rootMakefileto boards.cfg
- moveMACH_TYPEdefinition intonetspace_v2.h
- removeCONFIG_SYS_HZredefinition
- turn PHY initialization message intodebug()Changes for v3: none
Changes for v4:
- enhance commit message: add SoC informationChanges for v5: none
Changes for v6:
- enable device tree support
- clean some "#define" innetspace_v2.h
- enhance commit message: provide description URL and mention SoC family
- rebase against u-boot-{arm,marvell}/master branchesChanges for v7:
- rebase against u-boot-marvell/master branchMAINTAINERS | 6 + board/LaCie/netspace_v2/Makefile | 49 ++++++++++ board/LaCie/netspace_v2/kwbimage.cfg | 162 +++++++++++++++++++++++++++++++++ board/LaCie/netspace_v2/netspace_v2.c | 144 +++++++++++++++++++++++++++++ board/LaCie/netspace_v2/netspace_v2.h | 39 ++++++++ boards.cfg | 3 + include/configs/netspace_v2.h | 153 +++++++++++++++++++++++++++++++ 7 files changed, 556 insertions(+), 0 deletions(-) create mode 100644 board/LaCie/netspace_v2/Makefile create mode 100644 board/LaCie/netspace_v2/kwbimage.cfg create mode 100644 board/LaCie/netspace_v2/netspace_v2.c create mode 100644 board/LaCie/netspace_v2/netspace_v2.h create mode 100644 include/configs/netspace_v2.h
...snip..
Quoted 11 lines
Quoted 10 lines
board/LaCie/netspace_v2/netspace_v2.c line 134
Quoted 8 lines
board/LaCie/netspace_v2/netspace_v2.c new file +8
-0+ +/* Configure and initialize PHY */ +void reset_phy (void ) +{ +mv_phy_88e1116_init ("egiga0" ); +} + +#define NETSPACE_V2_GPIO_BUTTON 32How about defining this in header file ?
Quoted 5 lines
I don't know. The GPIO button value is only useful within this file. Visualise both the define and the usage on the same screen is rather comfortable. As an alternative, I could drop the define...
What is your opinion ?
Do not drop it, I will recommend to put it in board/LaCie/netspace_v2/netspace_v2.h.
...snip...
Quoted 7 lines
Quoted 3 lines
Quoted 1 line
+#endif
There should be #elif for third board and #error for #else part
I have noticed this #error in the other board include files. Is it really needed ? This file is only included if one machine is selected.
No it is not really needed, choice is yours :-)
Quoted 33 lines
Quoted 6 lines
include/configs/netspace_v2.h
Quoted 6 lines
include/configs/netspace_v2.h new file +5
-0+ +/* +* High Level Configuration Options (easy to change) +*/ +#define CONFIG_FEROCEON_88FR131 /* CPU Core subversion */
Quoted 3 lines
include/configs/netspace_v2.h
Quoted 3 lines
include/configs/netspace_v2.h new file +3
-0+#define CONFIG_KIRKWOOD /* SOC Family Name */ +#define CONFIG_KW88F6281 /* SOC Name */ +#define CONFIG_SKIP_LOWLEVEL_INIT /* disable board lowlevel_init */
Quoted 5 lines
include/configs/netspace_v2.h
Quoted 5 lines
include/configs/netspace_v2.h new file +5
-0+ +/* +* Commands configuration +*/ +#define CONFIG_SYS_NO_FLASH /* Declare no flash (NOR/SPI) */
Quoted 7 lines
Quoted 7 lines
include/configs/netspace_v2.h new file +7
-0+#include <config_cmd_default.h> +#define CONFIG_CMD_ENV +#define CONFIG_CMD_DHCP +#define CONFIG_CMD_PING +#define CONFIG_CMD_SF +#define CONFIG_CMD_I2C +#define CONFIG_CMD_IDE Quoted 8 lines
include/configs/netspace_v2.h line 59
Quoted 6 lines
include/configs/netspace_v2.h new file +6
-0+#define CONFIG_CMD_USB + +/* +* Core clock definition. +*/ +#define CONFIG_SYS_TCLK 166000000/* 166MHz */ This is not needed, defined in
..arch-kirkwood/kw88f6xxx.h
Quoted 7 lines
Actually it is. The core clock value is not standard for this boards. For a 6281 SoC, TCLK is defined to 200MHz and Network Space v2 TCLK is 166MHz.
This define has been introduced with a previous patch (already merged):
18c4cb0f: Kirkwood: allow to overrideCONFIG_SYS_TCLK
Okay I take my words back, I was referring kw88f6162.h :-(
Quoted 54 lines
Quoted 4 lines
board/LaCie/netspace_v2/netspace_v2.c
Quoted 4 lines
board/LaCie/netspace_v2/netspace_v2.c new file +3
-0+ +/* +* mv-common.h should be defined after CMD configs since it used them
Quoted 13 lines
Quoted 13 lines
+ * to enable certain macros
+ */include/configs/netspace_v2.h new file +11
-0+#define CONFIG_NR_DRAM_BANKS 2 +#include "mv-common.h" + +/* Remove or override few declarations from mv-common.h */ +#undef CONFIG_RBTREE +#undef CONFIG_ENV_SPI_MAX_HZ +#undef CONFIG_SYS_IDE_MAXBUS +#undef CONFIG_SYS_IDE_MAXDEVICE +#undef CONFIG_SYS_PROMPT +#define CONFIG_ENV_SPI_MAX_HZ 20000000/* 20Mhz */ +#define CONFIG_SYS_IDE_MAXBUS 1Quoted 8 lines
include/configs/netspace_v2.h
Quoted 8 lines
include/configs/netspace_v2.h new file +8
-0+#define CONFIG_SYS_IDE_MAXDEVICE 1 +#define CONFIG_SYS_PROMPT "ns2> " + +/* +* Ethernet Driver configuration +*/ +#ifdef CONFIG_CMD_NET +#define CONFIG_MVGBE_PORTS {1, 0}/* enable port 0 only */
Quoted 18 lines
Quoted 18 lines
include/configs/netspace_v2.h new file +18
-0+#define CONFIG_NETCONSOLE +#endif + +/* +* SATA Driver configuration +*/ +#ifdef CONFIG_MVSATA_IDE +#define CONFIG_SYS_ATA_IDE0_OFFSET MV_SATA_PORT0_OFFSET +/* Network Space Max v2 use 2 SATA ports */ +#ifdef CONFIG_NETSPACE_MAX_V2 +#define CONFIG_SYS_ATA_IDE1_OFFSET MV_SATA_PORT1_OFFSET +#endif +#endif + +/* +* Enable GPI0 support +*/ +#define CONFIG_KIRKWOOD_GPIO Quoted 8 lines
include/configs/netspace_v2.h line 107
Quoted 6 lines
include/configs/netspace_v2.h new file +6
-0+ +/* +* File systems support +*/ +#define CONFIG_CMD_EXT2 +#define CONFIG_CMD_FAT Get rid of this, use
CONFIG_SYS_MVFS
Quoted 5 lines
Outch. Please no :)
CONFIG_SYS_MVFSenable support for mtd, jffs2 and ubifs. It is completely useless for a Network Space v2 board where the SPI flash size is 512KB. The whole space is for U-Boot.
Okay..
Quoted 45 lines
Quoted 36 lines
Quoted 36 lines
include/configs/netspace_v2.h new file +34
-0+ +/* +* Use the HUSH parser +*/ +#define CONFIG_SYS_HUSH_PARSER +#define CONFIG_SYS_PROMPT_HUSH_PS2 "> " + +/* +* Console configuration +*/ +#define CONFIG_CONSOLE_MUX +#define CONFIG_SYS_CONSOLE_IS_IN_ENV + +/* +* Enable device tree support +*/ +#define CONFIG_OF_LIBFDT + +/* +* Environment variables configurations +*/ +#define CONFIG_ENV_IS_IN_SPI_FLASH +#define CONFIG_ENV_SECT_SIZE 0x10000/* 64KB */ +#define CONFIG_ENV_SIZE 0x1000/* 4KB */ +#define CONFIG_ENV_ADDR 0x70000 +#define CONFIG_ENV_OFFSET 0x70000/* env starts here */ + +/* +* Default environment variables +*/ +#define CONFIG_BOOTARGS "console=ttyS0,115200" + +#define CONFIG_BOOTCOMMAND \ + "if run usbload || run diskload; then bootm 0x800000; fi"Quoted 8 lines
include/configs/netspace_v2.h line 147
Quoted 6 lines
include/configs/netspace_v2.h new file +6
-0+ +#define CONFIG_EXTRA_ENV_SETTINGS \ + "stdin=serial,nc\0" \ + "stdout=serial,nc\0" \ + "stderr=serial,nc\0" \ + "ipaddr=192.168.1.111\0" \NAK for ipaddr, no ip address should be defined by default.
Quoted 7 lines
I understand, but I need a known IP address.
I want people to be able to update the stock U-Boot using netconsole (without a serial link which require to open the case). At restart, right after the update, a user must be able to figure out the board IP.
An alternative could be using a DHCP configuration.
I wish to know Wolfgang's or Ben's comments on this.
Because I remember strategically hard coding ipaddress is not recommend.
Regards..
Prafulla . .
PATCH v7 2/2 Add support for Network Space v2
In reply to Simon GuinotDear Simon Guinot,
Quoted 11 lines · In message <[email protected]> you wrote:
Quoted 8 lines
include/configs/netspace_v2.h line 33
Quoted 6 lines
include/configs/netspace_v2.h new file +5
-0+#define CONFIG_IDENT_STRING " LaCie Network Space v2" +#elif defined(CONFIG_NETSPACE_MAX_V2 ) +#define CONFIG_MACH_TYPE MACH_TYPE_NETSPACE_MAX_V2 +#define CONFIG_IDENT_STRING " LaCie Network Space Max v2" +#endif There should be #elif for third board and #error for #else part
I have noticed this #error in the other board include files. Is it really needed ? This file is only included if one machine is selected.
Defensive programming is a Good Thing. Today you remember that there are only three boards. Next year somebody adds another one and fails to update all relevant places.
Quoted 6 lines
Quoted 4 lines
include/configs/netspace_v2.h line 107
Quoted 2 lines
include/configs/netspace_v2.h new file +2
-0+#define CONFIG_CMD_EXT2 +#define CONFIG_CMD_FAT Get rid of this, use
CONFIG_SYS_MVFSOutch. Please no :)
Agreed. Leave as is.
Quoted 11 lines
Quoted 3 lines
Quoted 1 line
+ "ipaddr=192.168.1.111\0" \
NAK for ipaddr, no ip address should be defined by default.
I understand, but I need a known IP address.
I want people to be able to update the stock U-Boot using netconsole (without a serial link which require to open the case). At restart, right after the update, a user must be able to figure out the board IP.
An alternative could be using a DHCP configuration.
Yes, that would be much better.
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 It is easier to change the specification to fit the program than vice versa.