Re: [U-Boot-Users] [PATCH 1/1] Add support for ATMEL AT91SAM9G20EK board

2008-07-27 Thread Hong Xu
Hi Ben Warren,

On Sun, Jul 27, 2008 at 12:51, Ben Warren [EMAIL PROTECTED] wrote:
 Hi Hong Xu,

 On Thu, Jul 24, 2008 at 1:05 AM, Hong Xu [EMAIL PROTECTED] wrote:
 From 81230b02610c06fdc8a175e635851346488e3bdb Mon Sep 17 00:00:00 2001
 From: Hong Xu [EMAIL PROTECTED]
 Date: Thu, 24 Jul 2008 14:25:05 +0800
 Subject: [PATCH 1/1] Add support for ATMEL AT91SAM9G20EK board

 This patch adds support for ATMEL AT91SAM9G20EK board.
 User manual for AT91SAM9G20EK board, see
 http://www.atmel.com/dyn/resources/prod_documents/doc6413.pdf
 AT91 SAM9G20 datasheet, see
 http://www.atmel.com/dyn/resources/prod_documents/doc6384.pdf

 Signed-off-by: Hong Xu [EMAIL PROTECTED]
 ---
 snip
 diff --git a/net/eth.c b/net/eth.c
 index 38979aa..3f50e2b 100644
 --- a/net/eth.c
 +++ b/net/eth.c
 @@ -287,7 +287,7 @@ int eth_initialize(bd_t *bis)
mcdmafec_initialize(bis);
  #endif
  #if defined(CONFIG_AT91CAP9) || defined(CONFIG_AT91SAM9260) || \
 -defined(CONFIG_AT91SAM9263)
 +defined(CONFIG_AT91SAM9263) || defined(CONFIG_AT91SAM9G20)
at91sam9_eth_initialize(bis);
  #endif


 Please don't touch net/eth.c.  Instead, implement the following in board code:

Actually I did NOT touch the logic in net/eth.c. I just said, hey,
since you guys have the logic, please make a call for me.. That's it.
:-)
Thanks.


 int board_eth_init(bd_t *bis);

 Please be sure to check that the weak version of board_eth_init() is
 overridden (the board_eth_init and __def_eth_init symbols should have
 different addresses in the object code).  You can do something like:

 $ cat System.map | grep eth_init

 regards,
 Ben


-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


Re: [U-Boot-Users] [PATCH 1/1] Add support for ATMEL AT91SAM9G20EK board

2008-07-27 Thread Ben Warren
On Sun, Jul 27, 2008 at 6:46 PM, Hong Xu [EMAIL PROTECTED] wrote:
 Hi Ben Warren,

 On Sun, Jul 27, 2008 at 12:51, Ben Warren [EMAIL PROTECTED] wrote:
 Hi Hong Xu,

 On Thu, Jul 24, 2008 at 1:05 AM, Hong Xu [EMAIL PROTECTED] wrote:
 From 81230b02610c06fdc8a175e635851346488e3bdb Mon Sep 17 00:00:00 2001
 From: Hong Xu [EMAIL PROTECTED]
 Date: Thu, 24 Jul 2008 14:25:05 +0800
 Subject: [PATCH 1/1] Add support for ATMEL AT91SAM9G20EK board

 This patch adds support for ATMEL AT91SAM9G20EK board.
 User manual for AT91SAM9G20EK board, see
 http://www.atmel.com/dyn/resources/prod_documents/doc6413.pdf
 AT91 SAM9G20 datasheet, see
 http://www.atmel.com/dyn/resources/prod_documents/doc6384.pdf

 Signed-off-by: Hong Xu [EMAIL PROTECTED]
 ---
 snip
 diff --git a/net/eth.c b/net/eth.c
 index 38979aa..3f50e2b 100644
 --- a/net/eth.c
 +++ b/net/eth.c
 @@ -287,7 +287,7 @@ int eth_initialize(bd_t *bis)
mcdmafec_initialize(bis);
  #endif
  #if defined(CONFIG_AT91CAP9) || defined(CONFIG_AT91SAM9260) || \
 -defined(CONFIG_AT91SAM9263)
 +defined(CONFIG_AT91SAM9263) || defined(CONFIG_AT91SAM9G20)
