public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot-Users] [PATCH v2 ARM/AT91 0/26] AT91SAM/CAP patches for U-Boot 1.3.4
@ 2008-05-08 20:52 Stelian Pop
  2008-05-08 20:52 ` [U-Boot-Users] [PATCH 01/26] Fix @ -> <at> substitution Stelian Pop
                   ` (27 more replies)
  0 siblings, 28 replies; 54+ messages in thread
From: Stelian Pop @ 2008-05-08 20:52 UTC (permalink / raw)
  To: u-boot

Hi,

This is the second version of the AT91CAP9/AT91SAM9 patches,
which hopefully addresses all the feedbacks I got on the first one.

The first patches: 01 to 04 fix the copyright notices of some already
merged files. Those patches may be merged immediately since it would
be good to have those in 1.3.3-final.

The patches 05 to 13 fix a number of things in the AT91CAP9 and
AT91SAM9260 ports (NAND 8/16 bit support, dataflash offsets, SPI
timings, consistent Linux bootargs).

The patches 14 to 17 add support for some new Atmel boards:
	- AT91SAM9261
	- AT91SAM9263
	- AT91SAM9RL

The patches 18 to 25 add a driver for the LCD controller on the Atmel
boards (except 9260). The driver could probably be adapted, with minimum
efforts, to the AVR32 boards.

And finally, the last patch adds support for the revision 'C' of the
AT91CAP9 silicon, which needs a special initialisation sequence to
switch from the internal RC oscillator to the external 32k clock.

Thanks,

Stelian.

^ permalink raw reply	[flat|nested] 54+ messages in thread

* [U-Boot-Users] [PATCH 01/26] Fix @ -> <at> substitution
  2008-05-08 20:52 [U-Boot-Users] [PATCH v2 ARM/AT91 0/26] AT91SAM/CAP patches for U-Boot 1.3.4 Stelian Pop
@ 2008-05-08 20:52 ` Stelian Pop
  2008-05-09 22:30   ` Wolfgang Denk
  2008-05-08 20:52 ` [U-Boot-Users] [PATCH 02/26] Update origin and copyright information in arch-at91sam9 header files Stelian Pop
                   ` (26 subsequent siblings)
  27 siblings, 1 reply; 54+ messages in thread
From: Stelian Pop @ 2008-05-08 20:52 UTC (permalink / raw)
  To: u-boot

When applying the AT91CAP9 patches upstream, something transformed
the '@' character into the ' <at> ' sequence.

The patch below restores the original form in all the places where
it has been modified (the AT91CAP9 files, the AT91SAM9260 files which
were copied from AT91CAP9, and a couple of other files where the
' <at> ' sequence was present).

Signed-off-by: Stelian Pop <stelian@popies.net>
---
 CHANGELOG                                  |   12 ++++++------
 board/atmel/at91cap9adk/Makefile           |    2 +-
 board/atmel/at91cap9adk/at91cap9adk.c      |    2 +-
 board/atmel/at91cap9adk/led.c              |    2 +-
 board/atmel/at91cap9adk/nand.c             |    2 +-
 board/atmel/at91cap9adk/u-boot.lds         |    2 +-
 board/atmel/at91sam9260ek/Makefile         |    2 +-
 board/atmel/at91sam9260ek/at91sam9260ek.c  |    2 +-
 board/atmel/at91sam9260ek/led.c            |    2 +-
 board/atmel/at91sam9260ek/nand.c           |    2 +-
 board/atmel/at91sam9260ek/u-boot.lds       |    2 +-
 cpu/arm926ejs/at91sam9/Makefile            |    2 +-
 cpu/arm926ejs/at91sam9/ether.c             |    2 +-
 cpu/arm926ejs/at91sam9/lowlevel_init.S     |    2 +-
 cpu/arm926ejs/at91sam9/timer.c             |    2 +-
 cpu/arm926ejs/at91sam9/usb.c               |    2 +-
 drivers/net/smc911x.c                      |    2 +-
 include/asm-arm/arch-at91sam9/clk.h        |    2 +-
 include/asm-arm/arch-at91sam9/memory-map.h |    2 +-
 include/asm-arm/dma-mapping.h              |    2 +-
 include/configs/at91cap9adk.h              |    2 +-
 include/configs/at91sam9260ek.h            |    2 +-
 22 files changed, 27 insertions(+), 27 deletions(-)

diff --git a/CHANGELOG b/CHANGELOG
index 5d21db1..6aadcca 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -6477,7 +6477,7 @@ Date:	Mon Mar 3 11:57:23 2008 +0000
     Originally pointed out by Laurent Pinchart <laurent.pinchart@tbox.biz>,
     see http://thread.gmane.org/gmane.comp.boot-loaders.u-boot/22846
 
-    Signed-off-by: Bernhard Nemec <bnemec <at> ganssloser.com>
+    Signed-off-by: Bernhard Nemec <bnemec@ganssloser.com>
 
 commit 84d0c2f1e39caff58bf765a7ab7c72da23c25ec8
 Author: Kim B. Heino <Kim.Heino@bluegiga.com>
@@ -7707,7 +7707,7 @@ Date:	Mon Feb 18 14:01:56 2008 -0600
     86xx: Convert sbc8641d to use libfdt.
 
     This is the proper fix for a missing closing brace in the function
-    ft_cpu_setup() noticed by joe.hamman <at> embeddedspecialties.com.
+    ft_cpu_setup() noticed by joe.hamman at embeddedspecialties.com.
     The ft_cpu_setup() function in mpc8641hpcn.c should have been
     removed earlier as it was under the obsolete CONFIG_OF_FLAT_TREE,
     but was missed.  Only, the sbc8641d was nominally still using it.
@@ -8102,7 +8102,7 @@ Date:	Fri Feb 22 11:40:50 2008 +0000
 
     We already have a vendor subdir for Atmel, so we should use it.
 
-    Signed-off-by: Haavard Skinnemoen <hskinnemoen <at> atmel.com>
+    Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
 
 commit 6d0943a6be99977d6d853d51749e9963d68eb192
 Author: Andreas Engel <andreas.engel@ericsson.com>
@@ -8152,8 +8152,8 @@ Date:	Thu Jan 3 21:15:56 2008 +0000
 
     AT91CAP9 support : MACB changes
 
-    Signed-off-by: Stelian Pop <stelian <at> popies.net>
-    Acked-by: Haavard Skinnemoen <hskinnemoen <at> atmel.com>
+    Signed-off-by: Stelian Pop <stelian@popies.net>
+    Acked-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
 
 commit 6afcabf11d7321850f4feaadfee841488ace54c5
 Author: Stelian Pop <stelian@popies.net>
@@ -8169,7 +8169,7 @@ Date:	Wed Jan 30 21:15:54 2008 +0000
 
     AT91CAP9 support : cpu/ files
 
-    Signed-off-by: Stelian Pop <stelian <at> popies.net>
+    Signed-off-by: Stelian Pop <stelian@popies.net>
 
 commit fa506a926cec348805143576c941f8e61b333cc0
 Author: Stelian Pop <stelian@popies.net>
diff --git a/board/atmel/at91cap9adk/Makefile b/board/atmel/at91cap9adk/Makefile
index 6b4b4b0..e33af76 100644
--- a/board/atmel/at91cap9adk/Makefile
+++ b/board/atmel/at91cap9adk/Makefile
@@ -1,6 +1,6 @@
 #
 # (C) Copyright 2003-2008
-# Wolfgang Denk, DENX Software Engineering, wd <at> denx.de.
+# Wolfgang Denk, DENX Software Engineering, wd at denx.de.
 #
 # See file CREDITS for list of people who contributed to this
 # project.
diff --git a/board/atmel/at91cap9adk/at91cap9adk.c b/board/atmel/at91cap9adk/at91cap9adk.c
index 24861ba..e6ae60c 100644
--- a/board/atmel/at91cap9adk/at91cap9adk.c
+++ b/board/atmel/at91cap9adk/at91cap9adk.c
@@ -1,6 +1,6 @@
 /*
  * (C) Copyright 2007-2008
- * Stelian Pop <stelian.pop <at> leadtechdesign.com>
+ * Stelian Pop <stelian.pop@leadtechdesign.com>
  * Lead Tech Design <www.leadtechdesign.com>
  *
  * See file CREDITS for list of people who contributed to this
diff --git a/board/atmel/at91cap9adk/led.c b/board/atmel/at91cap9adk/led.c
index 04de139..a137c2a 100644
--- a/board/atmel/at91cap9adk/led.c
+++ b/board/atmel/at91cap9adk/led.c
@@ -1,6 +1,6 @@
 /*
  * (C) Copyright 2007-2008
- * Stelian Pop <stelian.pop <at> leadtechdesign.com>
+ * Stelian Pop <stelian.pop@leadtechdesign.com>
  * Lead Tech Design <www.leadtechdesign.com>
  *
  * See file CREDITS for list of people who contributed to this
diff --git a/board/atmel/at91cap9adk/nand.c b/board/atmel/at91cap9adk/nand.c
index c72b024..28091a4 100644
--- a/board/atmel/at91cap9adk/nand.c
+++ b/board/atmel/at91cap9adk/nand.c
@@ -1,6 +1,6 @@
 /*
  * (C) Copyright 2007-2008
- * Stelian Pop <stelian.pop <at> leadtechdesign.com>
+ * Stelian Pop <stelian.pop@leadtechdesign.com>
  * Lead Tech Design <www.leadtechdesign.com>
  *
  * (C) Copyright 2006 ATMEL Rousset, Lacressonniere Nicolas
diff --git a/board/atmel/at91cap9adk/u-boot.lds b/board/atmel/at91cap9adk/u-boot.lds
index 05a6d83..996f401 100644
--- a/board/atmel/at91cap9adk/u-boot.lds
+++ b/board/atmel/at91cap9adk/u-boot.lds
@@ -1,6 +1,6 @@
 /*
  * (C) Copyright 2002
- * Gary Jennejohn, DENX Software Engineering, <gj <at> denx.de>
+ * Gary Jennejohn, DENX Software Engineering, <gj@denx.de>
  *
  * See file CREDITS for list of people who contributed to this
  * project.
diff --git a/board/atmel/at91sam9260ek/Makefile b/board/atmel/at91sam9260ek/Makefile
index defc085..e6e4082 100644
--- a/board/atmel/at91sam9260ek/Makefile
+++ b/board/atmel/at91sam9260ek/Makefile
@@ -1,6 +1,6 @@
 #
 # (C) Copyright 2003-2008
-# Wolfgang Denk, DENX Software Engineering, wd <at> denx.de.
+# Wolfgang Denk, DENX Software Engineering, wd at denx.de.
 #
 # See file CREDITS for list of people who contributed to this
 # project.
diff --git a/board/atmel/at91sam9260ek/at91sam9260ek.c b/board/atmel/at91sam9260ek/at91sam9260ek.c
index a55468e..58d4945 100644
--- a/board/atmel/at91sam9260ek/at91sam9260ek.c
+++ b/board/atmel/at91sam9260ek/at91sam9260ek.c
@@ -1,6 +1,6 @@
 /*
  * (C) Copyright 2007-2008
- * Stelian Pop <stelian.pop <at> leadtechdesign.com>
+ * Stelian Pop <stelian.pop@leadtechdesign.com>
  * Lead Tech Design <www.leadtechdesign.com>
  *
  * See file CREDITS for list of people who contributed to this
diff --git a/board/atmel/at91sam9260ek/led.c b/board/atmel/at91sam9260ek/led.c
index 4c53742..ddc375f 100644
--- a/board/atmel/at91sam9260ek/led.c
+++ b/board/atmel/at91sam9260ek/led.c
@@ -1,6 +1,6 @@
 /*
  * (C) Copyright 2007-2008
- * Stelian Pop <stelian.pop <at> leadtechdesign.com>
+ * Stelian Pop <stelian.pop@leadtechdesign.com>
  * Lead Tech Design <www.leadtechdesign.com>
  *
  * See file CREDITS for list of people who contributed to this
diff --git a/board/atmel/at91sam9260ek/nand.c b/board/atmel/at91sam9260ek/nand.c
index abb788a..7c1e6ab 100644
--- a/board/atmel/at91sam9260ek/nand.c
+++ b/board/atmel/at91sam9260ek/nand.c
@@ -1,6 +1,6 @@
 /*
  * (C) Copyright 2007-2008
- * Stelian Pop <stelian.pop <at> leadtechdesign.com>
+ * Stelian Pop <stelian.pop@leadtechdesign.com>
  * Lead Tech Design <www.leadtechdesign.com>
  *
  * (C) Copyright 2006 ATMEL Rousset, Lacressonniere Nicolas
diff --git a/board/atmel/at91sam9260ek/u-boot.lds b/board/atmel/at91sam9260ek/u-boot.lds
index 05a6d83..996f401 100644
--- a/board/atmel/at91sam9260ek/u-boot.lds
+++ b/board/atmel/at91sam9260ek/u-boot.lds
@@ -1,6 +1,6 @@
 /*
  * (C) Copyright 2002
- * Gary Jennejohn, DENX Software Engineering, <gj <at> denx.de>
+ * Gary Jennejohn, DENX Software Engineering, <gj@denx.de>
  *
  * See file CREDITS for list of people who contributed to this
  * project.
diff --git a/cpu/arm926ejs/at91sam9/Makefile b/cpu/arm926ejs/at91sam9/Makefile
index 203abc2..44cde1a 100644
--- a/cpu/arm926ejs/at91sam9/Makefile
+++ b/cpu/arm926ejs/at91sam9/Makefile
@@ -1,6 +1,6 @@
 #
 # (C) Copyright 2000-2008
-# Wolfgang Denk, DENX Software Engineering, wd <at> denx.de.
+# Wolfgang Denk, DENX Software Engineering, wd at denx.de.
 #
 # See file CREDITS for list of people who contributed to this
 # project.
diff --git a/cpu/arm926ejs/at91sam9/ether.c b/cpu/arm926ejs/at91sam9/ether.c
index e4f5601..7e11fe4 100644
--- a/cpu/arm926ejs/at91sam9/ether.c
+++ b/cpu/arm926ejs/at91sam9/ether.c
@@ -1,6 +1,6 @@
 /*
  * (C) Copyright 2007-2008
- * Stelian Pop <stelian.pop <at> leadtechdesign.com>
+ * Stelian Pop <stelian.pop@leadtechdesign.com>
  * Lead Tech Design <www.leadtechdesign.com>
  *
  * See file CREDITS for list of people who contributed to this
diff --git a/cpu/arm926ejs/at91sam9/lowlevel_init.S b/cpu/arm926ejs/at91sam9/lowlevel_init.S
index 40a3f6a..ec6ad5d 100644
--- a/cpu/arm926ejs/at91sam9/lowlevel_init.S
+++ b/cpu/arm926ejs/at91sam9/lowlevel_init.S
@@ -2,7 +2,7 @@
  * AT91CAP9/SAM9 setup stuff
  *
  * (C) Copyright 2007-2008
- * Stelian Pop <stelian.pop <at> leadtechdesign.com>
+ * Stelian Pop <stelian.pop@leadtechdesign.com>
  * Lead Tech Design <www.leadtechdesign.com>
  *
  * See file CREDITS for list of people who contributed to this
diff --git a/cpu/arm926ejs/at91sam9/timer.c b/cpu/arm926ejs/at91sam9/timer.c
index 4e79466..c79ec7e 100644
--- a/cpu/arm926ejs/at91sam9/timer.c
+++ b/cpu/arm926ejs/at91sam9/timer.c
@@ -1,6 +1,6 @@
 /*
  * (C) Copyright 2007-2008
- * Stelian Pop <stelian.pop <at> leadtechdesign.com>
+ * Stelian Pop <stelian.pop@leadtechdesign.com>
  * Lead Tech Design <www.leadtechdesign.com>
  *
  * See file CREDITS for list of people who contributed to this
diff --git a/cpu/arm926ejs/at91sam9/usb.c b/cpu/arm926ejs/at91sam9/usb.c
index d678897..441349d 100644
--- a/cpu/arm926ejs/at91sam9/usb.c
+++ b/cpu/arm926ejs/at91sam9/usb.c
@@ -1,6 +1,6 @@
 /*
  * (C) Copyright 2006
- * DENX Software Engineering <mk <at> denx.de>
+ * DENX Software Engineering <mk@denx.de>
  *
  * See file CREDITS for list of people who contributed to this
  * project.
diff --git a/drivers/net/smc911x.c b/drivers/net/smc911x.c
index d22c889..c17dcf4 100644
--- a/drivers/net/smc911x.c
+++ b/drivers/net/smc911x.c
@@ -1,7 +1,7 @@
 /*
  * SMSC LAN9[12]1[567] Network driver
  *
- * (c) 2007 Pengutronix, Sascha Hauer <s.hauer <at> pengutronix.de>
+ * (c) 2007 Pengutronix, Sascha Hauer <s.hauer@pengutronix.de>
  *
  * See file CREDITS for list of people who contributed to this
  * project.
diff --git a/include/asm-arm/arch-at91sam9/clk.h b/include/asm-arm/arch-at91sam9/clk.h
index 86da9a6..f67b435 100644
--- a/include/asm-arm/arch-at91sam9/clk.h
+++ b/include/asm-arm/arch-at91sam9/clk.h
@@ -1,6 +1,6 @@
 /*
  * (C) Copyright 2007
- * Stelian Pop <stelian.pop <at> leadtechdesign.com>
+ * Stelian Pop <stelian.pop@leadtechdesign.com>
  * Lead Tech Design <www.leadtechdesign.com>
  *
  * See file CREDITS for list of people who contributed to this
diff --git a/include/asm-arm/arch-at91sam9/memory-map.h b/include/asm-arm/arch-at91sam9/memory-map.h
index da98822..8015dad 100644
--- a/include/asm-arm/arch-at91sam9/memory-map.h
+++ b/include/asm-arm/arch-at91sam9/memory-map.h
@@ -1,6 +1,6 @@
 /*
  * (C) Copyright 2007-2008
- * Stelian Pop <stelian.pop <at> leadtechdesign.com>
+ * Stelian Pop <stelian.pop@leadtechdesign.com>
  * Lead Tech Design <www.leadtechdesign.com>
  *
  * See file CREDITS for list of people who contributed to this
diff --git a/include/asm-arm/dma-mapping.h b/include/asm-arm/dma-mapping.h
index 8054f62..501ce0e 100644
--- a/include/asm-arm/dma-mapping.h
+++ b/include/asm-arm/dma-mapping.h
@@ -1,6 +1,6 @@
 /*
  * (C) Copyright 2007
- * Stelian Pop <stelian.pop <at> leadtechdesign.com>
+ * Stelian Pop <stelian.pop@leadtechdesign.com>
  * Lead Tech Design <www.leadtechdesign.com>
  *
  * See file CREDITS for list of people who contributed to this
diff --git a/include/configs/at91cap9adk.h b/include/configs/at91cap9adk.h
index dab21d0..c891fa8 100644
--- a/include/configs/at91cap9adk.h
+++ b/include/configs/at91cap9adk.h
@@ -1,6 +1,6 @@
 /*
  * (C) Copyright 2007-2008
- * Stelian Pop <stelian.pop <at> leadtechdesign.com>
+ * Stelian Pop <stelian.pop@leadtechdesign.com>
  * Lead Tech Design <www.leadtechdesign.com>
  *
  * Configuation settings for the AT91CAP9ADK board.
diff --git a/include/configs/at91sam9260ek.h b/include/configs/at91sam9260ek.h
index 96d1b8d..41c418f 100644
--- a/include/configs/at91sam9260ek.h
+++ b/include/configs/at91sam9260ek.h
@@ -1,6 +1,6 @@
 /*
  * (C) Copyright 2007-2008
- * Stelian Pop <stelian.pop <at> leadtechdesign.com>
+ * Stelian Pop <stelian.pop@leadtechdesign.com>
  * Lead Tech Design <www.leadtechdesign.com>
  *
  * Configuation settings for the AT91SAM9260EK board.
-- 
1.5.3.3

^ permalink raw reply related	[flat|nested] 54+ messages in thread

* [U-Boot-Users] [PATCH 02/26] Update origin and copyright information in arch-at91sam9 header files
  2008-05-08 20:52 [U-Boot-Users] [PATCH v2 ARM/AT91 0/26] AT91SAM/CAP patches for U-Boot 1.3.4 Stelian Pop
  2008-05-08 20:52 ` [U-Boot-Users] [PATCH 01/26] Fix @ -> <at> substitution Stelian Pop
@ 2008-05-08 20:52 ` Stelian Pop
  2008-05-08 21:26   ` Jean-Christophe PLAGNIOL-VILLARD
  2008-05-09 22:26   ` Wolfgang Denk
  2008-05-08 20:52 ` [U-Boot-Users] [PATCH 03/26] Add copyright information in Atmel boards partition.c Stelian Pop
                   ` (25 subsequent siblings)
  27 siblings, 2 replies; 54+ messages in thread
From: Stelian Pop @ 2008-05-08 20:52 UTC (permalink / raw)
  To: u-boot

When doing the AT91CAP9/AT91SAM9 port, a number of header files were
copied from the Linux kernel sources. This patch explicitly specifies
this origin for all the copied headers, and for those missing copyright
information, adds it.

Additionaly, the header file 'at91sam926x_mc.h' has been superceeded
in the latest kernel sources by 'at91sam9_smc.h'.

The copyright information has been confirmed by the AT91 Linux kernel
maintainer, Andrew Victor <avictor.za@gmail.com>.

Signed-off-by: Stelian Pop <stelian@popies.net>
---
 board/atmel/at91cap9adk/at91cap9adk.c              |    2 +-
 board/atmel/at91sam9260ek/at91sam9260ek.c          |    2 +-
 include/asm-arm/arch-at91sam9/at91_pio.h           |    2 +-
 include/asm-arm/arch-at91sam9/at91_pit.h           |    5 +-
 include/asm-arm/arch-at91sam9/at91_pmc.h           |    2 +-
 include/asm-arm/arch-at91sam9/at91_rstc.h          |    5 +-
 include/asm-arm/arch-at91sam9/at91_spi.h           |    2 +-
 include/asm-arm/arch-at91sam9/at91cap9.h           |    2 +-
 include/asm-arm/arch-at91sam9/at91cap9_matrix.h    |    2 +-
 include/asm-arm/arch-at91sam9/at91sam9260.h        |    2 +-
 include/asm-arm/arch-at91sam9/at91sam9260_matrix.h |    4 +-
 include/asm-arm/arch-at91sam9/at91sam926x_mc.h     |  140 --------------------
 include/asm-arm/arch-at91sam9/at91sam9_smc.h       |   76 +++++++++++
 include/asm-arm/arch-at91sam9/gpio.h               |    2 +-
 include/asm-arm/arch-at91sam9/hardware.h           |    2 +-
 include/asm-arm/arch-at91sam9/io.h                 |    2 +-
 16 files changed, 98 insertions(+), 154 deletions(-)
 delete mode 100644 include/asm-arm/arch-at91sam9/at91sam926x_mc.h
 create mode 100644 include/asm-arm/arch-at91sam9/at91sam9_smc.h

diff --git a/board/atmel/at91cap9adk/at91cap9adk.c b/board/atmel/at91cap9adk/at91cap9adk.c
index e6ae60c..310a3ef 100644
--- a/board/atmel/at91cap9adk/at91cap9adk.c
+++ b/board/atmel/at91cap9adk/at91cap9adk.c
@@ -25,7 +25,7 @@
 #include <common.h>
 #include <asm/arch/at91cap9.h>
 #include <asm/arch/at91cap9_matrix.h>
-#include <asm/arch/at91sam926x_mc.h>
+#include <asm/arch/at91sam_smc.h>
 #include <asm/arch/at91_pmc.h>
 #include <asm/arch/at91_rstc.h>
 #include <asm/arch/gpio.h>
diff --git a/board/atmel/at91sam9260ek/at91sam9260ek.c b/board/atmel/at91sam9260ek/at91sam9260ek.c
index 58d4945..21479ac 100644
--- a/board/atmel/at91sam9260ek/at91sam9260ek.c
+++ b/board/atmel/at91sam9260ek/at91sam9260ek.c
@@ -25,7 +25,7 @@
 #include <common.h>
 #include <asm/arch/at91sam9260.h>
 #include <asm/arch/at91sam9260_matrix.h>
-#include <asm/arch/at91sam926x_mc.h>
+#include <asm/arch/at91sam9_smc.h>
 #include <asm/arch/at91_pmc.h>
 #include <asm/arch/at91_rstc.h>
 #include <asm/arch/gpio.h>
diff --git a/include/asm-arm/arch-at91sam9/at91_pio.h b/include/asm-arm/arch-at91sam9/at91_pio.h
index 84c3866..f6ce1f9 100644
--- a/include/asm-arm/arch-at91sam9/at91_pio.h
+++ b/include/asm-arm/arch-at91sam9/at91_pio.h
@@ -1,5 +1,5 @@
 /*
- * include/asm-arm/arch-at91/at91_pio.h
+ * [origin: Linux kernel include/asm-arm/arch-at91/at91_pio.h]
  *
  * Copyright (C) 2005 Ivan Kokshaysky
  * Copyright (C) SAN People
diff --git a/include/asm-arm/arch-at91sam9/at91_pit.h b/include/asm-arm/arch-at91sam9/at91_pit.h
index 5026325..94dd242 100644
--- a/include/asm-arm/arch-at91sam9/at91_pit.h
+++ b/include/asm-arm/arch-at91sam9/at91_pit.h
@@ -1,5 +1,8 @@
 /*
- * include/asm-arm/arch-at91/at91_pit.h
+ * [origin: Linux kernel include/asm-arm/arch-at91/at91_pit.h]
+ *
+ * Copyright (C) 2007 Andrew Victor
+ * Copyright (C) 2007 Atmel Corporation.
  *
  * Periodic Interval Timer (PIT) - System peripherals regsters.
  * Based on AT91SAM9261 datasheet revision D.
diff --git a/include/asm-arm/arch-at91sam9/at91_pmc.h b/include/asm-arm/arch-at91sam9/at91_pmc.h
index 52cd8e5..103be86 100644
--- a/include/asm-arm/arch-at91sam9/at91_pmc.h
+++ b/include/asm-arm/arch-at91sam9/at91_pmc.h
@@ -1,5 +1,5 @@
 /*
- * include/asm-arm/arch-at91/at91_pmc.h
+ * [origin: Linux kernel include/asm-arm/arch-at91/at91_pmc.h]
  *
  * Copyright (C) 2005 Ivan Kokshaysky
  * Copyright (C) SAN People
diff --git a/include/asm-arm/arch-at91sam9/at91_rstc.h b/include/asm-arm/arch-at91sam9/at91_rstc.h
index fb8d161..e49caef 100644
--- a/include/asm-arm/arch-at91sam9/at91_rstc.h
+++ b/include/asm-arm/arch-at91sam9/at91_rstc.h
@@ -1,5 +1,8 @@
 /*
- * include/asm-arm/arch-at91/at91_rstc.h
+ * [origin: Linux kernel include/asm-arm/arch-at91/at91_rstc.h]
+ *
+ * Copyright (C) 2007 Andrew Victor
+ * Copyright (C) 2007 Atmel Corporation.
  *
  * Reset Controller (RSTC) - System peripherals regsters.
  * Based on AT91SAM9261 datasheet revision D.
diff --git a/include/asm-arm/arch-at91sam9/at91_spi.h b/include/asm-arm/arch-at91sam9/at91_spi.h
index aaad926..30643c6 100644
--- a/include/asm-arm/arch-at91sam9/at91_spi.h
+++ b/include/asm-arm/arch-at91sam9/at91_spi.h
@@ -1,5 +1,5 @@
 /*
- * include/asm-arm/arch-at91/at91_spi.h
+ * [origin: Linux kernel include/asm-arm/arch-at91/at91_spi.h]
  *
  * Copyright (C) 2005 Ivan Kokshaysky
  * Copyright (C) SAN People
diff --git a/include/asm-arm/arch-at91sam9/at91cap9.h b/include/asm-arm/arch-at91sam9/at91cap9.h
index e16909c..d1b33a0 100644
--- a/include/asm-arm/arch-at91sam9/at91cap9.h
+++ b/include/asm-arm/arch-at91sam9/at91cap9.h
@@ -1,5 +1,5 @@
 /*
- * include/asm-arm/arch-at91/at91cap9.h
+ * [origin: Linux kernel include/asm-arm/arch-at91/at91cap9.h]
  *
  *  Copyright (C) 2007 Stelian Pop <stelian.pop@leadtechdesign.com>
  *  Copyright (C) 2007 Lead Tech Design <www.leadtechdesign.com>
diff --git a/include/asm-arm/arch-at91sam9/at91cap9_matrix.h b/include/asm-arm/arch-at91sam9/at91cap9_matrix.h
index a641686..22b7e9b 100644
--- a/include/asm-arm/arch-at91sam9/at91cap9_matrix.h
+++ b/include/asm-arm/arch-at91sam9/at91cap9_matrix.h
@@ -1,5 +1,5 @@
 /*
- * include/asm-arm/arch-at91/at91cap9_matrix.h
+ * [origin: Linux kernel include/asm-arm/arch-at91/at91cap9_matrix.h]
  *
  *  Copyright (C) 2007 Stelian Pop <stelian.pop@leadtechdesign.com>
  *  Copyright (C) 2007 Lead Tech Design <www.leadtechdesign.com>
diff --git a/include/asm-arm/arch-at91sam9/at91sam9260.h b/include/asm-arm/arch-at91sam9/at91sam9260.h
index 1bf4598..920a7f3 100644
--- a/include/asm-arm/arch-at91sam9/at91sam9260.h
+++ b/include/asm-arm/arch-at91sam9/at91sam9260.h
@@ -1,5 +1,5 @@
 /*
- * include/asm-arm/arch-at91/at91sam9260.h
+ * [origin: Linux kernel include/asm-arm/arch-at91/at91sam9260.h]
  *
  * (C) 2006 Andrew Victor
  *
diff --git a/include/asm-arm/arch-at91sam9/at91sam9260_matrix.h b/include/asm-arm/arch-at91sam9/at91sam9260_matrix.h
index a8e9fec..f8b023d 100644
--- a/include/asm-arm/arch-at91sam9/at91sam9260_matrix.h
+++ b/include/asm-arm/arch-at91sam9/at91sam9260_matrix.h
@@ -1,5 +1,7 @@
 /*
- * include/asm-arm/arch-at91/at91sam9260_matrix.h
+ * [origin: Linux kernel include/asm-arm/arch-at91/at91sam9260_matrix.h]
+ *
+ * Copyright (C) 2007 Atmel Corporation.
  *
  * Memory Controllers (MATRIX, EBI) - System peripherals registers.
  * Based on AT91SAM9260 datasheet revision B.
diff --git a/include/asm-arm/arch-at91sam9/at91sam926x_mc.h b/include/asm-arm/arch-at91sam9/at91sam926x_mc.h
deleted file mode 100644
index 041138f..0000000
--- a/include/asm-arm/arch-at91sam9/at91sam926x_mc.h
+++ /dev/null
@@ -1,140 +0,0 @@
-/*
- * include/asm-arm/arch-at91/at91sam926x_mc.h
- *
- * Memory Controllers (SMC, SDRAMC) - System peripherals registers.
- * Based on AT91SAM9261 datasheet revision D.
- *
- * 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 AT91SAM926x_MC_H
-#define AT91SAM926x_MC_H
-
-/* SDRAM Controller (SDRAMC) registers */
-#define AT91_SDRAMC_MR		(AT91_SDRAMC + 0x00)	/* SDRAM Controller Mode Register */
-#define		AT91_SDRAMC_MODE	(0xf << 0)		/* Command Mode */
-#define			AT91_SDRAMC_MODE_NORMAL		0
-#define			AT91_SDRAMC_MODE_NOP		1
-#define			AT91_SDRAMC_MODE_PRECHARGE	2
-#define			AT91_SDRAMC_MODE_LMR		3
-#define			AT91_SDRAMC_MODE_REFRESH	4
-#define			AT91_SDRAMC_MODE_EXT_LMR	5
-#define			AT91_SDRAMC_MODE_DEEP		6
-
-#define AT91_SDRAMC_TR		(AT91_SDRAMC + 0x04)	/* SDRAM Controller Refresh Timer Register */
-#define		AT91_SDRAMC_COUNT	(0xfff << 0)		/* Refresh Timer Counter */
-
-#define AT91_SDRAMC_CR		(AT91_SDRAMC + 0x08)	/* SDRAM Controller Configuration Register */
-#define		AT91_SDRAMC_NC		(3 << 0)		/* Number of Column Bits */
-#define			AT91_SDRAMC_NC_8	(0 << 0)
-#define			AT91_SDRAMC_NC_9	(1 << 0)
-#define			AT91_SDRAMC_NC_10	(2 << 0)
-#define			AT91_SDRAMC_NC_11	(3 << 0)
-#define		AT91_SDRAMC_NR		(3 << 2)		/* Number of Row Bits */
-#define			AT91_SDRAMC_NR_11	(0 << 2)
-#define			AT91_SDRAMC_NR_12	(1 << 2)
-#define			AT91_SDRAMC_NR_13	(2 << 2)
-#define		AT91_SDRAMC_NB		(1 << 4)		/* Number of Banks */
-#define			AT91_SDRAMC_NB_2	(0 << 4)
-#define			AT91_SDRAMC_NB_4	(1 << 4)
-#define		AT91_SDRAMC_CAS		(3 << 5)		/* CAS Latency */
-#define			AT91_SDRAMC_CAS_1	(1 << 5)
-#define			AT91_SDRAMC_CAS_2	(2 << 5)
-#define			AT91_SDRAMC_CAS_3	(3 << 5)
-#define		AT91_SDRAMC_DBW		(1 << 7)		/* Data Bus Width */
-#define			AT91_SDRAMC_DBW_32	(0 << 7)
-#define			AT91_SDRAMC_DBW_16	(1 << 7)
-#define		AT91_SDRAMC_TWR		(0xf <<  8)		/* Write Recovery Delay */
-#define		AT91_SDRAMC_TRC		(0xf << 12)		/* Row Cycle Delay */
-#define		AT91_SDRAMC_TRP		(0xf << 16)		/* Row Precharge Delay */
-#define		AT91_SDRAMC_TRCD	(0xf << 20)		/* Row to Column Delay */
-#define		AT91_SDRAMC_TRAS	(0xf << 24)		/* Active to Precharge Delay */
-#define		AT91_SDRAMC_TXSR	(0xf << 28)		/* Exit Self Refresh to Active Delay */
-
-#define AT91_SDRAMC_LPR		(AT91_SDRAMC + 0x10)	/* SDRAM Controller Low Power Register */
-#define		AT91_SDRAMC_LPCB		(3 << 0)	/* Low-power Configurations */
-#define			AT91_SDRAMC_LPCB_DISABLE		0
-#define			AT91_SDRAMC_LPCB_SELF_REFRESH		1
-#define			AT91_SDRAMC_LPCB_POWER_DOWN		2
-#define			AT91_SDRAMC_LPCB_DEEP_POWER_DOWN	3
-#define		AT91_SDRAMC_PASR		(7 << 4)	/* Partial Array Self Refresh */
-#define		AT91_SDRAMC_TCSR		(3 << 8)	/* Temperature Compensated Self Refresh */
-#define		AT91_SDRAMC_DS			(3 << 10)	/* Drive Strenght */
-#define		AT91_SDRAMC_TIMEOUT		(3 << 12)	/* Time to define when Low Power Mode is enabled */
-#define			AT91_SDRAMC_TIMEOUT_0_CLK_CYCLES	(0 << 12)
-#define			AT91_SDRAMC_TIMEOUT_64_CLK_CYCLES	(1 << 12)
-#define			AT91_SDRAMC_TIMEOUT_128_CLK_CYCLES	(2 << 12)
-
-#define AT91_SDRAMC_IER		(AT91_SDRAMC + 0x14)	/* SDRAM Controller Interrupt Enable Register */
-#define AT91_SDRAMC_IDR		(AT91_SDRAMC + 0x18)	/* SDRAM Controller Interrupt Disable Register */
-#define AT91_SDRAMC_IMR		(AT91_SDRAMC + 0x1C)	/* SDRAM Controller Interrupt Mask Register */
-#define AT91_SDRAMC_ISR		(AT91_SDRAMC + 0x20)	/* SDRAM Controller Interrupt Status Register */
-#define		AT91_SDRAMC_RES		(1 << 0)		/* Refresh Error Status */
-
-#define AT91_SDRAMC_MDR		(AT91_SDRAMC + 0x24)	/* SDRAM Memory Device Register */
-#define		AT91_SDRAMC_MD		(3 << 0)		/* Memory Device Type */
-#define			AT91_SDRAMC_MD_SDRAM		0
-#define			AT91_SDRAMC_MD_LOW_POWER_SDRAM	1
-
-/* Static Memory Controller (SMC) registers */
-#define AT91_SMC_SETUP(n)	(AT91_SMC + 0x00 + ((n)*0x10))	/* Setup Register for CS n */
-#define		AT91_SMC_NWESETUP	(0x3f << 0)			/* NWE Setup Length */
-#define			AT91_SMC_NWESETUP_(x)	((x) << 0)
-#define		AT91_SMC_NCS_WRSETUP	(0x3f << 8)			/* NCS Setup Length in Write Access */
-#define			AT91_SMC_NCS_WRSETUP_(x)	((x) << 8)
-#define		AT91_SMC_NRDSETUP	(0x3f << 16)			/* NRD Setup Length */
-#define			AT91_SMC_NRDSETUP_(x)	((x) << 16)
-#define		AT91_SMC_NCS_RDSETUP	(0x3f << 24)			/* NCS Setup Length in Read Access */
-#define			AT91_SMC_NCS_RDSETUP_(x)	((x) << 24)
-
-#define AT91_SMC_PULSE(n)	(AT91_SMC + 0x04 + ((n)*0x10))	/* Pulse Register for CS n */
-#define		AT91_SMC_NWEPULSE	(0x7f <<  0)			/* NWE Pulse Length */
-#define			AT91_SMC_NWEPULSE_(x)	((x) << 0)
-#define		AT91_SMC_NCS_WRPULSE	(0x7f <<  8)			/* NCS Pulse Length in Write Access */
-#define			AT91_SMC_NCS_WRPULSE_(x)((x) << 8)
-#define		AT91_SMC_NRDPULSE	(0x7f << 16)			/* NRD Pulse Length */
-#define			AT91_SMC_NRDPULSE_(x)	((x) << 16)
-#define		AT91_SMC_NCS_RDPULSE	(0x7f << 24)			/* NCS Pulse Length in Read Access */
-#define			AT91_SMC_NCS_RDPULSE_(x)((x) << 24)
-
-#define AT91_SMC_CYCLE(n)	(AT91_SMC + 0x08 + ((n)*0x10))	/* Cycle Register for CS n */
-#define		AT91_SMC_NWECYCLE	(0x1ff << 0 )			/* Total Write Cycle Length */
-#define			AT91_SMC_NWECYCLE_(x)	((x) << 0)
-#define		AT91_SMC_NRDCYCLE	(0x1ff << 16)			/* Total Read Cycle Length */
-#define			AT91_SMC_NRDCYCLE_(x)	((x) << 16)
-
-#define AT91_SMC_MODE(n)	(AT91_SMC + 0x0c + ((n)*0x10))	/* Mode Register for CS n */
-#define		AT91_SMC_READMODE	(1 <<  0)			/* Read Mode */
-#define		AT91_SMC_WRITEMODE	(1 <<  1)			/* Write Mode */
-#define		AT91_SMC_EXNWMODE	(3 <<  4)			/* NWAIT Mode */
-#define			AT91_SMC_EXNWMODE_DISABLE	(0 << 4)
-#define			AT91_SMC_EXNWMODE_FROZEN	(2 << 4)
-#define			AT91_SMC_EXNWMODE_READY		(3 << 4)
-#define		AT91_SMC_BAT		(1 <<  8)			/* Byte Access Type */
-#define			AT91_SMC_BAT_SELECT		(0 << 8)
-#define			AT91_SMC_BAT_WRITE		(1 << 8)
-#define		AT91_SMC_DBW		(3 << 12)			/* Data Bus Width */
-#define			AT91_SMC_DBW_8			(0 << 12)
-#define			AT91_SMC_DBW_16			(1 << 12)
-#define			AT91_SMC_DBW_32			(2 << 12)
-#define		AT91_SMC_TDF		(0xf << 16)			/* Data Float Time. */
-#define			AT91_SMC_TDF_(x)		((x) << 16)
-#define		AT91_SMC_TDFMODE	(1 << 20)			/* TDF Optimization - Enabled */
-#define		AT91_SMC_PMEN		(1 << 24)			/* Page Mode Enabled */
-#define		AT91_SMC_PS		(3 << 28)			/* Page Size */
-#define			AT91_SMC_PS_4			(0 << 28)
-#define			AT91_SMC_PS_8			(1 << 28)
-#define			AT91_SMC_PS_16			(2 << 28)
-#define			AT91_SMC_PS_32			(3 << 28)
-
-#if defined(AT91_SMC1)		/* The AT91SAM9263 has 2 Static Memory contollers */
-#define AT91_SMC1_SETUP(n)	(AT91_SMC1 + 0x00 + ((n)*0x10))	/* Setup Register for CS n */
-#define AT91_SMC1_PULSE(n)	(AT91_SMC1 + 0x04 + ((n)*0x10))	/* Pulse Register for CS n */
-#define AT91_SMC1_CYCLE(n)	(AT91_SMC1 + 0x08 + ((n)*0x10))	/* Cycle Register for CS n */
-#define AT91_SMC1_MODE(n)	(AT91_SMC1 + 0x0c + ((n)*0x10))	/* Mode Register for CS n */
-#endif
-
-#endif
diff --git a/include/asm-arm/arch-at91sam9/at91sam9_smc.h b/include/asm-arm/arch-at91sam9/at91sam9_smc.h
new file mode 100644
index 0000000..d64511b
--- /dev/null
+++ b/include/asm-arm/arch-at91sam9/at91sam9_smc.h
@@ -0,0 +1,76 @@
+/*
+ * [origin: Linux kernel include/asm-arm/arch-at91/at91sam9_smc.h]
+ *
+ * Copyright (C) 2007 Andrew Victor
+ * Copyright (C) 2007 Atmel Corporation.
+ *
+ * Static Memory Controllers (SMC) - System peripherals registers.
+ * Based on AT91SAM9261 datasheet revision D.
+ *
+ * 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 AT91SAM9_SMC_H
+#define AT91SAM9_SMC_H
+
+#define AT91_SMC_SETUP(n)	(AT91_SMC + 0x00 + ((n)*0x10))	/* Setup Register for CS n */
+#define		AT91_SMC_NWESETUP	(0x3f << 0)			/* NWE Setup Length */
+#define			AT91_SMC_NWESETUP_(x)	((x) << 0)
+#define		AT91_SMC_NCS_WRSETUP	(0x3f << 8)			/* NCS Setup Length in Write Access */
+#define			AT91_SMC_NCS_WRSETUP_(x)	((x) << 8)
+#define		AT91_SMC_NRDSETUP	(0x3f << 16)			/* NRD Setup Length */
+#define			AT91_SMC_NRDSETUP_(x)	((x) << 16)
+#define		AT91_SMC_NCS_RDSETUP	(0x3f << 24)			/* NCS Setup Length in Read Access */
+#define			AT91_SMC_NCS_RDSETUP_(x)	((x) << 24)
+
+#define AT91_SMC_PULSE(n)	(AT91_SMC + 0x04 + ((n)*0x10))	/* Pulse Register for CS n */
+#define		AT91_SMC_NWEPULSE	(0x7f <<  0)			/* NWE Pulse Length */
+#define			AT91_SMC_NWEPULSE_(x)	((x) << 0)
+#define		AT91_SMC_NCS_WRPULSE	(0x7f <<  8)			/* NCS Pulse Length in Write Access */
+#define			AT91_SMC_NCS_WRPULSE_(x)((x) << 8)
+#define		AT91_SMC_NRDPULSE	(0x7f << 16)			/* NRD Pulse Length */
+#define			AT91_SMC_NRDPULSE_(x)	((x) << 16)
+#define		AT91_SMC_NCS_RDPULSE	(0x7f << 24)			/* NCS Pulse Length in Read Access */
+#define			AT91_SMC_NCS_RDPULSE_(x)((x) << 24)
+
+#define AT91_SMC_CYCLE(n)	(AT91_SMC + 0x08 + ((n)*0x10))	/* Cycle Register for CS n */
+#define		AT91_SMC_NWECYCLE	(0x1ff << 0 )			/* Total Write Cycle Length */
+#define			AT91_SMC_NWECYCLE_(x)	((x) << 0)
+#define		AT91_SMC_NRDCYCLE	(0x1ff << 16)			/* Total Read Cycle Length */
+#define			AT91_SMC_NRDCYCLE_(x)	((x) << 16)
+
+#define AT91_SMC_MODE(n)	(AT91_SMC + 0x0c + ((n)*0x10))	/* Mode Register for CS n */
+#define		AT91_SMC_READMODE	(1 <<  0)			/* Read Mode */
+#define		AT91_SMC_WRITEMODE	(1 <<  1)			/* Write Mode */
+#define		AT91_SMC_EXNWMODE	(3 <<  4)			/* NWAIT Mode */
+#define			AT91_SMC_EXNWMODE_DISABLE	(0 << 4)
+#define			AT91_SMC_EXNWMODE_FROZEN	(2 << 4)
+#define			AT91_SMC_EXNWMODE_READY		(3 << 4)
+#define		AT91_SMC_BAT		(1 <<  8)			/* Byte Access Type */
+#define			AT91_SMC_BAT_SELECT		(0 << 8)
+#define			AT91_SMC_BAT_WRITE		(1 << 8)
+#define		AT91_SMC_DBW		(3 << 12)			/* Data Bus Width */
+#define			AT91_SMC_DBW_8			(0 << 12)
+#define			AT91_SMC_DBW_16			(1 << 12)
+#define			AT91_SMC_DBW_32			(2 << 12)
+#define		AT91_SMC_TDF		(0xf << 16)			/* Data Float Time. */
+#define			AT91_SMC_TDF_(x)		((x) << 16)
+#define		AT91_SMC_TDFMODE	(1 << 20)			/* TDF Optimization - Enabled */
+#define		AT91_SMC_PMEN		(1 << 24)			/* Page Mode Enabled */
+#define		AT91_SMC_PS		(3 << 28)			/* Page Size */
+#define			AT91_SMC_PS_4			(0 << 28)
+#define			AT91_SMC_PS_8			(1 << 28)
+#define			AT91_SMC_PS_16			(2 << 28)
+#define			AT91_SMC_PS_32			(3 << 28)
+
+#if defined(AT91_SMC1)		/* The AT91SAM9263 has 2 Static Memory contollers */
+#define AT91_SMC1_SETUP(n)	(AT91_SMC1 + 0x00 + ((n)*0x10))	/* Setup Register for CS n */
+#define AT91_SMC1_PULSE(n)	(AT91_SMC1 + 0x04 + ((n)*0x10))	/* Pulse Register for CS n */
+#define AT91_SMC1_CYCLE(n)	(AT91_SMC1 + 0x08 + ((n)*0x10))	/* Cycle Register for CS n */
+#define AT91_SMC1_MODE(n)	(AT91_SMC1 + 0x0c + ((n)*0x10))	/* Mode Register for CS n */
+#endif
+
+#endif
diff --git a/include/asm-arm/arch-at91sam9/gpio.h b/include/asm-arm/arch-at91sam9/gpio.h
index 2500eae..c157e10 100644
--- a/include/asm-arm/arch-at91sam9/gpio.h
+++ b/include/asm-arm/arch-at91sam9/gpio.h
@@ -1,5 +1,5 @@
 /*
- * include/asm-arm/arch-at91/gpio.h
+ * [origin: Linux kernel include/asm-arm/arch-at91/gpio.h]
  *
  *  Copyright (C) 2005 HP Labs
  *
diff --git a/include/asm-arm/arch-at91sam9/hardware.h b/include/asm-arm/arch-at91sam9/hardware.h
index 80b334f..d2fe453 100644
--- a/include/asm-arm/arch-at91sam9/hardware.h
+++ b/include/asm-arm/arch-at91sam9/hardware.h
@@ -1,5 +1,5 @@
 /*
- * include/asm-arm/arch-at91/hardware.h
+ * [origin: Linux kernel include/asm-arm/arch-at91/hardware.h]
  *
  *  Copyright (C) 2003 SAN People
  *  Copyright (C) 2003 ATMEL
diff --git a/include/asm-arm/arch-at91sam9/io.h b/include/asm-arm/arch-at91sam9/io.h
index be9e9ab..f09b2df 100644
--- a/include/asm-arm/arch-at91sam9/io.h
+++ b/include/asm-arm/arch-at91sam9/io.h
@@ -1,5 +1,5 @@
 /*
- * include/asm-arm/arch-at91/io.h
+ * [origin: Linux kernel include/asm-arm/arch-at91/io.h]
  *
  *  Copyright (C) 2003 SAN People
  *
-- 
1.5.3.3

^ permalink raw reply related	[flat|nested] 54+ messages in thread

* [U-Boot-Users] [PATCH 03/26] Add copyright information in Atmel boards partition.c
  2008-05-08 20:52 [U-Boot-Users] [PATCH v2 ARM/AT91 0/26] AT91SAM/CAP patches for U-Boot 1.3.4 Stelian Pop
  2008-05-08 20:52 ` [U-Boot-Users] [PATCH 01/26] Fix @ -> <at> substitution Stelian Pop
  2008-05-08 20:52 ` [U-Boot-Users] [PATCH 02/26] Update origin and copyright information in arch-at91sam9 header files Stelian Pop
@ 2008-05-08 20:52 ` Stelian Pop
  2008-05-09 22:24   ` Wolfgang Denk
  2008-05-08 20:52 ` [U-Boot-Users] [PATCH 04/26] Add proper copyright notices in Atmel boards Makefiles Stelian Pop
                   ` (24 subsequent siblings)
  27 siblings, 1 reply; 54+ messages in thread
From: Stelian Pop @ 2008-05-08 20:52 UTC (permalink / raw)
  To: u-boot

When Ulf did the dataflash.c cleanup, he didn't add his copyright on
the new created files. This patch fixes the problem.

Signed-off-by: Stelian Pop <stelian@popies.net>
---
 board/atmel/at91cap9adk/partition.c   |    2 ++
 board/atmel/at91rm9200dk/partition.c  |    2 ++
 board/atmel/at91sam9260ek/partition.c |    2 ++
 3 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/board/atmel/at91cap9adk/partition.c b/board/atmel/at91cap9adk/partition.c
index 3bffd71..eb1a724 100644
--- a/board/atmel/at91cap9adk/partition.c
+++ b/board/atmel/at91cap9adk/partition.c
@@ -1,4 +1,6 @@
 /*
+ * (C) Copyright 2008
+ * Ulf Samuelsson <ulf@atmel.com>
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License as
diff --git a/board/atmel/at91rm9200dk/partition.c b/board/atmel/at91rm9200dk/partition.c
index a8a5fe6..975be17 100644
--- a/board/atmel/at91rm9200dk/partition.c
+++ b/board/atmel/at91rm9200dk/partition.c
@@ -1,4 +1,6 @@
 /*
+ * (C) Copyright 2008
+ * Ulf Samuelsson <ulf@atmel.com>
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License as
diff --git a/board/atmel/at91sam9260ek/partition.c b/board/atmel/at91sam9260ek/partition.c
index 389fb2c..557d695 100644
--- a/board/atmel/at91sam9260ek/partition.c
+++ b/board/atmel/at91sam9260ek/partition.c
@@ -1,4 +1,6 @@
 /*
+ * (C) Copyright 2008
+ * Ulf Samuelsson <ulf@atmel.com>
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License as
-- 
1.5.3.3

^ permalink raw reply related	[flat|nested] 54+ messages in thread

* [U-Boot-Users] [PATCH 04/26] Add proper copyright notices in Atmel boards Makefiles
  2008-05-08 20:52 [U-Boot-Users] [PATCH v2 ARM/AT91 0/26] AT91SAM/CAP patches for U-Boot 1.3.4 Stelian Pop
                   ` (2 preceding siblings ...)
  2008-05-08 20:52 ` [U-Boot-Users] [PATCH 03/26] Add copyright information in Atmel boards partition.c Stelian Pop
@ 2008-05-08 20:52 ` Stelian Pop
  2008-05-09 22:25   ` Wolfgang Denk
  2008-05-08 20:52 ` [U-Boot-Users] [PATCH 05/26] Use a common u-boot.lds file across all AT91CAP9/AT91SAM9 platforms Stelian Pop
                   ` (23 subsequent siblings)
  27 siblings, 1 reply; 54+ messages in thread
From: Stelian Pop @ 2008-05-08 20:52 UTC (permalink / raw)
  To: u-boot

The Makefiles for the AT91CAP9/AT91SAM9 boards have an incomplete
copyright notice. This patch adds the missing pieces.

Signed-off-by: Stelian Pop <stelian@popies.net>
---
 board/atmel/at91cap9adk/Makefile   |    4 ++++
 board/atmel/at91sam9260ek/Makefile |    4 ++++
 2 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/board/atmel/at91cap9adk/Makefile b/board/atmel/at91cap9adk/Makefile
index e33af76..f2b9c12 100644
--- a/board/atmel/at91cap9adk/Makefile
+++ b/board/atmel/at91cap9adk/Makefile
@@ -2,6 +2,10 @@
 # (C) Copyright 2003-2008
 # Wolfgang Denk, DENX Software Engineering, wd at denx.de.
 #
+# (C) Copyright 2008
+# Stelian Pop <stelian.pop@leadtechdesign.com>
+# Lead Tech Design <www.leadtechdesign.com>
+#
 # See file CREDITS for list of people who contributed to this
 # project.
 #
diff --git a/board/atmel/at91sam9260ek/Makefile b/board/atmel/at91sam9260ek/Makefile
index e6e4082..f93540a 100644
--- a/board/atmel/at91sam9260ek/Makefile
+++ b/board/atmel/at91sam9260ek/Makefile
@@ -2,6 +2,10 @@
 # (C) Copyright 2003-2008
 # Wolfgang Denk, DENX Software Engineering, wd at denx.de.
 #
+# (C) Copyright 2008
+# Stelian Pop <stelian.pop@leadtechdesign.com>
+# Lead Tech Design <www.leadtechdesign.com>
+#
 # See file CREDITS for list of people who contributed to this
 # project.
 #
-- 
1.5.3.3

^ permalink raw reply related	[flat|nested] 54+ messages in thread

* [U-Boot-Users] [PATCH 05/26] Use a common u-boot.lds file across all AT91CAP9/AT91SAM9 platforms
  2008-05-08 20:52 [U-Boot-Users] [PATCH v2 ARM/AT91 0/26] AT91SAM/CAP patches for U-Boot 1.3.4 Stelian Pop
                   ` (3 preceding siblings ...)
  2008-05-08 20:52 ` [U-Boot-Users] [PATCH 04/26] Add proper copyright notices in Atmel boards Makefiles Stelian Pop
@ 2008-05-08 20:52 ` Stelian Pop
  2008-05-08 20:52 ` [U-Boot-Users] [PATCH 06/26] AT91CAP9ADK: Handle 8 or 16 bit NAND Stelian Pop
                   ` (22 subsequent siblings)
  27 siblings, 0 replies; 54+ messages in thread
From: Stelian Pop @ 2008-05-08 20:52 UTC (permalink / raw)
  To: u-boot

All the AT91CAP9/AT91SAM9 boards have the same linker script. The patch
below avoids the duplication of u-boot.lds by putting the file in the
cpu directory instead of the board one.

Signed-off-by: Stelian Pop <stelian@popies.net>
---
 board/atmel/at91cap9adk/u-boot.lds   |   57 ----------------------------------
 board/atmel/at91sam9260ek/u-boot.lds |   57 ----------------------------------
 cpu/arm926ejs/at91sam9/config.mk     |    1 +
 cpu/arm926ejs/at91sam9/u-boot.lds    |   57 ++++++++++++++++++++++++++++++++++
 4 files changed, 58 insertions(+), 114 deletions(-)
 delete mode 100644 board/atmel/at91cap9adk/u-boot.lds
 delete mode 100644 board/atmel/at91sam9260ek/u-boot.lds
 create mode 100644 cpu/arm926ejs/at91sam9/u-boot.lds

diff --git a/board/atmel/at91cap9adk/u-boot.lds b/board/atmel/at91cap9adk/u-boot.lds
deleted file mode 100644
index 996f401..0000000
--- a/board/atmel/at91cap9adk/u-boot.lds
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * (C) Copyright 2002
- * Gary Jennejohn, DENX Software Engineering, <gj@denx.de>
- *
- * 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
- */
-
-OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")
-/*OUTPUT_FORMAT("elf32-arm", "elf32-arm", "elf32-arm")*/
-OUTPUT_ARCH(arm)
-ENTRY(_start)
-SECTIONS
-{
-	. = 0x00000000;
-
-	. = ALIGN(4);
-	.text :
-	{
-	  cpu/arm926ejs/start.o	(.text)
-	  *(.text)
-	}
-
-	. = ALIGN(4);
-	.rodata : { *(.rodata) }
-
-	. = ALIGN(4);
-	.data : { *(.data) }
-
-	. = ALIGN(4);
-	.got : { *(.got) }
-
-	. = .;
-	__u_boot_cmd_start = .;
-	.u_boot_cmd : { *(.u_boot_cmd) }
-	__u_boot_cmd_end = .;
-
-	. = ALIGN(4);
-	__bss_start = .;
-	.bss : { *(.bss) }
-	_end = .;
-}
diff --git a/board/atmel/at91sam9260ek/u-boot.lds b/board/atmel/at91sam9260ek/u-boot.lds
deleted file mode 100644
index 996f401..0000000
--- a/board/atmel/at91sam9260ek/u-boot.lds
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * (C) Copyright 2002
- * Gary Jennejohn, DENX Software Engineering, <gj@denx.de>
- *
- * 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
- */
-
-OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")
-/*OUTPUT_FORMAT("elf32-arm", "elf32-arm", "elf32-arm")*/
-OUTPUT_ARCH(arm)
-ENTRY(_start)
-SECTIONS
-{
-	. = 0x00000000;
-
-	. = ALIGN(4);
-	.text :
-	{
-	  cpu/arm926ejs/start.o	(.text)
-	  *(.text)
-	}
-
-	. = ALIGN(4);
-	.rodata : { *(.rodata) }
-
-	. = ALIGN(4);
-	.data : { *(.data) }
-
-	. = ALIGN(4);
-	.got : { *(.got) }
-
-	. = .;
-	__u_boot_cmd_start = .;
-	.u_boot_cmd : { *(.u_boot_cmd) }
-	__u_boot_cmd_end = .;
-
-	. = ALIGN(4);
-	__bss_start = .;
-	.bss : { *(.bss) }
-	_end = .;
-}
diff --git a/cpu/arm926ejs/at91sam9/config.mk b/cpu/arm926ejs/at91sam9/config.mk
index ca2cae1..83040eb 100644
--- a/cpu/arm926ejs/at91sam9/config.mk
+++ b/cpu/arm926ejs/at91sam9/config.mk
@@ -1,2 +1,3 @@
 PLATFORM_CPPFLAGS += -march=armv5te
 PLATFORM_CPPFLAGS += $(call cc-option,-mtune=arm926ejs,)
+LDSCRIPT := $(SRCTREE)/cpu/arm926ejs/at91sam9/u-boot.lds
diff --git a/cpu/arm926ejs/at91sam9/u-boot.lds b/cpu/arm926ejs/at91sam9/u-boot.lds
new file mode 100644
index 0000000..996f401
--- /dev/null
+++ b/cpu/arm926ejs/at91sam9/u-boot.lds
@@ -0,0 +1,57 @@
+/*
+ * (C) Copyright 2002
+ * Gary Jennejohn, DENX Software Engineering, <gj@denx.de>
+ *
+ * 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
+ */
+
+OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")
+/*OUTPUT_FORMAT("elf32-arm", "elf32-arm", "elf32-arm")*/
+OUTPUT_ARCH(arm)
+ENTRY(_start)
+SECTIONS
+{
+	. = 0x00000000;
+
+	. = ALIGN(4);
+	.text :
+	{
+	  cpu/arm926ejs/start.o	(.text)
+	  *(.text)
+	}
+
+	. = ALIGN(4);
+	.rodata : { *(.rodata) }
+
+	. = ALIGN(4);
+	.data : { *(.data) }
+
+	. = ALIGN(4);
+	.got : { *(.got) }
+
+	. = .;
+	__u_boot_cmd_start = .;
+	.u_boot_cmd : { *(.u_boot_cmd) }
+	__u_boot_cmd_end = .;
+
+	. = ALIGN(4);
+	__bss_start = .;
+	.bss : { *(.bss) }
+	_end = .;
+}
-- 
1.5.3.3

^ permalink raw reply related	[flat|nested] 54+ messages in thread

* [U-Boot-Users] [PATCH 06/26] AT91CAP9ADK: Handle 8 or 16 bit NAND
  2008-05-08 20:52 [U-Boot-Users] [PATCH v2 ARM/AT91 0/26] AT91SAM/CAP patches for U-Boot 1.3.4 Stelian Pop
                   ` (4 preceding siblings ...)
  2008-05-08 20:52 ` [U-Boot-Users] [PATCH 05/26] Use a common u-boot.lds file across all AT91CAP9/AT91SAM9 platforms Stelian Pop
@ 2008-05-08 20:52 ` Stelian Pop
  2008-05-08 20:52 ` [U-Boot-Users] [PATCH 07/26] AT91CAP9ADK: Normalize SPI timings Stelian Pop
                   ` (21 subsequent siblings)
  27 siblings, 0 replies; 54+ messages in thread
From: Stelian Pop @ 2008-05-08 20:52 UTC (permalink / raw)
  To: u-boot

The Atmel boards can handle 8 or 16 bit NAND memories. This patch
makes the support configurable in the board config header file
(CFG_NAND_DBW_8 or CFG_NAND_DBW_16).

Signed-off-by: Stelian Pop <stelian@popies.net>
---
 board/atmel/at91cap9adk/at91cap9adk.c |   10 +++++++---
 board/atmel/at91cap9adk/nand.c        |    3 +++
 include/configs/at91cap9adk.h         |    1 +
 3 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/board/atmel/at91cap9adk/at91cap9adk.c b/board/atmel/at91cap9adk/at91cap9adk.c
index 310a3ef..67e16bb 100644
--- a/board/atmel/at91cap9adk/at91cap9adk.c
+++ b/board/atmel/at91cap9adk/at91cap9adk.c
@@ -25,7 +25,7 @@
 #include <common.h>
 #include <asm/arch/at91cap9.h>
 #include <asm/arch/at91cap9_matrix.h>
-#include <asm/arch/at91sam_smc.h>
+#include <asm/arch/at91sam9_smc.h>
 #include <asm/arch/at91_pmc.h>
 #include <asm/arch/at91_rstc.h>
 #include <asm/arch/gpio.h>
@@ -116,7 +116,12 @@ static void at91cap9_nand_hw_init(void)
 	at91_sys_write(AT91_SMC_MODE(3),
 		       AT91_SMC_READMODE | AT91_SMC_WRITEMODE |
 		       AT91_SMC_EXNWMODE_DISABLE |
-		       AT91_SMC_DBW_8 | AT91_SMC_TDF_(1));
+#ifdef CFG_NAND_DBW_16
+		       AT91_SMC_DBW_16 |
+#else /* CFG_NAND_DBW_8 */
+		       AT91_SMC_DBW_8 |
+#endif
+		       AT91_SMC_TDF_(1));
 
 	at91_sys_write(AT91_PMC_PCER, 1 << AT91CAP9_ID_PIOABCD);
 
@@ -252,7 +257,6 @@ int board_init(void)
 #ifdef CONFIG_USB_OHCI_NEW
 	at91cap9_uhp_hw_init();
 #endif
-
 	return 0;
 }
 
diff --git a/board/atmel/at91cap9adk/nand.c b/board/atmel/at91cap9adk/nand.c
index 28091a4..0432ef1 100644
--- a/board/atmel/at91cap9adk/nand.c
+++ b/board/atmel/at91cap9adk/nand.c
@@ -63,6 +63,9 @@ static void at91cap9adk_nand_hwcontrol(struct mtd_info *mtd, int cmd)
 int board_nand_init(struct nand_chip *nand)
 {
 	nand->eccmode = NAND_ECC_SOFT;
+#ifdef CFG_NAND_DBW_16
+	nand->options = NAND_BUSWIDTH_16;
+#endif
 	nand->hwcontrol = at91cap9adk_nand_hwcontrol;
 	nand->chip_delay = 20;
 
diff --git a/include/configs/at91cap9adk.h b/include/configs/at91cap9adk.h
index c891fa8..7887b36 100644
--- a/include/configs/at91cap9adk.h
+++ b/include/configs/at91cap9adk.h
@@ -110,6 +110,7 @@
 #define NAND_MAX_CHIPS			1
 #define CFG_MAX_NAND_DEVICE		1
 #define CFG_NAND_BASE			0x40000000
+#define CFG_NAND_DBW_8			1
 
 /* Ethernet */
 #define CONFIG_MACB			1
-- 
1.5.3.3

^ permalink raw reply related	[flat|nested] 54+ messages in thread

* [U-Boot-Users] [PATCH 07/26] AT91CAP9ADK: Normalize SPI timings
  2008-05-08 20:52 [U-Boot-Users] [PATCH v2 ARM/AT91 0/26] AT91SAM/CAP patches for U-Boot 1.3.4 Stelian Pop
                   ` (5 preceding siblings ...)
  2008-05-08 20:52 ` [U-Boot-Users] [PATCH 06/26] AT91CAP9ADK: Handle 8 or 16 bit NAND Stelian Pop
@ 2008-05-08 20:52 ` Stelian Pop
  2008-05-08 20:52 ` [U-Boot-Users] [PATCH 08/26] AT91CAP9ADK: Normalize BOOTARGS Stelian Pop
                   ` (20 subsequent siblings)
  27 siblings, 0 replies; 54+ messages in thread
From: Stelian Pop @ 2008-05-08 20:52 UTC (permalink / raw)
  To: u-boot

This patch changes the SPI timings to closely match the ones
used by the Linux kernel and the Atmel's own bootstrap project.

Signed-off-by: Stelian Pop <stelian@popies.net>
---
 include/configs/at91cap9adk.h |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/include/configs/at91cap9adk.h b/include/configs/at91cap9adk.h
index 7887b36..588f45d 100644
--- a/include/configs/at91cap9adk.h
+++ b/include/configs/at91cap9adk.h
@@ -94,9 +94,9 @@
 #define CFG_SPI_WRITE_TOUT		(5*CFG_HZ)
 #define CFG_MAX_DATAFLASH_BANKS		1
 #define CFG_DATAFLASH_LOGIC_ADDR_CS0	0xC0000000	/* CS0 */
-#define AT91_SPI_CLK			20000000
-#define DATAFLASH_TCSS			(0xFA << 16)
-#define DATAFLASH_TCHS			(0x8 << 24)
+#define AT91_SPI_CLK			15000000
+#define DATAFLASH_TCSS			(0x1a << 16)
+#define DATAFLASH_TCHS			(0x1 << 24)
 
 /* NOR flash */
 #define CFG_FLASH_CFI			1
-- 
1.5.3.3

^ permalink raw reply related	[flat|nested] 54+ messages in thread

* [U-Boot-Users] [PATCH 08/26] AT91CAP9ADK: Normalize BOOTARGS
  2008-05-08 20:52 [U-Boot-Users] [PATCH v2 ARM/AT91 0/26] AT91SAM/CAP patches for U-Boot 1.3.4 Stelian Pop
                   ` (6 preceding siblings ...)
  2008-05-08 20:52 ` [U-Boot-Users] [PATCH 07/26] AT91CAP9ADK: Normalize SPI timings Stelian Pop
@ 2008-05-08 20:52 ` Stelian Pop
  2008-05-08 20:52 ` [U-Boot-Users] [PATCH 09/26] AT91CAP9ADK: Fix dataflash offsets in CONFIG_BOOTCOMMAND Stelian Pop
                   ` (19 subsequent siblings)
  27 siblings, 0 replies; 54+ messages in thread
From: Stelian Pop @ 2008-05-08 20:52 UTC (permalink / raw)
  To: u-boot

This patch adapts CONFIG_BOOTARGS to the chosen boot method (boot from
DataFlash or from NAND), and gives to Linux a fully specified mtdparts
variable.

Signed-off-by: Stelian Pop <stelian@popies.net>
---
 include/configs/at91cap9adk.h |   13 +++++++++++--
 1 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/include/configs/at91cap9adk.h b/include/configs/at91cap9adk.h
index 588f45d..a8f8d7d 100644
--- a/include/configs/at91cap9adk.h
+++ b/include/configs/at91cap9adk.h
@@ -56,8 +56,6 @@
 #define CONFIG_USART3		1	/* USART 3 is DBGU */
 
 #define CONFIG_BOOTDELAY	3
-#define CONFIG_BOOTARGS		"console=ttyS0,115200 " \
-				"root=/dev/mtdblock1 rw rootfstype=jffs2"
 
 /* #define CONFIG_ENV_OVERWRITE	1 */
 
@@ -145,6 +143,11 @@
 #define CFG_ENV_ADDR		(CFG_DATAFLASH_LOGIC_ADDR_CS0 + CFG_ENV_OFFSET)
 #define CFG_ENV_SIZE		0x4200
 #define CONFIG_BOOTCOMMAND	"cp.b 0xC003DE00 0x72000000 0x200040; bootm"
+#define CONFIG_BOOTARGS		"console=ttyS0,115200 "			\
+				"root=/dev/mtdblock1 "			\
+				"mtdparts=physmap-flash.0:-(nor);"	\
+				"at91_nand:-(root) "			\
+				"rw rootfstype=jffs2"
 
 #else
 
@@ -155,6 +158,12 @@
 #define CFG_ENV_ADDR		(PHYS_FLASH_1 + CFG_ENV_OFFSET)
 #define CFG_ENV_SIZE		0x4000
 #define CONFIG_BOOTCOMMAND	"cp.b 0x10040000 0x72000000 0x200000; bootm"
+#define CONFIG_BOOTARGS		"console=ttyS0,115200 "			\
+				"root=/dev/mtdblock4 "			\
+				"mtdparts=physmap-flash.0:16k(bootstrap)ro,"\
+				"16k(env),224k(uboot)ro,-(linux);"	\
+				"at91_nand:-(root) "			\
+				"rw rootfstype=jffs2"
 
 #endif
 
-- 
1.5.3.3

^ permalink raw reply related	[flat|nested] 54+ messages in thread

* [U-Boot-Users] [PATCH 09/26] AT91CAP9ADK: Fix dataflash offsets in CONFIG_BOOTCOMMAND
  2008-05-08 20:52 [U-Boot-Users] [PATCH v2 ARM/AT91 0/26] AT91SAM/CAP patches for U-Boot 1.3.4 Stelian Pop
                   ` (7 preceding siblings ...)
  2008-05-08 20:52 ` [U-Boot-Users] [PATCH 08/26] AT91CAP9ADK: Normalize BOOTARGS Stelian Pop
@ 2008-05-08 20:52 ` Stelian Pop
  2008-05-08 20:52 ` [U-Boot-Users] [PATCH 10/26] AT91SAM9260EK: Handle 8 or 16 bit NAND Stelian Pop
                   ` (18 subsequent siblings)
  27 siblings, 0 replies; 54+ messages in thread
From: Stelian Pop @ 2008-05-08 20:52 UTC (permalink / raw)
  To: u-boot

This patch fixes the dataflash offsets used in CONFIG_BOOTCOMMAND
in order to cope with the changes in DataFlash partitionning scheme
(cset c3a60cb3).

Signed-off-by: Stelian Pop <stelian@popies.net>
---
 include/configs/at91cap9adk.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/include/configs/at91cap9adk.h b/include/configs/at91cap9adk.h
index a8f8d7d..5e13309 100644
--- a/include/configs/at91cap9adk.h
+++ b/include/configs/at91cap9adk.h
@@ -142,7 +142,7 @@
 #define CFG_ENV_OFFSET		0x4200
 #define CFG_ENV_ADDR		(CFG_DATAFLASH_LOGIC_ADDR_CS0 + CFG_ENV_OFFSET)
 #define CFG_ENV_SIZE		0x4200
-#define CONFIG_BOOTCOMMAND	"cp.b 0xC003DE00 0x72000000 0x200040; bootm"
+#define CONFIG_BOOTCOMMAND	"cp.b 0xC0042000 0x72000000 0x210000; bootm"
 #define CONFIG_BOOTARGS		"console=ttyS0,115200 "			\
 				"root=/dev/mtdblock1 "			\
 				"mtdparts=physmap-flash.0:-(nor);"	\
-- 
1.5.3.3

^ permalink raw reply related	[flat|nested] 54+ messages in thread

* [U-Boot-Users] [PATCH 10/26] AT91SAM9260EK: Handle 8 or 16 bit NAND
  2008-05-08 20:52 [U-Boot-Users] [PATCH v2 ARM/AT91 0/26] AT91SAM/CAP patches for U-Boot 1.3.4 Stelian Pop
                   ` (8 preceding siblings ...)
  2008-05-08 20:52 ` [U-Boot-Users] [PATCH 09/26] AT91CAP9ADK: Fix dataflash offsets in CONFIG_BOOTCOMMAND Stelian Pop
@ 2008-05-08 20:52 ` Stelian Pop
  2008-05-08 20:52 ` [U-Boot-Users] [PATCH 11/26] AT91SAM9260EK: Normalize SPI timings Stelian Pop
                   ` (17 subsequent siblings)
  27 siblings, 0 replies; 54+ messages in thread
From: Stelian Pop @ 2008-05-08 20:52 UTC (permalink / raw)
  To: u-boot

The Atmel boards can handle 8 or 16 bit NAND memories. This patch
makes the support configurable in the board config header file
(CFG_NAND_DBW_8 or CFG_NAND_DBW_16).

Signed-off-by: Stelian Pop <stelian@popies.net>
---
 board/atmel/at91sam9260ek/at91sam9260ek.c |    7 ++++++-
 board/atmel/at91sam9260ek/nand.c          |    3 +++
 include/configs/at91sam9260ek.h           |    1 +
 3 files changed, 10 insertions(+), 1 deletions(-)

diff --git a/board/atmel/at91sam9260ek/at91sam9260ek.c b/board/atmel/at91sam9260ek/at91sam9260ek.c
index 21479ac..4635f0f 100644
--- a/board/atmel/at91sam9260ek/at91sam9260ek.c
+++ b/board/atmel/at91sam9260ek/at91sam9260ek.c
@@ -90,7 +90,12 @@ static void at91sam9260ek_nand_hw_init(void)
 	at91_sys_write(AT91_SMC_MODE(3),
 		       AT91_SMC_READMODE | AT91_SMC_WRITEMODE |
 		       AT91_SMC_EXNWMODE_DISABLE |
-		       AT91_SMC_DBW_8 | AT91_SMC_TDF_(2));
+#ifdef CFG_NAND_DBW_16
+		       AT91_SMC_DBW_16 |
+#else /* CFG_NAND_DBW_8 */
+		       AT91_SMC_DBW_8 |
+#endif
+		       AT91_SMC_TDF_(2));
 
 	at91_sys_write(AT91_PMC_PCER, 1 << AT91SAM9260_ID_PIOC);
 
diff --git a/board/atmel/at91sam9260ek/nand.c b/board/atmel/at91sam9260ek/nand.c
index 7c1e6ab..9738f0f 100644
--- a/board/atmel/at91sam9260ek/nand.c
+++ b/board/atmel/at91sam9260ek/nand.c
@@ -68,6 +68,9 @@ static int at91sam9260ek_nand_ready(struct mtd_info *mtd)
 int board_nand_init(struct nand_chip *nand)
 {
 	nand->eccmode = NAND_ECC_SOFT;
+#ifdef CFG_NAND_DBW_16
+	nand->options = NAND_BUSWIDTH_16;
+#endif
 	nand->hwcontrol = at91sam9260ek_nand_hwcontrol;
 	nand->dev_ready = at91sam9260ek_nand_ready;
 	nand->chip_delay = 20;
diff --git a/include/configs/at91sam9260ek.h b/include/configs/at91sam9260ek.h
index 41c418f..784b9e5 100644
--- a/include/configs/at91sam9260ek.h
+++ b/include/configs/at91sam9260ek.h
@@ -104,6 +104,7 @@
 #define NAND_MAX_CHIPS			1
 #define CFG_MAX_NAND_DEVICE		1
 #define CFG_NAND_BASE			0x40000000
+#define CFG_NAND_DBW_8			1
 
 /* NOR flash - no real flash on this board */
 #define CFG_NO_FLASH			1
-- 
1.5.3.3

^ permalink raw reply related	[flat|nested] 54+ messages in thread

* [U-Boot-Users] [PATCH 11/26] AT91SAM9260EK: Normalize SPI timings
  2008-05-08 20:52 [U-Boot-Users] [PATCH v2 ARM/AT91 0/26] AT91SAM/CAP patches for U-Boot 1.3.4 Stelian Pop
                   ` (9 preceding siblings ...)
  2008-05-08 20:52 ` [U-Boot-Users] [PATCH 10/26] AT91SAM9260EK: Handle 8 or 16 bit NAND Stelian Pop
@ 2008-05-08 20:52 ` Stelian Pop
  2008-05-08 20:52 ` [U-Boot-Users] [PATCH 12/26] AT91SAM9260EK: Normalize BOOTARGS Stelian Pop
                   ` (16 subsequent siblings)
  27 siblings, 0 replies; 54+ messages in thread
From: Stelian Pop @ 2008-05-08 20:52 UTC (permalink / raw)
  To: u-boot

This patch changes the SPI timings to closely match the ones
used by the Linux kernel and the Atmel's own bootstrap project.

Signed-off-by: Stelian Pop <stelian@popies.net>
---
 include/configs/at91sam9260ek.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/include/configs/at91sam9260ek.h b/include/configs/at91sam9260ek.h
index 784b9e5..1aa40ef 100644
--- a/include/configs/at91sam9260ek.h
+++ b/include/configs/at91sam9260ek.h
@@ -96,7 +96,7 @@
 #define CFG_MAX_DATAFLASH_BANKS		2
 #define CFG_DATAFLASH_LOGIC_ADDR_CS0	0xC0000000	/* CS0 */
 #define CFG_DATAFLASH_LOGIC_ADDR_CS1	0xD0000000	/* CS1 */
-#define AT91_SPI_CLK			33000000
+#define AT91_SPI_CLK			15000000
 #define DATAFLASH_TCSS			(0x1a << 16)
 #define DATAFLASH_TCHS			(0x1 << 24)
 
-- 
1.5.3.3

^ permalink raw reply related	[flat|nested] 54+ messages in thread

* [U-Boot-Users] [PATCH 12/26] AT91SAM9260EK: Normalize BOOTARGS
  2008-05-08 20:52 [U-Boot-Users] [PATCH v2 ARM/AT91 0/26] AT91SAM/CAP patches for U-Boot 1.3.4 Stelian Pop
                   ` (10 preceding siblings ...)
  2008-05-08 20:52 ` [U-Boot-Users] [PATCH 11/26] AT91SAM9260EK: Normalize SPI timings Stelian Pop
@ 2008-05-08 20:52 ` Stelian Pop
  2008-05-08 20:52 ` [U-Boot-Users] [PATCH 13/26] AT91SAM9260EK: Fix dataflash offsets in CONFIG_BOOTCOMMAND Stelian Pop
                   ` (15 subsequent siblings)
  27 siblings, 0 replies; 54+ messages in thread
From: Stelian Pop @ 2008-05-08 20:52 UTC (permalink / raw)
  To: u-boot

This patch adapts CONFIG_BOOTARGS to the chosen boot method (boot from
DataFlash or from NAND), and gives to Linux a fully specified mtdparts
variable.

Signed-off-by: Stelian Pop <stelian@popies.net>
---
 include/configs/at91sam9260ek.h |   16 ++++++++++++++--
 1 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/include/configs/at91sam9260ek.h b/include/configs/at91sam9260ek.h
index 1aa40ef..cd5f161 100644
--- a/include/configs/at91sam9260ek.h
+++ b/include/configs/at91sam9260ek.h
@@ -56,8 +56,6 @@
 #define CONFIG_USART3		1	/* USART 3 is DBGU */
 
 #define CONFIG_BOOTDELAY	3
-#define CONFIG_BOOTARGS		"console=ttyS0,115200 " \
-				"root=/dev/mtdblock0 rw rootfstype=jffs2"
 
 /* #define CONFIG_ENV_OVERWRITE	1 */
 
@@ -144,6 +142,10 @@
 #define CFG_ENV_ADDR		(CFG_DATAFLASH_LOGIC_ADDR_CS0 + CFG_ENV_OFFSET)
 #define CFG_ENV_SIZE		0x4200
 #define CONFIG_BOOTCOMMAND	"cp.b 0xC003DE00 0x22000000 0x200040; bootm"
+#define CONFIG_BOOTARGS		"console=ttyS0,115200 "			\
+				"root=/dev/mtdblock0 "			\
+				"mtdparts=at91_nand:-(root) "		\
+				"rw rootfstype=jffs2"
 
 #elif CFG_USE_DATAFLASH_CS1
 
@@ -154,6 +156,10 @@
 #define CFG_ENV_ADDR		(CFG_DATAFLASH_LOGIC_ADDR_CS1 + CFG_ENV_OFFSET)
 #define CFG_ENV_SIZE		0x4200
 #define CONFIG_BOOTCOMMAND	"cp.b 0xD003DE00 0x22000000 0x200040; bootm"
+#define CONFIG_BOOTARGS		"console=ttyS0,115200 "			\
+				"root=/dev/mtdblock0 "			\
+				"mtdparts=at91_nand:-(root) "		\
+				"rw rootfstype=jffs2"
 
 #else /* CFG_USE_NANDFLASH */
 
@@ -163,6 +169,12 @@
 #define CFG_ENV_OFFSET_REDUND	0x80000
 #define CFG_ENV_SIZE		0x20000		/* 1 sector = 128 kB */
 #define CONFIG_BOOTCOMMAND	"nand read 0x22000000 0xA0000 0x200000; bootm"
+#define CONFIG_BOOTARGS		"console=ttyS0,115200 "			\
+				"root=/dev/mtdblock5 "			\
+				"mtdparts=at91_nand:128k(bootstrap)ro,"	\
+				"256k(uboot)ro,128k(env1)ro,"		\
+				"128k(env2)ro,2M(linux),-(root) "	\
+				"rw rootfstype=jffs2"
 
 #endif
 
-- 
1.5.3.3

^ permalink raw reply related	[flat|nested] 54+ messages in thread

* [U-Boot-Users] [PATCH 13/26] AT91SAM9260EK: Fix dataflash offsets in CONFIG_BOOTCOMMAND
  2008-05-08 20:52 [U-Boot-Users] [PATCH v2 ARM/AT91 0/26] AT91SAM/CAP patches for U-Boot 1.3.4 Stelian Pop
                   ` (11 preceding siblings ...)
  2008-05-08 20:52 ` [U-Boot-Users] [PATCH 12/26] AT91SAM9260EK: Normalize BOOTARGS Stelian Pop
@ 2008-05-08 20:52 ` Stelian Pop
  2008-05-08 20:52 ` [U-Boot-Users] [PATCH 14/26] AT91SAM9261EK support Stelian Pop
                   ` (14 subsequent siblings)
  27 siblings, 0 replies; 54+ messages in thread
From: Stelian Pop @ 2008-05-08 20:52 UTC (permalink / raw)
  To: u-boot

This patch fixes the dataflash offsets used in CONFIG_BOOTCOMMAND
in order to cope with the changes in DataFlash partitionning scheme
(cset c3a60cb3).

Signed-off-by: Stelian Pop <stelian@popies.net>
---
 include/configs/at91sam9260ek.h |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/configs/at91sam9260ek.h b/include/configs/at91sam9260ek.h
index cd5f161..f68e055 100644
--- a/include/configs/at91sam9260ek.h
+++ b/include/configs/at91sam9260ek.h
@@ -141,7 +141,7 @@
 #define CFG_ENV_OFFSET		0x4200
 #define CFG_ENV_ADDR		(CFG_DATAFLASH_LOGIC_ADDR_CS0 + CFG_ENV_OFFSET)
 #define CFG_ENV_SIZE		0x4200
-#define CONFIG_BOOTCOMMAND	"cp.b 0xC003DE00 0x22000000 0x200040; bootm"
+#define CONFIG_BOOTCOMMAND	"cp.b 0xC0042000 0x22000000 0x210000; bootm"
 #define CONFIG_BOOTARGS		"console=ttyS0,115200 "			\
 				"root=/dev/mtdblock0 "			\
 				"mtdparts=at91_nand:-(root) "		\
@@ -155,7 +155,7 @@
 #define CFG_ENV_OFFSET		0x4200
 #define CFG_ENV_ADDR		(CFG_DATAFLASH_LOGIC_ADDR_CS1 + CFG_ENV_OFFSET)
 #define CFG_ENV_SIZE		0x4200
-#define CONFIG_BOOTCOMMAND	"cp.b 0xD003DE00 0x22000000 0x200040; bootm"
+#define CONFIG_BOOTCOMMAND	"cp.b 0xD0042000 0x22000000 0x210000; bootm"
 #define CONFIG_BOOTARGS		"console=ttyS0,115200 "			\
 				"root=/dev/mtdblock0 "			\
 				"mtdparts=at91_nand:-(root) "		\
-- 
1.5.3.3

^ permalink raw reply related	[flat|nested] 54+ messages in thread

* [U-Boot-Users] [PATCH 14/26] AT91SAM9261EK support
  2008-05-08 20:52 [U-Boot-Users] [PATCH v2 ARM/AT91 0/26] AT91SAM/CAP patches for U-Boot 1.3.4 Stelian Pop
                   ` (12 preceding siblings ...)
  2008-05-08 20:52 ` [U-Boot-Users] [PATCH 13/26] AT91SAM9260EK: Fix dataflash offsets in CONFIG_BOOTCOMMAND Stelian Pop
@ 2008-05-08 20:52 ` Stelian Pop
  2008-05-09 10:41   ` Jean-Christophe PLAGNIOL-VILLARD
  2008-05-08 20:52 ` [U-Boot-Users] [PATCH 15/26] AT91SAM9263EK support [part 1 of 2] Stelian Pop
                   ` (13 subsequent siblings)
  27 siblings, 1 reply; 54+ messages in thread
From: Stelian Pop @ 2008-05-08 20:52 UTC (permalink / raw)
  To: u-boot

This patch adds support for the AT91SAM9261 chip and the AT91SAM9261EK
board.

Signed-off-by: Stelian Pop <stelian@popies.net>
---
 MAINTAINERS                                        |    1 +
 MAKEALL                                            |    1 +
 Makefile                                           |    3 +
 board/atmel/at91sam9261ek/Makefile                 |   57 ++++++
 board/atmel/at91sam9261ek/at91sam9261ek.c          |  194 ++++++++++++++++++++
 board/atmel/at91sam9261ek/config.mk                |    1 +
 board/atmel/at91sam9261ek/led.c                    |   78 ++++++++
 board/atmel/at91sam9261ek/nand.c                   |   79 ++++++++
 board/atmel/at91sam9261ek/partition.c              |   40 ++++
 cpu/arm926ejs/at91sam9/usb.c                       |    8 +
 drivers/net/dm9000x.c                              |    2 +
 include/asm-arm/arch-at91sam9/at91sam9261.h        |  105 +++++++++++
 include/asm-arm/arch-at91sam9/at91sam9261_matrix.h |   64 +++++++
 include/asm-arm/arch-at91sam9/hardware.h           |    3 +
 include/configs/at91sam9261ek.h                    |  191 +++++++++++++++++++
 15 files changed, 827 insertions(+), 0 deletions(-)
 create mode 100644 board/atmel/at91sam9261ek/Makefile
 create mode 100644 board/atmel/at91sam9261ek/at91sam9261ek.c
 create mode 100644 board/atmel/at91sam9261ek/config.mk
 create mode 100644 board/atmel/at91sam9261ek/led.c
 create mode 100644 board/atmel/at91sam9261ek/nand.c
 create mode 100644 board/atmel/at91sam9261ek/partition.c
 create mode 100644 include/asm-arm/arch-at91sam9/at91sam9261.h
 create mode 100644 include/asm-arm/arch-at91sam9/at91sam9261_matrix.h
 create mode 100644 include/configs/at91sam9261ek.h

diff --git a/MAINTAINERS b/MAINTAINERS
index 58f833c..26f31fd 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -538,6 +538,7 @@ Stelian Pop <stelian.pop@leadtechdesign.com>
 
 	at91cap9adk		ARM926EJS (AT91CAP9 SoC)
 	at91sam9260ek		ARM926EJS (AT91SAM9260 SoC)
+	at91sam9261ek		ARM926EJS (AT91SAM9261 SoC)
 
 Stefan Roese <sr@denx.de>
 
diff --git a/MAKEALL b/MAKEALL
index 38911ed..251da90 100755
--- a/MAKEALL
+++ b/MAKEALL
@@ -458,6 +458,7 @@ LIST_ARM9="			\
 	at91cap9adk		\
 	at91rm9200dk		\
 	at91sam9260ek		\
+	at91sam9261ek		\
 	cmc_pu2			\
 	ap920t			\
 	ap922_XA10		\
diff --git a/Makefile b/Makefile
index 167a717..5e06ff5 100644
--- a/Makefile
+++ b/Makefile
@@ -2326,6 +2326,9 @@ shannon_config	:	unconfig
 at91rm9200dk_config	:	unconfig
 	@$(MKCONFIG) $(@:_config=) arm arm920t at91rm9200dk atmel at91rm9200
 
+at91sam9261ek_config	:	unconfig
+	@$(MKCONFIG) $(@:_config=) arm arm926ejs at91sam9261ek atmel at91sam9
+
 cmc_pu2_config	:	unconfig
 	@$(MKCONFIG) $(@:_config=) arm arm920t cmc_pu2 NULL at91rm9200
 
diff --git a/board/atmel/at91sam9261ek/Makefile b/board/atmel/at91sam9261ek/Makefile
new file mode 100644
index 0000000..7702a9c
--- /dev/null
+++ b/board/atmel/at91sam9261ek/Makefile
@@ -0,0 +1,57 @@
+#
+# (C) Copyright 2003-2008
+# Wolfgang Denk, DENX Software Engineering, wd at denx.de.
+#
+# (C) Copyright 2008
+# Stelian Pop <stelian.pop@leadtechdesign.com>
+# 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 += at91sam9261ek.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 .depend
+
+#########################################################################
+
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+#########################################################################
diff --git a/board/atmel/at91sam9261ek/at91sam9261ek.c b/board/atmel/at91sam9261ek/at91sam9261ek.c
new file mode 100644
index 0000000..96b4422
--- /dev/null
+++ b/board/atmel/at91sam9261ek/at91sam9261ek.c
@@ -0,0 +1,194 @@
+/*
+ * (C) Copyright 2007-2008
+ * Stelian Pop <stelian.pop@leadtechdesign.com>
+ * 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 <common.h>
+#include <asm/arch/at91sam9261.h>
+#include <asm/arch/at91sam9261_matrix.h>
+#include <asm/arch/at91sam9_smc.h>
+#include <asm/arch/at91_pmc.h>
+#include <asm/arch/at91_rstc.h>
+#include <asm/arch/gpio.h>
+#include <asm/arch/io.h>
+#if defined(CONFIG_RESET_PHY_R) && defined(CONFIG_DRIVER_DM9000)
+#include <net.h>
+#endif
+
+DECLARE_GLOBAL_DATA_PTR;
+
+/* ------------------------------------------------------------------------- */
+/*
+ * Miscelaneous platform dependent initialisations
+ */
+
+static void at91sam9261ek_serial_hw_init(void)
+{
+#ifdef CONFIG_USART0
+	at91_set_A_periph(AT91_PIN_PC8, 1);		/* TXD0 */
+	at91_set_A_periph(AT91_PIN_PC9, 0);		/* RXD0 */
+	at91_sys_write(AT91_PMC_PCER, 1 << AT91_ID_US0);
+#endif
+
+#ifdef CONFIG_USART1
+	at91_set_A_periph(AT91_PIN_PC12, 1);		/* TXD1 */
+	at91_set_A_periph(AT91_PIN_PC13, 0);		/* RXD1 */
+	at91_sys_write(AT91_PMC_PCER, 1 << AT91_ID_US1);
+#endif
+
+#ifdef CONFIG_USART2
+	at91_set_A_periph(AT91_PIN_PC14, 1);		/* TXD2 */
+	at91_set_A_periph(AT91_PIN_PC15, 0);		/* RXD2 */
+	at91_sys_write(AT91_PMC_PCER, 1 << AT91_ID_US2);
+#endif
+
+#ifdef CONFIG_USART3	/* DBGU */
+	at91_set_A_periph(AT91_PIN_PA9, 0);		/* DRXD */
+	at91_set_A_periph(AT91_PIN_PA10, 1);		/* DTXD */
+	at91_sys_write(AT91_PMC_PCER, 1 << AT91_ID_SYS);
+#endif
+}
+
+#ifdef CONFIG_CMD_NAND
+static void at91sam9261ek_nand_hw_init(void)
+{
+	unsigned long csa;
+
+	/* Enable CS3 */
+	csa = at91_sys_read(AT91_MATRIX_EBICSA);
+	at91_sys_write(AT91_MATRIX_EBICSA,
+		       csa | AT91_MATRIX_CS3A_SMC_SMARTMEDIA);
+
+	/* Configure SMC CS3 for NAND/SmartMedia */
+	at91_sys_write(AT91_SMC_SETUP(3),
+		       AT91_SMC_NWESETUP_(0) | AT91_SMC_NCS_WRSETUP_(0) |
+		       AT91_SMC_NRDSETUP_(0) | AT91_SMC_NCS_RDSETUP_(0));
+	at91_sys_write(AT91_SMC_PULSE(3),
+		       AT91_SMC_NWEPULSE_(2) | AT91_SMC_NCS_WRPULSE_(5) |
+		       AT91_SMC_NRDPULSE_(2) | AT91_SMC_NCS_RDPULSE_(5));
+	at91_sys_write(AT91_SMC_CYCLE(3),
+		       AT91_SMC_NWECYCLE_(7) | AT91_SMC_NRDCYCLE_(7));
+	at91_sys_write(AT91_SMC_MODE(3),
+		       AT91_SMC_READMODE | AT91_SMC_WRITEMODE |
+		       AT91_SMC_EXNWMODE_DISABLE |
+#ifdef CFG_NAND_DBW_16
+		       AT91_SMC_DBW_16 |
+#else /* CFG_NAND_DBW_8 */
+		       AT91_SMC_DBW_8 |
+#endif
+		       AT91_SMC_TDF_(1));
+
+	at91_sys_write(AT91_PMC_PCER, 1 << AT91SAM9261_ID_PIOC);
+
+	/* Configure RDY/BSY */
+	at91_set_gpio_input(AT91_PIN_PC15, 1);
+
+	/* Enable NandFlash */
+	at91_set_gpio_output(AT91_PIN_PC14, 1);
+
+	at91_set_A_periph(AT91_PIN_PC0, 0);	/* NANDOE */
+	at91_set_A_periph(AT91_PIN_PC1, 0);	/* NANDWE */
+}
+#endif
+
+#ifdef CONFIG_HAS_DATAFLASH
+static void at91sam9261ek_spi_hw_init(void)
+{
+	at91_set_A_periph(AT91_PIN_PA3, 0);	/* SPI0_NPCS0 */
+
+	at91_set_A_periph(AT91_PIN_PA0, 0);	/* SPI0_MISO */
+	at91_set_A_periph(AT91_PIN_PA1, 0);	/* SPI0_MOSI */
+	at91_set_A_periph(AT91_PIN_PA2, 0);	/* SPI0_SPCK */
+
+	/* Enable clock */
+	at91_sys_write(AT91_PMC_PCER, 1 << AT91SAM9261_ID_SPI0);
+}
+#endif
+
+#ifdef CONFIG_DRIVER_DM9000
+static void at91sam9261ek_dm9000_hw_init(void)
+{
+	/* Configure SMC CS2 for DM9000 */
+	at91_sys_write(AT91_SMC_SETUP(2),
+		       AT91_SMC_NWESETUP_(2) | AT91_SMC_NCS_WRSETUP_(0) |
+		       AT91_SMC_NRDSETUP_(2) | AT91_SMC_NCS_RDSETUP_(0));
+	at91_sys_write(AT91_SMC_PULSE(2),
+		       AT91_SMC_NWEPULSE_(4) | AT91_SMC_NCS_WRPULSE_(8) |
+		       AT91_SMC_NRDPULSE_(4) | AT91_SMC_NCS_RDPULSE_(8));
+	at91_sys_write(AT91_SMC_CYCLE(2),
+		       AT91_SMC_NWECYCLE_(16) | AT91_SMC_NRDCYCLE_(16));
+	at91_sys_write(AT91_SMC_MODE(2),
+		       AT91_SMC_READMODE | AT91_SMC_WRITEMODE |
+		       AT91_SMC_EXNWMODE_DISABLE |
+		       AT91_SMC_BAT_WRITE | AT91_SMC_DBW_16 |
+		       AT91_SMC_TDF_(1));
+
+	/* Configure Reset signal as output */
+	at91_set_gpio_output(AT91_PIN_PC10, 0);
+
+	/* Configure Interrupt pin as input, no pull-up */
+	at91_set_gpio_input(AT91_PIN_PC11, 0);
+}
+#endif
+
+int board_init(void)
+{
+	/* Enable Ctrlc */
+	console_init_f();
+
+	/* arch number of AT91SAM9261EK-Board */
+	gd->bd->bi_arch_number = MACH_TYPE_AT91SAM9261EK;
+	/* adress of boot parameters */
+	gd->bd->bi_boot_params = PHYS_SDRAM + 0x100;
+
+	at91sam9261ek_serial_hw_init();
+#ifdef CONFIG_CMD_NAND
+	at91sam9261ek_nand_hw_init();
+#endif
+#ifdef CONFIG_HAS_DATAFLASH
+	at91sam9261ek_spi_hw_init();
+#endif
+#ifdef CONFIG_DRIVER_DM9000
+	at91sam9261ek_dm9000_hw_init();
+#endif
+	return 0;
+}
+
+int dram_init(void)
+{
+	gd->bd->bi_dram[0].start = PHYS_SDRAM;
+	gd->bd->bi_dram[0].size = PHYS_SDRAM_SIZE;
+	return 0;
+}
+
+#ifdef CONFIG_RESET_PHY_R
+void reset_phy(void)
+{
+#ifdef CONFIG_DRIVER_DM9000
+	/*
+	 * Initialize ethernet HW addr prior to starting Linux,
+	 * needed for nfsroot
+	 */
+	eth_init(gd->bd);
+#endif
+}
+#endif
diff --git a/board/atmel/at91sam9261ek/config.mk b/board/atmel/at91sam9261ek/config.mk
new file mode 100644
index 0000000..ff2cfd1
--- /dev/null
+++ b/board/atmel/at91sam9261ek/config.mk
@@ -0,0 +1 @@
+TEXT_BASE = 0x23f00000
diff --git a/board/atmel/at91sam9261ek/led.c b/board/atmel/at91sam9261ek/led.c
new file mode 100644
index 0000000..eb2bb23
--- /dev/null
+++ b/board/atmel/at91sam9261ek/led.c
@@ -0,0 +1,78 @@
+/*
+ * (C) Copyright 2007-2008
+ * Stelian Pop <stelian.pop@leadtechdesign.com>
+ * 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 <common.h>
+#include <asm/arch/at91sam9261.h>
+#include <asm/arch/at91_pmc.h>
+#include <asm/arch/gpio.h>
+#include <asm/arch/io.h>
+
+#define	RED_LED		AT91_PIN_PA23	/* this is the power led */
+#define	GREEN_LED	AT91_PIN_PA13	/* this is the user1 led */
+#define	YELLOW_LED	AT91_PIN_PA14	/* this is the user2 led */
+
+void red_LED_on(void)
+{
+	at91_set_gpio_value(RED_LED, 1);
+}
+
+void red_LED_off(void)
+{
+	at91_set_gpio_value(RED_LED, 0);
+}
+
+void green_LED_on(void)
+{
+	at91_set_gpio_value(GREEN_LED, 0);
+}
+
+void green_LED_off(void)
+{
+	at91_set_gpio_value(GREEN_LED, 1);
+}
+
+void yellow_LED_on(void)
+{
+	at91_set_gpio_value(YELLOW_LED, 0);
+}
+
+void yellow_LED_off(void)
+{
+	at91_set_gpio_value(YELLOW_LED, 1);
+}
+
+
+void coloured_LED_init(void)
+{
+	/* Enable clock */
+	at91_sys_write(AT91_PMC_PCER, 1 << AT91SAM9261_ID_PIOA);
+
+	at91_set_gpio_output(RED_LED, 1);
+	at91_set_gpio_output(GREEN_LED, 1);
+	at91_set_gpio_output(YELLOW_LED, 1);
+
+	at91_set_gpio_value(RED_LED, 0);
+	at91_set_gpio_value(GREEN_LED, 1);
+	at91_set_gpio_value(YELLOW_LED, 1);
+}
diff --git a/board/atmel/at91sam9261ek/nand.c b/board/atmel/at91sam9261ek/nand.c
new file mode 100644
index 0000000..35b26db
--- /dev/null
+++ b/board/atmel/at91sam9261ek/nand.c
@@ -0,0 +1,79 @@
+/*
+ * (C) Copyright 2007-2008
+ * Stelian Pop <stelian.pop@leadtechdesign.com>
+ * Lead Tech Design <www.leadtechdesign.com>
+ *
+ * (C) Copyright 2006 ATMEL Rousset, Lacressonniere Nicolas
+ *
+ * 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 <common.h>
+#include <asm/arch/at91sam9261.h>
+#include <asm/arch/gpio.h>
+#include <asm/arch/at91_pio.h>
+
+#include <nand.h>
+
+/*
+ *	hardware specific access to control-lines
+ */
+#define	MASK_ALE	(1 << 22)	/* our ALE is AD22 */
+#define	MASK_CLE	(1 << 21)	/* our CLE is AD21 */
+
+static void at91sam9261ek_nand_hwcontrol(struct mtd_info *mtd, int cmd)
+{
+	struct nand_chip *this = mtd->priv;
+	ulong IO_ADDR_W = (ulong) this->IO_ADDR_W;
+
+	IO_ADDR_W &= ~(MASK_ALE|MASK_CLE);
+	switch (cmd) {
+	case NAND_CTL_SETCLE:
+		IO_ADDR_W |= MASK_CLE;
+		break;
+	case NAND_CTL_SETALE:
+		IO_ADDR_W |= MASK_ALE;
+		break;
+	case NAND_CTL_CLRNCE:
+		at91_set_gpio_value(AT91_PIN_PC14, 1);
+		break;
+	case NAND_CTL_SETNCE:
+		at91_set_gpio_value(AT91_PIN_PC14, 0);
+		break;
+	}
+	this->IO_ADDR_W = (void *) IO_ADDR_W;
+}
+
+static int at91sam9261ek_nand_ready(struct mtd_info *mtd)
+{
+	return at91_get_gpio_value(AT91_PIN_PC15);
+}
+
+int board_nand_init(struct nand_chip *nand)
+{
+	nand->eccmode = NAND_ECC_SOFT;
+#ifdef CFG_NAND_DBW_16
+	nand->options = NAND_BUSWIDTH_16;
+#endif
+	nand->hwcontrol = at91sam9261ek_nand_hwcontrol;
+	nand->dev_ready = at91sam9261ek_nand_ready;
+	nand->chip_delay = 20;
+
+	return 0;
+}
diff --git a/board/atmel/at91sam9261ek/partition.c b/board/atmel/at91sam9261ek/partition.c
new file mode 100644
index 0000000..975be17
--- /dev/null
+++ b/board/atmel/at91sam9261ek/partition.c
@@ -0,0 +1,40 @@
+/*
+ * (C) Copyright 2008
+ * Ulf Samuelsson <ulf@atmel.com>
+ *
+ * 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 <common.h>
+#include <config.h>
+#include <asm/hardware.h>
+#include <dataflash.h>
+
+AT91S_DATAFLASH_INFO dataflash_info[CFG_MAX_DATAFLASH_BANKS];
+
+struct dataflash_addr cs[CFG_MAX_DATAFLASH_BANKS] = {
+	{CFG_DATAFLASH_LOGIC_ADDR_CS0, 0},	/* Logical adress, CS */
+	{CFG_DATAFLASH_LOGIC_ADDR_CS3, 3}
+};
+
+/*define the area offsets*/
+dataflash_protect_t area_list[NB_DATAFLASH_AREA] = {
+	{0x00000000, 0x000041FF, FLAG_PROTECT_SET,   0, "Bootstrap"},
+	{0x00004200, 0x000083FF, FLAG_PROTECT_CLEAR, 0, "Environment"},
+	{0x00008400, 0x00041FFF, FLAG_PROTECT_SET,   0, "U-Boot"},
+	{0x00042000, 0x00251FFF, FLAG_PROTECT_CLEAR, 0,	"Kernel"},
+	{0x00252000, 0xFFFFFFFF, FLAG_PROTECT_CLEAR, 0,	"FS"},
+};
diff --git a/cpu/arm926ejs/at91sam9/usb.c b/cpu/arm926ejs/at91sam9/usb.c
index 441349d..2a92f73 100644
--- a/cpu/arm926ejs/at91sam9/usb.c
+++ b/cpu/arm926ejs/at91sam9/usb.c
@@ -33,7 +33,11 @@ int usb_cpu_init(void)
 {
 	/* Enable USB host clock. */
 	at91_sys_write(AT91_PMC_PCER, 1 << AT91_ID_UHP);
+#ifdef CONFIG_AT91SAM9261
+	at91_sys_write(AT91_PMC_SCER, AT91_PMC_UHP | AT91_PMC_HCK0);
+#else
 	at91_sys_write(AT91_PMC_SCER, AT91_PMC_UHP);
+#endif
 
 	return 0;
 }
@@ -42,7 +46,11 @@ int usb_cpu_stop(void)
 {
 	/* Disable USB host clock. */
 	at91_sys_write(AT91_PMC_PCDR, 1 << AT91_ID_UHP);
+#ifdef CONFIG_AT91SAM9261
+	at91_sys_write(AT91_PMC_SCDR, AT91_PMC_UHP | AT91_PMC_HCK0);
+#else
 	at91_sys_write(AT91_PMC_SCDR, AT91_PMC_UHP);
+#endif
 	return 0;
 }
 
diff --git a/drivers/net/dm9000x.c b/drivers/net/dm9000x.c
index 6131b5c..db6d3bd 100644
--- a/drivers/net/dm9000x.c
+++ b/drivers/net/dm9000x.c
@@ -300,8 +300,10 @@ eth_init(bd_t * bd)
 	DM9000_iow(DM9000_ISR, 0x0f);	/* Clear interrupt status */
 
 	/* Set Node address */
+#ifndef CONFIG_AT91SAM9261EK
 	for (i = 0; i < 6; i++)
 		((u16 *) bd->bi_enetaddr)[i] = read_srom_word(i);
+#endif
 
 	if (is_zero_ether_addr(bd->bi_enetaddr) ||
 	    is_multicast_ether_addr(bd->bi_enetaddr)) {
diff --git a/include/asm-arm/arch-at91sam9/at91sam9261.h b/include/asm-arm/arch-at91sam9/at91sam9261.h
new file mode 100644
index 0000000..752d81d
--- /dev/null
+++ b/include/asm-arm/arch-at91sam9/at91sam9261.h
@@ -0,0 +1,105 @@
+/*
+ * [origin: Linux kernel include/asm-arm/arch-at91/at91sam9261.h]
+ *
+ * Copyright (C) SAN People
+ *
+ * Common definitions.
+ * Based on AT91SAM9261 datasheet revision E. (Preliminary)
+ *
+ * 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 AT91SAM9261_H
+#define AT91SAM9261_H
+
+/*
+ * Peripheral identifiers/interrupts.
+ */
+#define AT91_ID_FIQ		0	/* Advanced Interrupt Controller (FIQ) */
+#define AT91_ID_SYS		1	/* System Peripherals */
+#define AT91SAM9261_ID_PIOA	2	/* Parallel IO Controller A */
+#define AT91SAM9261_ID_PIOB	3	/* Parallel IO Controller B */
+#define AT91SAM9261_ID_PIOC	4	/* Parallel IO Controller C */
+#define AT91SAM9261_ID_US0	6	/* USART 0 */
+#define AT91SAM9261_ID_US1	7	/* USART 1 */
+#define AT91SAM9261_ID_US2	8	/* USART 2 */
+#define AT91SAM9261_ID_MCI	9	/* Multimedia Card Interface */
+#define AT91SAM9261_ID_UDP	10	/* USB Device Port */
+#define AT91SAM9261_ID_TWI	11	/* Two-Wire Interface */
+#define AT91SAM9261_ID_SPI0	12	/* Serial Peripheral Interface 0 */
+#define AT91SAM9261_ID_SPI1	13	/* Serial Peripheral Interface 1 */
+#define AT91SAM9261_ID_SSC0	14	/* Serial Synchronous Controller 0 */
+#define AT91SAM9261_ID_SSC1	15	/* Serial Synchronous Controller 1 */
+#define AT91SAM9261_ID_SSC2	16	/* Serial Synchronous Controller 2 */
+#define AT91SAM9261_ID_TC0	17	/* Timer Counter 0 */
+#define AT91SAM9261_ID_TC1	18	/* Timer Counter 1 */
+#define AT91SAM9261_ID_TC2	19	/* Timer Counter 2 */
+#define AT91SAM9261_ID_UHP	20	/* USB Host port */
+#define AT91SAM9261_ID_LCDC	21	/* LDC Controller */
+#define AT91SAM9261_ID_IRQ0	29	/* Advanced Interrupt Controller (IRQ0) */
+#define AT91SAM9261_ID_IRQ1	30	/* Advanced Interrupt Controller (IRQ1) */
+#define AT91SAM9261_ID_IRQ2	31	/* Advanced Interrupt Controller (IRQ2) */
+
+
+/*
+ * User Peripheral physical base addresses.
+ */
+#define AT91SAM9261_BASE_TCB0		0xfffa0000
+#define AT91SAM9261_BASE_TC0		0xfffa0000
+#define AT91SAM9261_BASE_TC1		0xfffa0040
+#define AT91SAM9261_BASE_TC2		0xfffa0080
+#define AT91SAM9261_BASE_UDP		0xfffa4000
+#define AT91SAM9261_BASE_MCI		0xfffa8000
+#define AT91SAM9261_BASE_TWI		0xfffac000
+#define AT91SAM9261_BASE_US0		0xfffb0000
+#define AT91SAM9261_BASE_US1		0xfffb4000
+#define AT91SAM9261_BASE_US2		0xfffb8000
+#define AT91SAM9261_BASE_SSC0		0xfffbc000
+#define AT91SAM9261_BASE_SSC1		0xfffc0000
+#define AT91SAM9261_BASE_SSC2		0xfffc4000
+#define AT91SAM9261_BASE_SPI0		0xfffc8000
+#define AT91SAM9261_BASE_SPI1		0xfffcc000
+#define AT91_BASE_SYS			0xffffea00
+
+
+/*
+ * System Peripherals (offset from AT91_BASE_SYS)
+ */
+#define AT91_SDRAMC	(0xffffea00 - AT91_BASE_SYS)
+#define AT91_SMC	(0xffffec00 - AT91_BASE_SYS)
+#define AT91_MATRIX	(0xffffee00 - AT91_BASE_SYS)
+#define AT91_AIC	(0xfffff000 - AT91_BASE_SYS)
+#define AT91_DBGU	(0xfffff200 - AT91_BASE_SYS)
+#define AT91_PIOA	(0xfffff400 - AT91_BASE_SYS)
+#define AT91_PIOB	(0xfffff600 - AT91_BASE_SYS)
+#define AT91_PIOC	(0xfffff800 - AT91_BASE_SYS)
+#define AT91_PMC	(0xfffffc00 - AT91_BASE_SYS)
+#define AT91_RSTC	(0xfffffd00 - AT91_BASE_SYS)
+#define AT91_SHDWC	(0xfffffd10 - AT91_BASE_SYS)
+#define AT91_RTT	(0xfffffd20 - AT91_BASE_SYS)
+#define AT91_PIT	(0xfffffd30 - AT91_BASE_SYS)
+#define AT91_WDT	(0xfffffd40 - AT91_BASE_SYS)
+#define AT91_GPBR	(0xfffffd50 - AT91_BASE_SYS)
+
+#define AT91_USART0	AT91SAM9261_BASE_US0
+#define AT91_USART1	AT91SAM9261_BASE_US1
+#define AT91_USART2	AT91SAM9261_BASE_US2
+
+
+/*
+ * Internal Memory.
+ */
+#define AT91SAM9261_SRAM_BASE	0x00300000	/* Internal SRAM base address */
+#define AT91SAM9261_SRAM_SIZE	0x00028000	/* Internal SRAM size (160Kb) */
+
+#define AT91SAM9261_ROM_BASE	0x00400000	/* Internal ROM base address */
+#define AT91SAM9261_ROM_SIZE	SZ_32K		/* Internal ROM size (32Kb) */
+
+#define AT91SAM9261_UHP_BASE	0x00500000	/* USB Host controller */
+#define AT91SAM9261_LCDC_BASE	0x00600000	/* LDC controller */
+
+
+#endif
diff --git a/include/asm-arm/arch-at91sam9/at91sam9261_matrix.h b/include/asm-arm/arch-at91sam9/at91sam9261_matrix.h
new file mode 100644
index 0000000..e2bfc4b
--- /dev/null
+++ b/include/asm-arm/arch-at91sam9/at91sam9261_matrix.h
@@ -0,0 +1,64 @@
+/*
+ * [origin: Linux kernel include/asm-arm/arch-at91/at91sam9261_matrix.h]
+ *
+ * Copyright (C) 2007 Atmel Corporation.
+ *
+ * Memory Controllers (MATRIX, EBI) - System peripherals registers.
+ * Based on AT91SAM9261 datasheet revision D.
+ *
+ * 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 AT91SAM9261_MATRIX_H
+#define AT91SAM9261_MATRIX_H
+
+#define AT91_MATRIX_MCFG	(AT91_MATRIX + 0x00)	/* Master Configuration Register */
+#define		AT91_MATRIX_RCB0	(1 << 0)		/* Remap Command for AHB Master 0 (ARM926EJ-S Instruction Master) */
+#define		AT91_MATRIX_RCB1	(1 << 1)		/* Remap Command for AHB Master 1 (ARM926EJ-S Data Master) */
+
+#define AT91_MATRIX_SCFG0	(AT91_MATRIX + 0x04)	/* Slave Configuration Register 0 */
+#define AT91_MATRIX_SCFG1	(AT91_MATRIX + 0x08)	/* Slave Configuration Register 1 */
+#define AT91_MATRIX_SCFG2	(AT91_MATRIX + 0x0C)	/* Slave Configuration Register 2 */
+#define AT91_MATRIX_SCFG3	(AT91_MATRIX + 0x10)	/* Slave Configuration Register 3 */
+#define AT91_MATRIX_SCFG4	(AT91_MATRIX + 0x14)	/* Slave Configuration Register 4 */
+#define		AT91_MATRIX_SLOT_CYCLE		(0xff << 0)	/* Maximum Number of Allowed Cycles for a Burst */
+#define		AT91_MATRIX_DEFMSTR_TYPE	(3    << 16)	/* Default Master Type */
+#define			AT91_MATRIX_DEFMSTR_TYPE_NONE	(0 << 16)
+#define			AT91_MATRIX_DEFMSTR_TYPE_LAST	(1 << 16)
+#define			AT91_MATRIX_DEFMSTR_TYPE_FIXED	(2 << 16)
+#define		AT91_MATRIX_FIXED_DEFMSTR	(7    << 18)	/* Fixed Index of Default Master */
+
+#define AT91_MATRIX_TCR		(AT91_MATRIX + 0x24)	/* TCM Configuration Register */
+#define		AT91_MATRIX_ITCM_SIZE		(0xf << 0)	/* Size of ITCM enabled memory block */
+#define			AT91_MATRIX_ITCM_0		(0 << 0)
+#define			AT91_MATRIX_ITCM_16		(5 << 0)
+#define			AT91_MATRIX_ITCM_32		(6 << 0)
+#define			AT91_MATRIX_ITCM_64		(7 << 0)
+#define		AT91_MATRIX_DTCM_SIZE		(0xf << 4)	/* Size of DTCM enabled memory block */
+#define			AT91_MATRIX_DTCM_0		(0 << 4)
+#define			AT91_MATRIX_DTCM_16		(5 << 4)
+#define			AT91_MATRIX_DTCM_32		(6 << 4)
+#define			AT91_MATRIX_DTCM_64		(7 << 4)
+
+#define AT91_MATRIX_EBICSA	(AT91_MATRIX + 0x30)	/* EBI Chip Select Assignment Register */
+#define		AT91_MATRIX_CS1A		(1 << 1)	/* Chip Select 1 Assignment */
+#define			AT91_MATRIX_CS1A_SMC		(0 << 1)
+#define			AT91_MATRIX_CS1A_SDRAMC		(1 << 1)
+#define		AT91_MATRIX_CS3A		(1 << 3)	/* Chip Select 3 Assignment */
+#define			AT91_MATRIX_CS3A_SMC		(0 << 3)
+#define			AT91_MATRIX_CS3A_SMC_SMARTMEDIA	(1 << 3)
+#define		AT91_MATRIX_CS4A		(1 << 4)	/* Chip Select 4 Assignment */
+#define			AT91_MATRIX_CS4A_SMC		(0 << 4)
+#define			AT91_MATRIX_CS4A_SMC_CF1	(1 << 4)
+#define		AT91_MATRIX_CS5A		(1 << 5)	/* Chip Select 5 Assignment */
+#define			AT91_MATRIX_CS5A_SMC		(0 << 5)
+#define			AT91_MATRIX_CS5A_SMC_CF2	(1 << 5)
+#define		AT91_MATRIX_DBPUC		(1 << 8)	/* Data Bus Pull-up Configuration */
+
+#define AT91_MATRIX_USBPUCR	(AT91_MATRIX + 0x34)	/* USB Pad Pull-Up Control Register */
+#define		AT91_MATRIX_USBPUCR_PUON	(1 << 30)	/* USB Device PAD Pull-up Enable */
+
+#endif
diff --git a/include/asm-arm/arch-at91sam9/hardware.h b/include/asm-arm/arch-at91sam9/hardware.h
index d2fe453..06bab62 100644
--- a/include/asm-arm/arch-at91sam9/hardware.h
+++ b/include/asm-arm/arch-at91sam9/hardware.h
@@ -26,6 +26,9 @@
 #define AT91_PMC_UHP	AT91SAM926x_PMC_UHP
 #elif defined(CONFIG_AT91SAM9261)
 #include <asm/arch/at91sam9261.h>
+#define AT91_BASE_SPI	AT91SAM9261_BASE_SPI0
+#define AT91_ID_UHP	AT91SAM9261_ID_UHP
+#define AT91_PMC_UHP	AT91SAM926x_PMC_UHP
 #elif defined(CONFIG_AT91SAM9263)
 #include <asm/arch/at91sam9263.h>
 #elif defined(CONFIG_AT91SAM9RL)
diff --git a/include/configs/at91sam9261ek.h b/include/configs/at91sam9261ek.h
new file mode 100644
index 0000000..96fc6af
--- /dev/null
+++ b/include/configs/at91sam9261ek.h
@@ -0,0 +1,191 @@
+/*
+ * (C) Copyright 2007-2008
+ * Stelian Pop <stelian.pop@leadtechdesign.com>
+ * Lead Tech Design <www.leadtechdesign.com>
+ *
+ * Configuation settings for the AT91SAM9261EK board.
+ *
+ * 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
+ */
+
+#ifndef __CONFIG_H
+#define __CONFIG_H
+
+/* ARM asynchronous clock */
+#define AT91_MAIN_CLOCK		198656000	/* from 18.432 MHz crystal */
+#define AT91_MASTER_CLOCK	99328000	/* peripheral = main / 2 */
+#define CFG_HZ			1000000		/* 1us resolution */
+
+#define AT91_SLOW_CLOCK		32768	/* slow clock */
+
+#define CONFIG_ARM926EJS	1	/* This is an ARM926EJS Core	*/
+#define CONFIG_AT91SAM9261	1	/* It's an Atmel AT91SAM9261 SoC*/
+#define CONFIG_AT91SAM9261EK	1	/* on an AT91SAM9261EK Board	*/
+#undef CONFIG_USE_IRQ			/* we don't need IRQ/FIQ stuff	*/
+
+#define CONFIG_CMDLINE_TAG	1	/* enable passing of ATAGs	*/
+#define CONFIG_SETUP_MEMORY_TAGS 1
+#define CONFIG_INITRD_TAG	1
+
+#define CONFIG_SKIP_LOWLEVEL_INIT
+#define CONFIG_SKIP_RELOCATE_UBOOT
+
+/*
+ * Hardware drivers
+ */
+#define CONFIG_ATMEL_USART	1
+#undef CONFIG_USART0
+#undef CONFIG_USART1
+#undef CONFIG_USART2
+#define CONFIG_USART3		1	/* USART 3 is DBGU */
+
+#define CONFIG_BOOTDELAY	3
+
+/* #define CONFIG_ENV_OVERWRITE	1 */
+
+/*
+ * BOOTP options
+ */
+#define CONFIG_BOOTP_BOOTFILESIZE	1
+#define CONFIG_BOOTP_BOOTPATH		1
+#define CONFIG_BOOTP_GATEWAY		1
+#define CONFIG_BOOTP_HOSTNAME		1
+
+/*
+ * Command line configuration.
+ */
+#include <config_cmd_default.h>
+#undef CONFIG_CMD_BDI
+#undef CONFIG_CMD_IMI
+#undef CONFIG_CMD_AUTOSCRIPT
+#undef CONFIG_CMD_FPGA
+#undef CONFIG_CMD_LOADS
+#undef CONFIG_CMD_IMLS
+
+#define CONFIG_CMD_PING		1
+#define CONFIG_CMD_DHCP		1
+#define CONFIG_CMD_NAND		1
+#define CONFIG_CMD_USB		1
+
+/* SDRAM */
+#define CONFIG_NR_DRAM_BANKS		1
+#define PHYS_SDRAM			0x20000000
+#define PHYS_SDRAM_SIZE			0x04000000	/* 64 megs */
+
+/* DataFlash */
+#define CONFIG_HAS_DATAFLASH		1
+#define CFG_SPI_WRITE_TOUT		(5*CFG_HZ)
+#define CFG_MAX_DATAFLASH_BANKS		2
+#define CFG_DATAFLASH_LOGIC_ADDR_CS0	0xC0000000	/* CS0 */
+#define CFG_DATAFLASH_LOGIC_ADDR_CS3	0xD0000000	/* CS3 */
+#define AT91_SPI_CLK			15000000
+#define DATAFLASH_TCSS			(0x1a << 16)
+#define DATAFLASH_TCHS			(0x1 << 24)
+
+/* NAND flash */
+#define NAND_MAX_CHIPS			1
+#define CFG_MAX_NAND_DEVICE		1
+#define CFG_NAND_BASE			0x40000000
+#define CFG_NAND_DBW_8			1
+
+/* NOR flash - no real flash on this board */
+#define CFG_NO_FLASH			1
+
+/* Ethernet */
+#define CONFIG_DRIVER_DM9000		1
+#define CONFIG_DM9000_BASE		0x30000000
+#define DM9000_IO			CONFIG_DM9000_BASE
+#define DM9000_DATA			(CONFIG_DM9000_BASE + 4)
+#define CONFIG_DM9000_USE_16BIT		1
+#define CONFIG_NET_RETRY_COUNT		20
+#define CONFIG_RESET_PHY_R		1
+
+/* USB */
+#define CONFIG_USB_OHCI_NEW		1
+#define LITTLEENDIAN			1
+#define CONFIG_DOS_PARTITION		1
+#define CFG_USB_OHCI_CPU_INIT		1
+#define CFG_USB_OHCI_REGS_BASE		0x00500000	/* AT91SAM9261_UHP_BASE */
+#define CFG_USB_OHCI_SLOT_NAME		"at91sam9261"
+#define CFG_USB_OHCI_MAX_ROOT_PORTS	2
+#define CONFIG_USB_STORAGE		1
+
+#define CFG_LOAD_ADDR			0x22000000	/* load address */
+
+#define CFG_MEMTEST_START		PHYS_SDRAM
+#define CFG_MEMTEST_END			0x23e00000
+
+#define CFG_USE_DATAFLASH_CS0		1
+#undef CFG_USE_NANDFLASH
+
+#ifdef CFG_USE_DATAFLASH_CS0
+
+/* bootstrap + u-boot + env + linux in dataflash on CS0 */
+#define CFG_ENV_IS_IN_DATAFLASH	1
+#define CFG_MONITOR_BASE	(CFG_DATAFLASH_LOGIC_ADDR_CS0 + 0x8400)
+#define CFG_ENV_OFFSET		0x4200
+#define CFG_ENV_ADDR		(CFG_DATAFLASH_LOGIC_ADDR_CS0 + CFG_ENV_OFFSET)
+#define CFG_ENV_SIZE		0x4200
+#define CONFIG_BOOTCOMMAND	"cp.b 0xC0042000 0x22000000 0x210000; bootm"
+#define CONFIG_BOOTARGS		"console=ttyS0,115200 "			\
+				"root=/dev/mtdblock0 "			\
+				"mtdparts=at91_nand:-(root) "		\
+				"rw rootfstype=jffs2"
+
+#else /* CFG_USE_NANDFLASH */
+
+/* bootstrap + u-boot + env + linux in nandflash */
+#define CFG_ENV_IS_IN_NAND	1
+#define CFG_ENV_OFFSET		0x60000
+#define CFG_ENV_OFFSET_REDUND	0x80000
+#define CFG_ENV_SIZE		0x20000		/* 1 sector = 128 kB */
+#define CONFIG_BOOTCOMMAND	"nand read 0x22000000 0xA0000 0x200000; bootm"
+#define CONFIG_BOOTARGS		"console=ttyS0,115200 "			\
+				"root=/dev/mtdblock5 "			\
+				"mtdparts=at91_nand:128k(bootstrap)ro,"	\
+				"256k(uboot)ro,128k(env1)ro,"		\
+				"128k(env2)ro,2M(linux),-(root) "	\
+				"rw rootfstype=jffs2"
+
+#endif
+
+#define CONFIG_BAUDRATE		115200
+#define CFG_BAUDRATE_TABLE	{115200 , 19200, 38400, 57600, 9600 }
+
+#define CFG_PROMPT		"U-Boot> "
+#define CFG_CBSIZE		256
+#define CFG_MAXARGS		16
+#define CFG_PBSIZE		(CFG_CBSIZE + sizeof(CFG_PROMPT) + 16)
+#define CFG_LONGHELP		1
+#define CONFIG_CMDLINE_EDITING	1
+
+#define ROUND(A, B)		(((A) + (B)) & ~((B) - 1))
+/*
+ * Size of malloc() pool
+ */
+#define CFG_MALLOC_LEN		ROUND(3 * CFG_ENV_SIZE + 128*1024, 0x1000)
+#define CFG_GBL_DATA_SIZE	128	/* 128 bytes for initial data */
+
+#define CONFIG_STACKSIZE	(32*1024)	/* regular stack */
+
+#ifdef CONFIG_USE_IRQ
+#error CONFIG_USE_IRQ not supported
+#endif
+
+#endif
-- 
1.5.3.3

^ permalink raw reply related	[flat|nested] 54+ messages in thread

* [U-Boot-Users] [PATCH 15/26] AT91SAM9263EK support [part 1 of 2]
  2008-05-08 20:52 [U-Boot-Users] [PATCH v2 ARM/AT91 0/26] AT91SAM/CAP patches for U-Boot 1.3.4 Stelian Pop
                   ` (13 preceding siblings ...)
  2008-05-08 20:52 ` [U-Boot-Users] [PATCH 14/26] AT91SAM9261EK support Stelian Pop
@ 2008-05-08 20:52 ` Stelian Pop
  2008-05-08 20:52 ` [U-Boot-Users] [PATCH 16/26] AT91SAM9263EK support [part 2 " Stelian Pop
                   ` (12 subsequent siblings)
  27 siblings, 0 replies; 54+ messages in thread
From: Stelian Pop @ 2008-05-08 20:52 UTC (permalink / raw)
  To: u-boot

This patch adds support for the AT91SAM9263 chip and the AT91SAM9263EK
board.

This patch has been splitted in two for mailing list pose limit reasons.

Signed-off-by: Stelian Pop <stelian@popies.net>
---
 include/asm-arm/arch-at91sam9/at91sam9263.h |  127 +++++++++++++++++++++++++++
 1 files changed, 127 insertions(+), 0 deletions(-)
 create mode 100644 include/asm-arm/arch-at91sam9/at91sam9263.h

diff --git a/include/asm-arm/arch-at91sam9/at91sam9263.h b/include/asm-arm/arch-at91sam9/at91sam9263.h
new file mode 100644
index 0000000..98251cb
--- /dev/null
+++ b/include/asm-arm/arch-at91sam9/at91sam9263.h
@@ -0,0 +1,127 @@
+/*
+ * [origin: Linux kernel include/asm-arm/arch-at91/at91sam9263.h]
+ *
+ * (C) 2007 Atmel Corporation.
+ *
+ * Common definitions.
+ * Based on AT91SAM9263 datasheet revision B (Preliminary).
+ *
+ * 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 AT91SAM9263_H
+#define AT91SAM9263_H
+
+/*
+ * Peripheral identifiers/interrupts.
+ */
+#define AT91_ID_FIQ		0	/* Advanced Interrupt Controller (FIQ) */
+#define AT91_ID_SYS		1	/* System Peripherals */
+#define AT91SAM9263_ID_PIOA	2	/* Parallel IO Controller A */
+#define AT91SAM9263_ID_PIOB	3	/* Parallel IO Controller B */
+#define AT91SAM9263_ID_PIOCDE	4	/* Parallel IO Controller C, D and E */
+#define AT91SAM9263_ID_US0	7	/* USART 0 */
+#define AT91SAM9263_ID_US1	8	/* USART 1 */
+#define AT91SAM9263_ID_US2	9	/* USART 2 */
+#define AT91SAM9263_ID_MCI0	10	/* Multimedia Card Interface 0 */
+#define AT91SAM9263_ID_MCI1	11	/* Multimedia Card Interface 1 */
+#define AT91SAM9263_ID_CAN	12	/* CAN */
+#define AT91SAM9263_ID_TWI	13	/* Two-Wire Interface */
+#define AT91SAM9263_ID_SPI0	14	/* Serial Peripheral Interface 0 */
+#define AT91SAM9263_ID_SPI1	15	/* Serial Peripheral Interface 1 */
+#define AT91SAM9263_ID_SSC0	16	/* Serial Synchronous Controller 0 */
+#define AT91SAM9263_ID_SSC1	17	/* Serial Synchronous Controller 1 */
+#define AT91SAM9263_ID_AC97C	18	/* AC97 Controller */
+#define AT91SAM9263_ID_TCB	19	/* Timer Counter 0, 1 and 2 */
+#define AT91SAM9263_ID_PWMC	20	/* Pulse Width Modulation Controller */
+#define AT91SAM9263_ID_EMAC	21	/* Ethernet */
+#define AT91SAM9263_ID_2DGE	23	/* 2D Graphic Engine */
+#define AT91SAM9263_ID_UDP	24	/* USB Device Port */
+#define AT91SAM9263_ID_ISI	25	/* Image Sensor Interface */
+#define AT91SAM9263_ID_LCDC	26	/* LCD Controller */
+#define AT91SAM9263_ID_DMA	27	/* DMA Controller */
+#define AT91SAM9263_ID_UHP	29	/* USB Host port */
+#define AT91SAM9263_ID_IRQ0	30	/* Advanced Interrupt Controller (IRQ0) */
+#define AT91SAM9263_ID_IRQ1	31	/* Advanced Interrupt Controller (IRQ1) */
+
+
+/*
+ * User Peripheral physical base addresses.
+ */
+#define AT91SAM9263_BASE_UDP		0xfff78000
+#define AT91SAM9263_BASE_TCB0		0xfff7c000
+#define AT91SAM9263_BASE_TC0		0xfff7c000
+#define AT91SAM9263_BASE_TC1		0xfff7c040
+#define AT91SAM9263_BASE_TC2		0xfff7c080
+#define AT91SAM9263_BASE_MCI0		0xfff80000
+#define AT91SAM9263_BASE_MCI1		0xfff84000
+#define AT91SAM9263_BASE_TWI		0xfff88000
+#define AT91SAM9263_BASE_US0		0xfff8c000
+#define AT91SAM9263_BASE_US1		0xfff90000
+#define AT91SAM9263_BASE_US2		0xfff94000
+#define AT91SAM9263_BASE_SSC0		0xfff98000
+#define AT91SAM9263_BASE_SSC1		0xfff9c000
+#define AT91SAM9263_BASE_AC97C		0xfffa0000
+#define AT91SAM9263_BASE_SPI0		0xfffa4000
+#define AT91SAM9263_BASE_SPI1		0xfffa8000
+#define AT91SAM9263_BASE_CAN		0xfffac000
+#define AT91SAM9263_BASE_PWMC		0xfffb8000
+#define AT91SAM9263_BASE_EMAC		0xfffbc000
+#define AT91SAM9263_BASE_ISI		0xfffc4000
+#define AT91SAM9263_BASE_2DGE		0xfffc8000
+#define AT91_BASE_SYS			0xffffe000
+
+/*
+ * System Peripherals (offset from AT91_BASE_SYS)
+ */
+#define AT91_ECC0	(0xffffe000 - AT91_BASE_SYS)
+#define AT91_SDRAMC0	(0xffffe200 - AT91_BASE_SYS)
+#define AT91_SMC0	(0xffffe400 - AT91_BASE_SYS)
+#define AT91_ECC1	(0xffffe600 - AT91_BASE_SYS)
+#define AT91_SDRAMC1	(0xffffe800 - AT91_BASE_SYS)
+#define AT91_SMC1	(0xffffea00 - AT91_BASE_SYS)
+#define AT91_MATRIX	(0xffffec00 - AT91_BASE_SYS)
+#define AT91_CCFG	(0xffffed10 - AT91_BASE_SYS)
+#define AT91_DBGU	(0xffffee00 - AT91_BASE_SYS)
+#define AT91_AIC	(0xfffff000 - AT91_BASE_SYS)
+#define AT91_PIOA	(0xfffff200 - AT91_BASE_SYS)
+#define AT91_PIOB	(0xfffff400 - AT91_BASE_SYS)
+#define AT91_PIOC	(0xfffff600 - AT91_BASE_SYS)
+#define AT91_PIOD	(0xfffff800 - AT91_BASE_SYS)
+#define AT91_PIOE	(0xfffffa00 - AT91_BASE_SYS)
+#define AT91_PMC	(0xfffffc00 - AT91_BASE_SYS)
+#define AT91_RSTC	(0xfffffd00 - AT91_BASE_SYS)
+#define AT91_SHDWC	(0xfffffd10 - AT91_BASE_SYS)
+#define AT91_RTT0	(0xfffffd20 - AT91_BASE_SYS)
+#define AT91_PIT	(0xfffffd30 - AT91_BASE_SYS)
+#define AT91_WDT	(0xfffffd40 - AT91_BASE_SYS)
+#define AT91_RTT1	(0xfffffd50 - AT91_BASE_SYS)
+#define AT91_GPBR	(0xfffffd60 - AT91_BASE_SYS)
+
+#define AT91_USART0	AT91SAM9263_BASE_US0
+#define AT91_USART1	AT91SAM9263_BASE_US1
+#define AT91_USART2	AT91SAM9263_BASE_US2
+
+#define AT91_SMC	AT91_SMC0
+
+/*
+ * Internal Memory.
+ */
+#define AT91SAM9263_SRAM0_BASE	0x00300000	/* Internal SRAM 0 base address */
+#define AT91SAM9263_SRAM0_SIZE	(80 * SZ_1K)	/* Internal SRAM 0 size (80Kb) */
+
+#define AT91SAM9263_ROM_BASE	0x00400000	/* Internal ROM base address */
+#define AT91SAM9263_ROM_SIZE	SZ_128K		/* Internal ROM size (128Kb) */
+
+#define AT91SAM9263_SRAM1_BASE	0x00500000	/* Internal SRAM 1 base address */
+#define AT91SAM9263_SRAM1_SIZE	SZ_16K		/* Internal SRAM 1 size (16Kb) */
+
+#define AT91SAM9263_LCDC_BASE	0x00700000	/* LCD Controller */
+#define AT91SAM9263_DMAC_BASE	0x00800000	/* DMA Controller */
+#define AT91SAM9263_UHP_BASE	0x00a00000	/* USB Host controller */
+
+
+#endif
-- 
1.5.3.3

^ permalink raw reply related	[flat|nested] 54+ messages in thread

* [U-Boot-Users] [PATCH 16/26] AT91SAM9263EK support [part 2 of 2]
  2008-05-08 20:52 [U-Boot-Users] [PATCH v2 ARM/AT91 0/26] AT91SAM/CAP patches for U-Boot 1.3.4 Stelian Pop
                   ` (14 preceding siblings ...)
  2008-05-08 20:52 ` [U-Boot-Users] [PATCH 15/26] AT91SAM9263EK support [part 1 of 2] Stelian Pop
@ 2008-05-08 20:52 ` Stelian Pop
  2008-05-09 10:45   ` Jean-Christophe PLAGNIOL-VILLARD
  2008-05-08 20:52 ` [U-Boot-Users] [PATCH 17/26] AT91SAM9RLEK support Stelian Pop
                   ` (11 subsequent siblings)
  27 siblings, 1 reply; 54+ messages in thread
From: Stelian Pop @ 2008-05-08 20:52 UTC (permalink / raw)
  To: u-boot

This patch adds support for the AT91SAM9263 chip and the AT91SAM9263EK
board.

This patch has been splitted in two for mailing list pose limit reasons.

Signed-off-by: Stelian Pop <stelian@popies.net>
---
 MAINTAINERS                                        |    1 +
 MAKEALL                                            |    1 +
 Makefile                                           |    3 +
 board/atmel/at91sam9263ek/Makefile                 |   57 +++++
 board/atmel/at91sam9263ek/at91sam9263ek.c          |  240 ++++++++++++++++++++
 board/atmel/at91sam9263ek/config.mk                |    1 +
 board/atmel/at91sam9263ek/led.c                    |   78 +++++++
 board/atmel/at91sam9263ek/nand.c                   |   79 +++++++
 board/atmel/at91sam9263ek/partition.c              |   39 ++++
 drivers/net/macb.c                                 |    6 +-
 include/asm-arm/arch-at91sam9/at91sam9263_matrix.h |  129 +++++++++++
 include/asm-arm/arch-at91sam9/hardware.h           |    4 +
 include/configs/at91sam9263ek.h                    |  195 ++++++++++++++++
 net/eth.c                                          |    3 +-
 14 files changed, 833 insertions(+), 3 deletions(-)
 create mode 100644 board/atmel/at91sam9263ek/Makefile
 create mode 100644 board/atmel/at91sam9263ek/at91sam9263ek.c
 create mode 100644 board/atmel/at91sam9263ek/config.mk
 create mode 100644 board/atmel/at91sam9263ek/led.c
 create mode 100644 board/atmel/at91sam9263ek/nand.c
 create mode 100644 board/atmel/at91sam9263ek/partition.c
 create mode 100644 include/asm-arm/arch-at91sam9/at91sam9263_matrix.h
 create mode 100644 include/configs/at91sam9263ek.h

diff --git a/MAINTAINERS b/MAINTAINERS
index 26f31fd..84bf19f 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -539,6 +539,7 @@ Stelian Pop <stelian.pop@leadtechdesign.com>
 	at91cap9adk		ARM926EJS (AT91CAP9 SoC)
 	at91sam9260ek		ARM926EJS (AT91SAM9260 SoC)
 	at91sam9261ek		ARM926EJS (AT91SAM9261 SoC)
+	at91sam9263ek		ARM926EJS (AT91SAM9263 SoC)
 
 Stefan Roese <sr@denx.de>
 
diff --git a/MAKEALL b/MAKEALL
index 251da90..29aa7fc 100755
--- a/MAKEALL
+++ b/MAKEALL
@@ -459,6 +459,7 @@ LIST_ARM9="			\
 	at91rm9200dk		\
 	at91sam9260ek		\
 	at91sam9261ek		\
+	at91sam9263ek		\
 	cmc_pu2			\
 	ap920t			\
 	ap922_XA10		\
diff --git a/Makefile b/Makefile
index 5e06ff5..65ef6c2 100644
--- a/Makefile
+++ b/Makefile
@@ -2329,6 +2329,9 @@ at91rm9200dk_config	:	unconfig
 at91sam9261ek_config	:	unconfig
 	@$(MKCONFIG) $(@:_config=) arm arm926ejs at91sam9261ek atmel at91sam9
 
+at91sam9263ek_config	:	unconfig
+	@$(MKCONFIG) $(@:_config=) arm arm926ejs at91sam9263ek atmel at91sam9
+
 cmc_pu2_config	:	unconfig
 	@$(MKCONFIG) $(@:_config=) arm arm920t cmc_pu2 NULL at91rm9200
 
diff --git a/board/atmel/at91sam9263ek/Makefile b/board/atmel/at91sam9263ek/Makefile
new file mode 100644
index 0000000..5adb0bc
--- /dev/null
+++ b/board/atmel/at91sam9263ek/Makefile
@@ -0,0 +1,57 @@
+#
+# (C) Copyright 2003-2008
+# Wolfgang Denk, DENX Software Engineering, wd at denx.de.
+#
+# (C) Copyright 2008
+# Stelian Pop <stelian.pop@leadtechdesign.com>
+# 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 += at91sam9263ek.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 .depend
+
+#########################################################################
+
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+#########################################################################
diff --git a/board/atmel/at91sam9263ek/at91sam9263ek.c b/board/atmel/at91sam9263ek/at91sam9263ek.c
new file mode 100644
index 0000000..a6268a6
--- /dev/null
+++ b/board/atmel/at91sam9263ek/at91sam9263ek.c
@@ -0,0 +1,240 @@
+/*
+ * (C) Copyright 2007-2008
+ * Stelian Pop <stelian.pop@leadtechdesign.com>
+ * 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 <common.h>
+#include <asm/arch/at91sam9263.h>
+#include <asm/arch/at91sam9263_matrix.h>
+#include <asm/arch/at91sam9_smc.h>
+#include <asm/arch/at91_pmc.h>
+#include <asm/arch/at91_rstc.h>
+#include <asm/arch/gpio.h>
+#include <asm/arch/io.h>
+#if defined(CONFIG_RESET_PHY_R) && defined(CONFIG_MACB)
+#include <net.h>
+#endif
+
+DECLARE_GLOBAL_DATA_PTR;
+
+/* ------------------------------------------------------------------------- */
+/*
+ * Miscelaneous platform dependent initialisations
+ */
+
+static void at91sam9263ek_serial_hw_init(void)
+{
+#ifdef CONFIG_USART0
+	at91_set_A_periph(AT91_PIN_PA26, 1);		/* TXD0 */
+	at91_set_A_periph(AT91_PIN_PA27, 0);		/* RXD0 */
+	at91_sys_write(AT91_PMC_PCER, 1 << AT91_ID_US0);
+#endif
+
+#ifdef CONFIG_USART1
+	at91_set_A_periph(AT91_PIN_PD0, 1);		/* TXD1 */
+	at91_set_A_periph(AT91_PIN_PD1, 0);		/* RXD1 */
+	at91_sys_write(AT91_PMC_PCER, 1 << AT91_ID_US1);
+#endif
+
+#ifdef CONFIG_USART2
+	at91_set_A_periph(AT91_PIN_PD2, 1);		/* TXD2 */
+	at91_set_A_periph(AT91_PIN_PD3, 0);		/* RXD2 */
+	at91_sys_write(AT91_PMC_PCER, 1 << AT91_ID_US2);
+#endif
+
+#ifdef CONFIG_USART3	/* DBGU */
+	at91_set_A_periph(AT91_PIN_PC30, 0);		/* DRXD */
+	at91_set_A_periph(AT91_PIN_PC31, 1);		/* DTXD */
+	at91_sys_write(AT91_PMC_PCER, 1 << AT91_ID_SYS);
+#endif
+}
+
+#ifdef CONFIG_CMD_NAND
+static void at91sam9263ek_nand_hw_init(void)
+{
+	unsigned long csa;
+
+	/* Enable CS3 */
+	csa = at91_sys_read(AT91_MATRIX_EBI0CSA);
+	at91_sys_write(AT91_MATRIX_EBI0CSA,
+		       csa | AT91_MATRIX_EBI0_CS3A_SMC_SMARTMEDIA);
+
+	/* Configure SMC CS3 for NAND/SmartMedia */
+	at91_sys_write(AT91_SMC_SETUP(3),
+		       AT91_SMC_NWESETUP_(0) | AT91_SMC_NCS_WRSETUP_(0) |
+		       AT91_SMC_NRDSETUP_(0) | AT91_SMC_NCS_RDSETUP_(0));
+	at91_sys_write(AT91_SMC_PULSE(3),
+		       AT91_SMC_NWEPULSE_(3) | AT91_SMC_NCS_WRPULSE_(3) |
+		       AT91_SMC_NRDPULSE_(3) | AT91_SMC_NCS_RDPULSE_(3));
+	at91_sys_write(AT91_SMC_CYCLE(3),
+		       AT91_SMC_NWECYCLE_(5) | AT91_SMC_NRDCYCLE_(5));
+	at91_sys_write(AT91_SMC_MODE(3),
+		       AT91_SMC_READMODE | AT91_SMC_WRITEMODE |
+		       AT91_SMC_EXNWMODE_DISABLE |
+#ifdef CFG_NAND_DBW_16
+		       AT91_SMC_DBW_16 |
+#else /* CFG_NAND_DBW_8 */
+		       AT91_SMC_DBW_8 |
+#endif
+		       AT91_SMC_TDF_(2));
+
+	at91_sys_write(AT91_PMC_PCER, 1 << AT91SAM9263_ID_PIOA |
+				      1 << AT91SAM9263_ID_PIOCDE);
+
+	/* Configure RDY/BSY */
+	at91_set_gpio_input(AT91_PIN_PA22, 1);
+
+	/* Enable NandFlash */
+	at91_set_gpio_output(AT91_PIN_PD15, 1);
+}
+#endif
+
+#ifdef CONFIG_HAS_DATAFLASH
+static void at91sam9263ek_spi_hw_init(void)
+{
+	at91_set_B_periph(AT91_PIN_PA5, 0);	/* SPI0_NPCS0 */
+
+	at91_set_B_periph(AT91_PIN_PA0, 0);	/* SPI0_MISO */
+	at91_set_B_periph(AT91_PIN_PA1, 0);	/* SPI0_MOSI */
+	at91_set_B_periph(AT91_PIN_PA2, 0);	/* SPI0_SPCK */
+
+	/* Enable clock */
+	at91_sys_write(AT91_PMC_PCER, 1 << AT91SAM9263_ID_SPI0);
+}
+#endif
+
+#ifdef CONFIG_MACB
+static void at91sam9263ek_macb_hw_init(void)
+{
+	/* Enable clock */
+	at91_sys_write(AT91_PMC_PCER, 1 << AT91SAM9263_ID_EMAC);
+
+	/*
+	 * Disable pull-up on:
+	 *	RXDV (PC25) => PHY normal mode (not Test mode)
+	 * 	ERX0 (PE25) => PHY ADDR0
+	 *	ERX1 (PE26) => PHY ADDR1 => PHYADDR = 0x0
+	 *
+	 * PHY has internal pull-down
+	 */
+	writel(pin_to_mask(AT91_PIN_PC25),
+	       pin_to_controller(AT91_PIN_PC0) + PIO_PUDR);
+	writel(pin_to_mask(AT91_PIN_PE25) |
+	       pin_to_mask(AT91_PIN_PE26),
+	       pin_to_controller(AT91_PIN_PE0) + PIO_PUDR);
+
+	/* Need to reset PHY -> 500ms reset */
+	at91_sys_write(AT91_RSTC_MR, AT91_RSTC_KEY |
+				     AT91_RSTC_ERSTL | (0x0D << 8) |
+				     AT91_RSTC_URSTEN);
+
+	at91_sys_write(AT91_RSTC_CR, AT91_RSTC_KEY | AT91_RSTC_EXTRST);
+
+	/* Wait for end hardware reset */
+	while (!(at91_sys_read(AT91_RSTC_SR) & AT91_RSTC_NRSTL));
+
+	/* Re-enable pull-up */
+	writel(pin_to_mask(AT91_PIN_PC25),
+	       pin_to_controller(AT91_PIN_PC0) + PIO_PUER);
+	writel(pin_to_mask(AT91_PIN_PE25) |
+	       pin_to_mask(AT91_PIN_PE26),
+	       pin_to_controller(AT91_PIN_PE0) + PIO_PUER);
+
+	at91_set_A_periph(AT91_PIN_PE21, 0);	/* ETXCK_EREFCK */
+	at91_set_B_periph(AT91_PIN_PC25, 0);	/* ERXDV */
+	at91_set_A_periph(AT91_PIN_PE25, 0);	/* ERX0 */
+	at91_set_A_periph(AT91_PIN_PE26, 0);	/* ERX1 */
+	at91_set_A_periph(AT91_PIN_PE27, 0);	/* ERXER */
+	at91_set_A_periph(AT91_PIN_PE28, 0);	/* ETXEN */
+	at91_set_A_periph(AT91_PIN_PE23, 0);	/* ETX0 */
+	at91_set_A_periph(AT91_PIN_PE24, 0);	/* ETX1 */
+	at91_set_A_periph(AT91_PIN_PE30, 0);	/* EMDIO */
+	at91_set_A_periph(AT91_PIN_PE29, 0);	/* EMDC */
+
+#ifndef CONFIG_RMII
+	at91_set_A_periph(AT91_PIN_PE22, 0);	/* ECRS */
+	at91_set_B_periph(AT91_PIN_PC26, 0);	/* ECOL */
+	at91_set_B_periph(AT91_PIN_PC22, 0);	/* ERX2 */
+	at91_set_B_periph(AT91_PIN_PC23, 0);	/* ERX3 */
+	at91_set_B_periph(AT91_PIN_PC27, 0);	/* ERXCK */
+	at91_set_B_periph(AT91_PIN_PC20, 0);	/* ETX2 */
+	at91_set_B_periph(AT91_PIN_PC21, 0);	/* ETX3 */
+	at91_set_B_periph(AT91_PIN_PC24, 0);	/* ETXER */
+#endif
+
+}
+#endif
+
+#ifdef CONFIG_USB_OHCI_NEW
+static void at91sam9263ek_uhp_hw_init(void)
+{
+	/* Enable VBus on UHP ports */
+	at91_set_gpio_output(AT91_PIN_PA21, 0);
+	at91_set_gpio_output(AT91_PIN_PA24, 0);
+}
+#endif
+
+int board_init(void)
+{
+	/* Enable Ctrlc */
+	console_init_f();
+
+	/* arch number of AT91SAM9263EK-Board */
+	gd->bd->bi_arch_number = MACH_TYPE_AT91SAM9263EK;
+	/* adress of boot parameters */
+	gd->bd->bi_boot_params = PHYS_SDRAM + 0x100;
+
+	at91sam9263ek_serial_hw_init();
+#ifdef CONFIG_CMD_NAND
+	at91sam9263ek_nand_hw_init();
+#endif
+#ifdef CONFIG_HAS_DATAFLASH
+	at91sam9263ek_spi_hw_init();
+#endif
+#ifdef CONFIG_MACB
+	at91sam9263ek_macb_hw_init();
+#endif
+#ifdef CONFIG_USB_OHCI_NEW
+	at91sam9263ek_uhp_hw_init();
+#endif
+	return 0;
+}
+
+int dram_init(void)
+{
+	gd->bd->bi_dram[0].start = PHYS_SDRAM;
+	gd->bd->bi_dram[0].size = PHYS_SDRAM_SIZE;
+	return 0;
+}
+
+#ifdef CONFIG_RESET_PHY_R
+void reset_phy(void)
+{
+#ifdef CONFIG_MACB
+	/*
+	 * Initialize ethernet HW addr prior to starting Linux,
+	 * needed for nfsroot
+	 */
+	eth_init(gd->bd);
+#endif
+}
+#endif
diff --git a/board/atmel/at91sam9263ek/config.mk b/board/atmel/at91sam9263ek/config.mk
new file mode 100644
index 0000000..ff2cfd1
--- /dev/null
+++ b/board/atmel/at91sam9263ek/config.mk
@@ -0,0 +1 @@
+TEXT_BASE = 0x23f00000
diff --git a/board/atmel/at91sam9263ek/led.c b/board/atmel/at91sam9263ek/led.c
new file mode 100644
index 0000000..eb8d6ca
--- /dev/null
+++ b/board/atmel/at91sam9263ek/led.c
@@ -0,0 +1,78 @@
+/*
+ * (C) Copyright 2007-2008
+ * Stelian Pop <stelian.pop@leadtechdesign.com>
+ * 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 <common.h>
+#include <asm/arch/at91sam9263.h>
+#include <asm/arch/at91_pmc.h>
+#include <asm/arch/gpio.h>
+#include <asm/arch/io.h>
+
+#define	RED_LED		AT91_PIN_PB7	/* this is the power led */
+#define	GREEN_LED	AT91_PIN_PB8	/* this is the user1 led */
+#define	YELLOW_LED	AT91_PIN_PC29	/* this is the user2 led */
+
+void red_LED_on(void)
+{
+	at91_set_gpio_value(RED_LED, 1);
+}
+
+void red_LED_off(void)
+{
+	at91_set_gpio_value(RED_LED, 0);
+}
+
+void green_LED_on(void)
+{
+	at91_set_gpio_value(GREEN_LED, 0);
+}
+
+void green_LED_off(void)
+{
+	at91_set_gpio_value(GREEN_LED, 1);
+}
+
+void yellow_LED_on(void)
+{
+	at91_set_gpio_value(YELLOW_LED, 0);
+}
+
+void yellow_LED_off(void)
+{
+	at91_set_gpio_value(YELLOW_LED, 1);
+}
+
+void coloured_LED_init(void)
+{
+	/* Enable clock */
+	at91_sys_write(AT91_PMC_PCER, 1 << AT91SAM9263_ID_PIOB |
+				      1 << AT91SAM9263_ID_PIOCDE);
+
+	at91_set_gpio_output(RED_LED, 1);
+	at91_set_gpio_output(GREEN_LED, 1);
+	at91_set_gpio_output(YELLOW_LED, 1);
+
+	at91_set_gpio_value(RED_LED, 0);
+	at91_set_gpio_value(GREEN_LED, 1);
+	at91_set_gpio_value(YELLOW_LED, 1);
+}
diff --git a/board/atmel/at91sam9263ek/nand.c b/board/atmel/at91sam9263ek/nand.c
new file mode 100644
index 0000000..5079972
--- /dev/null
+++ b/board/atmel/at91sam9263ek/nand.c
@@ -0,0 +1,79 @@
+/*
+ * (C) Copyright 2007-2008
+ * Stelian Pop <stelian.pop@leadtechdesign.com>
+ * Lead Tech Design <www.leadtechdesign.com>
+ *
+ * (C) Copyright 2006 ATMEL Rousset, Lacressonniere Nicolas
+ *
+ * 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 <common.h>
+#include <asm/arch/at91sam9263.h>
+#include <asm/arch/gpio.h>
+#include <asm/arch/at91_pio.h>
+
+#include <nand.h>
+
+/*
+ *	hardware specific access to control-lines
+ */
+#define	MASK_ALE	(1 << 21)	/* our ALE is AD21 */
+#define	MASK_CLE	(1 << 22)	/* our CLE is AD22 */
+
+static void at91sam9263ek_nand_hwcontrol(struct mtd_info *mtd, int cmd)
+{
+	struct nand_chip *this = mtd->priv;
+	ulong IO_ADDR_W = (ulong) this->IO_ADDR_W;
+
+	IO_ADDR_W &= ~(MASK_ALE|MASK_CLE);
+	switch (cmd) {
+	case NAND_CTL_SETCLE:
+		IO_ADDR_W |= MASK_CLE;
+		break;
+	case NAND_CTL_SETALE:
+		IO_ADDR_W |= MASK_ALE;
+		break;
+	case NAND_CTL_CLRNCE:
+		at91_set_gpio_value(AT91_PIN_PD15, 1);
+		break;
+	case NAND_CTL_SETNCE:
+		at91_set_gpio_value(AT91_PIN_PD15, 0);
+		break;
+	}
+	this->IO_ADDR_W = (void *) IO_ADDR_W;
+}
+
+static int at91sam9263ek_nand_ready(struct mtd_info *mtd)
+{
+	return at91_get_gpio_value(AT91_PIN_PA22);
+}
+
+int board_nand_init(struct nand_chip *nand)
+{
+	nand->eccmode = NAND_ECC_SOFT;
+#ifdef CFG_NAND_DBW_16
+	nand->options = NAND_BUSWIDTH_16;
+#endif
+	nand->hwcontrol = at91sam9263ek_nand_hwcontrol;
+	nand->dev_ready = at91sam9263ek_nand_ready;
+	nand->chip_delay = 20;
+
+	return 0;
+}
diff --git a/board/atmel/at91sam9263ek/partition.c b/board/atmel/at91sam9263ek/partition.c
new file mode 100644
index 0000000..eb1a724
--- /dev/null
+++ b/board/atmel/at91sam9263ek/partition.c
@@ -0,0 +1,39 @@
+/*
+ * (C) Copyright 2008
+ * Ulf Samuelsson <ulf@atmel.com>
+ *
+ * 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 <common.h>
+#include <config.h>
+#include <asm/hardware.h>
+#include <dataflash.h>
+
+AT91S_DATAFLASH_INFO dataflash_info[CFG_MAX_DATAFLASH_BANKS];
+
+struct dataflash_addr cs[CFG_MAX_DATAFLASH_BANKS] = {
+	{CFG_DATAFLASH_LOGIC_ADDR_CS0, 0},	/* Logical adress, CS */
+};
+
+/*define the area offsets*/
+dataflash_protect_t area_list[NB_DATAFLASH_AREA] = {
+	{0x00000000, 0x000041FF, FLAG_PROTECT_SET,   0, "Bootstrap"},
+	{0x00004200, 0x000083FF, FLAG_PROTECT_CLEAR, 0, "Environment"},
+	{0x00008400, 0x00041FFF, FLAG_PROTECT_SET,   0, "U-Boot"},
+	{0x00042000, 0x00251FFF, FLAG_PROTECT_CLEAR, 0,	"Kernel"},
+	{0x00252000, 0xFFFFFFFF, FLAG_PROTECT_CLEAR, 0,	"FS"},
+};
diff --git a/drivers/net/macb.c b/drivers/net/macb.c
index 703784e..e5733f6 100644
--- a/drivers/net/macb.c
+++ b/drivers/net/macb.c
@@ -417,13 +417,15 @@ 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)
+#if defined(CONFIG_AT91CAP9) || defined(CONFIG_AT91SAM9260) || \
+    defined(CONFIG_AT91SAM9263)
 	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)
+#if defined(CONFIG_AT91CAP9) || defined(CONFIG_AT91SAM9260) || \
+    defined(CONFIG_AT91SAM9263)
 	macb_writel(macb, USRIO, MACB_BIT(CLKEN));
 #else
 	macb_writel(macb, USRIO, MACB_BIT(MII));
diff --git a/include/asm-arm/arch-at91sam9/at91sam9263_matrix.h b/include/asm-arm/arch-at91sam9/at91sam9263_matrix.h
new file mode 100644
index 0000000..83aaaab
--- /dev/null
+++ b/include/asm-arm/arch-at91sam9/at91sam9263_matrix.h
@@ -0,0 +1,129 @@
+/*
+ * [origin: Linux kernel include/asm-arm/arch-at91/at91sam9263_matrix.h]
+ *
+ *  Copyright (C) 2006 Atmel Corporation.
+ *
+ * Memory Controllers (MATRIX, EBI) - System peripherals registers.
+ * Based on AT91SAM9263 datasheet revision B (Preliminary).
+ *
+ * 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 AT91SAM9263_MATRIX_H
+#define AT91SAM9263_MATRIX_H
+
+#define AT91_MATRIX_MCFG0	(AT91_MATRIX + 0x00)	/* Master Configuration Register 0 */
+#define AT91_MATRIX_MCFG1	(AT91_MATRIX + 0x04)	/* Master Configuration Register 1 */
+#define AT91_MATRIX_MCFG2	(AT91_MATRIX + 0x08)	/* Master Configuration Register 2 */
+#define AT91_MATRIX_MCFG3	(AT91_MATRIX + 0x0C)	/* Master Configuration Register 3 */
+#define AT91_MATRIX_MCFG4	(AT91_MATRIX + 0x10)	/* Master Configuration Register 4 */
+#define AT91_MATRIX_MCFG5	(AT91_MATRIX + 0x14)	/* Master Configuration Register 5 */
+#define AT91_MATRIX_MCFG6	(AT91_MATRIX + 0x18)	/* Master Configuration Register 6 */
+#define AT91_MATRIX_MCFG7	(AT91_MATRIX + 0x1C)	/* Master Configuration Register 7 */
+#define AT91_MATRIX_MCFG8	(AT91_MATRIX + 0x20)	/* Master Configuration Register 8 */
+#define		AT91_MATRIX_ULBT	(7 << 0)	/* Undefined Length Burst Type */
+#define			AT91_MATRIX_ULBT_INFINITE	(0 << 0)
+#define			AT91_MATRIX_ULBT_SINGLE		(1 << 0)
+#define			AT91_MATRIX_ULBT_FOUR		(2 << 0)
+#define			AT91_MATRIX_ULBT_EIGHT		(3 << 0)
+#define			AT91_MATRIX_ULBT_SIXTEEN	(4 << 0)
+
+#define AT91_MATRIX_SCFG0	(AT91_MATRIX + 0x40)	/* Slave Configuration Register 0 */
+#define AT91_MATRIX_SCFG1	(AT91_MATRIX + 0x44)	/* Slave Configuration Register 1 */
+#define AT91_MATRIX_SCFG2	(AT91_MATRIX + 0x48)	/* Slave Configuration Register 2 */
+#define AT91_MATRIX_SCFG3	(AT91_MATRIX + 0x4C)	/* Slave Configuration Register 3 */
+#define AT91_MATRIX_SCFG4	(AT91_MATRIX + 0x50)	/* Slave Configuration Register 4 */
+#define AT91_MATRIX_SCFG5	(AT91_MATRIX + 0x54)	/* Slave Configuration Register 5 */
+#define AT91_MATRIX_SCFG6	(AT91_MATRIX + 0x58)	/* Slave Configuration Register 6 */
+#define AT91_MATRIX_SCFG7	(AT91_MATRIX + 0x5C)	/* Slave Configuration Register 7 */
+#define		AT91_MATRIX_SLOT_CYCLE		(0xff << 0)	/* Maximum Number of Allowed Cycles for a Burst */
+#define		AT91_MATRIX_DEFMSTR_TYPE	(3    << 16)	/* Default Master Type */
+#define			AT91_MATRIX_DEFMSTR_TYPE_NONE	(0 << 16)
+#define			AT91_MATRIX_DEFMSTR_TYPE_LAST	(1 << 16)
+#define			AT91_MATRIX_DEFMSTR_TYPE_FIXED	(2 << 16)
+#define		AT91_MATRIX_FIXED_DEFMSTR	(0xf  << 18)	/* Fixed Index of Default Master */
+#define		AT91_MATRIX_ARBT		(3    << 24)	/* Arbitration Type */
+#define			AT91_MATRIX_ARBT_ROUND_ROBIN	(0 << 24)
+#define			AT91_MATRIX_ARBT_FIXED_PRIORITY	(1 << 24)
+
+#define AT91_MATRIX_PRAS0	(AT91_MATRIX + 0x80)	/* Priority Register A for Slave 0 */
+#define AT91_MATRIX_PRBS0	(AT91_MATRIX + 0x84)	/* Priority Register B for Slave 0 */
+#define AT91_MATRIX_PRAS1	(AT91_MATRIX + 0x88)	/* Priority Register A for Slave 1 */
+#define AT91_MATRIX_PRBS1	(AT91_MATRIX + 0x8C)	/* Priority Register B for Slave 1 */
+#define AT91_MATRIX_PRAS2	(AT91_MATRIX + 0x90)	/* Priority Register A for Slave 2 */
+#define AT91_MATRIX_PRBS2	(AT91_MATRIX + 0x94)	/* Priority Register B for Slave 2 */
+#define AT91_MATRIX_PRAS3	(AT91_MATRIX + 0x98)	/* Priority Register A for Slave 3 */
+#define AT91_MATRIX_PRBS3	(AT91_MATRIX + 0x9C)	/* Priority Register B for Slave 3 */
+#define AT91_MATRIX_PRAS4	(AT91_MATRIX + 0xA0)	/* Priority Register A for Slave 4 */
+#define AT91_MATRIX_PRBS4	(AT91_MATRIX + 0xA4)	/* Priority Register B for Slave 4 */
+#define AT91_MATRIX_PRAS5	(AT91_MATRIX + 0xA8)	/* Priority Register A for Slave 5 */
+#define AT91_MATRIX_PRBS5	(AT91_MATRIX + 0xAC)	/* Priority Register B for Slave 5 */
+#define AT91_MATRIX_PRAS6	(AT91_MATRIX + 0xB0)	/* Priority Register A for Slave 6 */
+#define AT91_MATRIX_PRBS6	(AT91_MATRIX + 0xB4)	/* Priority Register B for Slave 6 */
+#define AT91_MATRIX_PRAS7	(AT91_MATRIX + 0xB8)	/* Priority Register A for Slave 7 */
+#define AT91_MATRIX_PRBS7	(AT91_MATRIX + 0xBC)	/* Priority Register B for Slave 7 */
+#define		AT91_MATRIX_M0PR		(3 << 0)	/* Master 0 Priority */
+#define		AT91_MATRIX_M1PR		(3 << 4)	/* Master 1 Priority */
+#define		AT91_MATRIX_M2PR		(3 << 8)	/* Master 2 Priority */
+#define		AT91_MATRIX_M3PR		(3 << 12)	/* Master 3 Priority */
+#define		AT91_MATRIX_M4PR		(3 << 16)	/* Master 4 Priority */
+#define		AT91_MATRIX_M5PR		(3 << 20)	/* Master 5 Priority */
+#define		AT91_MATRIX_M6PR		(3 << 24)	/* Master 6 Priority */
+#define		AT91_MATRIX_M7PR		(3 << 28)	/* Master 7 Priority */
+#define		AT91_MATRIX_M8PR		(3 << 0)	/* Master 8 Priority (in Register B) */
+
+#define AT91_MATRIX_MRCR	(AT91_MATRIX + 0x100)	/* Master Remap Control Register */
+#define		AT91_MATRIX_RCB0		(1 << 0)	/* Remap Command for AHB Master 0 (ARM926EJ-S Instruction Master) */
+#define		AT91_MATRIX_RCB1		(1 << 1)	/* Remap Command for AHB Master 1 (ARM926EJ-S Data Master) */
+#define		AT91_MATRIX_RCB2		(1 << 2)
+#define		AT91_MATRIX_RCB3		(1 << 3)
+#define		AT91_MATRIX_RCB4		(1 << 4)
+#define		AT91_MATRIX_RCB5		(1 << 5)
+#define		AT91_MATRIX_RCB6		(1 << 6)
+#define		AT91_MATRIX_RCB7		(1 << 7)
+#define		AT91_MATRIX_RCB8		(1 << 8)
+
+#define AT91_MATRIX_TCMR	(AT91_MATRIX + 0x114)	/* TCM Configuration Register */
+#define		AT91_MATRIX_ITCM_SIZE		(0xf << 0)	/* Size of ITCM enabled memory block */
+#define			AT91_MATRIX_ITCM_0		(0 << 0)
+#define			AT91_MATRIX_ITCM_16		(5 << 0)
+#define			AT91_MATRIX_ITCM_32		(6 << 0)
+#define		AT91_MATRIX_DTCM_SIZE		(0xf << 4)	/* Size of DTCM enabled memory block */
+#define			AT91_MATRIX_DTCM_0		(0 << 4)
+#define			AT91_MATRIX_DTCM_16		(5 << 4)
+#define			AT91_MATRIX_DTCM_32		(6 << 4)
+
+#define AT91_MATRIX_EBI0CSA	(AT91_MATRIX + 0x120)	/* EBI0 Chip Select Assignment Register */
+#define		AT91_MATRIX_EBI0_CS1A		(1 << 1)	/* Chip Select 1 Assignment */
+#define			AT91_MATRIX_EBI0_CS1A_SMC		(0 << 1)
+#define			AT91_MATRIX_EBI0_CS1A_SDRAMC		(1 << 1)
+#define		AT91_MATRIX_EBI0_CS3A		(1 << 3)	/* Chip Select 3 Assignment */
+#define			AT91_MATRIX_EBI0_CS3A_SMC		(0 << 3)
+#define			AT91_MATRIX_EBI0_CS3A_SMC_SMARTMEDIA	(1 << 3)
+#define		AT91_MATRIX_EBI0_CS4A		(1 << 4)	/* Chip Select 4 Assignment */
+#define			AT91_MATRIX_EBI0_CS4A_SMC		(0 << 4)
+#define			AT91_MATRIX_EBI0_CS4A_SMC_CF1		(1 << 4)
+#define		AT91_MATRIX_EBI0_CS5A		(1 << 5)	/* Chip Select 5 Assignment */
+#define			AT91_MATRIX_EBI0_CS5A_SMC		(0 << 5)
+#define			AT91_MATRIX_EBI0_CS5A_SMC_CF2		(1 << 5)
+#define		AT91_MATRIX_EBI0_DBPUC		(1 << 8)	/* Data Bus Pull-up Configuration */
+#define		AT91_MATRIX_EBI0_VDDIOMSEL	(1 << 16)	/* Memory voltage selection */
+#define			AT91_MATRIX_EBI0_VDDIOMSEL_1_8V		(0 << 16)
+#define			AT91_MATRIX_EBI0_VDDIOMSEL_3_3V		(1 << 16)
+
+#define AT91_MATRIX_EBI1CSA	(AT91_MATRIX + 0x124)	/* EBI1 Chip Select Assignment Register */
+#define		AT91_MATRIX_EBI1_CS1A		(1 << 1)	/* Chip Select 1 Assignment */
+#define			AT91_MATRIX_EBI1_CS1A_SMC		(0 << 1)
+#define			AT91_MATRIX_EBI1_CS1A_SDRAMC		(1 << 1)
+#define		AT91_MATRIX_EBI1_CS2A		(1 << 3)	/* Chip Select 3 Assignment */
+#define			AT91_MATRIX_EBI1_CS2A_SMC		(0 << 3)
+#define			AT91_MATRIX_EBI1_CS2A_SMC_SMARTMEDIA	(1 << 3)
+#define		AT91_MATRIX_EBI1_DBPUC		(1 << 8)	/* Data Bus Pull-up Configuration */
+#define		AT91_MATRIX_EBI1_VDDIOMSEL	(1 << 16)	/* Memory voltage selection */
+#define			AT91_MATRIX_EBI1_VDDIOMSEL_1_8V		(0 << 16)
+#define			AT91_MATRIX_EBI1_VDDIOMSEL_3_3V		(1 << 16)
+
+#endif
diff --git a/include/asm-arm/arch-at91sam9/hardware.h b/include/asm-arm/arch-at91sam9/hardware.h
index 06bab62..13c85af 100644
--- a/include/asm-arm/arch-at91sam9/hardware.h
+++ b/include/asm-arm/arch-at91sam9/hardware.h
@@ -31,6 +31,10 @@
 #define AT91_PMC_UHP	AT91SAM926x_PMC_UHP
 #elif defined(CONFIG_AT91SAM9263)
 #include <asm/arch/at91sam9263.h>
+#define AT91_BASE_EMAC	AT91SAM9263_BASE_EMAC
+#define AT91_BASE_SPI	AT91SAM9263_BASE_SPI0
+#define AT91_ID_UHP	AT91SAM9263_ID_UHP
+#define AT91_PMC_UHP	AT91SAM926x_PMC_UHP
 #elif defined(CONFIG_AT91SAM9RL)
 #include <asm/arch/at91sam9rl.h>
 #elif defined(CONFIG_AT91CAP9)
diff --git a/include/configs/at91sam9263ek.h b/include/configs/at91sam9263ek.h
new file mode 100644
index 0000000..d28f7d8
--- /dev/null
+++ b/include/configs/at91sam9263ek.h
@@ -0,0 +1,195 @@
+/*
+ * (C) Copyright 2007-2008
+ * Stelian Pop <stelian.pop@leadtechdesign.com>
+ * Lead Tech Design <www.leadtechdesign.com>
+ *
+ * Configuation settings for the AT91SAM9263EK board.
+ *
+ * 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
+ */
+
+#ifndef __CONFIG_H
+#define __CONFIG_H
+
+/* ARM asynchronous clock */
+#define AT91_MAIN_CLOCK		199919000	/* from 16.367 MHz crystal */
+#define AT91_MASTER_CLOCK	99959500	/* peripheral = main / 2 */
+#define CFG_HZ			1000000		/* 1us resolution */
+
+#define AT91_SLOW_CLOCK		32768	/* slow clock */
+
+#define CONFIG_ARM926EJS	1	/* This is an ARM926EJS Core	*/
+#define CONFIG_AT91SAM9263	1	/* It's an Atmel AT91SAM9263 SoC*/
+#define CONFIG_AT91SAM9263EK	1	/* on an AT91SAM9263EK Board	*/
+#undef CONFIG_USE_IRQ			/* we don't need IRQ/FIQ stuff	*/
+
+#define CONFIG_CMDLINE_TAG	1	/* enable passing of ATAGs	*/
+#define CONFIG_SETUP_MEMORY_TAGS 1
+#define CONFIG_INITRD_TAG	1
+
+#define CONFIG_SKIP_LOWLEVEL_INIT
+#define CONFIG_SKIP_RELOCATE_UBOOT
+
+/*
+ * Hardware drivers
+ */
+#define CONFIG_ATMEL_USART	1
+#undef CONFIG_USART0
+#undef CONFIG_USART1
+#undef CONFIG_USART2
+#define CONFIG_USART3		1	/* USART 3 is DBGU */
+
+#define CONFIG_BOOTDELAY	3
+
+/* #define CONFIG_ENV_OVERWRITE	1 */
+
+/*
+ * BOOTP options
+ */
+#define CONFIG_BOOTP_BOOTFILESIZE	1
+#define CONFIG_BOOTP_BOOTPATH		1
+#define CONFIG_BOOTP_GATEWAY		1
+#define CONFIG_BOOTP_HOSTNAME		1
+
+/*
+ * Command line configuration.
+ */
+#include <config_cmd_default.h>
+#undef CONFIG_CMD_BDI
+#undef CONFIG_CMD_IMI
+#undef CONFIG_CMD_AUTOSCRIPT
+#undef CONFIG_CMD_FPGA
+#undef CONFIG_CMD_LOADS
+#undef CONFIG_CMD_IMLS
+
+#define CONFIG_CMD_PING		1
+#define CONFIG_CMD_DHCP		1
+#define CONFIG_CMD_NAND		1
+#define CONFIG_CMD_USB		1
+
+/* SDRAM */
+#define CONFIG_NR_DRAM_BANKS		1
+#define PHYS_SDRAM			0x20000000
+#define PHYS_SDRAM_SIZE			0x04000000	/* 64 megs */
+
+/* DataFlash */
+#define CONFIG_HAS_DATAFLASH		1
+#define CFG_SPI_WRITE_TOUT		(5*CFG_HZ)
+#define CFG_MAX_DATAFLASH_BANKS		1
+#define CFG_DATAFLASH_LOGIC_ADDR_CS0	0xC0000000	/* CS0 */
+#define AT91_SPI_CLK			15000000
+#define DATAFLASH_TCSS			(0x1a << 16)
+#define DATAFLASH_TCHS			(0x1 << 24)
+
+/* NOR flash, if populated */
+#if 1
+#define CFG_NO_FLASH			1
+#else
+#define CFG_FLASH_CFI			1
+#define CFG_FLASH_CFI_DRIVER		1
+#define PHYS_FLASH_1			0x10000000
+#define CFG_FLASH_BASE			PHYS_FLASH_1
+#define CFG_MAX_FLASH_SECT		256
+#define CFG_MAX_FLASH_BANKS		1
+#endif
+
+/* NAND flash */
+#define NAND_MAX_CHIPS			1
+#define CFG_MAX_NAND_DEVICE		1
+#define CFG_NAND_BASE			0x40000000
+#define CFG_NAND_DBW_8			1
+
+/* Ethernet */
+#define CONFIG_MACB			1
+#define CONFIG_RMII			1
+#define CONFIG_NET_MULTI		1
+#define CONFIG_NET_RETRY_COUNT		20
+#define CONFIG_RESET_PHY_R		1
+
+/* USB */
+#define CONFIG_USB_OHCI_NEW		1
+#define LITTLEENDIAN			1
+#define CONFIG_DOS_PARTITION		1
+#define CFG_USB_OHCI_CPU_INIT		1
+#define CFG_USB_OHCI_REGS_BASE		0x00a00000	/* AT91SAM9263_UHP_BASE */
+#define CFG_USB_OHCI_SLOT_NAME		"at91sam9263"
+#define CFG_USB_OHCI_MAX_ROOT_PORTS	2
+#define CONFIG_USB_STORAGE		1
+
+#define CFG_LOAD_ADDR			0x22000000	/* load address */
+
+#define CFG_MEMTEST_START		PHYS_SDRAM
+#define CFG_MEMTEST_END			0x23e00000
+
+#define CFG_USE_DATAFLASH		1
+#undef CFG_USE_NANDFLASH
+
+#ifdef CFG_USE_DATAFLASH
+
+/* bootstrap + u-boot + env + linux in dataflash on CS0 */
+#define CFG_ENV_IS_IN_DATAFLASH	1
+#define CFG_MONITOR_BASE	(CFG_DATAFLASH_LOGIC_ADDR_CS0 + 0x8400)
+#define CFG_ENV_OFFSET		0x4200
+#define CFG_ENV_ADDR		(CFG_DATAFLASH_LOGIC_ADDR_CS0 + CFG_ENV_OFFSET)
+#define CFG_ENV_SIZE		0x4200
+#define CONFIG_BOOTCOMMAND	"cp.b 0xC0042000 0x22000000 0x210000; bootm"
+#define CONFIG_BOOTARGS		"console=ttyS0,115200 " \
+				"root=/dev/mtdblock0 " \
+				"mtdparts=at91_nand:-(root) "\
+				"rw rootfstype=jffs2"
+
+#else /* CFG_USE_NANDFLASH */
+
+/* bootstrap + u-boot + env + linux in nandflash */
+#define CFG_ENV_IS_IN_NAND	1
+#define CFG_ENV_OFFSET		0x60000
+#define CFG_ENV_OFFSET_REDUND	0x80000
+#define CFG_ENV_SIZE		0x20000		/* 1 sector = 128 kB */
+#define CONFIG_BOOTCOMMAND	"nand read 0x22000000 0xA0000 0x200000; bootm"
+#define CONFIG_BOOTARGS		"console=ttyS0,115200 " \
+				"root=/dev/mtdblock5 " \
+				"mtdparts=at91_nand:128k(bootstrap)ro,256k(uboot)ro,128k(env1)ro,128k(env2)ro,2M(linux),-(root) " \
+				"rw rootfstype=jffs2"
+
+#endif
+
+#define CONFIG_BAUDRATE		115200
+#define CFG_BAUDRATE_TABLE	{115200 , 19200, 38400, 57600, 9600 }
+
+#define CFG_PROMPT		"U-Boot> "
+#define CFG_CBSIZE		256
+#define CFG_MAXARGS		16
+#define CFG_PBSIZE		(CFG_CBSIZE + sizeof(CFG_PROMPT) + 16)
+#define CFG_LONGHELP		1
+#define CONFIG_CMDLINE_EDITING	1
+
+#define ROUND(A, B)		(((A) + (B)) & ~((B) - 1))
+/*
+ * Size of malloc() pool
+ */
+#define CFG_MALLOC_LEN		ROUND(3 * CFG_ENV_SIZE + 128*1024, 0x1000)
+#define CFG_GBL_DATA_SIZE	128	/* 128 bytes for initial data */
+
+#define CONFIG_STACKSIZE	(32*1024)	/* regular stack */
+
+#ifdef CONFIG_USE_IRQ
+#error CONFIG_USE_IRQ not supported
+#endif
+
+#endif
diff --git a/net/eth.c b/net/eth.c
index c4f24c6..21d1496 100644
--- a/net/eth.c
+++ b/net/eth.c
@@ -288,7 +288,8 @@ int eth_initialize(bd_t *bis)
 #if defined(CONFIG_FSLDMAFEC)
 	mcdmafec_initialize(bis);
 #endif
-#if defined(CONFIG_AT91CAP9) || defined(CONFIG_AT91SAM9260)
+#if defined(CONFIG_AT91CAP9) || defined(CONFIG_AT91SAM9260) || \
+    defined(CONFIG_AT91SAM9263)
 	at91sam9_eth_initialize(bis);
 #endif
 
-- 
1.5.3.3

^ permalink raw reply related	[flat|nested] 54+ messages in thread

* [U-Boot-Users] [PATCH 17/26] AT91SAM9RLEK support
  2008-05-08 20:52 [U-Boot-Users] [PATCH v2 ARM/AT91 0/26] AT91SAM/CAP patches for U-Boot 1.3.4 Stelian Pop
                   ` (15 preceding siblings ...)
  2008-05-08 20:52 ` [U-Boot-Users] [PATCH 16/26] AT91SAM9263EK support [part 2 " Stelian Pop
@ 2008-05-08 20:52 ` Stelian Pop
  2008-05-09 10:51   ` Jean-Christophe PLAGNIOL-VILLARD
  2008-05-08 20:52 ` [U-Boot-Users] [PATCH 18/26] Make nand_init() return the detected NAND size Stelian Pop
                   ` (10 subsequent siblings)
  27 siblings, 1 reply; 54+ messages in thread
From: Stelian Pop @ 2008-05-08 20:52 UTC (permalink / raw)
  To: u-boot

This patch adds support for the AT91SAM9RL chip and the AT91SAM9RLEK
board.

Signed-off-by: Stelian Pop <stelian@popies.net>
---
 MAINTAINERS                                       |    1 +
 MAKEALL                                           |    1 +
 Makefile                                          |    3 +
 board/atmel/at91sam9rlek/Makefile                 |   57 +++++++
 board/atmel/at91sam9rlek/at91sam9rlek.c           |  152 +++++++++++++++++++
 board/atmel/at91sam9rlek/config.mk                |    1 +
 board/atmel/at91sam9rlek/led.c                    |   77 ++++++++++
 board/atmel/at91sam9rlek/nand.c                   |   79 ++++++++++
 board/atmel/at91sam9rlek/partition.c              |   39 +++++
 include/asm-arm/arch-at91sam9/at91sam9rl.h        |  115 ++++++++++++++
 include/asm-arm/arch-at91sam9/at91sam9rl_matrix.h |   96 ++++++++++++
 include/asm-arm/arch-at91sam9/hardware.h          |    2 +
 include/configs/at91sam9rlek.h                    |  164 +++++++++++++++++++++
 13 files changed, 787 insertions(+), 0 deletions(-)
 create mode 100644 board/atmel/at91sam9rlek/Makefile
 create mode 100644 board/atmel/at91sam9rlek/at91sam9rlek.c
 create mode 100644 board/atmel/at91sam9rlek/config.mk
 create mode 100644 board/atmel/at91sam9rlek/led.c
 create mode 100644 board/atmel/at91sam9rlek/nand.c
 create mode 100644 board/atmel/at91sam9rlek/partition.c
 create mode 100644 include/asm-arm/arch-at91sam9/at91sam9rl.h
 create mode 100644 include/asm-arm/arch-at91sam9/at91sam9rl_matrix.h
 create mode 100644 include/configs/at91sam9rlek.h

diff --git a/MAINTAINERS b/MAINTAINERS
index 84bf19f..2047af0 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -540,6 +540,7 @@ Stelian Pop <stelian.pop@leadtechdesign.com>
 	at91sam9260ek		ARM926EJS (AT91SAM9260 SoC)
 	at91sam9261ek		ARM926EJS (AT91SAM9261 SoC)
 	at91sam9263ek		ARM926EJS (AT91SAM9263 SoC)
+	at91sam9rlek		ARM926EJS (AT91SAM9RL SoC)
 
 Stefan Roese <sr@denx.de>
 
diff --git a/MAKEALL b/MAKEALL
index 29aa7fc..62ff019 100755
--- a/MAKEALL
+++ b/MAKEALL
@@ -460,6 +460,7 @@ LIST_ARM9="			\
 	at91sam9260ek		\
 	at91sam9261ek		\
 	at91sam9263ek		\
+	at91sam9rlek		\
 	cmc_pu2			\
 	ap920t			\
 	ap922_XA10		\
diff --git a/Makefile b/Makefile
index 65ef6c2..50f61c1 100644
--- a/Makefile
+++ b/Makefile
@@ -2332,6 +2332,9 @@ at91sam9261ek_config	:	unconfig
 at91sam9263ek_config	:	unconfig
 	@$(MKCONFIG) $(@:_config=) arm arm926ejs at91sam9263ek atmel at91sam9
 
+at91sam9rlek_config	:	unconfig
+	@$(MKCONFIG) $(@:_config=) arm arm926ejs at91sam9rlek atmel at91sam9
+
 cmc_pu2_config	:	unconfig
 	@$(MKCONFIG) $(@:_config=) arm arm920t cmc_pu2 NULL at91rm9200
 
diff --git a/board/atmel/at91sam9rlek/Makefile b/board/atmel/at91sam9rlek/Makefile
new file mode 100644
index 0000000..a86a926
--- /dev/null
+++ b/board/atmel/at91sam9rlek/Makefile
@@ -0,0 +1,57 @@
+#
+# (C) Copyright 2003-2008
+# Wolfgang Denk, DENX Software Engineering, wd at denx.de.
+#
+# (C) Copyright 2008
+# Stelian Pop <stelian.pop@leadtechdesign.com>
+# 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 += at91sam9rlek.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 .depend
+
+#########################################################################
+
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+#########################################################################
diff --git a/board/atmel/at91sam9rlek/at91sam9rlek.c b/board/atmel/at91sam9rlek/at91sam9rlek.c
new file mode 100644
index 0000000..8deecfd
--- /dev/null
+++ b/board/atmel/at91sam9rlek/at91sam9rlek.c
@@ -0,0 +1,152 @@
+/*
+ * (C) Copyright 2007-2008
+ * Stelian Pop <stelian.pop@leadtechdesign.com>
+ * 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 <common.h>
+#include <asm/arch/at91sam9rl.h>
+#include <asm/arch/at91sam9rl_matrix.h>
+#include <asm/arch/at91sam9_smc.h>
+#include <asm/arch/at91_pmc.h>
+#include <asm/arch/at91_rstc.h>
+#include <asm/arch/gpio.h>
+#include <asm/arch/io.h>
+#if defined(CONFIG_RESET_PHY_R) && defined(CONFIG_MACB)
+#include <net.h>
+#endif
+
+DECLARE_GLOBAL_DATA_PTR;
+
+/* ------------------------------------------------------------------------- */
+/*
+ * Miscelaneous platform dependent initialisations
+ */
+
+static void at91sam9rlek_serial_hw_init(void)
+{
+#ifdef CONFIG_USART0
+	at91_set_A_periph(AT91_PIN_PA6, 1);		/* TXD0 */
+	at91_set_A_periph(AT91_PIN_PA7, 0);		/* RXD0 */
+	at91_sys_write(AT91_PMC_PCER, 1 << AT91_ID_US0);
+#endif
+
+#ifdef CONFIG_USART1
+	at91_set_A_periph(AT91_PIN_PA11, 1);		/* TXD1 */
+	at91_set_A_periph(AT91_PIN_PA12, 0);		/* RXD1 */
+	at91_sys_write(AT91_PMC_PCER, 1 << AT91_ID_US1);
+#endif
+
+#ifdef CONFIG_USART2
+	at91_set_A_periph(AT91_PIN_PA13, 1);		/* TXD2 */
+	at91_set_A_periph(AT91_PIN_PA14, 0);		/* RXD2 */
+	at91_sys_write(AT91_PMC_PCER, 1 << AT91_ID_US2);
+#endif
+
+#ifdef CONFIG_USART3	/* DBGU */
+	at91_set_A_periph(AT91_PIN_PA21, 0);		/* DRXD */
+	at91_set_A_periph(AT91_PIN_PA22, 1);		/* DTXD */
+	at91_sys_write(AT91_PMC_PCER, 1 << AT91_ID_SYS);
+#endif
+}
+
+#ifdef CONFIG_CMD_NAND
+static void at91sam9rlek_nand_hw_init(void)
+{
+	unsigned long csa;
+
+	/* Enable CS3 */
+	csa = at91_sys_read(AT91_MATRIX_EBICSA);
+	at91_sys_write(AT91_MATRIX_EBICSA,
+		       csa | AT91_MATRIX_CS3A_SMC_SMARTMEDIA);
+
+	/* Configure SMC CS3 for NAND/SmartMedia */
+	at91_sys_write(AT91_SMC_SETUP(3),
+		       AT91_SMC_NWESETUP_(0) | AT91_SMC_NCS_WRSETUP_(0) |
+		       AT91_SMC_NRDSETUP_(0) | AT91_SMC_NCS_RDSETUP_(0));
+	at91_sys_write(AT91_SMC_PULSE(3),
+		       AT91_SMC_NWEPULSE_(2) | AT91_SMC_NCS_WRPULSE_(5) |
+		       AT91_SMC_NRDPULSE_(2) | AT91_SMC_NCS_RDPULSE_(5));
+	at91_sys_write(AT91_SMC_CYCLE(3),
+		       AT91_SMC_NWECYCLE_(7) | AT91_SMC_NRDCYCLE_(7));
+	at91_sys_write(AT91_SMC_MODE(3),
+		       AT91_SMC_READMODE | AT91_SMC_WRITEMODE |
+		       AT91_SMC_EXNWMODE_DISABLE |
+#ifdef CFG_NAND_DBW_16
+		       AT91_SMC_DBW_16 |
+#else /* CFG_NAND_DBW_8 */
+		       AT91_SMC_DBW_8 |
+#endif
+		       AT91_SMC_TDF_(1));
+
+	at91_sys_write(AT91_PMC_PCER, 1 << AT91SAM9RL_ID_PIOD);
+
+	/* Configure RDY/BSY */
+	at91_set_gpio_input(AT91_PIN_PD17, 1);
+
+	/* Enable NandFlash */
+	at91_set_gpio_output(AT91_PIN_PB6, 1);
+
+	at91_set_A_periph(AT91_PIN_PB4, 0);		/* NANDOE */
+	at91_set_A_periph(AT91_PIN_PB5, 0);		/* NANDWE */
+}
+#endif
+
+#ifdef CONFIG_HAS_DATAFLASH
+static void at91sam9rlek_spi_hw_init(void)
+{
+	at91_set_A_periph(AT91_PIN_PA28, 0);	/* SPI0_NPCS0 */
+
+	at91_set_A_periph(AT91_PIN_PA25, 0);	/* SPI0_MISO */
+	at91_set_A_periph(AT91_PIN_PA26, 0);	/* SPI0_MOSI */
+	at91_set_A_periph(AT91_PIN_PA27, 0);	/* SPI0_SPCK */
+
+	/* Enable clock */
+	at91_sys_write(AT91_PMC_PCER, 1 << AT91SAM9RL_ID_SPI);
+}
+#endif
+
+int board_init(void)
+{
+	/* Enable Ctrlc */
+	console_init_f();
+
+	/* arch number of AT91SAM9RLEK-Board */
+	gd->bd->bi_arch_number = MACH_TYPE_AT91SAM9RLEK;
+	/* adress of boot parameters */
+	gd->bd->bi_boot_params = PHYS_SDRAM + 0x100;
+
+	at91sam9rlek_serial_hw_init();
+#ifdef CONFIG_CMD_NAND
+	at91sam9rlek_nand_hw_init();
+#endif
+#ifdef CONFIG_HAS_DATAFLASH
+	at91sam9rlek_spi_hw_init();
+#endif
+	return 0;
+}
+
+int dram_init(void)
+{
+	gd->bd->bi_dram[0].start = PHYS_SDRAM;
+	gd->bd->bi_dram[0].size = PHYS_SDRAM_SIZE;
+	return 0;
+}
diff --git a/board/atmel/at91sam9rlek/config.mk b/board/atmel/at91sam9rlek/config.mk
new file mode 100644
index 0000000..ff2cfd1
--- /dev/null
+++ b/board/atmel/at91sam9rlek/config.mk
@@ -0,0 +1 @@
+TEXT_BASE = 0x23f00000
diff --git a/board/atmel/at91sam9rlek/led.c b/board/atmel/at91sam9rlek/led.c
new file mode 100644
index 0000000..8a7d8e0
--- /dev/null
+++ b/board/atmel/at91sam9rlek/led.c
@@ -0,0 +1,77 @@
+/*
+ * (C) Copyright 2007-2008
+ * Stelian Pop <stelian.pop@leadtechdesign.com>
+ * 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 <common.h>
+#include <asm/arch/at91sam9rl.h>
+#include <asm/arch/at91_pmc.h>
+#include <asm/arch/gpio.h>
+#include <asm/arch/io.h>
+
+#define	RED_LED		AT91_PIN_PD14	/* this is the power led */
+#define	GREEN_LED	AT91_PIN_PD15	/* this is the user1 led */
+#define	YELLOW_LED	AT91_PIN_PD16	/* this is the user2 led */
+
+void red_LED_on(void)
+{
+	at91_set_gpio_value(RED_LED, 1);
+}
+
+void red_LED_off(void)
+{
+	at91_set_gpio_value(RED_LED, 0);
+}
+
+void green_LED_on(void)
+{
+	at91_set_gpio_value(GREEN_LED, 0);
+}
+
+void green_LED_off(void)
+{
+	at91_set_gpio_value(GREEN_LED, 1);
+}
+
+void yellow_LED_on(void)
+{
+	at91_set_gpio_value(YELLOW_LED, 0);
+}
+
+void yellow_LED_off(void)
+{
+	at91_set_gpio_value(YELLOW_LED, 1);
+}
+
+void coloured_LED_init(void)
+{
+	/* Enable clock */
+	at91_sys_write(AT91_PMC_PCER, 1 << AT91SAM9RL_ID_PIOD);
+
+	at91_set_gpio_output(RED_LED, 1);
+	at91_set_gpio_output(GREEN_LED, 1);
+	at91_set_gpio_output(YELLOW_LED, 1);
+
+	at91_set_gpio_value(RED_LED, 0);
+	at91_set_gpio_value(GREEN_LED, 1);
+	at91_set_gpio_value(YELLOW_LED, 1);
+}
diff --git a/board/atmel/at91sam9rlek/nand.c b/board/atmel/at91sam9rlek/nand.c
new file mode 100644
index 0000000..5af1a31
--- /dev/null
+++ b/board/atmel/at91sam9rlek/nand.c
@@ -0,0 +1,79 @@
+/*
+ * (C) Copyright 2007-2008
+ * Stelian Pop <stelian.pop@leadtechdesign.com>
+ * Lead Tech Design <www.leadtechdesign.com>
+ *
+ * (C) Copyright 2006 ATMEL Rousset, Lacressonniere Nicolas
+ *
+ * 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 <common.h>
+#include <asm/arch/at91sam9rl.h>
+#include <asm/arch/gpio.h>
+#include <asm/arch/at91_pio.h>
+
+#include <nand.h>
+
+/*
+ *	hardware specific access to control-lines
+ */
+#define	MASK_ALE	(1 << 21)	/* our ALE is AD21 */
+#define	MASK_CLE	(1 << 22)	/* our CLE is AD22 */
+
+static void at91sam9rlek_nand_hwcontrol(struct mtd_info *mtd, int cmd)
+{
+	struct nand_chip *this = mtd->priv;
+	ulong IO_ADDR_W = (ulong) this->IO_ADDR_W;
+
+	IO_ADDR_W &= ~(MASK_ALE|MASK_CLE);
+	switch (cmd) {
+	case NAND_CTL_SETCLE:
+		IO_ADDR_W |= MASK_CLE;
+		break;
+	case NAND_CTL_SETALE:
+		IO_ADDR_W |= MASK_ALE;
+		break;
+	case NAND_CTL_CLRNCE:
+		at91_set_gpio_value(AT91_PIN_PB6, 1);
+		break;
+	case NAND_CTL_SETNCE:
+		at91_set_gpio_value(AT91_PIN_PB6, 0);
+		break;
+	}
+	this->IO_ADDR_W = (void *) IO_ADDR_W;
+}
+
+static int at91sam9rlek_nand_ready(struct mtd_info *mtd)
+{
+	return at91_get_gpio_value(AT91_PIN_PD17);
+}
+
+int board_nand_init(struct nand_chip *nand)
+{
+	nand->eccmode = NAND_ECC_SOFT;
+#ifdef CFG_NAND_DBW_16
+	nand->options = NAND_BUSWIDTH_16;
+#endif
+	nand->hwcontrol = at91sam9rlek_nand_hwcontrol;
+	nand->dev_ready = at91sam9rlek_nand_ready;
+	nand->chip_delay = 20;
+
+	return 0;
+}
diff --git a/board/atmel/at91sam9rlek/partition.c b/board/atmel/at91sam9rlek/partition.c
new file mode 100644
index 0000000..eb1a724
--- /dev/null
+++ b/board/atmel/at91sam9rlek/partition.c
@@ -0,0 +1,39 @@
+/*
+ * (C) Copyright 2008
+ * Ulf Samuelsson <ulf@atmel.com>
+ *
+ * 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 <common.h>
+#include <config.h>
+#include <asm/hardware.h>
+#include <dataflash.h>
+
+AT91S_DATAFLASH_INFO dataflash_info[CFG_MAX_DATAFLASH_BANKS];
+
+struct dataflash_addr cs[CFG_MAX_DATAFLASH_BANKS] = {
+	{CFG_DATAFLASH_LOGIC_ADDR_CS0, 0},	/* Logical adress, CS */
+};
+
+/*define the area offsets*/
+dataflash_protect_t area_list[NB_DATAFLASH_AREA] = {
+	{0x00000000, 0x000041FF, FLAG_PROTECT_SET,   0, "Bootstrap"},
+	{0x00004200, 0x000083FF, FLAG_PROTECT_CLEAR, 0, "Environment"},
+	{0x00008400, 0x00041FFF, FLAG_PROTECT_SET,   0, "U-Boot"},
+	{0x00042000, 0x00251FFF, FLAG_PROTECT_CLEAR, 0,	"Kernel"},
+	{0x00252000, 0xFFFFFFFF, FLAG_PROTECT_CLEAR, 0,	"FS"},
+};
diff --git a/include/asm-arm/arch-at91sam9/at91sam9rl.h b/include/asm-arm/arch-at91sam9/at91sam9rl.h
new file mode 100644
index 0000000..215bbc8
--- /dev/null
+++ b/include/asm-arm/arch-at91sam9/at91sam9rl.h
@@ -0,0 +1,115 @@
+/*
+ * [origin: Linux kernel include/asm-arm/arch-at91/at91sam9rl.h]
+ *
+ *  Copyright (C) 2007 Atmel Corporation
+ *
+ * Common definitions.
+ * Based on AT91SAM9RL datasheet revision A. (Preliminary)
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file COPYING in the main directory of this archive for
+ * more details.
+ */
+
+#ifndef AT91SAM9RL_H
+#define AT91SAM9RL_H
+
+/*
+ * Peripheral identifiers/interrupts.
+ */
+#define AT91_ID_FIQ		0	/* Advanced Interrupt Controller (FIQ) */
+#define AT91_ID_SYS		1	/* System Controller */
+#define AT91SAM9RL_ID_PIOA	2	/* Parallel IO Controller A */
+#define AT91SAM9RL_ID_PIOB	3	/* Parallel IO Controller B */
+#define AT91SAM9RL_ID_PIOC	4	/* Parallel IO Controller C */
+#define AT91SAM9RL_ID_PIOD	5	/* Parallel IO Controller D */
+#define AT91SAM9RL_ID_US0	6	/* USART 0 */
+#define AT91SAM9RL_ID_US1	7	/* USART 1 */
+#define AT91SAM9RL_ID_US2	8	/* USART 2 */
+#define AT91SAM9RL_ID_US3	9	/* USART 3 */
+#define AT91SAM9RL_ID_MCI	10	/* Multimedia Card Interface */
+#define AT91SAM9RL_ID_TWI0	11	/* TWI 0 */
+#define AT91SAM9RL_ID_TWI1	12	/* TWI 1 */
+#define AT91SAM9RL_ID_SPI	13	/* Serial Peripheral Interface */
+#define AT91SAM9RL_ID_SSC0	14	/* Serial Synchronous Controller 0 */
+#define AT91SAM9RL_ID_SSC1	15	/* Serial Synchronous Controller 1 */
+#define AT91SAM9RL_ID_TC0	16	/* Timer Counter 0 */
+#define AT91SAM9RL_ID_TC1	17	/* Timer Counter 1 */
+#define AT91SAM9RL_ID_TC2	18	/* Timer Counter 2 */
+#define AT91SAM9RL_ID_PWMC	19	/* Pulse Width Modulation Controller */
+#define AT91SAM9RL_ID_TSC	20	/* Touch Screen Controller */
+#define AT91SAM9RL_ID_DMA	21	/* DMA Controller */
+#define AT91SAM9RL_ID_UDPHS	22	/* USB Device HS */
+#define AT91SAM9RL_ID_LCDC	23	/* LCD Controller */
+#define AT91SAM9RL_ID_AC97C	24	/* AC97 Controller */
+#define AT91SAM9RL_ID_IRQ0	31	/* Advanced Interrupt Controller (IRQ0) */
+
+
+/*
+ * User Peripheral physical base addresses.
+ */
+#define AT91SAM9RL_BASE_TCB0	0xfffa0000
+#define AT91SAM9RL_BASE_TC0	0xfffa0000
+#define AT91SAM9RL_BASE_TC1	0xfffa0040
+#define AT91SAM9RL_BASE_TC2	0xfffa0080
+#define AT91SAM9RL_BASE_MCI	0xfffa4000
+#define AT91SAM9RL_BASE_TWI0	0xfffa8000
+#define AT91SAM9RL_BASE_TWI1	0xfffac000
+#define AT91SAM9RL_BASE_US0	0xfffb0000
+#define AT91SAM9RL_BASE_US1	0xfffb4000
+#define AT91SAM9RL_BASE_US2	0xfffb8000
+#define AT91SAM9RL_BASE_US3	0xfffbc000
+#define AT91SAM9RL_BASE_SSC0	0xfffc0000
+#define AT91SAM9RL_BASE_SSC1	0xfffc4000
+#define AT91SAM9RL_BASE_PWMC	0xfffc8000
+#define AT91SAM9RL_BASE_SPI	0xfffcc000
+#define AT91SAM9RL_BASE_TSC	0xfffd0000
+#define AT91SAM9RL_BASE_UDPHS	0xfffd4000
+#define AT91SAM9RL_BASE_AC97C	0xfffd8000
+#define AT91_BASE_SYS		0xffffc000
+
+
+/*
+ * System Peripherals (offset from AT91_BASE_SYS)
+ */
+#define AT91_DMA	(0xffffe600 - AT91_BASE_SYS)
+#define AT91_ECC	(0xffffe800 - AT91_BASE_SYS)
+#define AT91_SDRAMC	(0xffffea00 - AT91_BASE_SYS)
+#define AT91_SMC	(0xffffec00 - AT91_BASE_SYS)
+#define AT91_MATRIX	(0xffffee00 - AT91_BASE_SYS)
+#define AT91_CCFG	(0xffffef10 - AT91_BASE_SYS)
+#define AT91_AIC	(0xfffff000 - AT91_BASE_SYS)
+#define AT91_DBGU	(0xfffff200 - AT91_BASE_SYS)
+#define AT91_PIOA	(0xfffff400 - AT91_BASE_SYS)
+#define AT91_PIOB	(0xfffff600 - AT91_BASE_SYS)
+#define AT91_PIOC	(0xfffff800 - AT91_BASE_SYS)
+#define AT91_PIOD	(0xfffffa00 - AT91_BASE_SYS)
+#define AT91_PMC	(0xfffffc00 - AT91_BASE_SYS)
+#define AT91_RSTC	(0xfffffd00 - AT91_BASE_SYS)
+#define AT91_SHDWC	(0xfffffd10 - AT91_BASE_SYS)
+#define AT91_RTT	(0xfffffd20 - AT91_BASE_SYS)
+#define AT91_PIT	(0xfffffd30 - AT91_BASE_SYS)
+#define AT91_WDT	(0xfffffd40 - AT91_BASE_SYS)
+#define AT91_SCKCR	(0xfffffd50 - AT91_BASE_SYS)
+#define AT91_GPBR	(0xfffffd60 - AT91_BASE_SYS)
+#define AT91_RTC	(0xfffffe00 - AT91_BASE_SYS)
+
+#define AT91_USART0	AT91SAM9RL_BASE_US0
+#define AT91_USART1	AT91SAM9RL_BASE_US1
+#define AT91_USART2	AT91SAM9RL_BASE_US2
+#define AT91_USART3	AT91SAM9RL_BASE_US3
+
+
+/*
+ * Internal Memory.
+ */
+#define AT91SAM9RL_SRAM_BASE	0x00300000	/* Internal SRAM base address */
+#define AT91SAM9RL_SRAM_SIZE	SZ_16K		/* Internal SRAM size (16Kb) */
+
+#define AT91SAM9RL_ROM_BASE	0x00400000	/* Internal ROM base address */
+#define AT91SAM9RL_ROM_SIZE	(2 * SZ_16K)	/* Internal ROM size (32Kb) */
+
+#define AT91SAM9RL_LCDC_BASE	0x00500000	/* LCD Controller */
+#define AT91SAM9RL_UDPHS_BASE	0x00600000	/* USB Device HS controller */
+
+#endif
diff --git a/include/asm-arm/arch-at91sam9/at91sam9rl_matrix.h b/include/asm-arm/arch-at91sam9/at91sam9rl_matrix.h
new file mode 100644
index 0000000..af8d914
--- /dev/null
+++ b/include/asm-arm/arch-at91sam9/at91sam9rl_matrix.h
@@ -0,0 +1,96 @@
+/*
+ * [origin: Linux kernel include/asm-arm/arch-at91/at91sam9rl_matrix.h]
+ *
+ *  Copyright (C) 2007 Atmel Corporation
+ *
+ * Memory Controllers (MATRIX, EBI) - System peripherals registers.
+ * Based on AT91SAM9RL datasheet revision A. (Preliminary)
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file COPYING in the main directory of this archive for
+ * more details.
+ */
+
+#ifndef AT91SAM9RL_MATRIX_H
+#define AT91SAM9RL_MATRIX_H
+
+#define AT91_MATRIX_MCFG0	(AT91_MATRIX + 0x00)	/* Master Configuration Register 0 */
+#define AT91_MATRIX_MCFG1	(AT91_MATRIX + 0x04)	/* Master Configuration Register 1 */
+#define AT91_MATRIX_MCFG2	(AT91_MATRIX + 0x08)	/* Master Configuration Register 2 */
+#define AT91_MATRIX_MCFG3	(AT91_MATRIX + 0x0C)	/* Master Configuration Register 3 */
+#define AT91_MATRIX_MCFG4	(AT91_MATRIX + 0x10)	/* Master Configuration Register 4 */
+#define AT91_MATRIX_MCFG5	(AT91_MATRIX + 0x14)	/* Master Configuration Register 5 */
+#define		AT91_MATRIX_ULBT	(7 << 0)	/* Undefined Length Burst Type */
+#define			AT91_MATRIX_ULBT_INFINITE	(0 << 0)
+#define			AT91_MATRIX_ULBT_SINGLE		(1 << 0)
+#define			AT91_MATRIX_ULBT_FOUR		(2 << 0)
+#define			AT91_MATRIX_ULBT_EIGHT		(3 << 0)
+#define			AT91_MATRIX_ULBT_SIXTEEN	(4 << 0)
+
+#define AT91_MATRIX_SCFG0	(AT91_MATRIX + 0x40)	/* Slave Configuration Register 0 */
+#define AT91_MATRIX_SCFG1	(AT91_MATRIX + 0x44)	/* Slave Configuration Register 1 */
+#define AT91_MATRIX_SCFG2	(AT91_MATRIX + 0x48)	/* Slave Configuration Register 2 */
+#define AT91_MATRIX_SCFG3	(AT91_MATRIX + 0x4C)	/* Slave Configuration Register 3 */
+#define AT91_MATRIX_SCFG4	(AT91_MATRIX + 0x50)	/* Slave Configuration Register 4 */
+#define AT91_MATRIX_SCFG5	(AT91_MATRIX + 0x54)	/* Slave Configuration Register 5 */
+#define		AT91_MATRIX_SLOT_CYCLE		(0xff << 0)	/* Maximum Number of Allowed Cycles for a Burst */
+#define		AT91_MATRIX_DEFMSTR_TYPE	(3    << 16)	/* Default Master Type */
+#define			AT91_MATRIX_DEFMSTR_TYPE_NONE	(0 << 16)
+#define			AT91_MATRIX_DEFMSTR_TYPE_LAST	(1 << 16)
+#define			AT91_MATRIX_DEFMSTR_TYPE_FIXED	(2 << 16)
+#define		AT91_MATRIX_FIXED_DEFMSTR	(0xf  << 18)	/* Fixed Index of Default Master */
+#define		AT91_MATRIX_ARBT		(3    << 24)	/* Arbitration Type */
+#define			AT91_MATRIX_ARBT_ROUND_ROBIN	(0 << 24)
+#define			AT91_MATRIX_ARBT_FIXED_PRIORITY	(1 << 24)
+
+#define AT91_MATRIX_PRAS0	(AT91_MATRIX + 0x80)	/* Priority Register A for Slave 0 */
+#define AT91_MATRIX_PRAS1	(AT91_MATRIX + 0x88)	/* Priority Register A for Slave 1 */
+#define AT91_MATRIX_PRAS2	(AT91_MATRIX + 0x90)	/* Priority Register A for Slave 2 */
+#define AT91_MATRIX_PRAS3	(AT91_MATRIX + 0x98)	/* Priority Register A for Slave 3 */
+#define AT91_MATRIX_PRAS4	(AT91_MATRIX + 0xA0)	/* Priority Register A for Slave 4 */
+#define AT91_MATRIX_PRAS5	(AT91_MATRIX + 0xA8)	/* Priority Register A for Slave 5 */
+#define		AT91_MATRIX_M0PR		(3 << 0)	/* Master 0 Priority */
+#define		AT91_MATRIX_M1PR		(3 << 4)	/* Master 1 Priority */
+#define		AT91_MATRIX_M2PR		(3 << 8)	/* Master 2 Priority */
+#define		AT91_MATRIX_M3PR		(3 << 12)	/* Master 3 Priority */
+#define		AT91_MATRIX_M4PR		(3 << 16)	/* Master 4 Priority */
+#define		AT91_MATRIX_M5PR		(3 << 20)	/* Master 5 Priority */
+
+#define AT91_MATRIX_MRCR	(AT91_MATRIX + 0x100)	/* Master Remap Control Register */
+#define		AT91_MATRIX_RCB0		(1 << 0)	/* Remap Command for AHB Master 0 (ARM926EJ-S Instruction Master) */
+#define		AT91_MATRIX_RCB1		(1 << 1)	/* Remap Command for AHB Master 1 (ARM926EJ-S Data Master) */
+#define		AT91_MATRIX_RCB2		(1 << 2)
+#define		AT91_MATRIX_RCB3		(1 << 3)
+#define		AT91_MATRIX_RCB4		(1 << 4)
+#define		AT91_MATRIX_RCB5		(1 << 5)
+
+#define AT91_MATRIX_TCMR	(AT91_MATRIX + 0x114)	/* TCM Configuration Register */
+#define		AT91_MATRIX_ITCM_SIZE		(0xf << 0)	/* Size of ITCM enabled memory block */
+#define			AT91_MATRIX_ITCM_0		(0 << 0)
+#define			AT91_MATRIX_ITCM_16		(5 << 0)
+#define			AT91_MATRIX_ITCM_32		(6 << 0)
+#define		AT91_MATRIX_DTCM_SIZE		(0xf << 4)	/* Size of DTCM enabled memory block */
+#define			AT91_MATRIX_DTCM_0		(0 << 4)
+#define			AT91_MATRIX_DTCM_16		(5 << 4)
+#define			AT91_MATRIX_DTCM_32		(6 << 4)
+
+#define AT91_MATRIX_EBICSA	(AT91_MATRIX + 0x120)	/* EBI0 Chip Select Assignment Register */
+#define		AT91_MATRIX_CS1A		(1 << 1)	/* Chip Select 1 Assignment */
+#define			AT91_MATRIX_CS1A_SMC		(0 << 1)
+#define			AT91_MATRIX_CS1A_SDRAMC		(1 << 1)
+#define		AT91_MATRIX_CS3A		(1 << 3)	/* Chip Select 3 Assignment */
+#define			AT91_MATRIX_CS3A_SMC		(0 << 3)
+#define			AT91_MATRIX_CS3A_SMC_SMARTMEDIA	(1 << 3)
+#define		AT91_MATRIX_CS4A		(1 << 4)	/* Chip Select 4 Assignment */
+#define			AT91_MATRIX_CS4A_SMC		(0 << 4)
+#define			AT91_MATRIX_CS4A_SMC_CF1	(1 << 4)
+#define		AT91_MATRIX_CS5A		(1 << 5)	/* Chip Select 5 Assignment */
+#define			AT91_MATRIX_CS5A_SMC		(0 << 5)
+#define			AT91_MATRIX_CS5A_SMC_CF2	(1 << 5)
+#define		AT91_MATRIX_DBPUC		(1 << 8)	/* Data Bus Pull-up Configuration */
+#define		AT91_MATRIX_VDDIOMSEL		(1 << 16)	/* Memory voltage selection */
+#define			AT91_MATRIX_VDDIOMSEL_1_8V	(0 << 16)
+#define			AT91_MATRIX_VDDIOMSEL_3_3V	(1 << 16)
+
+
+#endif
diff --git a/include/asm-arm/arch-at91sam9/hardware.h b/include/asm-arm/arch-at91sam9/hardware.h
index 13c85af..e7c572d 100644
--- a/include/asm-arm/arch-at91sam9/hardware.h
+++ b/include/asm-arm/arch-at91sam9/hardware.h
@@ -37,6 +37,8 @@
 #define AT91_PMC_UHP	AT91SAM926x_PMC_UHP
 #elif defined(CONFIG_AT91SAM9RL)
 #include <asm/arch/at91sam9rl.h>
+#define AT91_BASE_SPI	AT91SAM9RL_BASE_SPI
+#define AT91_ID_UHP	AT91SAM9RL_ID_UHP
 #elif defined(CONFIG_AT91CAP9)
 #include <asm/arch/at91cap9.h>
 #define AT91_BASE_EMAC	AT91CAP9_BASE_EMAC
diff --git a/include/configs/at91sam9rlek.h b/include/configs/at91sam9rlek.h
new file mode 100644
index 0000000..773f954
--- /dev/null
+++ b/include/configs/at91sam9rlek.h
@@ -0,0 +1,164 @@
+/*
+ * (C) Copyright 2007-2008
+ * Stelian Pop <stelian.pop@leadtechdesign.com>
+ * Lead Tech Design <www.leadtechdesign.com>
+ *
+ * Configuation settings for the AT91SAM9RLEK board.
+ *
+ * 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
+ */
+
+#ifndef __CONFIG_H
+#define __CONFIG_H
+
+/* ARM asynchronous clock */
+#define AT91_MAIN_CLOCK		200000000	/* from 12.000 MHz crystal */
+#define AT91_MASTER_CLOCK	100000000	/* peripheral = main / 2 */
+#define CFG_HZ			1000000		/* 1us resolution */
+
+#define AT91_SLOW_CLOCK		32768	/* slow clock */
+
+#define CONFIG_ARM926EJS	1	/* This is an ARM926EJS Core	*/
+#define CONFIG_AT91SAM9RL	1	/* It's an Atmel AT91SAM9RL SoC*/
+#define CONFIG_AT91SAM9RLEK	1	/* on an AT91SAM9RLEK Board	*/
+#undef CONFIG_USE_IRQ			/* we don't need IRQ/FIQ stuff	*/
+
+#define CONFIG_CMDLINE_TAG	1	/* enable passing of ATAGs	*/
+#define CONFIG_SETUP_MEMORY_TAGS 1
+#define CONFIG_INITRD_TAG	1
+
+#define CONFIG_SKIP_LOWLEVEL_INIT
+#define CONFIG_SKIP_RELOCATE_UBOOT
+
+/*
+ * Hardware drivers
+ */
+#define CONFIG_ATMEL_USART	1
+#undef CONFIG_USART0
+#undef CONFIG_USART1
+#undef CONFIG_USART2
+#define CONFIG_USART3		1	/* USART 3 is DBGU */
+
+#define CONFIG_BOOTDELAY	3
+
+/* #define CONFIG_ENV_OVERWRITE	1 */
+
+/*
+ * Command line configuration.
+ */
+#include <config_cmd_default.h>
+#undef CONFIG_CMD_BDI
+#undef CONFIG_CMD_IMI
+#undef CONFIG_CMD_AUTOSCRIPT
+#undef CONFIG_CMD_FPGA
+#undef CONFIG_CMD_LOADS
+#undef CONFIG_CMD_IMLS
+#undef CONFIG_CMD_NET
+#undef CONFIG_CMD_USB
+
+#define CONFIG_CMD_NAND		1
+
+/* SDRAM */
+#define CONFIG_NR_DRAM_BANKS		1
+#define PHYS_SDRAM			0x20000000
+#define PHYS_SDRAM_SIZE			0x04000000	/* 64 megs */
+
+/* DataFlash */
+#define CONFIG_HAS_DATAFLASH		1
+#define CFG_SPI_WRITE_TOUT		(5*CFG_HZ)
+#define CFG_MAX_DATAFLASH_BANKS		1
+#define CFG_DATAFLASH_LOGIC_ADDR_CS0	0xC0000000	/* CS0 */
+#define AT91_SPI_CLK			15000000
+#define DATAFLASH_TCSS			(0x1a << 16)
+#define DATAFLASH_TCHS			(0x1 << 24)
+
+/* NOR flash - not present */
+#define CFG_NO_FLASH			1
+
+/* NAND flash */
+#define NAND_MAX_CHIPS			1
+#define CFG_MAX_NAND_DEVICE		1
+#define CFG_NAND_BASE			0x40000000
+#define CFG_NAND_DBW_8			1
+
+/* Ethernet - not present */
+
+/* USB - not supported */
+
+#define CFG_LOAD_ADDR			0x22000000	/* load address */
+
+#define CFG_MEMTEST_START		PHYS_SDRAM
+#define CFG_MEMTEST_END			0x23e00000
+
+#define CFG_USE_DATAFLASH		1
+#undef CFG_USE_NANDFLASH
+
+#ifdef CFG_USE_DATAFLASH
+
+/* bootstrap + u-boot + env + linux in dataflash on CS0 */
+#define CFG_ENV_IS_IN_DATAFLASH	1
+#define CFG_MONITOR_BASE	(CFG_DATAFLASH_LOGIC_ADDR_CS0 + 0x8400)
+#define CFG_ENV_OFFSET		0x4200
+#define CFG_ENV_ADDR		(CFG_DATAFLASH_LOGIC_ADDR_CS0 + CFG_ENV_OFFSET)
+#define CFG_ENV_SIZE		0x4200
+#define CONFIG_BOOTCOMMAND	"cp.b 0xC0042000 0x22000000 0x210000; bootm"
+#define CONFIG_BOOTARGS		"console=ttyS0,115200 " \
+				"root=/dev/mtdblock0 " \
+				"mtdparts=at91_nand:-(root) "\
+				"rw rootfstype=jffs2"
+
+#else /* CFG_USE_NANDFLASH */
+
+/* bootstrap + u-boot + env + linux in nandflash */
+#define CFG_ENV_IS_IN_NAND	1
+#define CFG_ENV_OFFSET		0x60000
+#define CFG_ENV_OFFSET_REDUND	0x80000
+#define CFG_ENV_SIZE		0x20000		/* 1 sector = 128 kB */
+#define CONFIG_BOOTCOMMAND	"nand read 0x22000000 0xA0000 0x200000; bootm"
+#define CONFIG_BOOTARGS		"console=ttyS0,115200 " \
+				"root=/dev/mtdblock5 " \
+				"mtdparts=at91_nand:128k(bootstrap)ro,256k(uboot)ro,128k(env1)ro,128k(env2)ro,2M(linux),-(root) " \
+				"rw rootfstype=jffs2"
+
+#endif
+
+#define CONFIG_BAUDRATE		115200
+#define CFG_BAUDRATE_TABLE	{115200 , 19200, 38400, 57600, 9600 }
+
+#define CFG_PROMPT		"U-Boot> "
+#define CFG_CBSIZE		256
+#define CFG_MAXARGS		16
+#define CFG_PBSIZE		(CFG_CBSIZE + sizeof(CFG_PROMPT) + 16)
+#define CFG_LONGHELP		1
+#define CONFIG_CMDLINE_EDITING	1
+
+#define ROUND(A, B)		(((A) + (B)) & ~((B) - 1))
+/*
+ * Size of malloc() pool
+ */
+#define CFG_MALLOC_LEN		ROUND(3 * CFG_ENV_SIZE + 128*1024, 0x1000)
+#define CFG_GBL_DATA_SIZE	128	/* 128 bytes for initial data */
+
+#define CONFIG_STACKSIZE	(32*1024)	/* regular stack */
+
+#ifdef CONFIG_USE_IRQ
+#error CONFIG_USE_IRQ not supported
+#endif
+
+#endif
-- 
1.5.3.3

^ permalink raw reply related	[flat|nested] 54+ messages in thread

* [U-Boot-Users] [PATCH 18/26] Make nand_init() return the detected NAND size
  2008-05-08 20:52 [U-Boot-Users] [PATCH v2 ARM/AT91 0/26] AT91SAM/CAP patches for U-Boot 1.3.4 Stelian Pop
                   ` (16 preceding siblings ...)
  2008-05-08 20:52 ` [U-Boot-Users] [PATCH 17/26] AT91SAM9RLEK support Stelian Pop
@ 2008-05-08 20:52 ` Stelian Pop
  2008-05-22 15:50   ` Scott Wood
  2008-05-08 20:52 ` [U-Boot-Users] [PATCH 19/26] Remember the detected NAND size for later display Stelian Pop
                   ` (9 subsequent siblings)
  27 siblings, 1 reply; 54+ messages in thread
From: Stelian Pop @ 2008-05-08 20:52 UTC (permalink / raw)
  To: u-boot

This patch modifies the nand_init() routine and makes it return the
total detected NAND size, since this information can be useful to the
caller.

Signed-off-by: Stelian Pop <stelian@popies.net>
---
 drivers/mtd/nand/nand.c |    3 ++-
 include/nand.h          |    2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/mtd/nand/nand.c b/drivers/mtd/nand/nand.c
index 27b5792..c5746fe 100644
--- a/drivers/mtd/nand/nand.c
+++ b/drivers/mtd/nand/nand.c
@@ -60,7 +60,7 @@ static void nand_init_chip(struct mtd_info *mtd, struct nand_chip *nand,
 
 }
 
-void nand_init(void)
+ulong nand_init(void)
 {
 	int i;
 	unsigned int size = 0;
@@ -78,6 +78,7 @@ void nand_init(void)
 	 */
 	board_nand_select_device(nand_info[nand_curr_device].priv, nand_curr_device);
 #endif
+	return size;
 }
 
 #endif
diff --git a/include/nand.h b/include/nand.h
index 247d346..8f388c4 100644
--- a/include/nand.h
+++ b/include/nand.h
@@ -32,7 +32,7 @@ typedef struct mtd_info nand_info_t;
 
 extern int nand_curr_device;
 extern nand_info_t nand_info[];
-extern void nand_init(void);
+extern ulong nand_init(void);
 
 static inline int nand_read(nand_info_t *info, off_t ofs, size_t *len, u_char *buf)
 {
-- 
1.5.3.3

^ permalink raw reply related	[flat|nested] 54+ messages in thread

* [U-Boot-Users] [PATCH 19/26] Remember the detected NAND size for later display
  2008-05-08 20:52 [U-Boot-Users] [PATCH v2 ARM/AT91 0/26] AT91SAM/CAP patches for U-Boot 1.3.4 Stelian Pop
                   ` (17 preceding siblings ...)
  2008-05-08 20:52 ` [U-Boot-Users] [PATCH 18/26] Make nand_init() return the detected NAND size Stelian Pop
@ 2008-05-08 20:52 ` Stelian Pop
  2008-05-09 15:00   ` Scott Wood
  2008-05-08 20:52 ` [U-Boot-Users] [PATCH 20/26] Add ATMEL LCD driver Stelian Pop
                   ` (8 subsequent siblings)
  27 siblings, 1 reply; 54+ messages in thread
From: Stelian Pop @ 2008-05-08 20:52 UTC (permalink / raw)
  To: u-boot

This patch adds a field in 'struct bd_info' for saving the detected
NAND size (result of nand_init() routine). This field can be used later
(for example in the lcd driver) to print out detailed information about
the board memories.

Signed-off-by: Stelian Pop <stelian@popies.net>
---
 include/asm-arm/u-boot.h |    3 +++
 lib_arm/board.c          |    6 +++---
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/include/asm-arm/u-boot.h b/include/asm-arm/u-boot.h
index c120312..1a74b7a 100644
--- a/include/asm-arm/u-boot.h
+++ b/include/asm-arm/u-boot.h
@@ -52,6 +52,9 @@ typedef struct bd_info {
     /* second onboard ethernet port */
     unsigned char   bi_enet1addr[6];
 #endif
+#ifdef CONFIG_CMD_NAND
+    ulong		bi_nand_size;
+#endif
 } bd_t;
 
 #define bi_env_data bi_env->data
diff --git a/lib_arm/board.c b/lib_arm/board.c
index 67506b3..5ee5bd4 100644
--- a/lib_arm/board.c
+++ b/lib_arm/board.c
@@ -56,7 +56,7 @@
 DECLARE_GLOBAL_DATA_PTR;
 
 #if defined(CONFIG_CMD_NAND)
-void nand_init (void);
+ulong nand_init (void);
 #endif
 
 #if defined(CONFIG_CMD_ONENAND)
@@ -279,7 +279,7 @@ void start_armboot (void)
 {
 	init_fnc_t **init_fnc_ptr;
 	char *s;
-#ifndef CFG_NO_FLASH
+#if !defined(CFG_NO_FLASH) || defined (CONFIG_VFD) || defined(CONFIG_LCD)
 	ulong size;
 #endif
 #if defined(CONFIG_VFD) || defined(CONFIG_LCD)
@@ -340,7 +340,7 @@ void start_armboot (void)
 
 #if defined(CONFIG_CMD_NAND)
 	puts ("NAND:  ");
-	nand_init();		/* go init the NAND */
+	gd->bd->bi_nand_size = nand_init();	/* go init the NAND */
 #endif
 
 #if defined(CONFIG_CMD_ONENAND)
-- 
1.5.3.3

^ permalink raw reply related	[flat|nested] 54+ messages in thread

* [U-Boot-Users] [PATCH 20/26] Add ATMEL LCD driver
  2008-05-08 20:52 [U-Boot-Users] [PATCH v2 ARM/AT91 0/26] AT91SAM/CAP patches for U-Boot 1.3.4 Stelian Pop
                   ` (18 preceding siblings ...)
  2008-05-08 20:52 ` [U-Boot-Users] [PATCH 19/26] Remember the detected NAND size for later display Stelian Pop
@ 2008-05-08 20:52 ` Stelian Pop
  2008-05-09 10:57   ` Jean-Christophe PLAGNIOL-VILLARD
  2008-05-08 20:52 ` [U-Boot-Users] [PATCH 21/26] AT91CAP9ADK: hook up the " Stelian Pop
                   ` (7 subsequent siblings)
  27 siblings, 1 reply; 54+ messages in thread
From: Stelian Pop @ 2008-05-08 20:52 UTC (permalink / raw)
  To: u-boot

This patch adds support for the ATMEL LCDC driver which is used on some
AT91 and AVR platforms.

Is has been tested with the AT91CAP9ADK, AT91SAM9261EK, AT91SAM9263EK and
AT91SAM9RLEK boards. Adaptation for AVR32 should probably be easy.

Signed-off-by: Stelian Pop <stelian@popies.net>
---
 README                              |    4 +
 common/lcd.c                        |   74 ++++++++++++++-
 drivers/video/Makefile              |    1 +
 drivers/video/atmel_lcdfb.c         |  160 +++++++++++++++++++++++++++++++
 include/asm-arm/arch-at91sam9/clk.h |    6 +
 include/atmel_lcdc.h                |  177 +++++++++++++++++++++++++++++++++++
 include/lcd.h                       |   30 ++++++-
 lib_arm/board.c                     |   37 ++++++--
 8 files changed, 477 insertions(+), 12 deletions(-)
 create mode 100644 drivers/video/atmel_lcdfb.c
 create mode 100644 include/atmel_lcdc.h

diff --git a/README b/README
index 5e2bca4..dca495d 100644
--- a/README
+++ b/README
@@ -962,6 +962,10 @@ The following options need to be configured:
 		display); also select one of the supported displays
 		by defining one of these:
 
+		CONFIG_ATMEL_LCD:
+
+			HITACHI TX09D70VM1CCA, 3.5", 240x320.
+
 		CONFIG_NEC_NL6448AC33:
 
 			NEC NL6448AC33-18. Active, color, single scan.
diff --git a/common/lcd.c b/common/lcd.c
index 914dc2e..faae6db 100644
--- a/common/lcd.c
+++ b/common/lcd.c
@@ -50,6 +50,10 @@
 #include <lcdvideo.h>
 #endif
 
+#if defined(CONFIG_ATMEL_LCD)
+#include <atmel_lcdc.h>
+#endif
+
 #ifdef CONFIG_LCD
 
 /************************************************************************/
@@ -474,14 +478,22 @@ ulong lcd_setmem (ulong addr)
 
 static void lcd_setfgcolor (int color)
 {
+#ifdef CONFIG_ATMEL_LCD
+	lcd_color_fg = color;
+#else
 	lcd_color_fg = color & 0x0F;
+#endif
 }
 
 /*----------------------------------------------------------------------*/
 
 static void lcd_setbgcolor (int color)
 {
+#ifdef CONFIG_ATMEL_LCD
+	lcd_color_bg = color;
+#else
 	lcd_color_bg = color & 0x0F;
+#endif
 }
 
 /*----------------------------------------------------------------------*/
@@ -508,7 +520,11 @@ static int lcd_getbgcolor (void)
 #ifdef CONFIG_LCD_LOGO
 void bitmap_plot (int x, int y)
 {
+#ifdef CONFIG_ATMEL_LCD
+	uint *cmap;
+#else
 	ushort *cmap;
+#endif
 	ushort i, j;
 	uchar *bmap;
 	uchar *fb;
@@ -533,6 +549,8 @@ void bitmap_plot (int x, int y)
 		cmap = (ushort *)fbi->palette;
 #elif defined(CONFIG_MPC823)
 		cmap = (ushort *)&(cp->lcd_cmap[BMP_LOGO_OFFSET*sizeof(ushort)]);
+#elif defined(CONFIG_ATMEL_LCD)
+		cmap = (uint *) (panel_info.mmio + ATMEL_LCDC_LUT(0));
 #endif
 
 		WATCHDOG_RESET();
@@ -540,11 +558,26 @@ void bitmap_plot (int x, int y)
 		/* Set color map */
 		for (i=0; i<(sizeof(bmp_logo_palette)/(sizeof(ushort))); ++i) {
 			ushort colreg = bmp_logo_palette[i];
+#ifdef CONFIG_ATMEL_LCD
+			uint lut_entry;
+#ifdef CONFIG_ATMEL_LCD_BGR555
+			lut_entry = ((colreg & 0x000F) << 11) |
+				    ((colreg & 0x00F0) <<  2) |
+				    ((colreg & 0x0F00) >>  7);
+#else /* CONFIG_ATMEL_LCD_RGB565 */
+			lut_entry = ((colreg & 0x000F) << 1) |
+				    ((colreg & 0x00F0) << 3) |
+				    ((colreg & 0x0F00) << 4);
+#endif
+			*(cmap + BMP_LOGO_OFFSET) = lut_entry;
+			cmap++;
+#else /* !CONFIG_ATMEL_LCD */
 #ifdef  CFG_INVERT_COLORS
 			*cmap++ = 0xffff - colreg;
 #else
 			*cmap++ = colreg;
 #endif
+#endif /* CONFIG_ATMEL_LCD */
 		}
 
 		WATCHDOG_RESET();
@@ -578,7 +611,9 @@ void bitmap_plot (int x, int y)
  */
 int lcd_display_bitmap(ulong bmp_image, int x, int y)
 {
-#if !defined(CONFIG_MCC200)
+#ifdef CONFIG_ATMEL_LCD
+	uint *cmap;
+#elif !defined(CONFIG_MCC200)
 	ushort *cmap;
 #endif
 	ushort i, j;
@@ -633,6 +668,8 @@ int lcd_display_bitmap(ulong bmp_image, int x, int y)
 		cmap = (ushort *)fbi->palette;
 #elif defined(CONFIG_MPC823)
 		cmap = (ushort *)&(cp->lcd_cmap[255*sizeof(ushort)]);
+#elif defined(CONFIG_ATMEL_LCD)
+		cmap = (uint *) (panel_info.mmio + ATMEL_LCDC_LUT(0));
 #else
 # error "Don't know location of color map"
 #endif
@@ -708,6 +745,10 @@ static void *lcd_logo (void)
 #ifdef CONFIG_LCD_INFO
 	char info[80];
 	char temp[32];
+#ifdef CONFIG_ATMEL_LCD
+	int i;
+	ulong dram_size;
+#endif
 #endif /* CONFIG_LCD_INFO */
 
 #ifdef CONFIG_SPLASH_SCREEN
@@ -765,6 +806,37 @@ static void *lcd_logo (void)
 # endif /* CONFIG_LCD_INFO */
 #endif /* CONFIG_MPC823 */
 
+#ifdef CONFIG_ATMEL_LCD
+# ifdef CONFIG_LCD_INFO
+	sprintf (info, "%s", U_BOOT_VERSION);
+	lcd_drawchars (LCD_INFO_X, LCD_INFO_Y, (uchar *)info, strlen(info));
+
+	sprintf (info, "(C) 2008 ATMEL Corp");
+	lcd_drawchars (LCD_INFO_X, LCD_INFO_Y + VIDEO_FONT_HEIGHT,
+					(uchar *)info, strlen(info));
+
+	sprintf (info, "at91support at atmel.com");
+	lcd_drawchars (LCD_INFO_X, LCD_INFO_Y + VIDEO_FONT_HEIGHT * 2,
+					(uchar *)info, strlen(info));
+
+	sprintf (info, "%s CPU at %s MHz",
+		AT91_CPU_NAME,
+		strmhz(temp, AT91_MAIN_CLOCK));
+	lcd_drawchars (LCD_INFO_X, LCD_INFO_Y + VIDEO_FONT_HEIGHT * 3,
+					(uchar *)info, strlen(info));
+
+	dram_size = 0;
+	for(i = 0; i < CONFIG_NR_DRAM_BANKS; i++)
+		dram_size += gd->bd->bi_dram[i].size;
+	sprintf (info, "  %ld MB SDRAM, %ld MB NAND",
+		dram_size >> 20,
+		gd->bd->bi_nand_size >> 20 );
+	lcd_drawchars (LCD_INFO_X, LCD_INFO_Y + VIDEO_FONT_HEIGHT * 4,
+					(uchar *)info, strlen(info));
+# endif /* CONFIG_LCD_INFO */
+#endif /* CONFIG_ATMEL_LCD */
+
+
 #if defined(CONFIG_LCD_LOGO) && !defined(CONFIG_LCD_INFO_BELOW_LOGO)
 	return ((void *)((ulong)lcd_base + BMP_LOGO_HEIGHT * lcd_line_length));
 #else
diff --git a/drivers/video/Makefile b/drivers/video/Makefile
index 0e40f2a..a07ee0e 100644
--- a/drivers/video/Makefile
+++ b/drivers/video/Makefile
@@ -26,6 +26,7 @@ include $(TOPDIR)/config.mk
 LIB 	:= $(obj)libvideo.a
 
 COBJS-y += ati_radeon_fb.o
+COBJS-$(CONFIG_ATMEL_LCD) += atmel_lcdfb.o
 COBJS-y += cfb_console.o
 COBJS-y += ct69000.o
 COBJS-y += mb862xx.o
diff --git a/drivers/video/atmel_lcdfb.c b/drivers/video/atmel_lcdfb.c
new file mode 100644
index 0000000..12157e4
--- /dev/null
+++ b/drivers/video/atmel_lcdfb.c
@@ -0,0 +1,160 @@
+/*
+ * Driver for AT91/AT32 LCD Controller
+ *
+ * Copyright (C) 2007 Atmel Corporation
+ *
+ * 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 <common.h>
+#include <asm/io.h>
+#include <asm/arch/hardware.h>
+#include <asm/arch/gpio.h>
+#include <asm/arch/clk.h>
+#include <lcd.h>
+#include <atmel_lcdc.h>
+
+int lcd_line_length;
+int lcd_color_fg;
+int lcd_color_bg;
+
+void *lcd_base;				/* Start of framebuffer memory	*/
+void *lcd_console_address;		/* Start of console buffer	*/
+
+short console_col;
+short console_row;
+
+/* configurable parameters */
+#define ATMEL_LCDC_CVAL_DEFAULT		0xc8
+#define ATMEL_LCDC_DMA_BURST_LEN	8
+
+#if defined(CONFIG_AT91SAM9263) || defined(CONFIG_AT91CAP9)
+#define ATMEL_LCDC_FIFO_SIZE		2048
+#else
+#define ATMEL_LCDC_FIFO_SIZE		512
+#endif
+
+#define lcdc_readl(mmio, reg)		__raw_readl((mmio)+(reg))
+#define lcdc_writel(mmio, reg, val)	__raw_writel((val), (mmio)+(reg))
+
+void lcd_setcolreg (ushort regno, ushort red, ushort green, ushort blue)
+{
+#if defined(CONFIG_ATMEL_LCD_BGR555)
+	lcdc_writel(panel_info.mmio, ATMEL_LCDC_LUT(regno),
+		    (red >> 3) | ((green & 0xf8) << 2) | ((blue & 0xf8) << 7));
+#else
+	lcdc_writel(panel_info.mmio, ATMEL_LCDC_LUT(regno),
+		    (blue >> 3) | ((green & 0xfc) << 3) | ((red & 0xf8) << 8));
+#endif
+}
+
+void lcd_ctrl_init(void *lcdbase)
+{
+	unsigned long value;
+
+	/* Turn off the LCD controller and the DMA controller */
+	lcdc_writel(panel_info.mmio, ATMEL_LCDC_PWRCON,
+		    1 << ATMEL_LCDC_GUARDT_OFFSET);
+
+	/* Wait for the LCDC core to become idle */
+	while (lcdc_readl(panel_info.mmio, ATMEL_LCDC_PWRCON) & ATMEL_LCDC_BUSY)
+		udelay(10);
+
+	lcdc_writel(panel_info.mmio, ATMEL_LCDC_DMACON, 0);
+
+	/* Reset LCDC DMA */
+	lcdc_writel(panel_info.mmio, ATMEL_LCDC_DMACON, ATMEL_LCDC_DMARST);
+
+	/* ...set frame size and burst length = 8 words (?) */
+	value = (panel_info.vl_col * panel_info.vl_row *
+		 NBITS(panel_info.vl_bpix)) / 32;
+	value |= ((ATMEL_LCDC_DMA_BURST_LEN - 1) << ATMEL_LCDC_BLENGTH_OFFSET);
+	lcdc_writel(panel_info.mmio, ATMEL_LCDC_DMAFRMCFG, value);
+
+	/* Set pixel clock */
+	value = get_lcdc_clk_rate(0) / panel_info.vl_clk;
+	if (get_lcdc_clk_rate(0) % panel_info.vl_clk)
+		value++;
+	value = (value / 2) - 1;
+
+	if (!value) {
+		lcdc_writel(panel_info.mmio, ATMEL_LCDC_LCDCON1, ATMEL_LCDC_BYPASS);
+	} else
+		lcdc_writel(panel_info.mmio, ATMEL_LCDC_LCDCON1,
+			    value << ATMEL_LCDC_CLKVAL_OFFSET);
+
+	/* Initialize control register 2 */
+	value = ATMEL_LCDC_MEMOR_LITTLE | ATMEL_LCDC_CLKMOD_ALWAYSACTIVE;
+	if (panel_info.vl_tft)
+		value |= ATMEL_LCDC_DISTYPE_TFT;
+
+	if (!(panel_info.vl_sync & ATMEL_LCDC_INVLINE_INVERTED))
+		value |= ATMEL_LCDC_INVLINE_INVERTED;
+	if (!(panel_info.vl_sync & ATMEL_LCDC_INVFRAME_INVERTED))
+		value |= ATMEL_LCDC_INVFRAME_INVERTED;
+	value |= (panel_info.vl_bpix << 5);
+	lcdc_writel(panel_info.mmio, ATMEL_LCDC_LCDCON2, value);
+
+	/* Vertical timing */
+	value = (panel_info.vl_vsync_len - 1) << ATMEL_LCDC_VPW_OFFSET;
+	value |= panel_info.vl_upper_margin << ATMEL_LCDC_VBP_OFFSET;
+	value |= panel_info.vl_lower_margin;
+	lcdc_writel(panel_info.mmio, ATMEL_LCDC_TIM1, value);
+
+	/* Horizontal timing */
+	value = (panel_info.vl_right_margin - 1) << ATMEL_LCDC_HFP_OFFSET;
+	value |= (panel_info.vl_hsync_len - 1) << ATMEL_LCDC_HPW_OFFSET;
+	value |= (panel_info.vl_left_margin - 1);
+	lcdc_writel(panel_info.mmio, ATMEL_LCDC_TIM2, value);
+
+	/* Display size */
+	value = (panel_info.vl_col - 1) << ATMEL_LCDC_HOZVAL_OFFSET;
+	value |= panel_info.vl_row - 1;
+	lcdc_writel(panel_info.mmio, ATMEL_LCDC_LCDFRMCFG, value);
+
+	/* FIFO Threshold: Use formula from data sheet */
+	value = ATMEL_LCDC_FIFO_SIZE - (2 * ATMEL_LCDC_DMA_BURST_LEN + 3);
+	lcdc_writel(panel_info.mmio, ATMEL_LCDC_FIFO, value);
+
+	/* Toggle LCD_MODE every frame */
+	lcdc_writel(panel_info.mmio, ATMEL_LCDC_MVAL, 0);
+
+	/* Disable all interrupts */
+	lcdc_writel(panel_info.mmio, ATMEL_LCDC_IDR, ~0UL);
+
+	/* Set contrast */
+	value = ATMEL_LCDC_PS_DIV8 |
+		ATMEL_LCDC_POL_POSITIVE |
+		ATMEL_LCDC_ENA_PWMENABLE;
+	lcdc_writel(panel_info.mmio, ATMEL_LCDC_CONTRAST_CTR, value);
+	lcdc_writel(panel_info.mmio, ATMEL_LCDC_CONTRAST_VAL, ATMEL_LCDC_CVAL_DEFAULT);
+
+	/* Set framebuffer DMA base address and pixel offset */
+	lcdc_writel(panel_info.mmio, ATMEL_LCDC_DMABADDR1, (u_long)lcdbase);
+
+	lcdc_writel(panel_info.mmio, ATMEL_LCDC_DMACON, ATMEL_LCDC_DMAEN);
+	lcdc_writel(panel_info.mmio, ATMEL_LCDC_PWRCON,
+		    (1 << ATMEL_LCDC_GUARDT_OFFSET) | ATMEL_LCDC_PWR);
+}
+
+ulong calc_fbsize (void)
+{
+	return ((panel_info.vl_col * panel_info.vl_row *
+		NBITS(panel_info.vl_bpix)) / 8) + PAGE_SIZE;
+}
diff --git a/include/asm-arm/arch-at91sam9/clk.h b/include/asm-arm/arch-at91sam9/clk.h
index f67b435..1b502c8 100644
--- a/include/asm-arm/arch-at91sam9/clk.h
+++ b/include/asm-arm/arch-at91sam9/clk.h
@@ -36,4 +36,10 @@ static inline unsigned long get_usart_clk_rate(unsigned int dev_id)
 	return AT91_MASTER_CLOCK;
 }
 
+static inline unsigned long get_lcdc_clk_rate(unsigned int dev_id)
+{
+	return AT91_MASTER_CLOCK;
+}
+
+
 #endif /* __ASM_ARM_ARCH_CLK_H__ */
diff --git a/include/atmel_lcdc.h b/include/atmel_lcdc.h
new file mode 100644
index 0000000..73dd8f7
--- /dev/null
+++ b/include/atmel_lcdc.h
@@ -0,0 +1,177 @@
+/*
+ *  Header file for AT91/AT32 LCD Controller
+ *
+ *  Data structure and register user interface
+ *
+ *  Copyright (C) 2007 Atmel Corporation
+ *
+ * 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
+ */
+#ifndef __ATMEL_LCDC_H__
+#define __ATMEL_LCDC_H__
+
+#define ATMEL_LCDC_DMABADDR1	0x00
+#define ATMEL_LCDC_DMABADDR2	0x04
+#define ATMEL_LCDC_DMAFRMPT1	0x08
+#define ATMEL_LCDC_DMAFRMPT2	0x0c
+#define ATMEL_LCDC_DMAFRMADD1	0x10
+#define ATMEL_LCDC_DMAFRMADD2	0x14
+
+#define ATMEL_LCDC_DMAFRMCFG	0x18
+#define	ATMEL_LCDC_FRSIZE	(0x7fffff <<  0)
+#define	ATMEL_LCDC_BLENGTH_OFFSET	24
+#define	ATMEL_LCDC_BLENGTH	(0x7f     << ATMEL_LCDC_BLENGTH_OFFSET)
+
+#define ATMEL_LCDC_DMACON	0x1c
+#define	ATMEL_LCDC_DMAEN	(0x1 << 0)
+#define	ATMEL_LCDC_DMARST	(0x1 << 1)
+#define	ATMEL_LCDC_DMABUSY	(0x1 << 2)
+#define		ATMEL_LCDC_DMAUPDT	(0x1 << 3)
+#define		ATMEL_LCDC_DMA2DEN	(0x1 << 4)
+
+#define ATMEL_LCDC_DMA2DCFG	0x20
+#define		ATMEL_LCDC_ADDRINC_OFFSET	0
+#define		ATMEL_LCDC_ADDRINC		(0xffff)
+#define		ATMEL_LCDC_PIXELOFF_OFFSET	24
+#define		ATMEL_LCDC_PIXELOFF		(0x1f << 24)
+
+#define ATMEL_LCDC_LCDCON1	0x0800
+#define	ATMEL_LCDC_BYPASS	(1     <<  0)
+#define	ATMEL_LCDC_CLKVAL_OFFSET	12
+#define	ATMEL_LCDC_CLKVAL	(0x1ff << ATMEL_LCDC_CLKVAL_OFFSET)
+#define	ATMEL_LCDC_LINCNT	(0x7ff << 21)
+
+#define ATMEL_LCDC_LCDCON2	0x0804
+#define	ATMEL_LCDC_DISTYPE	(3 << 0)
+#define		ATMEL_LCDC_DISTYPE_STNMONO	(0 << 0)
+#define		ATMEL_LCDC_DISTYPE_STNCOLOR	(1 << 0)
+#define		ATMEL_LCDC_DISTYPE_TFT		(2 << 0)
+#define	ATMEL_LCDC_SCANMOD	(1 << 2)
+#define		ATMEL_LCDC_SCANMOD_SINGLE	(0 << 2)
+#define		ATMEL_LCDC_SCANMOD_DUAL		(1 << 2)
+#define	ATMEL_LCDC_IFWIDTH	(3 << 3)
+#define		ATMEL_LCDC_IFWIDTH_4		(0 << 3)
+#define		ATMEL_LCDC_IFWIDTH_8		(1 << 3)
+#define		ATMEL_LCDC_IFWIDTH_16		(2 << 3)
+#define	ATMEL_LCDC_PIXELSIZE	(7 << 5)
+#define		ATMEL_LCDC_PIXELSIZE_1		(0 << 5)
+#define		ATMEL_LCDC_PIXELSIZE_2		(1 << 5)
+#define		ATMEL_LCDC_PIXELSIZE_4		(2 << 5)
+#define		ATMEL_LCDC_PIXELSIZE_8		(3 << 5)
+#define		ATMEL_LCDC_PIXELSIZE_16		(4 << 5)
+#define		ATMEL_LCDC_PIXELSIZE_24		(5 << 5)
+#define		ATMEL_LCDC_PIXELSIZE_32		(6 << 5)
+#define	ATMEL_LCDC_INVVD	(1 << 8)
+#define		ATMEL_LCDC_INVVD_NORMAL		(0 << 8)
+#define		ATMEL_LCDC_INVVD_INVERTED	(1 << 8)
+#define	ATMEL_LCDC_INVFRAME	(1 << 9 )
+#define		ATMEL_LCDC_INVFRAME_NORMAL	(0 << 9)
+#define		ATMEL_LCDC_INVFRAME_INVERTED	(1 << 9)
+#define	ATMEL_LCDC_INVLINE	(1 << 10)
+#define		ATMEL_LCDC_INVLINE_NORMAL	(0 << 10)
+#define		ATMEL_LCDC_INVLINE_INVERTED	(1 << 10)
+#define	ATMEL_LCDC_INVCLK	(1 << 11)
+#define		ATMEL_LCDC_INVCLK_NORMAL	(0 << 11)
+#define		ATMEL_LCDC_INVCLK_INVERTED	(1 << 11)
+#define	ATMEL_LCDC_INVDVAL	(1 << 12)
+#define		ATMEL_LCDC_INVDVAL_NORMAL	(0 << 12)
+#define		ATMEL_LCDC_INVDVAL_INVERTED	(1 << 12)
+#define	ATMEL_LCDC_CLKMOD	(1 << 15)
+#define		ATMEL_LCDC_CLKMOD_ACTIVEDISPLAY	(0 << 15)
+#define		ATMEL_LCDC_CLKMOD_ALWAYSACTIVE	(1 << 15)
+#define	ATMEL_LCDC_MEMOR	(1 << 31)
+#define		ATMEL_LCDC_MEMOR_BIG		(0 << 31)
+#define		ATMEL_LCDC_MEMOR_LITTLE		(1 << 31)
+
+#define ATMEL_LCDC_TIM1		0x0808
+#define	ATMEL_LCDC_VFP		(0xffU <<  0)
+#define	ATMEL_LCDC_VBP_OFFSET		8
+#define	ATMEL_LCDC_VBP		(0xffU <<  ATMEL_LCDC_VBP_OFFSET)
+#define	ATMEL_LCDC_VPW_OFFSET		16
+#define	ATMEL_LCDC_VPW		(0x3fU << ATMEL_LCDC_VPW_OFFSET)
+#define	ATMEL_LCDC_VHDLY_OFFSET		24
+#define	ATMEL_LCDC_VHDLY	(0xfU  << ATMEL_LCDC_VHDLY_OFFSET)
+
+#define ATMEL_LCDC_TIM2		0x080c
+#define	ATMEL_LCDC_HBP		(0xffU  <<  0)
+#define	ATMEL_LCDC_HPW_OFFSET		8
+#define	ATMEL_LCDC_HPW		(0x3fU  <<  ATMEL_LCDC_HPW_OFFSET)
+#define	ATMEL_LCDC_HFP_OFFSET		21
+#define	ATMEL_LCDC_HFP		(0x7ffU << ATMEL_LCDC_HFP_OFFSET)
+
+#define ATMEL_LCDC_LCDFRMCFG	0x0810
+#define	ATMEL_LCDC_LINEVAL	(0x7ff <<  0)
+#define	ATMEL_LCDC_HOZVAL_OFFSET	21
+#define	ATMEL_LCDC_HOZVAL	(0x7ff << ATMEL_LCDC_HOZVAL_OFFSET)
+
+#define ATMEL_LCDC_FIFO		0x0814
+#define	ATMEL_LCDC_FIFOTH	(0xffff)
+
+#define ATMEL_LCDC_MVAL		0x0818
+
+#define ATMEL_LCDC_DP1_2	0x081c
+#define ATMEL_LCDC_DP4_7	0x0820
+#define ATMEL_LCDC_DP3_5	0x0824
+#define ATMEL_LCDC_DP2_3	0x0828
+#define ATMEL_LCDC_DP5_7	0x082c
+#define ATMEL_LCDC_DP3_4	0x0830
+#define ATMEL_LCDC_DP4_5	0x0834
+#define ATMEL_LCDC_DP6_7	0x0838
+#define	ATMEL_LCDC_DP1_2_VAL	(0xff)
+#define	ATMEL_LCDC_DP4_7_VAL	(0xfffffff)
+#define	ATMEL_LCDC_DP3_5_VAL	(0xfffff)
+#define	ATMEL_LCDC_DP2_3_VAL	(0xfff)
+#define	ATMEL_LCDC_DP5_7_VAL	(0xfffffff)
+#define	ATMEL_LCDC_DP3_4_VAL	(0xffff)
+#define	ATMEL_LCDC_DP4_5_VAL	(0xfffff)
+#define	ATMEL_LCDC_DP6_7_VAL	(0xfffffff)
+
+#define ATMEL_LCDC_PWRCON	0x083c
+#define	ATMEL_LCDC_PWR		(1    <<  0)
+#define	ATMEL_LCDC_GUARDT_OFFSET	1
+#define	ATMEL_LCDC_GUARDT	(0x7f <<  ATMEL_LCDC_GUARDT_OFFSET)
+#define	ATMEL_LCDC_BUSY		(1    << 31)
+
+#define ATMEL_LCDC_CONTRAST_CTR	0x0840
+#define	ATMEL_LCDC_PS		(3 << 0)
+#define		ATMEL_LCDC_PS_DIV1		(0 << 0)
+#define		ATMEL_LCDC_PS_DIV2		(1 << 0)
+#define		ATMEL_LCDC_PS_DIV4		(2 << 0)
+#define		ATMEL_LCDC_PS_DIV8		(3 << 0)
+#define	ATMEL_LCDC_POL		(1 << 2)
+#define		ATMEL_LCDC_POL_NEGATIVE		(0 << 2)
+#define		ATMEL_LCDC_POL_POSITIVE		(1 << 2)
+#define	ATMEL_LCDC_ENA		(1 << 3)
+#define		ATMEL_LCDC_ENA_PWMDISABLE	(0 << 3)
+#define		ATMEL_LCDC_ENA_PWMENABLE	(1 << 3)
+
+#define ATMEL_LCDC_CONTRAST_VAL	0x0844
+#define	ATMEL_LCDC_CVAL	(0xff)
+
+#define ATMEL_LCDC_IER		0x0848
+#define ATMEL_LCDC_IDR		0x084c
+#define ATMEL_LCDC_IMR		0x0850
+#define ATMEL_LCDC_ISR		0x0854
+#define ATMEL_LCDC_ICR		0x0858
+#define	ATMEL_LCDC_LNI		(1 << 0)
+#define	ATMEL_LCDC_LSTLNI	(1 << 1)
+#define	ATMEL_LCDC_EOFI		(1 << 2)
+#define	ATMEL_LCDC_UFLWI	(1 << 4)
+#define	ATMEL_LCDC_OWRI		(1 << 5)
+#define	ATMEL_LCDC_MERI		(1 << 6)
+
+#define ATMEL_LCDC_LUT(n)	(0x0c00 + ((n)*4))
+
+#endif /* __ATMEL_LCDC_H__ */
diff --git a/include/lcd.h b/include/lcd.h
index 8a4273c..44ac8ef 100644
--- a/include/lcd.h
+++ b/include/lcd.h
@@ -155,7 +155,35 @@ typedef struct vidinfo {
 
 	u_char	vl_bpix;	/* Bits per pixel, 0 = 1 */
 } vidinfo_t;
-#endif /* CONFIG_MPC823, CONFIG_PXA250 or CONFIG_MCC200 */
+
+#elif defined(CONFIG_ATMEL_LCD)
+
+typedef struct vidinfo {
+	u_long vl_col;		/* Number of columns (i.e. 640) */
+	u_long vl_row;		/* Number of rows (i.e. 480) */
+	u_long vl_clk;	/* pixel clock in ps    */
+
+	/* LCD configuration register */
+	u_long vl_sync;		/* Horizontal / vertical sync */
+	u_long vl_bpix;		/* Bits per pixel, 0 = 1, 1 = 2, 2 = 4, 3 = 8, 4 = 16 */
+	u_long vl_tft;		/* 0 = passive, 1 = TFT */
+
+	/* Horizontal control register. */
+	u_long vl_hsync_len;	/* Length of horizontal sync */
+	u_long vl_left_margin;	/* Time from sync to picture */
+	u_long vl_right_margin;	/* Time from picture to sync */
+
+	/* Vertical control register. */
+	u_long vl_vsync_len;	/* Length of vertical sync */
+	u_long vl_upper_margin;	/* Time from sync to picture */
+	u_long vl_lower_margin;	/* Time from picture to sync */
+
+	u_long	mmio;		/* Memory mapped registers */
+} vidinfo_t;
+
+extern vidinfo_t panel_info;
+
+#endif /* CONFIG_MPC823, CONFIG_PXA250 or CONFIG_MCC200 or CONFIG_ATMEL_LCD */
 
 /* Video functions */
 
diff --git a/lib_arm/board.c b/lib_arm/board.c
index 5ee5bd4..0c0b589 100644
--- a/lib_arm/board.c
+++ b/lib_arm/board.c
@@ -121,6 +121,20 @@ void *sbrk (ptrdiff_t increment)
 	return ((void *) old);
 }
 
+char *strmhz (char *buf, long hz)
+{
+	long l, n;
+	long m;
+
+	n = hz / 1000000L;
+	l = sprintf (buf, "%ld", n);
+	m = (hz % 1000000L) / 1000L;
+	if (m != 0)
+		sprintf (buf + l, ".%03ld", m);
+	return (buf);
+}
+
+
 /************************************************************************
  * Coloured LED functionality
  ************************************************************************
@@ -323,16 +337,19 @@ void start_armboot (void)
 #endif /* CONFIG_VFD */
 
 #ifdef CONFIG_LCD
-#	ifndef PAGE_SIZE
-#	  define PAGE_SIZE 4096
-#	endif
-	/*
-	 * reserve memory for LCD display (always full pages)
-	 */
-	/* bss_end is defined in the board-specific linker script */
-	addr = (_bss_end + (PAGE_SIZE - 1)) & ~(PAGE_SIZE - 1);
-	size = lcd_setmem (addr);
-	gd->fb_base = addr;
+	/* board init may have inited fb_base */
+	if (!gd->fb_base) {
+#		ifndef PAGE_SIZE
+#		  define PAGE_SIZE 4096
+#		endif
+		/*
+		 * reserve memory for LCD display (always full pages)
+		 */
+		/* bss_end is defined in the board-specific linker script */
+		addr = (_bss_end + (PAGE_SIZE - 1)) & ~(PAGE_SIZE - 1);
+		size = lcd_setmem (addr);
+		gd->fb_base = addr;
+	}
 #endif /* CONFIG_LCD */
 
 	/* armboot_start is defined in the board-specific linker script */
-- 
1.5.3.3

^ permalink raw reply related	[flat|nested] 54+ messages in thread

* [U-Boot-Users] [PATCH 21/26] AT91CAP9ADK: hook up the ATMEL LCD driver
  2008-05-08 20:52 [U-Boot-Users] [PATCH v2 ARM/AT91 0/26] AT91SAM/CAP patches for U-Boot 1.3.4 Stelian Pop
                   ` (19 preceding siblings ...)
  2008-05-08 20:52 ` [U-Boot-Users] [PATCH 20/26] Add ATMEL LCD driver Stelian Pop
@ 2008-05-08 20:52 ` Stelian Pop
  2008-05-08 20:52 ` [U-Boot-Users] [PATCH 22/26] AT91SAM9261EK: " Stelian Pop
                   ` (6 subsequent siblings)
  27 siblings, 0 replies; 54+ messages in thread
From: Stelian Pop @ 2008-05-08 20:52 UTC (permalink / raw)
  To: u-boot

This patch makes the necessary adaptations (PIO configurations and
defines in config header file) to hook up the Atmel LCD driver to the
AT91CAP9ADK board.

Signed-off-by: Stelian Pop <stelian@popies.net>
---
 board/atmel/at91cap9adk/at91cap9adk.c |   64 +++++++++++++++++++++++++++++++++
 include/configs/at91cap9adk.h         |   13 +++++++
 2 files changed, 77 insertions(+), 0 deletions(-)

diff --git a/board/atmel/at91cap9adk/at91cap9adk.c b/board/atmel/at91cap9adk/at91cap9adk.c
index 67e16bb..e353cea 100644
--- a/board/atmel/at91cap9adk/at91cap9adk.c
+++ b/board/atmel/at91cap9adk/at91cap9adk.c
@@ -30,6 +30,8 @@
 #include <asm/arch/at91_rstc.h>
 #include <asm/arch/gpio.h>
 #include <asm/arch/io.h>
+#include <lcd.h>
+#include <atmel_lcdc.h>
 #if defined(CONFIG_RESET_PHY_R) && defined(CONFIG_MACB)
 #include <net.h>
 #endif
@@ -233,6 +235,65 @@ static void at91cap9_uhp_hw_init(void)
 }
 #endif
 
+#ifdef CONFIG_LCD
+vidinfo_t panel_info = {
+	vl_col:		240,
+	vl_row:		320,
+	vl_clk:		4965000,
+	vl_sync:	ATMEL_LCDC_INVLINE_INVERTED |
+			ATMEL_LCDC_INVFRAME_INVERTED,
+	vl_bpix:	3,
+	vl_tft:		1,
+	vl_hsync_len:	5,
+	vl_left_margin:	1,
+	vl_right_margin:33,
+	vl_vsync_len:	1,
+	vl_upper_margin:1,
+	vl_lower_margin:0,
+	mmio:		AT91CAP9_LCDC_BASE,
+};
+
+void lcd_enable(void)
+{
+	at91_set_gpio_value(AT91_PIN_PC0, 0);  /* power up */
+}
+
+void lcd_disable(void)
+{
+	at91_set_gpio_value(AT91_PIN_PC0, 1);  /* power down */
+}
+
+static void at91cap9_lcd_hw_init(void)
+{
+	at91_set_A_periph(AT91_PIN_PC1, 0);	/* LCDHSYNC */
+	at91_set_A_periph(AT91_PIN_PC2, 0);	/* LCDDOTCK */
+	at91_set_A_periph(AT91_PIN_PC3, 0);	/* LCDDEN */
+	at91_set_B_periph(AT91_PIN_PB9, 0);	/* LCDCC */
+	at91_set_A_periph(AT91_PIN_PC6, 0);	/* LCDD2 */
+	at91_set_A_periph(AT91_PIN_PC7, 0);	/* LCDD3 */
+	at91_set_A_periph(AT91_PIN_PC8, 0);	/* LCDD4 */
+	at91_set_A_periph(AT91_PIN_PC9, 0);	/* LCDD5 */
+	at91_set_A_periph(AT91_PIN_PC10, 0);	/* LCDD6 */
+	at91_set_A_periph(AT91_PIN_PC11, 0);	/* LCDD7 */
+	at91_set_A_periph(AT91_PIN_PC14, 0);	/* LCDD10 */
+	at91_set_A_periph(AT91_PIN_PC15, 0);	/* LCDD11 */
+	at91_set_A_periph(AT91_PIN_PC16, 0);	/* LCDD12 */
+	at91_set_A_periph(AT91_PIN_PC17, 0);	/* LCDD13 */
+	at91_set_A_periph(AT91_PIN_PC18, 0);	/* LCDD14 */
+	at91_set_A_periph(AT91_PIN_PC19, 0);	/* LCDD15 */
+	at91_set_A_periph(AT91_PIN_PC22, 0);	/* LCDD18 */
+	at91_set_A_periph(AT91_PIN_PC23, 0);	/* LCDD19 */
+	at91_set_A_periph(AT91_PIN_PC24, 0);	/* LCDD20 */
+	at91_set_A_periph(AT91_PIN_PC25, 0);	/* LCDD21 */
+	at91_set_A_periph(AT91_PIN_PC26, 0);	/* LCDD22 */
+	at91_set_A_periph(AT91_PIN_PC27, 0);	/* LCDD23 */
+
+	at91_sys_write(AT91_PMC_PCER, 1 << AT91CAP9_ID_LCDC);
+
+	gd->fb_base = 0;
+}
+#endif
+
 int board_init(void)
 {
 	/* Enable Ctrlc */
@@ -257,6 +318,9 @@ int board_init(void)
 #ifdef CONFIG_USB_OHCI_NEW
 	at91cap9_uhp_hw_init();
 #endif
+#ifdef CONFIG_LCD
+	at91cap9_lcd_hw_init();
+#endif
 	return 0;
 }
 
diff --git a/include/configs/at91cap9adk.h b/include/configs/at91cap9adk.h
index 5e13309..03c0e58 100644
--- a/include/configs/at91cap9adk.h
+++ b/include/configs/at91cap9adk.h
@@ -28,6 +28,7 @@
 #define __CONFIG_H
 
 /* ARM asynchronous clock */
+#define AT91_CPU_NAME		"AT91CAP9"
 #define AT91_MAIN_CLOCK		200000000	/* from 12 MHz crystal */
 #define AT91_MASTER_CLOCK	100000000	/* peripheral = main / 2 */
 #define CFG_HZ			1000000		/* 1us resolution */
@@ -55,6 +56,18 @@
 #undef CONFIG_USART2
 #define CONFIG_USART3		1	/* USART 3 is DBGU */
 
+/* LCD */
+#define CONFIG_LCD			1
+#define LCD_BPP				LCD_COLOR8
+#define CONFIG_LCD_LOGO			1
+#undef LCD_TEST_PATTERN
+#define CONFIG_LCD_INFO			1
+#define CONFIG_LCD_INFO_BELOW_LOGO	1
+#define CFG_WHITE_ON_BLACK		1
+#define CONFIG_ATMEL_LCD		1
+#define CONFIG_ATMEL_LCD_BGR555		1
+#define CFG_CONSOLE_IS_IN_ENV		1
+
 #define CONFIG_BOOTDELAY	3
 
 /* #define CONFIG_ENV_OVERWRITE	1 */
-- 
1.5.3.3

^ permalink raw reply related	[flat|nested] 54+ messages in thread

* [U-Boot-Users] [PATCH 22/26] AT91SAM9261EK: hook up the ATMEL LCD driver
  2008-05-08 20:52 [U-Boot-Users] [PATCH v2 ARM/AT91 0/26] AT91SAM/CAP patches for U-Boot 1.3.4 Stelian Pop
                   ` (20 preceding siblings ...)
  2008-05-08 20:52 ` [U-Boot-Users] [PATCH 21/26] AT91CAP9ADK: hook up the " Stelian Pop
@ 2008-05-08 20:52 ` Stelian Pop
  2008-05-08 20:52 ` [U-Boot-Users] [PATCH 23/26] AT91SAM9263EK: " Stelian Pop
                   ` (5 subsequent siblings)
  27 siblings, 0 replies; 54+ messages in thread
From: Stelian Pop @ 2008-05-08 20:52 UTC (permalink / raw)
  To: u-boot

This patch makes the necessary adaptations (PIO configurations and
defines in config header file) to hook up the Atmel LCD driver to the
AT91SAM9261EK board.

Signed-off-by: Stelian Pop <stelian@popies.net>
---
 board/atmel/at91sam9261ek/at91sam9261ek.c |   64 +++++++++++++++++++++++++++++
 include/configs/at91sam9261ek.h           |   13 ++++++
 2 files changed, 77 insertions(+), 0 deletions(-)

diff --git a/board/atmel/at91sam9261ek/at91sam9261ek.c b/board/atmel/at91sam9261ek/at91sam9261ek.c
index 96b4422..3de234c 100644
--- a/board/atmel/at91sam9261ek/at91sam9261ek.c
+++ b/board/atmel/at91sam9261ek/at91sam9261ek.c
@@ -30,6 +30,8 @@
 #include <asm/arch/at91_rstc.h>
 #include <asm/arch/gpio.h>
 #include <asm/arch/io.h>
+#include <lcd.h>
+#include <atmel_lcdc.h>
 #if defined(CONFIG_RESET_PHY_R) && defined(CONFIG_DRIVER_DM9000)
 #include <net.h>
 #endif
@@ -150,6 +152,65 @@ static void at91sam9261ek_dm9000_hw_init(void)
 }
 #endif
 
+#ifdef CONFIG_LCD
+vidinfo_t panel_info = {
+	vl_col:		240,
+	vl_row:		320,
+	vl_clk:		4965000,
+	vl_sync:	ATMEL_LCDC_INVLINE_INVERTED |
+			ATMEL_LCDC_INVFRAME_INVERTED,
+	vl_bpix:	3,
+	vl_tft:		1,
+	vl_hsync_len:	5,
+	vl_left_margin:	1,
+	vl_right_margin:33,
+	vl_vsync_len:	1,
+	vl_upper_margin:1,
+	vl_lower_margin:0,
+	mmio:		AT91SAM9261_LCDC_BASE,
+};
+
+void lcd_enable(void)
+{
+	at91_set_gpio_value(AT91_PIN_PA12, 0);  /* power up */
+}
+
+void lcd_disable(void)
+{
+	at91_set_gpio_value(AT91_PIN_PA12, 1);  /* power down */
+}
+
+static void at91sam9261ek_lcd_hw_init(void)
+{
+	at91_set_A_periph(AT91_PIN_PB1, 0);	/* LCDHSYNC */
+	at91_set_A_periph(AT91_PIN_PB2, 0);	/* LCDDOTCK */
+	at91_set_A_periph(AT91_PIN_PB3, 0);	/* LCDDEN */
+	at91_set_A_periph(AT91_PIN_PB4, 0);	/* LCDCC */
+	at91_set_A_periph(AT91_PIN_PB7, 0);	/* LCDD2 */
+	at91_set_A_periph(AT91_PIN_PB8, 0);	/* LCDD3 */
+	at91_set_A_periph(AT91_PIN_PB9, 0);	/* LCDD4 */
+	at91_set_A_periph(AT91_PIN_PB10, 0);	/* LCDD5 */
+	at91_set_A_periph(AT91_PIN_PB11, 0);	/* LCDD6 */
+	at91_set_A_periph(AT91_PIN_PB12, 0);	/* LCDD7 */
+	at91_set_A_periph(AT91_PIN_PB15, 0);	/* LCDD10 */
+	at91_set_A_periph(AT91_PIN_PB16, 0);	/* LCDD11 */
+	at91_set_A_periph(AT91_PIN_PB17, 0);	/* LCDD12 */
+	at91_set_A_periph(AT91_PIN_PB18, 0);	/* LCDD13 */
+	at91_set_A_periph(AT91_PIN_PB19, 0);	/* LCDD14 */
+	at91_set_A_periph(AT91_PIN_PB20, 0);	/* LCDD15 */
+	at91_set_B_periph(AT91_PIN_PB23, 0);	/* LCDD18 */
+	at91_set_B_periph(AT91_PIN_PB24, 0);	/* LCDD19 */
+	at91_set_B_periph(AT91_PIN_PB25, 0);	/* LCDD20 */
+	at91_set_B_periph(AT91_PIN_PB26, 0);	/* LCDD21 */
+	at91_set_B_periph(AT91_PIN_PB27, 0);	/* LCDD22 */
+	at91_set_B_periph(AT91_PIN_PB28, 0);	/* LCDD23 */
+
+	at91_sys_write(AT91_PMC_SCER, AT91_PMC_HCK1);
+
+	gd->fb_base = AT91SAM9261_SRAM_BASE;
+}
+#endif
+
 int board_init(void)
 {
 	/* Enable Ctrlc */
@@ -170,6 +231,9 @@ int board_init(void)
 #ifdef CONFIG_DRIVER_DM9000
 	at91sam9261ek_dm9000_hw_init();
 #endif
+#ifdef CONFIG_LCD
+	at91sam9261ek_lcd_hw_init();
+#endif
 	return 0;
 }
 
diff --git a/include/configs/at91sam9261ek.h b/include/configs/at91sam9261ek.h
index 96fc6af..df46268 100644
--- a/include/configs/at91sam9261ek.h
+++ b/include/configs/at91sam9261ek.h
@@ -28,6 +28,7 @@
 #define __CONFIG_H
 
 /* ARM asynchronous clock */
+#define AT91_CPU_NAME		"AT91SAM9261"
 #define AT91_MAIN_CLOCK		198656000	/* from 18.432 MHz crystal */
 #define AT91_MASTER_CLOCK	99328000	/* peripheral = main / 2 */
 #define CFG_HZ			1000000		/* 1us resolution */
@@ -55,6 +56,18 @@
 #undef CONFIG_USART2
 #define CONFIG_USART3		1	/* USART 3 is DBGU */
 
+/* LCD */
+#define CONFIG_LCD			1
+#define LCD_BPP				LCD_COLOR8
+#define CONFIG_LCD_LOGO			1
+#undef LCD_TEST_PATTERN
+#define CONFIG_LCD_INFO			1
+#define CONFIG_LCD_INFO_BELOW_LOGO	1
+#define CFG_WHITE_ON_BLACK		1
+#define CONFIG_ATMEL_LCD		1
+#define CONFIG_ATMEL_LCD_BGR555		1
+#define CFG_CONSOLE_IS_IN_ENV		1
+
 #define CONFIG_BOOTDELAY	3
 
 /* #define CONFIG_ENV_OVERWRITE	1 */
-- 
1.5.3.3

^ permalink raw reply related	[flat|nested] 54+ messages in thread

* [U-Boot-Users] [PATCH 23/26] AT91SAM9263EK: hook up the ATMEL LCD driver
  2008-05-08 20:52 [U-Boot-Users] [PATCH v2 ARM/AT91 0/26] AT91SAM/CAP patches for U-Boot 1.3.4 Stelian Pop
                   ` (21 preceding siblings ...)
  2008-05-08 20:52 ` [U-Boot-Users] [PATCH 22/26] AT91SAM9261EK: " Stelian Pop
@ 2008-05-08 20:52 ` Stelian Pop
  2008-05-08 20:52 ` [U-Boot-Users] [PATCH 24/26] AT91SAM9RLEK: " Stelian Pop
                   ` (4 subsequent siblings)
  27 siblings, 0 replies; 54+ messages in thread
From: Stelian Pop @ 2008-05-08 20:52 UTC (permalink / raw)
  To: u-boot

This patch makes the necessary adaptations (PIO configurations and
defines in config header file) to hook up the Atmel LCD driver to the
AT91SAM9263EK board.

Signed-off-by: Stelian Pop <stelian@popies.net>
---
 board/atmel/at91sam9263ek/at91sam9263ek.c |   65 +++++++++++++++++++++++++++++
 include/configs/at91sam9263ek.h           |   13 ++++++
 2 files changed, 78 insertions(+), 0 deletions(-)

diff --git a/board/atmel/at91sam9263ek/at91sam9263ek.c b/board/atmel/at91sam9263ek/at91sam9263ek.c
index a6268a6..ba7fc71 100644
--- a/board/atmel/at91sam9263ek/at91sam9263ek.c
+++ b/board/atmel/at91sam9263ek/at91sam9263ek.c
@@ -23,6 +23,7 @@
  */
 
 #include <common.h>
+#include <asm/sizes.h>
 #include <asm/arch/at91sam9263.h>
 #include <asm/arch/at91sam9263_matrix.h>
 #include <asm/arch/at91sam9_smc.h>
@@ -30,6 +31,8 @@
 #include <asm/arch/at91_rstc.h>
 #include <asm/arch/gpio.h>
 #include <asm/arch/io.h>
+#include <lcd.h>
+#include <atmel_lcdc.h>
 #if defined(CONFIG_RESET_PHY_R) && defined(CONFIG_MACB)
 #include <net.h>
 #endif
@@ -193,6 +196,65 @@ static void at91sam9263ek_uhp_hw_init(void)
 }
 #endif
 
+#ifdef CONFIG_LCD
+vidinfo_t panel_info = {
+	vl_col:		240,
+	vl_row:		320,
+	vl_clk:		4965000,
+	vl_sync:	ATMEL_LCDC_INVLINE_INVERTED |
+			ATMEL_LCDC_INVFRAME_INVERTED,
+	vl_bpix:	3,
+	vl_tft:		1,
+	vl_hsync_len:	5,
+	vl_left_margin:	1,
+	vl_right_margin:33,
+	vl_vsync_len:	1,
+	vl_upper_margin:1,
+	vl_lower_margin:0,
+	mmio:		AT91SAM9263_LCDC_BASE,
+};
+
+void lcd_enable(void)
+{
+	at91_set_gpio_value(AT91_PIN_PA30, 1);  /* power up */
+}
+
+void lcd_disable(void)
+{
+	at91_set_gpio_value(AT91_PIN_PA30, 0);  /* power down */
+}
+
+static void at91sam9263ek_lcd_hw_init(void)
+{
+	at91_set_A_periph(AT91_PIN_PC1, 0);	/* LCDHSYNC */
+	at91_set_A_periph(AT91_PIN_PC2, 0);	/* LCDDOTCK */
+	at91_set_A_periph(AT91_PIN_PC3, 0);	/* LCDDEN */
+	at91_set_B_periph(AT91_PIN_PB9, 0);	/* LCDCC */
+	at91_set_A_periph(AT91_PIN_PC6, 0);	/* LCDD2 */
+	at91_set_A_periph(AT91_PIN_PC7, 0);	/* LCDD3 */
+	at91_set_A_periph(AT91_PIN_PC8, 0);	/* LCDD4 */
+	at91_set_A_periph(AT91_PIN_PC9, 0);	/* LCDD5 */
+	at91_set_A_periph(AT91_PIN_PC10, 0);	/* LCDD6 */
+	at91_set_A_periph(AT91_PIN_PC11, 0);	/* LCDD7 */
+	at91_set_A_periph(AT91_PIN_PC14, 0);	/* LCDD10 */
+	at91_set_A_periph(AT91_PIN_PC15, 0);	/* LCDD11 */
+	at91_set_A_periph(AT91_PIN_PC16, 0);	/* LCDD12 */
+	at91_set_B_periph(AT91_PIN_PC12, 0);	/* LCDD13 */
+	at91_set_A_periph(AT91_PIN_PC18, 0);	/* LCDD14 */
+	at91_set_A_periph(AT91_PIN_PC19, 0);	/* LCDD15 */
+	at91_set_A_periph(AT91_PIN_PC22, 0);	/* LCDD18 */
+	at91_set_A_periph(AT91_PIN_PC23, 0);	/* LCDD19 */
+	at91_set_A_periph(AT91_PIN_PC24, 0);	/* LCDD20 */
+	at91_set_B_periph(AT91_PIN_PC17, 0);	/* LCDD21 */
+	at91_set_A_periph(AT91_PIN_PC26, 0);	/* LCDD22 */
+	at91_set_A_periph(AT91_PIN_PC27, 0);	/* LCDD23 */
+
+	at91_sys_write(AT91_PMC_PCER, 1 << AT91SAM9263_ID_LCDC);
+
+	gd->fb_base = AT91SAM9263_SRAM0_BASE;
+}
+#endif
+
 int board_init(void)
 {
 	/* Enable Ctrlc */
@@ -216,6 +278,9 @@ int board_init(void)
 #ifdef CONFIG_USB_OHCI_NEW
 	at91sam9263ek_uhp_hw_init();
 #endif
+#ifdef CONFIG_LCD
+	at91sam9263ek_lcd_hw_init();
+#endif
 	return 0;
 }
 
diff --git a/include/configs/at91sam9263ek.h b/include/configs/at91sam9263ek.h
index d28f7d8..1c50134 100644
--- a/include/configs/at91sam9263ek.h
+++ b/include/configs/at91sam9263ek.h
@@ -28,6 +28,7 @@
 #define __CONFIG_H
 
 /* ARM asynchronous clock */
+#define AT91_CPU_NAME		"AT91SAM9263"
 #define AT91_MAIN_CLOCK		199919000	/* from 16.367 MHz crystal */
 #define AT91_MASTER_CLOCK	99959500	/* peripheral = main / 2 */
 #define CFG_HZ			1000000		/* 1us resolution */
@@ -55,6 +56,18 @@
 #undef CONFIG_USART2
 #define CONFIG_USART3		1	/* USART 3 is DBGU */
 
+/* LCD */
+#define CONFIG_LCD			1
+#define LCD_BPP				LCD_COLOR8
+#define CONFIG_LCD_LOGO			1
+#undef LCD_TEST_PATTERN
+#define CONFIG_LCD_INFO			1
+#define CONFIG_LCD_INFO_BELOW_LOGO	1
+#define CFG_WHITE_ON_BLACK		1
+#define CONFIG_ATMEL_LCD		1
+#define CONFIG_ATMEL_LCD_BGR555		1
+#define CFG_CONSOLE_IS_IN_ENV		1
+
 #define CONFIG_BOOTDELAY	3
 
 /* #define CONFIG_ENV_OVERWRITE	1 */
-- 
1.5.3.3

^ permalink raw reply related	[flat|nested] 54+ messages in thread

* [U-Boot-Users] [PATCH 24/26] AT91SAM9RLEK: hook up the ATMEL LCD driver
  2008-05-08 20:52 [U-Boot-Users] [PATCH v2 ARM/AT91 0/26] AT91SAM/CAP patches for U-Boot 1.3.4 Stelian Pop
                   ` (22 preceding siblings ...)
  2008-05-08 20:52 ` [U-Boot-Users] [PATCH 23/26] AT91SAM9263EK: " Stelian Pop
@ 2008-05-08 20:52 ` Stelian Pop
  2008-05-08 20:52 ` [U-Boot-Users] [PATCH 25/26] Use custom logo for Atmel boards Stelian Pop
                   ` (3 subsequent siblings)
  27 siblings, 0 replies; 54+ messages in thread
From: Stelian Pop @ 2008-05-08 20:52 UTC (permalink / raw)
  To: u-boot

This patch makes the necessary adaptations (PIO configurations and
defines in config header file) to hook up the Atmel LCD driver to the
AT91SAM9RLEK board.

Signed-off-by: Stelian Pop <stelian@popies.net>
---
 board/atmel/at91sam9rlek/at91sam9rlek.c |   63 +++++++++++++++++++++++++++++++
 include/configs/at91sam9rlek.h          |   13 ++++++
 2 files changed, 76 insertions(+), 0 deletions(-)

diff --git a/board/atmel/at91sam9rlek/at91sam9rlek.c b/board/atmel/at91sam9rlek/at91sam9rlek.c
index 8deecfd..10423d2 100644
--- a/board/atmel/at91sam9rlek/at91sam9rlek.c
+++ b/board/atmel/at91sam9rlek/at91sam9rlek.c
@@ -30,6 +30,8 @@
 #include <asm/arch/at91_rstc.h>
 #include <asm/arch/gpio.h>
 #include <asm/arch/io.h>
+#include <lcd.h>
+#include <atmel_lcdc.h>
 #if defined(CONFIG_RESET_PHY_R) && defined(CONFIG_MACB)
 #include <net.h>
 #endif
@@ -124,6 +126,64 @@ static void at91sam9rlek_spi_hw_init(void)
 }
 #endif
 
+#ifdef CONFIG_LCD
+vidinfo_t panel_info = {
+	vl_col:		240,
+	vl_row:		320,
+	vl_clk:		4965000,
+	vl_sync:	ATMEL_LCDC_INVLINE_INVERTED |
+			ATMEL_LCDC_INVFRAME_INVERTED,
+	vl_bpix:	3,
+	vl_tft:		1,
+	vl_hsync_len:	5,
+	vl_left_margin:	1,
+	vl_right_margin:33,
+	vl_vsync_len:	1,
+	vl_upper_margin:1,
+	vl_lower_margin:0,
+	mmio:		AT91SAM9RL_LCDC_BASE,
+};
+
+void lcd_enable(void)
+{
+	at91_set_gpio_value(AT91_PIN_PA30, 0);  /* power up */
+}
+
+void lcd_disable(void)
+{
+	at91_set_gpio_value(AT91_PIN_PA30, 1);  /* power down */
+}
+static void at91sam9rlek_lcd_hw_init(void)
+{
+	at91_set_B_periph(AT91_PIN_PC1, 0);	/* LCDPWR */
+	at91_set_A_periph(AT91_PIN_PC5, 0);	/* LCDHSYNC */
+	at91_set_A_periph(AT91_PIN_PC6, 0);	/* LCDDOTCK */
+	at91_set_A_periph(AT91_PIN_PC7, 0);	/* LCDDEN */
+	at91_set_A_periph(AT91_PIN_PC3, 0);	/* LCDCC */
+	at91_set_B_periph(AT91_PIN_PC9, 0);	/* LCDD3 */
+	at91_set_B_periph(AT91_PIN_PC10, 0);	/* LCDD4 */
+	at91_set_B_periph(AT91_PIN_PC11, 0);	/* LCDD5 */
+	at91_set_B_periph(AT91_PIN_PC12, 0);	/* LCDD6 */
+	at91_set_B_periph(AT91_PIN_PC13, 0);	/* LCDD7 */
+	at91_set_B_periph(AT91_PIN_PC15, 0);	/* LCDD11 */
+	at91_set_B_periph(AT91_PIN_PC16, 0);	/* LCDD12 */
+	at91_set_B_periph(AT91_PIN_PC17, 0);	/* LCDD13 */
+	at91_set_B_periph(AT91_PIN_PC18, 0);	/* LCDD14 */
+	at91_set_B_periph(AT91_PIN_PC19, 0);	/* LCDD15 */
+	at91_set_B_periph(AT91_PIN_PC20, 0);	/* LCDD18 */
+	at91_set_B_periph(AT91_PIN_PC21, 0);	/* LCDD19 */
+	at91_set_B_periph(AT91_PIN_PC22, 0);	/* LCDD20 */
+	at91_set_B_periph(AT91_PIN_PC23, 0);	/* LCDD21 */
+	at91_set_B_periph(AT91_PIN_PC24, 0);	/* LCDD22 */
+	at91_set_B_periph(AT91_PIN_PC25, 0);	/* LCDD23 */
+
+	at91_sys_write(AT91_PMC_PCER, 1 << AT91SAM9RL_ID_LCDC);
+
+	gd->fb_base = 0;
+}
+#endif
+
+
 int board_init(void)
 {
 	/* Enable Ctrlc */
@@ -141,6 +201,9 @@ int board_init(void)
 #ifdef CONFIG_HAS_DATAFLASH
 	at91sam9rlek_spi_hw_init();
 #endif
+#ifdef CONFIG_LCD
+	at91sam9rlek_lcd_hw_init();
+#endif
 	return 0;
 }
 
diff --git a/include/configs/at91sam9rlek.h b/include/configs/at91sam9rlek.h
index 773f954..33d934f 100644
--- a/include/configs/at91sam9rlek.h
+++ b/include/configs/at91sam9rlek.h
@@ -28,6 +28,7 @@
 #define __CONFIG_H
 
 /* ARM asynchronous clock */
+#define AT91_CPU_NAME		"AT91SAM9RL"
 #define AT91_MAIN_CLOCK		200000000	/* from 12.000 MHz crystal */
 #define AT91_MASTER_CLOCK	100000000	/* peripheral = main / 2 */
 #define CFG_HZ			1000000		/* 1us resolution */
@@ -55,6 +56,18 @@
 #undef CONFIG_USART2
 #define CONFIG_USART3		1	/* USART 3 is DBGU */
 
+/* LCD */
+#define CONFIG_LCD			1
+#define LCD_BPP				LCD_COLOR8
+#define CONFIG_LCD_LOGO			1
+#undef LCD_TEST_PATTERN
+#define CONFIG_LCD_INFO			1
+#define CONFIG_LCD_INFO_BELOW_LOGO	1
+#define CFG_WHITE_ON_BLACK		1
+#define CONFIG_ATMEL_LCD		1
+#define CONFIG_ATMEL_LCD_RGB565		1
+#define CFG_CONSOLE_IS_IN_ENV		1
+
 #define CONFIG_BOOTDELAY	3
 
 /* #define CONFIG_ENV_OVERWRITE	1 */
-- 
1.5.3.3

^ permalink raw reply related	[flat|nested] 54+ messages in thread

* [U-Boot-Users] [PATCH 25/26] Use custom logo for Atmel boards
  2008-05-08 20:52 [U-Boot-Users] [PATCH v2 ARM/AT91 0/26] AT91SAM/CAP patches for U-Boot 1.3.4 Stelian Pop
                   ` (23 preceding siblings ...)
  2008-05-08 20:52 ` [U-Boot-Users] [PATCH 24/26] AT91SAM9RLEK: " Stelian Pop
@ 2008-05-08 20:52 ` Stelian Pop
  2008-05-08 20:52 ` [U-Boot-Users] [PATCH 26/26] Support AT91CAP9 revC CPUs Stelian Pop
                   ` (2 subsequent siblings)
  27 siblings, 0 replies; 54+ messages in thread
From: Stelian Pop @ 2008-05-08 20:52 UTC (permalink / raw)
  To: u-boot

This patch adds a custom vendor logo for the Atmel AT91 boards.

Signed-off-by: Stelian Pop <stelian@popies.net>
---
 tools/Makefile        |    4 ++++
 tools/logos/atmel.bmp |  Bin 0 -> 26334 bytes
 2 files changed, 4 insertions(+), 0 deletions(-)
 create mode 100644 tools/logos/atmel.bmp

diff --git a/tools/Makefile b/tools/Makefile
index b897923..dc210e8 100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -44,6 +44,10 @@ LOGO_H	= $(OBJTREE)/include/bmp_logo.h
 ifeq ($(LOGO_BMP),)
 LOGO_BMP= logos/denx.bmp
 endif
+ifeq ($(VENDOR),atmel)
+LOGO_BMP= logos/atmel.bmp
+endif
+
 
 #-------------------------------------------------------------------------
 
diff --git a/tools/logos/atmel.bmp b/tools/logos/atmel.bmp
new file mode 100644
index 0000000000000000000000000000000000000000..3c445c9bc365aff31bf5f6c464ab2b1d7a99e99e
GIT binary patch
literal 26334
zcmd^{y^my9TE?%dt6b%2x9uH|y<;yXT%jdF1c(rkZ_IzN85^tsi3E`mZc2iL$dC{T
z(gqfCzy>Qs0xN`&kQNdoKEy`?!Ae;Ce$R8xty|qao^D4T&FQJCbI*Ct^M1eQ+}qXj
ztKa^~cb2q2<^AV){Wq^)=k>;N;(b|uf%zXk>FZ~?_VxMapD+LQk3U{M{q8q;eQWu@
z&wsl7l(8TE-nW;}xc-dsfBTzHmmmJluPmQ_ at 0-g%{rMj(KVa;C|MOp#&wle4m%snx
z-(CLaUw^{f&o6)d``=mq<L~}r`R5<~$?}sw`~LE`fA|~AXW#qQ@>k#gwdJ$l`laRH
z|KTr}AOF#JmmmK2FE7WdEB?`TJKx*qs+}W)ba(kVI=ee{2-?%h6%IL_<yWU59FGIj
z)#);_8&iA)#N|60YiyEr74P8->e0DfudYOzat#uNnUXu}uohkpdtQfS*)K3q0lIrf
z!-BUkMe;UblrV5~Ga8lX=E|8laa7G<WXgrL(rMKtfG$u$5zZh|BeSf9apDv`=+KTQ
z#O)|c(cQ&bVnX^k#1GOZQMei}`>VsUNAUyJWnA^;q^-m16l2;Q*zG!thzbk4aDtNV
zDe^NdQ{>Rqe)29v^$tyzX3-V|Wr|pER}6ot8t{dX=k$eAgn_g+#h3yp(+8-v$CZb}
zet)Bmcoui>uZDliO1wl1dcY=8tjv|1z=~n31U7e=H}r=*Y<JSgewYBMw9$ZY!PI1e
zWLYFVDQ7ju{^`fU_FPCSg>wLpp=1<dI7g1~37eyi#H*@FcZY|U1Iw4?W`9`1r0Z2J
zmq8n#QAz=$o70;No;KI5&fA8mE1qLY!T6BH-UNxbTBin+tdiJ?F^yYR01^1;btVx!
zp+6*dh7{U;h`RnP=(rqrXt{^WA=NYa5Fx@eX~boO4;MkF9PymOOo}-{21n0TS>@A8
zcQbef`%n#RMr4TSu~w{e+N7`<oai!p=;&XTj0|>8aVkDtNX%6Ii at t}eo#_h!`d^_q
zjG`p;afB(BD0N{%1py+Je$kJE!x53_&J3>nGlQc;*MTRGu{4X$ASp*hEO=y>nzqT{
z at Qg~Gd0_ at 8(!QSJyr)?0Q4sCPwUgmZy?V{`jniscL!w!WIdraWt#j#)iiIyUek+z<
zOf1y$+lnR8tXKo6L%y#d_PruZ62|fL%PZCpQ!z{e0 at Br1EMt|vRoVFE{psl%IiSMl
zJN;XJ@-$ezOn>Um_0V125D4krCTf|cjl3+*S<X-Z28?472izoz941J_HP~w~7nZs2
zF{XJ+ABeJN!u)kQ6tY&Dux>(PypK at MFeY{74e9kY1ME&*49Pt;2s~Ivcq9xP(88m@
za+0+AwF~ODVrg?tl8P0?5f?7Y?s)+MvC#6?KY_fcSd^@YnTlmu(HgB-$`Wmd;G(o*
z?RV6y-4UfvH#>aG4$OXpT$58-SyB?EP8ll<2T?ibF*j9xSjCFsdcdXFMLTRk0xO4%
zM|OR#2 at pj0*^}q=g;24YQ#NKBR^7dKoYwK@(HBY|JVq{iFAWYZ%1S(eeP1)!smz<f
z&gR+-)+@YX8}lg3Bu1+W41KIs2<es7_W{yi<tiCmL7+hDh|$$^jmDC2-JirEg~QLe
zu^YPyzNNl9Yce4b$?<K@&y`OJXceY?t}@2dh)qcK3$iw6%HDM}!zjvX>L66SV4gEL
zjy;3qD64T|udJI)%U6!WmVpmw1%oh7-efQ$-&nn_-z9ys;YPL_Zq)XNBULQ&R~m#U
z at JQj2*g9H0qk?+vuFqE*YslmB7<pW;8H_UVY+V`{#4Jd36J+`xqv4(oZ!*|$s`<0u
zH-n`e4pO4nxo;To?HoA>Vba%#j`D`L)?r>H`PX7$1{)QX6KkSKq~cS)$Wumyy|T&I
z5WXf5={Um6PH=a}YgW0!w~@gG37z^$oXi$ED?wlZU4zLUuMq~2-0ZGmGH8>t%v$O|
z7YzD1c)2>}*3dfTJwpby!2M0y(p=1EbK8vMo=ZBByffL%rF&<9(c5Iu#0`1pV00Vf
z&b7kP#J-1kOcKF*@x;y2B$oc31>hVifP|L~^6k_<7s2pGY&(SoWOWa|V_jHm^|j}4
z-c;np4H|fbxH{iQ%6wE)A_WmLO!C3<cuG^)fp+%Lyz=zMGNJ@&%O#`Rf%L_{XQs?o
z_H)_r!@PXq=U`sod*O4NUmXc0=%XlXyEOjB1}f<X7+S^2z(F6<IMBH)AM!{sj7K;0
zW2TGl6Pxu;o~O6~BLiY>QO-o|l`t+)5e2>56n%P(S!ft}{q#+)Y|OkG%CUs_I<j^c
zwgl3wq||cDItLlHc*}1qqy?KxVZ1G~x?29z^Da%0ff6Ln5rWVJq2{O5rsjsug(C1q
zmnxKpHMs+5ZD!xdItl3Sc5e=WtDRAB_yh!D3PvAZE^^Z~YS^)|!!Yj*Q`~*9a?jRd
z>&}18dHnQTy`HltaYI5I=R3CnaI)EiQ&gTH0|nvP%&vFOkIxNG>Z$8Bmj-pe?56JS
zq@*6IAc#80r at L#`JDvsh+#J>F8}Rm at dW@#Ma}Gmti8y?@`^pFT3HJyoTFn3oe&n3C
zwjjII9VTS!lm;rF1VS;G1?oN!CAPL?$1UG`&m7r>#V|kFlTmkQ47R<~)lF^{KT#x{
z6USAMH&;Xy)+~xoD4lkv+C`&fs*dMyHyj3C8qVlWuNjeI?D&QXZKrp~IZg*K$V)TC
z>xE#EN#IgJ8XByx&hb_b9YzxXIaM(VF2^Q4Mng}@UCYn&^p9^@qvGM!#ZR*yYy^Z5
z<@k34n#WCu<;vnY1wYrH{VO}n!*Q&`;FO$U^@Af-xY{e($lyy51x5}cOD`yEtP-f$
z*-WYdxjZ4WqtdEx$h3LxPmFXl0N}KHDh2FSI_<E0bYyM?W3_c7ZZ-;d2&ASRP&4?l
znp?`*w0WDMi0Ri>H<gbzK%3AegD*i0NnH<k+zuT!WJs2E!8wCfJoj&b)}>J~<|qiO
zj2DiaZ|ejjY-&uXsjjjixw0Zu9)NheNQ;P2$hjX8HNtUia|)}kqINXzJonAX0vZE>
zR!<u|Jbc)oj9IHF!m4RGuleR$v{1flbu at oz_$TT*QapQR@bQ`sNvW>-&c?@kz@$Va
zo)zADk at WBcpb5NGUh9t`$I)P#0cwpcC*T}Tboo}z&hea)P(odh4GKcEyb(KR<Ceg?
z5rsk{2fS@?!%4l0xs at U|V7eKcKm+qV414x2${&_@k2l<HAgIb{Rb<i<4S~!!%9M)N
ztov~2n~rm>Yaj}QZ?2)>CX`$*l6FZ3YwRsZp;Dg>saRG6i;^q4t7_g6b18<K*I;G_
zlX^_-PB+vOuWuw8zLh#Ul_v7&+dL0gPnBSRH!>I+BGmeBi5e|7cid3KR_CUv&+#m_
zV3A+{vbUd68ifHFp*%8JCA2f6iP>DLyZ&vyF>aBHHMQtyR^8qE5Rp4mXHT$Cgpi5z
zSw_6MZE20U7&N*XFGhm+3~Y3 at T*h?gCG^Uw@^(c$t+Ca21Cr=sbdQ+;k3>Ro5ZOJw
z_J_PpWm8;;f`JuHKh#xYF<8lT8oo=Kg|crdUR~7LFlcGZCe0*|_G}SG5d<KARZ;x5
z2oR5HHYOTkssp@!k7|r+Cv?PUf<(Ltf|l;Tp0A|nKZVH>Q#RI7<2*p%fP+JPUNIZ8
ztHN0@R-E39>xO?xE_!di36W?(g2tz(CFVT8Wc5%&Nt)YXJ^3h~o*Wsu(U<dcZeO&0
z#dRU^gc;cDE>OfcTAy8?7Oxp}7y?g35?MLU%kaZE>kqyPmmKJ0R>+Q?DjQ_s`FiP#
zHCsQ;m^dJ=!lq`2K~P)cSY68`5o$~%G at B&uW;W at GlkJfMC)BirjritT@?aD_eKSE!
zB>kTIh4`9-0rB}%iQ-y($|piFay&jIRg7mNGEwO#&jAyvuCKVetB<1xs@Nz>YV|(4
zHg1#$<!-#&vZ^JSvb+Gz-<aVd8ZB{d%W~Z|_08>tVro?y%o1YlZm0vYU@^v^w;*R(
zZ4|ZLrHyT9BDs;CXO7Tj3t}y??72xwu1+8H%n^Ozn>2Vj<6TPS=ocP1Z;a)#XBe4T
zhhmP`>dK2iCvhUDbn6eJSPfwyVX+gk3UmCq1z{@R=#ff2jfrbcNwUGULw(sfyYr#4
z{;dr&thL2g)eb;;)rZklSL1smcyEN3i!JsdHqwVg&PNYRjrCcQwIR9jyl3+dr?bBJ
z7kwLbioz0J%@!5kfWRRjElgaLIND>|(B>i&Cuq?Z&zzaDd0`cA*lb~@(Tw1>SU;EV
z`pDT<c>8X_2QOnTGdL{KYduKK<P%yyMwyEYh64?dk-<51cs9y@q>ASZ2Bjb&ClL*{
z0#w}j9#1qaS6EoPm2&&viPGXtU3#bO-_DuRh=Um)CWTZe9&^SPQHR0xi%e(l9J`f3
zejalT)MQLn*Fl-qkK^fpj$2zmqNl_}1>e6=id)Sws-|kERw*nmVNiKXd|rL-b^Zx#
z5;Wt<5ys`_f-gWI4tA#TVUX$doHrQ2Hfb73#S$JYIER>e4XGdk#Hk$6-G8;^3Swvh
zV(k}!TO2vYJ*%+wtR at UDnbNo$a<IT#?ybi6_fgHVh<BqOoCv2YGFzZZgcy+{4%6p|
zI@vhmHkGl2$kZ6QP`C%5X$`25La&b$88CpTucnpj$@<)QzNLY8c|$Af7?SqK4>!gK
zH1GULrKtfRH~#X4^HsF;9pQ8bU<t*tXa*x<o^MDd#5sj6hS97Uj6})cY<AY?NIJ>@
zAZDAu{Clp-hE!S{(O|HidWMRx3oDV~Y+QRlcu-Rku~krH^s~|^Q^uWRCi)r*TvWS^
z$E>boY(rkop%9gS0b`gV0D1nc^aF%JitO%&YA=)StE|N14pg9gv&!dn8A%44!aR7m
z+eR8}CK!32h3LsYOFSQjmm=n6W at rUNE`duw*Wr&~4D-dV$gfu8$9QhNQWnTM6%YZ#
zs7h!;K_Y)p*<Y@%b%K7*GaO`dztI_e0MqpXwLyKMTzq}k;izDtP{>4?o6o#i0;o}i
zJdngShPf6Qe3+SAiB^d7tFii0uavT$Xh=lgobNT_kadFKP^aS9-X>@(bqcuh_zTfg
zGRCKABR-THFTS|z-R_4;jFmgTwH3KX2=o&VhKgDrl##;WDb80|%q0nknZf3-^_jIv
zG2M&1l4A~P9DW30NkJ+B!g#|AHE)z92sOB#%^BGPoxkW{5-DXYF|qk#B{ws#o4)Rn
z3%_2$jJmW=idPbEns+qlbR^-WP1lNrS-n4^5$nRV)ui)EaMrOOc{5T7P*(ag2;LH&
zHdwQ449pQr9y?%oLPu5u&Z>vhXJg~Ayxm+<-h{6aBA29&^-4taY5}5;EJ<ytQCIE}
zQw19Bqh3WQ-^6ALGh}ZUd4f1skTN&nwVP`4svKZs4a&uoS*;+$!hFoFxu$->JIRk4
zZ<==OyqJlFK^Z`;STHp`a1C5H6-%QiYBrEeIHJa_S6rE&$uI_U-pD47_=;L#2S~KV
zaHvTeI%^~dJ%Wtr<Jk{h^1Q)7fA~Ox7if4fjJhm7yajt}5*ovb9wNvf((?{%{X2rJ
zY}R^p-bz@m>E`p;8cncKTi~U>G?9c^>y^Je9Y(fJu|lls9dTl6ZDVVE&59-Qy(jJq
zWyggn{1M;^pn`*`?r?}#+K6XJw7J4&CaLF`jc6F;#m?Y(6Rkc7C=mG<ZUKp%MNVq)
zIZ#>Vr~-yfpzTk|sPBf5@%Pf^!vbI0Sxp5G`kf30Y7{1jMg~hO7i43-3sqRRjr`TI
zG=r4c)+ at huUaKO$p)^3~Fd_4q!Cv&AD-z-Oz4a=pN06uugN(maVYMJ3entr*l0bBU
z3Qz+FzR@>wCQ+G>4$*hI)n$MTeSOl*RU$TeV+L>MLZJoVAP*L3G(K#b3=RuTpdCnI
z6L!=qIbmc?8-BRw0jio!mNis<_gz@k2>_A8^4?}};#rEAp^Wg9M}@uH!D!5y!98!#
zDK*o{wSYuJ-jp~T2S~P<&_fKOQL)Wnrd*Pe!%TPvRpva1x;Rk2O#2T%#OyBQHKhbz
z29+66iRV!0#ZV&ANIe<aW(JpChSoRGvPU{l2v7`w3Bn~7h9z3Ic`^LJCysu~If_^y
za^P3NLV+ZYQWuDikw*|jFya)0k6`L2DBOQFx<rY1MQA80swo_yGCJ=Uh9Ou6T#SZF
zqWV%Fjdzac9XEvB7ciM!A^}i2aAj_dRo9JCIVy<6qi#F*kVgD{5Cqo7sL^L&Cb&Tv
zTS-KbMI@S{#tt!q;#senzg%evYtWDhDYc6hP-ia&NDR%_3>bW_)fED#LV$%5e*AKm
z4b%$R#{yVbEaT!KYOXXIEnn(Dyl8om!MZ#L6LcK*fCr3_I{E94FdMzoCVy3l1~Co-
z#Jk5_@@7YIR}j&$gZ0v;`FyvO(o3>}LCe8tX0S#Xc32g9N#`}w*Wf!m!-Vk}#?l9R
z0pt3~8wN9;o1=-dILC7rPlH`IQab at s^NO);66fh2gM}!+4G52t`Sr+gJUs51*a%L+
zM at o-_Tq2=DRZP&>#U6Biu3Q7gCmlwU;Tr{_hY<xZeE8N!hh<QPEti#Ajc3I&e|vjT
z%)U3rz)qM(TI=x{L|}NIuJ{_;J<Z<&C4GI~4z0~_&qMTk=wCRLW7hIUoQZl05q+lp
z(37<~a`KP_(frL=jtVF-{p<Q|z0!80VhOT7`&48V--6W8FyWbDT#9;ZH2mb0FtoK2
z%3gq47!$rwxqBvh-{6;66t-cqsaObXy~;KKAE{{3-TjvelpCzrf;VO(tB+XIGNING
zkDKVRIzZWf2Z&Jou@upHw;9N?qglLYtyt8tIOM)HcTv_6;6B!Db!y*}!3fpoIi$^C
zqJ6O`I;cT9neq+Z`F@>QcB?6Ea!*?Yf{)uEx7KJrU7-EFVIBD^cV<Qe0#XyN+I(?G
zV)Xsc$kX&aNs`S<6HwOsSXxVFD at 6?0@i>?XX)5^4U`EgR%Ur#YXKnu3rphX5rQL#L
z^86+ at G#dk;^t*UiIP5bHh*9*#3SQ2pKARj*atmx;Dvh9g+JtNVhB*_MR}1 at uMxkuO
z5R6{tZ>BtRh(VN_c+o^Np!o$zkk+ at D6~{85h2Rv)<6A}n;MPoEKPrFC&D4SqqJ$QU
zB+(5#RPm at _C^|JWST$YP{Ef%7O|8R(W*^N_V-AIZh#3POt6hT3CHeH|6sB4@7;a5+
zY<WxubHK^7lbGURZ~5jGrGPJ1Dvzz7<)&GqZ)Rkog$;HCH=WE(4<i&N?9k?&2-@>o
zC9snx1L6+IW<|OP1U>o^c<21B42T)uAc(2;uy&^W1{ERjMik7<U_N`lz>Qz)#!xHy
zi(V3@(P;*2oOS=rl%Z=ZI%*iM8LS!_X9WrQ`j)s)2CEjYXk`B8s&vTJ-zz;#-AN@|
z4jtwtN`u%87Fsraus+I%@nxP5KWZM@^smA1F1cx1LXc+>R2%ZjFNye41k?;~sL$Qz
z59AH(`Y~xBP)*0wqw`lElV0yU*O-Q!0w at zLw;wZ}wZxjiu)z%3f0J(^$2!C_$FXg5
zhWvfT7_pgbDL5CmK(@;uj-ug;6?{gL{56HeL^h4l`zCaFT;n?(Ms%GxGC1M^vkB0V
z!O$hG`CJ<r;1@t?-FemtI)}rv{IbMb9mO>HSo_SwO#Hni-u5-VYxsyhxFXY5k)Y%N
zn5oCTy=M9v&>v%SjFt at Ilc3QRxXXj1TTh}qC5N7#OkBm@$pyYk#As8pqj`sle?su7
zd#sE`XpagTkj)~xdbR)jEOF}<bAuE&KkEKy4FaTm+dmXgFwv}7$u$)4SJldQu2{@j
znNq|v$1HN^(8Ax^jG_6_vzsES8!DtQ@<A=X1eq)PX|~5Y+U7*|_V)`+DyAjRM?kUg
zs>cI6xp8=+s(>ijTCvF9bwf?<aB7rA*{;n#TJvWU>(J;ZTtGd&@gu&hp5^F!0dlc4
z6)Th)3NiQ{R4ZgFmIaNoOeB1uo|DX7^YE6XuTG3iBaCpQ5{}l2m0O;<qpnlw5UX=w
z{k*{j_(PacvD8=Qp55Z9mG*XrMX^>y9U%sddnabg7Xzmj5C0 at OQR^drzamsa2HARU
zq=woy8EiZ!y0W0F;$SSlG0vFHGd6*BwARQUS3HyHEs(Kbe3-$FG?qn~nZNJ~4HAAy
z|Ki~N8|$6FrnBbfe1(5w0%eWwhysrgJ{@IbHU#i*L=x|FY<}Y2Yh$Mxkm;w>GXN+J
z0okC;75P*vvqUzKv;Q*EnQ7e=PK9|?tACf}>%#Dg*bxq)jJeU|=Vb1LI12J}PC4$_
zId at +Bf1KQE*U!6Z;O=(MDEdT*w-JJDQMOC12WT6vF^-3|5R42)M9&A0Zq_SbUwdk4
z at UW)ZG#~5x2XdPhXM5aP@~2zz>1O(cT at nItzNYbvC_cA<G%{Ya)URJrpIL)xR$1^f
zeZQx)X<l6nZ00VzK4_z<_I5%1p!zm5I0nD&eK8h#oOL00TM4JKhnGW}kxQ{8W|AON
zJ_2GR9kM}OxfNZiklu#4a~(QI#T6m^?KzV_%WT?=*z>^}<6Gu;Fz*=vY`Y}&N)Vac
z->Ok0LYh at Ih*=zMBf7w%8H~p1{a~BXE)8E*OefRc0332R(r6>jIjMV6-WYlV^pdXP
z4B-^mEP7e1T39#rd`n-bV4!O>jX}S_euG&IV(8M58fejT&BZxsR60o{x`qs$wtY}5
zyN!|s`9hSeQ5{-*JUB&4J-;@(NVFMPXKr`EX=3dUZ*iZ*-)d1dJ;wPZF!h@)PfepV
zHSNS-SImhAeG(Vfz at HZZEy#J`E{qRtC>!2i(Lt(7g5m9-Yr8PK_*3SWw%1MHO~&qh
z(vg3dt4H%3v{J8ntzDhW>9G6%n0?uYxD@$wD+r_Kq1!!<p&U;b<(+WbkkZHP{4H$6
z%0}+S_K<*HBj9j&<9Qz)v_6UAKDV~OdIIq225)Hn@Kyt|c(#IkG0IcaK~EQ{8HqGn
z?$7F)jJU&dkXv<mV249i(N$++f8{^1M1K0{<$<bNn3s3BoAIW_Zyvu|jldya9;&N!
z*;YTyeJma&R!xpqqbV*wkMnPK)pwqFtIFTuZW8S)AI}l+@&0A=IxHWcsCVIRZ?8^k
z20zljIVOIMZ_ZNYbDQ+aW$>f&*K-?ZvS;I- at M5q0%BOKM_;LQ_Xq$+B-v at V=t5+wS
zE9oQa^Qh(C_*=2gd;2S)w;B96|E_!2d#O~fR`N#L$L+tbt-kNP%Nd=A#$Wj&bs-=H
z=gY<Op1)pUOL~>I-&tWEwI8kVygxj7!fnZ`rZC>luWDC49 at t@1dW+w$c$@pGwJ+;m
izA4NR>mof~feTIyc>?!9zh02N;qm(wYwW<Q4*w6N*nmL*

literal 0
HcmV?d00001

-- 
1.5.3.3

^ permalink raw reply related	[flat|nested] 54+ messages in thread

* [U-Boot-Users] [PATCH 26/26] Support AT91CAP9 revC CPUs
  2008-05-08 20:52 [U-Boot-Users] [PATCH v2 ARM/AT91 0/26] AT91SAM/CAP patches for U-Boot 1.3.4 Stelian Pop
                   ` (24 preceding siblings ...)
  2008-05-08 20:52 ` [U-Boot-Users] [PATCH 25/26] Use custom logo for Atmel boards Stelian Pop
@ 2008-05-08 20:52 ` Stelian Pop
  2008-05-08 21:29 ` [U-Boot-Users] [PATCH v2 ARM/AT91 0/26] AT91SAM/CAP patches for U-Boot 1.3.4 Jean-Christophe PLAGNIOL-VILLARD
  2008-05-09 12:11 ` Jean-Christophe PLAGNIOL-VILLARD
  27 siblings, 0 replies; 54+ messages in thread
From: Stelian Pop @ 2008-05-08 20:52 UTC (permalink / raw)
  To: u-boot

The AT91CAP9 revC CPU has a few differences over the previous,
revB CPU which was distributed in small quantities only (revA was
an internal Atmel product only).

The revC silicon needs a special initialisation sequence to
switch from the internal (imprecise) RC oscillator to the
external 32k clock.

Signed-off-by: Stelian Pop <stelian@popies.net>
---
 board/atmel/at91cap9adk/at91cap9adk.c    |   28 ++++++++++++++++++++++++++++
 include/asm-arm/arch-at91sam9/at91_pmc.h |    5 +++++
 include/asm-arm/arch-at91sam9/at91cap9.h |   14 +++++++++++++-
 3 files changed, 46 insertions(+), 1 deletions(-)

diff --git a/board/atmel/at91cap9adk/at91cap9adk.c b/board/atmel/at91cap9adk/at91cap9adk.c
index e353cea..a3eaf19 100644
--- a/board/atmel/at91cap9adk/at91cap9adk.c
+++ b/board/atmel/at91cap9adk/at91cap9adk.c
@@ -72,6 +72,33 @@ static void at91cap9_serial_hw_init(void)
 #endif
 }
 
+static void at91cap9_slowclock_hw_init(void)
+{
+	/*
+	 * On AT91CAP9 revC CPUs, the slow clock can be based on an
+	 * internal impreciseRC oscillator or an external 32kHz oscillator.
+	 * Switch to the latter.
+	 */
+#define ARCH_ID_AT91CAP9_REVB	0x399
+#define ARCH_ID_AT91CAP9_REVC	0x601
+	if (at91_sys_read(AT91_PMC_VER) == ARCH_ID_AT91CAP9_REVC) {
+		unsigned i, tmp = at91_sys_read(AT91_SCKCR);
+		if ((tmp & AT91CAP9_SCKCR_OSCSEL) == AT91CAP9_SCKCR_OSCSEL_RC) {
+			extern void timer_init(void);
+			timer_init();
+			tmp |= AT91CAP9_SCKCR_OSC32EN;
+			at91_sys_write(AT91_SCKCR, tmp);
+			for (i = 0; i < 1200; i++)
+				udelay(1000);
+			tmp |= AT91CAP9_SCKCR_OSCSEL_32;
+			at91_sys_write(AT91_SCKCR, tmp);
+			udelay(200);
+			tmp &= ~AT91CAP9_SCKCR_RCEN;
+			at91_sys_write(AT91_SCKCR, tmp);
+		}
+	}
+}
+
 static void at91cap9_nor_hw_init(void)
 {
 	unsigned long csa;
@@ -305,6 +332,7 @@ int board_init(void)
 	gd->bd->bi_boot_params = PHYS_SDRAM + 0x100;
 
 	at91cap9_serial_hw_init();
+	at91cap9_slowclock_hw_init();
 	at91cap9_nor_hw_init();
 #ifdef CONFIG_CMD_NAND
 	at91cap9_nand_hw_init();
diff --git a/include/asm-arm/arch-at91sam9/at91_pmc.h b/include/asm-arm/arch-at91sam9/at91_pmc.h
index 103be86..b57875d 100644
--- a/include/asm-arm/arch-at91sam9/at91_pmc.h
+++ b/include/asm-arm/arch-at91sam9/at91_pmc.h
@@ -96,4 +96,9 @@
 #define		AT91_PMC_PCK3RDY	(1 << 11)		/* Programmable Clock 3 */
 #define	AT91_PMC_IMR		(AT91_PMC + 0x6c)	/* Interrupt Mask Register */
 
+#define AT91_PMC_PROT		(AT91_PMC + 0xe4)	/* Protect Register [AT91CAP9 revC only] */
+#define		AT91_PMC_PROTKEY	0x504d4301		/* Activation Code */
+
+#define AT91_PMC_VER	(AT91_PMC + 0xfc)	/* PMC Module Version [AT91CAP9 only] */
+
 #endif
diff --git a/include/asm-arm/arch-at91sam9/at91cap9.h b/include/asm-arm/arch-at91sam9/at91cap9.h
index d1b33a0..0b52228 100644
--- a/include/asm-arm/arch-at91sam9/at91cap9.h
+++ b/include/asm-arm/arch-at91sam9/at91cap9.h
@@ -101,13 +101,25 @@
 #define AT91_RTT	(0xfffffd20 - AT91_BASE_SYS)
 #define AT91_PIT	(0xfffffd30 - AT91_BASE_SYS)
 #define AT91_WDT	(0xfffffd40 - AT91_BASE_SYS)
-#define AT91_GPBR	(0xfffffd50 - AT91_BASE_SYS)
+#define AT91_SCKCR	(0xfffffd50 - AT91_BASE_SYS)
+#define AT91_GPBR_REVB	(0xfffffd50 - AT91_BASE_SYS)
+#define AT91_GPBR_REVC	(0xfffffd60 - AT91_BASE_SYS)
 
 #define AT91_USART0	AT91CAP9_BASE_US0
 #define AT91_USART1	AT91CAP9_BASE_US1
 #define AT91_USART2	AT91CAP9_BASE_US2
 
 /*
+ * SCKCR flags
+ */
+#define AT91CAP9_SCKCR_RCEN	(1 << 0)	/* RC Oscillator Enable */
+#define AT91CAP9_SCKCR_OSC32EN	(1 << 1)	/* 32kHz Oscillator Enable */
+#define AT91CAP9_SCKCR_OSC32BYP	(1 << 2)	/* 32kHz Oscillator Bypass */
+#define AT91CAP9_SCKCR_OSCSEL	(1 << 3)	/* Slow Clock Selector */
+#define		AT91CAP9_SCKCR_OSCSEL_RC	(0 << 3)
+#define		AT91CAP9_SCKCR_OSCSEL_32	(1 << 3)
+
+/*
  * Internal Memory.
  */
 #define AT91CAP9_SRAM_BASE	0x00100000	/* Internal SRAM base address */
-- 
1.5.3.3

^ permalink raw reply related	[flat|nested] 54+ messages in thread

* [U-Boot-Users] [PATCH 02/26] Update origin and copyright information in arch-at91sam9 header files
  2008-05-08 20:52 ` [U-Boot-Users] [PATCH 02/26] Update origin and copyright information in arch-at91sam9 header files Stelian Pop
@ 2008-05-08 21:26   ` Jean-Christophe PLAGNIOL-VILLARD
  2008-05-09  8:57     ` Stelian Pop
  2008-05-09 22:26   ` Wolfgang Denk
  1 sibling, 1 reply; 54+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2008-05-08 21:26 UTC (permalink / raw)
  To: u-boot

On 22:52 Thu 08 May     , Stelian Pop wrote:
> When doing the AT91CAP9/AT91SAM9 port, a number of header files were
> copied from the Linux kernel sources. This patch explicitly specifies
> this origin for all the copied headers, and for those missing copyright
> information, adds it.
> 
> Additionaly, the header file 'at91sam926x_mc.h' has been superceeded
> in the latest kernel sources by 'at91sam9_smc.h'.
> 
> The copyright information has been confirmed by the AT91 Linux kernel
> maintainer, Andrew Victor <avictor.za@gmail.com>.
> 
> Signed-off-by: Stelian Pop <stelian@popies.net>
> ---
>  board/atmel/at91cap9adk/at91cap9adk.c              |    2 +-
>  board/atmel/at91sam9260ek/at91sam9260ek.c          |    2 +-
>  include/asm-arm/arch-at91sam9/at91_pio.h           |    2 +-
>  include/asm-arm/arch-at91sam9/at91_pit.h           |    5 +-
>  include/asm-arm/arch-at91sam9/at91_pmc.h           |    2 +-
>  include/asm-arm/arch-at91sam9/at91_rstc.h          |    5 +-
>  include/asm-arm/arch-at91sam9/at91_spi.h           |    2 +-
>  include/asm-arm/arch-at91sam9/at91cap9.h           |    2 +-
>  include/asm-arm/arch-at91sam9/at91cap9_matrix.h    |    2 +-
>  include/asm-arm/arch-at91sam9/at91sam9260.h        |    2 +-
>  include/asm-arm/arch-at91sam9/at91sam9260_matrix.h |    4 +-
>  include/asm-arm/arch-at91sam9/at91sam926x_mc.h     |  140 --------------------
>  include/asm-arm/arch-at91sam9/at91sam9_smc.h       |   76 +++++++++++
>  include/asm-arm/arch-at91sam9/gpio.h               |    2 +-
>  include/asm-arm/arch-at91sam9/hardware.h           |    2 +-
>  include/asm-arm/arch-at91sam9/io.h                 |    2 +-
>  16 files changed, 98 insertions(+), 154 deletions(-)
>  delete mode 100644 include/asm-arm/arch-at91sam9/at91sam926x_mc.h
>  create mode 100644 include/asm-arm/arch-at91sam9/at91sam9_smc.h
> 
> diff --git a/board/atmel/at91cap9adk/at91cap9adk.c b/board/atmel/at91cap9adk/at91cap9adk.c
> index e6ae60c..310a3ef 100644
> --- a/board/atmel/at91cap9adk/at91cap9adk.c
> +++ b/board/atmel/at91cap9adk/at91cap9adk.c
> @@ -25,7 +25,7 @@
>  #include <common.h>
>  #include <asm/arch/at91cap9.h>
>  #include <asm/arch/at91cap9_matrix.h>
> -#include <asm/arch/at91sam926x_mc.h>
> +#include <asm/arch/at91sam_smc.h>
Is not supposed to br 
#include <asm/arch/at91sam9_smc.h>
>  #include <asm/arch/at91_pmc.h>
>  #include <asm/arch/at91_rstc.h>
>  #include <asm/arch/gpio.h>
Best Regards,
J.

^ permalink raw reply	[flat|nested] 54+ messages in thread

* [U-Boot-Users] [PATCH v2 ARM/AT91 0/26] AT91SAM/CAP patches for U-Boot 1.3.4
  2008-05-08 20:52 [U-Boot-Users] [PATCH v2 ARM/AT91 0/26] AT91SAM/CAP patches for U-Boot 1.3.4 Stelian Pop
                   ` (25 preceding siblings ...)
  2008-05-08 20:52 ` [U-Boot-Users] [PATCH 26/26] Support AT91CAP9 revC CPUs Stelian Pop
@ 2008-05-08 21:29 ` Jean-Christophe PLAGNIOL-VILLARD
  2008-05-09  8:54   ` Stelian Pop
  2008-05-09 12:11 ` Jean-Christophe PLAGNIOL-VILLARD
  27 siblings, 1 reply; 54+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2008-05-08 21:29 UTC (permalink / raw)
  To: u-boot

On 22:52 Thu 08 May     , Stelian Pop wrote:
> Hi,
> 
> This is the second version of the AT91CAP9/AT91SAM9 patches,
> which hopefully addresses all the feedbacks I got on the first one.
> 
> The first patches: 01 to 04 fix the copyright notices of some already
> merged files. Those patches may be merged immediately since it would
> be good to have those in 1.3.3-final.
> 
> The patches 05 to 13 fix a number of things in the AT91CAP9 and
> AT91SAM9260 ports (NAND 8/16 bit support, dataflash offsets, SPI
> timings, consistent Linux bootargs).
> 
> The patches 14 to 17 add support for some new Atmel boards:
> 	- AT91SAM9261
> 	- AT91SAM9263
> 	- AT91SAM9RL
> 
> The patches 18 to 25 add a driver for the LCD controller on the Atmel
> boards (except 9260). The driver could probably be adapted, with minimum
> efforts, to the AVR32 boards.
> 
> And finally, the last patch adds support for the revision 'C' of the
> AT91CAP9 silicon, which needs a special initialisation sequence to
> switch from the internal RC oscillator to the external 32k clock.
> 
> Thanks,
> 
> Stelian.
Could you use the --thread of git-format-patch that will help us when we
apply the patch to keep sort?

Best Regards,
J.

^ permalink raw reply	[flat|nested] 54+ messages in thread

* [U-Boot-Users] [PATCH v2 ARM/AT91 0/26] AT91SAM/CAP patches for U-Boot 1.3.4
  2008-05-08 21:29 ` [U-Boot-Users] [PATCH v2 ARM/AT91 0/26] AT91SAM/CAP patches for U-Boot 1.3.4 Jean-Christophe PLAGNIOL-VILLARD
@ 2008-05-09  8:54   ` Stelian Pop
  0 siblings, 0 replies; 54+ messages in thread
From: Stelian Pop @ 2008-05-09  8:54 UTC (permalink / raw)
  To: u-boot


Le jeudi 08 mai 2008 ? 23:29 +0200, Jean-Christophe PLAGNIOL-VILLARD a
?crit :
> On 22:52 Thu 08 May     , Stelian Pop wrote:
> > Hi,
> > 
> > This is the second version of the AT91CAP9/AT91SAM9 patches,
> > which hopefully addresses all the feedbacks I got on the first one.
> > 
[...]

> Could you use the --thread of git-format-patch that will help us when we
> apply the patch to keep sort?

Sure, I'll do.

-- 
Stelian Pop <stelian@popies.net>

^ permalink raw reply	[flat|nested] 54+ messages in thread

* [U-Boot-Users] [PATCH 02/26] Update origin and copyright information in arch-at91sam9 header files
  2008-05-08 21:26   ` Jean-Christophe PLAGNIOL-VILLARD
@ 2008-05-09  8:57     ` Stelian Pop
  2008-05-09 10:12       ` Jean-Christophe PLAGNIOL-VILLARD
  0 siblings, 1 reply; 54+ messages in thread
From: Stelian Pop @ 2008-05-09  8:57 UTC (permalink / raw)
  To: u-boot


Le jeudi 08 mai 2008 ? 23:26 +0200, Jean-Christophe PLAGNIOL-VILLARD a
?crit :

> > +#include <asm/arch/at91sam_smc.h>
> Is not supposed to br 
> #include <asm/arch/at91sam9_smc.h>

Argl, of course it is supposed to be at91sam9_smc. I seen this typo in
the patch before sending it, corrected it, did a test build, and somehow
managed to send the wrong version :(

Jean-Christophe, Wolfgang, do you prefer correcting this by yourselves,
or do you want me to send an updated patch or an incremental one fixing
just the typo ?

Thanks,

-- 
Stelian Pop <stelian@popies.net>

^ permalink raw reply	[flat|nested] 54+ messages in thread

* [U-Boot-Users] [PATCH 02/26] Update origin and copyright information in arch-at91sam9 header files
  2008-05-09  8:57     ` Stelian Pop
@ 2008-05-09 10:12       ` Jean-Christophe PLAGNIOL-VILLARD
  0 siblings, 0 replies; 54+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2008-05-09 10:12 UTC (permalink / raw)
  To: u-boot

On 10:57 Fri 09 May     , Stelian Pop wrote:
> 
> Le jeudi 08 mai 2008 ? 23:26 +0200, Jean-Christophe PLAGNIOL-VILLARD a
> ?crit :
> 
> > > +#include <asm/arch/at91sam_smc.h>
> > Is not supposed to br 
> > #include <asm/arch/at91sam9_smc.h>
> 
> Argl, of course it is supposed to be at91sam9_smc. I seen this typo in
> the patch before sending it, corrected it, did a test build, and somehow
> managed to send the wrong version :(
> 
> Jean-Christophe, Wolfgang, do you prefer correcting this by yourselves,
> or do you want me to send an updated patch or an incremental one fixing
> just the typo ?
I will fix it

Best Regards,
J.

^ permalink raw reply	[flat|nested] 54+ messages in thread

* [U-Boot-Users] [PATCH 14/26] AT91SAM9261EK support
  2008-05-08 20:52 ` [U-Boot-Users] [PATCH 14/26] AT91SAM9261EK support Stelian Pop
@ 2008-05-09 10:41   ` Jean-Christophe PLAGNIOL-VILLARD
  2008-05-09 21:46     ` Stelian Pop
  0 siblings, 1 reply; 54+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2008-05-09 10:41 UTC (permalink / raw)
  To: u-boot

> +#define CONFIG_ATMEL_USART	1
> +#undef CONFIG_USART0
> +#undef CONFIG_USART1
> +#undef CONFIG_USART2
> +#define CONFIG_USART3		1	/* USART 3 is DBGU */
> +
> +#define CONFIG_BOOTDELAY	3
> +
> +/* #define CONFIG_ENV_OVERWRITE	1 */
If no need please remove
> +
> +/*
> + * BOOTP options
> + */
> +#define CONFIG_BOOTP_BOOTFILESIZE	1
> +#define CONFIG_BOOTP_BOOTPATH		1
> +#define CONFIG_BOOTP_GATEWAY		1
> +#define CONFIG_BOOTP_HOSTNAME		1
> +
> +/*
> + * Command line configuration.
> + */
Best Regards,
J.

^ permalink raw reply	[flat|nested] 54+ messages in thread

* [U-Boot-Users] [PATCH 16/26] AT91SAM9263EK support [part 2 of 2]
  2008-05-08 20:52 ` [U-Boot-Users] [PATCH 16/26] AT91SAM9263EK support [part 2 " Stelian Pop
@ 2008-05-09 10:45   ` Jean-Christophe PLAGNIOL-VILLARD
  0 siblings, 0 replies; 54+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2008-05-09 10:45 UTC (permalink / raw)
  To: u-boot

> diff --git a/drivers/net/macb.c b/drivers/net/macb.c
> index 703784e..e5733f6 100644
> --- a/drivers/net/macb.c
> +++ b/drivers/net/macb.c
> @@ -417,13 +417,15 @@ 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)
> +#if defined(CONFIG_AT91CAP9) || defined(CONFIG_AT91SAM9260) || \
> +    defined(CONFIG_AT91SAM9263)
Could we found a better CONFIG than add all board?
>  	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)
> +#if defined(CONFIG_AT91CAP9) || defined(CONFIG_AT91SAM9260) || \
> +    defined(CONFIG_AT91SAM9263)

>  	macb_writel(macb, USRIO, MACB_BIT(CLKEN));
>  #else
>  	macb_writel(macb, USRIO, MACB_BIT(MII));
> diff --git a/include/asm-arm/arch-at91sam9/at91sam9263_matrix.h b/include/asm-arm/arch-at91sam9/at91sam9263_matrix.h
> + *
> + * 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
> + */
> +
> +#ifndef __CONFIG_H
> +#define __CONFIG_H
> +
> +/* ARM asynchronous clock */
> +#define AT91_MAIN_CLOCK		199919000	/* from 16.367 MHz crystal */
> +#define AT91_MASTER_CLOCK	99959500	/* peripheral = main / 2 */
> +#define CFG_HZ			1000000		/* 1us resolution */
> +
> +#define AT91_SLOW_CLOCK		32768	/* slow clock */
> +
> +#define CONFIG_ARM926EJS	1	/* This is an ARM926EJS Core	*/
> +#define CONFIG_AT91SAM9263	1	/* It's an Atmel AT91SAM9263 SoC*/
> +#define CONFIG_AT91SAM9263EK	1	/* on an AT91SAM9263EK Board	*/
> +#undef CONFIG_USE_IRQ			/* we don't need IRQ/FIQ stuff	*/
> +
> +#define CONFIG_CMDLINE_TAG	1	/* enable passing of ATAGs	*/
> +#define CONFIG_SETUP_MEMORY_TAGS 1
> +#define CONFIG_INITRD_TAG	1
> +
> +#define CONFIG_SKIP_LOWLEVEL_INIT
> +#define CONFIG_SKIP_RELOCATE_UBOOT
> +
> +/*
> + * Hardware drivers
> + */
> +#define CONFIG_ATMEL_USART	1
> +#undef CONFIG_USART0
> +#undef CONFIG_USART1
> +#undef CONFIG_USART2
> +#define CONFIG_USART3		1	/* USART 3 is DBGU */
> +
> +#define CONFIG_BOOTDELAY	3
> +
> +/* #define CONFIG_ENV_OVERWRITE	1 */
Same as before if no need please remove

Best Regards,
J.

^ permalink raw reply	[flat|nested] 54+ messages in thread

* [U-Boot-Users] [PATCH 17/26] AT91SAM9RLEK support
  2008-05-08 20:52 ` [U-Boot-Users] [PATCH 17/26] AT91SAM9RLEK support Stelian Pop
@ 2008-05-09 10:51   ` Jean-Christophe PLAGNIOL-VILLARD
  0 siblings, 0 replies; 54+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2008-05-09 10:51 UTC (permalink / raw)
  To: u-boot

> + */
> +#define CONFIG_ATMEL_USART	1
> +#undef CONFIG_USART0
> +#undef CONFIG_USART1
> +#undef CONFIG_USART2
> +#define CONFIG_USART3		1	/* USART 3 is DBGU */
> +
> +#define CONFIG_BOOTDELAY	3
> +
> +/* #define CONFIG_ENV_OVERWRITE	1 */
If no need please remove
> +
> +/*
> + * Command line configuration.
> + */
> +#include <config_cmd_default.h>
> +#undef CONFIG_CMD_BDI
> +#undef CONFIG_CMD_IMI
> +#undef CONFIG_CMD_AUTOSCRIPT
> +#undef CONFIG_CMD_FPGA
> +#undef CONFIG_CMD_LOADS
> +#undef CONFIG_CMD_IMLS
> +#undef CONFIG_CMD_NET
> +#undef CONFIG_CMD_USB
Best regards,
J.

^ permalink raw reply	[flat|nested] 54+ messages in thread

* [U-Boot-Users] [PATCH 20/26] Add ATMEL LCD driver
  2008-05-08 20:52 ` [U-Boot-Users] [PATCH 20/26] Add ATMEL LCD driver Stelian Pop
@ 2008-05-09 10:57   ` Jean-Christophe PLAGNIOL-VILLARD
  2008-05-09 21:57     ` Stelian Pop
  0 siblings, 1 reply; 54+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2008-05-09 10:57 UTC (permalink / raw)
  To: u-boot

> +
> +/* configurable parameters */
> +#define ATMEL_LCDC_CVAL_DEFAULT		0xc8
> +#define ATMEL_LCDC_DMA_BURST_LEN	8
> +
> +#if defined(CONFIG_AT91SAM9263) || defined(CONFIG_AT91CAP9)
> +#define ATMEL_LCDC_FIFO_SIZE		2048
> +#else
> +#define ATMEL_LCDC_FIFO_SIZE		512
> +#endif
> +
> +#define lcdc_readl(mmio, reg)		__raw_readl((mmio)+(reg))
> +#define lcdc_writel(mmio, reg, val)	__raw_writel((val), (mmio)+(reg))
> +
> +void lcd_setcolreg (ushort regno, ushort red, ushort green, ushort blue)
                     ^
Please choose one coding style please
> +{
> +#if defined(CONFIG_ATMEL_LCD_BGR555)
> +	lcdc_writel(panel_info.mmio, ATMEL_LCDC_LUT(regno),
> +		    (red >> 3) | ((green & 0xf8) << 2) | ((blue & 0xf8) << 7));
> +#else
> +	lcdc_writel(panel_info.mmio, ATMEL_LCDC_LUT(regno),
> +		    (blue >> 3) | ((green & 0xfc) << 3) | ((red & 0xf8) << 8));
> +#endif
> +}
> +
> +void lcd_ctrl_init(void *lcdbase)
> +{
> +	unsigned long value;
> +
> +
> +	/* Set framebuffer DMA base address and pixel offset */
> +	lcdc_writel(panel_info.mmio, ATMEL_LCDC_DMABADDR1, (u_long)lcdbase);
> +
> +	lcdc_writel(panel_info.mmio, ATMEL_LCDC_DMACON, ATMEL_LCDC_DMAEN);
> +	lcdc_writel(panel_info.mmio, ATMEL_LCDC_PWRCON,
> +		    (1 << ATMEL_LCDC_GUARDT_OFFSET) | ATMEL_LCDC_PWR);
> +}
> +
> +ulong calc_fbsize (void)
                    ^
Please choose one coding style please
> +{
> +	return ((panel_info.vl_col * panel_info.vl_row *
> +		NBITS(panel_info.vl_bpix)) / 8) + PAGE_SIZE;
> +}

Best Regards,
J.

^ permalink raw reply	[flat|nested] 54+ messages in thread

* [U-Boot-Users] [PATCH v2 ARM/AT91 0/26] AT91SAM/CAP patches for U-Boot 1.3.4
  2008-05-08 20:52 [U-Boot-Users] [PATCH v2 ARM/AT91 0/26] AT91SAM/CAP patches for U-Boot 1.3.4 Stelian Pop
                   ` (26 preceding siblings ...)
  2008-05-08 21:29 ` [U-Boot-Users] [PATCH v2 ARM/AT91 0/26] AT91SAM/CAP patches for U-Boot 1.3.4 Jean-Christophe PLAGNIOL-VILLARD
@ 2008-05-09 12:11 ` Jean-Christophe PLAGNIOL-VILLARD
  2008-05-10 10:21   ` Jean-Christophe PLAGNIOL-VILLARD
  27 siblings, 1 reply; 54+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2008-05-09 12:11 UTC (permalink / raw)
  To: u-boot

Patch series apply in branch testing-V2 of u-boot-at91 tree

Best Regards,
J.

^ permalink raw reply	[flat|nested] 54+ messages in thread

* [U-Boot-Users] [PATCH 19/26] Remember the detected NAND size for later display
  2008-05-08 20:52 ` [U-Boot-Users] [PATCH 19/26] Remember the detected NAND size for later display Stelian Pop
@ 2008-05-09 15:00   ` Scott Wood
  2008-05-09 21:58     ` Stelian Pop
  0 siblings, 1 reply; 54+ messages in thread
From: Scott Wood @ 2008-05-09 15:00 UTC (permalink / raw)
  To: u-boot

On Thu, May 08, 2008 at 10:52:27PM +0200, Stelian Pop wrote:
> This patch adds a field in 'struct bd_info' for saving the detected
> NAND size (result of nand_init() routine). This field can be used later
> (for example in the lcd driver) to print out detailed information about
> the board memories.

Why would an LCD driver care about NAND?  If we want to make the NAND
size printable after boot, how about doing so in the nand info command?

> @@ -52,6 +52,9 @@ typedef struct bd_info {
>      /* second onboard ethernet port */
>      unsigned char   bi_enet1addr[6];
>  #endif
> +#ifdef CONFIG_CMD_NAND
> +    ulong		bi_nand_size;
> +#endif
>  } bd_t;

#ifdefs in bd_t are a nightmare to synchronize between u-boot and the
client; please don't add more.

Is the total size of NAND, rather than the size of any given NAND device,
really useful for the u-boot client?

> --- a/lib_arm/board.c
> +++ b/lib_arm/board.c
> @@ -56,7 +56,7 @@
>  DECLARE_GLOBAL_DATA_PTR;
>  
>  #if defined(CONFIG_CMD_NAND)
> -void nand_init (void);
> +ulong nand_init (void);
>  #endif

Include nand.h rather than redeclaring this.

> @@ -279,7 +279,7 @@ void start_armboot (void)
>  {
>  	init_fnc_t **init_fnc_ptr;
>  	char *s;
> -#ifndef CFG_NO_FLASH
> +#if !defined(CFG_NO_FLASH) || defined (CONFIG_VFD) || defined(CONFIG_LCD)
>  	ulong size;
>  #endif

This patch doesn't seem to introduce new uses of "size" for CONFIG_VFD or
CONFIG_LCD...  perhaps this was meant to be in another patch?

-Scott

^ permalink raw reply	[flat|nested] 54+ messages in thread

* [U-Boot-Users] [PATCH 14/26] AT91SAM9261EK support
  2008-05-09 10:41   ` Jean-Christophe PLAGNIOL-VILLARD
@ 2008-05-09 21:46     ` Stelian Pop
  0 siblings, 0 replies; 54+ messages in thread
From: Stelian Pop @ 2008-05-09 21:46 UTC (permalink / raw)
  To: u-boot

Le vendredi 09 mai 2008 ? 12:41 +0200, Jean-Christophe PLAGNIOL-VILLARD
a ?crit :

> > +/* #define CONFIG_ENV_OVERWRITE	1 */
> If no need please remove

Ok, here is an additional patch for this.

Stelian.

-----------------8<----------------8<-------------------

^ permalink raw reply	[flat|nested] 54+ messages in thread

* [U-Boot-Users] [PATCH 20/26] Add ATMEL LCD driver
  2008-05-09 10:57   ` Jean-Christophe PLAGNIOL-VILLARD
@ 2008-05-09 21:57     ` Stelian Pop
  2008-05-12 16:30       ` Scott Wood
  0 siblings, 1 reply; 54+ messages in thread
From: Stelian Pop @ 2008-05-09 21:57 UTC (permalink / raw)
  To: u-boot


Le vendredi 09 mai 2008 ? 12:57 +0200, Jean-Christophe PLAGNIOL-VILLARD
a ?crit :

> > +void lcd_setcolreg (ushort regno, ushort red, ushort green, ushort blue)
>                      ^
> Please choose one coding style please

Sure. Here is an updated patch. It replaces patches 18, 19 and 20.

Thanks,

Stelian.

-----------------8<------------------8<-----------------8<-------------

^ permalink raw reply	[flat|nested] 54+ messages in thread

* [U-Boot-Users] [PATCH 19/26] Remember the detected NAND size for later display
  2008-05-09 15:00   ` Scott Wood
@ 2008-05-09 21:58     ` Stelian Pop
  0 siblings, 0 replies; 54+ messages in thread
From: Stelian Pop @ 2008-05-09 21:58 UTC (permalink / raw)
  To: u-boot


Le vendredi 09 mai 2008 ? 10:00 -0500, Scott Wood a ?crit :
> On Thu, May 08, 2008 at 10:52:27PM +0200, Stelian Pop wrote:
> > This patch adds a field in 'struct bd_info' for saving the detected
> > NAND size (result of nand_init() routine). This field can be used later
> > (for example in the lcd driver) to print out detailed information about
> > the board memories.
> 
> Why would an LCD driver care about NAND?  If we want to make the NAND
> size printable after boot, how about doing so in the nand info command?

Nevermind, I've reworked those patches.

Thanks,

-- 
Stelian Pop <stelian@popies.net>

^ permalink raw reply	[flat|nested] 54+ messages in thread

* [U-Boot-Users] [PATCH 03/26] Add copyright information in Atmel boards partition.c
  2008-05-08 20:52 ` [U-Boot-Users] [PATCH 03/26] Add copyright information in Atmel boards partition.c Stelian Pop
@ 2008-05-09 22:24   ` Wolfgang Denk
  0 siblings, 0 replies; 54+ messages in thread
From: Wolfgang Denk @ 2008-05-09 22:24 UTC (permalink / raw)
  To: u-boot

In message <1210279954-28692-4-git-send-email-stelian@popies.net> you wrote:
> When Ulf did the dataflash.c cleanup, he didn't add his copyright on
> the new created files. This patch fixes the problem.
> 
> Signed-off-by: Stelian Pop <stelian@popies.net>
> ---
>  board/atmel/at91cap9adk/partition.c   |    2 ++
>  board/atmel/at91rm9200dk/partition.c  |    2 ++
>  board/atmel/at91sam9260ek/partition.c |    2 ++

Applied, thanks.

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
If there are self-made purgatories, then we all have to live in them.
	-- Spock, "This Side of Paradise", stardate 3417.7

^ permalink raw reply	[flat|nested] 54+ messages in thread

* [U-Boot-Users] [PATCH 04/26] Add proper copyright notices in Atmel boards Makefiles
  2008-05-08 20:52 ` [U-Boot-Users] [PATCH 04/26] Add proper copyright notices in Atmel boards Makefiles Stelian Pop
@ 2008-05-09 22:25   ` Wolfgang Denk
  2008-05-13 15:17     ` Stelian Pop
  0 siblings, 1 reply; 54+ messages in thread
From: Wolfgang Denk @ 2008-05-09 22:25 UTC (permalink / raw)
  To: u-boot

In message <1210279954-28692-5-git-send-email-stelian@popies.net> you wrote:
> The Makefiles for the AT91CAP9/AT91SAM9 boards have an incomplete
> copyright notice. This patch adds the missing pieces.
> 
> Signed-off-by: Stelian Pop <stelian@popies.net>
> ---
>  board/atmel/at91cap9adk/Makefile   |    4 ++++
>  board/atmel/at91sam9260ek/Makefile |    4 ++++
>  2 files changed, 8 insertions(+), 0 deletions(-)

Does not apply to currnt tree:

Applying Add proper copyright notices in Atmel boards Makefiles
error: patch failed: board/atmel/at91cap9adk/Makefile:2
error: board/atmel/at91cap9adk/Makefile: patch does not apply
error: patch failed: board/atmel/at91sam9260ek/Makefile:2
error: board/atmel/at91sam9260ek/Makefile: patch does not apply
fatal: sha1 information is lacking or useless
(board/atmel/at91cap9adk/Makefile).
Repository lacks necessary blobs to fall back on 3-way merge.
Cannot fall back to three-way merge.
Patch failed at 0001.


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
Always try to do things in chronological order; it's  less  confusing
that way.

^ permalink raw reply	[flat|nested] 54+ messages in thread

* [U-Boot-Users] [PATCH 02/26] Update origin and copyright information in arch-at91sam9 header files
  2008-05-08 20:52 ` [U-Boot-Users] [PATCH 02/26] Update origin and copyright information in arch-at91sam9 header files Stelian Pop
  2008-05-08 21:26   ` Jean-Christophe PLAGNIOL-VILLARD
@ 2008-05-09 22:26   ` Wolfgang Denk
  1 sibling, 0 replies; 54+ messages in thread
From: Wolfgang Denk @ 2008-05-09 22:26 UTC (permalink / raw)
  To: u-boot

In message <1210279954-28692-3-git-send-email-stelian@popies.net> you wrote:
> When doing the AT91CAP9/AT91SAM9 port, a number of header files were
> copied from the Linux kernel sources. This patch explicitly specifies
> this origin for all the copied headers, and for those missing copyright
> information, adds it.
> 
> Additionaly, the header file 'at91sam926x_mc.h' has been superceeded
> in the latest kernel sources by 'at91sam9_smc.h'.
> 
> The copyright information has been confirmed by the AT91 Linux kernel
> maintainer, Andrew Victor <avictor.za@gmail.com>.
> 
> Signed-off-by: Stelian Pop <stelian@popies.net>
> ---
>  board/atmel/at91cap9adk/at91cap9adk.c              |    2 +-
>  board/atmel/at91sam9260ek/at91sam9260ek.c          |    2 +-
>  include/asm-arm/arch-at91sam9/at91_pio.h           |    2 +-
>  include/asm-arm/arch-at91sam9/at91_pit.h           |    5 +-
>  include/asm-arm/arch-at91sam9/at91_pmc.h           |    2 +-
>  include/asm-arm/arch-at91sam9/at91_rstc.h          |    5 +-
>  include/asm-arm/arch-at91sam9/at91_spi.h           |    2 +-
>  include/asm-arm/arch-at91sam9/at91cap9.h           |    2 +-
>  include/asm-arm/arch-at91sam9/at91cap9_matrix.h    |    2 +-
>  include/asm-arm/arch-at91sam9/at91sam9260.h        |    2 +-
>  include/asm-arm/arch-at91sam9/at91sam9260_matrix.h |    4 +-
>  include/asm-arm/arch-at91sam9/at91sam926x_mc.h     |  140 --------------------
>  include/asm-arm/arch-at91sam9/at91sam9_smc.h       |   76 +++++++++++
>  include/asm-arm/arch-at91sam9/gpio.h               |    2 +-
>  include/asm-arm/arch-at91sam9/hardware.h           |    2 +-
>  include/asm-arm/arch-at91sam9/io.h                 |    2 +-
>  16 files changed, 98 insertions(+), 154 deletions(-)
>  delete mode 100644 include/asm-arm/arch-at91sam9/at91sam926x_mc.h
>  create mode 100644 include/asm-arm/arch-at91sam9/at91sam9_smc.h

Applied, thanks.

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
I often quote myself; it adds spice to my conversation.  - G. B. Shaw

^ permalink raw reply	[flat|nested] 54+ messages in thread

* [U-Boot-Users] [PATCH 01/26] Fix @ -> <at> substitution
  2008-05-08 20:52 ` [U-Boot-Users] [PATCH 01/26] Fix @ -> <at> substitution Stelian Pop
@ 2008-05-09 22:30   ` Wolfgang Denk
  0 siblings, 0 replies; 54+ messages in thread
From: Wolfgang Denk @ 2008-05-09 22:30 UTC (permalink / raw)
  To: u-boot

In message <1210279954-28692-2-git-send-email-stelian@popies.net> you wrote:
> When applying the AT91CAP9 patches upstream, something transformed
> the '@' character into the ' <at> ' sequence.
> 
> The patch below restores the original form in all the places where
> it has been modified (the AT91CAP9 files, the AT91SAM9260 files which
> were copied from AT91CAP9, and a couple of other files where the
> ' <at> ' sequence was present).
> 
> Signed-off-by: Stelian Pop <stelian@popies.net>
> ---
>  CHANGELOG                                  |   12 ++++++------
>  board/atmel/at91cap9adk/Makefile           |    2 +-
>  board/atmel/at91cap9adk/at91cap9adk.c      |    2 +-
>  board/atmel/at91cap9adk/led.c              |    2 +-
>  board/atmel/at91cap9adk/nand.c             |    2 +-
>  board/atmel/at91cap9adk/u-boot.lds         |    2 +-
>  board/atmel/at91sam9260ek/Makefile         |    2 +-
>  board/atmel/at91sam9260ek/at91sam9260ek.c  |    2 +-
>  board/atmel/at91sam9260ek/led.c            |    2 +-
>  board/atmel/at91sam9260ek/nand.c           |    2 +-
>  board/atmel/at91sam9260ek/u-boot.lds       |    2 +-
>  cpu/arm926ejs/at91sam9/Makefile            |    2 +-
>  cpu/arm926ejs/at91sam9/ether.c             |    2 +-
>  cpu/arm926ejs/at91sam9/lowlevel_init.S     |    2 +-
>  cpu/arm926ejs/at91sam9/timer.c             |    2 +-
>  cpu/arm926ejs/at91sam9/usb.c               |    2 +-
>  drivers/net/smc911x.c                      |    2 +-
>  include/asm-arm/arch-at91sam9/clk.h        |    2 +-
>  include/asm-arm/arch-at91sam9/memory-map.h |    2 +-
>  include/asm-arm/dma-mapping.h              |    2 +-
>  include/configs/at91cap9adk.h              |    2 +-
>  include/configs/at91sam9260ek.h            |    2 +-
>  22 files changed, 27 insertions(+), 27 deletions(-)

Applied, thanks.

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
Live long and prosper.
	-- Spock, "Amok Time", stardate 3372.7

^ permalink raw reply	[flat|nested] 54+ messages in thread

* [U-Boot-Users] [PATCH v2 ARM/AT91 0/26] AT91SAM/CAP patches for U-Boot 1.3.4
  2008-05-09 12:11 ` Jean-Christophe PLAGNIOL-VILLARD
@ 2008-05-10 10:21   ` Jean-Christophe PLAGNIOL-VILLARD
  2008-05-13 15:32     ` Stelian Pop
  0 siblings, 1 reply; 54+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2008-05-10 10:21 UTC (permalink / raw)
  To: u-boot

On 14:11 Fri 09 May     , Jean-Christophe PLAGNIOL-VILLARD wrote:
> Patch series apply in branch testing-V2 of u-boot-at91 tree
branch testing-V2 update with last patch

diff

Fix Update origin and copyright information in arch-at91sam9 header files

PATCH 18, 19 and 20 replace by last Add ATMEL LCD driver

PATCH AT91SAM9263EK support 1 & 2 Joined

add

AT91: Cleanup unused config header file definitions.

Stelian could test and check it please

Best Regards,
J.

^ permalink raw reply	[flat|nested] 54+ messages in thread

* [U-Boot-Users] [PATCH 20/26] Add ATMEL LCD driver
  2008-05-09 21:57     ` Stelian Pop
@ 2008-05-12 16:30       ` Scott Wood
  2008-05-13 15:28         ` Stelian Pop
  0 siblings, 1 reply; 54+ messages in thread
From: Scott Wood @ 2008-05-12 16:30 UTC (permalink / raw)
  To: u-boot

On Fri, May 09, 2008 at 11:57:18PM +0200, Stelian Pop wrote:
> +#if defined(CONFIG_ATMEL_LCD)
> +#include <atmel_lcdc.h>
> +#include <nand.h>
> +extern nand_info_t nand_info[];
> +#endif

nand_info is declared in nand.h.  No need to redeclare it.

-Scott

^ permalink raw reply	[flat|nested] 54+ messages in thread

* [U-Boot-Users] [PATCH 04/26] Add proper copyright notices in Atmel boards Makefiles
  2008-05-09 22:25   ` Wolfgang Denk
@ 2008-05-13 15:17     ` Stelian Pop
  0 siblings, 0 replies; 54+ messages in thread
From: Stelian Pop @ 2008-05-13 15:17 UTC (permalink / raw)
  To: u-boot


Le samedi 10 mai 2008 ? 00:25 +0200, Wolfgang Denk a ?crit :
> In message <1210279954-28692-5-git-send-email-stelian@popies.net> you wrote:
> > The Makefiles for the AT91CAP9/AT91SAM9 boards have an incomplete
> > copyright notice. This patch adds the missing pieces.
> > 
> > Signed-off-by: Stelian Pop <stelian@popies.net>
> > ---
> >  board/atmel/at91cap9adk/Makefile   |    4 ++++
> >  board/atmel/at91sam9260ek/Makefile |    4 ++++
> >  2 files changed, 8 insertions(+), 0 deletions(-)
> 
> Does not apply to currnt tree:

I'm not sure why is that, it seems to apply just fine on top of current
git HEAD. I'm sending it again.

Stelian.

-- 
Stelian Pop <stelian@popies.net>

^ permalink raw reply	[flat|nested] 54+ messages in thread

* [U-Boot-Users] [PATCH 20/26] Add ATMEL LCD driver
  2008-05-12 16:30       ` Scott Wood
@ 2008-05-13 15:28         ` Stelian Pop
  0 siblings, 0 replies; 54+ messages in thread
From: Stelian Pop @ 2008-05-13 15:28 UTC (permalink / raw)
  To: u-boot


Le lundi 12 mai 2008 ? 11:30 -0500, Scott Wood a ?crit :
> On Fri, May 09, 2008 at 11:57:18PM +0200, Stelian Pop wrote:
> > +#if defined(CONFIG_ATMEL_LCD)
> > +#include <atmel_lcdc.h>
> > +#include <nand.h>
> > +extern nand_info_t nand_info[];
> > +#endif
> 
> nand_info is declared in nand.h.  No need to redeclare it.

Indeed. This is because I copy/pasted the same declaration from
cmd_nand.c. I'll submit a patch cleaning up all the uses of nand_info[].

Thanks,

-- 
Stelian Pop <stelian@popies.net>

^ permalink raw reply	[flat|nested] 54+ messages in thread

* [U-Boot-Users] [PATCH v2 ARM/AT91 0/26] AT91SAM/CAP patches for U-Boot 1.3.4
  2008-05-10 10:21   ` Jean-Christophe PLAGNIOL-VILLARD
@ 2008-05-13 15:32     ` Stelian Pop
  2008-05-24 11:20       ` Jean-Christophe PLAGNIOL-VILLARD
  0 siblings, 1 reply; 54+ messages in thread
From: Stelian Pop @ 2008-05-13 15:32 UTC (permalink / raw)
  To: u-boot


Le samedi 10 mai 2008 ? 12:21 +0200, Jean-Christophe PLAGNIOL-VILLARD a
?crit :
> On 14:11 Fri 09 May     , Jean-Christophe PLAGNIOL-VILLARD wrote:
> > Patch series apply in branch testing-V2 of u-boot-at91 tree
> branch testing-V2 update with last patch
> 
> diff
> 
> Fix Update origin and copyright information in arch-at91sam9 header files
> 
> PATCH 18, 19 and 20 replace by last Add ATMEL LCD driver
> 
> PATCH AT91SAM9263EK support 1 & 2 Joined
> 
> add
> 
> AT91: Cleanup unused config header file definitions.
> 
> Stelian could test and check it please

Everything is looking ok.

Thanks,

-- 
Stelian Pop <stelian@popies.net>

^ permalink raw reply	[flat|nested] 54+ messages in thread

* [U-Boot-Users] [PATCH 18/26] Make nand_init() return the detected NAND size
  2008-05-08 20:52 ` [U-Boot-Users] [PATCH 18/26] Make nand_init() return the detected NAND size Stelian Pop
@ 2008-05-22 15:50   ` Scott Wood
  2008-05-22 16:17     ` Jean-Christophe PLAGNIOL-VILLARD
  0 siblings, 1 reply; 54+ messages in thread
From: Scott Wood @ 2008-05-22 15:50 UTC (permalink / raw)
  To: u-boot

On Thu, May 08, 2008 at 10:52:26PM +0200, Stelian Pop wrote:
> This patch modifies the nand_init() routine and makes it return the
> total detected NAND size, since this information can be useful to the
> caller.

Applied to u-boot-nand-flash.

-Scott

^ permalink raw reply	[flat|nested] 54+ messages in thread

* [U-Boot-Users] [PATCH 18/26] Make nand_init() return the detected NAND size
  2008-05-22 15:50   ` Scott Wood
@ 2008-05-22 16:17     ` Jean-Christophe PLAGNIOL-VILLARD
  2008-05-22 16:57       ` Scott Wood
  0 siblings, 1 reply; 54+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2008-05-22 16:17 UTC (permalink / raw)
  To: u-boot

On 10:50 Thu 22 May     , Scott Wood wrote:
> On Thu, May 08, 2008 at 10:52:26PM +0200, Stelian Pop wrote:
> > This patch modifies the nand_init() routine and makes it return the
> > total detected NAND size, since this information can be useful to the
> > caller.
> 
> Applied to u-boot-nand-flash.
If possible please do not apply any think of this patch set.

If each custodian can ack his part I'll send a pull request on the at91
which have the patch set apply actually

Best Regards,
J.

^ permalink raw reply	[flat|nested] 54+ messages in thread

* [U-Boot-Users] [PATCH 18/26] Make nand_init() return the detected NAND size
  2008-05-22 16:17     ` Jean-Christophe PLAGNIOL-VILLARD
@ 2008-05-22 16:57       ` Scott Wood
  0 siblings, 0 replies; 54+ messages in thread
From: Scott Wood @ 2008-05-22 16:57 UTC (permalink / raw)
  To: u-boot

Jean-Christophe PLAGNIOL-VILLARD wrote:
> On 10:50 Thu 22 May     , Scott Wood wrote:
>> On Thu, May 08, 2008 at 10:52:26PM +0200, Stelian Pop wrote:
>>> This patch modifies the nand_init() routine and makes it return the
>>> total detected NAND size, since this information can be useful to the
>>> caller.
>> Applied to u-boot-nand-flash.
> If possible please do not apply any think of this patch set.
> 
> If each custodian can ack his part I'll send a pull request on the at91
> which have the patch set apply actually

OK, reverted and Acked-by: Scott Wood <scottwood@freescale.com>

-Scott

^ permalink raw reply	[flat|nested] 54+ messages in thread

* [U-Boot-Users] [PATCH v2 ARM/AT91 0/26] AT91SAM/CAP patches for U-Boot 1.3.4
  2008-05-13 15:32     ` Stelian Pop
@ 2008-05-24 11:20       ` Jean-Christophe PLAGNIOL-VILLARD
  0 siblings, 0 replies; 54+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2008-05-24 11:20 UTC (permalink / raw)
  To: u-boot

On 17:32 Tue 13 May     , Stelian Pop wrote:
> 
> Le samedi 10 mai 2008 ? 12:21 +0200, Jean-Christophe PLAGNIOL-VILLARD a
> ?crit :
> > On 14:11 Fri 09 May     , Jean-Christophe PLAGNIOL-VILLARD wrote:
> > > Patch series apply in branch testing-V2 of u-boot-at91 tree
> > branch testing-V2 update with last patch
> > 
> > diff
> > 
> > Fix Update origin and copyright information in arch-at91sam9 header files
> > 
> > PATCH 18, 19 and 20 replace by last Add ATMEL LCD driver
> > 
> > PATCH AT91SAM9263EK support 1 & 2 Joined
> > 
> > add
> > 
> > AT91: Cleanup unused config header file definitions.
> > 
> > Stelian could test and check it please
> 
> Everything is looking ok.
> 
Merge with current HEAD into for-1.3.4

Best Regards,
J.

^ permalink raw reply	[flat|nested] 54+ messages in thread

end of thread, other threads:[~2008-05-24 11:20 UTC | newest]

Thread overview: 54+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-08 20:52 [U-Boot-Users] [PATCH v2 ARM/AT91 0/26] AT91SAM/CAP patches for U-Boot 1.3.4 Stelian Pop
2008-05-08 20:52 ` [U-Boot-Users] [PATCH 01/26] Fix @ -> <at> substitution Stelian Pop
2008-05-09 22:30   ` Wolfgang Denk
2008-05-08 20:52 ` [U-Boot-Users] [PATCH 02/26] Update origin and copyright information in arch-at91sam9 header files Stelian Pop
2008-05-08 21:26   ` Jean-Christophe PLAGNIOL-VILLARD
2008-05-09  8:57     ` Stelian Pop
2008-05-09 10:12       ` Jean-Christophe PLAGNIOL-VILLARD
2008-05-09 22:26   ` Wolfgang Denk
2008-05-08 20:52 ` [U-Boot-Users] [PATCH 03/26] Add copyright information in Atmel boards partition.c Stelian Pop
2008-05-09 22:24   ` Wolfgang Denk
2008-05-08 20:52 ` [U-Boot-Users] [PATCH 04/26] Add proper copyright notices in Atmel boards Makefiles Stelian Pop
2008-05-09 22:25   ` Wolfgang Denk
2008-05-13 15:17     ` Stelian Pop
2008-05-08 20:52 ` [U-Boot-Users] [PATCH 05/26] Use a common u-boot.lds file across all AT91CAP9/AT91SAM9 platforms Stelian Pop
2008-05-08 20:52 ` [U-Boot-Users] [PATCH 06/26] AT91CAP9ADK: Handle 8 or 16 bit NAND Stelian Pop
2008-05-08 20:52 ` [U-Boot-Users] [PATCH 07/26] AT91CAP9ADK: Normalize SPI timings Stelian Pop
2008-05-08 20:52 ` [U-Boot-Users] [PATCH 08/26] AT91CAP9ADK: Normalize BOOTARGS Stelian Pop
2008-05-08 20:52 ` [U-Boot-Users] [PATCH 09/26] AT91CAP9ADK: Fix dataflash offsets in CONFIG_BOOTCOMMAND Stelian Pop
2008-05-08 20:52 ` [U-Boot-Users] [PATCH 10/26] AT91SAM9260EK: Handle 8 or 16 bit NAND Stelian Pop
2008-05-08 20:52 ` [U-Boot-Users] [PATCH 11/26] AT91SAM9260EK: Normalize SPI timings Stelian Pop
2008-05-08 20:52 ` [U-Boot-Users] [PATCH 12/26] AT91SAM9260EK: Normalize BOOTARGS Stelian Pop
2008-05-08 20:52 ` [U-Boot-Users] [PATCH 13/26] AT91SAM9260EK: Fix dataflash offsets in CONFIG_BOOTCOMMAND Stelian Pop
2008-05-08 20:52 ` [U-Boot-Users] [PATCH 14/26] AT91SAM9261EK support Stelian Pop
2008-05-09 10:41   ` Jean-Christophe PLAGNIOL-VILLARD
2008-05-09 21:46     ` Stelian Pop
2008-05-08 20:52 ` [U-Boot-Users] [PATCH 15/26] AT91SAM9263EK support [part 1 of 2] Stelian Pop
2008-05-08 20:52 ` [U-Boot-Users] [PATCH 16/26] AT91SAM9263EK support [part 2 " Stelian Pop
2008-05-09 10:45   ` Jean-Christophe PLAGNIOL-VILLARD
2008-05-08 20:52 ` [U-Boot-Users] [PATCH 17/26] AT91SAM9RLEK support Stelian Pop
2008-05-09 10:51   ` Jean-Christophe PLAGNIOL-VILLARD
2008-05-08 20:52 ` [U-Boot-Users] [PATCH 18/26] Make nand_init() return the detected NAND size Stelian Pop
2008-05-22 15:50   ` Scott Wood
2008-05-22 16:17     ` Jean-Christophe PLAGNIOL-VILLARD
2008-05-22 16:57       ` Scott Wood
2008-05-08 20:52 ` [U-Boot-Users] [PATCH 19/26] Remember the detected NAND size for later display Stelian Pop
2008-05-09 15:00   ` Scott Wood
2008-05-09 21:58     ` Stelian Pop
2008-05-08 20:52 ` [U-Boot-Users] [PATCH 20/26] Add ATMEL LCD driver Stelian Pop
2008-05-09 10:57   ` Jean-Christophe PLAGNIOL-VILLARD
2008-05-09 21:57     ` Stelian Pop
2008-05-12 16:30       ` Scott Wood
2008-05-13 15:28         ` Stelian Pop
2008-05-08 20:52 ` [U-Boot-Users] [PATCH 21/26] AT91CAP9ADK: hook up the " Stelian Pop
2008-05-08 20:52 ` [U-Boot-Users] [PATCH 22/26] AT91SAM9261EK: " Stelian Pop
2008-05-08 20:52 ` [U-Boot-Users] [PATCH 23/26] AT91SAM9263EK: " Stelian Pop
2008-05-08 20:52 ` [U-Boot-Users] [PATCH 24/26] AT91SAM9RLEK: " Stelian Pop
2008-05-08 20:52 ` [U-Boot-Users] [PATCH 25/26] Use custom logo for Atmel boards Stelian Pop
2008-05-08 20:52 ` [U-Boot-Users] [PATCH 26/26] Support AT91CAP9 revC CPUs Stelian Pop
2008-05-08 21:29 ` [U-Boot-Users] [PATCH v2 ARM/AT91 0/26] AT91SAM/CAP patches for U-Boot 1.3.4 Jean-Christophe PLAGNIOL-VILLARD
2008-05-09  8:54   ` Stelian Pop
2008-05-09 12:11 ` Jean-Christophe PLAGNIOL-VILLARD
2008-05-10 10:21   ` Jean-Christophe PLAGNIOL-VILLARD
2008-05-13 15:32     ` Stelian Pop
2008-05-24 11:20       ` Jean-Christophe PLAGNIOL-VILLARD

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox