Skip to contentSkip to conversation

LaCie 2Big Network v2 support

PATCH Superseded Simon Guinot 2 participants 9 messages Nov 9, 2011 – Nov 21, 2011 Block layer

lore
Share & tools
lore
#0 lore raw

v2 cover LaCie 2Big Network v2 support

From: Simon Guinot <[email protected]>

This patch series provides support for the LaCie NAS 2Big Network v2.

Changes in v2:
- mv_sata: use MVSATA_xxx for ide_preinit() exit codes.
- Add patch to remove duplicated code for LaCie boards.

Simon Guinot (3):
mvsata: fix ide_preinit for missing disks
ARM: add support for LaCie 2Big Network v2
ARM: remove duplicated code for LaCie boards

 MAINTAINERS                           |    1 +
 board/LaCie/common/common.c           |   87 +++++++++++++++
 board/LaCie/common/common.h           |   20 ++++
 board/LaCie/edminiv2/Makefile         |    5 +-
 board/LaCie/edminiv2/edminiv2.c       |   30 +-----
 board/LaCie/edminiv2/edminiv2.h       |   41 -------
 board/LaCie/net2big_v2/Makefile       |   52 +++++++++
 board/LaCie/net2big_v2/kwbimage.cfg   |  162 +++++++++++++++++++++++++++
 board/LaCie/net2big_v2/net2big_v2.c   |  126 +++++++++++++++++++++
 board/LaCie/net2big_v2/net2big_v2.h   |   35 ++++++
 board/LaCie/netspace_v2/Makefile      |    5 +-
 board/LaCie/netspace_v2/netspace_v2.c |   84 ++-------------
 board/LaCie/netspace_v2/netspace_v2.h |    8 --
 boards.cfg                            |    7 +-
 drivers/block/mvsata_ide.c            |   14 ++-
 include/configs/lacie_kw.h            |  193 +++++++++++++++++++++++++++++++++
 include/configs/netspace_v2.h         |  179 ------------------------------
 17 files changed, 708 insertions(+), 341 deletions(-)
 create mode 100644 board/LaCie/common/common.c
 create mode 100644 board/LaCie/common/common.h
 delete mode 100644 board/LaCie/edminiv2/edminiv2.h
 create mode 100644 board/LaCie/net2big_v2/Makefile
 create mode 100644 board/LaCie/net2big_v2/kwbimage.cfg
 create mode 100644 board/LaCie/net2big_v2/net2big_v2.c
 create mode 100644 board/LaCie/net2big_v2/net2big_v2.h
 create mode 100644 include/configs/lacie_kw.h
 delete mode 100644 include/configs/netspace_v2.h
Signature · 1 line
1.7.5.1
#1 lore raw

PATCH v2 1/3 mvsata: fix ide_preinit for missing disks

From: Simon Guinot <[email protected]>

Consider that ide_preinit() succeed if at least one port is successfully initialized. This allows to iniatialize IDE support on a board with two SATA ports but a single hard disk available.

---
Changes in v2:
- Use MVSATA_xxx defines for exit codes.

 drivers/block/mvsata_ide.c |   14 ++++++++------
 1 files changed, 8 insertions(+), 6 deletions(-)
drivers/block/mvsata_ide.c +8 -6
index 1be395f..a88d0f7 100644
@@ -150,23 +150,25 @@ static int mvsata_ide_initialize_port(struct mvsata_port_registers *port)
 
 int ide_preinit(void)
 {
+	int ret = MVSATA_STATUS_TIMEOUT;
 	int status;
+
 	/* Enable ATA port 0 (could be SATA port 0 or 1) if declared */
 #if defined(CONFIG_SYS_ATA_IDE0_OFFSET)
 	status = mvsata_ide_initialize_port(
 		(struct mvsata_port_registers *)
 		(CONFIG_SYS_ATA_BASE_ADDR + CONFIG_SYS_ATA_IDE0_OFFSET));
-	if (status)
-		return status;
+	if (status == MVSATA_STATUS_OK)
+		ret = MVSATA_STATUS_OK;
 #endif
 	/* Enable ATA port 1 (could be SATA port 0 or 1) if declared */
 #if defined(CONFIG_SYS_ATA_IDE1_OFFSET)
 	status = mvsata_ide_initialize_port(
 		(struct mvsata_port_registers *)
 		(CONFIG_SYS_ATA_BASE_ADDR + CONFIG_SYS_ATA_IDE1_OFFSET));
-	if (status)
-		return status;
+	if (status == MVSATA_STATUS_OK)
+		ret = MVSATA_STATUS_OK;
 #endif
-	/* return success if all ports initializations succeeded */
-	return MVSATA_STATUS_OK;
+	/* Return success if at least one port initialization succeeded */
+	return ret;
 }
Signature · 1 line
1.7.5.1
#2 lore raw

PATCH v2 1/3 mvsata: fix ide_preinit for missing disks

Quoted 67 lines

-----Original Message-----
From: Simon Guinot [mailto:simon at sequanux.org]
Sent: Wednesday, November 09, 2011 10:32 PM
To: Prafulla Wadaskar
Cc: u-boot at lists.denx.de; Albert ARIBAUD; Simon Guinot
Subject: [PATCH v2 1/3] mvsata: fix ide_preinit for missing disks

From: Simon Guinot <[email protected]>

Consider that ide_preinit() succeed if at least one port is successfully
initialized. This allows to iniatialize IDE support on a board with two
SATA ports but a single hard disk available.

---
Changes in v2:
- Use MVSATA_xxx defines for exit codes.

 drivers/block/mvsata_ide.c |   14 ++++++++------
 1 files changed, 8 insertions(+), 6 deletions(-)
drivers/block/mvsata_ide.c +2 -0
index 1be395f..a88d0f7 100644
@@ -150,23 +150,25 @@ static int
 mvsata_ide_initialize_port(struct mvsata_port_registers *port)
 
 int ide_preinit(void)
 {
+	int ret = MVSATA_STATUS_TIMEOUT;
 	int status;
+
 	/* Enable ATA port 0 (could be SATA port 0 or 1) if

declared */
#if defined(CONFIG_SYS_ATA_IDE0_OFFSET)

drivers/block/mvsata_ide.c +0 -0
 	status = mvsata_ide_initialize_port(
 		(struct mvsata_port_registers *)
 		(CONFIG_SYS_ATA_BASE_ADDR +

CONFIG_SYS_ATA_IDE0_OFFSET));

drivers/block/mvsata_ide.c +2 -2
-	if (status)
-		return status;
+	if (status == MVSATA_STATUS_OK)
+		ret = MVSATA_STATUS_OK;
 #endif
 	/* Enable ATA port 1 (could be SATA port 0 or 1) if

declared */
#if defined(CONFIG_SYS_ATA_IDE1_OFFSET)

drivers/block/mvsata_ide.c +0 -0
 	status = mvsata_ide_initialize_port(
 		(struct mvsata_port_registers *)
 		(CONFIG_SYS_ATA_BASE_ADDR +

CONFIG_SYS_ATA_IDE1_OFFSET));

drivers/block/mvsata_ide.c +3 -4
-	if (status)
-		return status;
+	if (status == MVSATA_STATUS_OK)
+		ret = MVSATA_STATUS_OK;
 #endif
-	/* return success if all ports initializations succeeded */
-	return MVSATA_STATUS_OK;
+	/* Return success if at least one port initialization

succeeded */

drivers/block/mvsata_ide.c static int mvsata_ide_initialize_port(struct mvsata_port_registers *port) · line 174

Quoted 2 lines
drivers/block/mvsata_ide.c +1 -0
+	return ret;
 }

Applied to u-boot-marvell.git master branch

Regards..
Prafulla . .

Quoted 2 lines

--
1.7.5.1

#3 lore raw

PATCH v2 2/3 ARM: add support for LaCie 2Big Network v2

In reply to Simon Guinot

From: Simon Guinot <[email protected]>

This patch adds support for the LaCie 2Big Network v2 board, based on the Marvell Kirkwood 6281 SoC.

Additional information is available at:
http://lacie-nas.org/doku.php?id=2big_network_v2

---
No changes in v2.

 MAINTAINERS                         |    1 +
 board/LaCie/net2big_v2/Makefile     |   49 +++++++++
 board/LaCie/net2big_v2/kwbimage.cfg |  162 ++++++++++++++++++++++++++++++
 board/LaCie/net2big_v2/net2big_v2.c |  188 +++++++++++++++++++++++++++++++++++
 board/LaCie/net2big_v2/net2big_v2.h |   43 ++++++++
 boards.cfg                          |    1 +
 include/configs/net2big_v2.h        |  161 ++++++++++++++++++++++++++++++
 7 files changed, 605 insertions(+), 0 deletions(-)
 create mode 100644 board/LaCie/net2big_v2/Makefile
 create mode 100644 board/LaCie/net2big_v2/kwbimage.cfg
 create mode 100644 board/LaCie/net2big_v2/net2big_v2.c
 create mode 100644 board/LaCie/net2big_v2/net2big_v2.h
 create mode 100644 include/configs/net2big_v2.h
MAINTAINERS +1 -0
index 21d1fef..8c2b3a6 100644
@@ -649,6 +649,7 @@ Simon Guinot <[email protected]>
 	inetspace_v2	ARM926EJS (Kirkwood SoC)
 	netspace_v2	ARM926EJS (Kirkwood SoC)
 	netspace_max_v2	ARM926EJS (Kirkwood SoC)
+	net2big_v2	ARM926EJS (Kirkwood SoC)
 
 Igor Grinberg <[email protected]>
 
board/LaCie/net2big_v2/Makefile new file +49 -0

49 lines not on this page · raw message

board/LaCie/net2big_v2/kwbimage.cfg new file +162 -0

162 lines not on this page · raw message

board/LaCie/net2big_v2/net2big_v2.c new file +188 -0

188 lines not on this page · raw message

board/LaCie/net2big_v2/net2big_v2.h new file +43 -0

43 lines not on this page · raw message

boards.cfg +1 -0
index 17effc8..6bb567b 100644
@@ -138,6 +138,7 @@ km_kirkwood_pci              arm         arm926ejs   km_arm              keymile
 mgcoge3un                    arm         arm926ejs   km_arm              keymile        kirkwood
 portl2                       arm         arm926ejs   km_arm              keymile        kirkwood
 inetspace_v2                 arm         arm926ejs   netspace_v2         LaCie          kirkwood    netspace_v2:INETSPACE_V2
+net2big_v2                   arm         arm926ejs   net2big_v2          LaCie          kirkwood
 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
 dreamplug                    arm         arm926ejs   -                   Marvell        kirkwood
include/configs/net2big_v2.h new file +161 -0

161 lines not on this page · raw message

Signature · 1 line
1.7.5.1
#4 lore raw

PATCH v2 2/3 ARM: add support for LaCie 2Big Network v2

Hi Prafulla,

Quoted 25 lines · Simon Guinot

From: Simon Guinot <[email protected]>

This patch adds support for the LaCie 2Big Network v2 board, based on the Marvell Kirkwood 6281 SoC.

Additional information is available at:
http://lacie-nas.org/doku.php?id=2big_network_v2

---
No changes in v2.

 MAINTAINERS                         |    1 +
 board/LaCie/net2big_v2/Makefile     |   49 +++++++++
 board/LaCie/net2big_v2/kwbimage.cfg |  162 ++++++++++++++++++++++++++++++
 board/LaCie/net2big_v2/net2big_v2.c |  188 +++++++++++++++++++++++++++++++++++
 board/LaCie/net2big_v2/net2big_v2.h |   43 ++++++++
 boards.cfg                          |    1 +
 include/configs/net2big_v2.h        |  161 ++++++++++++++++++++++++++++++
 7 files changed, 605 insertions(+), 0 deletions(-)
 create mode 100644 board/LaCie/net2big_v2/Makefile
 create mode 100644 board/LaCie/net2big_v2/kwbimage.cfg
 create mode 100644 board/LaCie/net2big_v2/net2big_v2.c
 create mode 100644 board/LaCie/net2big_v2/net2big_v2.h
 create mode 100644 include/configs/net2big_v2.h

... snip ...

include/configs/net2big_v2.h line 57

Quoted 5 lines
include/configs/net2big_v2.h new file +5 -0
+/*
+ * mv-common.h should be defined after CMD configs since it used them
+ * to enable certain macros
+ */
+#define CONFIG_NR_DRAM_BANKS		2

The SDRAM banks number should be 1. Then, I will update the whole patch series to fix this mistake.

Any comments about this patch series ? Do you want me for some other modifications ?

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/20111114/10b997b0/attachment.pgp

#5 lore raw

PATCH v2 2/3 ARM: add support for LaCie 2Big Network v2

In reply to Simon Guinot
Quoted 23 lines

-----Original Message-----
From: Simon Guinot [mailto:simon at sequanux.org]
Sent: Wednesday, November 09, 2011 10:32 PM
To: Prafulla Wadaskar
Cc: u-boot at lists.denx.de; Albert ARIBAUD; Simon Guinot
Subject: [PATCH v2 2/3] ARM: add support for LaCie 2Big Network v2

From: Simon Guinot <[email protected]>

This patch adds support for the LaCie 2Big Network v2 board, based on
the Marvell Kirkwood 6281 SoC.

Additional information is available at:
http://lacie-nas.org/doku.php?id=2big_network_v2

---
No changes in v2.

Quoted 17 lines
 MAINTAINERS                         |    1 +
 board/LaCie/net2big_v2/Makefile     |   49 +++++++++
 board/LaCie/net2big_v2/kwbimage.cfg |  162
++++++++++++++++++++++++++++++
 board/LaCie/net2big_v2/net2big_v2.c |  188
+++++++++++++++++++++++++++++++++++
 board/LaCie/net2big_v2/net2big_v2.h |   43 ++++++++
 boards.cfg                          |    1 +
 include/configs/net2big_v2.h        |  161
++++++++++++++++++++++++++++++
 7 files changed, 605 insertions(+), 0 deletions(-)
 create mode 100644 board/LaCie/net2big_v2/Makefile
 create mode 100644 board/LaCie/net2big_v2/kwbimage.cfg
 create mode 100644 board/LaCie/net2big_v2/net2big_v2.c
 create mode 100644 board/LaCie/net2big_v2/net2big_v2.h
 create mode 100644 include/configs/net2big_v2.h

Applied to u-boot-marvell.git master branch

Regards..
Prafulla . . .

#6 lore raw

PATCH v2 3/3 ARM: remove duplicated code for LaCie boards

In reply to Simon Guinot

From: Simon Guinot <[email protected]>

This patch groups together all the common functions for LaCie boards:
Ethernet PHY and MAC address initializations.

Moreover the configurations for LaCie Kirkwood boards are merged into a single file: include/configs/lacie_kw.h

---
Patch added in v2.

 board/LaCie/common/common.c           |   87 +++++++++++++++
 board/LaCie/common/common.h           |   20 ++++
 board/LaCie/edminiv2/Makefile         |    5 +-
 board/LaCie/edminiv2/edminiv2.c       |   30 +-----
 board/LaCie/edminiv2/edminiv2.h       |   41 -------
 board/LaCie/net2big_v2/Makefile       |    5 +-
 board/LaCie/net2big_v2/net2big_v2.c   |   86 ++-------------
 board/LaCie/net2big_v2/net2big_v2.h   |    8 --
 board/LaCie/netspace_v2/Makefile      |    5 +-
 board/LaCie/netspace_v2/netspace_v2.c |   84 ++-------------
 board/LaCie/netspace_v2/netspace_v2.h |    8 --
 boards.cfg                            |    8 +-
 include/configs/lacie_kw.h            |  193 +++++++++++++++++++++++++++++++++
 include/configs/net2big_v2.h          |  161 ---------------------------
 include/configs/netspace_v2.h         |  179 ------------------------------
 15 files changed, 340 insertions(+), 580 deletions(-)
 create mode 100644 board/LaCie/common/common.c
 create mode 100644 board/LaCie/common/common.h
 delete mode 100644 board/LaCie/edminiv2/edminiv2.h
 create mode 100644 include/configs/lacie_kw.h
 delete mode 100644 include/configs/net2big_v2.h
 delete mode 100644 include/configs/netspace_v2.h