at91sam9_eth_initialize(bis);
  #endif


 Please don't touch net/eth.c.  Instead, implement the following in board 
 code:

 Actually I did NOT touch the logic in net/eth.c. I just said, hey,
 since you guys have the logic, please make a call for me.. That's it.
 :-)

Sure.  I'm saying, don't even do that.  I mean don't touch the file,
not don't touch the logic.

regards,
Ben

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


Re: [U-Boot-Users] [PATCH 1/1] Add support for ATMEL AT91SAM9G20EK board

2008-07-26 Thread Ben Warren
Hi Hong Xu,

On Thu, Jul 24, 2008 at 1:05 AM, Hong Xu [EMAIL PROTECTED] wrote:
 From 81230b02610c06fdc8a175e635851346488e3bdb Mon Sep 17 00:00:00 2001
 From: Hong Xu [EMAIL PROTECTED]
 Date: Thu, 24 Jul 2008 14:25:05 +0800
 Subject: [PATCH 1/1] Add support for ATMEL AT91SAM9G20EK board

 This patch adds support for ATMEL AT91SAM9G20EK board.
 User manual for AT91SAM9G20EK board, see
 http://www.atmel.com/dyn/resources/prod_documents/doc6413.pdf
 AT91 SAM9G20 datasheet, see
 http://www.atmel.com/dyn/resources/prod_documents/doc6384.pdf

 Signed-off-by: Hong Xu [EMAIL PROTECTED]
 ---
snip
 diff --git a/net/eth.c b/net/eth.c
 index 38979aa..3f50e2b 100644
 --- a/net/eth.c
 +++ b/net/eth.c
 @@ -287,7 +287,7 @@ int eth_initialize(bd_t *bis)
mcdmafec_initialize(bis);
  #endif
  #if defined(CONFIG_AT91CAP9) || defined(CONFIG_AT91SAM9260) || \
 -defined(CONFIG_AT91SAM9263)
 +defined(CONFIG_AT91SAM9263) || defined(CONFIG_AT91SAM9G20)
at91sam9_eth_initialize(bis);
  #endif


Please don't touch net/eth.c.  Instead, implement the following in board code:

int board_eth_init(bd_t *bis);

Please be sure to check that the weak version of board_eth_init() is
overridden (the board_eth_init and __def_eth_init symbols should have
different addresses in the object code).  You can do something like:

$ cat System.map | grep eth_init

regards,
Ben

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


[U-Boot-Users] [PATCH 1/1] Add support for ATMEL AT91SAM9G20EK board

2008-07-24 Thread Hong Xu
From 81230b02610c06fdc8a175e635851346488e3bdb Mon Sep 17 00:00:00 2001
From: Hong Xu [EMAIL PROTECTED]
Date: Thu, 24 Jul 2008 14:25:05 +0800
Subject: [PATCH 1/1] Add support for ATMEL AT91SAM9G20EK board

This patch adds support for ATMEL AT91SAM9G20EK board.
User manual for AT91SAM9G20EK board, see
http://www.atmel.com/dyn/resources/prod_documents/doc6413.pdf
AT91 SAM9G20 datasheet, see
http://www.atmel.com/dyn/resources/prod_documents/doc6384.pdf

Signed-off-by: Hong Xu [EMAIL PROTECTED]
---
 Makefile  |3 +
 board/atmel/at91sam9g20ek/Makefile|   57 +++
 board/atmel/at91sam9g20ek/at91sam9g20ek.c |  250 +
 board/atmel/at91sam9g20ek/config.mk   |1 +
 board/atmel/at91sam9g20ek/led.c   |   64 
 board/atmel/at91sam9g20ek/nand.c  |   79 +
 board/atmel/at91sam9g20ek/partition.c |   40 +
 drivers/net/macb.c|4 +-
 include/asm-arm/arch-at91sam9/hardware.h  |2 +-
 include/configs/at91sam9g20ek.h   |  202 +++
 net/eth.c |2 +-
 11 files changed, 700 insertions(+), 4 deletions(-)
 create mode 100644 board/atmel/at91sam9g20ek/Makefile
 create mode 100644 board/atmel/at91sam9g20ek/at91sam9g20ek.c
 create mode 100644 board/atmel/at91sam9g20ek/config.mk
 create mode 100644 board/atmel/at91sam9g20ek/led.c
 create mode 100644 board/atmel/at91sam9g20ek/nand.c
 create mode 100644 board/atmel/at91sam9g20ek/partition.c
 create mode 100644 include/configs/at91sam9g20ek.h

