[U-Boot] [PATCH] 85xx: Fix the clock adjust of mpc8569mds board

2009-03-27 Thread Dave Liu
Currently the clk_adj is 6 (3/4 cycle), The settings will cause
the DDR controller hang at the data init. Change the clk_adj
from 6 to 4 (1/2 cycle), make the memory system stable.

Signed-off-by: Dave Liu dave...@freescale.com
---
 board/freescale/mpc8569mds/ddr.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/board/freescale/mpc8569mds/ddr.c b/board/freescale/mpc8569mds/ddr.c
index c4e63fb..da1e675 100644
--- a/board/freescale/mpc8569mds/ddr.c
+++ b/board/freescale/mpc8569mds/ddr.c
@@ -56,7 +56,7 @@ void fsl_ddr_board_options(memctl_options_t *popts,
 *  01103/4 cycle late
 *  01117/8 cycle late
 */
-   popts-clk_adjust = 6;
+   popts-clk_adjust = 4;
 
/*
 * Factors to consider for CPO:
-- 
1.5.4

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 1/2] Fix OneNAND ipl to read CONFIG_SYS_MONITOR_LEN

2009-03-27 Thread apgmoorthy
Currently OneNAND initial program loader (ipl) reads only block 0 ie 128KB.
However, u-boot image for apollon board is 195KB making the board
unbootable with OneNAND.

Fix ipl to read CONFIG_SYS_MONITOR_LEN.
CONFIG_SYS_MONITOR_LEN macro holds the U-Boot image size.

 Signed-off-by: Rohit Hagargundgi h.ro...@samsung.com
 Signed-off-by: Gangheyamoorthy   moorthy@samsung.com
---
 onenand_boot.c |2 -
 onenand_ipl.h  |8 ++-
 onenand_read.c |   58 +++--
 3 files changed, 44 insertions(+), 24 deletions(-) 
diff --git a/onenand_ipl/onenand_boot.c b/onenand_ipl/onenand_boot.c
index 86428cc..63995ce 100644
--- a/onenand_ipl/onenand_boot.c
+++ b/onenand_ipl/onenand_boot.c
@@ -36,7 +36,7 @@ void start_oneboot(void)
 
buf = (uchar *) CONFIG_SYS_LOAD_ADDR;
 
-   onenand_read_block0(buf);
+   onenand_read_block(buf);
 
((init_fnc_t *)CONFIG_SYS_LOAD_ADDR)();
 
diff --git a/onenand_ipl/onenand_ipl.h b/onenand_ipl/onenand_ipl.h
index 57e54f5..412572a 100644
--- a/onenand_ipl/onenand_ipl.h
+++ b/onenand_ipl/onenand_ipl.h
@@ -23,15 +23,13 @@
 
 #include linux/mtd/onenand_regs.h
 
-#define onenand_readw(a)readw(a)
-#define onenand_writew(v, a)writew(v, a)
+#define onenand_readw(a)readw(THIS_ONENAND(a))
+#define onenand_writew(v, a)writew(v, THIS_ONENAND(a))
 
 #define THIS_ONENAND(a) (CONFIG_SYS_ONENAND_BASE + (a))
 
 #define READ_INTERRUPT()\
onenand_readw(THIS_ONENAND(ONENAND_REG_INTERRUPT))
 
-#define ONENAND_PAGE_SIZE   2048
-
-extern int onenand_read_block0(unsigned char *buf);
+extern int onenand_read_block(unsigned char *buf);
 #endif
diff --git a/onenand_ipl/onenand_read.c b/onenand_ipl/onenand_read.c
index 6d04943..7886358 100644
--- a/onenand_ipl/onenand_read.c
+++ b/onenand_ipl/onenand_read.c
@@ -49,20 +49,20 @@ static inline int onenand_read_page(ulong block, ulong page,
 #endif
 
onenand_writew(onenand_block_address(block),
-   THIS_ONENAND(ONENAND_REG_START_ADDRESS1));
+   ONENAND_REG_START_ADDRESS1);
 
onenand_writew(onenand_bufferram_address(block),
-   THIS_ONENAND(ONENAND_REG_START_ADDRESS2));
+   ONENAND_REG_START_ADDRESS2);
 
onenand_writew(onenand_sector_address(page),
-   THIS_ONENAND(ONENAND_REG_START_ADDRESS8));
+   ONENAND_REG_START_ADDRESS8);
 
onenand_writew(onenand_buffer_address(),
-   THIS_ONENAND(ONENAND_REG_START_BUFFER));
+   ONENAND_REG_START_BUFFER);
 
-   onenand_writew(ONENAND_INT_CLEAR, THIS_ONENAND(ONENAND_REG_INTERRUPT));
+   onenand_writew(ONENAND_INT_CLEAR, ONENAND_REG_INTERRUPT);
 
-   onenand_writew(ONENAND_CMD_READ, THIS_ONENAND(ONENAND_REG_COMMAND));
+   onenand_writew(ONENAND_CMD_READ, ONENAND_REG_COMMAND);
 
 #ifndef __HAVE_ARCH_MEMCPY32
p = (unsigned long *) buf;
@@ -72,6 +72,10 @@ static inline int onenand_read_page(ulong block, ulong page,
while (!(READ_INTERRUPT()  ONENAND_INT_READ))
continue;
 
+   /* Check for invalid block mark */
+   if (page  2  (onenand_readw(ONENAND_SPARERAM) != 0x))
+   return 1;
+
 #ifdef __HAVE_ARCH_MEMCPY32
/* 32 bytes boundary memory copy */
memcpy32(buf, base, pagesize);
@@ -89,25 +93,43 @@ static inline int onenand_read_page(ulong block, ulong page,
 #define ONENAND_PAGES_PER_BLOCK64
 
 /**
- * onenand_read_block - Read a block data to buf
+ * onenand_read_block - Read CONFIG_SYS_MONITOR_LEN from begining
+ *  of OneNAND, skipping bad blocks
  * @return 0 on success
  */
-int onenand_read_block0(unsigned char *buf)
+int onenand_read_block(unsigned char *buf)
 {
-   int page, offset = 0;
-   int pagesize = ONENAND_PAGE_SIZE;
+   int block;
+   int page = ONENAND_START_PAGE, offset = 0;
+   int pagesize = 0, erase_shift = 0;
+   int erasesize = 0, nblocks = 0;
+
+   if (onenand_readw(ONENAND_REG_TECHNOLOGY)) {
+   pagesize = 4096; /* MLC OneNAND has 4KiB pagesize */
+   erase_shift = 18;
+   } else {
+   pagesize = 2048;
+   erase_shift = 17;
+   }
 
-   /* MLC OneNAND has 4KiB page size */
-   if (onenand_readw(THIS_ONENAND(ONENAND_REG_TECHNOLOGY)))
-   pagesize = 1;
+   erasesize = ONENAND_PAGES_PER_BLOCK * pagesize;
+   nblocks = (CONFIG_SYS_MONITOR_LEN + erasesize - 1)  erase_shift;
 
/* NOTE: you must read page from page 1 of block 0 */
/* read the block page by page*/
-   for (page = ONENAND_START_PAGE;
-   page  ONENAND_PAGES_PER_BLOCK; page++) {
-
-   onenand_read_page(0, page, buf + offset, pagesize);
-   offset += pagesize;
+   for (block = 0; block  nblocks; block++) {
+   for (; 

[U-Boot] [PATCH 1/2] at91: Improved Atmel AT45DB081 dataflash support

2009-03-27 Thread Daniel Gorsulowski
This patch improves Atmel AT45DB081 dataflash support.

Signed-off-by: Daniel Gorsulowski daniel.gorsulow...@esd.eu
---
 drivers/mtd/dataflash.c |7 ---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/mtd/dataflash.c b/drivers/mtd/dataflash.c
index 96cd395..4b768e7 100644
--- a/drivers/mtd/dataflash.c
+++ b/drivers/mtd/dataflash.c
@@ -199,7 +199,7 @@ void dataflash_print_info (void)
 
for (i = 0; i  CONFIG_SYS_MAX_DATAFLASH_BANKS; i++) {
if (dataflash_info[i].id != 0) {
-   printf(DataFlash:);
+   printf(DataFlash: );
switch (dataflash_info[i].id) {
case AT45DB021:
printf(AT45DB021\n);
@@ -207,11 +207,12 @@ void dataflash_print_info (void)
case AT45DB161:
printf(AT45DB161\n);
break;
-
+   case AT45DB081:
+   printf(AT45DB081\n);
+   break;
case AT45DB321:
printf(AT45DB321\n);
break;
-
case AT45DB642:
printf(AT45DB642\n);
break;
-- 
1.6.1

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 2/2] at91: Add support for esd MEESC board

2009-03-27 Thread Daniel Gorsulowski
This patch adds support for MEESC board from esd gmbh.
The MEESC is based on an Atmel AT91SAM9263 SoC.

Signed-off-by: Daniel Gorsulowski daniel.gorsulow...@esd.eu
---
 MAINTAINERS   |4 +
 MAKEALL   |1 +
 Makefile  |3 +
 board/esd/meesc/Makefile  |   54 ++
 board/esd/meesc/config.mk |1 +
 board/esd/meesc/meesc.c   |  400 +
 include/configs/meesc.h   |  185 +
 7 files changed, 648 insertions(+), 0 deletions(-)
 create mode 100644 board/esd/meesc/Makefile
 create mode 100644 board/esd/meesc/config.mk
 create mode 100644 board/esd/meesc/meesc.c
 create mode 100644 include/configs/meesc.h

diff --git a/MAINTAINERS b/MAINTAINERS
index ce25c1b..ccfcd2a 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -517,6 +517,10 @@ Peter Figuli pep...@etc.sk
 
wepep250xscale
 
+Daniel Gorsulowski daniel.gorsulow...@esd.eu
+
+   meesc   ARM926EJS (AT91SAM9263 SoC)
+
 Marius Gröger m...@sysgo.de
 
impa7   ARM720T (EP7211)
diff --git a/MAKEALL b/MAKEALL
index aa7095e..f9e34c6 100755
--- a/MAKEALL
+++ b/MAKEALL
@@ -578,6 +578,7 @@ LIST_at91= \
cmc_pu2 \
csb637  \
kb9202  \
+   meesc   \
mp2usb  \
m501sk  \
 
diff --git a/Makefile b/Makefile
index 1cce381..a18cc66 100644
--- a/Makefile
+++ b/Makefile
@@ -2739,6 +2739,9 @@ at91sam9rlek_config   :   unconfig
fi;
@$(MKCONFIG) -a at91sam9rlek arm arm926ejs at91sam9rlek atmel at91
 
+meesc_config   :   unconfig
+   @$(MKCONFIG) $(@:_config=) arm arm926ejs meesc esd at91
+
 
 ## ARM Integrator boards - see doc/README-integrator for more info.
 integratorap_config\
diff --git a/board/esd/meesc/Makefile b/board/esd/meesc/Makefile
new file mode 100644
index 000..6187174
--- /dev/null
+++ b/board/esd/meesc/Makefile
@@ -0,0 +1,54 @@
+#
+# (C) Copyright 2003-2008
+# Wolfgang Denk, DENX Software Engineering, w...@denx.de.
+#
+# (C) Copyright 2008
+# Stelian Pop stelian@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 += meesc.o
+
+SRCS   := $(SOBJS:.o=.S) $(COBJS-y:.o=.c)
+OBJS   := $(addprefix $(obj),$(COBJS-y))
+SOBJS  := $(addprefix $(obj),$(SOBJS))
+
+$(LIB):$(obj).depend $(OBJS) $(SOBJS)
+   $(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS)
+
+clean:
+   rm -f $(SOBJS) $(OBJS)
+
+distclean: clean
+   rm -f $(LIB) core *.bak $(obj).depend
+
+#
+
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+#
diff --git a/board/esd/meesc/config.mk b/board/esd/meesc/config.mk
new file mode 100644
index 000..9ce161e
--- /dev/null
+++ b/board/esd/meesc/config.mk
@@ -0,0 +1 @@
+TEXT_BASE = 0x21f0
diff --git a/board/esd/meesc/meesc.c b/board/esd/meesc/meesc.c
new file mode 100644
index 000..122707a
--- /dev/null
+++ b/board/esd/meesc/meesc.c
@@ -0,0 +1,400 @@
+/*
+ * (C) Copyright 2007-2008
+ * Stelian Pop stelian@leadtechdesign.com
+ * Lead Tech Design www.leadtechdesign.com
+ *
+ * (C) Copyright 2008
+ * Ulf Samuelsson u...@atmel.com
+ *
+ * (C) Copyright 2009
+ * Daniel Gorsulowski daniel.gorsulow...@esd.eu
+ * esd electronic system design gmbh www.esd.eu
+ *
+ * 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 

[U-Boot] [Patch] soft_i2c.c compiler/linker error

2009-03-27 Thread Jens Scharsig
This patch fix the compiler/linker errors

common/cmd_i2c.c:1252: undefined reference to `i2c_get_bus_speed'
common/cmd_i2c.c:1256: undefined reference to `i2c_set_bus_speed'

if board use CONFIG_I2C_CMD_TREE and CONFIG_I2C_MULTI_BUS is not uesd/undef

Signed-off-by: Jens Scharsig e...@bus-elektronik.de
---

diff --git a/drivers/i2c/soft_i2c.c b/drivers/i2c/soft_i2c.c
index ed5f5b2..68b267f 100644
--- a/drivers/i2c/soft_i2c.c
+++ b/drivers/i2c/soft_i2c.c
@@ -246,6 +246,7 @@ int i2c_set_bus_num(unsigned int bus)
 #endif
return 0;
 }
+#endif
 
 /* TODO: add 100/400k switching */
 unsigned int i2c_get_bus_speed(void)
@@ -260,7 +261,7 @@ int i2c_set_bus_speed(unsigned int speed)
 
return 0;
 }
-#endif
+
 
 /*---
  * if ack == I2C_ACK, ACK the byte so can continue reading, else

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 3/7] drivers/twserial: Add protocol driver for three wire serial interface.

2009-03-27 Thread Detlev Zundel
Hi Anatolij,

 Hi Detlev,

 Detlev Zundel wrote:

 diff --git a/drivers/twserial/soft_tws.c b/drivers/twserial/soft_tws.c
 new file mode 100644
 index 000..f63fc3f
 --- /dev/null
 +++ b/drivers/twserial/soft_tws.c

 snip

 +/*---
 + * Write bits
 + */
 +int tws_write(uchar *buffer, int len)
 +{
 +int rem = len;
 +uchar accu, shift;
 +debug(tws_write: buffer %p len %d\n, buffer, len);

 please, add blank line here.

Fixed, thanks.

Cheers
  Detlev

-- 
The belief in a supernatural source of evil is not necessary;
men alone are quite capable of every wickedness.
   --  Joseph Conrad
--
DENX Software Engineering GmbH,  MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: d...@denx.de
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 4/7] rtc: add support for 4543 RTC (manufactured by e.g. EPSON)

2009-03-27 Thread Anatolij Gustschin
Hi Detlev,

some more small style issues, see comments below.

Detlev Zundel wrote:

 diff --git a/drivers/rtc/rtc4543.c b/drivers/rtc/rtc4543.c
 new file mode 100644
 index 000..242d9bc
 --- /dev/null
 +++ b/drivers/rtc/rtc4543.c
 @@ -0,0 +1,118 @@
...
 + * 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
--^
please, remove space here.

snip
 +/*
 + * Note: The acrobatics below is due to the hideously ingenius idea of
 + * the chip designers.  As the chip does not allow register
-^
please, remove space here.

 + * addressing, all values need to be read and written in one go.  Sure
---^
please, remove space here.

snip
 +int rtc_get(struct rtc_time *tm)
 +{
 + int rel = 0;
 + uchar buffer[7];
 +
 + memset(buffer, 0, 7);
 +
 + /* Read 52 bits into our buffer */
 + tws_read(buffer, 52);
 +
 + tm-tm_sec  = BCD2BIN( buffer[0]  0x7F);
 + tm-tm_min  = BCD2BIN( buffer[1]  0x7F);
 + tm-tm_hour = BCD2BIN( buffer[2]  0x3F);
 + tm-tm_wday = BCD2BIN( buffer[3]  0x07);
--^
please, remove space here.

 + tm-tm_mday = BCD2BIN((buffer[3]  0xF0)  4 | (buffer[4]  0x0F)  
 4);
 + tm-tm_mon  = BCD2BIN((buffer[4]  0x30)  4 | (buffer[5]  0x0F)  
 4);
 + tm-tm_year = BCD2BIN((buffer[5]  0xF0)  4 | (buffer[6]  0x0F)  
 4) + 2000;

these tree lines above are too long.

...
 diff --git a/include/rtc.h b/include/rtc.h
 index 785fbe3..019c2eb 100644
 --- a/include/rtc.h
 +++ b/include/rtc.h
 @@ -61,4 +61,8 @@ void to_tm (int, struct rtc_time *);
  unsigned long mktime (unsigned int, unsigned int, unsigned int,
 unsigned int, unsigned int, unsigned int);
  
 +uchar rtc_read(uchar reg) __attribute__((weak));
 +void  rtc_write(uchar reg, uchar val) __attribute__((weak));
 +
 +

remove one blank line here, please.

Best regards,
Anatolij
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] Size of external u-boot commands

2009-03-27 Thread Detlev Zundel
Hi Jon,

 On Thu, Mar 26, 2009 at 7:26 PM, Wolfgang Denk w...@denx.de wrote:
 Dear Jon Smirl,

 In message 9e4733910903261435x598055f8m74c5ac03ad16b...@mail.gmail.com you 
 wrote:

 The *.bin format is not smart enough to encode gaps. It just puts in
 60KB of zeros.

 Yes, of course. A binary image cannot have holes in it.

 My ELF files are 73KB.
 -rwxr-xr-x 1 jonsmirl jonsmirl 73290 2009-03-26 16:49 hello_world

 Tell me the right way to make these example programs small and I'll
 submit a patch.

 I don't see a problem that needs fixing. These are example  problems.
 The  image  size plays no role. If you have any specific requirements
 for your own code, then adjust the linker script  according  to  your
 requirements.

 By providing a sample linker script to make the example programs
 smaller, you could avoid discussions like this in the future.

But as long as we do not understand what we change or what this does, we
may well get a lot of bug threads in return.  And I have to admit, I'm
not to keen on that.

Cheers
  Detlev

-- 
... and I will continue to use a  low-level language to indicate how
machines actually compute.  Readers  who only want to see algorithms
that are already packaged in a plug-in way, using a trendy language,
should buy other people's books.
 -- Donald Knuth, Fascicle 1
--
DENX Software Engineering GmbH,  MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: d...@denx.de
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 4/7] rtc: add support for 4543 RTC (manufactured by e.g. EPSON)

2009-03-27 Thread Wolfgang Denk
Dear Anatolij,

In message 49ccab93.6030...@denx.de you wrote:
 
  + * 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
 --^
 please, remove space here.
 
 snip
  +/*
  + * Note: The acrobatics below is due to the hideously ingenius idea of
  + * the chip designers.  As the chip does not allow register
 -^
 please, remove space here.
 
  + * addressing, all values need to be read and written in one go.  Sure
 ---^
 please, remove space here.

Nope. These are actually intentional. Good type setting systems add
wider horizontal space after a full stop than between words. The
double space after a full stop is the ASSCII representation of this.

It may be a matter of taste, and since many editors don't support
this (at least not out of the box), so it is not a required style
element, but in any case there is no reason to remove this.

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: w...@denx.de
Lispers are among  the  best  grads  of  the  Sweep-It-Under-Someone-
Else's-Carpet  School of Simulated Simplicity. [Was that sufficiently
incendiary? :-)]  - Larry Wall in 1992jan10.201804.11...@netlabs.com
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] Size of external u-boot commands

2009-03-27 Thread Wolfgang Denk
Dear Detlev,

In message m27i2bl0a3@ohwell.denx.de you wrote:
 
  By providing a sample linker script to make the example programs
  smaller, you could avoid discussions like this in the future.
 
 But as long as we do not understand what we change or what this does, we
 may well get a lot of bug threads in return.  And I have to admit, I'm
 not to keen on that.

But we do understand what's going on, or am I missing something?

There is simply no linker script for the  PowerPC  examples,  so  the
default alignment settings for section alignment apply, and I think I
remember that ELF sections are aligned on 64k boundaries by default.

So if somebody wants a less generous alignment, all that needs to be
done is to set up a linker script that uses other alignment; it is a
matter of personal test or projec tneeds if you want to align this on
any specific boundary or if you shose some arbitrary value like 4k or
64 bytes or whatever.

The thing is, that these are examples, and use default settings.

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: w...@denx.de
Our business is run on trust.  We trust you will pay in advance.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [Patch] soft_i2c.c compiler/linker error

2009-03-27 Thread Jean-Christophe PLAGNIOL-VILLARD
On 11:31 Fri 27 Mar , Jens Scharsig wrote:
 This patch fix the compiler/linker errors
 
 common/cmd_i2c.c:1252: undefined reference to `i2c_get_bus_speed'
 common/cmd_i2c.c:1256: undefined reference to `i2c_set_bus_speed'
 
 if board use CONFIG_I2C_CMD_TREE and CONFIG_I2C_MULTI_BUS is not uesd/undef
 
 Signed-off-by: Jens Scharsig e...@bus-elektronik.de
NACK

you must implement it

Best Regards,
J.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 4/7] rtc: add support for 4543 RTC (manufactured by e.g. EPSON)

2009-03-27 Thread Detlev Zundel
Hi Anatolij,

 some more small style issues, see comments below.

 Detlev Zundel wrote:

 diff --git a/drivers/rtc/rtc4543.c b/drivers/rtc/rtc4543.c
 new file mode 100644
 index 000..242d9bc
 --- /dev/null
 +++ b/drivers/rtc/rtc4543.c
 @@ -0,0 +1,118 @@
 ...
 + * 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
 --^
 please, remove space here.

Wow, you want me to change the default GPL boiler plate?  You've got
guts ;)

 snip
 +/*
 + * Note: The acrobatics below is due to the hideously ingenius idea of
 + * the chip designers.  As the chip does not allow register
 -^
 please, remove space here.

 + * addressing, all values need to be read and written in one go.  Sure
 ---^
 please, remove space here.

As said by Wolfgang, you may infer that I use Emacs as my preferred text
editor, which knows about the double space.  Citing from the info file:

 The sentence commands assume that you follow the American typist's
  convention of putting two spaces at the end of a sentence; they consider
  a sentence to end wherever there is a `.', `?' or `!' followed by the
  end of a line or two spaces, with any number of `)', `]', `'', or `'
  characters allowed in between.  A sentence also begins or ends wherever
  a paragraph begins or ends.  It is useful to follow this convention,
  because it makes a distinction between periods that end a sentence and
  periods that indicate abbreviations; that enables the Emacs sentence
  commands to distinguish, too.  These commands do not stop for periods
  that indicate abbreviations.

So I really ask you to reconsider your critique.
  
 +int rtc_get(struct rtc_time *tm)
 +{
 +int rel = 0;
 +uchar buffer[7];
 +
 +memset(buffer, 0, 7);
 +
 +/* Read 52 bits into our buffer */
 +tws_read(buffer, 52);
 +
 +tm-tm_sec  = BCD2BIN( buffer[0]  0x7F);
 +tm-tm_min  = BCD2BIN( buffer[1]  0x7F);
 +tm-tm_hour = BCD2BIN( buffer[2]  0x3F);
 +tm-tm_wday = BCD2BIN( buffer[3]  0x07);
 --^
 please, remove space here.

Are you sure?  You may notice that the spaces are intentional and
*actually improve* the readability.

 +tm-tm_mday = BCD2BIN((buffer[3]  0xF0)  4 | (buffer[4]  0x0F)  
 4);
 +tm-tm_mon  = BCD2BIN((buffer[4]  0x30)  4 | (buffer[5]  0x0F)  
 4);
 +tm-tm_year = BCD2BIN((buffer[5]  0xF0)  4 | (buffer[6]  0x0F)  
 4) + 2000;

 these tree lines above are too long.

Oh well.  I really checked CodingStyle in the Linux kernel and it has
this to say:

  The only exception to this is where exceeding 80 columns significantly
  increases readability and does not hide information.

So please reconsider your critique with this sentence in mind.  What do
you think?  

 ...
 diff --git a/include/rtc.h b/include/rtc.h
 index 785fbe3..019c2eb 100644
 --- a/include/rtc.h
 +++ b/include/rtc.h
 @@ -61,4 +61,8 @@ void to_tm (int, struct rtc_time *);
  unsigned long mktime (unsigned int, unsigned int, unsigned int,
unsigned int, unsigned int, unsigned int);
  
 +uchar rtc_read(uchar reg) __attribute__((weak));
 +void  rtc_write(uchar reg, uchar val) __attribute__((weak));
 +
 +

 remove one blank line here, please.

Ok, I don't have a problem with that.  I will not fix however, because I
actually realize that this is another leftover of the previous
implementation which did not use the tws protocol driver, so I remove
the lines entirely.

Cheers
  Detlev

-- 
Those who would give up essential liberty to purchase a little
temporary safety, deserve neither liberty nor safety.
 -- Benjamin Franklin
--
DENX Software Engineering GmbH,  MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: d...@denx.de
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [Patch] soft_i2c.c compiler/linker error

2009-03-27 Thread Jens Scharsig
Jean-Christophe PLAGNIOL-VILLARD schrieb:
 On 11:31 Fri 27 Mar , Jens Scharsig wrote:
 This patch fix the compiler/linker errors

 common/cmd_i2c.c:1252: undefined reference to `i2c_get_bus_speed'
 common/cmd_i2c.c:1256: undefined reference to `i2c_set_bus_speed'

 if board use CONFIG_I2C_CMD_TREE and CONFIG_I2C_MULTI_BUS is not uesd/undef

 Signed-off-by: Jens Scharsig e...@bus-elektronik.de
 NACK
 
 you must implement it

Pleace a liltle bit more informations

What exactly must I implement? 

I2C_MULTI_BUS or i2c_get_bus_speed / i2c_set_bus_speed

Is the driver (soft_i2c.c) not the right pleace for i2c_set/get_bus_speed?

Best Regards,
Jens Scharsig

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] Size of external u-boot commands

2009-03-27 Thread Detlev Zundel
Hi Wolfgang,

 In message m27i2bl0a3@ohwell.denx.de you wrote:
 
  By providing a sample linker script to make the example programs
  smaller, you could avoid discussions like this in the future.
 
 But as long as we do not understand what we change or what this does, we
 may well get a lot of bug threads in return.  And I have to admit, I'm
 not to keen on that.

 But we do understand what's going on, or am I missing something?

I was referring to the other proposed change which I still do not
understand:

 The *.bin files are ending up at 60-75K.  Adding this to the linker
 script fixes it.
   .gcc_except_table : ONLY_IF_RO { KEEP (*(.gcc_except_table))
 *(.gcc_except_table.*) }

I fully agree that the examples should rather use defaults because as
the name implies, they are examples after all, not tightly optimized
special cases.

Cheers
  Detlev

-- 
Als ich entführt wurde, begannen meine Eltern aktiv zu werden.
Sie vermieteten mein Zimmer.
-- Woody Allen
--
DENX Software Engineering GmbH,  MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: d...@denx.de
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] U-Boot makefiles question

2009-03-27 Thread Steven Zedeck

Hi,
I have a general question about the U-Boot Makefiles. When I want to add a
file to one of the sub-Makefiles (such as in drivers/net/Makefile or
board/atmel/at91/Makefile), it seems I need to go through several steps
in order for the new file to get compiled. I must be doing something wrong.
I've been doing this everytime I add a new file to be compiled by a
makefile:

make distclean
make at91sam9rlek_config
make at91sam9rlek_config
make clean
make -B

It seems that if I don't do all those steps, the new file is ignored and not
compiled. I think its an issue with dependencies.

I have a similar problem when I add a new .h file to an existing .c file. It
doesn't always cause the particular .c file to get recompiled.
thanks in advance,
Steve
-- 
View this message in context: 
http://www.nabble.com/U-Boot-makefiles-question-tp22740727p22740727.html
Sent from the Uboot - Users mailing list archive at Nabble.com.

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 4/7] rtc: add support for 4543 RTC (manufactured by e.g. EPSON)

2009-03-27 Thread Anatolij Gustschin
Detlev Zundel wrote:

 + * 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
 --^
 please, remove space here.
 
 Wow, you want me to change the default GPL boiler plate?  You've got
 guts ;)

I checked some other files before suggesting to fix, and accidentally
caught the files with one space character here. Now running

[...@wker u-boot]$ fgrep -r PURPOSE. See * | wc -l
151
[...@wker u-boot]$ fgrep -r PURPOSE.  See * | wc -l
3530

shows, that these are outnumbered. So, forget it. Sorry for the noise.

 snip
 +/*
 + * Note: The acrobatics below is due to the hideously ingenius idea of
 + * the chip designers.  As the chip does not allow register
 -^
 please, remove space here.

 + * addressing, all values need to be read and written in one go.  Sure
 ---^
 please, remove space here.
 
 As said by Wolfgang, you may infer that I use Emacs as my preferred text
 editor, which knows about the double space.  Citing from the info file:
 
  The sentence commands assume that you follow the American typist's
   convention of putting two spaces at the end of a sentence; they consider
   a sentence to end wherever there is a `.', `?' or `!' followed by the
   end of a line or two spaces, with any number of `)', `]', `'', or `'
   characters allowed in between.  A sentence also begins or ends wherever
   a paragraph begins or ends.  It is useful to follow this convention,
   because it makes a distinction between periods that end a sentence and
   periods that indicate abbreviations; that enables the Emacs sentence
   commands to distinguish, too.  These commands do not stop for periods
   that indicate abbreviations.
 
 So I really ask you to reconsider your critique.

Ok, your and Wolfgang's arguments show me, that being consistent with
something is often brain-damaged. Sorry for the noise.
   
 +int rtc_get(struct rtc_time *tm)
 +{
 +   int rel = 0;
 +   uchar buffer[7];
 +
 +   memset(buffer, 0, 7);
 +
 +   /* Read 52 bits into our buffer */
 +   tws_read(buffer, 52);
 +
 +   tm-tm_sec  = BCD2BIN( buffer[0]  0x7F);
 +   tm-tm_min  = BCD2BIN( buffer[1]  0x7F);
 +   tm-tm_hour = BCD2BIN( buffer[2]  0x3F);
 +   tm-tm_wday = BCD2BIN( buffer[3]  0x07);
 --^
 please, remove space here.
 
 Are you sure?  You may notice that the spaces are intentional and
 *actually improve* the readability.

OK.

 
 +   tm-tm_mday = BCD2BIN((buffer[3]  0xF0)  4 | (buffer[4]  0x0F)  
 4);
 +   tm-tm_mon  = BCD2BIN((buffer[4]  0x30)  4 | (buffer[5]  0x0F)  
 4);
 +   tm-tm_year = BCD2BIN((buffer[5]  0xF0)  4 | (buffer[6]  0x0F)  
 4) + 2000;
 these tree lines above are too long.
 
 Oh well.  I really checked CodingStyle in the Linux kernel and it has
 this to say:
 
   The only exception to this is where exceeding 80 columns significantly
   increases readability and does not hide information.
 
 So please reconsider your critique with this sentence in mind.  What do
 you think?

OK. Something like

tm-tm_mday = BCD2BIN((buffer[3]  0xF0)  4 |
  (buffer[4]  0x0F)  4);
tm-tm_mon  = BCD2BIN((buffer[4]  0x30)  4 |
  (buffer[5]  0x0F)  4);
tm-tm_year = BCD2BIN((buffer[5]  0xF0)  4 |
  (buffer[6]  0x0F)  4) + 2000;

isn't more readable than your version. Sorry for the noise, again.

Best regards,
Anatolij
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] Size of external u-boot commands

2009-03-27 Thread Jon Smirl
On Fri, Mar 27, 2009 at 7:17 AM, Detlev Zundel d...@denx.de wrote:
 Hi Wolfgang,

 In message m27i2bl0a3@ohwell.denx.de you wrote:

  By providing a sample linker script to make the example programs
  smaller, you could avoid discussions like this in the future.

 But as long as we do not understand what we change or what this does, we
 may well get a lot of bug threads in return.  And I have to admit, I'm
 not to keen on that.

 But we do understand what's going on, or am I missing something?

 I was referring to the other proposed change which I still do not
 understand:

 The *.bin files are ending up at 60-75K.  Adding this to the linker
 script fixes it.
   .gcc_except_table : ONLY_IF_RO { KEEP (*(.gcc_except_table))
 *(.gcc_except_table.*) }

 I fully agree that the examples should rather use defaults because as
 the name implies, they are examples after all, not tightly optimized
 special cases.

Providing an example linker script would show us the right way to
write it.  I've never written a linker script for the ppc and I don't
know what I'm doing. Copying the the one over from the CPU directory
was not sufficient to make the app smaller.

-- 
Jon Smirl
jonsm...@gmail.com
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 4/7] rtc: add support for 4543 RTC (manufactured by e.g. EPSON)

2009-03-27 Thread Jerry Van Baren
Anatolij Gustschin wrote:
 Detlev Zundel wrote:

[snip]

 So I really ask you to reconsider your critique.
 
 Ok, your and Wolfgang's arguments show me, that being consistent with
 something is often brain-damaged. Sorry for the noise.

A foolish consistency is the hobgoblin of little minds.

 -- Ralph Waldo Emerson

I change my mind periodically just because of that quote. :-D

[snip]

Best regards,
gvb
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 4/7] rtc: add support for 4543 RTC (manufactured by e.g. EPSON)

2009-03-27 Thread Detlev Zundel
Hi Jerry,

 A foolish consistency is the hobgoblin of little minds.

 -- Ralph Waldo Emerson

 I change my mind periodically just because of that quote. :-D

Thanks Jerry.  I was about to write a few sentences but I am sure I
could not have driven the point home any better ;)

I also found a new addition to my signature data base which contained
only the cite below being almost but not entirely off-topic...

Cheers
  Detlev

-- 
By all means let's be open-minded, but not so open-minded that our
brains drop out.
-- Richard Dawkins
--
DENX Software Engineering GmbH,  MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: d...@denx.de
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH] at91sam9/at91cap: spi init wadd hardware chip select support

2009-03-27 Thread Jean-Christophe PLAGNIOL-VILLARD
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD plagn...@jcrosoft.com
---
 cpu/arm926ejs/at91/at91cap9_spi.c|   37 -
 cpu/arm926ejs/at91/at91sam9260_spi.c |   36 +++-
 cpu/arm926ejs/at91/at91sam9261_spi.c |   36 +++-
 cpu/arm926ejs/at91/at91sam9263_spi.c |   36 +++-
 cpu/arm926ejs/at91/at91sam9rl_spi.c  |   18 +--
 5 files changed, 136 insertions(+), 27 deletions(-)

diff --git a/cpu/arm926ejs/at91/at91cap9_spi.c 
b/cpu/arm926ejs/at91/at91cap9_spi.c
index 356a804..cd8143b 100644
--- a/cpu/arm926ejs/at91/at91cap9_spi.c
+++ b/cpu/arm926ejs/at91/at91cap9_spi.c
@@ -38,15 +38,27 @@ void at91_spi0_hw_init(unsigned long cs_mask)
at91_sys_write(AT91_PMC_PCER, 1  AT91CAP9_ID_SPI0);
 
if (cs_mask  (1  0)) {
-   at91_set_gpio_output(AT91_PIN_PA5, 1);
+   at91_set_B_periph(AT91_PIN_PA5, 1);
}
if (cs_mask  (1  1)) {
-   at91_set_gpio_output(AT91_PIN_PA3, 1);
+   at91_set_B_periph(AT91_PIN_PA3, 1);
}
if (cs_mask  (1  2)) {
-   at91_set_gpio_output(AT91_PIN_PD0, 1);
+   at91_set_B_periph(AT91_PIN_PD0, 1);
}
if (cs_mask  (1  3)) {
+   at91_set_B_periph(AT91_PIN_PD1, 1);
+   }
+   if (cs_mask  (1  4)) {
+   at91_set_gpio_output(AT91_PIN_PA5, 1);
+   }
+   if (cs_mask  (1  5)) {
+   at91_set_gpio_output(AT91_PIN_PA3, 1);
+   }
+   if (cs_mask  (1  6)) {
+   at91_set_gpio_output(AT91_PIN_PD0, 1);
+   }
+   if (cs_mask  (1  7)) {
at91_set_gpio_output(AT91_PIN_PD1, 1);
}
 }
@@ -61,15 +73,28 @@ void at91_spi1_hw_init(unsigned long cs_mask)
at91_sys_write(AT91_PMC_PCER, 1  AT91CAP9_ID_SPI1);
 
if (cs_mask  (1  0)) {
-   at91_set_gpio_output(AT91_PIN_PB15, 1);
+   at91_set_A_periph(AT91_PIN_PB15, 1);
}
if (cs_mask  (1  1)) {
-   at91_set_gpio_output(AT91_PIN_PB16, 1);
+   at91_set_A_periph(AT91_PIN_PB16, 1);
}
if (cs_mask  (1  2)) {
-   at91_set_gpio_output(AT91_PIN_PB17, 1);
+   at91_set_A_periph(AT91_PIN_PB17, 1);
}
if (cs_mask  (1  3)) {
+   at91_set_A_periph(AT91_PIN_PB18, 1);
+   }
+   if (cs_mask  (1  4)) {
+   at91_set_gpio_output(AT91_PIN_PB15, 1);
+   }
+   if (cs_mask  (1  5)) {
+   at91_set_gpio_output(AT91_PIN_PB16, 1);
+   }
+   if (cs_mask  (1  6)) {
+   at91_set_gpio_output(AT91_PIN_PB17, 1);
+   }
+   if (cs_mask  (1  7)) {
at91_set_gpio_output(AT91_PIN_PB18, 1);
}
+
 }
diff --git a/cpu/arm926ejs/at91/at91sam9260_spi.c 
b/cpu/arm926ejs/at91/at91sam9260_spi.c
index 0105072..d6fd80e 100644
--- a/cpu/arm926ejs/at91/at91sam9260_spi.c
+++ b/cpu/arm926ejs/at91/at91sam9260_spi.c
@@ -38,15 +38,27 @@ void at91_spi0_hw_init(unsigned long cs_mask)
at91_sys_write(AT91_PMC_PCER, 1  AT91SAM9260_ID_SPI0);
 
if (cs_mask  (1  0)) {
-   at91_set_gpio_output(AT91_PIN_PA3, 1);
+   at91_set_A_periph(AT91_PIN_PA3, 1);
}
if (cs_mask  (1  1)) {
-   at91_set_gpio_output(AT91_PIN_PC11, 1);
+   at91_set_B_periph(AT91_PIN_PC11, 1);
}
if (cs_mask  (1  2)) {
-   at91_set_gpio_output(AT91_PIN_PC16, 1);
+   at91_set_B_periph(AT91_PIN_PC16, 1);
}
if (cs_mask  (1  3)) {
+   at91_set_B_periph(AT91_PIN_PC17, 1);
+   }
+   if (cs_mask  (1  4)) {
+   at91_set_gpio_output(AT91_PIN_PA3, 1);
+   }
+   if (cs_mask  (1  5)) {
+   at91_set_gpio_output(AT91_PIN_PC11, 1);
+   }
+   if (cs_mask  (1  6)) {
+   at91_set_gpio_output(AT91_PIN_PC16, 1);
+   }
+   if (cs_mask  (1  7)) {
at91_set_gpio_output(AT91_PIN_PC17, 1);
}
 }
@@ -61,15 +73,27 @@ void at91_spi1_hw_init(unsigned long cs_mask)
at91_sys_write(AT91_PMC_PCER, 1  AT91SAM9260_ID_SPI1);
 
if (cs_mask  (1  0)) {
-   at91_set_gpio_output(AT91_PIN_PB3, 1);
+   at91_set_A_periph(AT91_PIN_PB3, 1);
}
if (cs_mask  (1  1)) {
-   at91_set_gpio_output(AT91_PIN_PC5, 1);
+   at91_set_B_periph(AT91_PIN_PC5, 1);
}
if (cs_mask  (1  2)) {
-   at91_set_gpio_output(AT91_PIN_PC4, 1);
+   at91_set_B_periph(AT91_PIN_PC4, 1);
}
if (cs_mask  (1  3)) {
at91_set_gpio_output(AT91_PIN_PC3, 1);
}
+   if (cs_mask  (1  4)) {
+   at91_set_gpio_output(AT91_PIN_PB3, 1);
+   }
+   if (cs_mask  (1  5)) {
+   at91_set_gpio_output(AT91_PIN_PC5, 1);
+   }
+   if (cs_mask  (1  6)) {
+   

[U-Boot] u-boot-2009.03 Hangs

2009-03-27 Thread renjith kumar
Hi ,

Tried the latest u-boot in a Sequoia board , withnand-Configuration, but it
hangs in between.
Neither getting the shell Nor Boot count.
But the board , work fine with old u-boot 1.3.1 (eldk 4.2) with same nand
option.
Checked size of the images in nand boot and got as follows.

Size:   Image

28232 u-boot-spl
16384 u-boot-spl-16k.bin
4096   u-boot-spl.bin
435016   u-boot-nand.bin

So hope , this shouldn't be a problem, as I do nand-Write with 0x7 size.

The Hanging Err As follows:--

U-Boot 2009.03 (Mar 27 2009 - 20:07:57)

CPU:   AMCC PowerPC 440EPx Rev. A at 528 MHz (PLB=132, OPB=66, EBC=66 MHz)
   Security/Kasumi support
   Bootstrap Option H - Boot ROM Location I2C (Addr 0x52)
   Internal PCI arbiter enabled, PCI async ext clock used
   32 kB I-Cache 32 kB D-Cache
Board: Sequoia - AMCC PPC440EPx Evaluation Board, Rev. F, PCI=66 MHz
I2C:   ready
DRAM:  256 MB
FLASH: 64 MB
NAND:  32 MiB
*** Warning - bad CRC, using default environment

PCI:   Bus Dev VenId DevId Class Int
USB:   Host(int phy) Device(ext phy)
DTT:   1 is 33 C
Net:   No ethernet found.

Type run flash_nfs to mount root filesystem over NFS
hangs-here

Else it keeps on Giving MC Exception in Loop following the Above Debug
printings as follows::

Machine Check Exception.
Caused by (from msr): regs 0fe40cc8 TLB Parity Error
DDR0: DDR0_00 c0190a
DDR0: At least one interrupt active
DDR0: DRAM initialization complete.
DDR0: Write Out-of-Range command
NIP: 0FF6F8CC XER: 005F LR: 0FF6F660 REGS: 0fe40cc8 TRAP: 0200 DEAR:
FF0F
MSR: 00029000 EE: 1 PR: 0 FP: 0 ME: 1 IR/DR: 00

GPR00: 0003B408 0FE40DB8 0FE40F30    
15E953B4
GPR08: 0FF52F88  1F78A408 0FE42448 2424  0FFA9500
0FF7216C
GPR16: 0FF9D578 0FFA4CB8 0FF9D544 0FFA9404 0FFA4CB8 0FFA9404 0FFA9404

GPR24: 0003   0FE42390 0FE42450  0FFAAA68

Call backtrace:
0FFA9404 0FF72670 0FF73898 0FF73AA8 0FF764DC 0FF52AB4 0FF436A8
machine check

Appreciate any clue or suggestions.
Thanks in advance.

-- 
Thanks'n Regards,
Renjith.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] u-boot-2009.03 Hangs

2009-03-27 Thread Wolfgang Denk
Dear renjith kumar,

In message a8474bd70903270633t2b5087b3qe32c3f06bf88b...@mail.gmail.com you 
wrote:

 Tried the latest u-boot in a Sequoia board , withnand-Configuration, but it
 hangs in between.

This has been fixed in the meantime, see

commit 3edf68c47fdd52f19c1e840771c19ba90cf5ced1
Author: Stefan Roese s...@denx.de
Date:   Thu Mar 26 16:14:13 2009 +0100

ppc4xx: Sequoia: Fix TLB reassignment in NAND booting code

This patch fixes a bug in the Sequoia TLB init code to reconfigure
the correct TLB (boot space) after running from RAM. This bug was
introduced with patch 4d332dbeb08f5863d1ea69d91a00c5499d3a87ed
[ppc4xx: Make Sequoia boot vxWorks] which changed the order of the
TLB in the Sequoia init.S file.

Signed-off-by: Stefan Roese s...@denx.de


Please use top of tree from the git repository, this should work again.


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: w...@denx.de
PLEASE NOTE: Some Quantum Physics Theories Suggest That When the Con-
sumer Is Not Directly Observing This Product, It May Cease  to  Exist
or Will Exist Only in a Vague and Undetermined State.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] minicom garbled

2009-03-27 Thread SlinceArm


Do you know the u-boot you loaded is configured for your board?  Another 
way for garbling is if your board's baud rate generator (clocking) is 
not what the u-boot that you loaded is configured for, causing it to 
generate an oddball baud rate.

Hi , Jerry Van Baren-7

Thanks for your reply 

Yes , i am sure my U-boot is configured for my board. 

Thanks for your information  : )
-- 
View this message in context: 
http://www.nabble.com/-U-Boot--minicom-garbled-tp22677067p22742403.html
Sent from the Uboot - Users mailing list archive at Nabble.com.

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH] MAINTAINERS: Add entry for 'inka4x0' board.

2009-03-27 Thread Detlev Zundel
Signed-off-by: Detlev Zundel d...@denx.de
---
 MAINTAINERS |4 
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/MAINTAINERS b/MAINTAINERS
index 6f3e836..25b28d6 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -452,6 +452,10 @@ John Zhan zh...@sinovee.com
 
svm_sc8xx   MPC8xx
 
+Detlev Zundel d...@denx.de
+
+   inka4x0 MPC5200
+
 -
 
 Unknown / orphaned boards:
-- 
1.6.0.6

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH] MAINTAINERS: Keep list sorted.

2009-03-27 Thread Detlev Zundel
Signed-off-by: Detlev Zundel d...@denx.de
---
 MAINTAINERS |   13 +++--
 1 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/MAINTAINERS b/MAINTAINERS
index ce25c1b..6f3e836 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -219,6 +219,10 @@ Larry Johnson l...@acm.org
 
korat   PPC440EPx
 
+Feng Kan f...@amcc.com
+
+   redwood PPC4xx
+
 Brad Kemp brad.k...@seranoa.com
 
ppmc8260MPC8260
@@ -448,9 +452,6 @@ John Zhan zh...@sinovee.com
 
svm_sc8xx   MPC8xx
 
-Feng Kan f...@amcc.com
-
-   redwood PPC4xx
 -
 
 Unknown / orphaned boards:
@@ -509,6 +510,9 @@ George G. Davis gda...@mvista.com
assabet SA1100
gcplus  SA1100
 
+Wolfgang Denk w...@denx.de
+   qongi.MX31
+
 Thomas Elste i...@elste.org
 
modnet50ARM720T (NET+50)
@@ -656,9 +660,6 @@ Sergey Lapin sla...@ossfans.org
 
afeb9260ARM926EJS (AT91SAM9260 SoC)
 
-Wolfgang Denk w...@denx.de
-   qongi.MX31
-
 -
 
 Unknown / orphaned boards:
-- 
1.6.0.6

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] omap3: mmc: mmc2 support

2009-03-27 Thread Minkyu Kang
 By this patch, the MMC controller actually used is configured by
 CONFIG_MMC_INDEX at compile time? I.e. setting CONFIG_MMC_INDEX to 1
 will use mmc1, 2 will switch to mmc2 and CONFIG_MMC_INDEX 3 will
 switch to mmc3?

 If I got this right, do you think we can do this at runtime? E.g.
 implementing a custom command

 select_mmc # of mmc controller to be used

 ?

 With this, we could switch to mmc2 by doing something like

 select_mmc 2

 and afterwards all mmc read/write access will go to mmc2.

 What do you think?

Surely possible.
As you known, there is no interface for selecting device.
Can I add new command for that? (E.g. mmcselect device num)

And I want to change the mmcinit command too.
I.e. getting dev num by argument.
like this

mmcinit device num

If that is not in, we must select mmc device before mmcinit.
How about this? There exist any side effects?

Thanks :)
Minkyu Kang

-- 
from. prom.
promsoft.net
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] Size of external u-boot commands

2009-03-27 Thread Mike Frysinger
On Friday 27 March 2009 08:47:40 Jon Smirl wrote:
 On Fri, Mar 27, 2009 at 7:17 AM, Detlev Zundel d...@denx.de wrote:
  Hi Wolfgang,
 
  In message m27i2bl0a3@ohwell.denx.de you wrote:
   By providing a sample linker script to make the example programs
   smaller, you could avoid discussions like this in the future.
 
  But as long as we do not understand what we change or what this does,
  we may well get a lot of bug threads in return.  And I have to admit,
  I'm not to keen on that.
 
  But we do understand what's going on, or am I missing something?
 
  I was referring to the other proposed change which I still do not
 
  understand:
  The *.bin files are ending up at 60-75K.  Adding this to the linker
  script fixes it.
.gcc_except_table : ONLY_IF_RO { KEEP (*(.gcc_except_table))
  *(.gcc_except_table.*) }
 
  I fully agree that the examples should rather use defaults because as
  the name implies, they are examples after all, not tightly optimized
  special cases.

 Providing an example linker script would show us the right way to
 write it.  I've never written a linker script for the ppc and I don't
 know what I'm doing. Copying the the one over from the CPU directory
 was not sufficient to make the app smaller.

ask the toolchain for the linker script its using.  having u-boot duplicate it 
leads to obvious bit rot scenarios.  u-boot isnt an exercise in teaching you 
how to read the linker manual.

link with -Wl,--verbose to see the default linker script that is used.
-mike


signature.asc
Description: This is a digitally signed message part.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 4/7] rtc: add support for 4543 RTC (manufactured by e.g. EPSON)

2009-03-27 Thread Scott Wood
On Fri, Mar 27, 2009 at 08:53:28AM -0400, Jerry Van Baren wrote:
 Anatolij Gustschin wrote:
  Detlev Zundel wrote:
 
 [snip]
 
  So I really ask you to reconsider your critique.
  
  Ok, your and Wolfgang's arguments show me, that being consistent with
  something is often brain-damaged. Sorry for the noise.
 
 A foolish consistency is the hobgoblin of little minds.
 
  -- Ralph Waldo Emerson
 
 I change my mind periodically just because of that quote. :-D

But hopefully you don't do so *consistently*. :-)

-Scott
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] ARM based port for uboot with NAND boot support.

2009-03-27 Thread alfred steele
Hi All;

Is there an available port for  IMX31 3stack with NAND boot.
I am looking for a U-boot port  for IMX31 stack( which supports NAND boot.

The closest matches i know of as of now are as follows:

MX-31 ADS
MX-31 Phycore
Openmoko U-boot (Samsung processor though ARM) - This is the only one
on ARM which allows NAND boot.

I haven't digged up further so I am not sure at this point which
port would be a good enough one as a starting point if no existing
port exists.

Thanks in Advance!
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] Canyonlands SATA harddisk driver

2009-03-27 Thread Stefan Roese
On Thursday 26 March 2009, Kazuaki Ichinohe wrote:
 Thank you for the reply.
 My answer is described in the beginning.

OK, I just tried to apply your patch for basic testing. Didn't work though. 
Here the error log:

[ste...@kubuntu u-boot (master)]$ patch -p1  patches_sata/\[U-Boot\]\ 
\[PATCH\]\ Canyonlands\ SATA\ harddisk\ driver.mbox
patching file common/cmd_scsi.c
Hunk #1 FAILED at 47.
Hunk #2 FAILED at 181.
Hunk #3 FAILED at 192.
Hunk #4 FAILED at 453.
4 out of 4 hunks FAILED -- saving rejects to file common/cmd_scsi.c.rej
patching file drivers/block/Makefile
Hunk #1 FAILED at 34.
1 out of 1 hunk FAILED -- saving rejects to file drivers/block/Makefile.rej
patching file drivers/block/sata_dwc.c
patching file drivers/block/sata_dwc.h
patching file include/configs/canyonlands.h
Hunk #1 FAILED at 454.
Hunk #2 FAILED at 518.
2 out of 2 hunks FAILED -- saving rejects to file 
include/configs/canyonlands.h.rej

Seems that you didn't base your patch on the latest git version of U-Boot. 
Please rebase your patch again that it applies cleanly. And again, please use 
the git tools to generate the patch. Or at least send the patch in a git 
compatible way, so that it can be applied using git am.

Thanks.

Best regards,
Stefan

=
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: off...@denx.de
=
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] U-boot NAND boot on IMX31 3stack(ARM)

2009-03-27 Thread alfred steele
Hi All;

Is there an available port for  IMX31 3stack with NAND boot.
I am looking for a U-boot port  for IMX31 stack( which supports NAND boot.

The closest matches i know of as of now are as follows:

MX-31 ADS
MX-31 Phycore
Openmoko U-boot (Samsung processor though ARM) - This is the only one
on ARM which allows NAND boot.

I haven't digged up further so I am not sure at this point which
port would be a good enough one as a starting point if no existing
port exists.

Thanks in Advance!

-Munro
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] Canyonlands SATA harddisk driver

2009-03-27 Thread Wolfgang Denk
Dear Kazuaki Ichinohe,

In message 49cb5f77.1060...@fsi.co.jp you wrote:
...
  Why do you add this 460EX SATA support to cmd_scsi.c? Wouldn't cmd_sata.c 
 be a
  better place? Or did I miss something here?
 
 The cmd_scsi.c which define CONFIG_CMD_SCSI are modified
 because I want to use scsiboot command of U-BOOT.

This makes no sense. It is a S-ATA driver, not a SCSI driver, and as
such it has to be supported in the context of the S-ATA support.

I explicitly NAK the changes to the SCSI related files.

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: w...@denx.de
A quarrel is quickly settled when deserted by one party; there is  no
battle unless there be two.  - Seneca
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 2/3] MPC85xx: Load and enable QE microcode patch in IRAM

2009-03-27 Thread Timur Tabi
On Thu, Mar 26, 2009 at 4:01 PM, Haiying Wang
haiying.w...@freescale.com wrote:
 For the silicon which doesn't have ROM support in QE, it always needs to load
 a pre-built ucode binary to IRAM so that QE can work.

 Signed-off-by: Haiying Wang haiying.w...@freescale.com
 Signed-off-by: Hillel Avni hillel.a...@freescale.com

Just for the record:

Acked-by: Timur Tabi ti...@freescale.com

-- 
Timur Tabi
Linux kernel developer at Freescale
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] MPC8572E I2C bus speed after emulator reset

2009-03-27 Thread Timur Tabi
Scott Coulter wrote:
 Hi Timur,
 
 What is the value of CONFIG_SYS_I2C_SPEED in your board header file?
  
 #define CONFIG_SYS_I2C_SPEED  40

So far, so good.

 What values does function set_i2c_bus_speed() in fsl_i2c.c program
 into the FDR and DFSR registers?
 
 According to my printfs and the emulator readback of the values, the
 code is putting a 0x6 into the FDR and a 0x1 into the DFSR.  These
 values appear to be identical with either a hard reset or an emulator
 reset.

According to the 8572E RM, the default values for DFSR and FDR are 0x10
and 0x00.  The values above represent, according to the table, a divider
of 768.  The RM also says that I2C clock is 1/2 CCB, so that means that
your CCB should be 400,000 * 768 * 2 = 614MHz.  Is that right?

-- 
Timur Tabi
Linux kernel developer at Freescale
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] U-boot NAND boot on IMX31 3stack(ARM)

2009-03-27 Thread Magnus Lilja
Hi

2009/3/27 alfred steele alfred.jaq...@gmail.com:
 Hi All;

 Is there an available port for  IMX31 3stack with NAND boot.
 I am looking for a U-boot port  for IMX31 stack( which supports NAND boot.

 The closest matches i know of as of now are as follows:

 MX-31 ADS
 MX-31 Phycore
 Openmoko U-boot (Samsung processor though ARM) - This is the only one
 on ARM which allows NAND boot.

 I haven't digged up further so I am not sure at this point which
 port would be a good enough one as a starting point if no existing
 port exists.

I would suggest using this patch as a base:
http://lists.denx.de/pipermail/u-boot/2009-January/046241.html

Use the above and the review comments posted in February as input to your work.

It's for the phycore board but it's easy to apply this for the PDK.
I've posted some PDK related patches, they should be on the mailing
list server. The PDK patches aren't in mainline U-boot yet due to the
missing NAND boot support.

Regards, Magnus Lilja
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] omap3: mmc: mmc2 support

2009-03-27 Thread Wolfgang Denk
Dear Dirk,

In message 49cc0cc9.7060...@googlemail.com you wrote:
 Minkyu Kang wrote:
  There are 3 MMC/SD/SDIO host controllers inside the device.
  This patch will support mmc2 and mmc3.
 
 By this patch, the MMC controller actually used is configured by 
 CONFIG_MMC_INDEX at compile time? I.e. setting CONFIG_MMC_INDEX to 1 
 will use mmc1, 2 will switch to mmc2 and CONFIG_MMC_INDEX 3 will 
 switch to mmc3?
 
 If I got this right, do you think we can do this at runtime? E.g. 
 implementing a custom command
 
 select_mmc # of mmc controller to be used
 
 ?
 
 With this, we could switch to mmc2 by doing something like
 
 select_mmc 2
 
 and afterwards all mmc read/write access will go to mmc2.
 
 What do you think?

The idea is OK, but I would like to have this implemented using a
consistent interface across all other storage devices.

In other words, a FOO device [dev] - show or set current device
command should be implemented, no matter if FOO is ide or usb
or sata or scsi or mmc or ...

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: w...@denx.de
How many Unix hacks does it take to change a light bulb?  Let's  see,
   can you use a shell script for that or does it need a C program?
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] U-boot NAND boot on IMX31 3stack(ARM)

2009-03-27 Thread alfred steele
Thanks Magnus,
How difficult or rather much an effort would it need to add NAND boot
support and make it work on MX35 or MX31 3stack board.
Are there any existing guidelines for accelerating the development or
is the generic uboot porting guidelines .

Regards,
Alfred



On Fri, Mar 27, 2009 at 1:52 PM, Magnus Lilja lilja.mag...@gmail.com wrote:
 Hi

 2009/3/27 alfred steele alfred.jaq...@gmail.com:
 Hi All;

 Is there an available port for  IMX31 3stack with NAND boot.
 I am looking for a U-boot port  for IMX31 stack( which supports NAND boot.

 The closest matches i know of as of now are as follows:

 MX-31 ADS
 MX-31 Phycore
 Openmoko U-boot (Samsung processor though ARM) - This is the only one
 on ARM which allows NAND boot.

 I haven't digged up further so I am not sure at this point which
 port would be a good enough one as a starting point if no existing
 port exists.

 I would suggest using this patch as a base:
 http://lists.denx.de/pipermail/u-boot/2009-January/046241.html

 Use the above and the review comments posted in February as input to your 
 work.

 It's for the phycore board but it's easy to apply this for the PDK.
 I've posted some PDK related patches, they should be on the mailing
 list server. The PDK patches aren't in mainline U-boot yet due to the
 missing NAND boot support.

 Regards, Magnus Lilja

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 3/3] MPC85xx: Add MPC8569MDS board support

2009-03-27 Thread Wolfgang Denk
Dear Haiying Wang,

 diff --git a/board/freescale/mpc8569mds/ddr.c 
 b/board/freescale/mpc8569mds/ddr.c
 new file mode 100644
 index 000..c4e63fb
 --- /dev/null
 +++ b/board/freescale/mpc8569mds/ddr.c
 @@ -0,0 +1,86 @@
 +/*
 + * Copyright 2009 Freescale Semiconductor, Inc.
 + *
 + * This program is free software; you can redistribute it and/or
 + * modify it under the terms of the GNU General Public License
 + * Version 2 as published by the Free Software Foundation.
 + */
 +
 +#include common.h
 +#include i2c.h
 +
 +#include asm/fsl_ddr_sdram.h
 +#include asm/fsl_ddr_dimm_params.h
 +
 +static void
 +get_spd(ddr3_spd_eeprom_t *spd, unsigned char i2c_address)
 +{
 + i2c_read(i2c_address, 0, 1, (uchar *)spd, sizeof(ddr3_spd_eeprom_t));
 +}
 +
 +
 +unsigned int fsl_ddr_get_mem_data_rate(void)
 +{
 + return get_ddr_freq(0);
 +}
 +
 +void fsl_ddr_get_spd(ddr3_spd_eeprom_t *ctrl_dimms_spd,
 +   unsigned int ctrl_num)
 +{
 + unsigned int i;
 + unsigned int i2c_address = 0;
 +
 + for (i = 0; i  CONFIG_DIMM_SLOTS_PER_CTLR; i++) {
 + if (ctrl_num == 0  i == 0) {
 + i2c_address = SPD_EEPROM_ADDRESS1;
 + }
 + if (ctrl_num == 0  i == 1) {
 + i2c_address = SPD_EEPROM_ADDRESS2;
 + }

No curly braces for single line statements, please.

 diff --git a/board/freescale/mpc8569mds/mpc8569mds.c 
 b/board/freescale/mpc8569mds/mpc8569mds.c
 new file mode 100644
 index 000..1022724
 --- /dev/null
 +++ b/board/freescale/mpc8569mds/mpc8569mds.c
 @@ -0,0 +1,325 @@
...
 +phys_size_t
 +initdram(int board_type)
 +{
 + long dram_size = 0;
 +
 + puts(Initializing\n);
 +
 +#if defined(CONFIG_DDR_DLL)
 + {

Please avoid this extra block here.

 + /*
 +  * Work around to stabilize DDR DLL MSYNC_IN.
 +  * Errata DDR9 seems to have been fixed.
 +  * This is now the workaround for Errata DDR11:
 +  *Override DLL = 1, Course Adj = 1, Tap Select = 0
 +  */
 +
 + volatile ccsr_gur_t *gur = (void 
 *)(CONFIG_SYS_MPC85xx_GUTS_ADDR);

Line too long.

 +
 + gur-ddrdllcr = 0x8100;
 + asm(sync;isync;msync);
 + udelay(200);
 + }
 +#endif
 +
 +#ifdef CONFIG_SPD_EEPROM
 + dram_size = fsl_ddr_sdram();
 +#else
 +dram_size = fixed_sdram();
 +#endif

Indentation not by TAB.

 +
 + dram_size = setup_ddr_tlbs(dram_size / 0x10);
 + dram_size *= 0x10;
 +
 + puts(DDR: );
 + return dram_size;
 +}
 +
 +#if !defined(CONFIG_SPD_EEPROM)
 +phys_size_t fixed_sdram(void)
 +{
 + volatile ccsr_ddr_t *ddr = (ccsr_ddr_t *)CONFIG_SYS_MPC85xx_DDR_ADDR;
 + uint d_init;
 +
 + ddr-cs0_bnds = CONFIG_SYS_DDR_CS0_BNDS;
 + ddr-cs0_config = CONFIG_SYS_DDR_CS0_CONFIG;
 + ddr-timing_cfg_3 = CONFIG_SYS_DDR_TIMING_3;
 + ddr-timing_cfg_0 = CONFIG_SYS_DDR_TIMING_0;
 + ddr-timing_cfg_1 = CONFIG_SYS_DDR_TIMING_1;
 + ddr-timing_cfg_2 = CONFIG_SYS_DDR_TIMING_2;
 + ddr-sdram_cfg = CONFIG_SYS_DDR_SDRAM_CFG;
 + ddr-sdram_cfg_2 = CONFIG_SYS_DDR_SDRAM_CFG_2;
 + ddr-sdram_mode = CONFIG_SYS_DDR_SDRAM_MODE;
 + ddr-sdram_mode_2 = CONFIG_SYS_DDR_SDRAM_MODE_2;
 + ddr-sdram_interval = CONFIG_SYS_DDR_SDRAM_INTERVAL;
 + ddr-sdram_data_init = CONFIG_SYS_DDR_DATA_INIT;
 + ddr-sdram_clk_cntl = CONFIG_SYS_DDR_SDRAM_CLK_CNTL;
 + ddr-timing_cfg_4 = CONFIG_SYS_DDR_TIMING_4;
 + ddr-timing_cfg_5 = CONFIG_SYS_DDR_TIMING_5;
 + ddr-ddr_zq_cntl =  CONFIG_SYS_DDR_ZQ_CNTL;
 + ddr-ddr_wrlvl_cntl = CONFIG_SYS_DDR_WRLVL_CNTL;
 + ddr-sdram_cfg_2 = CONFIG_SYS_DDR_SDRAM_CFG_2;
 +#if defined (CONFIG_DDR_ECC)
 + ddr-err_int_en = CONFIG_SYS_DDR_ERR_INT_EN;
 + ddr-err_disable = CONFIG_SYS_DDR_ERR_DIS;
 + ddr-err_sbe = CONFIG_SYS_DDR_SBE;
 +#endif
 + asm(sync;isync);

Please use accessor functions for register accesses (here and
averywhere). This will probably allow you to get rid of the
sync;isync, too.


 + udelay(500);
 +
 + ddr-sdram_cfg = CONFIG_SYS_DDR_CONTROL;
 +#if defined(CONFIG_ECC_INIT_VIA_DDRCONTROLLER)
 + d_init = 1;
 + debug(DDR - 1st controller: memory initializing\n);
 + /*
 +  * Poll until memory is initialized.
 +  * 512 Meg at 400 might hit this 200 times or so.
 +  */
 + while ((ddr-sdram_cfg_2  (d_init  4)) != 0) {
 + udelay(1000);
 + }
 + debug(DDR: memory initialized\n\n);
 + asm(sync; isync);
 + udelay(500);
 +#endif
 + return 1024 * 1024 * 1024;

Why is no auto-sizing being used here?

 +}
 +#endif
 +
 +/*
 + * Initialize Local Bus
 + */
 +void
 +local_bus_init(void)
 +{
 + volatile ccsr_gur_t *gur = (void *)(CONFIG_SYS_MPC85xx_GUTS_ADDR);
 + volatile ccsr_lbc_t *lbc = (void *)(CONFIG_SYS_MPC85xx_LBC_ADDR);
 +
 + uint clkdiv;
 + uint lbc_hz;
 + sys_info_t sysinfo;
 +
 + get_sys_info(sysinfo);
 + clkdiv = 

Re: [U-Boot] [PATCH 1/3] MPC85xx: Add MPC8569 CPU support

2009-03-27 Thread Wolfgang Denk
Dear Haiying Wang,

In message 12381013102804-git-send-email-haiying.w...@freescale.com you wrote:
 There is a workaround for MPC8569 CPU Errata, which needs to set Bit 13 of 
 LBCR
 in 4K bootpage. We setup a temp TLB for eLBC controller in bootpage, then
 invalidate it after LBCR bit 13 is set.
 
 Signed-off-by: Haiying Wang haiying.w...@freescale.com
...
 --- a/cpu/mpc85xx/start.S
 +++ b/cpu/mpc85xx/start.S
...
 + lis r7,FSL_BOOKE_MAS1(1, 0, 0, 0, BOOKE_PAGESZ_4K)@h
 + ori r7,r7,FSL_BOOKE_MAS1(1, 0, 0, 0, BOOKE_PAGESZ_4K)@l
 +
 + lis r8,FSL_BOOKE_MAS2(CONFIG_SYS_LBC_ADDR, MAS2_I|MAS2_G)@h
 + ori r8,r8,FSL_BOOKE_MAS2(CONFIG_SYS_LBC_ADDR, MAS2_I|MAS2_G)@l
 +
 + lis r9,FSL_BOOKE_MAS3(CONFIG_SYS_LBC_ADDR, 0, 
 (MAS3_SX|MAS3_SW|MAS3_SR))@h
 + ori r9,r9,FSL_BOOKE_MAS3(CONFIG_SYS_LBC_ADDR, 0, 
 (MAS3_SX|MAS3_SW|MAS3_SR))@l

Lines too long.

 diff --git a/drivers/misc/fsl_law.c b/drivers/misc/fsl_law.c
 index 58340c1..be43a3e 100644
 --- a/drivers/misc/fsl_law.c
 +++ b/drivers/misc/fsl_law.c
 @@ -35,7 +35,7 @@ DECLARE_GLOBAL_DATA_PTR;
...
 +#if defined(CONFIG_MPC8569)
 + uintplppar1;/* 0xe0040 - Platform port pin assignment 
 register 1 */
 + uintplppar2;/* 0xe0044 - Platform port pin assignment 
 register 2 */
 + uintplpdir1;/* 0xe0048 - Platform port pin direction 
 register 1 */
 + uintplpdir2;/* 0xe004c - Platform port pin direction 
 register 2 */
 +#else

Lines too long.


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: w...@denx.de
The thing is, as you progress in the Craft,  you'll  learn  there  is
another rule... When you break rules, break 'em good and hard.
- Terry Pratchett, _Wyrd Sisters_
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] Please pull u-boot-mpc85xx.git

2009-03-27 Thread Wolfgang Denk
Dear Andy Fleming,

In message 1238108026-16107-1-git-send-email-aflem...@freescale.com you wrote:
 are available in the git repository at:
 
   git://www.denx.de/git/u-boot-mpc85xx.git master
 
 Dave Liu (2):
   fsl-ddr: Fix two bugs in the ddr infrastructure
   fsl-ddr: add the DDR3 SPD infrastructure
 
 Haiying Wang (3):
   MPC85xx: Load and enable QE microcode patch in IRAM
   MPC85xx: Add MPC8569MDS board support
   MPC85xx: Add MPC8569 CPU support
 
 Kumar Gala (4):
   Add LSDMR (SDRAM Mode Register) definition on localbus
   85xx: Use common LSDMR defines from asm/fsl_lbc.h
   83xx: Use common LSDMR defines from asm/fsl_lbc.h
   85xx: Add support for additional e500mc features
 
  MAKEALL |1 +
  Makefile|3 +
  board/freescale/mpc8541cds/mpc8541cds.c |   14 +-
  board/freescale/mpc8548cds/mpc8548cds.c |   10 +-
  board/freescale/mpc8555cds/mpc8555cds.c |   14 +-
  board/freescale/mpc8560ads/mpc8560ads.c |1 +
  board/freescale/mpc8568mds/mpc8568mds.c |   10 +-
  board/freescale/mpc8569mds/Makefile |   55 
  board/freescale/mpc8569mds/bcsr.c   |   49 
  board/freescale/mpc8569mds/bcsr.h   |   82 ++
  board/freescale/mpc8569mds/config.mk|   30 ++
  board/freescale/mpc8569mds/ddr.c|   86 ++
  board/freescale/mpc8569mds/law.c|   59 
  board/freescale/mpc8569mds/mpc8569mds.c |  325 ++
  board/freescale/mpc8569mds/tlb.c|  100 +++
  board/freescale/mpc8569mds/u-boot.lds   |  143 ++
  board/sbc8548/sbc8548.c |   10 +-
  common/ddr_spd.c|   53 
  cpu/mpc85xx/Makefile|1 +
  cpu/mpc85xx/cpu.c   |2 +
  cpu/mpc85xx/cpu_init.c  |   13 +
  cpu/mpc85xx/ddr-gen3.c  |6 +-
  cpu/mpc85xx/fdt.c   |   64 +-
  cpu/mpc85xx/release.S   |   16 +
  cpu/mpc85xx/start.S |   49 
  cpu/mpc8xxx/ddr/Makefile|4 +
  cpu/mpc8xxx/ddr/ctrl_regs.c |  383 +++---
  cpu/mpc8xxx/ddr/ddr3_dimm_params.c  |  314 +
  cpu/mpc8xxx/ddr/lc_common_dimm_params.c |   74 +-
  cpu/mpc8xxx/ddr/options.c   |   28 ++-
  drivers/misc/fsl_law.c  |2 +-
  drivers/qe/qe.c |9 +
  drivers/qe/qe.h |1 +
  include/asm-ppc/fsl_ddr_dimm_params.h   |7 +
  include/asm-ppc/fsl_ddr_sdram.h |   31 ++-
  include/asm-ppc/fsl_lbc.h   |   27 ++
  include/asm-ppc/immap_85xx.h|9 +-
  include/asm-ppc/immap_qe.h  |8 +-
  include/asm-ppc/processor.h |2 +
  include/configs/MPC8323ERDB.h   |   26 --
  include/configs/MPC832XEMDS.h   |   26 --
  include/configs/MPC8349EMDS.h   |   62 +
  include/configs/MPC8360EMDS.h   |   27 +--
  include/configs/MPC8540ADS.h|   59 +---
  include/configs/MPC8541CDS.h|   37 +--
  include/configs/MPC8548CDS.h|   37 +--
  include/configs/MPC8555CDS.h|   37 +--
  include/configs/MPC8560ADS.h|   59 +---
  include/configs/MPC8568MDS.h|   37 +--
  include/configs/MPC8569MDS.h|  455 
 +++
  include/configs/sbc8349.h   |   62 +
  include/configs/sbc8548.h   |   37 +--
  include/ddr_spd.h   |   13 +-
  53 files changed, 2570 insertions(+), 499 deletions(-)
  create mode 100644 board/freescale/mpc8569mds/Makefile
  create mode 100644 board/freescale/mpc8569mds/bcsr.c
  create mode 100644 board/freescale/mpc8569mds/bcsr.h
  create mode 100644 board/freescale/mpc8569mds/config.mk
  create mode 100644 board/freescale/mpc8569mds/ddr.c
  create mode 100644 board/freescale/mpc8569mds/law.c
  create mode 100644 board/freescale/mpc8569mds/mpc8569mds.c
  create mode 100644 board/freescale/mpc8569mds/tlb.c
  create mode 100644 board/freescale/mpc8569mds/u-boot.lds
  create mode 100644 cpu/mpc8xxx/ddr/ddr3_dimm_params.c
  create mode 100644 include/configs/MPC8569MDS.h

Sorry, but NAK. I have some review comments to some of the patches
that should be solved first.

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: w...@denx.de
Artificial Intelligence is no match for natural stupidity.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2] ppc: cleanup compilererrors/warnings

2009-03-27 Thread Wolfgang Denk
Dear Heiko Schocher,

In message 49cb21d7.9070...@denx.de you wrote:
 actual u-boot top of tree builds with warnings/errors for
 the following boards:
 
 ads5121 cpci5200 mecp5200 v38b IAD210 MBX MBX860T NX823
 RPXClassic debris PN62
 
 following patch solves this.
 
 Signed-off-by: Heiko Schocher h...@denx.de
 ---
 changes since v1:
 - eth_putenv_enetaddr() substituted by eth_setenv_enetaddr()
 
 
  board/RPXClassic/RPXClassic.c |3 ++-
  board/etin/debris/debris.c|1 +
  board/mbx8xx/mbx8xx.c |3 ++-
  board/nx823/nx823.c   |5 +++--
  board/pn62/pn62.c |1 +
  board/siemens/IAD210/IAD210.c |3 ++-
  board/sixnet/sixnet.c |3 ---
  board/v38b/v38b.c |3 ++-
  common/cmd_elf.c  |4 ++--
  cpu/mpc512x/cpu.c |1 +
  include/configs/MBX860T.h |1 +
  11 files changed, 17 insertions(+), 11 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: w...@denx.de
The ultimate barrier is one's viewpoint.
- Terry Pratchett, _The Dark Side of the Sun_
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] karef/metrobox/xpedite1k: fix eth_setenv_enetaddr typos

2009-03-27 Thread Wolfgang Denk
Dear Mike Frysinger,

In message 1238080661-18728-1-git-send-email-vap...@gentoo.org you wrote:
 The function is called eth_setenv_enetaddr, not eth_putenv_enetaddr.
 
 Signed-off-by: Mike Frysinger vap...@gentoo.org
 CC: Ben Warren biggerbadder...@gmail.com
 ---
  board/sandburst/karef/karef.c   |8 
  board/sandburst/metrobox/metrobox.c |8 
  board/xpedite1k/xpedite1k.c |8 
  3 files changed, 12 insertions(+), 12 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: w...@denx.de
The only way to get rid of a temptation is to yield to it.
- Oscar Wilde
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] MAINTAINERS: Keep list sorted.

2009-03-27 Thread Wolfgang Denk
Dear Detlev Zundel,

In message 1238162635-12320-1-git-send-email-...@denx.de you wrote:
 Signed-off-by: Detlev Zundel d...@denx.de
 ---
  MAINTAINERS |   13 +++--
  1 files changed, 7 insertions(+), 6 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: w...@denx.de
I'm a programmer: I don't buy software, I write it.
  -- Tom Christiansen
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] MAINTAINERS: Add entry for 'inka4x0' board.

2009-03-27 Thread Wolfgang Denk
Dear Detlev Zundel,

In message 1238162635-12320-2-git-send-email-...@denx.de you wrote:
 Signed-off-by: Detlev Zundel d...@denx.de
 ---
  MAINTAINERS |4 
  1 files changed, 4 insertions(+), 0 deletions(-)

Applied, thanks.

But please number patch series if they depend on a specific order.

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: w...@denx.de
You don't need a weatherman to know which way the wind blows.
  - Bob Dylan
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 2/2] at91: Add support for esd MEESC board

2009-03-27 Thread Wolfgang Denk
Dear Daniel Gorsulowski,

In message 1238145854513-git-send-email-daniel.gorsulow...@esd.eu you wrote:
 --===0533980373==
 
 This patch adds support for MEESC board from esd gmbh.
 The MEESC is based on an Atmel AT91SAM9263 SoC.
 
 Signed-off-by: Daniel Gorsulowski daniel.gorsulow...@esd.eu
...
 diff --git a/board/esd/meesc/meesc.c b/board/esd/meesc/meesc.c
 new file mode 100644
 index 000..122707a
 --- /dev/null
 +++ b/board/esd/meesc/meesc.c
...
 + at91_sys_write(AT91_SMC1_CYCLE(0),
 + AT91_SMC_NWECYCLE_(10) | AT91_SMC_NRDCYCLE_(5));
 + /* Configure behavior at external wait signal, byte-select mode, 16 bit
 + data bus width, none data float wait states and TDF optimization */
 + at91_sys_write(AT91_SMC1_MODE(0),
 + AT91_SMC_READMODE |
 + AT91_SMC_EXNWMODE_READY |
 + AT91_SMC_BAT_SELECT |
 + AT91_SMC_DBW_16 |
 + AT91_SMC_TDF_(0) |
 + AT91_SMC_TDFMODE);

Indentation wrong.

...
 +int dram_init(void)
 +{
 + gd-bd-bi_dram[0].start = PHYS_SDRAM;
 + gd-bd-bi_dram[0].size = PHYS_SDRAM_SIZE;
 + return(0);
 +}

Auto-sizing?

..
 +/*
 + * LED-functions
 + */
 +int do_led_1a(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
 +{
 + return(set_gpio(argc, argv, LED1A));
 +}
 +U_BOOT_CMD(
 + led_1a, 2,  1,  do_led_1a,
 + switch LED1A on or off,
 + \n
 +);
 +
 +int do_led_1b(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
 +{
 + return(set_gpio(argc, argv, LED1B));
 +}
 +U_BOOT_CMD(
 + led_1b, 2,  1,  do_led_1b,
 + switch LED1B on or off,
 + \n
 +);

Do we really, really need new, nonstandard LED commands?


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: w...@denx.de
Either one of us, by himself, is expendable.  Both of us are not.
-- Kirk, The Devil in the Dark, stardate 3196.1
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] U-boot NAND boot on IMX31 3stack(ARM)

2009-03-27 Thread Magnus Lilja
2009/3/27 alfred steele alfred.jaq...@gmail.com:
 Thanks Magnus,
 How difficult or rather much an effort would it need to add NAND boot
 support and make it work on MX35 or MX31 3stack board.
 Are there any existing guidelines for accelerating the development or
 is the generic uboot porting guidelines .


For i.MX31 3stack (a.k.a. PDK) there's really not that much porting
that needs to be done. mx31 is supported in U-boot so the following is
needed:
* Update my basic i.MX31 PDK patch to apply on top of the current
U-boot git (it's been a while since I updated it)
* Add the NAND SPL patch I mentioned in my previous reply (update it
with the review comments)
* Test and submit the patches

The above could be done in a couple of days if your're familiar with
i.MX31 and U-boot. Add more time if you're a newcomer to U-boot and/or
i.MX31.

Since Freescale hasn't published much info on i.MX35 or the 3stack for
that I can only guess that it would probably be pretty straight
forward to do a NAND SPL for i.MX35 based on the one for i.MX31 (the
NAND controller and possibly the SDRAM controller on i.MX35 seems to
be different from i.MX31).


Regards, Magnus
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 3/7] drivers/twserial: Add protocol driver for three wire serial interface.

2009-03-27 Thread Wolfgang Denk
Dear Detlev,

In message m27i2cmhpc@ohwell.denx.de you wrote:
 
 If no further feedback on the patch series arrive, I'll repost the whole
 stack tomorrow again.

I applied some of the patches that were OK, so please make sure to
rebase against master first.

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: w...@denx.de
365 Days of drinking Lo-Cal beer.   = 1 Lite-year
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v4] board support patch for phyCORE-MPC5200B-tiny

2009-03-27 Thread Wolfgang Denk
Dear Jon Smirl,

In message 9e4733910903251214y1058215l6f4b78ab0b287...@mail.gmail.com you 
wrote:
 Is this one ok now?
 
 On Tue, Mar 24, 2009 at 11:56 AM, Jon Smirl jonsm...@gmail.com wrote:
  Add support for the Phytec phyCORE-MPC5200B-tiny. This code is from Pengu=
 tronix.de but they
  didn't sign the patch.

Line too long.

  Signed-off-by: Jon Smirl jonsm...@gmail.com
 
  ---
   Makefile                            |  
 10 +
   board/phytec/pcm030/Makefile        |   50 
   board/phytec/pcm030/config.mk       |   42 +++
   board/phytec/pcm030/mt46v32m16-75.h |   54 
   board/phytec/pcm030/pcm030.c        |  206 
   cpu/mpc5xxx/ide.c                   |    3
   include/configs/pcm030.h            |  463 +
 ++
   7 files changed, 828 insertions(+), 0 deletions(-)
   create mode 100644 board/phytec/pcm030/Makefile
   create mode 100644 board/phytec/pcm030/config.mk
   create mode 100644 board/phytec/pcm030/mt46v32m16-75.h
   create mode 100644 board/phytec/pcm030/pcm030.c
   create mode 100644 include/configs/pcm030.h

Entries in MAKEALL and in MAINTAINERS missing.

Except from that, it looks OK to me.

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: w...@denx.de
I've finally learned what `upward compatible' means. It means we get
to keep all our old mistakes. - Dennie van Tassel
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 1/7] command.c: Expose the core of do_help as _do_help to the rest of u-boot.

2009-03-27 Thread Wolfgang Denk
Dear Detlev Zundel,

In message 1237998478-18452-2-git-send-email-...@denx.de you wrote:
 Other commands implementing subcommands can reuse this code nicely.
 
 Signed-off-by: Detlev Zundel d...@denx.de
 Signed-off-by: Andreas Pfefferle a...@denx.de
 ---
  common/command.c  |   20 +---
  include/command.h |4 +++-
  2 files changed, 16 insertions(+), 8 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: w...@denx.de
As far as we know, our computer has never had an undetected error.
   -- Weisert
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] mpc5xxx: Add structure definition for several more register blocks.

2009-03-27 Thread Wolfgang Denk
Dear Detlev Zundel,

In message 1237914158-15693-3-git-send-email-...@denx.de you wrote:
 Signed-off-by: Detlev Zundel d...@denx.de
 ---
  include/mpc5xxx.h |  124 
 +
  1 files changed, 124 insertions(+), 0 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: w...@denx.de
I still miss my ex-wife, but my aim is getting better.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v4] board support patch for phyCORE-MPC5200B-tiny

2009-03-27 Thread Jon Smirl
On Fri, Mar 27, 2009 at 4:12 PM, Wolfgang Denk w...@denx.de wrote:
   create mode 100644 board/phytec/pcm030/Makefile
   create mode 100644 board/phytec/pcm030/config.mk
   create mode 100644 board/phytec/pcm030/mt46v32m16-75.h
   create mode 100644 board/phytec/pcm030/pcm030.c
   create mode 100644 include/configs/pcm030.h

 Entries in MAKEALL and in MAINTAINERS missing.

Sascha and Eric, who going to be the Phytec/Pengutronix maintainer for this?
Send me a couple sets of MX35 development hardware and I'll maintain this.


 Except from that, it looks OK to me.

 Best regards,

 Wolfgang Denk


-- 
Jon Smirl
jonsm...@gmail.com
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH v2 1/3] MPC85xx: Add MPC8569 CPU support

2009-03-27 Thread Haiying Wang
There is a workaround for MPC8569 CPU Errata, which needs to set Bit 13 of LBCR
in 4K bootpage. We setup a temp TLB for eLBC controller in bootpage, then
invalidate it after LBCR bit 13 is set.

Signed-off-by: Haiying Wang haiying.w...@freescale.com
---
 cpu/mpc85xx/Makefile |1 +
 cpu/mpc85xx/cpu.c|2 +
 cpu/mpc85xx/start.S  |   49 ++
 drivers/misc/fsl_law.c   |2 +-
 include/asm-ppc/immap_85xx.h |   13 ++-
 include/asm-ppc/immap_qe.h   |8 --
 include/asm-ppc/processor.h  |2 +
 7 files changed, 72 insertions(+), 5 deletions(-)

diff --git a/cpu/mpc85xx/Makefile b/cpu/mpc85xx/Makefile
index 99d88a8..8809302 100644
--- a/cpu/mpc85xx/Makefile
+++ b/cpu/mpc85xx/Makefile
@@ -49,6 +49,7 @@ COBJS-$(CONFIG_MPC8544) += ddr-gen2.o
 COBJS-$(CONFIG_MPC8572) += ddr-gen3.o
 COBJS-$(CONFIG_MPC8536) += ddr-gen3.o
 COBJS-$(CONFIG_P2020)  += ddr-gen3.o
+COBJS-$(CONFIG_MPC8569)+= ddr-gen3.o
 
 COBJS-$(CONFIG_MPC8536) += mpc8536_serdes.o
 COBJS  = traps.o cpu.o cpu_init.o speed.o interrupts.o tlb.o \
diff --git a/cpu/mpc85xx/cpu.c b/cpu/mpc85xx/cpu.c
index 5b72fe5..ef976a4 100644
--- a/cpu/mpc85xx/cpu.c
+++ b/cpu/mpc85xx/cpu.c
@@ -61,6 +61,8 @@ struct cpu_type cpu_type_list [] = {
CPU_TYPE_ENTRY(8567, 8567_E),
CPU_TYPE_ENTRY(8568, 8568),
CPU_TYPE_ENTRY(8568, 8568_E),
+   CPU_TYPE_ENTRY(8569, 8569),
+   CPU_TYPE_ENTRY(8569, 8569_E),
CPU_TYPE_ENTRY(8572, 8572),
CPU_TYPE_ENTRY(8572, 8572_E),
CPU_TYPE_ENTRY(P2020, P2020),
diff --git a/cpu/mpc85xx/start.S b/cpu/mpc85xx/start.S
index 80f9677..0424b2b 100644
--- a/cpu/mpc85xx/start.S
+++ b/cpu/mpc85xx/start.S
@@ -184,6 +184,55 @@ _start_e500:
mtspr   DBCR0,r0
 #endif
 
+#ifdef CONFIG_MPC8569
+#define CONFIG_SYS_LBC_ADDR (CONFIG_SYS_CCSRBAR_DEFAULT + 0x5000)
+#define CONFIG_SYS_LBCR_ADDR (CONFIG_SYS_LBC_ADDR + 0xd0)
+
+   /* MPC8569 Rev.0 silcon needs to set bit 13 of LBCR to allow elBC to
+* use address space which is more than 12bits, and it must be done in
+* the 4K boot page. So we set this bit here.
+*/
+
+   /* create a temp mapping TLB0[0] for LBCR  */
+   lis r6,FSL_BOOKE_MAS0(0, 0, 0)@h
+   ori r6,r6,FSL_BOOKE_MAS0(0, 0, 0)@l
+
+   lis r7,FSL_BOOKE_MAS1(1, 0, 0, 0, BOOKE_PAGESZ_4K)@h
+   ori r7,r7,FSL_BOOKE_MAS1(1, 0, 0, 0, BOOKE_PAGESZ_4K)@l
+
+   lis r8,FSL_BOOKE_MAS2(CONFIG_SYS_LBC_ADDR, MAS2_I|MAS2_G)@h
+   ori r8,r8,FSL_BOOKE_MAS2(CONFIG_SYS_LBC_ADDR, MAS2_I|MAS2_G)@l
+
+   lis r9,FSL_BOOKE_MAS3(CONFIG_SYS_LBC_ADDR, 0,
+   (MAS3_SX|MAS3_SW|MAS3_SR))@h
+   ori r9,r9,FSL_BOOKE_MAS3(CONFIG_SYS_LBC_ADDR, 0,
+   (MAS3_SX|MAS3_SW|MAS3_SR))@l
+
+   mtspr   MAS0,r6
+   mtspr   MAS1,r7
+   mtspr   MAS2,r8
+   mtspr   MAS3,r9
+   isync
+   msync
+   tlbwe
+
+   /* Set LBCR register */
+   lis r4,config_sys_lbcr_a...@h
+   ori r4,r4,config_sys_lbcr_a...@l
+
+   lis r5,config_sys_lbc_l...@h
+   ori r5,r5,config_sys_lbc_l...@l
+   stw r5,0(r4)
+   isync
+
+   /* invalidate this temp TLB */
+   lis r4,config_sys_lbc_a...@h
+   ori r4,r4,config_sys_lbc_a...@l
+   tlbivax 0,r4
+   isync
+
+#endif /* CONFIG_MPC8569 */
+
/* create a temp mapping in AS=1 to the 4M boot window */
lis r6,FSL_BOOKE_MAS0(1, 15, 0)@h
ori r6,r6,FSL_BOOKE_MAS0(1, 15, 0)@l
diff --git a/drivers/misc/fsl_law.c b/drivers/misc/fsl_law.c
index 58340c1..be43a3e 100644
--- a/drivers/misc/fsl_law.c
+++ b/drivers/misc/fsl_law.c
@@ -35,7 +35,7 @@ DECLARE_GLOBAL_DATA_PTR;
 defined(CONFIG_MPC8560) || defined(CONFIG_MPC8555)
 #define FSL_HW_NUM_LAWS 8
 #elif defined(CONFIG_MPC8548) || defined(CONFIG_MPC8544) || \
-  defined(CONFIG_MPC8568) || \
+  defined(CONFIG_MPC8568) || defined(CONFIG_MPC8569) || \
   defined(CONFIG_MPC8641) || defined(CONFIG_MPC8610)
 #define FSL_HW_NUM_LAWS 10
 #elif defined(CONFIG_MPC8536) || defined(CONFIG_MPC8572) || \
diff --git a/include/asm-ppc/immap_85xx.h b/include/asm-ppc/immap_85xx.h
index 094fb9c..0810b8e 100644
--- a/include/asm-ppc/immap_85xx.h
+++ b/include/asm-ppc/immap_85xx.h
@@ -1609,8 +1609,19 @@ typedef struct ccsr_gur {
charres2[12];
uintgpiocr; /* 0xe0030 - GPIO control register */
charres3[12];
+#if defined(CONFIG_MPC8569)
+   uintplppar1;
+   /* 0xe0040 - Platform port pin assignment register 1 */
+   uintplppar2;
+   /* 0xe0044 - Platform port pin assignment register 2 */
+   uintplpdir1;
+   /* 0xe0048 - Platform port pin direction register 1 */
+   uintplpdir2;
+   /* 0xe004c - Platform port pin direction register 2 */

[U-Boot] [PATCH v2 3/3] MPC85xx: Add MPC8569MDS board support

2009-03-27 Thread Haiying Wang
This patch adds MPC8569MDS board support. The UART, QE UEC1 and UEC2, BRD
EEPROM on I2C2 bus, PCI express and DDR3 SPD are supported in this patch.

Signed-off-by: Haiying Wang haiying.w...@freescale.com
Signed-off-by: Hillel Avni hillel.a...@freescale.com
---
 MAKEALL |1 +
 Makefile|3 +
 board/freescale/mpc8569mds/Makefile |   55 
 board/freescale/mpc8569mds/bcsr.c   |   49 
 board/freescale/mpc8569mds/bcsr.h   |   82 ++
 board/freescale/mpc8569mds/config.mk|   30 ++
 board/freescale/mpc8569mds/ddr.c|   84 ++
 board/freescale/mpc8569mds/law.c|   59 
 board/freescale/mpc8569mds/mpc8569mds.c |  329 ++
 board/freescale/mpc8569mds/tlb.c|  103 +++
 board/freescale/mpc8569mds/u-boot.lds   |  143 ++
 include/configs/MPC8569MDS.h|  454 +++
 12 files changed, 1392 insertions(+), 0 deletions(-)
 create mode 100644 board/freescale/mpc8569mds/Makefile
 create mode 100644 board/freescale/mpc8569mds/bcsr.c
 create mode 100644 board/freescale/mpc8569mds/bcsr.h
 create mode 100644 board/freescale/mpc8569mds/config.mk
 create mode 100644 board/freescale/mpc8569mds/ddr.c
 create mode 100644 board/freescale/mpc8569mds/law.c
 create mode 100644 board/freescale/mpc8569mds/mpc8569mds.c
 create mode 100644 board/freescale/mpc8569mds/tlb.c
 create mode 100644 board/freescale/mpc8569mds/u-boot.lds
 create mode 100644 include/configs/MPC8569MDS.h

diff --git a/MAKEALL b/MAKEALL
index ed9e5ed..7b12d90 100755
--- a/MAKEALL
+++ b/MAKEALL
@@ -375,6 +375,7 @@ LIST_85xx= \
MPC8555CDS  \
MPC8560ADS  \
MPC8568MDS  \
+   MPC8569MDS  \
MPC8572DS   \
MPC8572DS_36BIT \
PM854   \
diff --git a/Makefile b/Makefile
index 61bae6d..16f5c4e 100644
--- a/Makefile
+++ b/Makefile
@@ -2422,6 +2422,9 @@ MPC8555CDS_config:unconfig
 MPC8568MDS_config: unconfig
@$(MKCONFIG) $(@:_config=) ppc mpc85xx mpc8568mds freescale
 
+MPC8569MDS_config: unconfig
+   @$(MKCONFIG) $(@:_config=) ppc mpc85xx mpc8569mds freescale
+
 MPC8572DS_36BIT_config \
 MPC8572DS_config:   unconfig
@mkdir -p $(obj)include
diff --git a/board/freescale/mpc8569mds/Makefile 
b/board/freescale/mpc8569mds/Makefile
new file mode 100644
index 000..23805ea
--- /dev/null
+++ b/board/freescale/mpc8569mds/Makefile
@@ -0,0 +1,55 @@
+#
+# Copyright 2004-2009 Freescale Semiconductor.
+# (C) Copyright 2001-2006
+# Wolfgang Denk, DENX Software Engineering, w...@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
+#
+
+include $(TOPDIR)/config.mk
+
+LIB= $(obj)lib$(BOARD).a
+
+COBJS-y+= $(BOARD).o
+COBJS-y+= bcsr.o
+COBJS-y+= ddr.o
+COBJS-y+= law.o
+COBJS-y+= tlb.o
+
+SRCS   := $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c)
+OBJS   := $(addprefix $(obj),$(COBJS-y))
+SOBJS  := $(addprefix $(obj),$(SOBJS-y))
+
+$(LIB):$(obj).depend $(OBJS) $(SOBJS)
+   $(AR) $(ARFLAGS) $@ $(OBJS)
+
+clean:
+   rm -f $(OBJS) $(SOBJS)
+
+distclean: clean
+   rm -f $(LIB) core *.bak $(obj).depend
+
+#
+
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+#
diff --git a/board/freescale/mpc8569mds/bcsr.c 
b/board/freescale/mpc8569mds/bcsr.c
new file mode 100644
index 000..5adffc2
--- /dev/null
+++ b/board/freescale/mpc8569mds/bcsr.c
@@ -0,0 +1,49 @@
+/*
+ * Copyright (C) 2009 Freescale Semiconductor, Inc. All rights reserved.
+ *
+ * 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 

[U-Boot] [PATCH 04/13] s3c44b0: move serial driver to drivers/serial

2009-03-27 Thread Jean-Christophe PLAGNIOL-VILLARD
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD plagn...@jcrosoft.com
---
 cpu/s3c44b0/Makefile   |2 +-
 drivers/serial/Makefile|1 +
 .../serial.c = drivers/serial/serial_s3c44b0.c|0
 include/configs/B2.h   |1 +
 4 files changed, 3 insertions(+), 1 deletions(-)
 rename cpu/s3c44b0/serial.c = drivers/serial/serial_s3c44b0.c (100%)

diff --git a/cpu/s3c44b0/Makefile b/cpu/s3c44b0/Makefile
index 790faeb..fd696f7 100644
--- a/cpu/s3c44b0/Makefile
+++ b/cpu/s3c44b0/Makefile
@@ -26,7 +26,7 @@ include $(TOPDIR)/config.mk
 LIB= $(obj)lib$(CPU).a
 
 START  = start.o
-COBJS  = serial.o interrupts.o cpu.o
+COBJS  = interrupts.o cpu.o
 
 SRCS   := $(START:.o=.S) $(SOBJS:.o=.S) $(COBJS:.o=.c)
 OBJS   := $(addprefix $(obj),$(SOBJS) $(COBJS))
diff --git a/drivers/serial/Makefile b/drivers/serial/Makefile
index d0efd73..37cc5a0 100644
--- a/drivers/serial/Makefile
+++ b/drivers/serial/Makefile
@@ -37,6 +37,7 @@ COBJS-$(CONFIG_IXP_SERIAL) += serial_ixp.o
 COBJS-$(CONFIG_MAX3100_SERIAL) += serial_max3100.o
 COBJS-$(CONFIG_PL010_SERIAL) += serial_pl01x.o
 COBJS-$(CONFIG_PL011_SERIAL) += serial_pl01x.o
+COBJS-$(CONFIG_S3C44B0_SERIAL) += serial_s3c44b0.o
 COBJS-$(CONFIG_XILINX_UARTLITE) += serial_xuartlite.o
 COBJS-$(CONFIG_SCIF_CONSOLE) += serial_sh.o
 COBJS-$(CONFIG_USB_TTY) += usbtty.o
diff --git a/cpu/s3c44b0/serial.c b/drivers/serial/serial_s3c44b0.c
similarity index 100%
rename from cpu/s3c44b0/serial.c
rename to drivers/serial/serial_s3c44b0.c
diff --git a/include/configs/B2.h b/include/configs/B2.h
index 9340db6..01b65c5 100644
--- a/include/configs/B2.h
+++ b/include/configs/B2.h
@@ -65,6 +65,7 @@
 /*
  * select serial console configuration
  */
+#define CONFIG_S3C44B0_SERIAL
 #define CONFIG_SERIAL1 1   /* we use Serial line 1 */
 
 #define CONFIG_S3C44B0_I2C
-- 
1.6.2.1

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 01/13] s3c4510b: move specific code to soc directory

2009-03-27 Thread Jean-Christophe PLAGNIOL-VILLARD
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD plagn...@jcrosoft.com
---
 Makefile   |2 +-
 cpu/arm720t/cpu.c  |   67 ---
 cpu/arm720t/s3c4510b/Makefile  |   46 +++
 cpu/arm720t/s3c4510b/cache.c   |   86 
 include/asm-arm/arch-arm720t/hardware.h|4 +-
 .../s3c4510b.h = arch-s3c4510b/hardware.h}|0
 6 files changed, 134 insertions(+), 71 deletions(-)
 create mode 100644 cpu/arm720t/s3c4510b/Makefile
 create mode 100644 cpu/arm720t/s3c4510b/cache.c
 rename include/asm-arm/{arch-arm720t/s3c4510b.h = arch-s3c4510b/hardware.h} 
(100%)

diff --git a/Makefile b/Makefile
index 1cce381..a6dadf6 100644
--- a/Makefile
+++ b/Makefile
@@ -2943,7 +2943,7 @@ modnet50_config : unconfig
@$(MKCONFIG) $(@:_config=) arm arm720t modnet50
 
 evb4510_config :   unconfig
-   @$(MKCONFIG) $(@:_config=) arm arm720t evb4510
+   @$(MKCONFIG) $(@:_config=) arm arm720t evb4510 NULL s3c4510b
 
 lpc2292sodimm_config:  unconfig
@$(MKCONFIG) $(@:_config=) arm arm720t lpc2292sodimm NULL lpc2292
diff --git a/cpu/arm720t/cpu.c b/cpu/arm720t/cpu.c
index 5ac8f59..d354cec 100644
--- a/cpu/arm720t/cpu.c
+++ b/cpu/arm720t/cpu.c
@@ -188,71 +188,4 @@ int dcache_status (void)
 {
return (read_p15_c1 ()  C1_IDC) != 0;
 }
-
-#elif defined(CONFIG_S3C4510B)
-
-void icache_enable (void)
-{
-   s32 i;
-
-   /* disable all cache bits */
-   CLR_REG( REG_SYSCFG, 0x3F);
-
-   /* 8KB cache, write enable */
-   SET_REG( REG_SYSCFG, CACHE_WRITE_BUFF | CACHE_MODE_01);
-
-   /* clear TAG RAM bits */
-   for ( i = 0; i  256; i++)
- PUT_REG( CACHE_TAG_RAM + 4*i, 0x);
-
-   /* clear SET0 RAM */
-   for(i=0; i  1024; i++)
- PUT_REG( CACHE_SET0_RAM + 4*i, 0x);
-
-   /* clear SET1 RAM */
-   for(i=0; i  1024; i++)
- PUT_REG( CACHE_SET1_RAM + 4*i, 0x);
-
-   /* enable cache */
-   SET_REG( REG_SYSCFG, CACHE_ENABLE);
-
-}
-
-void icache_disable (void)
-{
-   /* disable all cache bits */
-   CLR_REG( REG_SYSCFG, 0x3F);
-}
-
-int icache_status (void)
-{
-   return GET_REG( REG_SYSCFG)  CACHE_ENABLE;
-}
-
-void dcache_enable (void)
-{
-   /* we don't have seperate instruction/data caches */
-   icache_enable();
-}
-
-void dcache_disable (void)
-{
-   /* we don't have seperate instruction/data caches */
-   icache_disable();
-}
-
-int dcache_status (void)
-{
-   /* we don't have seperate instruction/data caches */
-   return icache_status();
-}
-
-#elif defined(CONFIG_INTEGRATOR)  defined(CONFIG_ARCH_INTEGRATOR)
-   /* No specific cache setup for IntegratorAP/CM720T as yet */
-   void icache_enable (void)
-   {
-   }
-#elif defined(CONFIG_LPC2292) /* just to satisfy the compiler */
-#else
-#error No icache/dcache enable/disable functions defined for this CPU type
 #endif
diff --git a/cpu/arm720t/s3c4510b/Makefile b/cpu/arm720t/s3c4510b/Makefile
new file mode 100644
index 000..c9520b6
--- /dev/null
+++ b/cpu/arm720t/s3c4510b/Makefile
@@ -0,0 +1,46 @@
+#
+# (C) Copyright 2000-2008
+# Wolfgang Denk, DENX Software Engineering, w...@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
+#
+
+include $(TOPDIR)/config.mk
+
+LIB= $(obj)lib$(SOC).a
+
+COBJS-y+= cache.o
+
+SRCS   := $(SOBJS:.o=.S) $(COBJS-y:.o=.c)
+OBJS   := $(addprefix $(obj),$(SOBJS) $(COBJS-y))
+
+all:   $(obj).depend $(LIB)
+
+$(LIB):$(OBJS)
+   $(AR) $(ARFLAGS) $@ $(OBJS)
+
+#
+
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+#
+
diff --git a/cpu/arm720t/s3c4510b/cache.c b/cpu/arm720t/s3c4510b/cache.c
new file mode 100644
index 000..104d287
--- /dev/null
+++ b/cpu/arm720t/s3c4510b/cache.c
@@ -0,0 +1,86 @@
+/*
+ * (C) Copyright 2002
+ * Sysgo Real-Time Solutions, GmbH www.elinos.com
+ * Marius Groeger mgroe...@sysgo.de
+ *
+ * (C) Copyright 2002
+ * Sysgo Real-Time Solutions, GmbH www.elinos.com
+ * 

[U-Boot] [PATCH 05/13] s3c44b0: extract cache from cpu.c

2009-03-27 Thread Jean-Christophe PLAGNIOL-VILLARD
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD plagn...@jcrosoft.com
---
 cpu/s3c44b0/Makefile   |2 +-
 cpu/s3c44b0/{cpu.c = cache.c} |   56 +---
 cpu/s3c44b0/cpu.c  |   62 
 3 files changed, 2 insertions(+), 118 deletions(-)
 copy cpu/s3c44b0/{cpu.c = cache.c} (71%)

diff --git a/cpu/s3c44b0/Makefile b/cpu/s3c44b0/Makefile
index fd696f7..ae909a6 100644
--- a/cpu/s3c44b0/Makefile
+++ b/cpu/s3c44b0/Makefile
@@ -26,7 +26,7 @@ include $(TOPDIR)/config.mk
 LIB= $(obj)lib$(CPU).a
 
 START  = start.o
-COBJS  = interrupts.o cpu.o
+COBJS  = cache.o cpu.o interrupts.o
 
 SRCS   := $(START:.o=.S) $(SOBJS:.o=.S) $(COBJS:.o=.c)
 OBJS   := $(addprefix $(obj),$(SOBJS) $(COBJS))
diff --git a/cpu/s3c44b0/cpu.c b/cpu/s3c44b0/cache.c
similarity index 71%
copy from cpu/s3c44b0/cpu.c
copy to cpu/s3c44b0/cache.c
index 752191d..bc10171 100644
--- a/cpu/s3c44b0/cpu.c
+++ b/cpu/s3c44b0/cache.c
@@ -24,10 +24,6 @@
  * MA 02111-1307 USA
  */
 
-/*
- * S3C44B0 CPU specific code
- */
-
 #include common.h
 #include command.h
 #include asm/hardware.h
@@ -42,57 +38,6 @@ static void s3c44b0_flush_cache(void)
}
 }
 
-
-int cpu_init (void)
-{
-   icache_enable();
-
-   return 0;
-}
-
-int cleanup_before_linux (void)
-{
-   /*
-   cache memory should be enabled before calling
-   Linux to make the kernel uncompression faster
-   */
-   icache_enable();
-
-   disable_interrupts ();
-
-   return 0;
-}
-
-void reset_cpu (ulong addr)
-{
-   /*
-   reset the cpu using watchdog
-   */
-
-   /* Disable the watchdog.*/
-   WTCON=~(15);
-
-   /* set the timeout value to a short time... */
-   WTCNT = 0x1;
-
-   /* Enable the watchdog. */
-   WTCON|=1;
-   WTCON|=(15);
-
-   while(1) {
-   /*NOP*/
-   }
-}
-
-int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
-{
-   disable_interrupts ();
-   reset_cpu (0);
-
-   /*NOTREACHED*/
-   return (0);
-}
-
 void icache_enable (void)
 {
ulong reg;
@@ -143,3 +88,4 @@ int dcache_status (void)
 {
return dcache_status();
 }
+
diff --git a/cpu/s3c44b0/cpu.c b/cpu/s3c44b0/cpu.c
index 752191d..e4cdb82 100644
--- a/cpu/s3c44b0/cpu.c
+++ b/cpu/s3c44b0/cpu.c
@@ -32,17 +32,6 @@
 #include command.h
 #include asm/hardware.h
 
-static void s3c44b0_flush_cache(void)
-{
-   volatile int i;
-   /* flush cycle */
-   for(i=0x10002000;i0x10004800;i+=16)
-   {
-   *((int *)i)=0x0;
-   }
-}
-
-
 int cpu_init (void)
 {
icache_enable();
@@ -92,54 +81,3 @@ int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char 
*argv[])
/*NOTREACHED*/
return (0);
 }
-
-void icache_enable (void)
-{
-   ulong reg;
-
-   s3c44b0_flush_cache();
-
-   /*
-   Init cache
-   Non-cacheable area (everything outside RAM)
-   0x: - 0x0C00:
-*/
-   NCACHBE0 = 0xC000;
-   NCACHBE1 = 0x;
-
-   /*
-   Enable chache
-   */
-   reg = SYSCFG;
-   reg |= 0x0006; /* 8kB */
-   SYSCFG = reg;
-}
-
-void icache_disable (void)
-{
-   ulong reg;
-
-   reg = SYSCFG;
-   reg = ~0x0006; /* 8kB */
-   SYSCFG = reg;
-}
-
-int icache_status (void)
-{
-   return 0;
-}
-
-void dcache_enable (void)
-{
-   icache_enable();
-}
-
-void dcache_disable (void)
-{
-   icache_disable();
-}
-
-int dcache_status (void)
-{
-   return dcache_status();
-}
-- 
1.6.2.1

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 02/13] s3c44b0: move i2c driver to drivers/i2c

2009-03-27 Thread Jean-Christophe PLAGNIOL-VILLARD
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD plagn...@jcrosoft.com
---
 cpu/s3c44b0/cpu.c  |  735 +++-
 drivers/i2c/Makefile   |1 +
 cpu/s3c44b0/cpu.c = drivers/i2c/s3c44b0_i2c.c |  198 ---
 include/configs/B2.h   |2 +
 4 files changed, 225 insertions(+), 711 deletions(-)
 rewrite cpu/s3c44b0/cpu.c (60%)
 rename cpu/s3c44b0/cpu.c = drivers/i2c/s3c44b0_i2c.c (70%)

diff --git a/cpu/s3c44b0/cpu.c b/cpu/s3c44b0/cpu.c
dissimilarity index 60%
index 2960f2f..0c44691 100644
--- a/cpu/s3c44b0/cpu.c
+++ b/cpu/s3c44b0/cpu.c
@@ -1,513 +1,222 @@
-/*
- * (C) Copyright 2004
- * DAVE Srl
- * http://www.dave-tech.it
- * http://www.wawnet.biz
- * mailto:i...@wawnet.biz
- *
- * 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
- */
-
-/*
- * S3C44B0 CPU specific code
- */
-
-#include common.h
-#include command.h
-#include asm/hardware.h
-
-static void s3c44b0_flush_cache(void)
-{
-   volatile int i;
-   /* flush cycle */
-   for(i=0x10002000;i0x10004800;i+=16)
-   {
-   *((int *)i)=0x0;
-   }
-}
-
-
-int cpu_init (void)
-{
-   icache_enable();
-
-   return 0;
-}
-
-int cleanup_before_linux (void)
-{
-   /*
-   cache memory should be enabled before calling
-   Linux to make the kernel uncompression faster
-   */
-   icache_enable();
-
-   disable_interrupts ();
-
-   return 0;
-}
-
-void reset_cpu (ulong addr)
-{
-   /*
-   reset the cpu using watchdog
-   */
-
-   /* Disable the watchdog.*/
-   WTCON=~(15);
-
-   /* set the timeout value to a short time... */
-   WTCNT = 0x1;
-
-   /* Enable the watchdog. */
-   WTCON|=1;
-   WTCON|=(15);
-
-   while(1) {
-   /*NOP*/
-   }
-}
-
-int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
-{
-   disable_interrupts ();
-   reset_cpu (0);
-
-   /*NOTREACHED*/
-   return (0);
-}
-
-void icache_enable (void)
-{
-   ulong reg;
-
-   s3c44b0_flush_cache();
-
-   /*
-   Init cache
-   Non-cacheable area (everything outside RAM)
-   0x: - 0x0C00:
-*/
-   NCACHBE0 = 0xC000;
-   NCACHBE1 = 0x;
-
-   /*
-   Enable chache
-   */
-   reg = SYSCFG;
-   reg |= 0x0006; /* 8kB */
-   SYSCFG = reg;
-}
-
-void icache_disable (void)
-{
-   ulong reg;
-
-   reg = SYSCFG;
-   reg = ~0x0006; /* 8kB */
-   SYSCFG = reg;
-}
-
-int icache_status (void)
-{
-   return 0;
-}
-
-void dcache_enable (void)
-{
-   icache_enable();
-}
-
-void dcache_disable (void)
-{
-   icache_disable();
-}
-
-int dcache_status (void)
-{
-   return dcache_status();
-}
-
-/*
-   RTC stuff
-*/
-#include rtc.h
-#ifndef BCD2HEX
-   #define BCD2HEX(n)  ((n4)*10+(n0x0f))
-#endif
-#ifndef HEX2BCD
-   #define HEX2BCD(x) x) / 10)  4) + (x) % 10)
-#endif
-
-int rtc_get (struct rtc_time* tm)
-{
-   RTCCON |= 1;
-   tm-tm_year  = BCD2HEX(BCDYEAR);
-   tm-tm_mon   = BCD2HEX(BCDMON);
-   tm-tm_wday   = BCD2HEX(BCDDATE);
-   tm-tm_mday   = BCD2HEX(BCDDAY);
-   tm-tm_hour  = BCD2HEX(BCDHOUR);
-   tm-tm_min  = BCD2HEX(BCDMIN);
-   tm-tm_sec  = BCD2HEX(BCDSEC);
-
-   if (tm-tm_sec==0) {
-   /* we have to re-read the rtc data because of the one second 
deviation problem */
-   /* see RTC datasheet for more info about it */
-   tm-tm_year  = BCD2HEX(BCDYEAR);
-   tm-tm_mon   = BCD2HEX(BCDMON);
-   tm-tm_mday   = BCD2HEX(BCDDAY);
-   tm-tm_wday   = BCD2HEX(BCDDATE);
-   tm-tm_hour  = BCD2HEX(BCDHOUR);
-   tm-tm_min  = BCD2HEX(BCDMIN);
-   tm-tm_sec  = BCD2HEX(BCDSEC);
-   }
-
-   RTCCON = ~1;
-
-   if(tm-tm_year = 70)
-   tm-tm_year += 1900;
-   else
-   tm-tm_year += 2000;
-
-   return 0;
-}
-
-int rtc_set (struct rtc_time* tm)
-{
-   if(tm-tm_year  2000)
-   tm-tm_year -= 1900;
-   else
-   tm-tm_year -= 2000;
-
-   RTCCON |= 1;

[U-Boot] [PATCH 03/13] s3c44b0: move rtc driver to drivers/rtc

2009-03-27 Thread Jean-Christophe PLAGNIOL-VILLARD
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD plagn...@jcrosoft.com
---
 cpu/s3c44b0/cpu.c |   77 --
 drivers/rtc/Makefile  |1 +
 drivers/rtc/s3c44b0_rtc.c |  102 +
 include/configs/B2.h  |1 +
 4 files changed, 104 insertions(+), 77 deletions(-)
 create mode 100644 drivers/rtc/s3c44b0_rtc.c

diff --git a/cpu/s3c44b0/cpu.c b/cpu/s3c44b0/cpu.c
index 0c44691..752191d 100644
--- a/cpu/s3c44b0/cpu.c
+++ b/cpu/s3c44b0/cpu.c
@@ -143,80 +143,3 @@ int dcache_status (void)
 {
return dcache_status();
 }
-
-/*
-   RTC stuff
-*/
-#include rtc.h
-#ifndef BCD2HEX
-   #define BCD2HEX(n)  ((n4)*10+(n0x0f))
-#endif
-#ifndef HEX2BCD
-   #define HEX2BCD(x) x) / 10)  4) + (x) % 10)
-#endif
-
-int rtc_get (struct rtc_time* tm)
-{
-   RTCCON |= 1;
-   tm-tm_year  = BCD2HEX(BCDYEAR);
-   tm-tm_mon   = BCD2HEX(BCDMON);
-   tm-tm_wday   = BCD2HEX(BCDDATE);
-   tm-tm_mday   = BCD2HEX(BCDDAY);
-   tm-tm_hour  = BCD2HEX(BCDHOUR);
-   tm-tm_min  = BCD2HEX(BCDMIN);
-   tm-tm_sec  = BCD2HEX(BCDSEC);
-
-   if (tm-tm_sec==0) {
-   /* we have to re-read the rtc data because of the one second 
deviation problem */
-   /* see RTC datasheet for more info about it */
-   tm-tm_year  = BCD2HEX(BCDYEAR);
-   tm-tm_mon   = BCD2HEX(BCDMON);
-   tm-tm_mday   = BCD2HEX(BCDDAY);
-   tm-tm_wday   = BCD2HEX(BCDDATE);
-   tm-tm_hour  = BCD2HEX(BCDHOUR);
-   tm-tm_min  = BCD2HEX(BCDMIN);
-   tm-tm_sec  = BCD2HEX(BCDSEC);
-   }
-
-   RTCCON = ~1;
-
-   if(tm-tm_year = 70)
-   tm-tm_year += 1900;
-   else
-   tm-tm_year += 2000;
-
-   return 0;
-}
-
-int rtc_set (struct rtc_time* tm)
-{
-   if(tm-tm_year  2000)
-   tm-tm_year -= 1900;
-   else
-   tm-tm_year -= 2000;
-
-   RTCCON |= 1;
-   BCDYEAR = HEX2BCD(tm-tm_year);
-   BCDMON = HEX2BCD(tm-tm_mon);
-   BCDDAY = HEX2BCD(tm-tm_mday);
-   BCDDATE = HEX2BCD(tm-tm_wday);
-   BCDHOUR = HEX2BCD(tm-tm_hour);
-   BCDMIN = HEX2BCD(tm-tm_min);
-   BCDSEC = HEX2BCD(tm-tm_sec);
-   RTCCON = 1;
-
-   return 0;
-}
-
-void rtc_reset (void)
-{
-   RTCCON |= 1;
-   BCDYEAR = 0;
-   BCDMON = 0;
-   BCDDAY = 0;
-   BCDDATE = 0;
-   BCDHOUR = 0;
-   BCDMIN = 0;
-   BCDSEC = 0;
-   RTCCON = 1;
-}
diff --git a/drivers/rtc/Makefile b/drivers/rtc/Makefile
index 94bc518..3831dd9 100644
--- a/drivers/rtc/Makefile
+++ b/drivers/rtc/Makefile
@@ -57,6 +57,7 @@ COBJS-$(CONFIG_RTC_PL031) += pl031.o
 COBJS-$(CONFIG_RTC_RS5C372A) += rs5c372.o
 COBJS-$(CONFIG_RTC_RX8025) += rx8025.o
 COBJS-$(CONFIG_RTC_S3C24X0) += s3c24x0_rtc.o
+COBJS-$(CONFIG_RTC_S3C44B0) += s3c44b0_rtc.o
 COBJS-$(CONFIG_RTC_X1205) += x1205.o
 
 COBJS  := $(sort $(COBJS-y))
diff --git a/drivers/rtc/s3c44b0_rtc.c b/drivers/rtc/s3c44b0_rtc.c
new file mode 100644
index 000..489536f
--- /dev/null
+++ b/drivers/rtc/s3c44b0_rtc.c
@@ -0,0 +1,102 @@
+/*
+ * (C) Copyright 2004
+ * DAVE Srl
+ * http://www.dave-tech.it
+ * http://www.wawnet.biz
+ * mailto:i...@wawnet.biz
+ *
+ * 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
+ */
+
+/*
+ * S3C44B0 CPU specific code
+ */
+
+#include common.h
+#include command.h
+#include asm/hardware.h
+#include rtc.h
+#include bcd.h
+
+int rtc_get (struct rtc_time* tm)
+{
+   RTCCON |= 1;
+   tm-tm_year  = BCD2BIN(BCDYEAR);
+   tm-tm_mon   = BCD2BIN(BCDMON);
+   tm-tm_wday   = BCD2BIN(BCDDATE);
+   tm-tm_mday   = BCD2BIN(BCDDAY);
+   tm-tm_hour  = BCD2BIN(BCDHOUR);
+   tm-tm_min  = BCD2BIN(BCDMIN);
+   tm-tm_sec  = BCD2BIN(BCDSEC);
+
+   if (tm-tm_sec==0) {
+   /* we have to re-read the rtc data because of the one second 
deviation problem */
+   /* see RTC datasheet for more info about it */
+   tm-tm_year  = BCD2BIN(BCDYEAR);
+   tm-tm_mon   = BCD2BIN(BCDMON);
+   tm-tm_mday   = BCD2BIN(BCDDAY);
+   tm-tm_wday   = BCD2BIN(BCDDATE);
+   tm-tm_hour  = 

[U-Boot] [PATCH 07/13] netarm: move serial driver to drivers/serial

2009-03-27 Thread Jean-Christophe PLAGNIOL-VILLARD
add CONFIG_NETARM_SERIAL to activate the driver

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD plagn...@jcrosoft.com
---
 cpu/arm720t/Makefile|2 +-
 drivers/serial/Makefile |1 +
 {cpu/arm720t = drivers/serial}/serial_netarm.c |5 -
 include/configs/modnet50.h  |1 +
 4 files changed, 3 insertions(+), 6 deletions(-)
 rename {cpu/arm720t = drivers/serial}/serial_netarm.c (99%)

diff --git a/cpu/arm720t/Makefile b/cpu/arm720t/Makefile
index c97f329..a038042 100644
--- a/cpu/arm720t/Makefile
+++ b/cpu/arm720t/Makefile
@@ -26,7 +26,7 @@ include $(TOPDIR)/config.mk
 LIB= $(obj)lib$(CPU).a
 
 START  = start.o
-COBJS  = serial.o serial_netarm.o interrupts.o cpu.o
+COBJS  = serial.o interrupts.o cpu.o
 
 SRCS   := $(START:.o=.S) $(SOBJS:.o=.S) $(COBJS:.o=.c)
 OBJS   := $(addprefix $(obj),$(COBJS) $(SOBJS))
diff --git a/drivers/serial/Makefile b/drivers/serial/Makefile
index 8cac794..e76a2ad 100644
--- a/drivers/serial/Makefile
+++ b/drivers/serial/Makefile
@@ -35,6 +35,7 @@ COBJS-$(CONFIG_S3C64XX) += s3c64xx.o
 COBJS-$(CONFIG_SYS_NS16550_SERIAL) += serial.o
 COBJS-$(CONFIG_IXP_SERIAL) += serial_ixp.o
 COBJS-$(CONFIG_MAX3100_SERIAL) += serial_max3100.o
+COBJS-$(CONFIG_NETARM_SERIAL) += serial_netarm.o
 COBJS-$(CONFIG_PL010_SERIAL) += serial_pl01x.o
 COBJS-$(CONFIG_PL011_SERIAL) += serial_pl01x.o
 COBJS-$(CONFIG_SA1100_SERIAL) += serial_sa1100.o
diff --git a/cpu/arm720t/serial_netarm.c b/drivers/serial/serial_netarm.c
similarity index 99%
rename from cpu/arm720t/serial_netarm.c
rename to drivers/serial/serial_netarm.c
index 1a1b2db..2eb5393 100644
--- a/cpu/arm720t/serial_netarm.c
+++ b/drivers/serial/serial_netarm.c
@@ -29,9 +29,6 @@
  */
 
 #include common.h
-
-#ifdef CONFIG_NETARM
-
 #include asm/hardware.h
 
 DECLARE_GLOBAL_DATA_PTR;
@@ -196,5 +193,3 @@ void serial_puts (const char *s)
serial_putc (*s++);
}
 }
-
-#endif /* CONFIG_NETARM */
diff --git a/include/configs/modnet50.h b/include/configs/modnet50.h
index b8ae018..74bab5f 100644
--- a/include/configs/modnet50.h
+++ b/include/configs/modnet50.h
@@ -56,6 +56,7 @@
 /*
  * select serial console configuration
  */
+#define CONFIG_NETARM_SERIAL
 #define CONFIG_SERIAL1 1   /* we use Serial line 1 */
 
 /* allow to overwrite serial and ethaddr */
-- 
1.6.2.1

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 06/13] sa1100: move serial driver to drivers/serial

2009-03-27 Thread Jean-Christophe PLAGNIOL-VILLARD
add CONFIG_SA1100_SERIAL to activate the driver

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD plagn...@jcrosoft.com
---
 cpu/sa1100/Makefile|2 +-
 drivers/serial/Makefile|1 +
 .../serial.c = drivers/serial/serial_sa1100.c |0
 include/configs/assabet.h  |1 +
 include/configs/dnp1110.h  |1 +
 include/configs/gcplus.h   |1 +
 include/configs/lart.h |1 +
 include/configs/shannon.h  |1 +
 8 files changed, 7 insertions(+), 1 deletions(-)
 rename cpu/sa1100/serial.c = drivers/serial/serial_sa1100.c (100%)

diff --git a/cpu/sa1100/Makefile b/cpu/sa1100/Makefile
index 790faeb..fd696f7 100644
--- a/cpu/sa1100/Makefile
+++ b/cpu/sa1100/Makefile
@@ -26,7 +26,7 @@ include $(TOPDIR)/config.mk
 LIB= $(obj)lib$(CPU).a
 
 START  = start.o
-COBJS  = serial.o interrupts.o cpu.o
+COBJS  = interrupts.o cpu.o
 
 SRCS   := $(START:.o=.S) $(SOBJS:.o=.S) $(COBJS:.o=.c)
 OBJS   := $(addprefix $(obj),$(SOBJS) $(COBJS))
diff --git a/drivers/serial/Makefile b/drivers/serial/Makefile
index 37cc5a0..8cac794 100644
--- a/drivers/serial/Makefile
+++ b/drivers/serial/Makefile
@@ -37,6 +37,7 @@ COBJS-$(CONFIG_IXP_SERIAL) += serial_ixp.o
 COBJS-$(CONFIG_MAX3100_SERIAL) += serial_max3100.o
 COBJS-$(CONFIG_PL010_SERIAL) += serial_pl01x.o
 COBJS-$(CONFIG_PL011_SERIAL) += serial_pl01x.o
+COBJS-$(CONFIG_SA1100_SERIAL) += serial_sa1100.o
 COBJS-$(CONFIG_S3C44B0_SERIAL) += serial_s3c44b0.o
 COBJS-$(CONFIG_XILINX_UARTLITE) += serial_xuartlite.o
 COBJS-$(CONFIG_SCIF_CONSOLE) += serial_sh.o
diff --git a/cpu/sa1100/serial.c b/drivers/serial/serial_sa1100.c
similarity index 100%
rename from cpu/sa1100/serial.c
rename to drivers/serial/serial_sa1100.c
diff --git a/include/configs/assabet.h b/include/configs/assabet.h
index 4da68b3..a6c442b 100644
--- a/include/configs/assabet.h
+++ b/include/configs/assabet.h
@@ -57,6 +57,7 @@
 /*
  * select serial console configuration
  */
+#define CONFIG_SA1100_SERIAL
 #define CONFIG_SERIAL1  1  /* we use SERIAL 1 on Intel Assabet */
 
 /* allow to overwrite serial and ethaddr */
diff --git a/include/configs/dnp1110.h b/include/configs/dnp1110.h
index 3f658a7..8f615bd 100644
--- a/include/configs/dnp1110.h
+++ b/include/configs/dnp1110.h
@@ -59,6 +59,7 @@
 /*
  * select serial console configuration
  */
+#define CONFIG_SA1100_SERIAL
 #define CONFIG_SERIAL1  1  /* we use SERIAL 1 */
 
 /* allow to overwrite serial and ethaddr */
diff --git a/include/configs/gcplus.h b/include/configs/gcplus.h
index 81ee05f..77d4578 100644
--- a/include/configs/gcplus.h
+++ b/include/configs/gcplus.h
@@ -70,6 +70,7 @@
 /*
  * select serial console configuration
  */
+#define CONFIG_SA1100_SERIAL
 #define CONFIG_SERIAL3  1  /* we use SERIAL 3 on ADS GCPlus */
 
 /* allow to overwrite serial and ethaddr */
diff --git a/include/configs/lart.h b/include/configs/lart.h
index 877d5c7..e34ec22 100644
--- a/include/configs/lart.h
+++ b/include/configs/lart.h
@@ -52,6 +52,7 @@
 /*
  * select serial console configuration
  */
+#define CONFIG_SA1100_SERIAL
 #define CONFIG_SERIAL3  1  /* we use SERIAL 3 on LART */
 
 /* allow to overwrite serial and ethaddr */
diff --git a/include/configs/shannon.h b/include/configs/shannon.h
index 717036c..c8b0b16 100644
--- a/include/configs/shannon.h
+++ b/include/configs/shannon.h
@@ -59,6 +59,7 @@
 /*
  * select serial console configuration
  */
+#define CONFIG_SA1100_SERIAL
 #define CONFIG_SERIAL3  1  /* we use SERIAL 3  */
 
 /* allow to overwrite serial and ethaddr */
-- 
1.6.2.1

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 09/13] s3c64xx: move usb driver to drivers/usb

2009-03-27 Thread Jean-Christophe PLAGNIOL-VILLARD
add CONFIG_USB_S3C64XX to activate the driver

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD plagn...@jcrosoft.com
---
 cpu/arm1176/s3c64xx/Makefile   |1 -
 drivers/usb/Makefile   |1 +
 .../s3c64xx/usb.c = drivers/usb/s3c64xx_usb.c |0
 include/configs/smdk6400.h |1 +
 4 files changed, 2 insertions(+), 1 deletions(-)
 rename cpu/arm1176/s3c64xx/usb.c = drivers/usb/s3c64xx_usb.c (100%)

diff --git a/cpu/arm1176/s3c64xx/Makefile b/cpu/arm1176/s3c64xx/Makefile
index 4ab1811..fa4ee3f 100644
--- a/cpu/arm1176/s3c64xx/Makefile
+++ b/cpu/arm1176/s3c64xx/Makefile
@@ -30,7 +30,6 @@ LIB   = $(obj)lib$(SOC).a
 
 COBJS-y= interrupts.o
 COBJS-$(CONFIG_S3C6400)+= cpu_init.o speed.o
-COBJS-$(CONFIG_USB_OHCI_NEW) += usb.o
 
 OBJS   := $(addprefix $(obj),$(SOBJS) $(COBJS-y))
 
diff --git a/drivers/usb/Makefile b/drivers/usb/Makefile
index b306a65..7ddb72a 100644
--- a/drivers/usb/Makefile
+++ b/drivers/usb/Makefile
@@ -33,6 +33,7 @@ COBJS-$(CONFIG_USB_EHCI) += usb_ehci_core.o
 # host
 COBJS-$(CONFIG_USB_ISP116X_HCD) += isp116x-hcd.o
 COBJS-$(CONFIG_USB_R8A66597_HCD) += r8a66597-hcd.o
+COBJS-$(CONFIG_USB_S3C64XX) += s3c64xx_usb.o
 COBJS-$(CONFIG_USB_SL811HS) += sl811_usb.o
 COBJS-$(CONFIG_USB_EHCI_FSL) += usb_ehci_fsl.o
 COBJS-$(CONFIG_USB_EHCI_PCI) += usb_ehci_pci.o
diff --git a/cpu/arm1176/s3c64xx/usb.c b/drivers/usb/s3c64xx_usb.c
similarity index 100%
rename from cpu/arm1176/s3c64xx/usb.c
rename to drivers/usb/s3c64xx_usb.c
diff --git a/include/configs/smdk6400.h b/include/configs/smdk6400.h
index 06d6a88..d3cf6e5 100644
--- a/include/configs/smdk6400.h
+++ b/include/configs/smdk6400.h
@@ -288,6 +288,7 @@
 
 #if !defined(CONFIG_ENABLE_MMU)
 #define CONFIG_CMD_USB 1
+#define CONFIG_USB_S3C64XX
 #define CONFIG_USB_OHCI_NEW1
 #define CONFIG_SYS_USB_OHCI_REGS_BASE  0x7430
 #define CONFIG_SYS_USB_OHCI_SLOT_NAME  s3c6400
-- 
1.6.2.1

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 10/13] ks8695: move serial driver to drivers/serial

2009-03-27 Thread Jean-Christophe PLAGNIOL-VILLARD
add CONFIG_KS8695_SERIAL to activate the driver

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD plagn...@jcrosoft.com
---
 cpu/arm920t/ks8695/Makefile|2 +-
 drivers/serial/Makefile|1 +
 .../serial.c = drivers/serial/serial_ks8695.c |0
 include/configs/cm4008.h   |1 +
 include/configs/cm41xx.h   |1 +
 5 files changed, 4 insertions(+), 1 deletions(-)
 rename cpu/arm920t/ks8695/serial.c = drivers/serial/serial_ks8695.c (100%)

diff --git a/cpu/arm920t/ks8695/Makefile b/cpu/arm920t/ks8695/Makefile
index 7db9473..f6b0063 100644
--- a/cpu/arm920t/ks8695/Makefile
+++ b/cpu/arm920t/ks8695/Makefile
@@ -25,7 +25,7 @@ include $(TOPDIR)/config.mk
 
 LIB= $(obj)lib$(SOC).a
 
-COBJS  = interrupts.o serial.o
+COBJS  = interrupts.o
 SOBJS  = lowlevel_init.o
 
 SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
diff --git a/drivers/serial/Makefile b/drivers/serial/Makefile
index 619d9da..95255df 100644
--- a/drivers/serial/Makefile
+++ b/drivers/serial/Makefile
@@ -34,6 +34,7 @@ COBJS-$(CONFIG_DRIVER_S3C4510_UART) += s3c4510b_uart.o
 COBJS-$(CONFIG_S3C64XX) += s3c64xx.o
 COBJS-$(CONFIG_SYS_NS16550_SERIAL) += serial.o
 COBJS-$(CONFIG_IXP_SERIAL) += serial_ixp.o
+COBJS-$(CONFIG_KS8695_SERIAL) += serial_ks8695.o
 COBJS-$(CONFIG_MAX3100_SERIAL) += serial_max3100.o
 COBJS-$(CONFIG_MX31_UART) += serial_mx31.o
 COBJS-$(CONFIG_NETARM_SERIAL) += serial_netarm.o
diff --git a/cpu/arm920t/ks8695/serial.c b/drivers/serial/serial_ks8695.c
similarity index 100%
rename from cpu/arm920t/ks8695/serial.c
rename to drivers/serial/serial_ks8695.c
diff --git a/include/configs/cm4008.h b/include/configs/cm4008.h
index 124fad7..7ea1a46 100644
--- a/include/configs/cm4008.h
+++ b/include/configs/cm4008.h
@@ -53,6 +53,7 @@
  * select serial console configuration
  */
 #define CONFIG_ENV_IS_NOWHERE
+#define CONFIG_KS8695_SERIAL
 #defineCONFIG_SERIAL1
 #define CONFIG_CONS_INDEX  1
 #define CONFIG_BAUDRATE115200
diff --git a/include/configs/cm41xx.h b/include/configs/cm41xx.h
index 5c255ce..ea374da 100644
--- a/include/configs/cm41xx.h
+++ b/include/configs/cm41xx.h
@@ -53,6 +53,7 @@
  * select serial console configuration
  */
 #define CONFIG_ENV_IS_NOWHERE
+#define CONFIG_KS8695_SERIAL
 #defineCONFIG_SERIAL1
 #define CONFIG_CONS_INDEX  1
 #define CONFIG_BAUDRATE115200
-- 
1.6.2.1

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 11/13] lpc2292: move serial driver to drivers/serial

2009-03-27 Thread Jean-Christophe PLAGNIOL-VILLARD
add CONFIG_LPC2292_SERIAL to activate the driver

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD plagn...@jcrosoft.com
---
 cpu/arm720t/serial.c|   77 
 drivers/serial/Makefile |1 +
 drivers/serial/serial_lpc2292.c |  105 +++
 include/configs/SMN42.h |1 +
 include/configs/lpc2292sodimm.h |1 +
 5 files changed, 108 insertions(+), 77 deletions(-)
 create mode 100644 drivers/serial/serial_lpc2292.c

diff --git a/cpu/arm720t/serial.c b/cpu/arm720t/serial.c
index 54a9b31..b54d1cf 100644
--- a/cpu/arm720t/serial.c
+++ b/cpu/arm720t/serial.c
@@ -122,81 +122,4 @@ serial_puts (const char *s)
serial_putc (*s++);
}
 }
-
-#elif defined(CONFIG_LPC2292)
-
-DECLARE_GLOBAL_DATA_PTR;
-
-#include asm/arch/hardware.h
-
-void serial_setbrg (void)
-{
-   unsigned short divisor = 0;
-
-   switch (gd-baudrate) {
-   case   1200:divisor = 3072; break;
-   case   9600:divisor =  384; break;
-   case  19200:divisor =  192; break;
-   case  38400:divisor =   96; break;
-   case  57600:divisor =   64; break;
-   case 115200:divisor =   32; break;
-   default:hang ();break;
-   }
-
-   /* init serial UART0 */
-   PUT8(U0LCR, 0);
-   PUT8(U0IER, 0);
-   PUT8(U0LCR, 0x80);  /* DLAB=1 */
-   PUT8(U0DLL, (unsigned char)(divisor  0x00FF));
-   PUT8(U0DLM, (unsigned char)(divisor  8));
-   PUT8(U0LCR, 0x03);  /* 8N1, DLAB=0  */
-   PUT8(U0FCR, 1); /* Enable RX and TX FIFOs */
-}
-
-int serial_init (void)
-{
-   unsigned long pinsel0;
-
-   serial_setbrg ();
-
-   pinsel0 = GET32(PINSEL0);
-   pinsel0 = ~(0x0003);
-   pinsel0 |= 5;
-   PUT32(PINSEL0, pinsel0);
-
-   return (0);
-}
-
-void serial_putc (const char c)
-{
-   if (c == '\n')
-   {
-   while((GET8(U0LSR)  (15)) == 0); /* Wait for empty U0THR */
-   PUT8(U0THR, '\r');
-   }
-
-   while((GET8(U0LSR)  (15)) == 0); /* Wait for empty U0THR */
-   PUT8(U0THR, c);
-}
-
-int serial_getc (void)
-{
-   while((GET8(U0LSR)  1) == 0);
-   return GET8(U0RBR);
-}
-
-void
-serial_puts (const char *s)
-{
-   while (*s) {
-   serial_putc (*s++);
-   }
-}
-
-/* Test if there is a byte to read */
-int serial_tstc (void)
-{
-   return (GET8(U0LSR)  1);
-}
-
 #endif
diff --git a/drivers/serial/Makefile b/drivers/serial/Makefile
index 95255df..eaf4f8e 100644
--- a/drivers/serial/Makefile
+++ b/drivers/serial/Makefile
@@ -35,6 +35,7 @@ COBJS-$(CONFIG_S3C64XX) += s3c64xx.o
 COBJS-$(CONFIG_SYS_NS16550_SERIAL) += serial.o
 COBJS-$(CONFIG_IXP_SERIAL) += serial_ixp.o
 COBJS-$(CONFIG_KS8695_SERIAL) += serial_ks8695.o
+COBJS-$(CONFIG_LPC2292_SERIAL) += serial_lpc2292.o
 COBJS-$(CONFIG_MAX3100_SERIAL) += serial_max3100.o
 COBJS-$(CONFIG_MX31_UART) += serial_mx31.o
 COBJS-$(CONFIG_NETARM_SERIAL) += serial_netarm.o
diff --git a/drivers/serial/serial_lpc2292.c b/drivers/serial/serial_lpc2292.c
new file mode 100644
index 000..87b7d5f
--- /dev/null
+++ b/drivers/serial/serial_lpc2292.c
@@ -0,0 +1,105 @@
+/*
+ * (C) Copyright 2002-2004
+ * Wolfgang Denk, DENX Software Engineering, w...@denx.de
+ *
+ * (C) Copyright 2002
+ * Sysgo Real-Time Solutions, GmbH www.elinos.com
+ * Marius Groeger mgroe...@sysgo.de
+ *
+ * (C) Copyright 2002
+ * Sysgo Real-Time Solutions, GmbH www.elinos.com
+ * Alex Zuepke a...@sysgo.de
+ *
+ * Copyright (C) 1999 2000 2001 Erik Mouw (j.a.k.m...@its.tudelft.nl)
+ *
+ * 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/hardware.h
+
+DECLARE_GLOBAL_DATA_PTR;
+
+void serial_setbrg (void)
+{
+   unsigned short divisor = 0;
+
+   switch (gd-baudrate) {
+   case   1200:divisor = 3072; break;
+   case   9600:divisor =  384; break;
+   case  19200:divisor =  192; break;
+   case  38400:divisor =   96; break;
+   case  57600:divisor =   64; break;
+   case 115200:divisor =   32; break;
+   default:hang ();break;
+   }
+
+   /* init serial UART0 */
+   PUT8(U0LCR, 0);
+   PUT8(U0IER, 0);
+   PUT8(U0LCR, 0x80);  /* DLAB=1 */
+   

[U-Boot] [PATCH 13/13] ompa3: remove duplicate interrupts code

2009-03-27 Thread Jean-Christophe PLAGNIOL-VILLARD
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD plagn...@jcrosoft.com
---
 cpu/arm_cortexa8/omap3/interrupts.c |  128 ---
 1 files changed, 0 insertions(+), 128 deletions(-)

diff --git a/cpu/arm_cortexa8/omap3/interrupts.c 
b/cpu/arm_cortexa8/omap3/interrupts.c
index 9e9817d..384ffdc 100644
--- a/cpu/arm_cortexa8/omap3/interrupts.c
+++ b/cpu/arm_cortexa8/omap3/interrupts.c
@@ -34,137 +34,9 @@
 
 #include common.h
 #include asm/io.h
