* [U-Boot] [PATCH][v1] mpc8260: remove Ethernet node fixup to use generic FDT code.
@ 2009-09-08 15:30 Marcel Ziswiler
2009-09-08 18:31 ` Wolfgang Denk
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Marcel Ziswiler @ 2009-09-08 15:30 UTC (permalink / raw)
To: u-boot
Remove Ethernet node fixup from mgcoge and muas3001 boards and modify its
configs for the common mpc8260 code to use generic Ethernet fixup.
Signed-off-by: Marcel Ziswiler <marcel.ziswiler@noser.com>
---
board/keymile/mgcoge/mgcoge.c | 5 -----
board/muas3001/muas3001.c | 15 ---------------
include/configs/mgcoge.h | 1 +
include/configs/muas3001.h | 1 +
4 files changed, 2 insertions(+), 20 deletions(-)
diff --git a/board/keymile/mgcoge/mgcoge.c b/board/keymile/mgcoge/mgcoge.c
index d24a4b5..b16a01c 100644
--- a/board/keymile/mgcoge/mgcoge.c
+++ b/board/keymile/mgcoge/mgcoge.c
@@ -25,7 +25,6 @@
#include <mpc8260.h>
#include <ioports.h>
#include <malloc.h>
-#include <net.h>
#include <asm/io.h>
#if defined(CONFIG_OF_BOARD_SETUP) && defined(CONFIG_OF_LIBFDT)
@@ -373,10 +372,6 @@ void ft_blob_update (void *blob, bd_t *bd)
flash_reg[5] = cpu_to_be32 (info->size);
fdt_set_node_and_value (blob, "/localbus/flash at 5,0", "reg", flash_reg,
sizeof (flash_reg));
-
- /* MAC addr */
- fdt_set_node_and_value (blob, "/soc/cpm/ethernet", "mac-address",
- bd->bi_enetaddr, sizeof (u8) * 6);
}
void ft_board_setup (void *blob, bd_t *bd)
diff --git a/board/muas3001/muas3001.c b/board/muas3001/muas3001.c
index bf4ccb6..36caed8 100644
--- a/board/muas3001/muas3001.c
+++ b/board/muas3001/muas3001.c
@@ -342,21 +342,6 @@ void ft_blob_update (void *blob, bd_t *bd)
printf ("ft_blob_update(): cannot find /localbus node "
"err:%s\n", fdt_strerror (nodeoffset));
}
- /* MAC Adresse */
- nodeoffset = fdt_path_offset (blob, "/soc/cpm/ethernet");
- if (nodeoffset >= 0) {
- uchar ethaddr[6];
- eth_getenv_enetaddr("ethaddr", ethaddr);
- ret = fdt_setprop (blob, nodeoffset, "mac-address", ethaddr,
- sizeof (uchar) * 6);
- if (ret < 0)
- printf ("ft_blob_update): cannot set /soc/cpm/ethernet/mac-address "
- "property err:%s\n", fdt_strerror (ret));
- } else {
- /* memory node is required in dts */
- printf ("ft_blob_update(): cannot find /soc/cpm/ethernet node "
- "err:%s\n", fdt_strerror (nodeoffset));
- }
/* baudrate */
nodeoffset = fdt_path_offset (blob, "/soc/cpm/serial");
diff --git a/include/configs/mgcoge.h b/include/configs/mgcoge.h
index 99ac8c1..55d1fc9 100644
--- a/include/configs/mgcoge.h
+++ b/include/configs/mgcoge.h
@@ -70,6 +70,7 @@
#define CONFIG_NET_MULTI 1
#define CONFIG_ETHER_INDEX 4
+#define CONFIG_HAS_ETH0
#define CONFIG_SYS_SCC_TOUT_LOOP 10000000
# define CONFIG_SYS_CMXSCR_VALUE (CMXSCR_RS4CS_CLK7 | CMXSCR_TS4CS_CLK8)
diff --git a/include/configs/muas3001.h b/include/configs/muas3001.h
index f2d117c..c94daa3 100644
--- a/include/configs/muas3001.h
+++ b/include/configs/muas3001.h
@@ -74,6 +74,7 @@
#define CONFIG_ETHER_INDEX 1
#define CONFIG_ETHER_ON_FCC1
+#define CONFIG_HAS_ETH0
#define FCC_ENET
/*
--
1.6.0.4
^ permalink raw reply related [flat|nested] 8+ messages in thread* [U-Boot] [PATCH][v1] mpc8260: remove Ethernet node fixup to use generic FDT code.
2009-09-08 15:30 [U-Boot] [PATCH][v1] mpc8260: remove Ethernet node fixup to use generic FDT code Marcel Ziswiler
@ 2009-09-08 18:31 ` Wolfgang Denk
2009-09-08 20:27 ` Marcel Ziswiler
2009-09-09 6:27 ` Heiko Schocher
2009-09-09 19:13 ` [U-Boot] [PATCH][v2] " Marcel Ziswiler
2 siblings, 1 reply; 8+ messages in thread
From: Wolfgang Denk @ 2009-09-08 18:31 UTC (permalink / raw)
To: u-boot
Dear Marcel Ziswiler,
In message <1252423835.5386.15.camel@com-21> you wrote:
> Remove Ethernet node fixup from mgcoge and muas3001 boards and modify its
> configs for the common mpc8260 code to use generic Ethernet fixup.
>
> Signed-off-by: Marcel Ziswiler <marcel.ziswiler@noser.com>
> ---
> board/keymile/mgcoge/mgcoge.c | 5 -----
> board/muas3001/muas3001.c | 15 ---------------
> include/configs/mgcoge.h | 1 +
> include/configs/muas3001.h | 1 +
> 4 files changed, 2 insertions(+), 20 deletions(-)
Should / could a similar change be added to
"board/keymile/km8xx/km8xx.c", too?
Best regards,
Wolfgang Denk
--
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
A secure program has to be robust: it must be able to deal with
conditions that "can't happen", whether user input, program error or
library/etc. This is basic damage control. Buffer overflow errors
have nothing to do with security, but everything with stupidity.
-- Wietse Venema in <5cnqm3$8r9@spike.porcupine.org>
^ permalink raw reply [flat|nested] 8+ messages in thread* [U-Boot] [PATCH][v1] mpc8260: remove Ethernet node fixup to use generic FDT code.
2009-09-08 18:31 ` Wolfgang Denk
@ 2009-09-08 20:27 ` Marcel Ziswiler
2009-09-09 7:03 ` Heiko Schocher
0 siblings, 1 reply; 8+ messages in thread
From: Marcel Ziswiler @ 2009-09-08 20:27 UTC (permalink / raw)
To: u-boot
Hi Wolfgang Denk
On Tue, 2009-09-08 at 20:31 +0200, Wolfgang Denk wrote:
> Should / could a similar change be added to
> "board/keymile/km8xx/km8xx.c", too?
You mean the kmsupx4 and mgsuvd boards. I guess as Ethernet node fixup is already done in generic mpc8xx CPU code. I am afraid there might be lots more boards with similar obsolete fixups in board specific code.
Heiko?
Cheers
Marcel Ziswiler
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] [PATCH][v1] mpc8260: remove Ethernet node fixup to use generic FDT code.
2009-09-08 20:27 ` Marcel Ziswiler
@ 2009-09-09 7:03 ` Heiko Schocher
2009-09-09 12:04 ` Marcel Ziswiler
0 siblings, 1 reply; 8+ messages in thread
From: Heiko Schocher @ 2009-09-09 7:03 UTC (permalink / raw)
To: u-boot
Hello Marcel,
Marcel Ziswiler wrote:
> Hi Wolfgang Denk
>
> On Tue, 2009-09-08 at 20:31 +0200, Wolfgang Denk wrote:
>> Should / could a similar change be added to
>> "board/keymile/km8xx/km8xx.c", too?
>
> You mean the kmsupx4 and mgsuvd boards. I guess as Ethernet node fixup is already done in generic mpc8xx CPU code. I am afraid there might be lots more boards with similar obsolete fixups in board specific code.
Yes, thats the kmsupx4 and mgsuvd boards. The generic memory fixup
can be used (I tried this), but with the generic Ethernet fixup
something goes wrong. If I find time, I take a look at it.
bye
Heiko
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] [PATCH][v1] mpc8260: remove Ethernet node fixup to use generic FDT code.
2009-09-09 7:03 ` Heiko Schocher
@ 2009-09-09 12:04 ` Marcel Ziswiler
0 siblings, 0 replies; 8+ messages in thread
From: Marcel Ziswiler @ 2009-09-09 12:04 UTC (permalink / raw)
To: u-boot
Hi Heiko
Heiko Schocher <hs <at> denx.de> writes:
> Yes, thats the kmsupx4 and mgsuvd boards. The generic memory fixup
> can be used (I tried this), but with the generic Ethernet fixup
> something goes wrong. If I find time, I take a look at it.
At the beginning I had issues as my device tree was missing an Ethernet alias as
that's what the generic Ethernet fixup requires to find the node.
On some CPU architectures (e.g. MPC8260) the fixup is gated by some defines
(e.g. CONFIG_HAS_ETHx) but on MPC8xx that should not be the case.
Cheers
Marcel
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] [PATCH][v1] mpc8260: remove Ethernet node fixup to use generic FDT code.
2009-09-08 15:30 [U-Boot] [PATCH][v1] mpc8260: remove Ethernet node fixup to use generic FDT code Marcel Ziswiler
2009-09-08 18:31 ` Wolfgang Denk
@ 2009-09-09 6:27 ` Heiko Schocher
2009-09-09 19:13 ` [U-Boot] [PATCH][v2] " Marcel Ziswiler
2 siblings, 0 replies; 8+ messages in thread
From: Heiko Schocher @ 2009-09-09 6:27 UTC (permalink / raw)
To: u-boot
Hello Marcel,
Marcel Ziswiler wrote:
> Remove Ethernet node fixup from mgcoge and muas3001 boards and modify its
> configs for the common mpc8260 code to use generic Ethernet fixup.
>
> Signed-off-by: Marcel Ziswiler <marcel.ziswiler@noser.com>
> ---
> board/keymile/mgcoge/mgcoge.c | 5 -----
> board/muas3001/muas3001.c | 15 ---------------
> include/configs/mgcoge.h | 1 +
> include/configs/muas3001.h | 1 +
> 4 files changed, 2 insertions(+), 20 deletions(-)
Tested on the mgcoge, and looks OK for the muas3001 board:
Tested-by: Heiko Schocher <hs@denx.de>
Thanks!
bye
Heiko
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] [PATCH][v2] mpc8260: remove Ethernet node fixup to use generic FDT code.
2009-09-08 15:30 [U-Boot] [PATCH][v1] mpc8260: remove Ethernet node fixup to use generic FDT code Marcel Ziswiler
2009-09-08 18:31 ` Wolfgang Denk
2009-09-09 6:27 ` Heiko Schocher
@ 2009-09-09 19:13 ` Marcel Ziswiler
2009-09-10 21:06 ` Wolfgang Denk
2 siblings, 1 reply; 8+ messages in thread
From: Marcel Ziswiler @ 2009-09-09 19:13 UTC (permalink / raw)
To: u-boot
Signed-off-by: Marcel Ziswiler <marcel.ziswiler@noser.com>
Tested-by: Heiko Schocher <hs@denx.de>
---
Changes since v1:
- Added Heiko's tested-by
board/keymile/mgcoge/mgcoge.c | 5 -----
board/muas3001/muas3001.c | 15 ---------------
include/configs/mgcoge.h | 1 +
include/configs/muas3001.h | 1 +
4 files changed, 2 insertions(+), 20 deletions(-)
diff --git a/board/keymile/mgcoge/mgcoge.c b/board/keymile/mgcoge/mgcoge.c
index d24a4b5..b16a01c 100644
--- a/board/keymile/mgcoge/mgcoge.c
+++ b/board/keymile/mgcoge/mgcoge.c
@@ -25,7 +25,6 @@
#include <mpc8260.h>
#include <ioports.h>
#include <malloc.h>
-#include <net.h>
#include <asm/io.h>
#if defined(CONFIG_OF_BOARD_SETUP) && defined(CONFIG_OF_LIBFDT)
@@ -373,10 +372,6 @@ void ft_blob_update (void *blob, bd_t *bd)
flash_reg[5] = cpu_to_be32 (info->size);
fdt_set_node_and_value (blob, "/localbus/flash at 5,0", "reg", flash_reg,
sizeof (flash_reg));
-
- /* MAC addr */
- fdt_set_node_and_value (blob, "/soc/cpm/ethernet", "mac-address",
- bd->bi_enetaddr, sizeof (u8) * 6);
}
void ft_board_setup (void *blob, bd_t *bd)
diff --git a/board/muas3001/muas3001.c b/board/muas3001/muas3001.c
index bf4ccb6..36caed8 100644
--- a/board/muas3001/muas3001.c
+++ b/board/muas3001/muas3001.c
@@ -342,21 +342,6 @@ void ft_blob_update (void *blob, bd_t *bd)
printf ("ft_blob_update(): cannot find /localbus node "
"err:%s\n", fdt_strerror (nodeoffset));
}
- /* MAC Adresse */
- nodeoffset = fdt_path_offset (blob, "/soc/cpm/ethernet");
- if (nodeoffset >= 0) {
- uchar ethaddr[6];
- eth_getenv_enetaddr("ethaddr", ethaddr);
- ret = fdt_setprop (blob, nodeoffset, "mac-address", ethaddr,
- sizeof (uchar) * 6);
- if (ret < 0)
- printf ("ft_blob_update): cannot set /soc/cpm/ethernet/mac-address "
- "property err:%s\n", fdt_strerror (ret));
- } else {
- /* memory node is required in dts */
- printf ("ft_blob_update(): cannot find /soc/cpm/ethernet node "
- "err:%s\n", fdt_strerror (nodeoffset));
- }
/* baudrate */
nodeoffset = fdt_path_offset (blob, "/soc/cpm/serial");
diff --git a/include/configs/mgcoge.h b/include/configs/mgcoge.h
index ea14948..b955749 100644
--- a/include/configs/mgcoge.h
+++ b/include/configs/mgcoge.h
@@ -70,6 +70,7 @@
#define CONFIG_NET_MULTI 1
#define CONFIG_ETHER_INDEX 4
+#define CONFIG_HAS_ETH0
#define CONFIG_SYS_SCC_TOUT_LOOP 10000000
# define CONFIG_SYS_CMXSCR_VALUE (CMXSCR_RS4CS_CLK7 | CMXSCR_TS4CS_CLK8)
diff --git a/include/configs/muas3001.h b/include/configs/muas3001.h
index f031a17..ae033b2 100644
--- a/include/configs/muas3001.h
+++ b/include/configs/muas3001.h
@@ -74,6 +74,7 @@
#define CONFIG_ETHER_INDEX 1
#define CONFIG_ETHER_ON_FCC1
+#define CONFIG_HAS_ETH0
#define FCC_ENET
/*
--
1.6.4.2
^ permalink raw reply related [flat|nested] 8+ messages in thread* [U-Boot] [PATCH][v2] mpc8260: remove Ethernet node fixup to use generic FDT code.
2009-09-09 19:13 ` [U-Boot] [PATCH][v2] " Marcel Ziswiler
@ 2009-09-10 21:06 ` Wolfgang Denk
0 siblings, 0 replies; 8+ messages in thread
From: Wolfgang Denk @ 2009-09-10 21:06 UTC (permalink / raw)
To: u-boot
Dear Marcel Ziswiler,
In message <1252523600.3643.6.camel@com-21> you wrote:
> Signed-off-by: Marcel Ziswiler <marcel.ziswiler@noser.com>
> Tested-by: Heiko Schocher <hs@denx.de>
> ---
> Changes since v1:
> - Added Heiko's tested-by
>
> board/keymile/mgcoge/mgcoge.c | 5 -----
> board/muas3001/muas3001.c | 15 ---------------
> include/configs/mgcoge.h | 1 +
> include/configs/muas3001.h | 1 +
> 4 files changed, 2 insertions(+), 20 deletions(-)
Patch does not apply:
Applying: mpc8260: remove Ethernet node fixup to use generic FDT code.
error: patch failed: board/muas3001/muas3001.c:342
error: board/muas3001/muas3001.c: patch does not apply
fatal: sha1 information is lacking or useless (board/muas3001/muas3001.c).
Repository lacks necessary blobs to fall back on 3-way merge.
Cannot fall back to three-way merge.
Patch failed at 0001.
Please fix and repost.
Best regards,
Wolfgang Denk
--
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
Perl itself is usually pretty good about telling you what you
shouldn't do. :-) - Larry Wall in <11091@jpl-devvax.JPL.NASA.GOV>
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2009-09-10 21:06 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-08 15:30 [U-Boot] [PATCH][v1] mpc8260: remove Ethernet node fixup to use generic FDT code Marcel Ziswiler
2009-09-08 18:31 ` Wolfgang Denk
2009-09-08 20:27 ` Marcel Ziswiler
2009-09-09 7:03 ` Heiko Schocher
2009-09-09 12:04 ` Marcel Ziswiler
2009-09-09 6:27 ` Heiko Schocher
2009-09-09 19:13 ` [U-Boot] [PATCH][v2] " Marcel Ziswiler
2009-09-10 21:06 ` Wolfgang Denk
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox