From: Robert P. J. Day <rpjday@crashcourse.ca>
To: u-boot@lists.denx.de
Subject: [U-Boot] some dead code and redundant files for nios?
Date: Sat, 2 Feb 2013 05:06:04 -0500 (EST) [thread overview]
Message-ID: <alpine.DEB.2.02.1302020459340.7067@oneiric> (raw)
In-Reply-To: <alpine.DEB.2.02.1302011723560.4290@oneiric>
On Fri, 1 Feb 2013, Robert P. J. Day wrote:
> ... the same source file -- AMDLV065D.c -- is in two different
> directories, and they differ slightly:
>
> $ diff board/{altera,psyent}/common/AMDLV065D.c
> 175c175
> < writeb (b, dst);
> ---
> > writeb (dst, b);
> $
>
> that looks kind of weird, doesn't it? i haven't looked any more
> closely but for two source files with the same name to have that
> single, subtle difference just looks strange.
i took a couple minutes with "git blame" to discover this:
$ git show 3d22d0b8
diff --git a/board/psyent/common/AMDLV065D.c b/board/psyent/common/AMDLV065D.c
... snip ...
- *cmd = 0xaa;
- *cmd = 0x55;
- *cmd = 0xa0;
- *dst = b;
+ writeb (cmd, 0xaa);
+ writeb (cmd, 0x55);
+ writeb (cmd, 0xa0);
+ writeb (dst, b);
... snip ...
while over in the (almost) identical file:
git show 9e486ab1
commit 9e486ab1c98ea7ab357520307fe5d5a0847cd1bb
Author: Scott McNutt <smcnutt@psyent.com>
Date: Tue Mar 30 20:26:15 2010 -0400
nios2: Fix AMDLV065D flash write bug in altera board common tree.
Signed-off-by: Scott McNutt <smcnutt@psyent.com>
diff --git a/board/altera/common/AMDLV065D.c b/board/altera/common/AMDLV065D.c
index 72b0a9f..7a1b4d3 100644
--- a/board/altera/common/AMDLV065D.c
+++ b/board/altera/common/AMDLV065D.c
@@ -172,7 +172,7 @@ int write_buff (flash_info_t * info, uchar * src, ulong addr, ulong cnt)
writeb (0xaa, cmd);
writeb (0x55, cmd);
writeb (0xa0, cmd);
- writeb (dst, b);
+ writeb (b, dst);
/* Verify write */
start = get_timer (0);
$
i don't know what the above is doing, but it would certainly seem
that if a flash write bug was being fixed in one of those files, it
would be fixed in the other. beyond that, i cannot say.
rday
--
========================================================================
Robert P. J. Day Ottawa, Ontario, CANADA
http://crashcourse.ca
Twitter: http://twitter.com/rpjday
LinkedIn: http://ca.linkedin.com/in/rpjday
========================================================================
prev parent reply other threads:[~2013-02-02 10:06 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-01 23:50 [U-Boot] some dead code and redundant files for nios? Robert P. J. Day
2013-02-02 10:06 ` Robert P. J. Day [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.DEB.2.02.1302020459340.7067@oneiric \
--to=rpjday@crashcourse.ca \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox