public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Detlev Zundel <dzu@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] [PATCH/review] Blackfin: use on-chip syscontrol() to reset
Date: Wed, 04 Jun 2008 11:05:42 +0200	[thread overview]
Message-ID: <m2y75lbme1.fsf@ohwell.denx.de> (raw)
In-Reply-To: <200806011720.43991.vapier@gentoo.org> (Mike Frysinger's message of "Sun, 1 Jun 2008 17:20:43 -0400")

Hi Mike,

> On Sunday 01 June 2008, Wolfgang Denk wrote:
>> In message <1212298724-15152-10-git-send-email-vapier@gentoo.org> you wrote:
>> > When available, use the on-chip syscontrol() rom function to perform a
>> > system reset rather than our own local method.
>> ...
>> > -		asm("jump (%0);" : : "a" (bfin_reset));
>> > +		if (0 /*BOOTROM_CAPS_SYSCONTROL -- current silicon is broken*/)
>> > +			syscontrol(SYSCTRL_SOFTRESET, NULL, NULL);
>> > +		else
>> > +			asm("jump (%0);" : : "a" (bfin_reset));
>> >  }
>>
>> Your comment suggests you change something, but actually you;re just
>> adding dead code.
>
> it's dead code because the current silicon is broken.  i know the code works 
> as ive tested it in scenarios where the anomaly isnt triggered, it just cant 
> be enabled until fixed hardware is released.  it's much easier to go back and 
> fix 1 if statement then have to carry this patch somewhere it can got lost 
> and i need to waste time and rewrite it.

Hm.  If the current - available - silicon is broken, then even if it is
fixed in the future, you will have to support both versions, right?  So
in the end you will need to have a discriminating factor on what to use.

So if you introduced some variable or bit in a variable (a define
doesn't look promising as I guess you want to support both broken and
non-broken silicon with a single image), you could have correct code now
and in the future - and no dead code complaints.

PowerPC Linux btw. does quite a lot of such "cpu_feature" stuff to
dynamically accomodate lots of different silicon.

Cheers
  Detlev

-- 
Test applications  with a variety of tools.  Don't assume everything works if
you've tested  with only  one client.  Also, assume the low end of technology
for clients and don't create applications which can only be used by Graphical
User Interfaces.                                       -- RFC 1855
--
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: dzu at denx.de

  parent reply	other threads:[~2008-06-04  9:05 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-01  5:38 [U-Boot-Users] [PATCH/review] Blackfin: dont call i2c_init() from board_init_r() Mike Frysinger
2008-06-01  5:38 ` [U-Boot-Users] [PATCH/review] Blackfin: protect default flash according to CFG_MONITOR_LEN Mike Frysinger
2008-06-01  5:38   ` [U-Boot-Users] [PATCH/review] Blackfin: update proc headers from toolchain Mike Frysinger
2008-06-01  5:38     ` [U-Boot-Users] [PATCH/review] Blackfin: unify cache handling code Mike Frysinger
2008-06-01  5:38       ` [U-Boot-Users] [PATCH/review] Blackfin: use common memcpy routine during init Mike Frysinger
2008-06-01  5:38         ` [U-Boot-Users] [PATCH/review] Blackfin: enable support for nested interrupts Mike Frysinger
2008-06-01  5:38           ` [U-Boot-Users] [PATCH/review] Blackfin: respect CONFIG_CLKIN_HALF Mike Frysinger
2008-06-01  5:38             ` [U-Boot-Users] [PATCH/review] Blackfin: setup a sane default EBIU_SDBCTL for SDRAM controllers Mike Frysinger
2008-06-01  5:38               ` [U-Boot-Users] [PATCH/review] Blackfin: use on-chip syscontrol() rom function when available Mike Frysinger
2008-06-01  5:38                 ` [U-Boot-Users] [PATCH/review] Blackfin: use on-chip syscontrol() to reset Mike Frysinger
2008-06-01  5:38                   ` [U-Boot-Users] [PATCH/review] Blackfin: add support for BF538/BF539 Mike Frysinger
2008-06-01 20:14                     ` Wolfgang Denk
2008-06-01 21:18                       ` Mike Frysinger
2008-06-01 22:05                         ` Wolfgang Denk
2008-06-01 23:03                           ` Mike Frysinger
2008-06-04  8:56                             ` Detlev Zundel
2008-06-04 10:18                               ` Mike Frysinger
2008-06-04 17:36                                 ` Detlev Zundel
2008-06-04 20:16                                   ` Mike Frysinger
2008-06-05 13:13                                     ` Detlev Zundel
2008-06-05 13:24                                     ` Wolfgang Denk
2008-06-01 19:56                   ` [U-Boot-Users] [PATCH/review] Blackfin: use on-chip syscontrol() to reset Wolfgang Denk
2008-06-01 21:20                     ` Mike Frysinger
2008-06-01 22:07                       ` Wolfgang Denk
2008-06-04  9:05                       ` Detlev Zundel [this message]
2008-06-04 10:10                         ` Mike Frysinger
2008-06-01 19:54               ` [U-Boot-Users] [PATCH/review] Blackfin: setup a sane default EBIU_SDBCTL for SDRAM controllers Wolfgang Denk
2008-06-01 21:12                 ` Mike Frysinger
2008-06-01 21:59                   ` Wolfgang Denk
2008-06-01 22:49                     ` Mike Frysinger
2008-06-01 19:47   ` [U-Boot-Users] [PATCH/review] Blackfin: protect default flash according to CFG_MONITOR_LEN Wolfgang Denk

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=m2y75lbme1.fsf@ohwell.denx.de \
    --to=dzu@denx.de \
    --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