public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Vladimir Gurevich <vag@paulidav.org>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] SPI support in U-boot
Date: Wed, 25 Jan 2006 22:56:07 -0800	[thread overview]
Message-ID: <43D87287.3050903@paulidav.org> (raw)
In-Reply-To: <20060125111651.55824352584@atlas.denx.de>

Hello Wolfgang,

Wolfgang Denk wrote:

>Good catch!
>  
>
>>Is that OK? I also noticed the same mechanism being used in the 
>>FPGA-related code.
>>    
>>
>
>I think your interpretation is correct.
>  
>
And? :)

OK, so here are the questions:

   1. Should the code be left like that (i.e. some parts are executing
      from FLASH instead of RAM) because it "just works for me" or it is
      not acceptable to code like that?
   2. What is the right way to do that: to use an uninitialized variable
      and initialize it from board_misc_init_r with something like

                   myfuncptr = &myfunc + bd->reloc_off

      or to have initialized variable myfuncptr = myfunc and simply do
      myfuncptr += bd->reloc_off in board_misc_init_r?
   3. Ironically enough, I noticed that fpga_init() is declared like 
      extern void fpga_init( ulong reloc_off ), but all the
      implementations use void fpga_init(void)!
   4. Wouldn't it make sense to add a small section to README,
      explaining how to use function pointer tables in U-boot (not sure
      how much sense it makes to begin with).

>It would be nice to preserve the currnt behaviour, so a patch  should
>try  to  implement the required changes for all boiards. Testing will
>have to be performed by the respective board maintainers, of course.
>  
>
This seems to be difficult, since the current interface only allows you 
to assert/de-assert a particular chipselect, but not to query which one 
is currently active (so that "sspi" command could restore what was 
before it. I guess, I can do three things:

   1. Extend sspi command, so that if there is only 1 arg, chip_select,
      it will simply assert it and do nothing else
   2. Hope, that people who use "eeprom" command don't really care about
      "sspi" so far, otherwise it would be working!
   3. Document the changes.

Thanks,
Vladimir

      reply	other threads:[~2006-01-26  6:56 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-23  2:50 [U-Boot-Users] SPI support in U-boot Vladimir Gurevich
2006-01-23 10:44 ` Wolfgang Denk
2006-01-25  8:15   ` Vladimir Gurevich
2006-01-25 11:16     ` Wolfgang Denk
2006-01-26  6:56       ` Vladimir Gurevich [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=43D87287.3050903@paulidav.org \
    --to=vag@paulidav.org \
    --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