add support for LaCie CloudBox
cover add support for LaCie CloudBox
These patches add support for the network storage LaCie CloudBox. The device shares one sata hardrive via a gigabit ethernet port. It is based on a Marvell Kirkwood 6702 soc.
PATCH 1/2 arm: add support for LaCie CloudBox
From: Fr?d?ric Leroy <[email protected]>
The LaCie CloudBox device is a Kirkwood based nas :
- SoC: Marvell 88F6700 1000Mhz
- SDRAM memory: 256MB DDR2 400Mhz
- Gigabit ethernet: PHY Marvell 88E1318
- Flash memory: SPI NOR 512KB (Macronix MX25L4005A)
- 1 push button
- 1 reset switch
- 1 SATA port
- 1 LED (bi-color, blue and red)
--- board/LaCie/cloudbox/Makefile | 46 +++++++++++ board/LaCie/cloudbox/cloudbox.c | 104 ++++++++++++++++++++++++ board/LaCie/cloudbox/cloudbox.h | 36 ++++++++ board/LaCie/cloudbox/kwbimage.cfg | 167 ++++++++++++++++++++++++++++++++++++++ boards.cfg | 1 + include/configs/lacie_kw.h | 8 +- 6 files changed, 361 insertions(+), 1 deletion(-) create mode 100644 board/LaCie/cloudbox/Makefile create mode 100644 board/LaCie/cloudbox/cloudbox.c create mode 100644 board/LaCie/cloudbox/cloudbox.h create mode 100644 board/LaCie/cloudbox/kwbimage.cfg
board/LaCie/cloudbox/Makefile new file +46 -0
@@ -0,0 +1,46 @@ +# +# Copyright (C) 2013 Frederic Leroy <[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 +ifneq ($(OBJTREE),$(SRCTREE)) +$(shell mkdir -p $(obj)../common) +endif + +LIB = $(obj)lib$(BOARD).o + +COBJS := $(BOARD).o ../common/common.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)) + +######################################################################### + +# defines $(obj).depend target +include $(SRCTREE)/rules.mk + +sinclude $(obj).depend + +#########################################################################
board/LaCie/cloudbox/cloudbox.c new file +104 -0
104 lines not on this page · raw message
board/LaCie/cloudbox/cloudbox.h new file +36 -0
@@ -0,0 +1,36 @@ +/* +* Copyright (C) 2013 Frederic Leroy <[email protected]> +* +* Based on LaCie u-boot sources +* +* 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 CLOUDBOX_H +#define CLOUDBOX_H + +/* GPIO configuration */ +#define CLOUDBOX_OE_LOW 0xF0310000 +#define CLOUDBOX_OE_HIGH 0x00000001 +#define CLOUDBOX_OE_VAL_LOW 0x00000010 +#define CLOUDBOX_OE_VAL_HIGH 0x00000000 + +#define CLOUDBOX_GPIO_BUTTON 16 + +#endif /* CLOUDBOX_H */
board/LaCie/cloudbox/kwbimage.cfg new file +167 -0
167 lines not on this page · raw message
boards.cfg +1 -0
@@ -170,6 +170,7 @@ kmsuv31 arm arm926ejs km_arm keymile mgcoge3un arm arm926ejs km_arm keymile kirkwood km_kirkwood:KM_MGCOGE3UN kmcoge5un arm arm926ejs km_arm keymile kirkwood km_kirkwood:KM_COGE5UN portl2 arm arm926ejs km_arm keymile kirkwood km_kirkwood:KM_PORTL2 +cloudbox arm arm926ejs cloudbox LaCie kirkwood lacie_kw:CLOUDBOX d2net_v2 arm arm926ejs net2big_v2 LaCie kirkwood lacie_kw:D2NET_V2 inetspace_v2 arm arm926ejs netspace_v2 LaCie kirkwood lacie_kw:INETSPACE_V2 net2big_v2 arm arm926ejs net2big_v2 LaCie kirkwood lacie_kw:NET2BIG_V2
include/configs/lacie_kw.h +7 -1
@@ -44,6 +44,8 @@#elif defined(CONFIG_NET2BIG_V2 )#define CONFIG_MACH_TYPE MACH_TYPE_NET2BIG_V2#define CONFIG_IDENT_STRING " 2Big v2" +#elif defined(CONFIG_CLOUDBOX ) +#define CONFIG_IDENT_STRING " CloudBox"#else #error "Unknown board"#endif
@@ -70,9 +72,11 @@#define CONFIG_CMD_DHCP #define CONFIG_CMD_PING #define CONFIG_CMD_SF +#if !defined(CONFIG_CLOUDBOX )/* No I2C eeprom */ #define CONFIG_CMD_I2C +#endif #define CONFIG_CMD_IDE -#ifndef CONFIG_NETSPACE_MINI_V2 /* No USB ports on Network Space v2 Mini */ +#if !defined(CONFIG_NETSPACE_MINI_V2 ) && !defined(CONFIG_CLOUDBOX )/* No USB ports on these devices */ #define CONFIG_CMD_USB #endif
@@ -115,6 +119,8 @@#define CONFIG_SYS_PROMPT "d2v2> "#elif defined(CONFIG_NET2BIG_V2 )#define CONFIG_SYS_PROMPT "2big2> " +#elif defined(CONFIG_CLOUDBOX ) +#define CONFIG_SYS_PROMPT "cb> "#else #define CONFIG_SYS_PROMPT "ns2> "#endif
Signature · 1 line
1.8.1.2
PATCH 1/2 arm: add support for LaCie CloudBox
Dear Frederic Leroy,
Quoted 14 lines · In message <[email protected]> you wrote:
From: Fr?d?ric Leroy <[email protected]>
The LaCie CloudBox device is a Kirkwood based nas :
- SoC: Marvell 88F6700 1000Mhz
- SDRAM memory: 256MB DDR2 400Mhz
- Gigabit ethernet: PHY Marvell 88E1318
- Flash memory: SPI NOR 512KB (Macronix MX25L4005A)
- 1 push button
- 1 reset switch
- 1 SATA port
- 1 LED (bi-color, blue and red)Signed-off-by Fr?d?ric Leroy <[email protected]>
Quoted 12 lines
--- board/LaCie/cloudbox/Makefile | 46 +++++++++++ board/LaCie/cloudbox/cloudbox.c | 104 ++++++++++++++++++++++++ board/LaCie/cloudbox/cloudbox.h | 36 ++++++++ board/LaCie/cloudbox/kwbimage.cfg | 167 ++++++++++++++++++++++++++++++++++++++ boards.cfg | 1 + include/configs/lacie_kw.h | 8 +- 6 files changed, 361 insertions(+), 1 deletion(-) create mode 100644 board/LaCie/cloudbox/Makefile create mode 100644 board/LaCie/cloudbox/cloudbox.c create mode 100644 board/LaCie/cloudbox/cloudbox.h create mode 100644 board/LaCie/cloudbox/kwbimage.cfg
The (mandatory) entry to MAINTAINERS is missing.
Checkpatch says:
WARNING: please, no spaces at the start of a line
#253: FILE: board/LaCie/cloudbox/cloudbox.c:82:
+ return 0;$
WARNING: line over 80 characters
#525: FILE: include/configs/lacie_kw.h:79:
+#if !defined(CONFIG_NETSPACE_MINI_V2) && !defined(CONFIG_CLOUDBOX) /* No USB ports on these devices */
Please clean these up.
include/configs/lacie_kw.h line 48
Quoted 9 lines
index e2b3b21..dc101d6 100644
include/configs/lacie_kw.h +2
-0@@ -44,6 +44,8 @@#elif defined(CONFIG_NET2BIG_V2 )#define CONFIG_MACH_TYPE MACH_TYPE_NET2BIG_V2#define CONFIG_IDENT_STRING " 2Big v2" +#elif defined(CONFIG_CLOUDBOX ) +#define CONFIG_IDENT_STRING " CloudBox"
Please keep such lists alphabetically sorted.
include/configs/lacie_kw.h line 123
Quoted 6 lines
include/configs/lacie_kw.h +2
-0@@ -115,6 +119,8 @@#define CONFIG_SYS_PROMPT "d2v2> "#elif defined(CONFIG_NET2BIG_V2 )#define CONFIG_SYS_PROMPT "2big2> " +#elif defined(CONFIG_CLOUDBOX ) +#define CONFIG_SYS_PROMPT "cb> "
Same here again.
On the other hand, this is actually crap. We should use a common prompt for all these boards, eventually the standard "=> ".
Best regards,
Wolfgang Denk
Signature · 7 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 nothing so deadly as not to hold up to people the opportunity to do great and wonderful things, if we wish to stimulate them in an active way." - Dr. Harold Urey, Nobel Laureate in chemistry
v2 cover arm: add support for LaCie CloudBox
This series adds support for the LaCie Cloudbox v2 device.
Changes in v2:
- sort unsorted #ifdef list in lacie_kw.h
- add entry to MAINTAINERS
- remove unused GPIO definitions
- remove empty misc_init_r()
- add Machine ID
- Use #define values for ethernet phy init
- checkpatch compliant
Fr?d?ric Leroy (4):
lacie_kw: sort #ifdef lists by CONFIG_ identifiers
arm: add support for LaCie CloudBox LaCie/common: Fix cloudbox ethernet leds
arm: add machine ID for CloudBox
MAINTAINERS | 4 + arch/arm/include/asm/mach-types.h | 14 ++++ board/LaCie/cloudbox/Makefile | 46 +++++++++++ board/LaCie/cloudbox/cloudbox.c | 94 +++++++++++++++++++++ board/LaCie/cloudbox/cloudbox.h | 36 ++++++++ board/LaCie/cloudbox/kwbimage.cfg | 167 ++++++++++++++++++++++++++++++++++++++ board/LaCie/common/common.c | 13 ++- boards.cfg | 1 + include/configs/lacie_kw.h | 44 ++++++---- 9 files changed, 401 insertions(+), 18 deletions(-) create mode 100644 board/LaCie/cloudbox/Makefile create mode 100644 board/LaCie/cloudbox/cloudbox.c create mode 100644 board/LaCie/cloudbox/cloudbox.h create mode 100644 board/LaCie/cloudbox/kwbimage.cfg
Signature · 1 line
1.8.1.2
PATCH v2 1/4 lacie_kw: sort #ifdef lists by CONFIG_ identifiers
--- include/configs/lacie_kw.h | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-)
include/configs/lacie_kw.h +13 -13
@@ -21,29 +21,29 @@/* * Machine number definition */ -#if defined(CONFIG_INETSPACE_V2 ) +#if defined(CONFIG_D2NET_V2 ) +#define CONFIG_MACH_TYPE MACH_TYPE_D2NET_V2 +#define CONFIG_IDENT_STRING " D2 v2" +#elif defined(CONFIG_INETSPACE_V2 )#define CONFIG_MACH_TYPE MACH_TYPE_INETSPACE_V2#define CONFIG_IDENT_STRING " IS v2" -#elif defined(CONFIG_NETSPACE_V2 ) -#define CONFIG_MACH_TYPE MACH_TYPE_NETSPACE_V2 -#define CONFIG_IDENT_STRING " NS v2" +#elif defined(CONFIG_NET2BIG_V2 ) +#define CONFIG_MACH_TYPE MACH_TYPE_NET2BIG_V2 +#define CONFIG_IDENT_STRING " 2Big v2"#elif defined(CONFIG_NETSPACE_LITE_V2 )#define MACH_TYPE_NETSPACE_LITE_V2 2983/* missing in mach-types.h */ #define CONFIG_MACH_TYPE MACH_TYPE_NETSPACE_LITE_V2#define CONFIG_IDENT_STRING " NS v2 Lite" +#elif defined(CONFIG_NETSPACE_MAX_V2 ) +#define CONFIG_MACH_TYPE MACH_TYPE_NETSPACE_MAX_V2 +#define CONFIG_IDENT_STRING " NS Max v2"#elif defined(CONFIG_NETSPACE_MINI_V2 )#define MACH_TYPE_NETSPACE_MINI_V2 2831/* missing in mach-types.h */ #define CONFIG_MACH_TYPE MACH_TYPE_NETSPACE_MINI_V2#define CONFIG_IDENT_STRING " NS v2 Mini" -#elif defined(CONFIG_NETSPACE_MAX_V2 ) -#define CONFIG_MACH_TYPE MACH_TYPE_NETSPACE_MAX_V2 -#define CONFIG_IDENT_STRING " NS Max v2" -#elif defined(CONFIG_D2NET_V2 ) -#define CONFIG_MACH_TYPE MACH_TYPE_D2NET_V2 -#define CONFIG_IDENT_STRING " D2 v2" -#elif defined(CONFIG_NET2BIG_V2 ) -#define CONFIG_MACH_TYPE MACH_TYPE_NET2BIG_V2 -#define CONFIG_IDENT_STRING " 2Big v2" +#elif defined(CONFIG_NETSPACE_V2 ) +#define CONFIG_MACH_TYPE MACH_TYPE_NETSPACE_V2 +#define CONFIG_IDENT_STRING " NS v2"#else #error "Unknown board"#endif
Signature · 1 line
1.8.1.2
PATCH v2 1/4 lacie_kw: sort #ifdef lists by CONFIG_ identifiers
Quoted 4 lines · Fr?d?ric Leroy
Signed-off-by Fr?d?ric Leroy <[email protected]>--- include/configs/lacie_kw.h | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-)
Quoted 50 lines
include/configs/lacie_kw.h +13
-13@@ -21,29 +21,29 @@/* * Machine number definition */ -#if defined(CONFIG_INETSPACE_V2 ) +#if defined(CONFIG_D2NET_V2 ) +#define CONFIG_MACH_TYPE MACH_TYPE_D2NET_V2 +#define CONFIG_IDENT_STRING " D2 v2" +#elif defined(CONFIG_INETSPACE_V2 )#define CONFIG_MACH_TYPE MACH_TYPE_INETSPACE_V2#define CONFIG_IDENT_STRING " IS v2" -#elif defined(CONFIG_NETSPACE_V2 ) -#define CONFIG_MACH_TYPE MACH_TYPE_NETSPACE_V2 -#define CONFIG_IDENT_STRING " NS v2" +#elif defined(CONFIG_NET2BIG_V2 ) +#define CONFIG_MACH_TYPE MACH_TYPE_NET2BIG_V2 +#define CONFIG_IDENT_STRING " 2Big v2"#elif defined(CONFIG_NETSPACE_LITE_V2 )#define MACH_TYPE_NETSPACE_LITE_V2 2983/* missing in mach-types.h */ #define CONFIG_MACH_TYPE MACH_TYPE_NETSPACE_LITE_V2#define CONFIG_IDENT_STRING " NS v2 Lite" +#elif defined(CONFIG_NETSPACE_MAX_V2 ) +#define CONFIG_MACH_TYPE MACH_TYPE_NETSPACE_MAX_V2 +#define CONFIG_IDENT_STRING " NS Max v2"#elif defined(CONFIG_NETSPACE_MINI_V2 )#define MACH_TYPE_NETSPACE_MINI_V2 2831/* missing in mach-types.h */ #define CONFIG_MACH_TYPE MACH_TYPE_NETSPACE_MINI_V2#define CONFIG_IDENT_STRING " NS v2 Mini" -#elif defined(CONFIG_NETSPACE_MAX_V2 ) -#define CONFIG_MACH_TYPE MACH_TYPE_NETSPACE_MAX_V2 -#define CONFIG_IDENT_STRING " NS Max v2" -#elif defined(CONFIG_D2NET_V2 ) -#define CONFIG_MACH_TYPE MACH_TYPE_D2NET_V2 -#define CONFIG_IDENT_STRING " D2 v2" -#elif defined(CONFIG_NET2BIG_V2 ) -#define CONFIG_MACH_TYPE MACH_TYPE_NET2BIG_V2 -#define CONFIG_IDENT_STRING " 2Big v2" +#elif defined(CONFIG_NETSPACE_V2 ) +#define CONFIG_MACH_TYPE MACH_TYPE_NETSPACE_V2 +#define CONFIG_IDENT_STRING " NS v2"#else #error "Unknown board"#endif Signature · 1 line
1.8.1.2
-------------- 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/20130701/bd1bda7f/attachment.pgp>
PATCH v2 2/4 arm: add support for LaCie CloudBox
In reply to Frédéric LeroyThe LaCie CloudBox device is a Kirkwood based nas :
- SoC: Marvell 88F6702 1000Mhz
- SDRAM memory: 256MB DDR2 400Mhz
- Gigabit ethernet: PHY Marvell 88E1318
- Flash memory: SPI NOR 512KB (Macronix MX25L4005A)
- 1 push button
- 1 reset switch
- 1 SATA port
- 1 LED (bi-color, blue and red)
---
Changes in v2:
- sort unsorted #ifdef list in lacie_kw.h
- add entry to MAINTAINERS
- remove unused GPIO definitions
- remove empty misc_init_r()
- add Machine ID
- Use #define values for ethernet phy init
- checkpatch compliant
MAINTAINERS | 4 + board/LaCie/cloudbox/Makefile | 46 +++++++++++ board/LaCie/cloudbox/cloudbox.c | 89 ++++++++++++++++++++ board/LaCie/cloudbox/cloudbox.h | 36 ++++++++ board/LaCie/cloudbox/kwbimage.cfg | 167 ++++++++++++++++++++++++++++++++++++++ boards.cfg | 1 + include/configs/lacie_kw.h | 14 +++- 7 files changed, 354 insertions(+), 3 deletions(-) create mode 100644 board/LaCie/cloudbox/Makefile create mode 100644 board/LaCie/cloudbox/cloudbox.c create mode 100644 board/LaCie/cloudbox/cloudbox.h create mode 100644 board/LaCie/cloudbox/kwbimage.cfg
MAINTAINERS +4 -0
@@ -770,6 +770,10 @@ Sergey Lapin <[email protected]> afeb9260 ARM926EJS (AT91SAM9260 SoC) +Frederic Leroy <[email protected]> + + cloudbox ARM926EJS (Kirkwood SoC) + Valentin Longchamp <[email protected]> km_kirkwood ARM926EJS (Kirkwood SoC)
board/LaCie/cloudbox/Makefile new file +46 -0
46 lines not on this page · raw message
board/LaCie/cloudbox/cloudbox.c new file +89 -0
89 lines not on this page · raw message
board/LaCie/cloudbox/cloudbox.h new file +36 -0
@@ -0,0 +1,36 @@ +/* +* Copyright (C) 2013 Frederic Leroy <[email protected]> +* +* Based on LaCie u-boot sources +* +* 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 CLOUDBOX_H +#define CLOUDBOX_H + +/* GPIO configuration */ +#define CLOUDBOX_OE_LOW 0xF0310000 +#define CLOUDBOX_OE_HIGH 0x00000001 +#define CLOUDBOX_OE_VAL_LOW 0x00000010 +#define CLOUDBOX_OE_VAL_HIGH 0x00000000 + +#define CLOUDBOX_GPIO_BUTTON 16 + +#endif /* CLOUDBOX_H */
board/LaCie/cloudbox/kwbimage.cfg new file +167 -0
167 lines not on this page · raw message
boards.cfg +1 -0
@@ -170,6 +170,7 @@ kmsuv31 arm arm926ejs km_arm keymile mgcoge3un arm arm926ejs km_arm keymile kirkwood km_kirkwood:KM_MGCOGE3UN kmcoge5un arm arm926ejs km_arm keymile kirkwood km_kirkwood:KM_COGE5UN portl2 arm arm926ejs km_arm keymile kirkwood km_kirkwood:KM_PORTL2 +cloudbox arm arm926ejs cloudbox LaCie kirkwood lacie_kw:CLOUDBOX d2net_v2 arm arm926ejs net2big_v2 LaCie kirkwood lacie_kw:D2NET_V2 inetspace_v2 arm arm926ejs netspace_v2 LaCie kirkwood lacie_kw:INETSPACE_V2 net2big_v2 arm arm926ejs net2big_v2 LaCie kirkwood lacie_kw:NET2BIG_V2
include/configs/lacie_kw.h +11 -3
@@ -21,7 +21,9 @@/* * Machine number definition */ -#if defined(CONFIG_D2NET_V2 ) +#if defined(CONFIG_CLOUDBOX ) +#define CONFIG_IDENT_STRING " CloudBox" +#elif defined(CONFIG_D2NET_V2 )#define CONFIG_MACH_TYPE MACH_TYPE_D2NET_V2#define CONFIG_IDENT_STRING " D2 v2"#elif defined(CONFIG_INETSPACE_V2 )
@@ -70,9 +72,11 @@#define CONFIG_CMD_DHCP #define CONFIG_CMD_PING #define CONFIG_CMD_SF +#if !defined(CONFIG_CLOUDBOX )#define CONFIG_CMD_I2C +#endif #define CONFIG_CMD_IDE -#ifndef CONFIG_NETSPACE_MINI_V2 /* No USB ports on Network Space v2 Mini */ +#if !defined(CONFIG_NETSPACE_MINI_V2 ) && !defined(CONFIG_CLOUDBOX )#define CONFIG_CMD_USB #endif
@@ -111,7 +115,9 @@#define CONFIG_ENV_SPI_MAX_HZ 20000000/* 20Mhz */ #define CONFIG_SYS_IDE_MAXBUS 1#define CONFIG_SYS_IDE_MAXDEVICE 1 -#if defined(CONFIG_D2NET_V2 ) +#if defined(CONFIG_CLOUDBOX ) +#define CONFIG_SYS_PROMPT "cb> " +#elif defined(CONFIG_D2NET_V2 )#define CONFIG_SYS_PROMPT "d2v2> "#elif defined(CONFIG_NET2BIG_V2 )#define CONFIG_SYS_PROMPT "2big2> "
@@ -122,7 +128,9 @@/* * Enable platform initialisation via misc_init_r() function */ +#if !defined(CONFIG_CLOUDBOX )#define CONFIG_MISC_INIT_R +#endif /* * Ethernet Driver configuration
Signature · 1 line
1.8.1.2
PATCH v2 3/4 LaCie/common: Fix cloudbox ethernet leds
In reply to Frédéric LeroyThe cloudbox device have a different ethernet phy setup than other ns2 devices. We get initialization value from the GPL LaCie source
--- board/LaCie/common/common.c | 13 ++++++++++--- include/configs/lacie_kw.h | 5 +++++ 2 files changed, 15 insertions(+), 3 deletions(-)
board/LaCie/common/common.c +10 -3
@@ -21,6 +21,12 @@#define MV88E1116_RGMII_TXTM_CTRL (1 << 4)#define MV88E1116_RGMII_RXTM_CTRL (1 << 5) +#if !defined(MII_MARVELL_LED_REG ) +# define MII_MARVELL_LED_REG 16 +# define MII_MARVELL_LED_MASK 0xf0 +# define MII_MARVELL_LED_VALUE 0x0f +#endif +void mv_phy_88e1116_init (const char *name,u16 phyaddr) {u16 reg;
@@ -53,9 +59,10 @@ void mv_phy_88e1318_init(const char *name, u16 phyaddr)* Set control mode 4 for LED[0]. */ miiphy_write (name, phyaddr,MII_MARVELL_PHY_PAGE ,3 ); -miiphy_read (name, phyaddr,16 , ®); - reg |=0xf ; -miiphy_write (name, phyaddr,16 , reg); +miiphy_read (name, phyaddr,MII_MARVELL_LED_REG , ®); + reg &=MII_MARVELL_LED_MASK ; + reg |=MII_MARVELL_LED_VALUE ; +miiphy_write (name, phyaddr,MII_MARVELL_LED_REG , reg);/* * Enable RGMII delay on Tx and Rx for CPU port
include/configs/lacie_kw.h +5 -0
@@ -138,6 +138,11 @@#ifdef CONFIG_CMD_NET #define CONFIG_MVGBE_PORTS {1, 0}/* enable port 0 only */ #define CONFIG_NETCONSOLE +#if defined(CONFIG_CLOUDBOX ) +# define MII_MARVELL_LED_REG 17 +# define MII_MARVELL_LED_MASK 0xffc0 +# define MII_MARVELL_LED_VALUE 0x15 +#endif #endif /*
Signature · 1 line
1.8.1.2
PATCH v2 3/4 LaCie/common: Fix cloudbox ethernet leds
Quoted 8 lines · Fr?d?ric Leroy
The cloudbox device have a different ethernet phy setup than other ns2 devices. We get initialization value from the GPL LaCie source
Signed-off-by Fr?d?ric Leroy <[email protected]>--- board/LaCie/common/common.c | 13 ++++++++++--- include/configs/lacie_kw.h | 5 +++++ 2 files changed, 15 insertions(+), 3 deletions(-)
Quoted 50 lines
board/LaCie/common/common.c +10
-3@@ -21,6 +21,12 @@#define MV88E1116_RGMII_TXTM_CTRL (1 << 4)#define MV88E1116_RGMII_RXTM_CTRL (1 << 5) +#if !defined(MII_MARVELL_LED_REG ) +# define MII_MARVELL_LED_REG 16 +# define MII_MARVELL_LED_MASK 0xf0 +# define MII_MARVELL_LED_VALUE 0x0f +#endif +void mv_phy_88e1116_init (const char *name,u16 phyaddr) {u16 reg;@@ -53,9 +59,10 @@ void mv_phy_88e1318_init(const char *name, u16 phyaddr)* Set control mode 4 for LED[0]. */ miiphy_write (name, phyaddr,MII_MARVELL_PHY_PAGE ,3 ); -miiphy_read (name, phyaddr,16 , ®); - reg |=0xf ; -miiphy_write (name, phyaddr,16 , reg); +miiphy_read (name, phyaddr,MII_MARVELL_LED_REG , ®); + reg &=MII_MARVELL_LED_MASK ; + reg |=MII_MARVELL_LED_VALUE ; +miiphy_write (name, phyaddr,MII_MARVELL_LED_REG , reg);/* * Enable RGMII delay on Tx and Rx for CPU port include/configs/lacie_kw.h +5
-0@@ -138,6 +138,11 @@#ifdef CONFIG_CMD_NET #define CONFIG_MVGBE_PORTS {1, 0}/* enable port 0 only */ #define CONFIG_NETCONSOLE +#if defined(CONFIG_CLOUDBOX ) +# define MII_MARVELL_LED_REG 17 +# define MII_MARVELL_LED_MASK 0xffc0 +# define MII_MARVELL_LED_VALUE 0x15 +#endif #endif /* Signature · 1 line
1.8.1.2
-------------- 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/20130701/37aef6c6/attachment.pgp>
[U-Boot] compiled failed when turned off gcc optimazition
Hi, experts:
I tried to turn off gcc optimazition by changing config.mk file:
OPTFLAGS= -O0 #-fomit-frame-pointer
But failed to compile u-boot, it tipped:
....../home/lion/Origen0921/arm-2010.09/bin/arm-none-eabi-ld:arch/arm/cpu/armv7/libarmv7.o: relocation R_ARM_MOVW_ABS_NC against `a local symbol' can not be used when making a shared object; recompile with -fPICarch/arm/cpu/armv7/libarmv7.o: could not read symbols: Bad value make[1]: *** [u-boot] Error 1
make[1]: Leaving directory `/home/lion/DebugLinux/uboot-0627/u-boot'
make: *** [smdkc100] Error 2
Best wishes,
[U-Boot] compiled failed when turned off gcc optimazition
Dear TigerLiu at viatech.com.cn,
Quoted 5 lines · In message <[email protected]>…
I tried to turn off gcc optimazition by changing config.mk file:
OPTFLAGS= -O0 #-fomit-frame-pointerBut failed to compile u-boot, it tipped:
Don't do it, then.
Q: why would you want to switch off optimization? That's almost always a bad idea...
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 have made mistakes, but have never made the mistake of claiming I never made one. - James G. Bennet
[U-Boot] compiled failed when turned off gcc optimazition
Hi, Denk:
During debug u-boot with JTAG tools, maybe turning off optimizations was recommended.
Best wishes,
-----????-----
???: Wolfgang Denk [mailto:wd at denx.de]
????: 2013?7?1? 18:03
???: Tiger Liu
??: u-boot at lists.denx.de
??: Re: [U-Boot] compiled failed when turned off gcc optimazition
Dear TigerLiu at viatech.com.cn,
Quoted 5 lines · In message <[email protected]>…
I tried to turn off gcc optimazition by changing config.mk file:
OPTFLAGS= -O0 #-fomit-frame-pointerBut failed to compile u-boot, it tipped:
Don't do it, then.
Q: why would you want to switch off optimization? That's almost always a bad idea...
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 have made mistakes, but have never made the mistake of claiming I never made one. - James G. Bennet
[U-Boot] compiled failed when turned off gcc optimazition
Dear TigerLiu at viatech.com.cn,
please do not top post / full quote.
Quoted 2 lines · In message <[email protected]>…
During debug u-boot with JTAG tools, maybe turning off optimizations was recommended.
Many people recommend many things. Even strange or non-working or incorrect or dangerous ones.
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 There's no future in time travel.
[U-Boot] compiled failed when turned off gcc optimazition
Quoted 10 lines · Wolfgang Denk
Dear TigerLiu at viatech.com.cn,
please do not top post / full quote.
Quoted 2 lines · In message <[email protected]>…
During debug u-boot with JTAG tools, maybe turning off optimizations was recommended.
Many people recommend many things. Even strange or non-working or incorrect or dangerous ones.
A while back I tried this for the Linux kernel, with similiar results. I just let it go without investigating further, guessing that maybe some tricks with compiler directives were incompatible with turning off optimization.
But there's a good motivation for wanting to turn off optimization. Single-stepping with a debugger at the C source level is almost useless. I've since gotten better at single-stepping at the assembly level while using the mixed c and assembly view of gdb.
Mike
[U-Boot] compiled failed when turned off gcc optimazition
Dear Mike Dunn,
Quoted 2 lines · In message <[email protected]> you wrote:
But there's a good motivation for wanting to turn off optimization.
I disagree here. If you are hunting down a problem, you want to be as close at the original code as possible. Disabling optimization is such a dramatic change to the generated code that you actually debug a different program.
Quoted 3 lines
Single-stepping with a debugger at the C source level is almost useless. I've since gotten better at single-stepping at the assembly level while using the mixed c and assembly view of gdb.
Hm... Did you read up the documentation, say [1], and try out these recommendations?
[1] http://www.denx.de/wiki/view/DULG/DebuggingTricks
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 You've no idea of what a poor opinion I have of myself, and how little I deserve it. - W. S. Gilbert
[U-Boot] compiled failed when turned off gcc optimazition
Quoted 10 lines · Wolfgang Denk
Dear Mike Dunn,
Quoted 2 lines · In message <[email protected]> you wrote:
But there's a good motivation for wanting to turn off optimization.
I disagree here. If you are hunting down a problem, you want to be as close at the original code as possible. Disabling optimization is such a dramatic change to the generated code that you actually debug a different program.
I guess it depends on what problem being debugged... I think your point is valid for things like tracking down race conditions or misbehaving hardware. But for more mundane problems like logical errors in the code, optimizations get in the way. It would be nice to be able to experiment with optimizations off. Just knowing that a particular problem still exists when unoptimized code is run will provide some clues.
Quoted 9 lines
Quoted 4 lines
Single-stepping with a debugger at the C source level is almost useless. I've since gotten better at single-stepping at the assembly level while using the mixed c and assembly view of gdb.
Hm... Did you read up the documentation, say [1], and try out these recommendations?
No, but I will. Many thanks!
Mike
[U-Boot] compiled failed when turned off gcc optimazition
Hi Mike,
Quoted 13 lines · Mike Dunn
Quoted 10 lines · Wolfgang Denk
Dear Mike Dunn,
Quoted 2 lines · In message <[email protected]> you wrote:
But there's a good motivation for wanting to turn off optimization.
I disagree here. If you are hunting down a problem, you want to be as close at the original code as possible. Disabling optimization is such a dramatic change to the generated code that you actually debug a different program.
Quoted 12 lines
I guess it depends on what problem being debugged... I think your point is valid for things like tracking down race conditions or misbehaving hardware.
But for more mundane problems like logical errors in the code, optimizations get
in the way. It would be nice to be able to experiment with optimizations off.
Just knowing that a particular problem still exists when unoptimized code is run
will provide some clues.
Do be honest, I have never used an online debugger
I have always found that a combination of hardware LEDs and printf's has been more than sufficient, particularly for mundane issues.
I'll freely admit that an online debugger might been faster for me, but I just wanted to point out that there is more than one way to skin a cat.
I also believe that the more onerous the debugging tool is (and it doesn't get more so than using the hardware LEDs) the more attention you pay to the code rather than the output ;)
Regards,
Graeme
[U-Boot] compiled failed when turned off gcc optimazition
Hi, experts:
Would any expert fix this question?
It seems related MOVW instruction's usuage when turning off gcc optimazition.
If i just turned on "-O1" or "-O2", still failed to compile uboot code.
Best wishes,
[U-Boot] compiled failed when turned off gcc optimazitionAT
Hi TigerLiu at viatech.com.cn,
Quoted 10 lines · On Fri, 5 Jul 2013 18:31:50 +0800, <[email protected]> wrote:
Hi, experts:
Would any expert fix this question?
It seems related MOVW instruction's usuage when turning off gcc optimazition.
If i just turned on "-O1" or "-O2", still failed to compile uboot code.
I have seen the issue arise, and looked it up with the help of Jeroen Hofstee (Cc:). It is somehow related to the fact that on ARM, U-Boot (especially the DM) relies on ARM ELF relocation records all being of the R_ARM_RELATIVE type, while for -O{0,1,2} the compiler generates (some) MOVW-related relocation record types.
I have local branches related to this. I need to go through them and will post them but not for 2013.07 as these are not fixes, and there is no bug per se since U-Boot is supposed to build with -Os, not -O{0,1,2}.
Quoted 1 line
Best wishes,
Amicalement,
Signature · 1 line
Albert.
PATCH v2 4/4 arm: add machine ID for CloudBox
In reply to Frédéric LeroyCloudBox device is device tree compliant, but older LaCie kernel uses machine ID method to boot.
--- arch/arm/include/asm/mach-types.h | 14 ++++++++++++++ board/LaCie/cloudbox/cloudbox.c | 7 ++++++- include/configs/lacie_kw.h | 1 + 3 files changed, 21 insertions(+), 1 deletion(-)
arch/arm/include/asm/mach-types.h +14 -0
@@ -1106,6 +1106,7 @@ extern unsigned int __machine_arch_type;#define MACH_TYPE_OMAP5_SEVM 3777#define MACH_TYPE_ARMADILLO_800EVA 3863#define MACH_TYPE_KZM9G 4140 +#define MACH_TYPE_CLOUDBOX 4170#ifdef CONFIG_ARCH_EBSA110 # ifdef machine_arch_type
@@ -14235,6 +14236,19 @@ extern unsigned int __machine_arch_type;# define machine_is_kzm9g () (0)#endif +#ifdef CONFIG_MACH_CLOUDBOX +# ifdef machine_arch_type +# undef machine_arch_type +# define machine_arch_type __machine_arch_type +# else +# define machine_arch_type MACH_TYPE_CLOUDBOX +# endif +# define machine_cloudbox () (machine_arch_type == MACH_TYPE_CLOUDBOX) +#else +# define machine_cloudbox () (0) +#endif + +/* * These have not yet been registered */
board/LaCie/cloudbox/cloudbox.c +6 -1
@@ -64,7 +64,12 @@ int board_early_init_f(void)int board_init (void ) { -/* Nothing to do with fdt */ +/* 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 ; }
include/configs/lacie_kw.h +1 -0
@@ -22,6 +22,7 @@* Machine number definition */ #if defined(CONFIG_CLOUDBOX ) +#define CONFIG_MACH_TYPE MACH_TYPE_CLOUDBOX#define CONFIG_IDENT_STRING " CloudBox"#elif defined(CONFIG_D2NET_V2 )#define CONFIG_MACH_TYPE MACH_TYPE_D2NET_V2
Signature · 1 line
1.8.1.2
PATCH v2 4/4 arm: add machine ID for CloudBox
Quoted 27 lines · Fr?d?ric Leroy
CloudBox device is device tree compliant, but older LaCie kernel uses machine ID method to boot.
Signed-off-by Fr?d?ric Leroy <[email protected]>--- arch/arm/include/asm/mach-types.h | 14 ++++++++++++++ board/LaCie/cloudbox/cloudbox.c | 7 ++++++- include/configs/lacie_kw.h | 1 + 3 files changed, 21 insertions(+), 1 deletion(-)arch/arm/include/asm/mach-types.h +2
-0@@ -1106,6 +1106,7 @@ extern unsigned int __machine_arch_type;#define MACH_TYPE_OMAP5_SEVM 3777#define MACH_TYPE_ARMADILLO_800EVA 3863#define MACH_TYPE_KZM9G 4140 +#define MACH_TYPE_CLOUDBOX 4170#ifdef CONFIG_ARCH_EBSA110 # ifdef machine_arch_type@@ -14235,6 +14236,19 @@ extern unsigned int __machine_arch_type;# define machine_is_kzm9g () (0)#endif +#ifdef CONFIG_MACH_CLOUDBOX
arch/arm/include/asm/mach-types.h extern unsigned int __machine_arch_type; · line 14249
Quoted 10 lines
arch/arm/include/asm/mach-types.h +10
-0+# ifdef machine_arch_type +# undef machine_arch_type +# define machine_arch_type __machine_arch_type +# else +# define machine_arch_type MACH_TYPE_CLOUDBOX +# endif +# define machine_cloudbox () (machine_arch_type == MACH_TYPE_CLOUDBOX) +#else +# define machine_cloudbox () (0) +#endif
Hi Fred,
I think you can't update this file directly. Pulling the Linux mach-types file is the ARM maintainer job.
Note that for the CloudBox board, the mach-types entry has been removed because not needed by Linux. The Linux mainline support is only based on DT. I had the same issue with the ns2 lite and mini. At the time, I have been told to include the machine ID in the board header:
http://marc.info/?l=u-boot&m=134694402011372&w=2
Looks in configs/lacie_kw.h and grep for "missing in mach-types.h".
Besides, I don't understand why do you need a separate patch to add the legacy boot support.
Simon
Quoted 37 lines
arch/arm/include/asm/mach-types.h +2
-0+ +/* * These have not yet been registered */ board/LaCie/cloudbox/cloudbox.c +6
-1@@ -64,7 +64,12 @@ int board_early_init_f(void)int board_init (void ) { -/* Nothing to do with fdt */ +/* 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 ; }include/configs/lacie_kw.h +1
-0@@ -22,6 +22,7 @@* Machine number definition */ #if defined(CONFIG_CLOUDBOX ) +#define CONFIG_MACH_TYPE MACH_TYPE_CLOUDBOX#define CONFIG_IDENT_STRING " CloudBox"#elif defined(CONFIG_D2NET_V2 )#define CONFIG_MACH_TYPE MACH_TYPE_D2NET_V2Signature · 1 line
1.8.1.2
-------------- 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/20130701/dd40ba78/attachment.pgp>
PATCH v2 4/4 arm: add machine ID for CloudBox
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Le 01/07/2013 00:53, Simon Guinot a ?crit :
Quoted 14 lines · Fr?d?ric Leroy
arch/arm/include/asm/mach-types.h extern unsigned int __machine_arch_type; · line 14249
Quoted 7 lines
CloudBox device is device tree compliant, but older LaCie kernel uses machine ID method to boot.
Signed-off-by Fr?d?ric Leroy <[email protected]>[...]arch/arm/include/asm/mach-types.h +2
-0+# define machine_cloudbox () (0) +#endif Hi Fred,
I think you can't update this file directly. Pulling the Linux mach-types file is the ARM maintainer job.
Quoted 7 lines
Note that for the CloudBox board, the mach-types entry has been removed because not needed by Linux. The Linux mainline support is only based on DT. I had the same issue with the ns2 lite and mini. At the time, I have been told to include the machine ID in the board header:
http://marc.info/?l=u-boot&m=134694402011372&w=2Looks in
configs/lacie_kw.hand grep for "missing inmach-types.h".
There is a doublon for netspace_lite_v2 :
$ git grep MACH_TYPE_NETSPACE_ arch/arm/include/asm/mach-types.h:#define MACH_TYPE_NETSPACE_LITE_V2 2983 [...] include/configs/lacie_kw.h:#define MACH_TYPE_NETSPACE_LITE_V2 2983 /* missing in mach-types.h */
Quoted 2 lines
Besides, I don't understand why do you need a separate patch to add the legacy boot support.
Partly because I added CloudBox without it and it seems logical to add it after,
partly because I was not sure of the change of mach_types.h :)
I am not at ease with sending patch to the ML and with patchwork. How should I send the fix ?
A new v3 patch including all but " lacie_kw: sort #ifdef lists by CONFIG_ identifiers"
and "LaCie/common: Fix cloudbox ethernet leds",
or just a v3 of "arm: add machine ID for CloudBox" ?
- --
Fr?d?ric
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iQGcBAEBAgAGBQJR0UwZAAoJEJVX96CfzRSesw8MAKpUfwRAwe8beLAuHUf1xWTh XksHGVuWOoI/lyAuz8AxcnE/EjbzliLGV0k0qDsWxlmVga425VxrY8d5/qZL55Z8 F95yo0aZ1q3EPTaSwjKVTUntJm8WOJesf6cK3YQqTO/1b+hrP+NCGBFL4+vNFPPL 9jtKkMjhOSa+f6X/fIhcCiqATUkX22SRheX7osoLxHFOTQ8baJLxf2Bt0L/g2KRA t36WCYAqENx727LUIYdT3+B9tEEpc2fpCma2CRMmDjKgFrdbyOik/B7+mtk6Pyla xoXQs7rV2OBYUYV2CBwQKfqBHIhrqazWcA+a5M13P90xyLjWJ/RoTAs/a9iMHNwO xyvaDCafIJBloq+GXlkwewQfxZ2AkKADP+Q47hGkYYX8YOCOJ4bz+OQ/UT/M+LJK pg0LBwjj8CUI6FpdxJWvDvxORpBFHPxDXjuz/rMenblph0cAEJH4O9BOlVUUkahw E7/W9U0koVaEKg6Uegmuert1SSDSJwBHRdB+tXljMg==
=dDRp
-----END PGP SIGNATURE-----
PATCH v2 4/4 arm: add machine ID for CloudBox
Quoted 22 lines · Fr?d?ric Leroy
Le 01/07/2013 00:53, Simon Guinot a ?crit :
Quoted 20 lines · Fr?d?ric Leroy
arch/arm/include/asm/mach-types.h extern unsigned int __machine_arch_type; · line 14249
Quoted 7 lines
CloudBox device is device tree compliant, but older LaCie kernel uses machine ID method to boot.
Signed-off-by Fr?d?ric Leroy <[email protected]>[...]arch/arm/include/asm/mach-types.h +2
-0+# define machine_cloudbox () (0) +#endif Hi Fred,
I think you can't update this file directly. Pulling the Linux mach-types file is the ARM maintainer job.
Note that for the CloudBox board, the mach-types entry has been removed because not needed by Linux. The Linux mainline support is only based on DT. I had the same issue with the ns2 lite and mini. At the time, I have been told to include the machine ID in the board header:
http://marc.info/?l=u-boot&m=134694402011372&w=2
Quoted 6 lines
Quoted 1 line
Looks in
configs/lacie_kw.hand grep for "missing inmach-types.h".There is a doublon for
netspace_lite_v2:$ git grep MACH_TYPE_NETSPACE_ arch/arm/include/asm/mach-types.h:#define MACH_TYPE_NETSPACE_LITE_V2 2983
This one will probably disappear soon because the Linux support for this board is only based on DT...
Quoted 11 lines
[...]
include/configs/lacie_kw.h:#defineMACH_TYPE_NETSPACE_LITE_V22983 /*
missing inmach-types.h*/Quoted 2 lines
Besides, I don't understand why do you need a separate patch to add the legacy boot support.
Partly because I added CloudBox without it and it seems logical to add it after,
partly because I was not sure of the change ofmach_types.h:)
Quoted 6 lines
I am not at ease with sending patch to the ML and with patchwork. How should I send the fix ?
A new v3 patch including all but "lacie_kw: sort #ifdef lists byCONFIG_identifiers"
and "LaCie/common: Fix cloudbox ethernet leds",
or just a v3 of "arm: add machine ID for CloudBox" ?
I think that you must resend the whole patch series even if you keep some patches unchanged.
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/20130701/f61a1ee2/attachment.pgp>
PATCH 1/2 arm: add support for LaCie CloudBox
In reply to Frederic LeroyQuoted 1 line · Frederic Leroy
From: Fr?d?ric Leroy <[email protected]>
Hi Fr?d?ric,
Quoted 4 lines
The LaCie CloudBox device is a Kirkwood based nas :
- SoC: Marvell 88F6700 1000Mhz
88F6702
Quoted 136 lines
- SDRAM memory: 256MB DDR2 400Mhz
- Gigabit ethernet: PHY Marvell 88E1318
- Flash memory: SPI NOR 512KB (Macronix MX25L4005A)
- 1 push button
- 1 reset switch
- 1 SATA port
- 1 LED (bi-color, blue and red)Signed-off-by Fr?d?ric Leroy <[email protected]>--- board/LaCie/cloudbox/Makefile | 46 +++++++++++ board/LaCie/cloudbox/cloudbox.c | 104 ++++++++++++++++++++++++ board/LaCie/cloudbox/cloudbox.h | 36 ++++++++ board/LaCie/cloudbox/kwbimage.cfg | 167 ++++++++++++++++++++++++++++++++++++++ boards.cfg | 1 + include/configs/lacie_kw.h | 8 +- 6 files changed, 361 insertions(+), 1 deletion(-) create mode 100644 board/LaCie/cloudbox/Makefile create mode 100644 board/LaCie/cloudbox/cloudbox.c create mode 100644 board/LaCie/cloudbox/cloudbox.h create mode 100644 board/LaCie/cloudbox/kwbimage.cfgboard/LaCie/cloudbox/Makefile new file +46
-0@@ -0,0 +1,46 @@ +# +# Copyright (C) 2013 Frederic Leroy <[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 +ifneq ($(OBJTREE),$(SRCTREE)) +$(shell mkdir -p $(obj)../common) +endif + +LIB = $(obj)lib$(BOARD).o + +COBJS := $(BOARD).o ../common/common.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)) + +######################################################################### + +# defines $(obj).depend target +include $(SRCTREE)/rules.mk + +sinclude $(obj).depend + +#########################################################################board/LaCie/cloudbox/cloudbox.c new file +56
-0@@ -0,0 +1,104 @@ +/* +* Copyright (C) 2013 Frederic Leroy <[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 <command.h> +#include <asm/arch/cpu.h> +#include <asm/arch/kirkwood.h> +#include <asm/arch/mpp.h> +#include <asm/arch/gpio.h> + +#include "cloudbox.h" +#include "../common/common.h" + +DECLARE_GLOBAL_DATA_PTR ; + +int board_early_init_f (void ) +{ +/* Gpio configuration */ +kw_config_gpio (CLOUDBOX_OE_VAL_LOW ,CLOUDBOX_OE_VAL_HIGH , +CLOUDBOX_OE_LOW ,CLOUDBOX_OE_HIGH ); + +/* Multi-Purpose Pins Functionality configuration */ +static const u32 kwmpp_config[] = { + MPP0_SPI_SCn, +MPP1_SPI_MOSI , +MPP2_SPI_SCK , +MPP3_SPI_MISO , +MPP4_GPIO ,/* hard disk power */ +MPP5_GPO , + MPP6_SYSRST_OUTn, +MPP7_GPO , +MPP8_TW_SDA , +MPP9_TW_SCK , +MPP10_UART0_TXD , +MPP11_UART0_RXD , +MPP12_GPO , +MPP14_GPIO ,/* LED red control */
board/LaCie/cloudbox/cloudbox.c line 66
Quoted 10 lines
board/LaCie/cloudbox/cloudbox.c new file +10
-0+ MPP15_SATA0_ACTn,/* LED blue control */ +MPP16_GPIO ,/* power push buton */ +MPP17_GPIO ,/* board power off */ +MPP20_GPIO ,/* Ethernet PHY interrupt (WoL) */ +MPP28_GPIO ,/* board revision (LSB) */ +MPP29_GPIO ,/* board revision */ +MPP30_GPIO ,/* board revision */ +MPP31_GPIO ,/* board revision */ +MPP32_GPIO ,/* board revision (MSB) */ +0
The MPPs 5, 7 and 12 are not used. Please drop their configuration.
Moreover, AFAIK, the board revision GPIOs are not used. I am not even sure they hold a coherent value.
board/LaCie/cloudbox/cloudbox.c line 76
Quoted 10 lines
board/LaCie/cloudbox/cloudbox.c new file +10
-0+ }; +kirkwood_mpp_conf (kwmpp_config,NULL ); + +return 0 ; +} + +int board_init (void ) +{ +/* Nothing to do with fdt */ +return 0 ;
In addition, can we also set the machine ID ? Without breaking the DT boot ? It would be nice to support the two Linux booting methods: DT and legacy (machine ID, ATAGs). Note that the Linux kernel provided by the LaCie stock firmware is not DT compliant.
board/LaCie/cloudbox/cloudbox.c line 84
Quoted 8 lines
board/LaCie/cloudbox/cloudbox.c new file +8
-0+} + +#if defined(CONFIG_MISC_INIT_R ) +int misc_init_r (void ) +{ +return 0 ; +} +#endif /* CONFIG_MISC_INIT_R */
Maybe you could simply undef CONFIG_MISC_INIT_R ?
Except the points above, the whole patch looks good to me.
Thanks,
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/20130625/fbca2899/attachment.pgp>
PATCH 1/2 arm: add support for LaCie CloudBox
Quoted 191 lines · Simon Guinot
Quoted 1 line · Frederic Leroy
From: Fr?d?ric Leroy <[email protected]>
Hi Fr?d?ric,
Quoted 4 lines
The LaCie CloudBox device is a Kirkwood based nas :
- SoC: Marvell 88F6700 1000Mhz
88F6702
Quoted 136 lines
- SDRAM memory: 256MB DDR2 400Mhz
- Gigabit ethernet: PHY Marvell 88E1318
- Flash memory: SPI NOR 512KB (Macronix MX25L4005A)
- 1 push button
- 1 reset switch
- 1 SATA port
- 1 LED (bi-color, blue and red)Signed-off-by Fr?d?ric Leroy <[email protected]>--- board/LaCie/cloudbox/Makefile | 46 +++++++++++ board/LaCie/cloudbox/cloudbox.c | 104 ++++++++++++++++++++++++ board/LaCie/cloudbox/cloudbox.h | 36 ++++++++ board/LaCie/cloudbox/kwbimage.cfg | 167 ++++++++++++++++++++++++++++++++++++++ boards.cfg | 1 + include/configs/lacie_kw.h | 8 +- 6 files changed, 361 insertions(+), 1 deletion(-) create mode 100644 board/LaCie/cloudbox/Makefile create mode 100644 board/LaCie/cloudbox/cloudbox.c create mode 100644 board/LaCie/cloudbox/cloudbox.h create mode 100644 board/LaCie/cloudbox/kwbimage.cfgboard/LaCie/cloudbox/Makefile new file +46
-0@@ -0,0 +1,46 @@ +# +# Copyright (C) 2013 Frederic Leroy <[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 +ifneq ($(OBJTREE),$(SRCTREE)) +$(shell mkdir -p $(obj)../common) +endif + +LIB = $(obj)lib$(BOARD).o + +COBJS := $(BOARD).o ../common/common.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)) + +######################################################################### + +# defines $(obj).depend target +include $(SRCTREE)/rules.mk + +sinclude $(obj).depend + +#########################################################################board/LaCie/cloudbox/cloudbox.c new file +56
-0@@ -0,0 +1,104 @@ +/* +* Copyright (C) 2013 Frederic Leroy <[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 <command.h> +#include <asm/arch/cpu.h> +#include <asm/arch/kirkwood.h> +#include <asm/arch/mpp.h> +#include <asm/arch/gpio.h> + +#include "cloudbox.h" +#include "../common/common.h" + +DECLARE_GLOBAL_DATA_PTR ; + +int board_early_init_f (void ) +{ +/* Gpio configuration */ +kw_config_gpio (CLOUDBOX_OE_VAL_LOW ,CLOUDBOX_OE_VAL_HIGH , +CLOUDBOX_OE_LOW ,CLOUDBOX_OE_HIGH ); + +/* Multi-Purpose Pins Functionality configuration */ +static const u32 kwmpp_config[] = { + MPP0_SPI_SCn, +MPP1_SPI_MOSI , +MPP2_SPI_SCK , +MPP3_SPI_MISO , +MPP4_GPIO ,/* hard disk power */ +MPP5_GPO , + MPP6_SYSRST_OUTn, +MPP7_GPO , +MPP8_TW_SDA , +MPP9_TW_SCK , +MPP10_UART0_TXD , +MPP11_UART0_RXD , +MPP12_GPO , +MPP14_GPIO ,/* LED red control */ board/LaCie/cloudbox/cloudbox.c line 66
Quoted 10 lines
board/LaCie/cloudbox/cloudbox.c new file +10
-0+ MPP15_SATA0_ACTn,/* LED blue control */ +MPP16_GPIO ,/* power push buton */ +MPP17_GPIO ,/* board power off */ +MPP20_GPIO ,/* Ethernet PHY interrupt (WoL) */ +MPP28_GPIO ,/* board revision (LSB) */ +MPP29_GPIO ,/* board revision */ +MPP30_GPIO ,/* board revision */ +MPP31_GPIO ,/* board revision */ +MPP32_GPIO ,/* board revision (MSB) */ +0 The MPPs 5, 7 and 12 are not used. Please drop their configuration.
Moreover, AFAIK, the board revision GPIOs are not used. I am not even sure they hold a coherent value.
board/LaCie/cloudbox/cloudbox.c line 76
Quoted 10 lines
board/LaCie/cloudbox/cloudbox.c new file +10
-0+ }; +kirkwood_mpp_conf (kwmpp_config,NULL ); + +return 0 ; +} + +int board_init (void ) +{ +/* Nothing to do with fdt */ +return 0 ;In addition, can we also set the machine ID ? Without breaking the DT boot ? It would be nice to support the two Linux booting methods: DT and legacy (machine ID, ATAGs). Note that the Linux kernel provided by the LaCie stock firmware is not DT compliant.
board/LaCie/cloudbox/cloudbox.c line 84
Quoted 8 lines
board/LaCie/cloudbox/cloudbox.c new file +8
-0+} + +#if defined(CONFIG_MISC_INIT_R ) +int misc_init_r (void ) +{ +return 0 ; +} +#endif /* CONFIG_MISC_INIT_R */ Maybe you could simply undef
CONFIG_MISC_INIT_R?
Quoted 1 line
Except the points above, the whole patch looks good to me.
In addition, you should also fix the checkpatch warnings.
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/20130625/2798c7e7/attachment.pgp>
PATCH 2/2 LaCie/common: Fix cloudbox ethernet leds
In reply to Frederic LeroyFrom: Fr?d?ric Leroy <[email protected]>
The cloudbox device have a different ethernet phy setup than other ns2 devices. We get initialization value from the GPL LaCie source
--- board/LaCie/common/common.c | 8 ++++++++ 1 file changed, 8 insertions(+)
board/LaCie/common/common.c +8 -0
@@ -52,10 +52,18 @@ void mv_phy_88e1318_init(const char *name, u16 phyaddr)/* * Set control mode 4 for LED[0]. */ +#ifndef CONFIG_CLOUDBOX miiphy_write (name, phyaddr,MII_MARVELL_PHY_PAGE ,3 );miiphy_read (name, phyaddr,16 , ®); reg |=0xf ;miiphy_write (name, phyaddr,16 , reg); +#else +miiphy_write (name, phyaddr,MII_MARVELL_PHY_PAGE ,3 ); +miiphy_read (name, phyaddr,17 , ®); + reg &= ~0x3f ; + reg |=0x15 ; +miiphy_write (name, phyaddr,17 , reg); +#endif /* * Enable RGMII delay on Tx and Rx for CPU port
Signature · 1 line
1.8.1.2
PATCH 2/2 LaCie/common: Fix cloudbox ethernet leds
Dear Frederic Leroy,
Quoted 5 lines · In message <[email protected]> you wrote:
board/LaCie/common/common.c +0
-0
...
Quoted 1 line
board/LaCie/common/common.c +1
-0+#ifndef CONFIG_CLOUDBOX
...
Quoted 1 line
board/LaCie/common/common.c +1
-0+#else
...
board/LaCie/common/common.c void mv_phy_88e1318_init(const char *name, u16 phyaddr) · line 66
Quoted 1 line
board/LaCie/common/common.c +1
-0+#endif
Preprocessor statements must start in column 1; please fix.
Also, can we not avoid the #ifdef alltogether by providing a #define for the register number to read? This could then be done in the board config file.
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 Children begin by loving their parents. After a time they judge them. Rarely, if ever, do they forgive them. - Oscar Wilde
PATCH 2/2 LaCie/common: Fix cloudbox ethernet leds
In reply to Frederic LeroyQuoted 20 lines · Frederic Leroy
From: Fr?d?ric Leroy <[email protected]>
The cloudbox device have a different ethernet phy setup than other ns2 devices. We get initialization value from the GPL LaCie source
Signed-off-by Fr?d?ric Leroy <[email protected]>--- board/LaCie/common/common.c | 8 ++++++++ 1 file changed, 8 insertions(+)board/LaCie/common/common.c +1
-0@@ -52,10 +52,18 @@ void mv_phy_88e1318_init(const char *name, u16 phyaddr)/* * Set control mode 4 for LED[0]. */ +#ifndef CONFIG_CLOUDBOX miiphy_write (name, phyaddr,MII_MARVELL_PHY_PAGE ,3 );
board/LaCie/common/common.c void mv_phy_88e1318_init(const char *name, u16 phyaddr) · line 66
Quoted 10 lines
board/LaCie/common/common.c +7
-0miiphy_read (name, phyaddr,16 , ®); reg |=0xf ;miiphy_write (name, phyaddr,16 , reg); +#else +miiphy_write (name, phyaddr,MII_MARVELL_PHY_PAGE ,3 ); +miiphy_read (name, phyaddr,17 , ®); + reg &= ~0x3f ; + reg |=0x15 ; +miiphy_write (name, phyaddr,17 , reg); +#endif
This doesn't look very common but I can't figure out a more elegant way.
-------------- 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/20130625/f97b0809/attachment.pgp>