Re: [U-Boot] [PATCH u-boot git] fix DaVinci NS16550_REG_SIZE regression

2009-04-15 Thread Detlev Zundel
Hi David,

 From: David Brownell dbrown...@users.sourceforge.net

 Update the DaVinci DM6446 boards to use the new convention
 for CONFIG_SYS_NS16550_REG_SIZE ... the size hasn't changed
 from the original 4 bytes, but these chips are little-endian.

 (Resolves a regression added recently by the include/ns16550.h
 patch to Unify structure declaration for registers.  The code
 previously worked just fine because the registers were accessed
 as host-endian words, not as bytes.)

 Signed-off-by: David Brownell dbrown...@users.sourceforge.net

Excellent, thanks.  As noted, I was aware that such problems may pop up,
but I think it is nice now to be on the safe side of explicitely
expressing what we do and not obfuscate that with different c types.

Cheers
  Detlev

-- 
Summary [of object-oriented programming in Perl 5]
That's all about there is to it. Now you just need to go off and buy a
book about object-oriented design methodology, and bang  your forehead
with it for the next six months or so.Larry Wall [Creator of Perl]
--
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] Add feature-removal-schedule.txt

2009-04-15 Thread Detlev Zundel
Hi Peter,

 +What:   Individual I2C commands
 +When:   April 2009
 +Why:Per the U-Boot README, individual I2C commands such as imd, 
 imm,
 +imw, etc are deprecated.  The single i2c command which is
 +currently enabled via CONFIG_I2C_CMD_TREE contains the same
 +functionality as the individual I2C commands.  The individual
 +I2C commands should be removed as well as any references to
 +CONFIG_I2C_CMD_TREE.
 +Who:Peter Tyser pty...@xes-inc.com

 Would people prefer there be a period of time where both the individual
 i2c commands as well the single i2c command are both supported for
 boards without CONFIG_I2C_CMD_TREE?  If so, I'd add some deprecation
 messages to the individual commands.

 Its a little PITA to add a DEPRECATED message to all the old style
 commands as they are also called by the newer i2c command, so just
 wanted to check before submitting a patch.

I vote for doing the transition in one step.  It's simply not worth too
much effort in my eyes.  We have other areas needing more attention ;)

Cheers
  Detlev

-- 
BUGS:
  It is not yet possible to change operating system by writing to
  /proc/sys/kernel/ostype.
 -- Linux sysctl(2) man page
--
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] Add support to Colibri PXA-270 board

2009-04-07 Thread Detlev Zundel
Hi Alon,

a new board port without a single (C)opyright by your name - must have
been a hard day copying ;)

 This configuration is based on the trizepsiv board, and the
 work Daniel Mack did in the past [1].

 The following files were taken as-is from trizepsiv board:
  - lowlevel_init.S
  - pxavoltage.S
  - u-boot.lds

Isn't this a clear sign to try and find a way to reuse the code for both
boards?  Simply copying a file verbatim is always a mistake.  Who will
copy the bugfixes in the future?

I added Stefano on CC, maybe he has some good input on how to share code
here.

Cheers
  Detlev

-- 
Today people don't go to rock concerts to listen to the music, because
you can't. They go there to be part of the environment.
   -- Peter Eisenman
--
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] Add support to Colibri PXA-270 board

2009-04-07 Thread Detlev Zundel
Hi Alon,

 It was not my intention to add publicity my name, but provide
 a solution for users, as it took a lot of work to make it
 work without many changes from other implementation.

Adding someones name to code that one has written is primarily not for
publicity reasons but for somple tracking reasons.  Who do you think
people will turn to if they see problems in the code?  What would you
say if someone mailed you about a problem in your code which you have
never seen before?

 Any way to do it using a reuse would be super, although
 this is not the only duplication in u-boot board tree...

Yes, and maybe you realize how *damn* (sorry) some of us work to
eliminate this.  I never tire of stating that the cost of fixing a
problem in software is exponential to the time of its discovery.

Translated into U-Boot context this means, that we do *not* allow simple
code duplication.  If such a case slips through the review process, this
is nowhere near a reason to allow it the next time.

So please, reconsider adding to the mess instead of decreasing it or
even keeping the mess-level constant ;)

Cheers
  Detlev

-- 
The 82558 B-step and later generation devices do not maintain a link
in D3 if PME is disabled or if the device does not have power.
-- Intel documentation
--
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] Add support to Colibri PXA-270 board

2009-04-07 Thread Detlev Zundel
Hi Alon,

 I don't understand why you are so angry...

Maybe because you misunderstood me.  Let me assure you, that I'm not
angry.  I only wanted to make a clear statement that there are people on
this list who spend really lots of time in the unsexy job of cleaning
up code.

This usually takes way longer than writing new code and of course this
is also completely invisible to the casual reader of the sorce code.
One also never gets any return from it, because one does not add any
new shiny features.

Because of this, not many people attend to this type of work, so what I
try to do is to ensure that we *need as few cleanup as possible* right
upfront.

 There is no simple implementation of code reuse within the boards.

Are you sure?  You did not look very hard then.  In a strict sense it
may be true that board directories do not share much code (although
even that is done by some), but this is missing the point.

If something proves to be board-independent, it usually means it is only
architecture specific, so it can go there and be reused by *all* boards
of that architecture.

 You know the code much better than I do.
 Please free to drop this implementation.

Oh please, we really value all contributions, but if we were to accept
everything unconditionally, the code would explode in no time.

Please reconsider and try to reuse the code instead of copying it.
Maybe put it into pxa270 specific places.  Maybe Stefano has some good
ideas?

Cheers
  Detlev

-- 
Markov does it in chains.
--
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] bin_dep.sh Support

2009-04-06 Thread Detlev Zundel
Hi,

 Dear Prafulla Wadaskar,

 In message 1238759359-6544-2-git-send-email-prafu...@marvell.com you wrote:
 From: prafulla_wadaskar prafu...@marvell.com
 
 In some cases the u-boot.bin need to be processed further
 to create bootable u-boot binary from boot device
 This processing may be cpu,soc and/or board spcific
 bin_dep.sh provides a mechanism to execute bin_dep.sh
 if present in above platform specific folders
 
 Signed-off-by: prafulla_wadaskar prafu...@marvell.com
 ---
  Makefile |2 +
  tools/bin_dep.sh |   79 
 ++
  2 files changed, 81 insertions(+), 0 deletions(-)
  create mode 100755 tools/bin_dep.sh

 I don't see use cases for this.  This should probably remain out of
 tree.

If the wrapping is needed to get a working U-Boot image for this
specific board, I'll vote to add the code.

On the other hand, I wouldn't probably add this to the u-boot.bin
target.  A makefile should really specify what file is generated from
what and generating an extra target in the u-boot.bin rule somewhat
violates this rule.

I'd say, add another target and the script.  Hopefully we can make this
as generic as possible so that other boards needing this can only plug
in their script.

Cheers
  Detlev

-- 
I will use free software even if it is less powerful, or less reliable,
because freedom is the most important thing, and that is what the Free
Software movement is about.  How we get freedom.
   -- Richard M. Stallman
--
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] include/ns16550.h: Unify structure declaration for registers

2009-04-03 Thread Detlev Zundel
Instead of special casing the different access patterns, use common
code with light macros sprinkled in to accomodate for the different
layouts of the register structure.

Note that this also changes the types of the registers for the
positively packed (1) cases.  As the registers truly are unsigned
chars, this is surely the Right Thing, but it is a semantic change.
Note that for this case depending on the endianness on the bus, we may
see a change of behaviour.

Signed-off-by: Detlev Zundel d...@denx.de
---
 include/ns16550.h |  130 +++--
 1 files changed, 37 insertions(+), 93 deletions(-)


Note, that I checked that the offsets are ok in the used cases
switching from the old to the new code.  They *do* shift however in
the positive packed cases, because the old code uses data types
different than unsigned char.  Note that doing this, I also noticed
that using unsigned long for 4 byte registers is also no longer true
on 64-bit architectures.  One more reason to change the code.

Apart from that the code was also compile tested on several
configurations using different REG_SIZES and compiles without
warnings.  The special interesting case of +4 was successfully tested
on CU824.



diff --git a/include/ns16550.h b/include/ns16550.h
index 87624bf..ce606b5 100644
--- a/include/ns16550.h
+++ b/include/ns16550.h
@@ -16,102 +16,46 @@
  * by Richard Danter (richard.dan...@windriver.com), (C) 2005 Wind River 
Systems
  */
 
-#if (CONFIG_SYS_NS16550_REG_SIZE == 1)
-struct NS16550 {
-   unsigned char rbr;  /* 0 */
-   unsigned char ier;  /* 1 */
-   unsigned char fcr;  /* 2 */
-   unsigned char lcr;  /* 3 */
-   unsigned char mcr;  /* 4 */
-   unsigned char lsr;  /* 5 */
-   unsigned char msr;  /* 6 */
-   unsigned char scr;  /* 7 */
-#if defined(CONFIG_OMAP730)
-   unsigned char mdr1; /* 8 */
-   unsigned char reg9; /* 9 */
-   unsigned char regA; /* A */
-   unsigned char regB; /* B */
-   unsigned char regC; /* C */
-   unsigned char regD; /* D */
-   unsigned char regE; /* E */
-   unsigned char regF; /* F */
-   unsigned char reg10;/* 10 */
-   unsigned char ssr;  /* 11*/
-#endif
-} __attribute__ ((packed));
-#elif (CONFIG_SYS_NS16550_REG_SIZE == 2)
-struct NS16550 {
-   unsigned short rbr; /* 0 */
-   unsigned short ier; /* 1 */
-   unsigned short fcr; /* 2 */
-   unsigned short lcr; /* 3 */
-   unsigned short mcr; /* 4 */
-   unsigned short lsr; /* 5 */
-   unsigned short msr; /* 6 */
-   unsigned short scr; /* 7 */
-} __attribute__ ((packed));
-#elif (CONFIG_SYS_NS16550_REG_SIZE == 4)
-struct NS16550 {
-   unsigned long rbr;  /* 0 r  */
-   unsigned long ier;  /* 1 rw */
-   unsigned long fcr;  /* 2 w  */
-   unsigned long lcr;  /* 3 rw */
-   unsigned long mcr;  /* 4 rw */
-   unsigned long lsr;  /* 5 r  */
-   unsigned long msr;  /* 6 r  */
-   unsigned long scr;  /* 7 rw */
-}; /* No need to pack an already aligned struct */
-#elif (CONFIG_SYS_NS16550_REG_SIZE == -4)
-struct NS16550 {
-   unsigned char rbr;  /* 0 */
-   int pad1:24;
-   unsigned char ier;  /* 1 */
-   int pad2:24;
-   unsigned char fcr;  /* 2 */
-   int pad3:24;
-   unsigned char lcr;  /* 3 */
-   int pad4:24;
-   unsigned char mcr;  /* 4 */
-   int pad5:24;
-   unsigned char lsr;  /* 5 */
-   int pad6:24;
-   unsigned char msr;  /* 6 */
-   int pad7:24;
-   unsigned char scr;  /* 7 */
-   int pad8:24;
-#if defined(CONFIG_OMAP)
-   unsigned char mdr1; /* mode select reset TL16C750*/
-#endif
-#ifdef CONFIG_OMAP1510
-   int pad9:24;
-   unsigned long pad[10];
-   unsigned char osc_12m_sel;
-   int pad10:24;
-#endif
-} __attribute__ ((packed));
-#elif (CONFIG_SYS_NS16550_REG_SIZE == -8)
-struct NS16550 {
-   unsigned char rbr;  /* 0 */
-   unsigned char pad0[7];
-   unsigned char ier;  /* 1 */
-   unsigned char pad1[7];
-   unsigned char fcr;  /* 2 */
-   unsigned char pad2[7];
-   unsigned char lcr;  /* 3 */
-   unsigned char pad3[7];
-   unsigned char mcr;  /* 4 */
-   unsigned char pad4[7];
-   unsigned char lsr;  /* 5 */
-   unsigned char pad5[7];
-   unsigned char msr;  /* 6 */
-   unsigned char pad6[7];
-   unsigned char scr

Re: [U-Boot] [PATCH] include/ns16550.h: Unify structure declaration for registers

2009-04-03 Thread Detlev Zundel
Detlev Zundel d...@denx.de writes:

 Instead of special casing the different access patterns, use common
 code with light macros sprinkled in to accomodate for the different
 layouts of the register structure.

 Note that this also changes the types of the registers for the
 positively packed (1) cases.  As the registers truly are unsigned
 chars, this is surely the Right Thing, but it is a semantic change.
 Note that for this case depending on the endianness on the bus, we may
 see a change of behaviour.

 Signed-off-by: Detlev Zundel d...@denx.de
 ---
  include/ns16550.h |  130 
 +++--
  1 files changed, 37 insertions(+), 93 deletions(-)

I forgot to say, this patch depend on the previous cleanup patch sent
earlier today (Rename-common-ns16550-constants-with-UART_-prefix).

Cheers
  Detlev

-- 
1. What is the best thing about Unix?
A: The community.
2. What is the worst thing about Unix?
A: That there are so many communities. (Rob Pike)
--
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] Compilation warning: MSR_RI redefined

2009-04-02 Thread Detlev Zundel
Hi Stefan,

 your patch 7b5611cdd12ca0cc33f994f0d4a4454788fc3124 [inka4x0: Add hardware 
 diagnosis functions for inka4x0] introduced all kind of new defines in the 
 ns16550.h header resulting in a warning on some 4xx platforms:

 [ste...@kubuntu u-boot (master)]$ ./MAKEALL ml300
 Configuring for ml300 board...
 In file included from serial.c:53:
 /home/stefan/git/u-boot/u-boot/include/ns16550.h:151:1: warning: MSR_RI 
 redefined
 In file included from serial.c:41:
 /home/stefan/git/u-boot/u-boot/include/asm/processor.h:48:1: warning: this is 
 the location of the previous definition

 I suggest to either remove this MSI_RI from the header again (it doesn't seem 
 to be used here) or rename it.

Ok, so much for the plan to add the defines not bit by bit as needed,
but register-wise, while we're there.

I actually would prefer to use UART_MSR_RI, as this is a UART thingy
rather than to remove the define as we surely use the register, so I
feel it worthwhile to have the whole definition on board.

Let me cook up a rename for the UART stuff..

Cheers
  Detlev

-- 
We have a live-manual.  It's called emacs-de...@gnu.org.
You can stick to just reading it, but you can skip to a specific chapter
by simply sending an email asking for it ;-)
-- Stefan Monnier
--
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] pending patches website

2009-04-02 Thread Detlev Zundel
Hi Mike,

 not so long ago there was some custom thingy that was running on the u-boot 
 website that'd automatically grab patches from the mailing list and try to 
 file them away so they wouldnt get lost.  but i cant seem to find it any 
 more.  
 is it gone ?

No, it is not gone, it only starts to bitrot :(  

It also never by itself grabbed patches, but the idea was to post the
patches to its own email account which in turn sent acknowledgements to
the mailinglist _including_ a unique tracking number which was needed
for automatic handling of follow-up mail.

Unfortunately the original implementor is not available anymore and we
currently do not see how to finish the missing bits, especially the
automatic handling of the status of patches.

If someone on this list with (solid) Perl knowledge volunteers to pick
up the strings, let me know offlist.

Cheers
  Detlev

[1] http://bugs.denx.de/databases/u-boot

-- 
The Speedo3 is very similar to other Intel network chips, that is to say
apparently designed on a different planet.
   -- drivers/net/eepro100.c in Linux source
--
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] core ticks/timer code

2009-04-02 Thread Detlev Zundel
Hi,

 Dear Scott Wood,

 In message 20090331212514.ga19...@ld0162-tx32.am.freescale.net you wrote:
 On Tue, Mar 31, 2009 at 05:48:01PM +0200, Wolfgang Denk wrote:
  We still need some hint that the timer works in millisecond
  resolution, though - no matter what you call it.
 
 How about just calling it HZ (or something more verbose like TIMER_HZ,
 but the former makes it easier to share code with Linux) and declaring it
 in a non-board header?

 It's OK with me. Other opinions?

Obviously only like-minded people around.

Who starts? ;)

Cheers
  Detlev

-- 
I will use free software even if it is less powerful, or less reliable,
because freedom is the most important thing, and that is what the Free
Software movement is about.  How we get freedom.
   -- Richard M. Stallman
--
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] NetLoop initialization bug

2009-04-02 Thread Detlev Zundel
Hi Michael,

 Sorry for the previous mail,
 I have to enable the git operation via gmail on my workstation.

What do you mean by this?  Usually you only need a mailer which is
capable to attach things inline.  Even better - if you have a direct
access to an mta or an smtp server, use git-send-email after
git-format-patch.

 Meanwhile I created the patch again by diff.

Well this is really more work for the people importing the patches, so
if at all possible, get tghe setup working with the automatically
generated patches.

 The patch fixes the bug of partial initialization of global network
 parameters.

 Upon u-boot's start up the first ping command causes a failure of the
 consequent TFTP transfers. It happens in the recently added mechanism of
 NetLoop initialization where initialization of global network parameters is
 separated in the NetInitLoop routine which is called per env_id change.
 Thus, ping request will initialize the network parameters necessary
 for ping operation only, afterwards the env_changed_id will be set
 to the env_id that will prevent all following initialization requests
 from other protocols.
 The problem is that the initialized by ping subset of network parameters
 is not sufficient for other protocols and particularly for TFTP
 which requires the NetServerIp also.

 Signed-off-by: Michael Zaidman michael.zaidman at gmail.com

Please don't elide your e-mail address here.  The consent is that we use
real e-mail addresses in the signed-off-by lines (as you also did in
your previous post).  One negative impact for example is that our
statistic scripts will fail for such entries.

Apart from that you have to nudge Ben or Heiko as to the real content.
I only wanted to help get the formalities straight ;)

Cheers
  Detlev

-- 
Number theorists do it perfectly and rationally.
--
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] netconsole in u-boot

2009-04-02 Thread Detlev Zundel
Hi Ong,

 Am trying to configure out how to change my u-boot to be netconsole from 
 serial console.

 When i key in help in my u-boot start-up, i didnt seen any nc command.
 U-Boot help

In my last e-mail I already pointed you to doc/README.NetConsole.  From
where in this document do you get the idea tha help should show you
somethong about netconsole?

coninfo woulb be a much better candidate for getting info...

Cheers
  Detlev

-- 
#!/usr/bin/perl
$c=print\\#\!\/usr\/bin\/perl\
\\\$c\=\.quotemeta\(\$c\)\.\;\\n\$c;\;
print#!/usr/bin/perl\n\$c=\.quotemeta($c).\;\n$c;;
--
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] Out-of-tree build for imx31_phycore_eet fails

2009-03-31 Thread Detlev Zundel
Hi,

 Dear Guennadi,

 In message pine.lnx.4.64.0903302113210.4...@axis700.grange you wrote:

  /bin/sh: line 1: /work/wd/tmp-arm/include/config.h: No such file or 
  directory
  make: *** [imx31_phycore_eet_config] Error 1
 
 ok, that's just a missing
 
 +@mkdir -p $(obj)include
 
 right? will submit.

 Thanks.

  Please fix.
  
  BTW: you also forgot to add your name to the MAINTAINERS file. Please
  fix this, too.
 
 Hm, this is not a new board, just a new configuration for an existing 
 board. Do we really want a new MAINTAINERS entry for it? I looked at a 
 couple other boards with multiple configs, they all had only one entry in 
 MAINTAINERS (at most:-)).

 I see. I thought that was a new board.

But I find this case to be different - the maintainer of the
imx31_phycore (Sascha Hauer) has never seen the eet hardware, so how is
he supposed to maintain the code?

The other examples Guennadi mentions usually were all done by the same
person.

In summary I vote for adding Guennadi as maintainer for the eet variant.

Cheers
  Detlev

-- 
-- Question authority!
-- Yeah, says who?
--
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] NetLoop initialization bug

2009-03-31 Thread Detlev Zundel
Hi Michael,

 Please see my comments and updated patch below.

As a side note, please send your patch as an inline attachment also
adding your signed-off-by line.  It's probably easiest to actually use
git to apply your changes to a branch and use git-format-patch to
create the patch.

Please also provide more dsecriptive commit text explaining what the
patch does.

The patch in your mail does still not apply.  Neither git-am (after
fixing the patch with a valid e-mail) nor patch can do anything with it.

Thanks
  Detlev

-- 
;; Self-replicator in ELisp
((lambda (l) (prin1-to-string (list l (list (quote quote) l
 (quote (lambda (l) (prin1-to-string (list l (list (quote quote) l))
--
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] Add source command; prepare removal of autoscr command

2009-03-31 Thread Detlev Zundel
Hi,

 The changes look good to me.  2 comments below:

 +/*
 + * Keep for now for backward compatibility;
 + * remove later when support for autoscr goes away.
 + */
 +U_BOOT_CMD(
 +autoscr, 2, 0,  do_source,
 +run script from memory,
 +[addr] - run script starting at addr
 + - A valid image header must be present\n
 +#if defined(CONFIG_FIT)
 +For FIT format uImage addr must include subimage\n
 +unit name in the form of addr:subimg_uname\n
 +#endif
 +);

 I'd vote to change autoscr's help messages to something letting end
 user's know that the command is deprecated and being replaced by the
 source.  Eg something like:

 + autoscr, 2, 0, do_source,
 + DEPRECATED - see 'source' command,
 + DEPRECATED - see 'source' command

 Most U-Boot user's are more likely to see this than the
 feature-removal-schedule.txt in the source code.

Actually I also like that, but if we head down this direction, then why
not go all the way and print a warning on executing autoscr?  Thinking
about it (and reflecting on how I interact with U-Boot), I fear that
even the help message will not get too much attention from people who
should get aware of the problem.

What do other people think about this?

Cheers
  Detlev

-- 
14474011154664524427946373126085988481573677491474835889066354349131199152128
If you know why this number is perfect - you're probably a mathematician...
--
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] rtc: remove broken rtc_read and rtc_write declarations

2009-03-30 Thread Detlev Zundel
Hi Kim,

 commit 04e11cf3 rtc: add support for 4543 RTC (manufactured by e.g.
 EPSON) introduces the following build error on boards configuring e.g,
 the ds1374 rtc:

 Configuring for MPC837XEMDS board...
 ds1374.c:103: error: static declaration of 'rtc_read' follows non-static 
 declaration
 /home/r1aaha/git/u-boot/include/rtc.h:64: error: previous declaration of 
 'rtc_read' was here
 ds1374.c:104: error: conflicting types for 'rtc_write'
 /home/r1aaha/git/u-boot/include/rtc.h:65: error: previous declaration of 
 'rtc_write' was here

 this reverts the erroneous chunk.

 Signed-off-by: Kim Phillips kim.phill...@freescale.com
 CC: Detlev Zundel d...@denx.de
 CC: Andreas Pfefferle a...@denx.de

Acked-by: Detlev Zundel d...@denx.de

Sorry for the breakage.

Cheers
  Detlev

-- 
Math and Alcohol don't mix, so...
PLEASE DON'T DRINK AND DERIVE

[Motto of the society: Mathematicians Against Drunk Deriving]
--
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 v3 0/5] Update for inka4x0 plus some new features

2009-03-29 Thread Detlev Zundel
This patchset contains updates for the ink4x0 platform.  Namely it
adds hardware diagnostic funtions and an RTC driver.

For a nice integration by using private command tables, do_help is
extended to support this scenario also.

To successfully convert all the pointer access to accessor macros, a
bunch of new defines is also needed for the 5200 cpu.


Changes from v2:

Addresses comments from ML.  Specifically:
- Fixing the odd empty line here and there
- Removed some cruft uncovered in the review process
- Rebased against master becaus some patches were
  already applied by Wolfgang.

Detlev Zundel (5):
  drivers/twserial: Add protocol driver for three wire serial
interface.
  rtc: add support for 4543 RTC (manufactured by e.g. EPSON)
  inka4x0: Add hardware diagnosis functions for inka4x0
  inka4x0: Add hardware diagnosis and RTC in configuration.
  inka4x0: Use proper accessor macros for memory mapped registers.

 Makefile|3 +-
 board/inka4x0/Makefile  |4 +-
 board/inka4x0/inka4x0.c |  171 +-
 board/inka4x0/inkadiag.c|  514 +++
 drivers/rtc/Makefile|1 +
 drivers/rtc/rtc4543.c   |  118 ++
 drivers/twserial/Makefile   |   46 
 drivers/twserial/soft_tws.c |  111 ++
 include/configs/inka4x0.h   |   91 +++-
 include/ns16550.h   |   11 +
 include/rtc.h   |4 +
 include/tws.h   |   38 
 12 files changed, 1042 insertions(+), 70 deletions(-)
 create mode 100644 board/inka4x0/inkadiag.c
 create mode 100644 drivers/rtc/rtc4543.c
 create mode 100644 drivers/twserial/Makefile
 create mode 100644 drivers/twserial/soft_tws.c
 create mode 100644 include/tws.h

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


[U-Boot] [PATCH v3 3/5] inka4x0: Add hardware diagnosis functions for inka4x0

2009-03-29 Thread Detlev Zundel
This patch adds advanced diagnosis functions for the inka4x0 board.

Signed-off-by: Andreas Pfefferle a...@denx.de
Signed-off-by: Detlev Zundel d...@denx.de
---
 board/inka4x0/Makefile|4 +-
 board/inka4x0/inka4x0.c   |   20 ++-
 board/inka4x0/inkadiag.c  |  514 +
 include/configs/inka4x0.h |1 +
 include/ns16550.h |   11 +
 5 files changed, 546 insertions(+), 4 deletions(-)
 create mode 100644 board/inka4x0/inkadiag.c

diff --git a/board/inka4x0/Makefile b/board/inka4x0/Makefile
index 442e2d0..82aa950 100644
--- a/board/inka4x0/Makefile
+++ b/board/inka4x0/Makefile
@@ -1,5 +1,5 @@
 #
-# (C) Copyright 2003-2006
+# (C) Copyright 2003-2009
 # Wolfgang Denk, DENX Software Engineering, w...@denx.de.
 #
 # See file CREDITS for list of people who contributed to this
@@ -25,7 +25,7 @@ include $(TOPDIR)/config.mk
 
 LIB= $(obj)lib$(BOARD).a
 
-COBJS  := $(BOARD).o
+COBJS  := $(BOARD).o inkadiag.o
 
 SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
 OBJS   := $(addprefix $(obj),$(COBJS))
diff --git a/board/inka4x0/inka4x0.c b/board/inka4x0/inka4x0.c
index 507196b..bb5c25d 100644
--- a/board/inka4x0/inka4x0.c
+++ b/board/inka4x0/inka4x0.c
@@ -1,6 +1,9 @@
 /*
- * (C) Copyright 2003-2004
- * Wolfgang Denk, DENX Software Engineering, w...@denx.de.
+ * (C) Copyright 2008-2009
+ * Andreas Pfefferle, DENX Software Engineering, a...@denx.de.
+ *
+ * (C) Copyright 2009
+ * Detlev Zundel, DENX Software Engineering, d...@denx.de.
  *
  * (C) Copyright 2004
  * Mark Jonas, Freescale Semiconductor, mark.jo...@motorola.com.
@@ -8,6 +11,9 @@
  * (C) Copyright 2004
  * Martin Krause, TQ-Systems GmbH, martin.kra...@tqs.de
  *
+ * (C) Copyright 2003-2004
+ * Wolfgang Denk, DENX Software Engineering, w...@denx.de.
+ *
  * See file CREDITS for list of people who contributed to this
  * project.
  *
@@ -171,6 +177,16 @@ void flash_preinit(void)
*(vu_long *)MPC5XXX_BOOTCS_CFG = ~0x1; /* clear RO */
 }
 
+int misc_init_r (void) {
+   extern int inkadiag_init_r (void);
+
+   /*
+* The command table used for the subcommands of inkadiag
+* needs to be relocated manually.
+*/
+   return inkadiag_init_r();
+}
+
 int misc_init_f (void)
 {
char tmp[10];
diff --git a/board/inka4x0/inkadiag.c b/board/inka4x0/inkadiag.c
new file mode 100644
index 000..06c9807
--- /dev/null
+++ b/board/inka4x0/inkadiag.c
@@ -0,0 +1,514 @@
+/*
+ * (C) Copyright 2008, 2009 Andreas Pfefferle,
+ * DENX Software Engineering, a...@denx.de.
+ * (C) Copyright 2009 Detlev Zundel,
+ * DENX Software Engineering, d...@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 asm/io.h
+#include common.h
+#include config.h
+#include mpc5xxx.h
+#include pci.h
+
+#include command.h
+
+/* This is needed for the includes in ns16550.h */
+#define CONFIG_SYS_NS16550_REG_SIZE 1
+#include ns16550.h
+
+#define GPIO_BASE  ((u_char *)CONFIG_SYS_CS3_START)
+
+#define DIGIN_TOUCHSCR_MASK0x3000  /* Inputs 12-13 */
+#define DIGIN_KEYB_MASK0x0001  /* Input 16 */
+
+#define DIGIN_DRAWER_SW1   0x0040  /* Input 22 */
+#define DIGIN_DRAWER_SW2   0x0080  /* Input 23 */
+
+#define DIGIO_LED0 0x0001  /* Output 0 */
+#define DIGIO_LED1 0x0002  /* Output 1 */
+#define DIGIO_LED2 0x0004  /* Output 2 */
+#define DIGIO_LED3 0x0008  /* Output 3 */
+#define DIGIO_LED4 0x0010  /* Output 4 */
+#define DIGIO_LED5 0x0020  /* Output 5 */
+
+#define DIGIO_DRAWER1  0x0100  /* Output 8 */
+#define DIGIO_DRAWER2  0x0200  /* Output 9 */
+
+#define SERIAL_PORT_BASE   ((u_char *)CONFIG_SYS_CS2_START)
+
+#define PSC_OP1_RTS0x01
+#define PSC_OP0_RTS0x01
+
+/*
+ * Table with supported baudrates (defined in inka4x0.h)
+ */
+static const unsigned long baudrate_table[] = CONFIG_SYS_BAUDRATE_TABLE;
+#defineN_BAUDRATES (sizeof(baudrate_table) / sizeof(baudrate_table[0]))
+
+static unsigned int inka_digin_get_input(void)
+{
+   return in_8(GPIO_BASE + 0)  0 | in_8(GPIO_BASE + 1)  8

[U-Boot] [PATCH v3 5/5] inka4x0: Use proper accessor macros for memory mapped registers.

2009-03-29 Thread Detlev Zundel
Signed-off-by: Detlev Zundel d...@denx.de
---
 board/inka4x0/inka4x0.c |  139 +--
 1 files changed, 75 insertions(+), 64 deletions(-)

diff --git a/board/inka4x0/inka4x0.c b/board/inka4x0/inka4x0.c
index a8bc3b3..7428b92 100644
--- a/board/inka4x0/inka4x0.c
+++ b/board/inka4x0/inka4x0.c
@@ -55,41 +55,35 @@
 #ifndef CONFIG_SYS_RAMBOOT
 static void sdram_start (int hi_addr)
 {
+   volatile struct mpc5xxx_sdram *sdram =
+   (struct mpc5xxx_sdram *)MPC5XXX_SDRAM;
long hi_addr_bit = hi_addr ? 0x0100 : 0;
 
/* unlock mode register */
-   *(vu_long *)MPC5XXX_SDRAM_CTRL = SDRAM_CONTROL | 0x8000 | 
hi_addr_bit;
-   __asm__ volatile (sync);
+   out_be32(sdram-ctrl, SDRAM_CONTROL | 0x8000 | hi_addr_bit);
 
/* precharge all banks */
-   *(vu_long *)MPC5XXX_SDRAM_CTRL = SDRAM_CONTROL | 0x8002 | 
hi_addr_bit;
-   __asm__ volatile (sync);
+   out_be32(sdram-ctrl, SDRAM_CONTROL | 0x8002 | hi_addr_bit);
 
 #if SDRAM_DDR
/* set mode register: extended mode */
-   *(vu_long *)MPC5XXX_SDRAM_MODE = SDRAM_EMODE;
-   __asm__ volatile (sync);
+   out_be32(sdram-mode, SDRAM_EMODE);
 
/* set mode register: reset DLL */
-   *(vu_long *)MPC5XXX_SDRAM_MODE = SDRAM_MODE | 0x0400;
-   __asm__ volatile (sync);
+   out_be32(sdram-mode, SDRAM_MODE | 0x0400);
 #endif
 
/* precharge all banks */
-   *(vu_long *)MPC5XXX_SDRAM_CTRL = SDRAM_CONTROL | 0x8002 | 
hi_addr_bit;
-   __asm__ volatile (sync);
+   out_be32(sdram-ctrl, SDRAM_CONTROL | 0x8002 | hi_addr_bit);
 
/* auto refresh */
-   *(vu_long *)MPC5XXX_SDRAM_CTRL = SDRAM_CONTROL | 0x8004 | 
hi_addr_bit;
-   __asm__ volatile (sync);
+   out_be32(sdram-ctrl, SDRAM_CONTROL | 0x8004 | hi_addr_bit);
 
/* set mode register */
-   *(vu_long *)MPC5XXX_SDRAM_MODE = SDRAM_MODE;
-   __asm__ volatile (sync);
+   out_be32(sdram-mode, SDRAM_MODE);
 
/* normal operation */
-   *(vu_long *)MPC5XXX_SDRAM_CTRL = SDRAM_CONTROL | hi_addr_bit;
-   __asm__ volatile (sync);
+   out_be32(sdram-ctrl, SDRAM_CONTROL | hi_addr_bit);
 }
 #endif
 
@@ -101,24 +95,27 @@ static void sdram_start (int hi_addr)
 
 phys_size_t initdram (int board_type)
 {
+   volatile struct mpc5xxx_mmap_ctl *mm =
+   (struct mpc5xxx_mmap_ctl *) CONFIG_SYS_MBAR;
+   volatile struct mpc5xxx_cdm *cdm =
+   (struct mpc5xxx_cdm *)  MPC5XXX_CDM;
+   volatile struct mpc5xxx_sdram *sdram =
+   (struct mpc5xxx_sdram *)MPC5XXX_SDRAM;
ulong dramsize = 0;
 #ifndef CONFIG_SYS_RAMBOOT
long test1, test2;
 
/* setup SDRAM chip selects */
-   *(vu_long *)MPC5XXX_SDRAM_CS0CFG = 0x001c; /* 512MB at 0x0 */
-   *(vu_long *)MPC5XXX_SDRAM_CS1CFG = 0x4000; /* disabled */
-   __asm__ volatile (sync);
+   out_be32(mm-sdram0, 0x001c);  /* 512MB at 0x0 */
+   out_be32(mm-sdram1, 0x4000);  /* disabled */
 
/* setup config registers */
-   *(vu_long *)MPC5XXX_SDRAM_CONFIG1 = SDRAM_CONFIG1;
-   *(vu_long *)MPC5XXX_SDRAM_CONFIG2 = SDRAM_CONFIG2;
-   __asm__ volatile (sync);
+   out_be32(sdram-config1, SDRAM_CONFIG1);
+   out_be32(sdram-config2, SDRAM_CONFIG2);
 
 #if SDRAM_DDR
/* set tap delay */
-   *(vu_long *)MPC5XXX_CDM_PORCFG = SDRAM_TAPDELAY;
-   __asm__ volatile (sync);
+   out_be32(cdm-porcfg, SDRAM_TAPDELAY);
 #endif
 
/* find RAM size using SDRAM CS0 only */
@@ -140,17 +137,17 @@ phys_size_t initdram (int board_type)
 
/* set SDRAM CS0 size according to the amount of RAM found */
if (dramsize  0) {
-   *(vu_long *)MPC5XXX_SDRAM_CS0CFG = 0x13 +
-   __builtin_ffs(dramsize  20) - 1;
+   out_be32(mm-sdram0, 0x13 +
+__builtin_ffs(dramsize  20) - 1);
} else {
-   *(vu_long *)MPC5XXX_SDRAM_CS0CFG = 0; /* disabled */
+   out_be32(mm-sdram0, 0); /* disabled */
}
 
-   *(vu_long *)MPC5XXX_SDRAM_CS1CFG = dramsize; /* disabled */
+   out_be32(mm-sdram1, dramsize); /* disabled */
 #else /* CONFIG_SYS_RAMBOOT */
 
/* retrieve size of memory connected to SDRAM CS0 */
-   dramsize = *(vu_long *)MPC5XXX_SDRAM_CS0CFG  0xFF;
+   dramsize = in_be32(mm-sdram0)  0xFF;
if (dramsize = 0x13) {
dramsize = (1  (dramsize - 0x13))  20;
} else {
@@ -169,13 +166,15 @@ int checkboard (void)
 
 void flash_preinit(void)
 {
+   volatile struct mpc5xxx_lpb *lpb = (struct mpc5xxx_lpb *)MPC5XXX_LPB;
+
/*
 * Now, when we are in RAM, enable flash write
 * access for detection process.
-* Note that CS_BOOT cannot be cleared when
+* Note that CS_BOOT (CS0) cannot be cleared when
 * executing in flash

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] 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 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] 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


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] 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 v2 3/7] drivers/twserial: Add protocol driver for three wire serial interface.

2009-03-26 Thread Detlev Zundel
Hi Wolfgang,

 Dear Detlev Zundel,

 In message 1237998478-18452-4-git-send-email-...@denx.de you wrote:
 This pretty unintelligent interface is used on some RTC chips.
 
 Signed-off-by: Detlev Zundel d...@denx.de
 ...
 diff --git a/include/tws.h b/include/tws.h
 new file mode 100644
 index 000..bfa8d58
 --- /dev/null
 +++ b/include/tws.h
 @@ -0,0 +1,47 @@
 ...
 +#ifndef _TWS_H_
 +#define _TWS_H_
 +
 +#ifndef TWS_SOFT_DECLARATIONS
 +# if defined(CONFIG_MPC5xxx)
 +#  define TWS_SOFT_DECLARATIONS \
 + volatile ioport_t *iop = ioport_addr((immap_t *)CONFIG_SYS_IMMR, I2C_PORT);
 +# else
 +#  define TWS_SOFT_DECLARATIONS
 +# endif
 +#endif

 Indentation not by TAB.

Yes, intentionally so.  Indenting by TAB exceeds the available line
length.  Judging by this single line I felt non-breaking the line was
more important.

Can you please point me to the section in the CodingStyle regarding
indentation for macros?  I'd be much obliged.

Thanks
  Detlev

-- 
It's amazing I won. I was running against peace, prosperity, and
incumbency.
  --  George H.W. Bush, 06/14/2001, talking to Swedish prime
  minister Goran Perrson, unaware that a live tv camera was still on
--
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 3/7] drivers/twserial: Add protocol driver for three wire serial interface.

2009-03-26 Thread Detlev Zundel
Hi Wolfgang,

 In message 1237998478-18452-4-git-send-email-...@denx.de you wrote:
 This pretty unintelligent interface is used on some RTC chips.
 
 Signed-off-by: Detlev Zundel d...@denx.de
 ...
 diff --git a/include/tws.h b/include/tws.h
 new file mode 100644
 index 000..bfa8d58
 --- /dev/null
 +++ b/include/tws.h
 @@ -0,0 +1,47 @@
 ...
 +#ifndef _TWS_H_
 +#define _TWS_H_
 +
 +#ifndef TWS_SOFT_DECLARATIONS
 +# if defined(CONFIG_MPC5xxx)
 +#  define TWS_SOFT_DECLARATIONS \
 + volatile ioport_t *iop = ioport_addr((immap_t *)CONFIG_SYS_IMMR, 
 I2C_PORT);
 +# else
 +#  define TWS_SOFT_DECLARATIONS
 +# endif
 +#endif

 Indentation not by TAB.

 Yes, intentionally so.  Indenting by TAB exceeds the available line
 length.  Judging by this single line I felt non-breaking the line was
 more important.

 Can you please point me to the section in the CodingStyle regarding
 indentation for macros?  I'd be much obliged.

The point is moot.  Pondering over this piece of code it suddenly
occured to me that the best solution is simply to remove it entirely ;)

This really is a leftover from an in-between broken implementation of
the interface, so the removal in this case bears no consequences.

If no further feedback on the patch series arrive, I'll repost the whole
stack tomorrow again.

Thanks again
  Detlev

-- 
If you currently have a 32-bit UNIX system, you are advised to
trade it in for a 64-bit one sometime before the year 2106.
 -- Andrew S. Tanenbaum: Modern Operating Systems, 2nd Edition
--
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 v2 0/7] Update for inka4x0 plus some new features

2009-03-25 Thread Detlev Zundel
This patchset contains updates for the ink4x0 platform.  Namely it
adds hardware diagnostic funtions and an RTC driver.

For a nice integration by using private command tables, do_help is
extended to support this scenario also.

To successfully convert all the pointer access to accessor macros, a
bunch of new defines is also needed for the 5200 cpu.


Changes from v1:

Addresses comments from ML.  Specifically:
- Moved ns16650 defines to proper include file.
- Used structures from this header file to access UARTs - this
  nicely eliminates serial_{in,out}.
- Convert inka_diag.c pointer accesses to accessor macros.
- Move variable declarations to start of functions.

A diff of the before and after branches will be posted seperately
for easier inspection.


Detlev Zundel (7):
  command.c: Expose the core of do_help as _do_help to the rest of
u-boot.
  mpc5xxx: Add structure definition for several more register blocks.
  drivers/twserial: Add protocol driver for three wire serial
interface.
  rtc: add support for 4543 RTC (manufactured by e.g. EPSON)
  inka4x0: Add hardware diagnosis functions for inka4x0
  inka4x0: Add hardware diagnosis and RTC in configuration.
  inka4x0: Use proper accessor macros for memory mapped registers.

 Makefile|3 +-
 board/inka4x0/Makefile  |4 +-
 board/inka4x0/inka4x0.c |  171 +-
 board/inka4x0/inkadiag.c|  514 +++
 common/command.c|   20 +-
 drivers/rtc/Makefile|1 +
 drivers/rtc/rtc4543.c   |  118 ++
 drivers/twserial/Makefile   |   46 
 drivers/twserial/soft_tws.c |  110 +
 include/command.h   |4 +-
 include/configs/inka4x0.h   |   91 +++-
 include/mpc5xxx.h   |  124 +++
 include/ns16550.h   |   11 +
 include/rtc.h   |4 +
 include/tws.h   |   47 
 15 files changed, 1190 insertions(+), 78 deletions(-)
 create mode 100644 board/inka4x0/inkadiag.c
 create mode 100644 drivers/rtc/rtc4543.c
 create mode 100644 drivers/twserial/Makefile
 create mode 100644 drivers/twserial/soft_tws.c
 create mode 100644 include/tws.h
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH v2 6/7] inka4x0: Add hardware diagnosis and RTC in configuration.

2009-03-25 Thread Detlev Zundel
This patch adds the board specific communication routines needed by
the external 4543 RTC.

Signed-off-by: Detlev Zundel d...@denx.de
Signed-off-by: Andreas Pfefferle a...@denx.de
---
 board/inka4x0/inka4x0.c   |   20 ++
 include/configs/inka4x0.h |   90 ++--
 2 files changed, 105 insertions(+), 5 deletions(-)

diff --git a/board/inka4x0/inka4x0.c b/board/inka4x0/inka4x0.c
index bb5c25d..a8bc3b3 100644
--- a/board/inka4x0/inka4x0.c
+++ b/board/inka4x0/inka4x0.c
@@ -33,6 +33,7 @@
  * MA 02111-1307 USA
  */
 
+#include asm/io.h
 #include common.h
 #include mpc5xxx.h
 #include pci.h
@@ -189,6 +190,8 @@ int misc_init_r (void) {
 
 int misc_init_f (void)
 {
+   struct mpc5xxx_gpio *gpio = (struct mpc5xxx_gpio *)MPC5XXX_GPIO;
+   struct mpc5xxx_wu_gpio *wu_gpio = (struct mpc5xxx_wu_gpio 
*)MPC5XXX_WU_GPIO;
char tmp[10];
int i, br;
 
@@ -236,6 +239,23 @@ int misc_init_f (void)
*(vu_long *) MPC5XXX_WU_GPIO_ENABLE |= GPIO_PSC3_9;
*(vu_long *) MPC5XXX_WU_GPIO_DIR|= GPIO_PSC3_9;
*(vu_long *) MPC5XXX_WU_GPIO_DATA_O   |= GPIO_PSC3_9;
+
+   /*
+* Configure three wire serial interface to RTC (PSC1_4,
+* PSC2_4, PSC3_4, PSC3_5)
+*/
+   setbits_8(wu_gpio-enable,  MPC5XXX_GPIO_WKUP_PSC1_4 |
+MPC5XXX_GPIO_WKUP_PSC2_4);
+   setbits_8(wu_gpio-ddr, MPC5XXX_GPIO_WKUP_PSC1_4 |
+MPC5XXX_GPIO_WKUP_PSC2_4);
+   clrbits_8(wu_gpio-dvo, MPC5XXX_GPIO_WKUP_PSC1_4);
+   clrbits_8(gpio-sint_inten, MPC5XXX_GPIO_SINT_PSC3_4 |
+MPC5XXX_GPIO_SINT_PSC3_5);
+   setbits_8(gpio-sint_gpioe, MPC5XXX_GPIO_SINT_PSC3_4 |
+MPC5XXX_GPIO_SINT_PSC3_5);
+   setbits_8(gpio-sint_ddr,   MPC5XXX_GPIO_SINT_PSC3_5);
+   clrbits_8(gpio-sint_dvo,   MPC5XXX_GPIO_SINT_PSC3_5);
+
return 0;
 }
 
diff --git a/include/configs/inka4x0.h b/include/configs/inka4x0.h
index b80796d..5f06b09 100644
--- a/include/configs/inka4x0.h
+++ b/include/configs/inka4x0.h
@@ -1,4 +1,7 @@
 /*
+ * (C) Copyright 2009
+ * Detlev Zundel, DENX Software Engineering, d...@denx.de.
+ *
  * (C) Copyright 2003-2005
  * Wolfgang Denk, DENX Software Engineering, w...@denx.de.
  *
@@ -90,16 +93,17 @@
  */
 #include config_cmd_default.h
 
+#define CONFIG_CMD_DATE
 #define CONFIG_CMD_DHCP
 #define CONFIG_CMD_EXT2
 #define CONFIG_CMD_FAT
 #define CONFIG_CMD_IDE
 #define CONFIG_CMD_NFS
 #define CONFIG_CMD_PCI
+#define CONFIG_CMD_PING
 #define CONFIG_CMD_SNTP
 #define CONFIG_CMD_USB
 
-
 #defineCONFIG_TIMESTAMP1   /* Print image info with 
timestamp */
 
 #if (TEXT_BASE == 0xFFE0)  /* Boot low */
@@ -240,15 +244,91 @@
  * 01 - CAN1 on I2C1, CAN2 on Tmr0/1 do not use on TQM5200 with onboard
  *   EEPROM
  * use PSC1 as UART: Bits 28-31 (mask: 0x0007): 0100
- * use PSC6_1 and PSC6_3 as GPIO: Bits 9:11 (mask: 0x0700):
- * 011 - PSC6 could not be used as UART or CODEC. IrDA still possible.
+ * use PSC2 as UART: Bits 24-27 (mask: 0x0070): 0100
+ * use PSC3 as UART: Bits 20-23 (mask: 0x0700): 0100
+ * use PSC6 as UART: Bits  9-11 (mask: 0x0070): 0101
  */
-#define CONFIG_SYS_GPS_PORT_CONFIG 0x01001004
+#define CONFIG_SYS_GPS_PORT_CONFIG 0x01501444
 
 /*
  * RTC configuration
  */
-#define CONFIG_RTC_MPC5200 1   /* use internal MPC5200 RTC */
+#define CONFIG_RTC_RTC4543 1   /* use external RTC */
+
+/*
+ * Software (bit-bang) three wire serial configuration
+ *
+ * Note that we need the ifdefs because otherwise compilation of
+ * mkimage.c fails.
+ */
+#define CONFIG_SOFT_TWS1
+
+#ifdef TWS_IMPLEMENTATION
+#include mpc5xxx.h
+#include asm/io.h
+
+#define TWS_CE MPC5XXX_GPIO_WKUP_PSC1_4 /* GPIO_WKUP_0 */
+#define TWS_WR MPC5XXX_GPIO_WKUP_PSC2_4 /* GPIO_WKUP_1 */
+#define TWS_DATA   MPC5XXX_GPIO_SINT_PSC3_4 /* GPIO_SINT_0 */
+#define TWS_CLKMPC5XXX_GPIO_SINT_PSC3_5 /* GPIO_SINT_1 */
+
+static inline void tws_ce(unsigned bit)
+{
+   struct mpc5xxx_wu_gpio *wu_gpio =
+   (struct mpc5xxx_wu_gpio *)MPC5XXX_WU_GPIO;
+   if (bit)
+   setbits_8(wu_gpio-dvo, TWS_CE);
+   else
+   clrbits_8(wu_gpio-dvo, TWS_CE);
+}
+
+static inline void tws_wr(unsigned bit)
+{
+   struct mpc5xxx_wu_gpio *wu_gpio =
+   (struct mpc5xxx_wu_gpio *)MPC5XXX_WU_GPIO;
+   if (bit)
+   setbits_8(wu_gpio-dvo, TWS_WR);
+   else
+   clrbits_8(wu_gpio-dvo, TWS_WR);
+}
+
+static inline void tws_clk(unsigned bit)
+{
+   struct mpc5xxx_gpio *gpio =
+   (struct mpc5xxx_gpio *)MPC5XXX_GPIO;
+   if (bit)
+   setbits_8(gpio-sint_dvo, TWS_CLK);
+   else
+   clrbits_8(gpio-sint_dvo, TWS_CLK);
+}
+
+static inline void tws_data(unsigned bit)
+{
+   struct

[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-25 Thread Detlev Zundel
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(-)

diff --git a/common/command.c b/common/command.c
index 3b9ccc9..c9a3f5b 100644
--- a/common/command.c
+++ b/common/command.c
@@ -1,5 +1,5 @@
 /*
- * (C) Copyright 2000-2003
+ * (C) Copyright 2000-2009
  * Wolfgang Denk, DENX Software Engineering, w...@denx.de.
  *
  * See file CREDITS for list of people who contributed to this
@@ -233,20 +233,19 @@ U_BOOT_CMD(
  * Use puts() instead of printf() to avoid printf buffer overflow
  * for long help messages
  */
-int do_help (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
+
+int _do_help (cmd_tbl_t *cmd_start, int cmd_items, cmd_tbl_t * cmdtp, int
+ flag, int argc, char *argv[])
 {
int i;
int rcode = 0;
 
if (argc == 1) {/*show list of commands */
-
-   int cmd_items = __u_boot_cmd_end -
-   __u_boot_cmd_start;/* pointer arith! */
cmd_tbl_t *cmd_array[cmd_items];
int i, j, swaps;
 
/* Make array of commands from .uboot_cmd section */
-   cmdtp = __u_boot_cmd_start;
+   cmdtp = cmd_start;
for (i = 0; i  cmd_items; i++) {
cmd_array[i] = cmdtp++;
}
@@ -286,7 +285,7 @@ int do_help (cmd_tbl_t * cmdtp, int flag, int argc, char 
*argv[])
 * command help (long version)
 */
for (i = 1; i  argc; ++i) {
-   if ((cmdtp = find_cmd (argv[i])) != NULL) {
+   if ((cmdtp = find_cmd_tbl (argv[i], cmd_start, cmd_items )) != 
NULL) {
 #ifdef CONFIG_SYS_LONGHELP
/* found - print (long) help info */
puts (cmdtp-name);
@@ -313,6 +312,13 @@ int do_help (cmd_tbl_t * cmdtp, int flag, int argc, char 
*argv[])
return rcode;
 }
 
+int do_help (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
+{
+   return _do_help(__u_boot_cmd_start,
+   __u_boot_cmd_end - __u_boot_cmd_start,
+   cmdtp, flag, argc, argv);
+}
+
 
 U_BOOT_CMD(
help,   CONFIG_SYS_MAXARGS, 1,  do_help,
diff --git a/include/command.h b/include/command.h
index d7321af..bd47853 100644
--- a/include/command.h
+++ b/include/command.h
@@ -1,5 +1,5 @@
 /*
- * (C) Copyright 2000
+ * (C) Copyright 2000-2009
  * Wolfgang Denk, DENX Software Engineering, w...@denx.de.
  *
  * See file CREDITS for list of people who contributed to this
@@ -66,6 +66,8 @@ extern cmd_tbl_t  __u_boot_cmd_end;
 
 
 /* common/command.c */
+int _do_help (cmd_tbl_t *cmd_start, int cmd_items, cmd_tbl_t * cmdtp, int
+ flag, int argc, char *argv[]);
 cmd_tbl_t *find_cmd(const char *cmd);
 cmd_tbl_t *find_cmd_tbl (const char *cmd, cmd_tbl_t *table, int table_len);
 
-- 
1.6.0.6

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


[U-Boot] [PATCH v2 2/7] mpc5xxx: Add structure definition for several more register blocks.

2009-03-25 Thread Detlev Zundel
Signed-off-by: Detlev Zundel d...@denx.de
---
 include/mpc5xxx.h |  124 +
 1 files changed, 124 insertions(+), 0 deletions(-)

diff --git a/include/mpc5xxx.h b/include/mpc5xxx.h
index 6138d45..463d5ae 100644
--- a/include/mpc5xxx.h
+++ b/include/mpc5xxx.h
@@ -30,6 +30,8 @@
 #ifndef __ASMPPC_MPC5XXX_H
 #define __ASMPPC_MPC5XXX_H
 
+#include asm/types.h
+
 /* Processor name */
 #if defined(CONFIG_MPC5200)
 #define CPU_ID_STR MPC5200
@@ -217,6 +219,12 @@
 #define MPC5XXX_GPIO_SIMPLE_PSC1_1   0x0002UL
 #define MPC5XXX_GPIO_SIMPLE_PSC1_0   0x0001UL
 
+#define MPC5XXX_GPIO_SINT_ETH_16 0x80
+#define MPC5XXX_GPIO_SINT_ETH_15 0x40
+#define MPC5XXX_GPIO_SINT_ETH_14 0x20
+#define MPC5XXX_GPIO_SINT_ETH_13 0x10
+#define MPC5XXX_GPIO_SINT_USB1_9 0x08
+#define MPC5XXX_GPIO_SINT_PSC3_8 0x04
 #define MPC5XXX_GPIO_SINT_PSC3_5 0x02
 #define MPC5XXX_GPIO_SINT_PSC3_4 0x01
 
@@ -454,6 +462,99 @@
   IORDY protocol */
 
 #ifndef __ASSEMBLY__
+/* Memory map registers */
+struct mpc5xxx_mmap_ctl {
+   volatile u32mbar;
+   volatile u32cs0_start;  /* 0x0004 */
+   volatile u32cs0_stop;
+   volatile u32cs1_start;  /* 0x000c */
+   volatile u32cs1_stop;
+   volatile u32cs2_start;  /* 0x0014 */
+   volatile u32cs2_stop;
+   volatile u32cs3_start;  /* 0x001c */
+   volatile u32cs3_stop;
+   volatile u32cs4_start;  /* 0x0024 */
+   volatile u32cs4_stop;
+   volatile u32cs5_start;  /* 0x002c */
+   volatile u32cs5_stop;
+#if defined(CONFIG_MGT5100)
+   volatile u32sdram_start;/* 0x0034 */
+   volatile u32sdram_stop; /* 0x0038 */
+   volatile u32pci1_start; /* 0x003c */
+   volatile u32pci1_stop;  /* 0x0040 */
+   volatile u32pci2_start; /* 0x0044 */
+   volatile u32pci2_stop;  /* 0x0048 */
+#elif defined(CONFIG_MPC5200)
+   volatile u32sdram0; /* 0x0034 */
+   volatile u32sdram1; /* 0x0038 */
+   volatile u32dummy1[4];  /* 0x003c */
+#endif
+   volatile u32boot_start; /* 0x004c */
+   volatile u32boot_stop;
+#if defined(CONFIG_MGT5100)
+   volatile u32addecr; /* 0x0054 */
+#elif defined(CONFIG_MPC5200)
+   volatile u32ipbi_ws_ctrl;   /* 0x0054 */
+#endif
+#if defined(CONFIG_MPC5200)
+   volatile u32cs6_start;  /* 0x0058 */
+   volatile u32cs6_stop;
+   volatile u32cs7_start;  /* 0x0060 */
+   volatile u32cs7_stop;
+#endif
+};
+
+/* Clock distribution module */
+struct mpc5xxx_cdm {
+   volatile u32jtagid; /* 0x */
+   volatile u32porcfg;
+   volatile u32brdcrmb;/* 0x0008 */
+   volatile u32cfg;
+   volatile u32fourtyeight_fdc;/* 0x0010 */
+   volatile u32clock_enable;
+   volatile u32system_osc; /* 0x0018 */
+   volatile u32ccscr;
+   volatile u32sreset; /* 0x0020 */
+   volatile u32pll_status;
+   volatile u32psc1_mccr;  /* 0x0028 */
+   volatile u32psc2_mccr;
+   volatile u32psc3_mccr;  /* 0x0030 */
+   volatile u32psc6_mccr;
+};
+
+/* SDRAM controller */
+struct mpc5xxx_sdram {
+   volatile u32mode;
+   volatile u32ctrl;
+   volatile u32config1;
+   volatile u32config2;
+#if defined(CONFIG_MGT5100)
+   volatile u32xlbsel;
+   volatile u32dummy[31];
+#else
+   volatile u32dummy[32];
+#endif
+   volatile u32sdelay;
+};
+
+struct mpc5xxx_lpb {
+   volatile u32cs0_cfg;
+   volatile u32cs1_cfg;
+   volatile u32cs2_cfg;
+   volatile u32cs3_cfg;
+   volatile u32cs4_cfg;
+   volatile u32cs5_cfg;
+   volatile u32cs_ctrl;
+   volatile u32cs_status;
+#if defined(CONFIG_MPC5200)
+   volatile u32cs6_cfg;
+   volatile u32cs7_cfg;
+   volatile u32cs_burst;
+   volatile u32cs_deadcycle;
+#endif
+};
+
+
 struct mpc5xxx_psc {
volatile u8 mode;   /* PSC + 0x00 */
volatile u8 reserved0[3];
@@ -596,6 +697,29 @@ struct mpc5xxx_gpio {
volatile u8 reserved10; /* GPIO + 0x3f */
 };
 
+struct mpc5xxx_wu_gpio {
+   volatile u8 enable; /* WU_GPIO + 0x00 */
+   volatile u8 reserved1[3];   /* WU_GPIO + 0x01 */
+   volatile u8 ode;/* WU_GPIO + 0x04 */
+   volatile u8 reserved2[3];   /* WU_GPIO + 0x05 */
+   volatile u8 ddr;/* WU_GPIO + 0x08 */
+   volatile u8 reserved3[3];   /* WU_GPIO + 0x09 */
+   volatile u8 dvo;/* WU_GPIO + 0x0c */
+   volatile u8 reserved4[3];   /* WU_GPIO + 0x0d */
+   volatile u8 inten

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

2009-03-25 Thread Detlev Zundel
This pretty unintelligent interface is used on some RTC chips.

Signed-off-by: Detlev Zundel d...@denx.de
---
 Makefile|3 +-
 drivers/twserial/Makefile   |   46 ++
 drivers/twserial/soft_tws.c |  110 +++
 include/tws.h   |   47 ++
 4 files changed, 205 insertions(+), 1 deletions(-)
 create mode 100644 drivers/twserial/Makefile
 create mode 100644 drivers/twserial/soft_tws.c
 create mode 100644 include/tws.h

diff --git a/Makefile b/Makefile
index 63b9909..7c37845 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,5 @@
 #
-# (C) Copyright 2000-2008
+# (C) Copyright 2000-2009
 # Wolfgang Denk, DENX Software Engineering, w...@denx.de.
 #
 # See file CREDITS for list of people who contributed to this
@@ -262,6 +262,7 @@ TAG_SUBDIRS += cpu/mpc8xxx
 endif
 LIBS += drivers/rtc/librtc.a
 LIBS += drivers/serial/libserial.a
+LIBS += drivers/twserial/libtws.a
 LIBS += drivers/usb/libusb.a
 LIBS += drivers/video/libvideo.a
 LIBS += common/libcommon.a
diff --git a/drivers/twserial/Makefile b/drivers/twserial/Makefile
new file mode 100644
index 000..0b059f3
--- /dev/null
+++ b/drivers/twserial/Makefile
@@ -0,0 +1,46 @@
+#
+# (C) Copyright 2009
+# Detlev Zundel, DENX Software Engineering, d...@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)libtws.a
+
+COBJS-$(CONFIG_SOFT_TWS) += soft_tws.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/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
@@ -0,0 +1,110 @@
+/*
+ * (C) Copyright 2009
+ * Detlev Zundel, DENX Software Engineering, d...@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
+ *
+ */
+
+#define TWS_IMPLEMENTATION
+#include common.h
+
+/*=*/
+/* Public Functions*/
+/*=*/
+
+/*---
+ * Read bits
+ */
+int tws_read(uchar *buffer, int len)
+{
+   int rem = len;
+   uchar accu, shift;
+
+   debug(tws_read: buffer %p len %d\n, buffer, len);
+
+   /* Configure the data pin for input */
+   tws_data_config_output(0);
+
+   /* Disable WR, i.e. setup a read */
+   tws_wr(0);
+   udelay(1);
+
+   /* Rise CE */
+   tws_ce(1);
+   udelay(1);
+
+   for (; rem  0; ) {
+   for (shift = 0, accu = 0;
+(rem  0)  (shift  8);
+rem--, shift++) {
+   tws_clk(1);
+   udelay(10);
+   accu |= (tws_data_read()  shift); /* LSB first */
+   tws_clk(0);
+   udelay(10);
+   }
+   *buffer++ = accu;
+   }
+
+   /* Lower CE */
+   tws_ce(0);
+
+   return len - rem

[U-Boot] [PATCH v2 5/7] inka4x0: Add hardware diagnosis functions for inka4x0

2009-03-25 Thread Detlev Zundel
This patch adds advanced diagnosis functions for the inka4x0 board.

Signed-off-by: Andreas Pfefferle a...@denx.de
Signed-off-by: Detlev Zundel d...@denx.de
---
 board/inka4x0/Makefile|4 +-
 board/inka4x0/inka4x0.c   |   20 ++-
 board/inka4x0/inkadiag.c  |  514 +
 include/configs/inka4x0.h |1 +
 include/ns16550.h |   11 +
 5 files changed, 546 insertions(+), 4 deletions(-)
 create mode 100644 board/inka4x0/inkadiag.c

diff --git a/board/inka4x0/Makefile b/board/inka4x0/Makefile
index 442e2d0..82aa950 100644
--- a/board/inka4x0/Makefile
+++ b/board/inka4x0/Makefile
@@ -1,5 +1,5 @@
 #
-# (C) Copyright 2003-2006
+# (C) Copyright 2003-2009
 # Wolfgang Denk, DENX Software Engineering, w...@denx.de.
 #
 # See file CREDITS for list of people who contributed to this
@@ -25,7 +25,7 @@ include $(TOPDIR)/config.mk
 
 LIB= $(obj)lib$(BOARD).a
 
-COBJS  := $(BOARD).o
+COBJS  := $(BOARD).o inkadiag.o
 
 SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
 OBJS   := $(addprefix $(obj),$(COBJS))
diff --git a/board/inka4x0/inka4x0.c b/board/inka4x0/inka4x0.c
index 507196b..bb5c25d 100644
--- a/board/inka4x0/inka4x0.c
+++ b/board/inka4x0/inka4x0.c
@@ -1,6 +1,9 @@
 /*
- * (C) Copyright 2003-2004
- * Wolfgang Denk, DENX Software Engineering, w...@denx.de.
+ * (C) Copyright 2008-2009
+ * Andreas Pfefferle, DENX Software Engineering, a...@denx.de.
+ *
+ * (C) Copyright 2009
+ * Detlev Zundel, DENX Software Engineering, d...@denx.de.
  *
  * (C) Copyright 2004
  * Mark Jonas, Freescale Semiconductor, mark.jo...@motorola.com.
@@ -8,6 +11,9 @@
  * (C) Copyright 2004
  * Martin Krause, TQ-Systems GmbH, martin.kra...@tqs.de
  *
+ * (C) Copyright 2003-2004
+ * Wolfgang Denk, DENX Software Engineering, w...@denx.de.
+ *
  * See file CREDITS for list of people who contributed to this
  * project.
  *
@@ -171,6 +177,16 @@ void flash_preinit(void)
*(vu_long *)MPC5XXX_BOOTCS_CFG = ~0x1; /* clear RO */
 }
 
+int misc_init_r (void) {
+   extern int inkadiag_init_r (void);
+
+   /*
+* The command table used for the subcommands of inkadiag
+* needs to be relocated manually.
+*/
+   return inkadiag_init_r();
+}
+
 int misc_init_f (void)
 {
char tmp[10];
diff --git a/board/inka4x0/inkadiag.c b/board/inka4x0/inkadiag.c
new file mode 100644
index 000..06c9807
--- /dev/null
+++ b/board/inka4x0/inkadiag.c
@@ -0,0 +1,514 @@
+/*
+ * (C) Copyright 2008, 2009 Andreas Pfefferle,
+ * DENX Software Engineering, a...@denx.de.
+ * (C) Copyright 2009 Detlev Zundel,
+ * DENX Software Engineering, d...@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 asm/io.h
+#include common.h
+#include config.h
+#include mpc5xxx.h
+#include pci.h
+
+#include command.h
+
+/* This is needed for the includes in ns16550.h */
+#define CONFIG_SYS_NS16550_REG_SIZE 1
+#include ns16550.h
+
+#define GPIO_BASE  ((u_char *)CONFIG_SYS_CS3_START)
+
+#define DIGIN_TOUCHSCR_MASK0x3000  /* Inputs 12-13 */
+#define DIGIN_KEYB_MASK0x0001  /* Input 16 */
+
+#define DIGIN_DRAWER_SW1   0x0040  /* Input 22 */
+#define DIGIN_DRAWER_SW2   0x0080  /* Input 23 */
+
+#define DIGIO_LED0 0x0001  /* Output 0 */
+#define DIGIO_LED1 0x0002  /* Output 1 */
+#define DIGIO_LED2 0x0004  /* Output 2 */
+#define DIGIO_LED3 0x0008  /* Output 3 */
+#define DIGIO_LED4 0x0010  /* Output 4 */
+#define DIGIO_LED5 0x0020  /* Output 5 */
+
+#define DIGIO_DRAWER1  0x0100  /* Output 8 */
+#define DIGIO_DRAWER2  0x0200  /* Output 9 */
+
+#define SERIAL_PORT_BASE   ((u_char *)CONFIG_SYS_CS2_START)
+
+#define PSC_OP1_RTS0x01
+#define PSC_OP0_RTS0x01
+
+/*
+ * Table with supported baudrates (defined in inka4x0.h)
+ */
+static const unsigned long baudrate_table[] = CONFIG_SYS_BAUDRATE_TABLE;
+#defineN_BAUDRATES (sizeof(baudrate_table) / sizeof(baudrate_table[0]))
+
+static unsigned int inka_digin_get_input(void)
+{
+   return in_8(GPIO_BASE + 0)  0 | in_8(GPIO_BASE + 1)  8

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

2009-03-25 Thread Detlev Zundel
Signed-off-by: Detlev Zundel d...@denx.de
Signed-off-by: Andreas Pfefferle a...@denx.de
---
 drivers/rtc/Makefile  |1 +
 drivers/rtc/rtc4543.c |  118 +
 include/rtc.h |4 ++
 3 files changed, 123 insertions(+), 0 deletions(-)
 create mode 100644 drivers/rtc/rtc4543.c

diff --git a/drivers/rtc/Makefile b/drivers/rtc/Makefile
index 94bc518..6adece2 100644
--- a/drivers/rtc/Makefile
+++ b/drivers/rtc/Makefile
@@ -55,6 +55,7 @@ COBJS-$(CONFIG_RTC_MPC8xx) += mpc8xx.o
 COBJS-$(CONFIG_RTC_PCF8563) += pcf8563.o
 COBJS-$(CONFIG_RTC_PL031) += pl031.o
 COBJS-$(CONFIG_RTC_RS5C372A) += rs5c372.o
+COBJS-$(CONFIG_RTC_RTC4543) += rtc4543.o
 COBJS-$(CONFIG_RTC_RX8025) += rx8025.o
 COBJS-$(CONFIG_RTC_S3C24X0) += s3c24x0_rtc.o
 COBJS-$(CONFIG_RTC_X1205) += x1205.o
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 @@
+/*
+ * (C) Copyright 2008, 2009
+ * Andreas Pfefferle, DENX Software Engineering, a...@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 asm/io.h
+#include common.h
+#include command.h
+#include config.h
+#include bcd.h
+#include rtc.h
+#include tws.h
+
+#if defined(CONFIG_CMD_DATE)
+
+/*
+ * Note: The acrobatics below is due to the hideously ingenius idea of
+ * the chip designers.  As the chip does not allow register
+ * addressing, all values need to be read and written in one go.  Sure
+ * enough, the 'wday' field (0-6) is transferred using the economic
+ * number of 4 bits right in the middle of the packet.
+ */
+
+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);
+   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;
+   tm-tm_yday = 0;
+   tm-tm_isdst = 0;
+
+   if (tm-tm_sec  0x80) {
+   puts(### Warning: RTC Low Voltage - date/time not reliable\n);
+   rel = -1;
+   }
+
+   debug(Get DATE: %4d-%02d-%02d (wday=%d)  TIME: %2d:%02d:%02d\n,
+   tm-tm_year, tm-tm_mon, tm-tm_mday, tm-tm_wday,
+   tm-tm_hour, tm-tm_min, tm-tm_sec);
+
+   return rel;
+}
+
+int rtc_set(struct rtc_time *tm)
+{
+   uchar buffer[7];
+   uchar tmp;
+
+   debug(Set DATE: %4d-%02d-%02d (wday=%d)  TIME: %2d:%02d:%02d\n,
+   tm-tm_year, tm-tm_mon, tm-tm_mday, tm-tm_wday,
+   tm-tm_hour, tm-tm_min, tm-tm_sec);
+
+   memset(buffer, 0, 7);
+   buffer[0] = BIN2BCD(tm-tm_sec);
+   buffer[1] = BIN2BCD(tm-tm_min);
+   buffer[2] = BIN2BCD(tm-tm_hour);
+   buffer[3] = BIN2BCD(tm-tm_wday);
+   tmp = BIN2BCD(tm-tm_mday);
+   buffer[3] |= (tmp  0x0F)  4;
+   buffer[4] =  (tmp  0xF0)  4;
+   tmp = BIN2BCD(tm-tm_mon);
+   buffer[4] |= (tmp  0x0F)  4;
+   buffer[5] =  (tmp  0xF0)  4;
+   tmp = BIN2BCD(tm-tm_year  % 100);
+   buffer[5] |= (tmp  0x0F)  4;
+   buffer[6] =  (tmp  0xF0)  4;
+
+   /* Write the resulting 52 bits to device */
+   tws_write(buffer, 52);
+
+   return 0;
+}
+
+void rtc_reset(void)
+{
+   struct rtc_time tmp;
+
+   tmp.tm_sec = 0;
+   tmp.tm_min = 0;
+   tmp.tm_hour = 0;
+   tmp.tm_wday = 4;
+   tmp.tm_mday = 1;
+   tmp.tm_mon = 1;
+   tmp.tm_year = 2000;
+   rtc_set(tmp);
+}
+
+#endif
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

[U-Boot] [PATCH v2 7/7] inka4x0: Use proper accessor macros for memory mapped registers.

2009-03-25 Thread Detlev Zundel
Signed-off-by: Detlev Zundel d...@denx.de
---
 board/inka4x0/inka4x0.c |  139 +--
 1 files changed, 75 insertions(+), 64 deletions(-)

diff --git a/board/inka4x0/inka4x0.c b/board/inka4x0/inka4x0.c
index a8bc3b3..7428b92 100644
--- a/board/inka4x0/inka4x0.c
+++ b/board/inka4x0/inka4x0.c
@@ -55,41 +55,35 @@
 #ifndef CONFIG_SYS_RAMBOOT
 static void sdram_start (int hi_addr)
 {
+   volatile struct mpc5xxx_sdram *sdram =
+   (struct mpc5xxx_sdram *)MPC5XXX_SDRAM;
long hi_addr_bit = hi_addr ? 0x0100 : 0;
 
/* unlock mode register */
-   *(vu_long *)MPC5XXX_SDRAM_CTRL = SDRAM_CONTROL | 0x8000 | 
hi_addr_bit;
-   __asm__ volatile (sync);
+   out_be32(sdram-ctrl, SDRAM_CONTROL | 0x8000 | hi_addr_bit);
 
/* precharge all banks */
-   *(vu_long *)MPC5XXX_SDRAM_CTRL = SDRAM_CONTROL | 0x8002 | 
hi_addr_bit;
-   __asm__ volatile (sync);
+   out_be32(sdram-ctrl, SDRAM_CONTROL | 0x8002 | hi_addr_bit);
 
 #if SDRAM_DDR
/* set mode register: extended mode */
-   *(vu_long *)MPC5XXX_SDRAM_MODE = SDRAM_EMODE;
-   __asm__ volatile (sync);
+   out_be32(sdram-mode, SDRAM_EMODE);
 
/* set mode register: reset DLL */
-   *(vu_long *)MPC5XXX_SDRAM_MODE = SDRAM_MODE | 0x0400;
-   __asm__ volatile (sync);
+   out_be32(sdram-mode, SDRAM_MODE | 0x0400);
 #endif
 
/* precharge all banks */
-   *(vu_long *)MPC5XXX_SDRAM_CTRL = SDRAM_CONTROL | 0x8002 | 
hi_addr_bit;
-   __asm__ volatile (sync);
+   out_be32(sdram-ctrl, SDRAM_CONTROL | 0x8002 | hi_addr_bit);
 
/* auto refresh */
-   *(vu_long *)MPC5XXX_SDRAM_CTRL = SDRAM_CONTROL | 0x8004 | 
hi_addr_bit;
-   __asm__ volatile (sync);
+   out_be32(sdram-ctrl, SDRAM_CONTROL | 0x8004 | hi_addr_bit);
 
/* set mode register */
-   *(vu_long *)MPC5XXX_SDRAM_MODE = SDRAM_MODE;
-   __asm__ volatile (sync);
+   out_be32(sdram-mode, SDRAM_MODE);
 
/* normal operation */
-   *(vu_long *)MPC5XXX_SDRAM_CTRL = SDRAM_CONTROL | hi_addr_bit;
-   __asm__ volatile (sync);
+   out_be32(sdram-ctrl, SDRAM_CONTROL | hi_addr_bit);
 }
 #endif
 
@@ -101,24 +95,27 @@ static void sdram_start (int hi_addr)
 
 phys_size_t initdram (int board_type)
 {
+   volatile struct mpc5xxx_mmap_ctl *mm =
+   (struct mpc5xxx_mmap_ctl *) CONFIG_SYS_MBAR;
+   volatile struct mpc5xxx_cdm *cdm =
+   (struct mpc5xxx_cdm *)  MPC5XXX_CDM;
+   volatile struct mpc5xxx_sdram *sdram =
+   (struct mpc5xxx_sdram *)MPC5XXX_SDRAM;
ulong dramsize = 0;
 #ifndef CONFIG_SYS_RAMBOOT
long test1, test2;
 
/* setup SDRAM chip selects */
-   *(vu_long *)MPC5XXX_SDRAM_CS0CFG = 0x001c; /* 512MB at 0x0 */
-   *(vu_long *)MPC5XXX_SDRAM_CS1CFG = 0x4000; /* disabled */
-   __asm__ volatile (sync);
+   out_be32(mm-sdram0, 0x001c);  /* 512MB at 0x0 */
+   out_be32(mm-sdram1, 0x4000);  /* disabled */
 
/* setup config registers */
-   *(vu_long *)MPC5XXX_SDRAM_CONFIG1 = SDRAM_CONFIG1;
-   *(vu_long *)MPC5XXX_SDRAM_CONFIG2 = SDRAM_CONFIG2;
-   __asm__ volatile (sync);
+   out_be32(sdram-config1, SDRAM_CONFIG1);
+   out_be32(sdram-config2, SDRAM_CONFIG2);
 
 #if SDRAM_DDR
/* set tap delay */
-   *(vu_long *)MPC5XXX_CDM_PORCFG = SDRAM_TAPDELAY;
-   __asm__ volatile (sync);
+   out_be32(cdm-porcfg, SDRAM_TAPDELAY);
 #endif
 
/* find RAM size using SDRAM CS0 only */
@@ -140,17 +137,17 @@ phys_size_t initdram (int board_type)
 
/* set SDRAM CS0 size according to the amount of RAM found */
if (dramsize  0) {
-   *(vu_long *)MPC5XXX_SDRAM_CS0CFG = 0x13 +
-   __builtin_ffs(dramsize  20) - 1;
+   out_be32(mm-sdram0, 0x13 +
+__builtin_ffs(dramsize  20) - 1);
} else {
-   *(vu_long *)MPC5XXX_SDRAM_CS0CFG = 0; /* disabled */
+   out_be32(mm-sdram0, 0); /* disabled */
}
 
-   *(vu_long *)MPC5XXX_SDRAM_CS1CFG = dramsize; /* disabled */
+   out_be32(mm-sdram1, dramsize); /* disabled */
 #else /* CONFIG_SYS_RAMBOOT */
 
/* retrieve size of memory connected to SDRAM CS0 */
-   dramsize = *(vu_long *)MPC5XXX_SDRAM_CS0CFG  0xFF;
+   dramsize = in_be32(mm-sdram0)  0xFF;
if (dramsize = 0x13) {
dramsize = (1  (dramsize - 0x13))  20;
} else {
@@ -169,13 +166,15 @@ int checkboard (void)
 
 void flash_preinit(void)
 {
+   volatile struct mpc5xxx_lpb *lpb = (struct mpc5xxx_lpb *)MPC5XXX_LPB;
+
/*
 * Now, when we are in RAM, enable flash write
 * access for detection process.
-* Note that CS_BOOT cannot be cleared when
+* Note that CS_BOOT (CS0) cannot be cleared when
 * executing in flash

Re: [U-Boot] [PATCH v2 0/7] Update for inka4x0 plus some new features

2009-03-25 Thread Detlev Zundel
Detlev Zundel d...@denx.de writes:

 A diff of the before and after branches will be posted seperately
 for easier inspection.

As promised attached the diff before - after.

Cheers
  Detlev

-- 
C hasn't changed much since the 1970s. And let's face it it's ugly.
Can't we do better? C++? (Sorry, never mind.)
-- Rob Pike
--
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
diff --git a/board/inka4x0/inka4x0.c b/board/inka4x0/inka4x0.c
index 2ef770b..7428b92 100644
--- a/board/inka4x0/inka4x0.c
+++ b/board/inka4x0/inka4x0.c
@@ -55,7 +55,8 @@
 #ifndef CONFIG_SYS_RAMBOOT
 static void sdram_start (int hi_addr)
 {
-	struct mpc5xxx_sdram *sdram = (struct mpc5xxx_sdram *)MPC5XXX_SDRAM;
+	volatile struct mpc5xxx_sdram *sdram =
+		(struct mpc5xxx_sdram *)MPC5XXX_SDRAM;
 	long hi_addr_bit = hi_addr ? 0x0100 : 0;
 
 	/* unlock mode register */
@@ -94,9 +95,12 @@ static void sdram_start (int hi_addr)
 
 phys_size_t initdram (int board_type)
 {
-	struct mpc5xxx_mmap_ctl *mm = (struct mpc5xxx_mmap_ctl *) CONFIG_SYS_MBAR;
-	struct mpc5xxx_cdm *cdm = (struct mpc5xxx_cdm *)  MPC5XXX_CDM;
-	struct mpc5xxx_sdram *sdram = (struct mpc5xxx_sdram *)MPC5XXX_SDRAM;
+	volatile struct mpc5xxx_mmap_ctl *mm =
+		(struct mpc5xxx_mmap_ctl *) CONFIG_SYS_MBAR;
+	volatile struct mpc5xxx_cdm *cdm =
+		(struct mpc5xxx_cdm *)  MPC5XXX_CDM;
+	volatile struct mpc5xxx_sdram *sdram =
+		(struct mpc5xxx_sdram *)MPC5XXX_SDRAM;
 	ulong dramsize = 0;
 #ifndef CONFIG_SYS_RAMBOOT
 	long test1, test2;
@@ -162,7 +166,7 @@ int checkboard (void)
 
 void flash_preinit(void)
 {
-	struct mpc5xxx_lpb *lpb = (struct mpc5xxx_lpb *)MPC5XXX_LPB;
+	volatile struct mpc5xxx_lpb *lpb = (struct mpc5xxx_lpb *)MPC5XXX_LPB;
 
 	/*
 	 * Now, when we are in RAM, enable flash write
@@ -175,18 +179,21 @@ void flash_preinit(void)
 
 int misc_init_r (void) {
 	extern int inkadiag_init_r (void);
+
 	/*
-	  * The command table used for the subcommands of inkadiag
-	  * needs to be relocated manually.
-	  */
+	 * The command table used for the subcommands of inkadiag
+	 * needs to be relocated manually.
+	 */
 	return inkadiag_init_r();
 }
 
 int misc_init_f (void)
 {
-	struct mpc5xxx_gpio	*gpio= (struct mpc5xxx_gpio *)   MPC5XXX_GPIO;
-	struct mpc5xxx_wu_gpio	*wu_gpio = (struct mpc5xxx_wu_gpio *)MPC5XXX_WU_GPIO;
-	struct mpc5xxx_gpt	*gpt;
+	volatile struct mpc5xxx_gpio	*gpio=
+		(struct mpc5xxx_gpio *)   MPC5XXX_GPIO;
+	volatile struct mpc5xxx_wu_gpio	*wu_gpio =
+		(struct mpc5xxx_wu_gpio *)MPC5XXX_WU_GPIO;
+	volatile struct mpc5xxx_gpt	*gpt;
 	char tmp[10];
 	int i, br;
 
@@ -272,7 +279,8 @@ void pci_init_board(void)
 
 void init_ide_reset (void)
 {
-	struct mpc5xxx_wu_gpio	*wu_gpio = (struct mpc5xxx_wu_gpio *)MPC5XXX_WU_GPIO;
+	volatile struct mpc5xxx_wu_gpio	*wu_gpio =
+		(struct mpc5xxx_wu_gpio *)MPC5XXX_WU_GPIO;
 
 	debug (init_ide_reset\n);
 
@@ -285,7 +293,8 @@ void init_ide_reset (void)
 
 void ide_set_reset (int idereset)
 {
-	struct mpc5xxx_wu_gpio	*wu_gpio = (struct mpc5xxx_wu_gpio *)MPC5XXX_WU_GPIO;
+	volatile struct mpc5xxx_wu_gpio	*wu_gpio =
+		(struct mpc5xxx_wu_gpio *)MPC5XXX_WU_GPIO;
 
 	debug (ide_reset(%d)\n, idereset);
 
diff --git a/board/inka4x0/inkadiag.c b/board/inka4x0/inkadiag.c
index bdbf652..06c9807 100644
--- a/board/inka4x0/inkadiag.c
+++ b/board/inka4x0/inkadiag.c
@@ -31,7 +31,11 @@
 
 #include command.h
 
-#define GPIO_BASE  (u_char *)0x3040
+/* This is needed for the includes in ns16550.h */
+#define CONFIG_SYS_NS16550_REG_SIZE 1
+#include ns16550.h
+
+#define GPIO_BASE		((u_char *)CONFIG_SYS_CS3_START)
 
 #define DIGIN_TOUCHSCR_MASK	0x3000	/* Inputs 12-13 */
 #define DIGIN_KEYB_MASK		0x0001	/* Input 16 */
@@ -49,31 +53,8 @@
 #define DIGIO_DRAWER1		0x0100	/* Output 8 */
 #define DIGIO_DRAWER2		0x0200	/* Output 9 */
 
-#define SERIAL_PORT_BASE	(u_char *)0x8000
-
-#define UART_RX		0	/* In:  Receive buffer (DLAB=0) */
-#define UART_TX		0	/* Out: Transmit buffer (DLAB=0) */
-#define UART_DLL	0	/* Out: Divisor Latch Low (DLAB=1) */
-
-#define UART_LCR	3	/* Out: Line Control Register */
-#define UART_MCR	4	/* Out: Modem Control Register */
-
-#define UART_LSR	5	/* In:  Line Status Register */
-#define UART_MSR	6	/* In:  Modem Status Register */
+#define SERIAL_PORT_BASE	((u_char *)CONFIG_SYS_CS2_START)
 
-#define UART_LCR_WLEN8  0x03	/* Wordlength: 8 bits */
-#define UART_LCR_DLAB	0x80	/* Divisor latch access bit */
-
-#define UART_LSR_THRE	0x20	/* Transmit-hold-register empty */
-#define UART_LSR_DR	0x01	/* Receiver data ready */
-
-#define UART_MCR_LOOP	0x10	/* Enable loopback test mode */
-#define UART_MCR_RTS	0x02	/* RTS complement */
-#define UART_MCR_DTR	0x01	/* DTR complement */
-
-#define UART_MSR_DCD	0x80	/* Data Carrier Detect */
-#define UART_MSR_DSR	0x20	/* Data Set Ready */
-#define

Re: [U-Boot] Board Support for Quantum (Eurotech Ltd)

2009-03-25 Thread Detlev Zundel
Hi Andreas,

 I need U-Boot support for the Quantum Board (XScale PXA270 CPU) from
 EuroTech Ltd. Does anybody know if it exist a patch for this board? In the
 U-Boot configs is a patch for a Quantum board, but I think this is for
 another one.

In include/configs/quantum.h:

#define CONFIG_MPC850   1   /* This is a MPC850 CPU */

So this is indeed not what you are looking for.

If I grep for PXA in the same directory I also cannot find something
resembling what you are looking for, so I'm sorry I cannot help you.

Cheers
  Detlev

-- 
A zen-buddhist walked into a pizza shop and
said, Make me one with everything.
--
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] inka4x0: Add hardware diagnosis functions for inka4x0

2009-03-25 Thread Detlev Zundel
Hi Anatolij,

 Hi Detlev,

 Detlev Zundel wrote:
 This patch adds advanced diagnosis functions for the inka4x0 board.
 
 Signed-off-by: Andreas Pfefferle a...@denx.de
 Signed-off-by: Detlev Zundel a...@denx.de

 Something went wrong here, duplicated e-mail address from
 Andreas in your SoB. Also please see some style comments below.

Yes indeed, something went wrong here ;)  Thanks for catching this.
Actually I *knew* there was a problem because the automatically
generated coverletter had Andreas the originator of one of the patches
which I believed was markes as mine.  I simply didn't see it.  Thanks
for catching this!

 diff --git a/board/inka4x0/inkadiag.c b/board/inka4x0/inkadiag.c
 new file mode 100644
 index 000..bdbf652
 --- /dev/null
 +++ b/board/inka4x0/inkadiag.c
 ...
 +
 +static void inka_digio_set_output(unsigned int state, int which)
 +{
 +if (which == 0) {
 +/* other */
 +CHECK_LED(0);
 +CHECK_LED(1);
 +CHECK_LED(2);
 +CHECK_LED(3);
 +CHECK_LED(4);
 +CHECK_LED(5);
 +} else {
 +struct mpc5xxx_gpio *gpio = (struct mpc5xxx_gpio *)MPC5XXX_GPIO;
 +if (which == 1) {

 maybe we should add blank line before 'if' statement here?

To be honest - I don't care. Fixed.

 ...
 +static void ser_putc(volatile struct mpc5xxx_psc *psc, const char c)
 +{
 +/* Wait 1 second for last character to go. */
 +int i = 0;
 +while (!(psc-psc_status  PSC_SR_TXEMP)  (i++  100/10))

 add blank line before while().

As you wish.

 ...
 +static int ser_getc(volatile struct mpc5xxx_psc *psc)
 +{
 +/* Wait for a character to arrive. */
 +int i = 0;
 +while (!(psc-psc_status  PSC_SR_RXRDY)  (i++  100/10))
 +udelay(10);

 add blank line before while().

Sure we do.

 ...
 +U_BOOT_CMD(inkadiag, 6, 1, do_inkadiag,
 +   inkadiag - inka diagnosis\n,
 +   [inkadiag what ...]\n
 +   - perform a diagnosis on inka hardware\n
 +   'inkadiag' performs hardware tests.\n\n);
 +
 +/* Relocate the command table functino pointers when running in RAM */

 Typo, s/functino/function/

Ah, thanks!

 +int inkadiag_init_r (void) {
 +cmd_tbl_t *cmdtp;
 +
 +for (cmdtp = cmd_inkadiag_sub[0]; cmdtp !=
 + cmd_inkadiag_sub[ARRAY_SIZE(cmd_inkadiag_sub)]; cmdtp++) {
 +ulong addr;
 +addr = (ulong) (cmdtp-cmd) + gd-reloc_off;

 add blank line after declaration.

Fixed.

Thanks for taking the time to look over it!

Cheers
  Detlev

-- 
If you currently have a 32-bit UNIX system, you are advised to
trade it in for a 64-bit one sometime before the year 2106.
 -- Andrew S. Tanenbaum: Modern Operating Systems, 2nd Edition
--
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] inka4x0: Add hardware diagnosis and RTC in configuration.

2009-03-25 Thread Detlev Zundel
Hi Wolfgang,

 Dear Detlev Zundel,

 In message 1237914158-15693-7-git-send-email-...@denx.de you wrote:
 This patch adds the board specific communication routines needed by
 the external 4543 RTC.
 
 Signed-off-by: Detlev Zundel a...@denx.de
 Signed-off-by: Andreas Pfefferle a...@denx.de
 ...
 @@ -235,6 +238,23 @@ int misc_init_f (void)
  *(vu_long *) MPC5XXX_WU_GPIO_ENABLE |= GPIO_PSC3_9;
  *(vu_long *) MPC5XXX_WU_GPIO_DIR|= GPIO_PSC3_9;
  *(vu_long *) MPC5XXX_WU_GPIO_DATA_O   |= GPIO_PSC3_9;

 You don't want to fix the missing accessor functions here, do you? ;-)

Oh I do - actually, I did - please check my later posting inka4x0: Use
proper accessor macros for memory mapped registers.

Cheers
  Detlev

-- 
Q: What do you get when you cross an elephant and a banana?
A: |elephant| * |banana| * sin(theta)
--
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] inka4x0: Add hardware diagnosis functions for inka4x0

2009-03-25 Thread Detlev Zundel
Hi Heiko,

 +#define GPIO_BASE  (u_char *)0x3040
   

 should be

 #define GPIO_BASE  (u_char *)CONFIG_SYS_CS3_START

Fixed, thanks.

 +#define SERIAL_PORT_BASE(u_char *)0x8000
   

 this should be

 #define SERIAL_PORT_BASE  (u_char *)CONFIG_SYS_CS2_START

Fixed, thanks.


[...]

 +#define UART_MSR_DCD0x80/* Data Carrier Detect */
 +#define UART_MSR_DSR0x20/* Data Set Ready */
 +#define UART_MSR_CTS0x10/* Clear to Send */
   

 Are this not common 16xxx UART registers? If so, I think, they
 should go in include/ns16550.h ...

Ok, done.

I'm glad I posted this series of patches again with my name added.  On
the previous posting, the code unfortunately did not get this quality
review ;)

Cheers
  Detlev

-- 
Wenn ein Kopf und ein Buch zusammenstossen und es klingt hohl; ist
denn das allemal im Buche?
   - Lichtenberg
--
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] inka4x0: Add hardware diagnosis functions for inka4x0

2009-03-25 Thread Detlev Zundel
Hi Wolfgang,

 Dear Heiko  Detlev,

 In message 49c91e04.2020...@denx.de you wrote:
 ...
  +#define GPIO_BASE  (u_char *)0x3040

 
 should be
 
 #define GPIO_BASE  (u_char *)CONFIG_SYS_CS3_START

 or
   #define GPIO_BASE  ((u_char *)CONFIG_SYS_CS3_START)
 ?

  +#define SERIAL_PORT_BASE  (u_char *)0x8000

 
 this should be
 
 #define SERIAL_PORT_BASE (u_char *)CONFIG_SYS_CS2_START

 or
   #define SERIAL_PORT_BASE((u_char *)CONFIG_SYS_CS2_START)
 ? 

Yes, I agree.

Thanks
  Detlev

-- 
Ftpd never switches uid and euid, it uses setfsuid(2) instead. The
main reason is that uid switching has been exploited in several
breakins, but the sheer ugliness of uid switching counts too.
 -- pure-ftpd(8)
--
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] inka4x0: Add hardware diagnosis functions for inka4x0

2009-03-25 Thread Detlev Zundel
Hi Wolfgang,

 Dear Detlev Zundel,

 In message 1237914158-15693-6-git-send-email-...@denx.de you wrote:
 This patch adds advanced diagnosis functions for the inka4x0 board.
 
 Signed-off-by: Andreas Pfefferle a...@denx.de
 Signed-off-by: Detlev Zundel a...@denx.de
 ...
 +extern int inkadiag_init_r (void);
 +/*
 +  * The command table used for the subcommands of inkadiag
 +  * needs to be relocated manually.
 +  */

 Incorrect multiline comment style?

Nothing escapes the eye of an eagle ;)

 +}
 +
  int misc_init_f (void)
  {
  char tmp[10];
 diff --git a/board/inka4x0/inkadiag.c b/board/inka4x0/inkadiag.c
 new file mode 100644
 index 000..bdbf652
 ...
 +#define LED_HIGH(NUM) \
 +do { \
 +out_be32((unsigned *)MPC5XXX_GPT##NUM##_ENABLE, \
 + in_be32((unsigned *)MPC5XXX_GPT##NUM##_ENABLE) | 0x10); \
 +} while (0)

 Please use:

   setbits_be32 ((unsigned *)MPC5XXX_GPT##NUM##_ENABLE,  0x10); 

 instead (and so on in the rest of the code).

Done.

 +struct mpc5xxx_gpio *gpio = (struct mpc5xxx_gpio *)MPC5XXX_GPIO;
 +if (which == 1) {
 +/* drawer1 */
 +if (state) {
 +gpio-simple_dvo = ~0x1000;
 +udelay(1);
 +gpio-simple_dvo |= 0x1000;
 +} else {
 +gpio-simple_dvo |= 0x1000;
 +udelay(1);
 +gpio-simple_dvo = ~0x1000;
 +}
 +}
 +if (which == 2) {
 +/* drawer 2 */
 +if (state) {
 +gpio-simple_dvo = ~0x2000;
 +udelay(1);
 +gpio-simple_dvo |= 0x2000;
 +} else {
 +gpio-simple_dvo |= 0x2000;
 +udelay(1);
 +gpio-simple_dvo = ~0x2000;

 Please use accessor functions to write to I/O ports.

Fixed.

 +static int ser_init(volatile struct mpc5xxx_psc *psc, int baudrate)
 +{
 +unsigned long baseclk;
 +int div;
 +
 +/* reset PSC */
 +psc-command = PSC_SEL_MODE_REG_1;

 Should we not use accessor function to access the device registers
 (here and in the following code) ?

Indeed we should.  But here we go, I can understand, why this wasn't
done the first time around.  The new code looks like this:

/* reset PSC */
out_8(psc-command, PSC_SEL_MODE_REG_1);

/* select clock sources */

out_be16(psc-psc_clock_select, 0);
baseclk = (gd-ipb_clk + 16) / 32;

/* switch to UART mode */
out_be32(psc-sicr, 0);

/* configure parity, bit length and so on */

out_8(psc-mode, PSC_MODE_8_BITS | PSC_MODE_PARNONE);
out_8(psc-mode, PSC_MODE_ONE_STOP);

/* set up UART divisor */
div = (baseclk + (baudrate / 2)) / baudrate;
out_8(psc-ctur, (div  8)  0xff);
out_8(psc-ctlr, div  0xff);

/* disable all interrupts */
out_be16(psc-psc_imr, 0);

/* reset and enable Rx/Tx */
out_8(psc-command, PSC_RST_RX);
out_8(psc-command, PSC_RST_TX);
out_8(psc-command, PSC_RX_ENABLE | PSC_TX_ENABLE);


Look at the wonderful mix of out_{8,be16,be32}.  What a heart refreshing
break from the monotonic coding routine :(

Actully this is due to to mpc5xxx.h:

struct mpc5xxx_psc {
volatile u8 mode;   /* PSC + 0x00 */
volatile u8 reserved0[3];
union { /* PSC + 0x04 */
volatile u16status;
volatile u16clock_select;
} sr_csr;
#define psc_status  sr_csr.status
#define psc_clock_select sr_csr.clock_select
volatile u16reserved1;
volatile u8 command;/* PSC + 0x08 */
volatile u8 reserved2[3];
union { /* PSC + 0x0c */
volatile u8 buffer_8;
volatile u16buffer_16;
volatile u32buffer_32;
} buffer;
#define psc_buffer_8buffer.buffer_8
#define psc_buffer_16   buffer.buffer_16
#define psc_buffer_32   buffer.buffer_32
union { /* PSC + 0x10 */
volatile u8 ipcr;
volatile u8 acr;
} ipcr_acr;
#define psc_ipcripcr_acr.ipcr
#define psc_acr ipcr_acr.acr
volatile u8 reserved3[3];
union { /* PSC + 0x14 */
volatile u16isr;
volatile u16imr;
} isr_imr;


Git-blame points the finger to someone called 'wd'.  Maybe he knows
about the advantages of such structure definitions?  

On second check the corresponding header file in Linux (mpc52xx_uart.h) has
stuff like this introduced by Kumar Gala, maybe he

Re: [U-Boot] [PATCH v1 0/7] Update for inka4x0 plus some new features

2009-03-25 Thread Detlev Zundel
Hi Wolfgang,

 Dear Detlev Zundel,

 In message 1237914158-15693-1-git-send-email-...@denx.de you wrote:
 This patchset contains updates for the ink4x0 platform.  Namely it
 adds hardware diagnostic funtions and an RTC driver.

 It would have been nice if your patches gave *any* hint about the
 order they in which they should be applied...

 Can you please provide something like a sequence file or so?

Aah, big operator trouble.  Regenerating the patch series, without the
(already written cover letter, I inadvertently forgot -n for
git-format-patch, which escaped my attention as the cover-letter from
the previous version indeed *was* numbered :(

Will fix in next round.

Cheers
  Detlev

-- 
Less talking -- more hacking
-- Olin Shivers
--
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] inka4x0: Add hardware diagnosis and RTC in configuration.

2009-03-25 Thread Detlev Zundel
Hi Wolfgang,

 Dear Detlev Zundel,

 In message m23ad2rmh2@ohwell.denx.de you wrote:
 
  @@ -235,6 +238,23 @@ int misc_init_f (void)
*(vu_long *) MPC5XXX_WU_GPIO_ENABLE |= GPIO_PSC3_9;
*(vu_long *) MPC5XXX_WU_GPIO_DIR|= GPIO_PSC3_9;
*(vu_long *) MPC5XXX_WU_GPIO_DATA_O   |= GPIO_PSC3_9;
 
  You don't want to fix the missing accessor functions here, do you? ;-)
 
 Oh I do - actually, I did - please check my later posting inka4x0: Use
 proper accessor macros for memory mapped registers.

From the reviewing point of view it would have been easier if that
 other patch would have come earlier in the sequence. As is, it is
 really difficult to see if the lines above are included in your other
 patch, or if they might have been missed. Keep in mind that reviewing
 is a sequential process...

I know.  Software development is *also* a sequential process.  It was of
course only by the time that I had introduced the new stuff that I saw
what else needs to be fixed.  So the order does indeed reflect my
work-flow.  I honestly did not even think about re-ordering these
patches because of your considerations.  Is it written somewhere that I
have to fix all existing problems first before I get to add new stuff?
;)

 But OK, from the end result it makes no difference.

Well, if one uses a threaded news reader, one might have seen the
summaries of all patches before actually diving in...

Cheers
  Detlev

-- 
Lotus Notes (GUI):   Run away from it.
   -- linux/Documentation/email-clients.txt
--
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] drivers/twserial: Add protocol driver for three wire serial interface.

2009-03-25 Thread Detlev Zundel
Hi Wolfgang,

 Dear Detlev Zundel,

 In message 1237914158-15693-4-git-send-email-...@denx.de you wrote:
 This pretty unintelligent interface is used on some RTC chips.
 
 Signed-off-by: Detlev Zundel d...@denx.de
 ...
 +#ifndef TWS_SOFT_DECLARATIONS
 +# if defined(CONFIG_MPC5xxx)
 +#  define TWS_SOFT_DECLARATIONS volatile ioport_t *iop = 
 ioport_addr((immap_t *)CONFIG_SYS_IMMR, I2C_PORT);

 Line too long.

Fixed.

Thanks
  Detlev

-- 
Paul Simon sang Fifty Ways to Lose Your Lover, because quite
frankly, A Million Ways to Tell a Developer He Is a D*ckhead
doesn't scan nearly as well.  But I'm sure he thought about it.
-- linux/Documentation/ManagementStyle
--
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] mpc5xxx: Add structure definition for several more register blocks.

2009-03-24 Thread Detlev Zundel
Signed-off-by: Detlev Zundel d...@denx.de
---
 include/mpc5xxx.h |  124 +
 1 files changed, 124 insertions(+), 0 deletions(-)

diff --git a/include/mpc5xxx.h b/include/mpc5xxx.h
index 6138d45..463d5ae 100644
--- a/include/mpc5xxx.h
+++ b/include/mpc5xxx.h
@@ -30,6 +30,8 @@
 #ifndef __ASMPPC_MPC5XXX_H
 #define __ASMPPC_MPC5XXX_H
 
+#include asm/types.h
+
 /* Processor name */
 #if defined(CONFIG_MPC5200)
 #define CPU_ID_STR MPC5200
@@ -217,6 +219,12 @@
 #define MPC5XXX_GPIO_SIMPLE_PSC1_1   0x0002UL
 #define MPC5XXX_GPIO_SIMPLE_PSC1_0   0x0001UL
 
+#define MPC5XXX_GPIO_SINT_ETH_16 0x80
+#define MPC5XXX_GPIO_SINT_ETH_15 0x40
+#define MPC5XXX_GPIO_SINT_ETH_14 0x20
+#define MPC5XXX_GPIO_SINT_ETH_13 0x10
+#define MPC5XXX_GPIO_SINT_USB1_9 0x08
+#define MPC5XXX_GPIO_SINT_PSC3_8 0x04
 #define MPC5XXX_GPIO_SINT_PSC3_5 0x02
 #define MPC5XXX_GPIO_SINT_PSC3_4 0x01
 
@@ -454,6 +462,99 @@
   IORDY protocol */
 
 #ifndef __ASSEMBLY__
+/* Memory map registers */
+struct mpc5xxx_mmap_ctl {
+   volatile u32mbar;
+   volatile u32cs0_start;  /* 0x0004 */
+   volatile u32cs0_stop;
+   volatile u32cs1_start;  /* 0x000c */
+   volatile u32cs1_stop;
+   volatile u32cs2_start;  /* 0x0014 */
+   volatile u32cs2_stop;
+   volatile u32cs3_start;  /* 0x001c */
+   volatile u32cs3_stop;
+   volatile u32cs4_start;  /* 0x0024 */
+   volatile u32cs4_stop;
+   volatile u32cs5_start;  /* 0x002c */
+   volatile u32cs5_stop;
+#if defined(CONFIG_MGT5100)
+   volatile u32sdram_start;/* 0x0034 */
+   volatile u32sdram_stop; /* 0x0038 */
+   volatile u32pci1_start; /* 0x003c */
+   volatile u32pci1_stop;  /* 0x0040 */
+   volatile u32pci2_start; /* 0x0044 */
+   volatile u32pci2_stop;  /* 0x0048 */
+#elif defined(CONFIG_MPC5200)
+   volatile u32sdram0; /* 0x0034 */
+   volatile u32sdram1; /* 0x0038 */
+   volatile u32dummy1[4];  /* 0x003c */
+#endif
+   volatile u32boot_start; /* 0x004c */
+   volatile u32boot_stop;
+#if defined(CONFIG_MGT5100)
+   volatile u32addecr; /* 0x0054 */
+#elif defined(CONFIG_MPC5200)
+   volatile u32ipbi_ws_ctrl;   /* 0x0054 */
+#endif
+#if defined(CONFIG_MPC5200)
+   volatile u32cs6_start;  /* 0x0058 */
+   volatile u32cs6_stop;
+   volatile u32cs7_start;  /* 0x0060 */
+   volatile u32cs7_stop;
+#endif
+};
+
+/* Clock distribution module */
+struct mpc5xxx_cdm {
+   volatile u32jtagid; /* 0x */
+   volatile u32porcfg;
+   volatile u32brdcrmb;/* 0x0008 */
+   volatile u32cfg;
+   volatile u32fourtyeight_fdc;/* 0x0010 */
+   volatile u32clock_enable;
+   volatile u32system_osc; /* 0x0018 */
+   volatile u32ccscr;
+   volatile u32sreset; /* 0x0020 */
+   volatile u32pll_status;
+   volatile u32psc1_mccr;  /* 0x0028 */
+   volatile u32psc2_mccr;
+   volatile u32psc3_mccr;  /* 0x0030 */
+   volatile u32psc6_mccr;
+};
+
+/* SDRAM controller */
+struct mpc5xxx_sdram {
+   volatile u32mode;
+   volatile u32ctrl;
+   volatile u32config1;
+   volatile u32config2;
+#if defined(CONFIG_MGT5100)
+   volatile u32xlbsel;
+   volatile u32dummy[31];
+#else
+   volatile u32dummy[32];
+#endif
+   volatile u32sdelay;
+};
+
+struct mpc5xxx_lpb {
+   volatile u32cs0_cfg;
+   volatile u32cs1_cfg;
+   volatile u32cs2_cfg;
+   volatile u32cs3_cfg;
+   volatile u32cs4_cfg;
+   volatile u32cs5_cfg;
+   volatile u32cs_ctrl;
+   volatile u32cs_status;
+#if defined(CONFIG_MPC5200)
+   volatile u32cs6_cfg;
+   volatile u32cs7_cfg;
+   volatile u32cs_burst;
+   volatile u32cs_deadcycle;
+#endif
+};
+
+
 struct mpc5xxx_psc {
volatile u8 mode;   /* PSC + 0x00 */
volatile u8 reserved0[3];
@@ -596,6 +697,29 @@ struct mpc5xxx_gpio {
volatile u8 reserved10; /* GPIO + 0x3f */
 };
 
+struct mpc5xxx_wu_gpio {
+   volatile u8 enable; /* WU_GPIO + 0x00 */
+   volatile u8 reserved1[3];   /* WU_GPIO + 0x01 */
+   volatile u8 ode;/* WU_GPIO + 0x04 */
+   volatile u8 reserved2[3];   /* WU_GPIO + 0x05 */
+   volatile u8 ddr;/* WU_GPIO + 0x08 */
+   volatile u8 reserved3[3];   /* WU_GPIO + 0x09 */
+   volatile u8 dvo;/* WU_GPIO + 0x0c */
+   volatile u8 reserved4[3];   /* WU_GPIO + 0x0d */
+   volatile u8 inten

[U-Boot] [PATCH v1 0/7] Update for inka4x0 plus some new features

2009-03-24 Thread Detlev Zundel
This patchset contains updates for the ink4x0 platform.  Namely it
adds hardware diagnostic funtions and an RTC driver.

For a nice integration by using private command tables, do_help is
extended to support this scenario also.

To successfully convert all the pointer access to accessor macros, a
bunch of new defines is also needed for the 5200 cpu.

Andreas Pfefferle (1):
  rtc: add support for 4543 RTC (manufactured by e.g. EPSON)

Detlev Zundel (6):
  command.c: Expose the core of do_help as _do_help to the rest of
u-boot.
  mpc5xxx: Add structure definition for several more register blocks.
  drivers/twserial: Add protocol driver for three wire serial
interface.
  inka4x0: Add hardware diagnosis functions for inka4x0
  inka4x0: Add hardware diagnosis and RTC in configuration.
  inka4x0: Use proper accessor macros for memory mapped registers.

 Makefile|3 +-
 board/inka4x0/Makefile  |4 +-
 board/inka4x0/inka4x0.c |  162 -
 board/inka4x0/inkadiag.c|  541 +++
 common/command.c|   20 +-
 drivers/rtc/Makefile|1 +
 drivers/rtc/rtc4543.c   |  118 ++
 drivers/twserial/Makefile   |   46 
 drivers/twserial/soft_tws.c |  110 +
 include/command.h   |4 +-
 include/configs/inka4x0.h   |   91 +++-
 include/mpc5xxx.h   |  124 ++
 include/rtc.h   |4 +
 include/tws.h   |   46 
 14 files changed, 1196 insertions(+), 78 deletions(-)
 create mode 100644 board/inka4x0/inkadiag.c
 create mode 100644 drivers/rtc/rtc4543.c
 create mode 100644 drivers/twserial/Makefile
 create mode 100644 drivers/twserial/soft_tws.c
 create mode 100644 include/tws.h

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


[U-Boot] [PATCH] inka4x0: Add hardware diagnosis functions for inka4x0

2009-03-24 Thread Detlev Zundel
This patch adds advanced diagnosis functions for the inka4x0 board.

Signed-off-by: Andreas Pfefferle a...@denx.de
Signed-off-by: Detlev Zundel a...@denx.de
---
 board/inka4x0/Makefile|4 +-
 board/inka4x0/inka4x0.c   |   19 ++-
 board/inka4x0/inkadiag.c  |  541 +
 include/configs/inka4x0.h |1 +
 4 files changed, 561 insertions(+), 4 deletions(-)
 create mode 100644 board/inka4x0/inkadiag.c

diff --git a/board/inka4x0/Makefile b/board/inka4x0/Makefile
index 442e2d0..82aa950 100644
--- a/board/inka4x0/Makefile
+++ b/board/inka4x0/Makefile
@@ -1,5 +1,5 @@
 #
-# (C) Copyright 2003-2006
+# (C) Copyright 2003-2009
 # Wolfgang Denk, DENX Software Engineering, w...@denx.de.
 #
 # See file CREDITS for list of people who contributed to this
@@ -25,7 +25,7 @@ include $(TOPDIR)/config.mk
 
 LIB= $(obj)lib$(BOARD).a
 
-COBJS  := $(BOARD).o
+COBJS  := $(BOARD).o inkadiag.o
 
 SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
 OBJS   := $(addprefix $(obj),$(COBJS))
diff --git a/board/inka4x0/inka4x0.c b/board/inka4x0/inka4x0.c
index 507196b..ea59db3 100644
--- a/board/inka4x0/inka4x0.c
+++ b/board/inka4x0/inka4x0.c
@@ -1,6 +1,9 @@
 /*
- * (C) Copyright 2003-2004
- * Wolfgang Denk, DENX Software Engineering, w...@denx.de.
+ * (C) Copyright 2008-2009
+ * Andreas Pfefferle, DENX Software Engineering, a...@denx.de.
+ *
+ * (C) Copyright 2009
+ * Detlev Zundel, DENX Software Engineering, d...@denx.de.
  *
  * (C) Copyright 2004
  * Mark Jonas, Freescale Semiconductor, mark.jo...@motorola.com.
@@ -8,6 +11,9 @@
  * (C) Copyright 2004
  * Martin Krause, TQ-Systems GmbH, martin.kra...@tqs.de
  *
+ * (C) Copyright 2003-2004
+ * Wolfgang Denk, DENX Software Engineering, w...@denx.de.
+ *
  * See file CREDITS for list of people who contributed to this
  * project.
  *
@@ -171,6 +177,15 @@ void flash_preinit(void)
*(vu_long *)MPC5XXX_BOOTCS_CFG = ~0x1; /* clear RO */
 }
 
+int misc_init_r (void) {
+   extern int inkadiag_init_r (void);
+   /*
+ * The command table used for the subcommands of inkadiag
+ * needs to be relocated manually.
+ */
+   return inkadiag_init_r();
+}
+
 int misc_init_f (void)
 {
char tmp[10];
diff --git a/board/inka4x0/inkadiag.c b/board/inka4x0/inkadiag.c
new file mode 100644
index 000..bdbf652
--- /dev/null
+++ b/board/inka4x0/inkadiag.c
@@ -0,0 +1,541 @@
+/*
+ * (C) Copyright 2008, 2009 Andreas Pfefferle,
+ * DENX Software Engineering, a...@denx.de.
+ * (C) Copyright 2009 Detlev Zundel,
+ * DENX Software Engineering, d...@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 asm/io.h
+#include common.h
+#include config.h
+#include mpc5xxx.h
+#include pci.h
+
+#include command.h
+
+#define GPIO_BASE  (u_char *)0x3040
+
+#define DIGIN_TOUCHSCR_MASK0x3000  /* Inputs 12-13 */
+#define DIGIN_KEYB_MASK0x0001  /* Input 16 */
+
+#define DIGIN_DRAWER_SW1   0x0040  /* Input 22 */
+#define DIGIN_DRAWER_SW2   0x0080  /* Input 23 */
+
+#define DIGIO_LED0 0x0001  /* Output 0 */
+#define DIGIO_LED1 0x0002  /* Output 1 */
+#define DIGIO_LED2 0x0004  /* Output 2 */
+#define DIGIO_LED3 0x0008  /* Output 3 */
+#define DIGIO_LED4 0x0010  /* Output 4 */
+#define DIGIO_LED5 0x0020  /* Output 5 */
+
+#define DIGIO_DRAWER1  0x0100  /* Output 8 */
+#define DIGIO_DRAWER2  0x0200  /* Output 9 */
+
+#define SERIAL_PORT_BASE   (u_char *)0x8000
+
+#define UART_RX0   /* In:  Receive buffer (DLAB=0) */
+#define UART_TX0   /* Out: Transmit buffer (DLAB=0) */
+#define UART_DLL   0   /* Out: Divisor Latch Low (DLAB=1) */
+
+#define UART_LCR   3   /* Out: Line Control Register */
+#define UART_MCR   4   /* Out: Modem Control Register */
+
+#define UART_LSR   5   /* In:  Line Status Register */
+#define UART_MSR   6   /* In:  Modem Status Register */
+
+#define UART_LCR_WLEN8  0x03   /* Wordlength: 8 bits */
+#define UART_LCR_DLAB  0x80/* Divisor latch access

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

2009-03-24 Thread Detlev Zundel
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(-)

diff --git a/common/command.c b/common/command.c
index 3b9ccc9..c9a3f5b 100644
--- a/common/command.c
+++ b/common/command.c
@@ -1,5 +1,5 @@
 /*
- * (C) Copyright 2000-2003
+ * (C) Copyright 2000-2009
  * Wolfgang Denk, DENX Software Engineering, w...@denx.de.
  *
  * See file CREDITS for list of people who contributed to this
@@ -233,20 +233,19 @@ U_BOOT_CMD(
  * Use puts() instead of printf() to avoid printf buffer overflow
  * for long help messages
  */
-int do_help (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
+
+int _do_help (cmd_tbl_t *cmd_start, int cmd_items, cmd_tbl_t * cmdtp, int
+ flag, int argc, char *argv[])
 {
int i;
int rcode = 0;
 
if (argc == 1) {/*show list of commands */
-
-   int cmd_items = __u_boot_cmd_end -
-   __u_boot_cmd_start;/* pointer arith! */
cmd_tbl_t *cmd_array[cmd_items];
int i, j, swaps;
 
/* Make array of commands from .uboot_cmd section */
-   cmdtp = __u_boot_cmd_start;
+   cmdtp = cmd_start;
for (i = 0; i  cmd_items; i++) {
cmd_array[i] = cmdtp++;
}
@@ -286,7 +285,7 @@ int do_help (cmd_tbl_t * cmdtp, int flag, int argc, char 
*argv[])
 * command help (long version)
 */
for (i = 1; i  argc; ++i) {
-   if ((cmdtp = find_cmd (argv[i])) != NULL) {
+   if ((cmdtp = find_cmd_tbl (argv[i], cmd_start, cmd_items )) != 
NULL) {
 #ifdef CONFIG_SYS_LONGHELP
/* found - print (long) help info */
puts (cmdtp-name);
@@ -313,6 +312,13 @@ int do_help (cmd_tbl_t * cmdtp, int flag, int argc, char 
*argv[])
return rcode;
 }
 
+int do_help (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
+{
+   return _do_help(__u_boot_cmd_start,
+   __u_boot_cmd_end - __u_boot_cmd_start,
+   cmdtp, flag, argc, argv);
+}
+
 
 U_BOOT_CMD(
help,   CONFIG_SYS_MAXARGS, 1,  do_help,
diff --git a/include/command.h b/include/command.h
index d7321af..bd47853 100644
--- a/include/command.h
+++ b/include/command.h
@@ -1,5 +1,5 @@
 /*
- * (C) Copyright 2000
+ * (C) Copyright 2000-2009
  * Wolfgang Denk, DENX Software Engineering, w...@denx.de.
  *
  * See file CREDITS for list of people who contributed to this
@@ -66,6 +66,8 @@ extern cmd_tbl_t  __u_boot_cmd_end;
 
 
 /* common/command.c */
+int _do_help (cmd_tbl_t *cmd_start, int cmd_items, cmd_tbl_t * cmdtp, int
+ flag, int argc, char *argv[]);
 cmd_tbl_t *find_cmd(const char *cmd);
 cmd_tbl_t *find_cmd_tbl (const char *cmd, cmd_tbl_t *table, int table_len);
 
-- 
1.6.0.6

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


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

2009-03-24 Thread Detlev Zundel
From: Andreas Pfefferle a...@denx.de

Signed-off-by: Detlev Zundel d...@denx.de
Signed-off-by: Andreas Pfefferle a...@denx.de
---
 drivers/rtc/Makefile  |1 +
 drivers/rtc/rtc4543.c |  118 +
 include/rtc.h |4 ++
 3 files changed, 123 insertions(+), 0 deletions(-)
 create mode 100644 drivers/rtc/rtc4543.c

diff --git a/drivers/rtc/Makefile b/drivers/rtc/Makefile
index 94bc518..6adece2 100644
--- a/drivers/rtc/Makefile
+++ b/drivers/rtc/Makefile
@@ -55,6 +55,7 @@ COBJS-$(CONFIG_RTC_MPC8xx) += mpc8xx.o
 COBJS-$(CONFIG_RTC_PCF8563) += pcf8563.o
 COBJS-$(CONFIG_RTC_PL031) += pl031.o
 COBJS-$(CONFIG_RTC_RS5C372A) += rs5c372.o
+COBJS-$(CONFIG_RTC_RTC4543) += rtc4543.o
 COBJS-$(CONFIG_RTC_RX8025) += rx8025.o
 COBJS-$(CONFIG_RTC_S3C24X0) += s3c24x0_rtc.o
 COBJS-$(CONFIG_RTC_X1205) += x1205.o
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 @@
+/*
+ * (C) Copyright 2008, 2009
+ * Andreas Pfefferle, DENX Software Engineering, a...@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 asm/io.h
+#include common.h
+#include command.h
+#include config.h
+#include bcd.h
+#include rtc.h
+#include tws.h
+
+#if defined(CONFIG_CMD_DATE)
+
+/*
+ * Note: The acrobatics below is due to the hideously ingenius idea of
+ * the chip designers.  As the chip does not allow register
+ * addressing, all values need to be read and written in one go.  Sure
+ * enough, the 'wday' field (0-6) is transferred using the economic
+ * number of 4 bits right in the middle of the packet.
+ */
+
+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);
+   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;
+   tm-tm_yday = 0;
+   tm-tm_isdst = 0;
+
+   if (tm-tm_sec  0x80) {
+   puts(### Warning: RTC Low Voltage - date/time not reliable\n);
+   rel = -1;
+   }
+
+   debug(Get DATE: %4d-%02d-%02d (wday=%d)  TIME: %2d:%02d:%02d\n,
+   tm-tm_year, tm-tm_mon, tm-tm_mday, tm-tm_wday,
+   tm-tm_hour, tm-tm_min, tm-tm_sec);
+
+   return rel;
+}
+
+int rtc_set(struct rtc_time *tm)
+{
+   uchar buffer[7];
+   uchar tmp;
+
+   debug(Set DATE: %4d-%02d-%02d (wday=%d)  TIME: %2d:%02d:%02d\n,
+   tm-tm_year, tm-tm_mon, tm-tm_mday, tm-tm_wday,
+   tm-tm_hour, tm-tm_min, tm-tm_sec);
+
+   memset(buffer, 0, 7);
+   buffer[0] = BIN2BCD(tm-tm_sec);
+   buffer[1] = BIN2BCD(tm-tm_min);
+   buffer[2] = BIN2BCD(tm-tm_hour);
+   buffer[3] = BIN2BCD(tm-tm_wday);
+   tmp = BIN2BCD(tm-tm_mday);
+   buffer[3] |= (tmp  0x0F)  4;
+   buffer[4] =  (tmp  0xF0)  4;
+   tmp = BIN2BCD(tm-tm_mon);
+   buffer[4] |= (tmp  0x0F)  4;
+   buffer[5] =  (tmp  0xF0)  4;
+   tmp = BIN2BCD(tm-tm_year  % 100);
+   buffer[5] |= (tmp  0x0F)  4;
+   buffer[6] =  (tmp  0xF0)  4;
+
+   /* Write the resulting 52 bits to device */
+   tws_write(buffer, 52);
+
+   return 0;
+}
+
+void rtc_reset(void)
+{
+   struct rtc_time tmp;
+
+   tmp.tm_sec = 0;
+   tmp.tm_min = 0;
+   tmp.tm_hour = 0;
+   tmp.tm_wday = 4;
+   tmp.tm_mday = 1;
+   tmp.tm_mon = 1;
+   tmp.tm_year = 2000;
+   rtc_set(tmp);
+}
+
+#endif
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

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

2009-03-24 Thread Detlev Zundel
This pretty unintelligent interface is used on some RTC chips.

Signed-off-by: Detlev Zundel d...@denx.de
---
 Makefile|3 +-
 drivers/twserial/Makefile   |   46 ++
 drivers/twserial/soft_tws.c |  110 +++
 include/tws.h   |   46 ++
 4 files changed, 204 insertions(+), 1 deletions(-)
 create mode 100644 drivers/twserial/Makefile
 create mode 100644 drivers/twserial/soft_tws.c
 create mode 100644 include/tws.h

diff --git a/Makefile b/Makefile
index 63b9909..7c37845 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,5 @@
 #
-# (C) Copyright 2000-2008
+# (C) Copyright 2000-2009
 # Wolfgang Denk, DENX Software Engineering, w...@denx.de.
 #
 # See file CREDITS for list of people who contributed to this
@@ -262,6 +262,7 @@ TAG_SUBDIRS += cpu/mpc8xxx
 endif
 LIBS += drivers/rtc/librtc.a
 LIBS += drivers/serial/libserial.a
+LIBS += drivers/twserial/libtws.a
 LIBS += drivers/usb/libusb.a
 LIBS += drivers/video/libvideo.a
 LIBS += common/libcommon.a
diff --git a/drivers/twserial/Makefile b/drivers/twserial/Makefile
new file mode 100644
index 000..0b059f3
--- /dev/null
+++ b/drivers/twserial/Makefile
@@ -0,0 +1,46 @@
+#
+# (C) Copyright 2009
+# Detlev Zundel, DENX Software Engineering, d...@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)libtws.a
+
+COBJS-$(CONFIG_SOFT_TWS) += soft_tws.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/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
@@ -0,0 +1,110 @@
+/*
+ * (C) Copyright 2009
+ * Detlev Zundel, DENX Software Engineering, d...@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
+ *
+ */
+
+#define TWS_IMPLEMENTATION
+#include common.h
+
+/*=*/
+/* Public Functions*/
+/*=*/
+
+/*---
+ * Read bits
+ */
+int tws_read(uchar *buffer, int len)
+{
+   int rem = len;
+   uchar accu, shift;
+
+   debug(tws_read: buffer %p len %d\n, buffer, len);
+
+   /* Configure the data pin for input */
+   tws_data_config_output(0);
+
+   /* Disable WR, i.e. setup a read */
+   tws_wr(0);
+   udelay(1);
+
+   /* Rise CE */
+   tws_ce(1);
+   udelay(1);
+
+   for (; rem  0; ) {
+   for (shift = 0, accu = 0;
+(rem  0)  (shift  8);
+rem--, shift++) {
+   tws_clk(1);
+   udelay(10);
+   accu |= (tws_data_read()  shift); /* LSB first */
+   tws_clk(0);
+   udelay(10);
+   }
+   *buffer++ = accu;
+   }
+
+   /* Lower CE */
+   tws_ce(0);
+
+   return len - rem

[U-Boot] [PATCH] inka4x0: Add hardware diagnosis and RTC in configuration.

2009-03-24 Thread Detlev Zundel
This patch adds the board specific communication routines needed by
the external 4543 RTC.

Signed-off-by: Detlev Zundel a...@denx.de
Signed-off-by: Andreas Pfefferle a...@denx.de
---
 board/inka4x0/inka4x0.c   |   20 ++
 include/configs/inka4x0.h |   90 ++--
 2 files changed, 105 insertions(+), 5 deletions(-)

diff --git a/board/inka4x0/inka4x0.c b/board/inka4x0/inka4x0.c
index ea59db3..35747ed 100644
--- a/board/inka4x0/inka4x0.c
+++ b/board/inka4x0/inka4x0.c
@@ -33,6 +33,7 @@
  * MA 02111-1307 USA
  */
 
+#include asm/io.h
 #include common.h
 #include mpc5xxx.h
 #include pci.h
@@ -188,6 +189,8 @@ int misc_init_r (void) {
 
 int misc_init_f (void)
 {
+   struct mpc5xxx_gpio *gpio = (struct mpc5xxx_gpio *)MPC5XXX_GPIO;
+   struct mpc5xxx_wu_gpio *wu_gpio = (struct mpc5xxx_wu_gpio 
*)MPC5XXX_WU_GPIO;
char tmp[10];
int i, br;
 
@@ -235,6 +238,23 @@ int misc_init_f (void)
*(vu_long *) MPC5XXX_WU_GPIO_ENABLE |= GPIO_PSC3_9;
*(vu_long *) MPC5XXX_WU_GPIO_DIR|= GPIO_PSC3_9;
*(vu_long *) MPC5XXX_WU_GPIO_DATA_O   |= GPIO_PSC3_9;
+
+   /*
+* Configure three wire serial interface to RTC (PSC1_4,
+* PSC2_4, PSC3_4, PSC3_5)
+*/
+   setbits_8(wu_gpio-enable,  MPC5XXX_GPIO_WKUP_PSC1_4 |
+MPC5XXX_GPIO_WKUP_PSC2_4);
+   setbits_8(wu_gpio-ddr, MPC5XXX_GPIO_WKUP_PSC1_4 |
+MPC5XXX_GPIO_WKUP_PSC2_4);
+   clrbits_8(wu_gpio-dvo, MPC5XXX_GPIO_WKUP_PSC1_4);
+   clrbits_8(gpio-sint_inten, MPC5XXX_GPIO_SINT_PSC3_4 |
+MPC5XXX_GPIO_SINT_PSC3_5);
+   setbits_8(gpio-sint_gpioe, MPC5XXX_GPIO_SINT_PSC3_4 |
+MPC5XXX_GPIO_SINT_PSC3_5);
+   setbits_8(gpio-sint_ddr,   MPC5XXX_GPIO_SINT_PSC3_5);
+   clrbits_8(gpio-sint_dvo,   MPC5XXX_GPIO_SINT_PSC3_5);
+
return 0;
 }
 
diff --git a/include/configs/inka4x0.h b/include/configs/inka4x0.h
index b80796d..5f06b09 100644
--- a/include/configs/inka4x0.h
+++ b/include/configs/inka4x0.h
@@ -1,4 +1,7 @@
 /*
+ * (C) Copyright 2009
+ * Detlev Zundel, DENX Software Engineering, d...@denx.de.
+ *
  * (C) Copyright 2003-2005
  * Wolfgang Denk, DENX Software Engineering, w...@denx.de.
  *
@@ -90,16 +93,17 @@
  */
 #include config_cmd_default.h
 
+#define CONFIG_CMD_DATE
 #define CONFIG_CMD_DHCP
 #define CONFIG_CMD_EXT2
 #define CONFIG_CMD_FAT
 #define CONFIG_CMD_IDE
 #define CONFIG_CMD_NFS
 #define CONFIG_CMD_PCI
+#define CONFIG_CMD_PING
 #define CONFIG_CMD_SNTP
 #define CONFIG_CMD_USB
 
-
 #defineCONFIG_TIMESTAMP1   /* Print image info with 
timestamp */
 
 #if (TEXT_BASE == 0xFFE0)  /* Boot low */
@@ -240,15 +244,91 @@
  * 01 - CAN1 on I2C1, CAN2 on Tmr0/1 do not use on TQM5200 with onboard
  *   EEPROM
  * use PSC1 as UART: Bits 28-31 (mask: 0x0007): 0100
- * use PSC6_1 and PSC6_3 as GPIO: Bits 9:11 (mask: 0x0700):
- * 011 - PSC6 could not be used as UART or CODEC. IrDA still possible.
+ * use PSC2 as UART: Bits 24-27 (mask: 0x0070): 0100
+ * use PSC3 as UART: Bits 20-23 (mask: 0x0700): 0100
+ * use PSC6 as UART: Bits  9-11 (mask: 0x0070): 0101
  */
-#define CONFIG_SYS_GPS_PORT_CONFIG 0x01001004
+#define CONFIG_SYS_GPS_PORT_CONFIG 0x01501444
 
 /*
  * RTC configuration
  */
-#define CONFIG_RTC_MPC5200 1   /* use internal MPC5200 RTC */
+#define CONFIG_RTC_RTC4543 1   /* use external RTC */
+
+/*
+ * Software (bit-bang) three wire serial configuration
+ *
+ * Note that we need the ifdefs because otherwise compilation of
+ * mkimage.c fails.
+ */
+#define CONFIG_SOFT_TWS1
+
+#ifdef TWS_IMPLEMENTATION
+#include mpc5xxx.h
+#include asm/io.h
+
+#define TWS_CE MPC5XXX_GPIO_WKUP_PSC1_4 /* GPIO_WKUP_0 */
+#define TWS_WR MPC5XXX_GPIO_WKUP_PSC2_4 /* GPIO_WKUP_1 */
+#define TWS_DATA   MPC5XXX_GPIO_SINT_PSC3_4 /* GPIO_SINT_0 */
+#define TWS_CLKMPC5XXX_GPIO_SINT_PSC3_5 /* GPIO_SINT_1 */
+
+static inline void tws_ce(unsigned bit)
+{
+   struct mpc5xxx_wu_gpio *wu_gpio =
+   (struct mpc5xxx_wu_gpio *)MPC5XXX_WU_GPIO;
+   if (bit)
+   setbits_8(wu_gpio-dvo, TWS_CE);
+   else
+   clrbits_8(wu_gpio-dvo, TWS_CE);
+}
+
+static inline void tws_wr(unsigned bit)
+{
+   struct mpc5xxx_wu_gpio *wu_gpio =
+   (struct mpc5xxx_wu_gpio *)MPC5XXX_WU_GPIO;
+   if (bit)
+   setbits_8(wu_gpio-dvo, TWS_WR);
+   else
+   clrbits_8(wu_gpio-dvo, TWS_WR);
+}
+
+static inline void tws_clk(unsigned bit)
+{
+   struct mpc5xxx_gpio *gpio =
+   (struct mpc5xxx_gpio *)MPC5XXX_GPIO;
+   if (bit)
+   setbits_8(gpio-sint_dvo, TWS_CLK);
+   else
+   clrbits_8(gpio-sint_dvo, TWS_CLK);
+}
+
+static inline void tws_data(unsigned bit)
+{
+   struct

[U-Boot] [PATCH] inka4x0: Use proper accessor macros for memory mapped registers.

2009-03-24 Thread Detlev Zundel
Signed-off-by: Detlev Zundel d...@denx.de
---
 board/inka4x0/inka4x0.c |  131 ---
 1 files changed, 67 insertions(+), 64 deletions(-)

diff --git a/board/inka4x0/inka4x0.c b/board/inka4x0/inka4x0.c
index 35747ed..2ef770b 100644
--- a/board/inka4x0/inka4x0.c
+++ b/board/inka4x0/inka4x0.c
@@ -55,41 +55,34 @@
 #ifndef CONFIG_SYS_RAMBOOT
 static void sdram_start (int hi_addr)
 {
+   struct mpc5xxx_sdram *sdram = (struct mpc5xxx_sdram *)MPC5XXX_SDRAM;
long hi_addr_bit = hi_addr ? 0x0100 : 0;
 
/* unlock mode register */
-   *(vu_long *)MPC5XXX_SDRAM_CTRL = SDRAM_CONTROL | 0x8000 | 
hi_addr_bit;
-   __asm__ volatile (sync);
+   out_be32(sdram-ctrl, SDRAM_CONTROL | 0x8000 | hi_addr_bit);
 
/* precharge all banks */
-   *(vu_long *)MPC5XXX_SDRAM_CTRL = SDRAM_CONTROL | 0x8002 | 
hi_addr_bit;
-   __asm__ volatile (sync);
+   out_be32(sdram-ctrl, SDRAM_CONTROL | 0x8002 | hi_addr_bit);
 
 #if SDRAM_DDR
/* set mode register: extended mode */
-   *(vu_long *)MPC5XXX_SDRAM_MODE = SDRAM_EMODE;
-   __asm__ volatile (sync);
+   out_be32(sdram-mode, SDRAM_EMODE);
 
/* set mode register: reset DLL */
-   *(vu_long *)MPC5XXX_SDRAM_MODE = SDRAM_MODE | 0x0400;
-   __asm__ volatile (sync);
+   out_be32(sdram-mode, SDRAM_MODE | 0x0400);
 #endif
 
/* precharge all banks */
-   *(vu_long *)MPC5XXX_SDRAM_CTRL = SDRAM_CONTROL | 0x8002 | 
hi_addr_bit;
-   __asm__ volatile (sync);
+   out_be32(sdram-ctrl, SDRAM_CONTROL | 0x8002 | hi_addr_bit);
 
/* auto refresh */
-   *(vu_long *)MPC5XXX_SDRAM_CTRL = SDRAM_CONTROL | 0x8004 | 
hi_addr_bit;
-   __asm__ volatile (sync);
+   out_be32(sdram-ctrl, SDRAM_CONTROL | 0x8004 | hi_addr_bit);
 
/* set mode register */
-   *(vu_long *)MPC5XXX_SDRAM_MODE = SDRAM_MODE;
-   __asm__ volatile (sync);
+   out_be32(sdram-mode, SDRAM_MODE);
 
/* normal operation */
-   *(vu_long *)MPC5XXX_SDRAM_CTRL = SDRAM_CONTROL | hi_addr_bit;
-   __asm__ volatile (sync);
+   out_be32(sdram-ctrl, SDRAM_CONTROL | hi_addr_bit);
 }
 #endif
 
@@ -101,24 +94,24 @@ static void sdram_start (int hi_addr)
 
 phys_size_t initdram (int board_type)
 {
+   struct mpc5xxx_mmap_ctl *mm = (struct mpc5xxx_mmap_ctl *) 
CONFIG_SYS_MBAR;
+   struct mpc5xxx_cdm *cdm = (struct mpc5xxx_cdm *)  MPC5XXX_CDM;
+   struct mpc5xxx_sdram *sdram = (struct mpc5xxx_sdram *)MPC5XXX_SDRAM;
ulong dramsize = 0;
 #ifndef CONFIG_SYS_RAMBOOT
long test1, test2;
 
/* setup SDRAM chip selects */
-   *(vu_long *)MPC5XXX_SDRAM_CS0CFG = 0x001c; /* 512MB at 0x0 */
-   *(vu_long *)MPC5XXX_SDRAM_CS1CFG = 0x4000; /* disabled */
-   __asm__ volatile (sync);
+   out_be32(mm-sdram0, 0x001c);  /* 512MB at 0x0 */
+   out_be32(mm-sdram1, 0x4000);  /* disabled */
 
/* setup config registers */
-   *(vu_long *)MPC5XXX_SDRAM_CONFIG1 = SDRAM_CONFIG1;
-   *(vu_long *)MPC5XXX_SDRAM_CONFIG2 = SDRAM_CONFIG2;
-   __asm__ volatile (sync);
+   out_be32(sdram-config1, SDRAM_CONFIG1);
+   out_be32(sdram-config2, SDRAM_CONFIG2);
 
 #if SDRAM_DDR
/* set tap delay */
-   *(vu_long *)MPC5XXX_CDM_PORCFG = SDRAM_TAPDELAY;
-   __asm__ volatile (sync);
+   out_be32(cdm-porcfg, SDRAM_TAPDELAY);
 #endif
 
/* find RAM size using SDRAM CS0 only */
@@ -140,17 +133,17 @@ phys_size_t initdram (int board_type)
 
/* set SDRAM CS0 size according to the amount of RAM found */
if (dramsize  0) {
-   *(vu_long *)MPC5XXX_SDRAM_CS0CFG = 0x13 +
-   __builtin_ffs(dramsize  20) - 1;
+   out_be32(mm-sdram0, 0x13 +
+__builtin_ffs(dramsize  20) - 1);
} else {
-   *(vu_long *)MPC5XXX_SDRAM_CS0CFG = 0; /* disabled */
+   out_be32(mm-sdram0, 0); /* disabled */
}
 
-   *(vu_long *)MPC5XXX_SDRAM_CS1CFG = dramsize; /* disabled */
+   out_be32(mm-sdram1, dramsize); /* disabled */
 #else /* CONFIG_SYS_RAMBOOT */
 
/* retrieve size of memory connected to SDRAM CS0 */
-   dramsize = *(vu_long *)MPC5XXX_SDRAM_CS0CFG  0xFF;
+   dramsize = in_be32(mm-sdram0)  0xFF;
if (dramsize = 0x13) {
dramsize = (1  (dramsize - 0x13))  20;
} else {
@@ -169,13 +162,15 @@ int checkboard (void)
 
 void flash_preinit(void)
 {
+   struct mpc5xxx_lpb *lpb = (struct mpc5xxx_lpb *)MPC5XXX_LPB;
+
/*
 * Now, when we are in RAM, enable flash write
 * access for detection process.
-* Note that CS_BOOT cannot be cleared when
+* Note that CS_BOOT (CS0) cannot be cleared when
 * executing in flash.
 */
-   *(vu_long *)MPC5XXX_BOOTCS_CFG = ~0x1; /* clear RO */
+   clrbits_be32(lpb-cs0_cfg, 0x1); /* clear RO

Re: [U-Boot] [PATCH v2] UBIFS: Missing offset relocation for compressor 'none'

2009-03-20 Thread Detlev Zundel
Hi Stefan,

 On Thursday 19 March 2009, Michael Lawnick wrote:
 On systems where U-Boot is linked to another address than it really lays
 (e.g. backup image), calls via function pointers must be fixed with a
 '+= gd-reloc_off'.
 This was not done for none_compr in ubifs_compressors_init() what leads
 to system crash on ubifsmount command.

 Signed-off-by: Michael Lawnick ml.lawn...@gmx.de

 Acked-by: Stefan Roese s...@denx.de

 Please note that I explicitly didn't fold this patch into my latest UBIFS 
 patch series. We should apply it after UBIFS is available in mainline so that 
 Michael will be listed as author for this fix.

I was not so sure about this, so I was waiting for your opinion, but are
you sure that it is ok to remove the assignment?  Doesn't other code
depend on that?

@@ -147,7 +147,10 @@ int __init ubifs_compressors_init(void)
if (err)
return err;

-   ubifs_compressors[UBIFS_COMPR_NONE] = none_compr;
+   err = compr_init(none_compr);
+   if (err)
+   return err;
+
return 0;
 }

Cheers
  Detlev

-- 
Narren sind alle, die es scheinen, und die Haelfte derer, die es nicht
scheinen ..  Jedoch ist der groesste Narr, wer es nicht zu sein glaubt
und alle andern dafuer erklaert.
--- Baltasar Gracian
--
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] Multiple device support - none at all?

2009-03-12 Thread Detlev Zundel
Hi ksi (was it Sergei?),

 The fundamental concept of u-boot isn't to handle all your devices, it is to
 boot linux (or other OS) and use the OS to handle the multiple devices.

 The same is true for a PC BIOS, but it DOES handle all of my devices. And it
 allows me to choose which device to boot from. And it is extendable so I can
 add a PCI card with e.g. RAID controller and boot off of that RAID. And it
 is not handling of all devices, it is _BASIC_ functionality...

Actually I don't know what you're talking about in the PC BIOS area
here.  Usually the computers I own cannot boot from the devices that are
bought somewhat after the motherboard.  But maybe you have different
instances of computers...

 I don't mind reconfiguring and rebuilding the thing for my parcticular
 configuration instead of just changing some settings in interactive setup
 utility, but the current implementation won't allow even that...

Actually we are thinking about going generic here also for a while
already.  Look for example at the BOF session notes of OLS 2007[1]
Device Tree Run Time Configuration.

We are all aware that a proper device model will be needed at a
certain stage, only nobody started into that direction yet.

As Jerry pointed out - booting embedded hardware used to be a comparably
simple operation ;)

Cheers
  Detlev

[1] http://www.denx.de/wiki/view/U-Boot/OLSUbootBOF

-- 
... that every year or so they're going to give you a new release full
of 50 000  additional lines of code all  written  by monkeys.  Because
they generally follow  the  ``million monkeys typing,   and eventually
they'll come up with something useful'' school of system development.
-- Richard M. Stallman
--
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] U-boot debugger/emulator

2009-03-10 Thread Detlev Zundel
Hi Steven,

 Did you purchase or obtain your source debugging application elsewhere? Or
 do you use GDB? I haven't use that before. I'm used to a source level
 debugger I believe.

 So what do you think GDB is? It is one of the most powerful source
 level debuggers that are available.

If you are looking for a GUI _on top_ of the source level debugger, you
have also a few options.  Our TWiki gives an example[1] on using the
quite attractive ddd[2].

Cheers
  Detlev

[1] http://www.denx.de/wiki/view/DULG/DebuggingGUI
[2] http://www.gnu.org/software/ddd/

-- 
Shin: a device for finding furniture in the dark.
--
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] dts to dtb generation

2008-12-12 Thread Detlev Zundel
Hi Marco,

 BISON dtc-parser.tab.c
  DEP dtc-parser.tab.c
  LEX dtc-lexer.lex.c
 make: flex: Command not found

Actually, I do not know, how an error message could be more clear than
that.  Obviously your Linux installation is missing the GNU lexical
scanner generator flex.  It should be trivial to install that package
for the distro that you use.

Best wishes
  Detlev

-- 
Every time history repeats itself the price goes up.
--
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] Hardware diagnosis for inka4x0 boards.

2008-12-11 Thread Detlev Zundel
Hi Wolfgang,

 This patch adds diagnosis functions for the buzzer, UARTs and digital

 Such hardware test code should be implemented as part of the POST
 system, i. e. please create a post/board/inka4x0/ directory for it,
 and make it part of the POST.

But these tests cannot be part of any Power On Self Test as some of them
are interactive.  They were designed with the serial port being
scripted - thus yielding an automated setup as a whole, but still such
scripting is needed.

So I still see these tests to belong into the board directory.

Cheers
  Detlev

-- 
But solicitors and stockbrokers and bookmakers often lead comfortable and
happy lives,  and it is very difficult to see how the world is richer for
their existence.  -- G. H. Hardy
--
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: [EMAIL PROTECTED]
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] JFFS2-Summary support for u-boot

2008-09-29 Thread Detlev Zundel
Hi Michael,

 Joakim Tjernlund joakim.tjernlund at transmode.se writes:

 
 On Mon, 2008-09-29 at 08:45 +, Michael Lawnick wrote:
  Hi *,
  
  please feel free to correct me if I tell sh**:
  As far as I was told, bad JFFS2 boot performance of u-boot is result of not
  supporting summary. (Because there is no JFFS2 but only JFFS support?)
 
 It is not missing SUMMARY, it is excessive scanning of empty flash
 blocks. Look at jffs2/scan.c, it only scan the first 4KB or before
 declaring the block empty.

 Ok, did I get you correct:
 The performance difference between u-boot and linux is based on skipping
 senseless scans of empty blocks?
 I've taken a little look into scan.c
 The comment The code lacks more or less any comment, and is still arcane and
 difficult to read in places. doesn't make me happy.

 Has anybody tried to (and succeeded in) speed up u-boot?

We are currently working on such a speedup bringing U-Boot up to par
with Linux.  I am confident that we can post our results in the next
week.

Cheers
  Detlev

PS: Wow, message-mode in Emacs wants a confirmation sending an email to
you as your address looks bogus ;)

-- 
Emacs is the way to purify your soul using garbage collection.
--
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: [EMAIL PROTECTED]
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 2/3] Automatic software update from TFTP server

2008-09-26 Thread Detlev Zundel
Hi,

  I see. Maybe we should call the variable updatefile or similar,
  then?
 
 How about au_file? updatefile suffers from similarity to the
 commonly used (although not documented) update env. variable. But I'm
 fine either way, just let me know what you prefer.

 I would use updatefile, but if you prefer au_file (and nobody
 else comes up with comments or better suggestions) that's fine with
 me, too.

I second 'updatefile'.  au_file sounds too much like noise, I mean audio
;)

Cheers
  Detlev

-- 
Whatever you do will be insignificant,
but it is very important that you do it.
-- Mahatma Gandhi
--
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: [EMAIL PROTECTED]
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] u-boot couldn't be started from flash

2008-09-26 Thread Detlev Zundel
Hi Robert,

 I can run u-boot in my debugger TRACE32  with 'go' command,
 but it couldn't be started from the flash without TRACE32 when
 the board power on, and I get nothing from the console, I don't know what 
 happend, and anybody has experience in this problem?

It sounds like your debugger does some initialization that is missing
from U-Boot.  So check any init lists (or whatever it is called for
TRACE32) and the startup of U-Boot and fix the discrepencies.

Cheers
  Detlev

-- 
Milk? called Reg. Er, please. One lump or two? One, please. Sugar?

Dirk Gently's Holistic Detective Agency, Douglas Adams
--
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: [EMAIL PROTECTED]
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [U-Boot-Users] Boot from Jffs2 filesystem problem

2008-09-04 Thread Detlev Zundel
Hi Pedro,

the SourceForge mailing list is deprecated, please use the one at
lists.denx.de.

[This time, the new address is correct]

 The u-boot version I'm using is 1.3.1 (self compiled) and Linux Kernel 
 2.6.23.1.

 It is possible to boot it with a stored kernel uImage and the oftree in the 
 flash using a nfs filesystem, 
 but I can't not boot it using the jffs2 image.
 I've read a lot of documentation from denx.de and this is my configuration at 
 the moment:

 mtdparts=mtdparts=TQM5200-0:512k(uboot),256k(environment),3328k(kernel),20m(jffs2),256k(oftree)
 bootargs_mtd=setenv bootargs ${bootargs} ${mtdparts}
 bootargs_flash=setenv bootargs ${bootargs} root=/dev/mtdblock4 rw 
 rootfstype=jffs2 
 (even tried with root=/dev/mtdblock3, I'm not sure if 0 counts or not)
 bootargs_base=setenv bootargs console=ttyPSC0,115200
 bootcmd_flash=run bootargs_base bootargs_flash bootargs_mtd;bootm fC0C – 
 fD80

 I've defined the partitions myself and double checked the numbers, first 
 myself, then using the mtdparts command. 
 The kernel image, oftree, and jffs2 filesystem are stored in the flash. 
 The problem comes at booting. Even when root=/dev/mtdblock4 rw 
 rootfstype=jffs2 is passed to the kernel, 
 it always tries to boot from a Ramdisk image.  This is the output when I run 
 bootcmd_flash command:

 = run bootcmd_flash
 ## Booting image at fc0c ...
Image Name:   Linux-2.6.23.1-rt5-pcm030-1trunk
Created:  2008-09-02  11:48:23 UTC
Image Type:   PowerPC Linux Kernel Image (gzip compressed)
Data Size:1534856 Bytes =  1.5 MB
Load Address: 
Entry Point:  
Verifying Checksum ... OK
Uncompressing Kernel Image ... OK
 ## Loading RAMDisk Image at  ...
 Bad Magic Number

 It seems to me that U-boot is trying to boot from RAMDisk instead of booting 
 the kernel, but I'm not sure.

Yes, indeed.  It looks like the bootm fc0c - fd80 is not
evaluated properly.  In v1.3.1 code the code lines were
(common/cmd_bootm.c:622)

#if defined(CONFIG_OF_FLAT_TREE) || defined(CONFIG_OF_LIBFDT)
/* Look for a '-' which indicates to ignore the ramdisk argument
*/
if (argc = 3  strcmp(argv[2], -) ==  0) {
debug (Skipping initrd\n);
len = data = 0;
}
else
#endif

So The upstream v1.3.1 config for TQM5200 also has CONFIG_OF_LIBFDT
defined:

$ git-show v1.3.1:include/configs/TQM5200.h | grep CONFIG_OF_LIBFDT
#define CONFIG_OF_LIBFDT 1

So if you did not change that, my last explanation is that you have
hidden escape characters in the definition of bootcmd_flash.  Check with
'md' on the environment sectors to find out.

Cheers
  Detlev

-- 
Shin: a device for finding furniture in the dark.
--
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: [EMAIL PROTECTED]
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] TQM5200 HIGHBOOT Makefile patch

2008-09-04 Thread Detlev Zundel
Hi Pedro,

 Hi,
 I don't know the normal procedure, if I should send the patch to
 Wolfgang or someone else, but I found a problem with Makefile and
 TQM5200 HIGHBOOT config in Makefile. I think this problem is also in
 previous versions since tqm boards where moved under tqc folder.

The normal procedure is to prepare a patch with git (use
git-format-patch) against top of tree version so that it can be applied
without any hassle (use git-send-email if you want to save a few
iterations).  Search the archives on more details on how to do this and
be sure not to forget your Signed-off-by line.

Apart from that, the patch looks good.

Cheers
  Detlev

-- 
If you currently have a 32-bit UNIX system, you are advised to
trade it in for a 64-bit one sometime before the year 2106.
 -- Andrew S. Tanenbaum: Modern Operating Systems, 2nd Edition
--
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: [EMAIL PROTECTED]
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] unassigned-patches/24: [PATCH] PHY: Add support for the M88E1121R Marvell chip.

2008-09-02 Thread Detlev Zundel
Hi Ben,

 Hi Detlev,

 On Mon, Sep 1, 2008 at 3:48 PM, Detlev Zundel [EMAIL PROTECTED] wrote:
 Hi Ben,

 It looks like this one slipped through the cracks. I've looked through
 my e-mails and found one from Wolfgang on 6/8 where he said he'd apply
 it, so I acked the patch rather than pulling it myself. For whatever
 reason, it didn't make it in.

 I've rejigged the patch to apply to TOT, and have applied to the net
 repo. Please find the fixed-up patch attached, as applied to
 e99e9575bbeba1b7c48e046547cae065ec0071de

 Excellent.  Any idea on when you will send a pull request?


 The only thing holding me back is that there are quite a few changes
 that were posted over the weekend or today (a statutory holiday in the
 U.S. and Canada) and would like to give people more time to review.
 If it's OK with you, I'll send a pull request tomorrow night so you
 guys have it first thing Wednesday morning.

Thats fine.

 If you don't think this precaution is necessary, I can send a request tonight.

Don't get me wrong, I did not want to push you.  I only wanted to know
at what time I'd need to send reminders again ;)

Cheers
  Detlev

-- 
5.7: Practically speaking, what is the difference between arrays and pointers?
About the difference between alcohol and marijuana; they have different
characteristics, and that's not a problem if you don't mix them too carelessly.
   - Infrequently Asked Questions in comp.lang.c
--
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: [EMAIL PROTECTED]
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 2/5] atmel_lcdfb: Straighten out funky vl_sync logic

2008-09-02 Thread Detlev Zundel
Hi Haavard,

 If the board _didn't_ request INVLINE_INVERTED, we set INVLINE_INVERTED,
 otherwise we don't. WTF?

 Signed-off-by: Haavard Skinnemoen [EMAIL PROTECTED]
 ---
  drivers/video/atmel_lcdfb.c |5 +
  1 files changed, 1 insertions(+), 4 deletions(-)

 diff --git a/drivers/video/atmel_lcdfb.c b/drivers/video/atmel_lcdfb.c
 index 7f0dceb..3a51cc7 100644
 --- a/drivers/video/atmel_lcdfb.c
 +++ b/drivers/video/atmel_lcdfb.c
 @@ -107,10 +107,7 @@ void lcd_ctrl_init(void *lcdbase)
   if (panel_info.vl_tft)
   value |= ATMEL_LCDC_DISTYPE_TFT;
  
 - if (!(panel_info.vl_sync  ATMEL_LCDC_INVLINE_INVERTED))
 - value |= ATMEL_LCDC_INVLINE_INVERTED;
 - if (!(panel_info.vl_sync  ATMEL_LCDC_INVFRAME_INVERTED))
 - value |= ATMEL_LCDC_INVFRAME_INVERTED;
 + value |= panel_info.vl_sync;

What about

value |= panel_info.vl_sync  (ATMEL_LCDC_INVLINE_INVERTED | 
ATMEL_LCDC_INVFRAME_INVERTED);

[break lines where convenient] Apart from this being the formal
equivalent to the original code, this would make it more clear what can
go in, no?

Cheers
  Detlev

-- 
[From 2.4 to 2.6 to 2.7 discussing release numbering of the Linux kernel]
Let the bike-shed-painting begin.
 -- Linus Torvalds 
--
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: [EMAIL PROTECTED]
___
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

2008-09-01 Thread Detlev Zundel
Hi Andy,

 are available in the git repository at:

   git://www.denx.de/git/u-boot-mpc85xx.git master


[...]

 Kumar Gala (18):

[...]

   FSL DDR: Convert socrates to new DDR code.

[...]

That's really nice that we get the socrates board converted to the new
style DDR, but I wonder why the other patches for socrates([1]-[3]) are
becoming neglected pets of myself instead of moving on.  Can you please
comment on them?

I just checked and they still apply on TOT.

Thanks
  Detlev

[1] http://bugs.denx.de/databases/u-boot/prs/22
[2] http://bugs.denx.de/databases/u-boot/prs/26
[3] http://bugs.denx.de/databases/u-boot/prs/27

-- 
Paul Simon sang Fifty Ways to Lose Your Lover, because quite
frankly, A Million Ways to Tell a Developer He Is a D*ckhead
doesn't scan nearly as well.  But I'm sure he thought about it.
-- linux/Documentation/ManagementStyle
--
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: [EMAIL PROTECTED]
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] unassigned-patches/24: [PATCH] PHY: Add support for the M88E1121R Marvell chip.

2008-09-01 Thread Detlev Zundel
Hi Ben,

 Signed-off-by: Yuri Tikhonov [EMAIL PROTECTED]
 Signed-off-by: Sergei Poselenov [EMAIL PROTECTED]

 ---
 Added to GNATS database as unassigned-patches/24
Responsible:patch-coord
Message-Id: [EMAIL PROTECTED]
In-Reply-To:
References: 
Patch-Date: Fri Aug 15 15:42:08 +0200 2008
 ---
  drivers/net/tsec.c |   50 ++
  drivers/net/tsec.h |7 +++
  2 files changed, 57 insertions(+), 0 deletions(-)

Any comments on this patch?

Thanks
  Detlev

-- 
The limits of my language stand for the limits of my world.
-- Ludwig Wittgenstein
--
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: [EMAIL PROTECTED]
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


<    4   5   6   7   8   9