-#include asm/proc-armv/ptrace.h
 
 #define TIMER_LOAD_VAL 0
 
-#ifdef CONFIG_USE_IRQ
-/* enable IRQ interrupts */
-void enable_interrupts(void)
-{
-   unsigned long temp;
-   __asm__ __volatile__(mrs %0, cpsr\n
-bic %0, %0, #0x80\n msr cpsr_c, %0:=r(temp)
-::memory);
-}
-
-/*
- * disable IRQ/FIQ interrupts
- * returns true if interrupts had been enabled before we disabled them
- */
-int disable_interrupts(void)
-{
-   unsigned long old, temp;
-   __asm__ __volatile__(mrs %0, cpsr\n
-orr %1, %0, #0xc0\n
-msr cpsr_c, %1:=r(old), =r(temp)
-::memory);
-   return (old  0x80) == 0;
-}
-#else
-void enable_interrupts(void)
-{
-   return;
-}
-int disable_interrupts(void)
-{
-   return 0;
-}
-#endif
-
-void bad_mode(void)
-{
-   panic(Resetting CPU ...\n);
-   reset_cpu(0);
-}
-
-void show_regs(struct pt_regs *regs)
-{
-   unsigned long flags;
-   const char *processor_modes[] = {
-   USER_26, FIQ_26, IRQ_26, SVC_26,
-   UK4_26, UK5_26, UK6_26, UK7_26,
-   UK8_26, UK9_26, UK10_26, UK11_26,
-   UK12_26, UK13_26, UK14_26, UK15_26,
-   USER_32, FIQ_32, IRQ_32, SVC_32,
-   UK4_32, UK5_32, UK6_32, ABT_32,
-   UK8_32, UK9_32, UK10_32, UND_32,
-   UK12_32, UK13_32, UK14_32, SYS_32,
-   };
-
-   flags = condition_codes(regs);
-
-   printf(pc : [%08lx]lr : [%08lx]\n
-   sp : %08lx  ip : %08lx  fp : %08lx\n,
-   instruction_pointer(regs),
-   regs-ARM_lr, regs-ARM_sp, regs-ARM_ip, regs-ARM_fp);
-   printf(r10: %08lx  r9 : %08lx  r8 : %08lx\n,
-   regs-ARM_r10, regs-ARM_r9, regs-ARM_r8);
-   printf(r7 : %08lx  r6 : %08lx  r5 : %08lx  r4 : %08lx\n,
-   regs-ARM_r7, regs-ARM_r6, regs-ARM_r5, regs-ARM_r4);
-   printf(r3 : %08lx  r2 : %08lx  r1 : %08lx  r0 : %08lx\n,
-   regs-ARM_r3, regs-ARM_r2, regs-ARM_r1, regs-ARM_r0);
-   printf(Flags: %c%c%c%c,
-   flags  CC_N_BIT ? 'N' : 'n',
-   flags  CC_Z_BIT ? 'Z' : 'z',
-   flags  CC_C_BIT ? 'C' : 'c', flags  CC_V_BIT ? 'V' : 'v');
-   printf(  IRQs %s  FIQs %s  Mode %s%s\n,
-   interrupts_enabled(regs) ? on : off,
-   fast_interrupts_enabled(regs) ? on : off,
-   processor_modes[processor_mode(regs)],
-   thumb_mode(regs) ?  (T) : );
-}
-
-void do_undefined_instruction(struct pt_regs *pt_regs)
-{
-   printf(undefined instruction\n);
-   show_regs(pt_regs);
-   bad_mode();
-}
-
-void do_software_interrupt(struct pt_regs *pt_regs)
-{
-   printf(software interrupt\n);
-   show_regs(pt_regs);
-   bad_mode();
-}
-
-void do_prefetch_abort(struct pt_regs *pt_regs)
-{
-   printf(prefetch abort\n);
-   show_regs(pt_regs);
-   bad_mode();
-}
-
-void do_data_abort(struct pt_regs *pt_regs)
-{
-   printf(data abort\n);
-   show_regs(pt_regs);
-   bad_mode();
-}
-
-void do_not_used(struct pt_regs *pt_regs)
-{
-   printf(not used\n);
-   show_regs(pt_regs);
-   bad_mode();
-}
-
-void do_fiq(struct pt_regs *pt_regs)
-{
-   printf(fast interrupt request\n);
-   show_regs(pt_regs);
-   bad_mode();
-}
-
-void do_irq(struct pt_regs *pt_regs)
-{
-   printf(interrupt request\n);
-   show_regs(pt_regs);
-   bad_mode();
-}
-
-
 static ulong timestamp;
 static ulong lastinc;
 static gptimer_t *timer_base = (gptimer_t *)CONFIG_SYS_TIMERBASE;
-- 
1.6.2.1

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 12/13] arm720t/clps7111: move serial driver to drivers/serial

2009-03-27 Thread Jean-Christophe PLAGNIOL-VILLARD
add CONFIG_CLPS7111_SERIAL to activate the driver

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD plagn...@jcrosoft.com
---
 cpu/arm720t/Makefile   |2 +-
 drivers/serial/Makefile|1 +
 .../serial.c = drivers/serial/serial_clps7111.c   |4 
 include/configs/armadillo.h|1 +
 include/configs/ep7312.h   |1 +
 include/configs/impa7.h|1 +
 6 files changed, 5 insertions(+), 5 deletions(-)
 rename cpu/arm720t/serial.c = drivers/serial/serial_clps7111.c (96%)

diff --git a/cpu/arm720t/Makefile b/cpu/arm720t/Makefile
index a038042..d5ac7d3 100644
--- a/cpu/arm720t/Makefile
+++ b/cpu/arm720t/Makefile
@@ -26,7 +26,7 @@ include $(TOPDIR)/config.mk
 LIB= $(obj)lib$(CPU).a
 
 START  = start.o
-COBJS  = serial.o interrupts.o cpu.o
+COBJS  = interrupts.o cpu.o
 
 SRCS   := $(START:.o=.S) $(SOBJS:.o=.S) $(COBJS:.o=.c)
 OBJS   := $(addprefix $(obj),$(COBJS) $(SOBJS))
diff --git a/drivers/serial/Makefile b/drivers/serial/Makefile
index eaf4f8e..6ab847f 100644
--- a/drivers/serial/Makefile
+++ b/drivers/serial/Makefile
@@ -33,6 +33,7 @@ COBJS-$(CONFIG_SYS_NS16550) += ns16550.o
 COBJS-$(CONFIG_DRIVER_S3C4510_UART) += s3c4510b_uart.o
 COBJS-$(CONFIG_S3C64XX) += s3c64xx.o
 COBJS-$(CONFIG_SYS_NS16550_SERIAL) += serial.o
+COBJS-$(CONFIG_CLPS7111_SERIAL) += serial_clps7111.o
 COBJS-$(CONFIG_IXP_SERIAL) += serial_ixp.o
 COBJS-$(CONFIG_KS8695_SERIAL) += serial_ks8695.o
 COBJS-$(CONFIG_LPC2292_SERIAL) += serial_lpc2292.o
diff --git a/cpu/arm720t/serial.c b/drivers/serial/serial_clps7111.c
similarity index 96%
rename from cpu/arm720t/serial.c
rename to drivers/serial/serial_clps7111.c
index b54d1cf..a6aecad 100644
--- a/cpu/arm720t/serial.c
+++ b/drivers/serial/serial_clps7111.c
@@ -29,9 +29,6 @@
  */
 
 #include common.h
-
-#if defined(CONFIG_IMPA7) || defined(CONFIG_EP7312) || 
defined(CONFIG_ARMADILLO)
-
 #include clps7111.h
 
 DECLARE_GLOBAL_DATA_PTR;
@@ -122,4 +119,3 @@ serial_puts (const char *s)
serial_putc (*s++);
}
 }
-#endif
diff --git a/include/configs/armadillo.h b/include/configs/armadillo.h
index ef6ce22..7ba5e17 100644
--- a/include/configs/armadillo.h
+++ b/include/configs/armadillo.h
@@ -64,6 +64,7 @@
 /*
  * select serial console configuration
  */
+#define CONFIG_CLPS7111_SERIAL
 #define CONFIG_SERIAL1 1   /* we use Serial line 1 */
 
 /* allow to overwrite serial and ethaddr */
diff --git a/include/configs/ep7312.h b/include/configs/ep7312.h
index d12b13f..630fff3 100644
--- a/include/configs/ep7312.h
+++ b/include/configs/ep7312.h
@@ -55,6 +55,7 @@
 /*
  * select serial console configuration
  */
+#define CONFIG_CLPS7111_SERIAL
 #define CONFIG_SERIAL1 1   /* we use Serial line 1 */
 
 /* allow to overwrite serial and ethaddr */
diff --git a/include/configs/impa7.h b/include/configs/impa7.h
index efd4214..c7001cc 100644
--- a/include/configs/impa7.h
+++ b/include/configs/impa7.h
@@ -54,6 +54,7 @@
 /*
  * select serial console configuration
  */
+#define CONFIG_CLPS7111_SERIAL
 #define CONFIG_SERIAL1 1   /* we use Serial line 1 */
 
 /* allow to overwrite serial and ethaddr */
-- 
1.6.2.1

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 08/13] imx31: move serial driver to drivers/serial

2009-03-27 Thread Jean-Christophe PLAGNIOL-VILLARD
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD plagn...@jcrosoft.com
---
 cpu/arm1136/mx31/Makefile  |2 +-
 drivers/serial/Makefile|1 +
 .../mx31/serial.c = drivers/serial/serial_mx31.c  |6 --
 3 files changed, 2 insertions(+), 7 deletions(-)
 rename cpu/arm1136/mx31/serial.c = drivers/serial/serial_mx31.c (99%)

diff --git a/cpu/arm1136/mx31/Makefile b/cpu/arm1136/mx31/Makefile
index b648ffd..0e06f0a 100644
--- a/cpu/arm1136/mx31/Makefile
+++ b/cpu/arm1136/mx31/Makefile
@@ -25,7 +25,7 @@ include $(TOPDIR)/config.mk
 
 LIB= $(obj)lib$(SOC).a
 
-COBJS  = interrupts.o serial.o generic.o
+COBJS  = interrupts.o generic.o
 
 SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
 OBJS   := $(addprefix $(obj),$(SOBJS) $(COBJS))
diff --git a/drivers/serial/Makefile b/drivers/serial/Makefile
index e76a2ad..619d9da 100644
--- a/drivers/serial/Makefile
+++ b/drivers/serial/Makefile
@@ -35,6 +35,7 @@ COBJS-$(CONFIG_S3C64XX) += s3c64xx.o
 COBJS-$(CONFIG_SYS_NS16550_SERIAL) += serial.o
 COBJS-$(CONFIG_IXP_SERIAL) += serial_ixp.o
 COBJS-$(CONFIG_MAX3100_SERIAL) += serial_max3100.o
+COBJS-$(CONFIG_MX31_UART) += serial_mx31.o
 COBJS-$(CONFIG_NETARM_SERIAL) += serial_netarm.o
 COBJS-$(CONFIG_PL010_SERIAL) += serial_pl01x.o
 COBJS-$(CONFIG_PL011_SERIAL) += serial_pl01x.o
diff --git a/cpu/arm1136/mx31/serial.c b/drivers/serial/serial_mx31.c
similarity index 99%
rename from cpu/arm1136/mx31/serial.c
rename to drivers/serial/serial_mx31.c
index e025e94..7c0682a 100644
--- a/cpu/arm1136/mx31/serial.c
+++ b/drivers/serial/serial_mx31.c
@@ -18,9 +18,6 @@
  */
 
 #include common.h
-
-#if defined CONFIG_MX31_UART
-
 #include asm/arch/mx31.h
 
 #define __REG(x) (*((volatile u32 *)(x)))
@@ -227,6 +224,3 @@ int serial_init (void)
 
return 0;
 }
-
-
-#endif /* CONFIG_MX31 */
-- 
1.6.2.1

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 01/13 V2] at91sam9/at91cap: spi init add hardware chip select support

2009-03-27 Thread Jean-Christophe PLAGNIOL-VILLARD
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD plagn...@jcrosoft.com
---
Fix typo in the commit message

Best Regards,
J.
 cpu/arm926ejs/at91/at91cap9_spi.c|   37 -
 cpu/arm926ejs/at91/at91sam9260_spi.c |   36 +++-
 cpu/arm926ejs/at91/at91sam9261_spi.c |   36 +++-
 cpu/arm926ejs/at91/at91sam9263_spi.c |   36 +++-
 cpu/arm926ejs/at91/at91sam9rl_spi.c  |   18 +--
 5 files changed, 136 insertions(+), 27 deletions(-)

diff --git a/cpu/arm926ejs/at91/at91cap9_spi.c 
b/cpu/arm926ejs/at91/at91cap9_spi.c
index 356a804..cd8143b 100644
--- a/cpu/arm926ejs/at91/at91cap9_spi.c
+++ b/cpu/arm926ejs/at91/at91cap9_spi.c
@@ -38,15 +38,27 @@ void at91_spi0_hw_init(unsigned long cs_mask)
at91_sys_write(AT91_PMC_PCER, 1  AT91CAP9_ID_SPI0);
 
if (cs_mask  (1  0)) {
-   at91_set_gpio_output(AT91_PIN_PA5, 1);
+   at91_set_B_periph(AT91_PIN_PA5, 1);
}
if (cs_mask  (1  1)) {
-   at91_set_gpio_output(AT91_PIN_PA3, 1);
+   at91_set_B_periph(AT91_PIN_PA3, 1);
}
if (cs_mask  (1  2)) {
-   at91_set_gpio_output(AT91_PIN_PD0, 1);
+   at91_set_B_periph(AT91_PIN_PD0, 1);
}
if (cs_mask  (1  3)) {
+   at91_set_B_periph(AT91_PIN_PD1, 1);
+   }
+   if (cs_mask  (1  4)) {
+   at91_set_gpio_output(AT91_PIN_PA5, 1);
+   }
+   if (cs_mask  (1  5)) {
+   at91_set_gpio_output(AT91_PIN_PA3, 1);
+   }
+   if (cs_mask  (1  6)) {
+   at91_set_gpio_output(AT91_PIN_PD0, 1);
+   }
+   if (cs_mask  (1  7)) {
at91_set_gpio_output(AT91_PIN_PD1, 1);
}
 }
@@ -61,15 +73,28 @@ void at91_spi1_hw_init(unsigned long cs_mask)
at91_sys_write(AT91_PMC_PCER, 1  AT91CAP9_ID_SPI1);
 
if (cs_mask  (1  0)) {
-   at91_set_gpio_output(AT91_PIN_PB15, 1);
+   at91_set_A_periph(AT91_PIN_PB15, 1);
}
if (cs_mask  (1  1)) {
-   at91_set_gpio_output(AT91_PIN_PB16, 1);
+   at91_set_A_periph(AT91_PIN_PB16, 1);
}
if (cs_mask  (1  2)) {
-   at91_set_gpio_output(AT91_PIN_PB17, 1);
+   at91_set_A_periph(AT91_PIN_PB17, 1);
}
if (cs_mask  (1  3)) {
+   at91_set_A_periph(AT91_PIN_PB18, 1);
+   }
+   if (cs_mask  (1  4)) {
+   at91_set_gpio_output(AT91_PIN_PB15, 1);
+   }
+   if (cs_mask  (1  5)) {
+   at91_set_gpio_output(AT91_PIN_PB16, 1);
+   }
+   if (cs_mask  (1  6)) {
+   at91_set_gpio_output(AT91_PIN_PB17, 1);
+   }
+   if (cs_mask  (1  7)) {
at91_set_gpio_output(AT91_PIN_PB18, 1);
}
+
 }
diff --git a/cpu/arm926ejs/at91/at91sam9260_spi.c 
b/cpu/arm926ejs/at91/at91sam9260_spi.c
index 0105072..d6fd80e 100644
--- a/cpu/arm926ejs/at91/at91sam9260_spi.c
+++ b/cpu/arm926ejs/at91/at91sam9260_spi.c
@@ -38,15 +38,27 @@ void at91_spi0_hw_init(unsigned long cs_mask)
at91_sys_write(AT91_PMC_PCER, 1  AT91SAM9260_ID_SPI0);
 
if (cs_mask  (1  0)) {
-   at91_set_gpio_output(AT91_PIN_PA3, 1);
+   at91_set_A_periph(AT91_PIN_PA3, 1);
}
if (cs_mask  (1  1)) {
-   at91_set_gpio_output(AT91_PIN_PC11, 1);
+   at91_set_B_periph(AT91_PIN_PC11, 1);
}
if (cs_mask  (1  2)) {
-   at91_set_gpio_output(AT91_PIN_PC16, 1);
+   at91_set_B_periph(AT91_PIN_PC16, 1);
}
if (cs_mask  (1  3)) {
+   at91_set_B_periph(AT91_PIN_PC17, 1);
+   }
+   if (cs_mask  (1  4)) {
+   at91_set_gpio_output(AT91_PIN_PA3, 1);
+   }
+   if (cs_mask  (1  5)) {
+   at91_set_gpio_output(AT91_PIN_PC11, 1);
+   }
+   if (cs_mask  (1  6)) {
+   at91_set_gpio_output(AT91_PIN_PC16, 1);
+   }
+   if (cs_mask  (1  7)) {
at91_set_gpio_output(AT91_PIN_PC17, 1);
}
 }
@@ -61,15 +73,27 @@ void at91_spi1_hw_init(unsigned long cs_mask)
at91_sys_write(AT91_PMC_PCER, 1  AT91SAM9260_ID_SPI1);
 
if (cs_mask  (1  0)) {
-   at91_set_gpio_output(AT91_PIN_PB3, 1);
+   at91_set_A_periph(AT91_PIN_PB3, 1);
}
if (cs_mask  (1  1)) {
-   at91_set_gpio_output(AT91_PIN_PC5, 1);
+   at91_set_B_periph(AT91_PIN_PC5, 1);
}
if (cs_mask  (1  2)) {
-   at91_set_gpio_output(AT91_PIN_PC4, 1);
+   at91_set_B_periph(AT91_PIN_PC4, 1);
}
if (cs_mask  (1  3)) {
at91_set_gpio_output(AT91_PIN_PC3, 1);
}
+   if (cs_mask  (1  4)) {
+   at91_set_gpio_output(AT91_PIN_PB3, 1);
+   }
+   if (cs_mask  (1  5)) {
+   at91_set_gpio_output(AT91_PIN_PC5, 1);
+   }
+

[U-Boot] [PATCH 03/13] at91: rename DATAFLASH_MMC_SELECT to CONFIG_DATAFLASH_MMC_SELECT

2009-03-27 Thread Jean-Christophe PLAGNIOL-VILLARD
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD plagn...@jcrosoft.com
---
 board/atmel/at91rm9200dk/mux.c |   74 
 cpu/arm926ejs/at91/.gitignore  |5 +++
 include/at45.h |2 +-
 3 files changed, 43 insertions(+), 38 deletions(-)
 rewrite board/atmel/at91rm9200dk/mux.c (69%)
 create mode 100644 cpu/arm926ejs/at91/.gitignore

diff --git a/board/atmel/at91rm9200dk/mux.c b/board/atmel/at91rm9200dk/mux.c
dissimilarity index 69%
index 767d280..5e03673 100644
--- a/board/atmel/at91rm9200dk/mux.c
+++ b/board/atmel/at91rm9200dk/mux.c
@@ -1,37 +1,37 @@
-#include config.h
-#include common.h
-#include asm/hardware.h
-#include dataflash.h
-
-int AT91F_GetMuxStatus(void) {
-#ifdef DATAFLASH_MMC_SELECT
-   AT91C_BASE_PIOB-PIO_PER = DATAFLASH_MMC_SELECT; /* Set in PIO mode */
-   AT91C_BASE_PIOB-PIO_OER = DATAFLASH_MMC_SELECT; /* Configure in output 
*/
-
-
-   if(AT91C_BASE_PIOB-PIO_ODSR  DATAFLASH_MMC_SELECT) {
-   return 1;
-   } else {
-   return 0;
-   }
-#endif
-   return 0;
-}
-
-void AT91F_SelectMMC(void) {
-#ifdef DATAFLASH_MMC_SELECT
-   AT91C_BASE_PIOB-PIO_PER = DATAFLASH_MMC_SELECT;/* Set in PIO 
mode */
-   AT91C_BASE_PIOB-PIO_OER = DATAFLASH_MMC_SELECT;/* Configure in 
output */
-   /* Set Output */
-   AT91C_BASE_PIOB-PIO_SODR = DATAFLASH_MMC_SELECT;
-#endif
-}
-
-void AT91F_SelectSPI(void) {
-#ifdef DATAFLASH_MMC_SELECT
-   AT91C_BASE_PIOB-PIO_PER = DATAFLASH_MMC_SELECT;/* Set in PIO 
mode */
-   AT91C_BASE_PIOB-PIO_OER = DATAFLASH_MMC_SELECT;/* Configure in 
output */
-   /* Clear Output */
-   AT91C_BASE_PIOB-PIO_CODR = DATAFLASH_MMC_SELECT;
-#endif
-}
+#include config.h
+#include common.h
+#include asm/hardware.h
+#include dataflash.h
+
+int AT91F_GetMuxStatus(void) {
+#ifdef CONFIG_DATAFLASH_MMC_SELECT
+   AT91C_BASE_PIOB-PIO_PER = CONFIG_SYS_DATAFLASH_MMC_PIO; /* Set in PIO 
mode */
+   AT91C_BASE_PIOB-PIO_OER = CONFIG_SYS_DATAFLASH_MMC_PIO; /* Configure 
in output */
+
+
+   if(AT91C_BASE_PIOB-PIO_ODSR  CONFIG_SYS_DATAFLASH_MMC_PIO) {
+   return 1;
+   } else {
+   return 0;
+   }
+#endif
+   return 0;
+}
+
+void AT91F_SelectMMC(void) {
+#ifdef CONFIG_DATAFLASH_MMC_SELECT
+   AT91C_BASE_PIOB-PIO_PER = CONFIG_SYS_DATAFLASH_MMC_PIO; /* Set in PIO 
mode */
+   AT91C_BASE_PIOB-PIO_OER = CONFIG_SYS_DATAFLASH_MMC_PIO; /* Configure 
in output */
+   /* Set Output */
+   AT91C_BASE_PIOB-PIO_SODR = CONFIG_SYS_DATAFLASH_MMC_PIO;
+#endif
+}
+
+void AT91F_SelectSPI(void) {
+#ifdef CONFIG_DATAFLASH_MMC_SELECT
+   AT91C_BASE_PIOB-PIO_PER = CONFIG_SYS_DATAFLASH_MMC_PIO; /* Set in PIO 
mode */
+   AT91C_BASE_PIOB-PIO_OER = CONFIG_SYS_DATAFLASH_MMC_PIO; /* Configure 
in output */
+   /* Clear Output */
+   AT91C_BASE_PIOB-PIO_CODR = CONFIG_SYS_DATAFLASH_MMC_PIO;
+#endif
+}
diff --git a/cpu/arm926ejs/at91/.gitignore b/cpu/arm926ejs/at91/.gitignore
new file mode 100644
index 000..8a8c3b8
--- /dev/null
+++ b/cpu/arm926ejs/at91/.gitignore
@@ -0,0 +1,5 @@
+#
+# Generated files
+#
+
+/u-boot.lds
diff --git a/include/at45.h b/include/at45.h
index 40bb4a0..e7e3711 100644
--- a/include/at45.h
+++ b/include/at45.h
@@ -1,7 +1,7 @@
 
 #ifndef_AT45_H_
 #define_AT45_H_
-#ifdef DATAFLASH_MMC_SELECT
+#ifdef CONFIG_DATAFLASH_MMC_SELECT
 extern void AT91F_SelectMMC(void);
 extern void AT91F_SelectSPI(void);
 extern int AT91F_GetMuxStatus(void);
-- 
1.6.2.1

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 04/13] at91rm9200dk: Move conditional compilation to Makefile

2009-03-27 Thread Jean-Christophe PLAGNIOL-VILLARD
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD plagn...@jcrosoft.com
---
 board/atmel/at91rm9200dk/Makefile |   14 ++
 board/atmel/at91rm9200dk/mux.c|   12 ++--
 2 files changed, 12 insertions(+), 14 deletions(-)

diff --git a/board/atmel/at91rm9200dk/Makefile 
b/board/atmel/at91rm9200dk/Makefile
index 2d806d0..79d41d6 100644
--- a/board/atmel/at91rm9200dk/Makefile
+++ b/board/atmel/at91rm9200dk/Makefile
@@ -25,10 +25,16 @@ include $(TOPDIR)/config.mk
 
 LIB= $(obj)lib$(BOARD).a
 
-COBJS  := at91rm9200dk.o flash.o led.o mux.o partition.o
-
-SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS   := $(addprefix $(obj),$(COBJS))
+COBJS-y += $(BOARD).o
+COBJS-y += flash.o
+COBJS-y += led.o
+ifdef CONFIG_HAS_DATAFLASH
+COBJS-$(CONFIG_DATAFLASH_MMC_SELECT) += mux.o
+COBJS-y += partition.o
+endif
+
+SRCS   := $(SOBJS:.o=.S) $(COBJS-y:.o=.c)
+OBJS   := $(addprefix $(obj),$(COBJS-y))
 SOBJS  := $(addprefix $(obj),$(SOBJS))
 
 $(LIB):$(obj).depend $(OBJS) $(SOBJS)
diff --git a/board/atmel/at91rm9200dk/mux.c b/board/atmel/at91rm9200dk/mux.c
index 5e03673..a00563e 100644
--- a/board/atmel/at91rm9200dk/mux.c
+++ b/board/atmel/at91rm9200dk/mux.c
@@ -4,34 +4,26 @@
 #include dataflash.h
 
 int AT91F_GetMuxStatus(void) {
-#ifdef CONFIG_DATAFLASH_MMC_SELECT
AT91C_BASE_PIOB-PIO_PER = CONFIG_SYS_DATAFLASH_MMC_PIO; /* Set in PIO 
mode */
AT91C_BASE_PIOB-PIO_OER = CONFIG_SYS_DATAFLASH_MMC_PIO; /* Configure 
in output */
 
 
-   if(AT91C_BASE_PIOB-PIO_ODSR  CONFIG_SYS_DATAFLASH_MMC_PIO) {
+   if(AT91C_BASE_PIOB-PIO_ODSR  CONFIG_SYS_DATAFLASH_MMC_PIO)
return 1;
-   } else {
-   return 0;
-   }
-#endif
+
return 0;
 }
 
 void AT91F_SelectMMC(void) {
-#ifdef CONFIG_DATAFLASH_MMC_SELECT
AT91C_BASE_PIOB-PIO_PER = CONFIG_SYS_DATAFLASH_MMC_PIO; /* Set in PIO 
mode */
AT91C_BASE_PIOB-PIO_OER = CONFIG_SYS_DATAFLASH_MMC_PIO; /* Configure 
in output */
/* Set Output */
AT91C_BASE_PIOB-PIO_SODR = CONFIG_SYS_DATAFLASH_MMC_PIO;
-#endif
 }
 
 void AT91F_SelectSPI(void) {
-#ifdef CONFIG_DATAFLASH_MMC_SELECT
AT91C_BASE_PIOB-PIO_PER = CONFIG_SYS_DATAFLASH_MMC_PIO; /* Set in PIO 
mode */
AT91C_BASE_PIOB-PIO_OER = CONFIG_SYS_DATAFLASH_MMC_PIO; /* Configure 
in output */
/* Clear Output */
AT91C_BASE_PIOB-PIO_CODR = CONFIG_SYS_DATAFLASH_MMC_PIO;
-#endif
 }
-- 
1.6.2.1

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 05/13] add dataflash mmc mux missing support

2009-03-27 Thread Jean-Christophe PLAGNIOL-VILLARD
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD plagn...@jcrosoft.com
---
 common/Makefile|1 +
 common/cmd_dataflash_mmc_mux.c |   65 
 2 files changed, 66 insertions(+), 0 deletions(-)
 create mode 100644 common/cmd_dataflash_mmc_mux.c

diff --git a/common/Makefile b/common/Makefile
index 23171ca..b6f36c9 100644
--- a/common/Makefile
+++ b/common/Makefile
@@ -70,6 +70,7 @@ COBJS-$(CONFIG_CMD_BOOTLDR) += cmd_bootldr.o
 COBJS-$(CONFIG_CMD_CACHE) += cmd_cache.o
 COBJS-$(CONFIG_CMD_CONSOLE) += cmd_console.o
 COBJS-$(CONFIG_CMD_CPLBINFO) += cmd_cplbinfo.o
+COBJS-$(CONFIG_DATAFLASH_MMC_SELECT) += cmd_dataflash_mmc_mux.o
 COBJS-$(CONFIG_CMD_DATE) += cmd_date.o
 ifdef CONFIG_4xx
 COBJS-$(CONFIG_CMD_SETGETDCR) += cmd_dcr.o
diff --git a/common/cmd_dataflash_mmc_mux.c b/common/cmd_dataflash_mmc_mux.c
new file mode 100644
index 000..4b2cf1c
--- /dev/null
+++ b/common/cmd_dataflash_mmc_mux.c
@@ -0,0 +1,65 @@
+/*
+ * (C) Copyright 2000
+ * Wolfgang Denk, DENX Software Engineering, w...@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
+ */
+
+#include common.h
+#include command.h
+
+static int mmc_nspi (const char *);
+
+int do_dataflash_mmc_mux (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+{
+   switch (argc) {
+   case 2: /* on / off */
+   switch (mmc_nspi (argv[1])) {
+   case 0: AT91F_SelectSPI ();
+   break;
+   case 1: AT91F_SelectMMC ();
+   break;
+   }
+   case 1: /* get status */
+   printf (Mux is configured to be %s\n,
+   AT91F_GetMuxStatus () ? MMC : SPI);
+   return 0;
+   default:
+   printf (Usage:\n%s\n, cmdtp-usage);
+   return 1;
+   }
+   return 0;
+}
+
+static int mmc_nspi (const char *s)
+{
+   if (strcmp (s, mmc) == 0) {
+   return 1;
+   } else if (strcmp (s, spi) == 0) {
+   return 0;
+   }
+   return -1;
+}
+
+U_BOOT_CMD(
+   dataflash_mmc_mux, 2, 1, do_dataflash_mmc_mux,
+   dataflash_mmc_mux\t- enable or disable MMC or SPI\n,
+   [mmc, spi]\n
+   - enable or disable MMC or SPI\n
+);
-- 
1.6.2.1

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 07/13] at91rm9200: move serial driver to drivers/serial

2009-03-27 Thread Jean-Christophe PLAGNIOL-VILLARD
add CONFIG_AT91RM9200_USART to activate the driver

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD plagn...@jcrosoft.com
---
 cpu/arm920t/at91rm9200/Makefile|2 +-
 drivers/serial/Makefile|1 +
 .../serial.c = drivers/serial/at91rm9200_usart.c  |0
 include/configs/at91rm9200dk.h |1 +
 include/configs/at91rm9200ek.h |1 +
 include/configs/cmc_pu2.h  |1 +
 include/configs/csb637.h   |1 +
 include/configs/kb9202.h   |1 +
 include/configs/m501sk.h   |1 +
 include/configs/mp2usb.h   |1 +
 10 files changed, 9 insertions(+), 1 deletions(-)
 rename cpu/arm920t/at91rm9200/serial.c = drivers/serial/at91rm9200_usart.c 
(100%)

diff --git a/cpu/arm920t/at91rm9200/Makefile b/cpu/arm920t/at91rm9200/Makefile
index ab4c52c..67f17fa 100644
--- a/cpu/arm920t/at91rm9200/Makefile
+++ b/cpu/arm920t/at91rm9200/Makefile
@@ -26,7 +26,7 @@ include $(TOPDIR)/config.mk
 LIB= $(obj)lib$(SOC).a
 
 COBJS  = bcm5221.o dm9161.o ether.o i2c.o interrupts.o \
- lxt972.o serial.o usb.o spi.o
+ lxt972.o usb.o spi.o
 SOBJS  = lowlevel_init.o
 
 SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
diff --git a/drivers/serial/Makefile b/drivers/serial/Makefile
index d0efd73..465b29f 100644
--- a/drivers/serial/Makefile
+++ b/drivers/serial/Makefile
@@ -26,6 +26,7 @@ include $(TOPDIR)/config.mk
 LIB:= $(obj)libserial.a
 
 COBJS-$(CONFIG_ARM_DCC) += arm_dcc.o
+COBJS-$(CONFIG_AT91RM9200_USART) += at91rm9200_usart.o
 COBJS-$(CONFIG_ATMEL_USART) += atmel_usart.o
 COBJS-$(CONFIG_MCFUART) += mcfuart.o
 COBJS-$(CONFIG_NS9750_UART) += ns9750_serial.o
diff --git a/cpu/arm920t/at91rm9200/serial.c b/drivers/serial/at91rm9200_usart.c
similarity index 100%
rename from cpu/arm920t/at91rm9200/serial.c
rename to drivers/serial/at91rm9200_usart.c
diff --git a/include/configs/at91rm9200dk.h b/include/configs/at91rm9200dk.h
index 5a980d3..56128c1 100644
--- a/include/configs/at91rm9200dk.h
+++ b/include/configs/at91rm9200dk.h
@@ -88,6 +88,7 @@
  */
 
 /* define one of these to choose the DBGU, USART0  or USART1 as console */
+#define CONFIG_AT91RM9200_USART
 #define CONFIG_DBGU
 #undef CONFIG_USART0
 #undef CONFIG_USART1
diff --git a/include/configs/at91rm9200ek.h b/include/configs/at91rm9200ek.h
index 692ccdb..a018873 100644
--- a/include/configs/at91rm9200ek.h
+++ b/include/configs/at91rm9200ek.h
@@ -112,6 +112,7 @@
  * define one of these to choose the DBGU,
  * USART0 or USART1 as console
  */
+#define CONFIG_AT91RM9200_USART
 #define CONFIG_DBGU
 #undef CONFIG_USART0
 #undef CONFIG_USART1
diff --git a/include/configs/cmc_pu2.h b/include/configs/cmc_pu2.h
index e5c74e1..80559bf 100644
--- a/include/configs/cmc_pu2.h
+++ b/include/configs/cmc_pu2.h
@@ -88,6 +88,7 @@
  */
 
 /* define one of these to choose the DBGU, USART0  or USART1 as console */
+#define CONFIG_AT91RM9200_USART
 #undef CONFIG_DBGU
 #define CONFIG_USART0
 #undef CONFIG_USART1
diff --git a/include/configs/csb637.h b/include/configs/csb637.h
index 761c0dc..e1cdc7f 100644
--- a/include/configs/csb637.h
+++ b/include/configs/csb637.h
@@ -90,6 +90,7 @@
  */
 
 /* define one of these to choose the DBGU, USART0  or USART1 as console */
+#define CONFIG_AT91RM9200_USART
 #define CONFIG_DBGU
 #undef CONFIG_USART0
 #undef CONFIG_USART1
diff --git a/include/configs/kb9202.h b/include/configs/kb9202.h
index 1ce8c69..7dd81e6 100644
--- a/include/configs/kb9202.h
+++ b/include/configs/kb9202.h
@@ -72,6 +72,7 @@
  */
 
 /* define one of these to choose the DBGU, USART0  or USART1 as console */
+#define CONFIG_AT91RM9200_USART
 #define CONFIG_DBGU
 #undef CONFIG_USART0
 #undef CONFIG_USART1
diff --git a/include/configs/m501sk.h b/include/configs/m501sk.h
index a432850..1e7d90e 100644
--- a/include/configs/m501sk.h
+++ b/include/configs/m501sk.h
@@ -110,6 +110,7 @@
 #define CONFIG_CMC_PU2
 
 /* define one of these to choose the DBGU, USART0  or USART1 as console */
+#define CONFIG_AT91RM9200_USART
 #define CONFIG_DBGU
 #undef CONFIG_USART0
 #undef CONFIG_USART1
diff --git a/include/configs/mp2usb.h b/include/configs/mp2usb.h
index 9ac7e9a..b78fc76 100644
--- a/include/configs/mp2usb.h
+++ b/include/configs/mp2usb.h
@@ -95,6 +95,7 @@
  */
 
 /* define one of these to choose the DBGU, USART0  or USART1 as console */
+#define CONFIG_AT91RM9200_USART
 #define CONFIG_DBGU
 #undef CONFIG_USART0
 #undef CONFIG_USART1
-- 
1.6.2.1

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 06/13] Add support for the AT91RM9200EK Board.

2009-03-27 Thread Jean-Christophe PLAGNIOL-VILLARD
From: Ulf Samuelsson u...@atmel.com

The AT91RM9200-EK Evaluation Board supports the AT91RM9200
ARM9-based 32-bit RISC microcontroller and enables real-time code development
and evaluation.

Here is the chip page on Atmel website:
http://www.atmel.com/dyn/products/tools_card.asp?tool_id=3507

with
- NOR (cfi driver)
- DataFlash
- USB OHCI
- Net
- I2C (hard)

Signed-off-by: Ulf Samuelsson u...@atmel.com
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD plagn...@jcrosoft.com
---
 MAKEALL |1 +
 Makefile|3 +
 board/atmel/at91rm9200ek/Makefile   |   56 ++
 board/atmel/at91rm9200ek/at91rm9200ek.c |   86 
 board/atmel/at91rm9200ek/config.mk  |1 +
 board/atmel/at91rm9200ek/led.c  |   89 +
 board/atmel/at91rm9200ek/misc.c |   51 +
 board/atmel/at91rm9200ek/mux.c  |   38 
 board/atmel/at91rm9200ek/partition.c|   38 
 board/atmel/at91rm9200ek/u-boot.lds |   56 ++
 cpu/arm920t/start.S |4 +-
 drivers/mtd/cfi_flash.c |5 +-
 include/configs/at91rm9200ek.h  |  326 +++
 13 files changed, 747 insertions(+), 7 deletions(-)
 create mode 100644 board/atmel/at91rm9200ek/Makefile
 create mode 100644 board/atmel/at91rm9200ek/at91rm9200ek.c
 create mode 100644 board/atmel/at91rm9200ek/config.mk
 create mode 100644 board/atmel/at91rm9200ek/led.c
 create mode 100644 board/atmel/at91rm9200ek/misc.c
 create mode 100644 board/atmel/at91rm9200ek/mux.c
 create mode 100644 board/atmel/at91rm9200ek/partition.c
 create mode 100644 board/atmel/at91rm9200ek/u-boot.lds
 create mode 100644 include/configs/at91rm9200ek.h

diff --git a/MAKEALL b/MAKEALL
index aa7095e..89f1c55 100755
--- a/MAKEALL
+++ b/MAKEALL
@@ -570,6 +570,7 @@ LIST_at91= \
afeb9260\
at91cap9adk \
at91rm9200dk\
+   at91rm9200ek\
at91sam9260ek   \
at91sam9261ek   \
at91sam9263ek   \
diff --git a/Makefile b/Makefile
index d774e2e..a9f25c9 100644
--- a/Makefile
+++ b/Makefile
@@ -2626,6 +2626,9 @@ shannon_config:   unconfig
 at91rm9200dk_config:   unconfig
@$(MKCONFIG) $(@:_config=) arm arm920t at91rm9200dk atmel at91rm9200
 
+at91rm9200ek_config:   unconfig
+   @$(MKCONFIG) $(@:_config=) arm arm920t at91rm9200ek atmel at91rm9200
+
 cmc_pu2_config :   unconfig
@$(MKCONFIG) $(@:_config=) arm arm920t cmc_pu2 NULL at91rm9200
 
diff --git a/board/atmel/at91rm9200ek/Makefile 
b/board/atmel/at91rm9200ek/Makefile
new file mode 100644
index 000..500ce72
--- /dev/null
+++ b/board/atmel/at91rm9200ek/Makefile
@@ -0,0 +1,56 @@
+#
+# (C) Copyright 2003-2008
+# Wolfgang Denk, DENX Software Engineering, w...@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
+#
+
+include $(TOPDIR)/config.mk
+
+LIB= $(obj)lib$(BOARD).a
+
+COBJS-y += $(BOARD).o
+COBJS-y += led.o
+COBJS-y += misc.o
+ifdef CONFIG_HAS_DATAFLASH
+COBJS-$(CONFIG_DATAFLASH_MMC_SELECT) += mux.o
+COBJS-y += partition.o
+endif
+
+SRCS   := $(SOBJS:.o=.S) $(COBJS-y:.o=.c)
+OBJS   := $(addprefix $(obj),$(COBJS-y))
+SOBJS  := $(addprefix $(obj),$(SOBJS))
+
+$(LIB):$(obj).depend $(OBJS) $(SOBJS)
+   $(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS)
+
+clean:
+   rm -f $(SOBJS) $(OBJS)
+
+distclean: clean
+   rm -f $(LIB) core *.bak $(obj).depend
+
+#
+
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+#
diff --git a/board/atmel/at91rm9200ek/at91rm9200ek.c 
b/board/atmel/at91rm9200ek/at91rm9200ek.c
new file mode 100644
index 000..ea684e9
--- /dev/null
+++ b/board/atmel/at91rm9200ek/at91rm9200ek.c
@@ -0,0 +1,86 @@
+/*
+ * (C) Copyright 2002
+ * Sysgo Real-Time Solutions, GmbH www.elinos.com
+ * Marius Groeger mgroe...@sysgo.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 

[U-Boot] [PATCH 08/13] at91rm9200: move serial shutdown code to serial drivers

2009-03-27 Thread Jean-Christophe PLAGNIOL-VILLARD
introduce serial_exit for this purpose. Use it only when the rm9200
serial driver is active

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD plagn...@jcrosoft.com
---
 cpu/arm920t/at91rm9200/interrupts.c |   13 +++--
 drivers/serial/at91rm9200_usart.c   |5 +
 include/common.h|1 +
 3 files changed, 9 insertions(+), 10 deletions(-)

diff --git a/cpu/arm920t/at91rm9200/interrupts.c 
b/cpu/arm920t/at91rm9200/interrupts.c
index 5f0703c..15e22bf 100644
--- a/cpu/arm920t/at91rm9200/interrupts.c
+++ b/cpu/arm920t/at91rm9200/interrupts.c
@@ -166,21 +166,14 @@ ulong get_tbclk (void)
 void reset_cpu (ulong ignored)
 {
 
-#ifdef CONFIG_DBGU
-   AT91PS_USART us = (AT91PS_USART) AT91C_BASE_DBGU;
-#endif
-#ifdef CONFIG_USART0
-   AT91PS_USART us = AT91C_BASE_US0;
-#endif
-#ifdef CONFIG_USART1
-   AT91PS_USART us = AT91C_BASE_US1;
-#endif
 #ifdef CONFIG_AT91RM9200DK
AT91PS_PIO pio = AT91C_BASE_PIOA;
 #endif
 
+#if defined(CONFIG_AT91RM9200_USART)
/*shutdown the console to avoid strange chars during reset */
-   us-US_CR = (AT91C_US_RSTRX | AT91C_US_RSTTX);
+   serial_exit();
+#endif
 
 #ifdef CONFIG_AT91RM9200DK
/* Clear PA19 to trigger the hard reset */
diff --git a/drivers/serial/at91rm9200_usart.c 
b/drivers/serial/at91rm9200_usart.c
index d563445..858bde9 100644
--- a/drivers/serial/at91rm9200_usart.c
+++ b/drivers/serial/at91rm9200_usart.c
@@ -86,6 +86,11 @@ int serial_init (void)
return (0);
 }
 
+void serial_exit (void)
+{
+   us-US_CR = (AT91C_US_RSTRX | AT91C_US_RSTTX);
+}
+
 void serial_putc (const char c)
 {
if (c == '\n')
diff --git a/include/common.h b/include/common.h
index 952ddff..43068e6 100644
--- a/include/common.h
+++ b/include/common.h
@@ -453,6 +453,7 @@ void ft_pci_setup(void *blob, bd_t *bd);
 
 /* $(CPU)/serial.c */
 intserial_init   (void);
+void   serial_exit   (void);
 void   serial_addr   (unsigned int);
 void   serial_setbrg (void);
 void   serial_putc   (const char);
-- 
1.6.2.1

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 10/13] at91: move usb driver to drivers/usb

2009-03-27 Thread Jean-Christophe PLAGNIOL-VILLARD
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD plagn...@jcrosoft.com
---
 cpu/arm926ejs/at91/Makefile|1 -
 drivers/usb/Makefile   |1 +
 .../at91/usb.c = drivers/usb/atmel_usb.c  |0
 include/configs/afeb9260.h |1 +
 include/configs/at91cap9adk.h  |1 +
 include/configs/at91sam9260ek.h|1 +
 include/configs/at91sam9261ek.h|1 +
 include/configs/at91sam9263ek.h|1 +
 8 files changed, 6 insertions(+), 1 deletions(-)
 rename cpu/arm926ejs/at91/usb.c = drivers/usb/atmel_usb.c (100%)

diff --git a/cpu/arm926ejs/at91/Makefile b/cpu/arm926ejs/at91/Makefile
index f9e739c..d0d47e6 100644
--- a/cpu/arm926ejs/at91/Makefile
+++ b/cpu/arm926ejs/at91/Makefile
@@ -57,7 +57,6 @@ endif
 COBJS-$(CONFIG_AT91_LED)   += led.o
 COBJS-$(CONFIG_HAS_DATAFLASH)  += spi.o
 COBJS-y+= timer.o
-COBJS-y+= usb.o
 SOBJS  = lowlevel_init.o
 
 SRCS:= $(SOBJS:.o=.S) $(COBJS-y:.o=.c)
diff --git a/drivers/usb/Makefile b/drivers/usb/Makefile
index b306a65..de46b7b 100644
--- a/drivers/usb/Makefile
+++ b/drivers/usb/Makefile
@@ -31,6 +31,7 @@ COBJS-$(CONFIG_USB_OHCI_NEW) += usb_ohci.o
 COBJS-$(CONFIG_USB_EHCI) += usb_ehci_core.o
 
 # host
+COBJS-$(CONFIG_USB_ATMEL) += atmel_usb.o
 COBJS-$(CONFIG_USB_ISP116X_HCD) += isp116x-hcd.o
 COBJS-$(CONFIG_USB_R8A66597_HCD) += r8a66597-hcd.o
 COBJS-$(CONFIG_USB_SL811HS) += sl811_usb.o
diff --git a/cpu/arm926ejs/at91/usb.c b/drivers/usb/atmel_usb.c
similarity index 100%
rename from cpu/arm926ejs/at91/usb.c
rename to drivers/usb/atmel_usb.c
diff --git a/include/configs/afeb9260.h b/include/configs/afeb9260.h
index 33a67ca..3a51e60 100644
--- a/include/configs/afeb9260.h
+++ b/include/configs/afeb9260.h
@@ -122,6 +122,7 @@
 #define CONFIG_NET_RETRY_COUNT 20
 
 /* USB */
+#define CONFIG_USB_ATMEL
 #define CONFIG_USB_OHCI_NEW1
 #define CONFIG_DOS_PARTITION   1
 #define CONFIG_SYS_USB_OHCI_CPU_INIT   1
diff --git a/include/configs/at91cap9adk.h b/include/configs/at91cap9adk.h
index 7e7f124..45af688 100644
--- a/include/configs/at91cap9adk.h
+++ b/include/configs/at91cap9adk.h
@@ -144,6 +144,7 @@
 #define CONFIG_RESET_PHY_R 1
 
 /* USB */
+#define CONFIG_USB_ATMEL
 #define CONFIG_USB_OHCI_NEW1
 #define CONFIG_DOS_PARTITION   1
 #define CONFIG_SYS_USB_OHCI_CPU_INIT   1
diff --git a/include/configs/at91sam9260ek.h b/include/configs/at91sam9260ek.h
index 1fae3a3..18c81f6 100644
--- a/include/configs/at91sam9260ek.h
+++ b/include/configs/at91sam9260ek.h
@@ -142,6 +142,7 @@
 #define CONFIG_RESET_PHY_R 1
 
 /* USB */
+#define CONFIG_USB_ATMEL
 #define CONFIG_USB_OHCI_NEW1
 #define CONFIG_DOS_PARTITION   1
 #define CONFIG_SYS_USB_OHCI_CPU_INIT   1
diff --git a/include/configs/at91sam9261ek.h b/include/configs/at91sam9261ek.h
index 752d7e9..5c94407 100644
--- a/include/configs/at91sam9261ek.h
+++ b/include/configs/at91sam9261ek.h
@@ -143,6 +143,7 @@
 #define CONFIG_RESET_PHY_R 1
 
 /* USB */
+#define CONFIG_USB_ATMEL
 #define CONFIG_USB_OHCI_NEW1
 #define CONFIG_DOS_PARTITION   1
 #define CONFIG_SYS_USB_OHCI_CPU_INIT   1
diff --git a/include/configs/at91sam9263ek.h b/include/configs/at91sam9263ek.h
index dd500ca..d77a780 100644
--- a/include/configs/at91sam9263ek.h
+++ b/include/configs/at91sam9263ek.h
@@ -150,6 +150,7 @@
 #define CONFIG_RESET_PHY_R 1
 
 /* USB */
+#define CONFIG_USB_ATMEL
 #define CONFIG_USB_OHCI_NEW1
 #define CONFIG_DOS_PARTITION   1
 #define CONFIG_SYS_USB_OHCI_CPU_INIT   1
-- 
1.6.2.1

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 11/13] at91: move dataflash spi driver to drivers/spi

2009-03-27 Thread Jean-Christophe PLAGNIOL-VILLARD
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD plagn...@jcrosoft.com
---
 cpu/arm926ejs/at91/Makefile|1 -
 drivers/spi/Makefile   |1 +
 .../spi.c = drivers/spi/atmel_dataflash_spi.c |0
 include/configs/afeb9260.h |1 +
 include/configs/at91cap9adk.h  |1 +
 include/configs/at91sam9260ek.h|1 +
 include/configs/at91sam9261ek.h|1 +
 include/configs/at91sam9263ek.h|1 +
 include/configs/at91sam9rlek.h |1 +
 9 files changed, 7 insertions(+), 1 deletions(-)
 rename cpu/arm926ejs/at91/spi.c = drivers/spi/atmel_dataflash_spi.c (100%)

diff --git a/cpu/arm926ejs/at91/Makefile b/cpu/arm926ejs/at91/Makefile
index d0d47e6..34e7461 100644
--- a/cpu/arm926ejs/at91/Makefile
+++ b/cpu/arm926ejs/at91/Makefile
@@ -55,7 +55,6 @@ COBJS-y   += at91sam9rl_serial.o
 COBJS-$(CONFIG_HAS_DATAFLASH)  += at91sam9rl_spi.o
 endif
 COBJS-$(CONFIG_AT91_LED)   += led.o
-COBJS-$(CONFIG_HAS_DATAFLASH)  += spi.o
 COBJS-y+= timer.o
 SOBJS  = lowlevel_init.o
 
diff --git a/drivers/spi/Makefile b/drivers/spi/Makefile
index 6e2c121..1350f3e 100644
--- a/drivers/spi/Makefile
+++ b/drivers/spi/Makefile
@@ -25,6 +25,7 @@ include $(TOPDIR)/config.mk
 
 LIB:= $(obj)libspi.a
 
+COBJS-$(CONFIG_ATMEL_DATAFLASH_SPI) += atmel_dataflash_spi.o
 COBJS-$(CONFIG_ATMEL_SPI) += atmel_spi.o
 COBJS-$(CONFIG_BFIN_SPI) += bfin_spi.o
 COBJS-$(CONFIG_MPC8XXX_SPI) += mpc8xxx_spi.o
diff --git a/cpu/arm926ejs/at91/spi.c b/drivers/spi/atmel_dataflash_spi.c
similarity index 100%
rename from cpu/arm926ejs/at91/spi.c
rename to drivers/spi/atmel_dataflash_spi.c
diff --git a/include/configs/afeb9260.h b/include/configs/afeb9260.h
index 3a51e60..bcd8d35 100644
--- a/include/configs/afeb9260.h
+++ b/include/configs/afeb9260.h
@@ -87,6 +87,7 @@
 #define PHYS_SDRAM_SIZE0x0400  /* 64 megs */
 
 /* DataFlash */
+#define CONFIG_ATMEL_DATAFLASH_SPI
 #define CONFIG_HAS_DATAFLASH   1
 #define CONFIG_SYS_SPI_WRITE_TOUT  (5 * CONFIG_SYS_HZ)
 #define CONFIG_SYS_MAX_DATAFLASH_BANKS 2
diff --git a/include/configs/at91cap9adk.h b/include/configs/at91cap9adk.h
index 45af688..af81f1d 100644
--- a/include/configs/at91cap9adk.h
+++ b/include/configs/at91cap9adk.h
@@ -107,6 +107,7 @@
 #define PHYS_SDRAM_SIZE0x0400  /* 64 megs */
 
 /* DataFlash */
+#define CONFIG_ATMEL_DATAFLASH_SPI
 #define CONFIG_HAS_DATAFLASH   1
 #define CONFIG_SYS_SPI_WRITE_TOUT  (5*CONFIG_SYS_HZ)
 #define CONFIG_SYS_MAX_DATAFLASH_BANKS 1
diff --git a/include/configs/at91sam9260ek.h b/include/configs/at91sam9260ek.h
index 18c81f6..ac58f27 100644
--- a/include/configs/at91sam9260ek.h
+++ b/include/configs/at91sam9260ek.h
@@ -103,6 +103,7 @@
 #define PHYS_SDRAM_SIZE0x0400  /* 64 megs */
 
 /* DataFlash */
+#define CONFIG_ATMEL_DATAFLASH_SPI
 #define CONFIG_HAS_DATAFLASH   1
 #define CONFIG_SYS_SPI_WRITE_TOUT  (5*CONFIG_SYS_HZ)
 #define CONFIG_SYS_MAX_DATAFLASH_BANKS 2
diff --git a/include/configs/at91sam9261ek.h b/include/configs/at91sam9261ek.h
index 5c94407..57bb9fa 100644
--- a/include/configs/at91sam9261ek.h
+++ b/include/configs/at91sam9261ek.h
@@ -107,6 +107,7 @@
 #define PHYS_SDRAM_SIZE0x0400  /* 64 megs */
 
 /* DataFlash */
+#define CONFIG_ATMEL_DATAFLASH_SPI
 #define CONFIG_HAS_DATAFLASH   1
 #define CONFIG_SYS_SPI_WRITE_TOUT  (5*CONFIG_SYS_HZ)
 #define CONFIG_SYS_MAX_DATAFLASH_BANKS 2
diff --git a/include/configs/at91sam9263ek.h b/include/configs/at91sam9263ek.h
index d77a780..dd0d552 100644
--- a/include/configs/at91sam9263ek.h
+++ b/include/configs/at91sam9263ek.h
@@ -108,6 +108,7 @@
 #define PHYS_SDRAM_SIZE0x0400  /* 64 megs */
 
 /* DataFlash */
+#define CONFIG_ATMEL_DATAFLASH_SPI
 #define CONFIG_HAS_DATAFLASH   1
 #define CONFIG_SYS_SPI_WRITE_TOUT  (5*CONFIG_SYS_HZ)
 #define CONFIG_SYS_MAX_DATAFLASH_BANKS 1
diff --git a/include/configs/at91sam9rlek.h b/include/configs/at91sam9rlek.h
index 7a4039c..cef98e4 100644
--- a/include/configs/at91sam9rlek.h
+++ b/include/configs/at91sam9rlek.h
@@ -98,6 +98,7 @@
 #define PHYS_SDRAM_SIZE0x0400  /* 64 megs */
 
 /* DataFlash */
+#define CONFIG_ATMEL_DATAFLASH_SPI
 #define CONFIG_HAS_DATAFLASH   1
 #define CONFIG_SYS_SPI_WRITE_TOUT  (5*CONFIG_SYS_HZ)
 #define CONFIG_SYS_MAX_DATAFLASH_BANKS 1
-- 
1.6.2.1

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 13/13] at91sam9263ek: active hush and auto compelete support

2009-03-27 Thread Jean-Christophe PLAGNIOL-VILLARD
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD plagn...@jcrosoft.com
---
 include/configs/at91sam9263ek.h |3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/include/configs/at91sam9263ek.h b/include/configs/at91sam9263ek.h
index dd0d552..fc87241 100644
--- a/include/configs/at91sam9263ek.h
+++ b/include/configs/at91sam9263ek.h
@@ -204,6 +204,9 @@
 #define CONFIG_SYS_PBSIZE  (CONFIG_SYS_CBSIZE + 