diff --git a/Makefile b/Makefile
index 369bbd7..c7ed34d 100644
--- a/Makefile
+++ b/Makefile
@@ -2388,6 +2388,9 @@ at91cap9adk_config:   unconfig
 at91sam9260ek_config   :   unconfig
@$(MKCONFIG) $(@:_config=) arm arm926ejs at91sam9260ek atmel at91sam9

+at91sam9g20ek_config   :   unconfig
+   @$(MKCONFIG) $(@:_config=) arm arm926ejs at91sam9g20ek atmel at91sam9
+
 
 ## ARM Integrator boards - see doc/README-integrator for more info.
 integratorap_config\
diff --git a/board/atmel/at91sam9g20ek/Makefile
b/board/atmel/at91sam9g20ek/Makefile
new file mode 100644
index 000..cdf5d34
--- /dev/null
+++ b/board/atmel/at91sam9g20ek/Makefile
@@ -0,0 +1,57 @@
+#
+# (C) Copyright 2003-2008
+# Wolfgang Denk, DENX Software Engineering, [EMAIL PROTECTED]
+#
+# (C) Copyright 2008
+# Stelian Pop [EMAIL PROTECTED]
+# Lead Tech Design www.leadtechdesign.com
+#
+# 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.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+# MA 02111-1307 USA
+#
+
+include $(TOPDIR)/config.mk
+
+LIB= $(obj)lib$(BOARD).a
+
+COBJS-y+= at91sam9g20ek.o
+COBJS-y+= led.o
+COBJS-y+= partition.o
+COBJS-$(CONFIG_CMD_NAND) += nand.o
+
+SRCS   := $(SOBJS:.o=.S) $(COBJS-y:.o=.c)
+OBJS   := $(addprefix $(obj),$(COBJS-y))
+SOBJS  := $(addprefix $(obj),$(SOBJS))
+
+$(LIB):$(obj).depend $(OBJS) $(SOBJS)
+   $(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS)
+
+clean:
+   rm -f $(SOBJS) $(OBJS)
+
+distclean: clean
+   rm -f $(LIB) core *.bak $(obj).depend
+
+#
+
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+#
diff --git a/board/atmel/at91sam9g20ek/at91sam9g20ek.c
b/board/atmel/at91sam9g20ek/at91sam9g20ek.c
new file mode 100644
index 000..f47b7bb
--- /dev/null
+++ b/board/atmel/at91sam9g20ek/at91sam9g20ek.c
@@ -0,0 +1,250 @@
+/*
+ * (C) Copyright 2007-2008
+ * Stelian Pop [EMAIL PROTECTED]
+ * Lead Tech Design www.leadtechdesign.com
+ *
+ * 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
+ 

Re: [U-Boot-Users] [PATCH 1/1] Add support for ATMEL AT91SAM9G20EK board

2008-07-24 Thread Haavard Skinnemoen
Hong Xu [EMAIL PROTECTED] wrote:
 diff --git a/drivers/net/macb.c b/drivers/net/macb.c
 index aa39284..c3dcce6 100644
 --- a/drivers/net/macb.c
 +++ b/drivers/net/macb.c
 @@ -415,14 +415,14 @@ static int macb_init(struct eth_device *netdev, bd_t 
 *bd)
   /* choose RMII or MII mode. This depends on the board */
  #ifdef CONFIG_RMII
  #if defined(CONFIG_AT91CAP9) || defined(CONFIG_AT91SAM9260) || \
 -defined(CONFIG_AT91SAM9263)
 +defined(CONFIG_AT91SAM9263) || defined(CONFIG_AT91SAM9G20)

Hmm...I don't really like the direction this is going. Any chance you
could have all AT91 boards define CONFIG_AT91 and check for that
instead?

Alternatively, we could do it the other way around and test for
CONFIG_AVR32 instead, since all AVR32 boards already define that.

In either case, this should probably be a separate cleanup; I don't
have any objections to your patch.

Haavard

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


Re: [U-Boot-Users] [PATCH 1/1] Add support for ATMEL AT91SAM9G20EK board

2008-07-24 Thread Jean-Christophe PLAGNIOL-VILLARD
On 15:41 Thu 24 Jul , Hong Xu wrote:
 From 81230b02610c06fdc8a175e635851346488e3bdb Mon Sep 17 00:00:00 2001
 From: Hong Xu [EMAIL PROTECTED]
 Date: Thu, 24 Jul 2008 14:25:05 +0800
 Subject: [PATCH 1/1] Add support for ATMEL AT91SAM9G20EK board

 This patch adds support for ATMEL AT91SAM9G20EK board.
 User manual for AT91SAM9G20EK board, see
 http://www.atmel.com/dyn/resources/prod_documents/doc6413.pdf
 AT91 SAM9G20 datasheet, see
 http://www.atmel.com/dyn/resources/prod_documents/doc6384.pdf


 Signed-off-by: Hong Xu [EMAIL PROTECTED]
 ---
  Makefile  |3 +
  board/atmel/at91sam9g20ek/Makefile|   57 +++
  board/atmel/at91sam9g20ek/at91sam9g20ek.c |  250 
 +
  board/atmel/at91sam9g20ek/config.mk   |1 +
  board/atmel/at91sam9g20ek/led.c   |   64 
  board/atmel/at91sam9g20ek/nand.c  |   79 +
  board/atmel/at91sam9g20ek/partition.c |   40 +
  drivers/net/macb.c|4 +-
  include/asm-arm/arch-at91sam9/hardware.h  |2 +-
  include/configs/at91sam9g20ek.h   |  202 +++
  include/asm-arm/arch-at91sam9/hardware.h  |2 +-
  include/configs/at91sam9g20ek.h   |  202 +++
  net/eth.c |2 +-
Please rebase your code on the branch for-1.3.5 of the u-boot-at91 tree.

 --- a/drivers/net/macb.c
 +++ b/drivers/net/macb.c
 @@ -415,14 +415,14 @@ static int macb_init(struct eth_device *netdev, bd_t 
 *bd)
   /* choose RMII or MII mode. This depends on the board */
  #ifdef CONFIG_RMII
  #if defined(CONFIG_AT91CAP9) || defined(CONFIG_AT91SAM9260) || \
 -defined(CONFIG_AT91SAM9263)
 +defined(CONFIG_AT91SAM9263) || defined(CONFIG_AT91SAM9G20)
   macb_writel(macb, USRIO, MACB_BIT(RMII) | MACB_BIT(CLKEN));
  #else
   macb_writel(macb, USRIO, 0);
  #endif
  #else
  #if defined(CONFIG_AT91CAP9) || defined(CONFIG_AT91SAM9260) || \
 -defined(CONFIG_AT91SAM9263)
 +defined(CONFIG_AT91SAM9263) || defined(CONFIG_AT91SAM9G20)
   macb_writel(macb, USRIO, MACB_BIT(CLKEN));
  #else
   macb_writel(macb, USRIO, MACB_BIT(MII));
 diff --git a/net/eth.c b/net/eth.c
 index 38979aa..3f50e2b 100644
 --- a/net/eth.c
 +++ b/net/eth.c
 @@ -287,7 +287,7 @@ int eth_initialize(bd_t *bis)
   mcdmafec_initialize(bis);
  #endif
  #if defined(CONFIG_AT91CAP9) || defined(CONFIG_AT91SAM9260) || \
 -defined(CONFIG_AT91SAM9263)
 +defined(CONFIG_AT91SAM9263) || defined(CONFIG_AT91SAM9G20)
   at91sam9_eth_initialize(bis);
  #endif
   at91sam9_eth_initialize(bis);
  #endif

Same comment as Haavard,
Could please create a CONFIG_SOMETHING for each of this tree block of
ifdef (not neccessarely the same CONFIG)

Best Regards,
J.


-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users