board/LaCie/common/common.c new file +87 -0
new file mode 100644
index 0000000..dc5350d
@@ -0,0 +1,87 @@
+/*
+ * Copyright (C) 2011 Simon Guinot <[email protected]>
+ *
+ * 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.
+ */
+
+#include <common.h>
+#include <i2c.h>
+#include <miiphy.h>
+
+#if defined(CONFIG_CMD_NET) && defined(CONFIG_RESET_PHY_R)
+
+#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)
+
+void mv_phy_88e1116_init(const 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);
+	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 */
+	miiphy_reset(name, devadr);
+
+	printf("88E1116 Initialized on %s\n", name);
+}
+#endif /* CONFIG_CMD_NET && CONFIG_RESET_PHY_R */
+
+#if defined(CONFIG_CMD_I2C) && defined(CONFIG_SYS_I2C_EEPROM_ADDR)
+int lacie_read_mac_address(uchar *mac_addr)
+{
+	int ret;
+	ushort version;
+
+	/* I2C-0 for on-board EEPROM */
+	i2c_set_bus_num(0);
+
+	/* Check layout version for EEPROM data */
+	ret = i2c_read(CONFIG_SYS_I2C_EEPROM_ADDR, 0,
+			CONFIG_SYS_I2C_EEPROM_ADDR_LEN,
+			(uchar *) &version, 2);
+	if (ret != 0) {
+		printf("Error: failed to read I2C EEPROM @%02x\n",
+			CONFIG_SYS_I2C_EEPROM_ADDR);
+		return ret;
+	}
+	version = be16_to_cpu(version);
+	if (version < 1 || version > 3) {
+		printf("Error: unknown version %d for EEPROM data\n",
+			version);
+		return -1;
+	}
+
+	/* Read Ethernet MAC address from EEPROM */
+	ret = i2c_read(CONFIG_SYS_I2C_EEPROM_ADDR, 2,
+			CONFIG_SYS_I2C_EEPROM_ADDR_LEN, mac_addr, 6);
+	if (ret != 0)
+		printf("Error: failed to read I2C EEPROM @%02x\n",
+			CONFIG_SYS_I2C_EEPROM_ADDR);
+	return ret;
+}
+#endif /* CONFIG_CMD_I2C && CONFIG_SYS_I2C_EEPROM_ADDR */
board/LaCie/common/common.h new file +20 -0
new file mode 100644
index 0000000..82a9522
@@ -0,0 +1,20 @@
+/*
+ * Copyright (C) 2011 Simon Guinot <[email protected]>
+ *
+ * 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.
+ */
+
+#ifndef _LACIE_COMMON_H
+#define _LACIE_COMMON_H
+
+#if defined(CONFIG_CMD_NET) && defined(CONFIG_RESET_PHY_R)
+void mv_phy_88e1116_init(const char *name);
+#endif
+#if defined(CONFIG_CMD_I2C) && defined(CONFIG_SYS_I2C_EEPROM_ADDR)
+int lacie_read_mac_address(uchar *mac);
+#endif
+
+#endif /* _LACIE_COMMON_H */
board/LaCie/edminiv2/Makefile +4 -1
index 00a255d..c8d45f4 100644
@@ -26,10 +26,13 @@
 #
 
 include $(TOPDIR)/config.mk
+ifneq ($(OBJTREE),$(SRCTREE))
+$(shell mkdir -p $(obj)../common)
+endif
 
 LIB	= $(obj)lib$(BOARD).o
 
-COBJS	:= edminiv2.o
+COBJS	:= edminiv2.o ../common/common.o
 
 SRCS	:= $(COBJS:.o=.c)
 OBJS	:= $(addprefix $(obj),$(COBJS))
board/LaCie/edminiv2/edminiv2.c +1 -29
index ee26893..c1a01bc 100644
@@ -27,7 +27,6 @@
 #include <common.h>
 #include <miiphy.h>
 #include <asm/arch/orion5x.h>
-#include "edminiv2.h"
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -96,33 +95,6 @@ int board_init(void)
 /* Configure and enable MV88E1116 PHY */
 void reset_phy(void)
 {
-	u16 reg;
-	u16 devadr;
-	char *name = "egiga0";
-
-	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);
-	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 */
-	miiphy_reset(name, devadr);
-
-	printf("88E1116 Initialized on %s\n", name);
+	mv_phy_88e1116_init("egiga0");
 }
 #endif /* CONFIG_RESET_PHY_R */
board/LaCie/edminiv2/edminiv2.h deleted +0 -41

41 lines not on this page · raw message

board/LaCie/net2big_v2/Makefile +4 -1
index 4bacef4..fbae48e 100644
@@ -21,10 +21,13 @@
 #
 
 include $(TOPDIR)/config.mk
+ifneq ($(OBJTREE),$(SRCTREE))
+$(shell mkdir -p $(obj)../common)
+endif
 
 LIB	= $(obj)lib$(BOARD).o
 
-COBJS	:= net2big_v2.o
+COBJS	:= $(BOARD).o ../common/common.o
 
 SRCS	:= $(SOBJS:.o=.S) $(COBJS:.o=.c)
 OBJS	:= $(addprefix $(obj),$(COBJS))
board/LaCie/net2big_v2/net2big_v2.c +12 -74

121 lines not on this page · raw message

board/LaCie/net2big_v2/net2big_v2.h +0 -8
index bbe67af..f9778f4 100644
@@ -32,12 +32,4 @@
 /* Buttons */
 #define NET2BIG_V2_GPIO_PUSH_BUTTON	34
 
-/* 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 /* NET2BIG_V2_H */
board/LaCie/netspace_v2/Makefile +4 -1
index d4a613f..b43c3d3 100644
@@ -21,10 +21,13 @@
 #
 
 include $(TOPDIR)/config.mk
+ifneq ($(OBJTREE),$(SRCTREE))
+$(shell mkdir -p $(obj)../common)
+endif
 
 LIB	= $(obj)lib$(BOARD).o
 
-COBJS	:= netspace_v2.o
+COBJS	:= $(BOARD).o ../common/common.o
 
 SRCS	:= $(SOBJS:.o=.S) $(COBJS:.o=.c)
 OBJS	:= $(addprefix $(obj),$(COBJS))
board/LaCie/netspace_v2/netspace_v2.c +11 -73

120 lines not on this page · raw message

board/LaCie/netspace_v2/netspace_v2.h +0 -8
index 3f3d51c..34e492c 100644
@@ -31,12 +31,4 @@
 
 #define NETSPACE_V2_GPIO_BUTTON         32
 
-/* 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 +4 -4
index 6bb567b..c46118f 100644
@@ -137,10 +137,10 @@ km_kirkwood                  arm         arm926ejs   km_arm              keymile
 km_kirkwood_pci              arm         arm926ejs   km_arm              keymile        kirkwood	km_kirkwood:KM_RECONFIG_XLX
 mgcoge3un                    arm         arm926ejs   km_arm              keymile        kirkwood
 portl2                       arm         arm926ejs   km_arm              keymile        kirkwood
-inetspace_v2                 arm         arm926ejs   netspace_v2         LaCie          kirkwood    netspace_v2:INETSPACE_V2
-net2big_v2                   arm         arm926ejs   net2big_v2          LaCie          kirkwood
-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
+inetspace_v2                 arm         arm926ejs   netspace_v2         LaCie          kirkwood	lacie_kw:INETSPACE_V2
+net2big_v2                   arm         arm926ejs   net2big_v2          LaCie          kirkwood	lacie_kw:NET2BIG_V2
+netspace_v2                  arm         arm926ejs   netspace_v2         LaCie          kirkwood	lacie_kw:NETSPACE_V2
+netspace_max_v2              arm         arm926ejs   netspace_v2         LaCie          kirkwood	lacie_kw:NETSPACE_MAX_V2
 dreamplug                    arm         arm926ejs   -                   Marvell        kirkwood
 guruplug                     arm         arm926ejs   -                   Marvell        kirkwood
 mv88f6281gtw_ge              arm         arm926ejs   -                   Marvell        kirkwood
include/configs/lacie_kw.h new file +193 -0

193 lines not on this page · raw message

include/configs/net2big_v2.h deleted +0 -161

161 lines not on this page · raw message

include/configs/netspace_v2.h deleted +0 -179

179 lines not on this page · raw message

Signature · 1 line
1.7.5.1
#7 lore raw

PATCH v2 3/3 ARM: remove duplicated code for LaCie boards

Quoted 35 lines

-----Original Message-----
From: Simon Guinot [mailto:simon at sequanux.org]
Sent: Wednesday, November 09, 2011 10:32 PM
To: Prafulla Wadaskar
Cc: u-boot at lists.denx.de; Albert ARIBAUD; Simon Guinot
Subject: [PATCH v2 3/3] ARM: remove duplicated code for LaCie boards

From: Simon Guinot <[email protected]>

This patch groups together all the common functions for LaCie boards:
Ethernet PHY and MAC address initializations.

Moreover the configurations for LaCie Kirkwood boards are merged into
a single file: include/configs/lacie_kw.h

---
Patch added in v2.

 board/LaCie/common/common.c           |   87 +++++++++++++++
 board/LaCie/common/common.h           |   20 ++++
 board/LaCie/edminiv2/Makefile         |    5 +-
 board/LaCie/edminiv2/edminiv2.c       |   30 +-----
 board/LaCie/edminiv2/edminiv2.h       |   41 -------
 board/LaCie/net2big_v2/Makefile       |    5 +-
 board/LaCie/net2big_v2/net2big_v2.c   |   86 ++-------------
 board/LaCie/net2big_v2/net2big_v2.h   |    8 --
 board/LaCie/netspace_v2/Makefile      |    5 +-
 board/LaCie/netspace_v2/netspace_v2.c |   84 ++-------------
 board/LaCie/netspace_v2/netspace_v2.h |    8 --
Quoted 8 lines
 boards.cfg                            |    8 +-
 include/configs/lacie_kw.h            |  193
+++++++++++++++++++++++++++++++++
 include/configs/net2big_v2.h          |  161 -----------------
----------
 include/configs/netspace_v2.h         |  179 -----------------
-------------
 15 files changed, 340 insertions(+), 580 deletions(-)

Good savings..

Applied to u-boot-marvell.git master branch

Regards..
Prafulla . . .

#8 lore raw

v2 cover LaCie 2Big Network v2 support

In reply to Simon Guinot
Quoted 32 lines · Simon Guinot

From: Simon Guinot <[email protected]>

This patch series provides support for the LaCie NAS 2Big Network v2.

Changes in v2:
- mv_sata: use MVSATA_xxx for ide_preinit() exit codes.
- Add patch to remove duplicated code for LaCie boards.

Simon Guinot (3):
mvsata: fix ide_preinit for missing disks
ARM: add support for LaCie 2Big Network v2
ARM: remove duplicated code for LaCie boards

 MAINTAINERS                           |    1 +
 board/LaCie/common/common.c           |   87 +++++++++++++++
 board/LaCie/common/common.h           |   20 ++++
 board/LaCie/edminiv2/Makefile         |    5 +-
 board/LaCie/edminiv2/edminiv2.c       |   30 +-----
 board/LaCie/edminiv2/edminiv2.h       |   41 -------
 board/LaCie/net2big_v2/Makefile       |   52 +++++++++
 board/LaCie/net2big_v2/kwbimage.cfg   |  162 +++++++++++++++++++++++++++
 board/LaCie/net2big_v2/net2big_v2.c   |  126 +++++++++++++++++++++
 board/LaCie/net2big_v2/net2big_v2.h   |   35 ++++++
 board/LaCie/netspace_v2/Makefile      |    5 +-
 board/LaCie/netspace_v2/netspace_v2.c |   84 ++-------------
 board/LaCie/netspace_v2/netspace_v2.h |    8 --
 boards.cfg                            |    7 +-
 drivers/block/mvsata_ide.c            |   14 ++-
 include/configs/lacie_kw.h            |  193 +++++++++++++++++++++++++++++++++
 include/configs/netspace_v2.h         |  179 ------------------------------
 17 files changed, 708 insertions(+), 341 deletions(-)
 create mode 100644 board/LaCie/common/common.c
Quoted 8 lines
 create mode 100644 board/LaCie/common/common.h
 delete mode 100644 board/LaCie/edminiv2/edminiv2.h
 create mode 100644 board/LaCie/net2big_v2/Makefile
 create mode 100644 board/LaCie/net2big_v2/kwbimage.cfg
 create mode 100644 board/LaCie/net2big_v2/net2big_v2.c
 create mode 100644 board/LaCie/net2big_v2/net2big_v2.h
 create mode 100644 include/configs/lacie_kw.h
 delete mode 100644 include/configs/netspace_v2.h

As the edminiv2 is concerned, I add Albert to the Cc recipient. -------------- 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/20111109/0478cbad/attachment.pgp