public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Tolunay Orkun <listmember@orkun.us>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] cfi_flash is now working with 64 bit port width
Date: Thu, 30 Jun 2005 16:53:01 -0500	[thread overview]
Message-ID: <42C469BD.4010109@orkun.us> (raw)
In-Reply-To: <20050630210200.64BBC353A0E@atlas.denx.de>

Wolfgang Denk wrote:
> In message <42C4592E.7080009@orkun.us> you wrote:
> 
>>>               __asm__ __volatile__ ("lfd 1, 0(%0)"::"r" (data));
>>>               __asm__ __volatile__ ("stfd 1, 0(%0)"::"r" (addr));
>>>         }
>>
>>This is probably not acceptable for cfi_flash.c. cfi_flash.c is used by 
>>multiple CPU architectures so PowerPC assembly cannot be used. You have 
>>to find a solution based on "C" only.
> 
> 
> ...which probably does not exist, so this  is  a  valid  and  working
> approach,  although  incomplete.  Appropriate  code  for other archi-
> tectures can be added later. At least for MIPS. Or is  there  an  ARM
> processor with 64 bit data bus?

Well, I really don't know if ARM has 64 bit data bus. Maybe there is 
maybe not.

>>How did you use "double" and it did not work? Please give example of the 
>>work you tried...
> 
> 
> It did not work in  the  intended  sense  as  the  compiler  did  not
> generate  any  FP  instructions  -  which  is  to  be  expected as we
> explicitely tell him to use -msoft-float.

Bummer! :(

I think in this case instead of bloating the cfi_flash.c we could allow 
user to define preprocessor macros in this board file for flash access 
so if those macros are defined, cfi_flash.c would use them and exclude 
its own built-in ones.

That way, any board with custom data bus (reversed lanes for example) or 
address bus (messed up address line) arrangements or specialized 
handling (need floating point) as in this case would override them 
easily and we would not end up blocks of #if/#elif/#else/#endif etc. in 
the cfi_flash.c. The board would also enable FP unit in its board file 
or within these functions if necessary as well.

What do you think?

I can submit a patch to do this while I am working on my other long 
pending patch this weekend. I promise I will get it done this time.

> 
> Best regards,
> 
> Wolfgang Denk
> 

  reply	other threads:[~2005-06-30 21:53 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-30  8:23 [U-Boot-Users] cfi_flash is now working with 64 bit port width Yusuf Ibrahim Ozkok
2005-06-30 10:29 ` Yuli Barcohen
2005-06-30 20:42 ` Tolunay Orkun
2005-06-30 21:02   ` Wolfgang Denk
2005-06-30 21:53     ` Tolunay Orkun [this message]
2005-06-30 23:59       ` Wolfgang Denk
2005-07-01 16:25         ` Tolunay Orkun
2005-07-01 16:09       ` Yusuf Ibrahim Ozkok
2005-07-01 22:53         ` 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=42C469BD.4010109@orkun.us \
    --to=listmember@orkun.us \
    --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