sizeof(CONFIG_SYS_PROMPT) + 16)
 #define CONFIG_SYS_LONGHELP1
 #define CONFIG_CMDLINE_EDITING 1
+#define CONFIG_AUTO_COMPLETE
+#define CONFIG_SYS_HUSH_PARSER
+#define CONFIG_SYS_PROMPT_HUSH_PS2  
 
 #define ROUND(A, B)(((A) + (B))  ~((B) - 1))
 /*
-- 
1.6.2.1

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 12/13] at91: add hardware i2c drivers

2009-03-27 Thread Jean-Christophe PLAGNIOL-VILLARD
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD plagn...@jcrosoft.com
---
 cpu/arm926ejs/at91/Makefile|6 +
 .../arm926ejs/at91/at91cap9_i2c.c  |   31 ++--
 .../arm926ejs/at91/at91sam9260_i2c.c   |   31 ++--
 .../arm926ejs/at91/at91sam9261_i2c.c   |   31 ++--
 .../arm926ejs/at91/at91sam9263_i2c.c   |   31 ++--
 .../clk.h = cpu/arm926ejs/at91/at91sam9rl_i2c.c   |   37 ++--
 drivers/i2c/Makefile   |1 +
 drivers/i2c/atmel_i2c.c|  234 
 include/asm-arm/arch-at91/at91_common.h|2 +
 include/asm-arm/arch-at91/at91_twi.h   |   68 ++
 include/asm-arm/arch-at91/clk.h|4 +
 include/asm-arm/arch-at91/hardware.h   |5 +
 12 files changed, 405 insertions(+), 76 deletions(-)
 copy include/asm-arm/arch-at91/at91_common.h = 
cpu/arm926ejs/at91/at91cap9_i2c.c (61%)
 copy include/asm-arm/arch-at91/at91_common.h = 
cpu/arm926ejs/at91/at91sam9260_i2c.c (61%)
 copy include/asm-arm/arch-at91/at91_common.h = 
cpu/arm926ejs/at91/at91sam9261_i2c.c (61%)
 copy include/asm-arm/arch-at91/at91_common.h = 
cpu/arm926ejs/at91/at91sam9263_i2c.c (61%)
 copy include/asm-arm/arch-at91/clk.h = cpu/arm926ejs/at91/at91sam9rl_i2c.c 
(52%)
 create mode 100644 drivers/i2c/atmel_i2c.c
 create mode 100644 include/asm-arm/arch-at91/at91_twi.h

diff --git a/cpu/arm926ejs/at91/Makefile b/cpu/arm926ejs/at91/Makefile
index 34e7461..d37814f 100644
--- a/cpu/arm926ejs/at91/Makefile
+++ b/cpu/arm926ejs/at91/Makefile
@@ -26,31 +26,37 @@ include $(TOPDIR)/config.mk
 LIB= $(obj)lib$(SOC).a
 
 ifdef CONFIG_AT91CAP9
+COBJS-$(CONFIG_HARD_I2C)   += at91cap9_i2c.o
 COBJS-$(CONFIG_MACB)   += at91cap9_macb.o
 COBJS-y+= at91cap9_serial.o
 COBJS-$(CONFIG_HAS_DATAFLASH)  += at91cap9_spi.o
 endif
 ifdef CONFIG_AT91SAM9260
+COBJS-$(CONFIG_HARD_I2C)   += at91sam9260_i2c.o
 COBJS-$(CONFIG_MACB)   += at91sam9260_macb.o
 COBJS-y+= at91sam9260_serial.o
 COBJS-$(CONFIG_HAS_DATAFLASH)  += at91sam9260_spi.o
 endif
 ifdef CONFIG_AT91SAM9G20
+COBJS-$(CONFIG_HARD_I2C)   += at91sam9260_i2c.o
 COBJS-$(CONFIG_MACB)   += at91sam9260_macb.o
 COBJS-y+= at91sam9260_serial.o
 COBJS-$(CONFIG_HAS_DATAFLASH)  += at91sam9260_spi.o
 endif
 ifdef CONFIG_AT91SAM9261
+COBJS-$(CONFIG_HARD_I2C)   += at91sam9261_i2c.o
 COBJS-y+= at91sam9261_serial.o
 COBJS-$(CONFIG_HAS_DATAFLASH)  += at91sam9261_spi.o
 endif
 ifdef CONFIG_AT91SAM9263
+COBJS-$(CONFIG_HARD_I2C)   += at91sam9263_i2c.o
 COBJS-$(CONFIG_MACB)   += at91sam9263_macb.o
 COBJS-y+= at91sam9263_serial.o
 COBJS-$(CONFIG_HAS_DATAFLASH)  += at91sam9263_spi.o
 COBJS-$(CONFIG_USB_OHCI_NEW)   += at91sam9263_usb.o
 endif
 ifdef CONFIG_AT91SAM9RL
+COBJS-$(CONFIG_HARD_I2C)   += at91sam9rl_i2c.o
 COBJS-y+= at91sam9rl_serial.o
 COBJS-$(CONFIG_HAS_DATAFLASH)  += at91sam9rl_spi.o
 endif
diff --git a/include/asm-arm/arch-at91/at91_common.h 
b/cpu/arm926ejs/at91/at91cap9_i2c.c
similarity index 61%
copy from include/asm-arm/arch-at91/at91_common.h
copy to cpu/arm926ejs/at91/at91cap9_i2c.c
index 9c4e019..feb65bf 100644
--- a/include/asm-arm/arch-at91/at91_common.h
+++ b/cpu/arm926ejs/at91/at91cap9_i2c.c
@@ -1,7 +1,6 @@
 /*
- * (C) Copyright 2007-2008
- * Stelian Pop stelian@leadtechdesign.com
- * Lead Tech Design www.leadtechdesign.com
+ * (C) Copyright 2009
+ * Jean-Christophe PLAGNIOL-VILLARD plagn...@jcrosoft.com
  *
  * See file CREDITS for list of people who contributed to this
  * project.
@@ -22,17 +21,19 @@
  * MA 02111-1307 USA
  */
 
-#ifndef AT91_COMMON_H
-#define AT91_COMMON_H
+#include common.h
+#include asm/arch/at91_common.h
+#include asm/arch/at91_pmc.h
+#include asm/arch/gpio.h
+#include asm/arch/io.h
 
-void at91_macb_hw_init(void);
-void at91_serial_hw_init(void);
-void at91_serial0_hw_init(void);
-void at91_serial1_hw_init(void);
-void at91_serial2_hw_init(void);
-void at91_serial3_hw_init(void);
-void at91_spi0_hw_init(unsigned long cs_mask);
-void at91_spi1_hw_init(unsigned long cs_mask);
-void at91_uhp_hw_init(void);
+void at91_twi0_hw_init(void)
+{
+   at91_set_B_periph(AT91_PIN_PB4, 0); /* TWD */
+   at91_set_multi_drive(AT91_PIN_PB4, 1);
 
-#endif /* AT91_COMMON_H */
+   at91_set_5_periph(AT91_PIN_PB5, 0); /* TWCK */
+   at91_set_multi_drive(AT91_PIN_PB5, 1);
+
+   at91_sys_write(AT91_PMC_PCER, 1  AT91CAP9_ID_TWI);
+}
diff --git a/include/asm-arm/arch-at91/at91_common.h 
b/cpu/arm926ejs/at91/at91sam9260_i2c.c
similarity index 61%
copy from include/asm-arm/arch-at91/at91_common.h
copy to cpu/arm926ejs/at91/at91sam9260_i2c.c
index 9c4e019..ff8659f 100644
--- a/include/asm-arm/arch-at91/at91_common.h
+++ 

[U-Boot] [PATCH 02/13 V2] at91sam9: add watchdog support

2009-03-27 Thread Jean-Christophe PLAGNIOL-VILLARD
Signed-off-by: Nicolas Ferre nicolas.fe...@atmel.com
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD plagn...@jcrosoft.com
---
update the readme

Best Regards,
J.
 Makefile |1 +
 doc/README.at91  |   11 +
 drivers/serial/atmel_usart.c |4 +-
 drivers/watchdog/Makefile|   46 
 drivers/watchdog/at91sam9_wdt.c  |   79 ++
 include/asm-arm/arch-at91/at91_wdt.h |   38 
 6 files changed, 178 insertions(+), 1 deletions(-)
 create mode 100644 drivers/watchdog/Makefile
 create mode 100644 drivers/watchdog/at91sam9_wdt.c
 create mode 100644 include/asm-arm/arch-at91/at91_wdt.h

diff --git a/Makefile b/Makefile
index 1cce381..d774e2e 100644
--- a/Makefile
+++ b/Makefile
@@ -264,6 +264,7 @@ LIBS += drivers/rtc/librtc.a
 LIBS += drivers/serial/libserial.a
 LIBS += drivers/usb/libusb.a
 LIBS += drivers/video/libvideo.a
+LIBS += drivers/watchdog/libwatchdog.a
 LIBS += common/libcommon.a
 LIBS += libfdt/libfdt.a
 LIBS += api/libapi.a
diff --git a/doc/README.at91 b/doc/README.at91
index e460e66..9b4eae6 100644
--- a/doc/README.at91
+++ b/doc/README.at91
@@ -2,6 +2,7 @@ Atmel AT91 Evaluation kits
 
 http://atmel.com/dyn/products/tools.asp?family_id=605#1443
 
+I. Board mapping  boot media
 --
 AT91SAM9260EK, AT91SAM9G20EK  AT91SAM9XEEK
 --
@@ -86,3 +87,13 @@ Environment variables
make at91sam9263ek_config   - use data flash (spi 
cs0) (default)
make at91sam9263ek_nandflash_config - use nand flash
make at91sam9263ek_dataflash_cs0_config - use data flash (spi 
cs0)
+
+II. Watchdog support
+
+   For security reasons, the at91 watchdog is running at boot time and,
+   if deactivated, cannot be used anymore.
+   If you want to use the watchdog, you will need to keep it running in
+   your code (make sure not to disable it in AT91Bootstrap for instance).
+
+   In the U-Boot configuration, the AT91 watchdog support is enabled using
+   the CONFIG_AT91SAM9_WATCHDOG and CONFIG_HW_WATCHDOG options.
diff --git a/drivers/serial/atmel_usart.c b/drivers/serial/atmel_usart.c
index f3b146c..f50552a 100644
--- a/drivers/serial/atmel_usart.c
+++ b/drivers/serial/atmel_usart.c
@@ -16,6 +16,7 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 #include common.h
+#include watchdog.h
 
 #include asm/io.h
 #include asm/arch/clk.h
@@ -87,7 +88,8 @@ void serial_puts(const char *s)
 
 int serial_getc(void)
 {
-   while (!(usart3_readl(CSR)  USART3_BIT(RXRDY))) ;
+   while (!(usart3_readl(CSR)  USART3_BIT(RXRDY)))
+WATCHDOG_RESET();
return usart3_readl(RHR);
 }
 
diff --git a/drivers/watchdog/Makefile b/drivers/watchdog/Makefile
new file mode 100644
index 000..200968d
--- /dev/null
+++ b/drivers/watchdog/Makefile
@@ -0,0 +1,46 @@
+#
+# (C) Copyright 2008
+# Wolfgang Denk, DENX Software Engineering, w...@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
+#
+
+include $(TOPDIR)/config.mk
+
+LIB:= $(obj)libwatchdog.a
+
+COBJS-$(CONFIG_AT91SAM9_WATCHDOG) += at91sam9_wdt.o
+
+COBJS  := $(COBJS-y)
+SRCS   := $(COBJS:.o=.c)
+OBJS   := $(addprefix $(obj),$(COBJS))
+
+all:   $(LIB)
+
+$(LIB):$(obj).depend $(OBJS)
+   $(AR) $(ARFLAGS) $@ $(OBJS)
+
+#
+
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+#
diff --git a/drivers/watchdog/at91sam9_wdt.c b/drivers/watchdog/at91sam9_wdt.c
new file mode 100644
index 000..5bb8b77
--- /dev/null
+++ b/drivers/watchdog/at91sam9_wdt.c
@@ -0,0 +1,79 @@
+/*
+ * [origin: Linux kernel drivers/watchdog/at91sam9_wdt.c]
+ *
+ * Watchdog driver for Atmel AT91SAM9x processors.
+ *
+ * Copyright (C) 2008 Jean-Christophe PLAGNIOL-VILLARD plagn...@jcrosoft.com
+ * Copyright (C) 2008 Renaud CERRATO r.cerr...@til-technologies.fr
+ *
+ * This 

Re: [U-Boot] [PATCH 1/2] at91: Improved Atmel AT45DB081 dataflash support

2009-03-27 Thread Jean-Christophe PLAGNIOL-VILLARD
On 10:24 Fri 27 Mar , Daniel Gorsulowski wrote:
 This patch improves Atmel AT45DB081 dataflash support.
 
 Signed-off-by: Daniel Gorsulowski daniel.gorsulow...@esd.eu
 ---
  drivers/mtd/dataflash.c |7 ---
1  1 files changed, 4 insertions(+), 3 deletions(-)
NACK

As precedently announce this driver is now deprecated only bug fix
will be accepted

please take a look on the spi flash framework

Best Regards,
J.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH] sf: add driver for SST flashes

2009-03-27 Thread Mike Frysinger
Signed-off-by: Mike Frysinger vap...@gentoo.org
CC: Haavard Skinnemoen haavard.skinnem...@atmel.com
---
 drivers/mtd/spi/Makefile |1 +
 drivers/mtd/spi/spi_flash.c  |5 +
 drivers/mtd/spi/spi_flash_internal.h |1 +
 drivers/mtd/spi/sst.c|  350 ++
 4 files changed, 357 insertions(+), 0 deletions(-)
 create mode 100644 drivers/mtd/spi/sst.c

diff --git a/drivers/mtd/spi/Makefile b/drivers/mtd/spi/Makefile
index 3d4f892..a8fd68f 100644
--- a/drivers/mtd/spi/Makefile
+++ b/drivers/mtd/spi/Makefile
@@ -27,6 +27,7 @@ LIB   := $(obj)libspi_flash.a
 
 COBJS-$(CONFIG_SPI_FLASH)  += spi_flash.o
 COBJS-$(CONFIG_SPI_FLASH_ATMEL)+= atmel.o
+COBJS-$(CONFIG_SPI_FLASH_SST)  += sst.o
 COBJS-$(CONFIG_SPI_FLASH_STMICRO)  += stmicro.o
 
 COBJS  := $(COBJS-y)
diff --git a/drivers/mtd/spi/spi_flash.c b/drivers/mtd/spi/spi_flash.c
index d1d81af..1902960 100644
--- a/drivers/mtd/spi/spi_flash.c
+++ b/drivers/mtd/spi/spi_flash.c
@@ -139,6 +139,11 @@ struct spi_flash *spi_flash_probe(unsigned int bus, 
unsigned int cs,
flash = spi_flash_probe_stmicro(spi, idcode);
break;
 #endif
+#ifdef CONFIG_SPI_FLASH_SST
+   case 0xBF:
+   flash = spi_flash_probe_sst(spi, idcode);
+   break;
+#endif
default:
debug(SF: Unsupported manufacturer %02X\n, idcode[0]);
flash = NULL;
diff --git a/drivers/mtd/spi/spi_flash_internal.h 
b/drivers/mtd/spi/spi_flash_internal.h
index 75f5900..2d020c3 100644
--- a/drivers/mtd/spi/spi_flash_internal.h
+++ b/drivers/mtd/spi/spi_flash_internal.h
@@ -43,4 +43,5 @@ int spi_flash_read_common(struct spi_flash *flash, const u8 
*cmd,
 /* Manufacturer-specific probe functions */
 struct spi_flash *spi_flash_probe_spansion(struct spi_slave *spi, u8 *idcode);
 struct spi_flash *spi_flash_probe_atmel(struct spi_slave *spi, u8 *idcode);
+struct spi_flash *spi_flash_probe_sst(struct spi_slave *spi, u8 *idcode);
 struct spi_flash *spi_flash_probe_stmicro(struct spi_slave *spi, u8 *idcode);
diff --git a/drivers/mtd/spi/sst.c b/drivers/mtd/spi/sst.c
new file mode 100644
index 000..410afa9
--- /dev/null
+++ b/drivers/mtd/spi/sst.c
@@ -0,0 +1,350 @@
+/*
+ * Driver for SST serial flashes
+ *
+ * (C) Copyright 2000-2002
+ * Wolfgang Denk, DENX Software Engineering, w...@denx.de.
+ * Copyright 2008, Network Appliance Inc.
+ * Jason McMullan mcmul...@netapp.com
+ * Copyright (C) 2004-2007 Freescale Semiconductor, Inc.
+ * TsiChung Liew (tsi-chung.l...@freescale.com)
+ * Copyright (c) 2008-2009 Analog Devices Inc.
+ *
+ * Licensed under the GPL-2 or later.
+ */
+
+#include common.h
+#include malloc.h
+#include spi_flash.h
+
+#include spi_flash_internal.h
+
+#define CMD_SST_WREN   0x06/* Write Enable */
+#define CMD_SST_WRDI   0x04/* Write Disable */
+#define CMD_SST_RDSR   0x05/* Read Status Register */
+#define CMD_SST_WRSR   0x01/* Write Status Register */
+#define CMD_SST_READ   0x03/* Read Data Bytes */
+#define CMD_SST_FAST_READ  0x0b/* Read Data Bytes at Higher Speed */
+#define CMD_SST_BP 0x02/* Byte Program */
+#define CMD_SST_AAI_WP 0xAD/* Auto Address Increment Word Program 
*/
+#define CMD_SST_SE 0x20/* Sector Erase */
+
+#define SST_SR_WIP (1  0)/* Write-in-Progress */
+#define SST_SR_WEL (1  1)/* Write enable */
+#define SST_SR_BP0 (1  2)/* Block Protection 0 */
+#define SST_SR_BP1 (1  3)/* Block Protection 1 */
+#define SST_SR_BP2 (1  4)/* Block Protection 2 */
+#define SST_SR_AAI (1  6)/* Addressing mode */
+#define SST_SR_BPL (1  7)/* BP bits lock */
+
+struct sst_spi_flash_params {
+   u8 idcode1;
+   u16 nr_sectors;
+   const char *name;
+};
+
+struct sst_spi_flash {
+   struct spi_flash flash;
+   const struct sst_spi_flash_params *params;
+};
+
+static inline struct sst_spi_flash *to_sst_spi_flash(struct spi_flash *flash)
+{
+   return container_of(flash, struct sst_spi_flash, flash);
+}
+
+#define SST_SECTOR_SIZE (4 * 1024)
+static const struct sst_spi_flash_params sst_spi_flash_table[] = {
+   {
+   .idcode1 = 0x01,
+   .nr_sectors = 128,
+   .name = SST25WF512,
+   },{
+   .idcode1 = 0x02,
+   .nr_sectors = 256,
+   .name = SST25WF010,
+   },{
+   .idcode1 = 0x03,
+   .nr_sectors = 512,
+   .name = SST25WF020,
+   },{
+   .idcode1 = 0x04,
+   .nr_sectors = 1024,
+   .name = SST25WF040,
+   },
+};
+
+static int
+sst_wait_ready(struct spi_flash *flash)
+{
+   struct spi_slave *spi = flash-spi;
+   unsigned long timebase;
+   int ret;
+   u8 byte = CMD_SST_RDSR;
+
+   

[U-Boot] [PATCH] sf: stmicro: drop redundant id read

2009-03-27 Thread Mike Frysinger
The common SPI flash code reads the idcode and passes it down to the SPI
flash driver, so there is no need to read it again ourselves.

Signed-off-by: Mike Frysinger vap...@gentoo.org
CC: Haavard Skinnemoen haavard.skinnem...@atmel.com
CC: Jason McMullan mcmul...@netapp.com
CC: TsiChung Liew tsi-chung.l...@freescale.com
---
 drivers/mtd/spi/stmicro.c |8 +---
 1 files changed, 1 insertions(+), 7 deletions(-)

diff --git a/drivers/mtd/spi/stmicro.c b/drivers/mtd/spi/stmicro.c
index e7dda91..e401cd0 100644
--- a/drivers/mtd/spi/stmicro.c
+++ b/drivers/mtd/spi/stmicro.c
@@ -315,12 +315,6 @@ struct spi_flash *spi_flash_probe_stmicro(struct spi_slave 
*spi, u8 * idcode)
const struct stmicro_spi_flash_params *params;
struct stmicro_spi_flash *stm;
unsigned int i;
-   int ret;
-   u8 id[3];
-
-   ret = spi_flash_cmd(spi, CMD_READ_ID, id, sizeof(id));
-   if (ret)
-   return NULL;
 
for (i = 0; i  ARRAY_SIZE(stmicro_spi_flash_table); i++) {
params = stmicro_spi_flash_table[i];
@@ -330,7 +324,7 @@ struct spi_flash *spi_flash_probe_stmicro(struct spi_slave 
*spi, u8 * idcode)
}
 
if (i == ARRAY_SIZE(stmicro_spi_flash_table)) {
-   debug(SF: Unsupported STMicro ID %02x\n, id[1]);
+   debug(SF: Unsupported STMicro ID %02x\n, idcode[1]);
return NULL;
}
 
-- 
1.6.2

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] core ticks/timer code

2009-03-27 Thread Mike Frysinger
the Blackfin core tick/timer code has been around since the start of the 
original port, but i'm not sure it's entirely correct.  some common code that 
uses timers seems to be misbehaving in that the timeout is pretty much 
immediate.  makes me think that we've spent time on making udelay() work, but 
then just glossed over the rest.

unfortunately, there doesnt seem to be any docs on what exactly these 
functions do so it's hard for me to verify/change any of it.

my understanding is that:
 - get_ticks - return some notion of cpu ticks
 - get_tbclk - return number of cpu ticks that elapse in one second
 - timer_init - setup a core timer
 - get_timer(x) - not really sure what this is supposed to represent, or how 
x is used
 - reset_timer - reset core timer to 0
 - CONFIG_SYS_HZ - no idea how this relates to ticks/timer in U-Boot as in the 
Linux world, this is the core timer (scheduler) frequency (how many times to 
execute per second)
-mike


signature.asc
Description: This is a digitally signed message part.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH] omap3: mmc: mmc2 support

2009-03-27 Thread Minkyu Kang
There are 3 MMC/SD/SDIO host controllers inside the device.
This patch will support mmc2 and mmc3(mmc3 have not tested)

Signed-off-by: Minkyu Kang mk7.k...@samsung.com
---
 drivers/mmc/omap3_mmc.c   |   74 -
 include/asm-arm/arch-omap3/mmc_host_def.h |   10 +++-
 include/asm-arm/arch-omap3/omap3.h|3 +
 3 files changed, 73 insertions(+), 14 deletions(-)

diff --git a/drivers/mmc/omap3_mmc.c b/drivers/mmc/omap3_mmc.c
index e90db7e..934caff 100644
--- a/drivers/mmc/omap3_mmc.c
+++ b/drivers/mmc/omap3_mmc.c
@@ -51,7 +51,8 @@ const unsigned short mmc_transspeed_val[15][4] = {
 
 mmc_card_data cur_card_data;
 static block_dev_desc_t mmc_blk_dev;
-static hsmmc_t *mmc_base = (hsmmc_t *)OMAP_HSMMC_BASE;
+static hsmmc_t *mmc_base;
+static int curr_device = -1;
 
 block_dev_desc_t *mmc_get_dev(int dev)
 {
@@ -62,10 +63,21 @@ void twl4030_mmc_config(void)
 {
unsigned char data;
 
-   data = DEV_GRP_P1;
-   i2c_write(PWRMGT_ADDR_ID4, VMMC1_DEV_GRP, 1, data, 1);
-   data = VMMC1_VSEL_30;
-   i2c_write(PWRMGT_ADDR_ID4, VMMC1_DEDICATED, 1, data, 1);
+   switch (curr_device) {
+   case 1:
+   data = DEV_GRP_P1;
+   i2c_write(PWRMGT_ADDR_ID4, VMMC1_DEV_GRP, 1, data, 1);
+   data = VMMC1_VSEL_30;
+   i2c_write(PWRMGT_ADDR_ID4, VMMC1_DEDICATED, 1, data, 1);
+   break;
+   case 2:
+   case 3:
+   data = DEV_GRP_P1;
+   i2c_write(PWRMGT_ADDR_ID4, VMMC2_DEV_GRP, 1, data, 1);
+   data = VMMC2_VSEL_185;
+   i2c_write(PWRMGT_ADDR_ID4, VMMC2_DEDICATED, 1, data, 1);
+   break;
+   }
 }
 
 unsigned char mmc_board_init(void)
@@ -74,12 +86,21 @@ unsigned char mmc_board_init(void)
 
twl4030_mmc_config();
 
-   writel(readl(t2_base-pbias_lite) | PBIASLITEPWRDNZ1 |
-   PBIASSPEEDCTRL0 | PBIASLITEPWRDNZ0,
-   t2_base-pbias_lite);
+   switch (curr_device) {
+   case 1:
+   writel(readl(t2_base-pbias_lite) | PBIASLITEPWRDNZ1 |
+   PBIASSPEEDCTRL0 | PBIASLITEPWRDNZ0,
+   t2_base-pbias_lite);
 
-   writel(readl(t2_base-devconf0) | MMCSDIO1ADPCLKISEL,
-   t2_base-devconf0);
+   writel(readl(t2_base-devconf0) | MMCSDIO1ADPCLKISEL,
+   t2_base-devconf0);
+   break;
+   case 2:
+   case 3:
+   writel(readl(t2_base-devconf1) | MMCSDIO2ADPCLKISEL,
+   t2_base-devconf1);
+   break;
+   }
 
return 1;
 }
@@ -525,8 +546,37 @@ unsigned long mmc_bread(int dev_num, unsigned long blknr, 
lbaint_t blkcnt,
return 1;
 }
 
-int mmc_legacy_init(int verbose)
+int mmc_set_dev(int dev)
+{
+   if (dev  0) {
+   printf(unknwon device\n);
+   return 1;
+   } else {
+   switch (dev) {
+   case 1:
+   mmc_base = (hsmmc_t *)OMAP_HSMMC_BASE_MMC1;
+   break;
+   case 2:
+   mmc_base = (hsmmc_t *)OMAP_HSMMC_BASE_MMC2;
+   break;
+   case 3:
+   mmc_base = (hsmmc_t *)OMAP_HSMMC_BASE_MMC3;
+   break;
+   default:
+   printf(unknwon device\n);
+   return 1;
+   }
+   curr_device = dev;
+   }
+
+   return 0;
+}
+
+int mmc_legacy_init(int dev)
 {
+   if (mmc_set_dev(dev) != 0)
+   return 1;
+
if (configure_mmc(cur_card_data) != 1)
return 1;
 
@@ -538,7 +588,7 @@ int mmc_legacy_init(int verbose)
 
/* FIXME fill in the correct size (is set to 32MByte) */
mmc_blk_dev.blksz = MMCSD_SECTOR_SIZE;
-   mmc_blk_dev.lba = 0x1;
+   mmc_blk_dev.lba = cur_card_data.size;
mmc_blk_dev.removable = 0;
mmc_blk_dev.block_read = mmc_bread;
 
diff --git a/include/asm-arm/arch-omap3/mmc_host_def.h 
b/include/asm-arm/arch-omap3/mmc_host_def.h
index aa751c9..8b234ef 100644
--- a/include/asm-arm/arch-omap3/mmc_host_def.h
+++ b/include/asm-arm/arch-omap3/mmc_host_def.h
@@ -31,7 +31,9 @@
 typedef struct t2 {
unsigned char res1[0x274];
unsigned int devconf0;  /* 0x274 */
-   unsigned char res2[0x2A8];
+   unsigned char res2[0x60];
+   unsigned int devconf1;  /* 0x2D8 */
+   unsigned char res3[0x244];
unsigned int pbias_lite;/* 0x520 */
 } t2_t;
 
@@ -41,10 +43,14 @@ typedef struct t2 {
 #define PBIASSPEEDCTRL0(1  2)
 #define PBIASLITEPWRDNZ1   (1  9)
 
+#define MMCSDIO2ADPCLKISEL (1  6)
+
 /*
  * OMAP HSMMC register definitions
  */
-#define OMAP_HSMMC_BASE0x4809C000
+#define OMAP_HSMMC_BASE_MMC1   0x4809C000
+#define OMAP_HSMMC_BASE_MMC2   0x480B4000
+#define