All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wolfgang Denk <wd@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] driver/mxc_i2c: Move static data structure to global_data
Date: Tue, 11 Feb 2014 20:59:18 +0100	[thread overview]
Message-ID: <20140211195918.69BCE38032B@gemini.denx.de> (raw)
In-Reply-To: <52FA7DFD.5060406@freescale.com>

Dear York Sun,

In message <52FA7DFD.5060406@freescale.com> you wrote:
>
> Thanks for the insight. I am not using SPL either. I need this driver to run
> before u-boot relocates to DDR. Everything is in flash. I need to find a
> writable location for the variable srdata. I can put this section in linker script
> 
>        .data.sram :
>        {
>                drivers/i2c/built-in.o (.data)
>        } > sram
}

Please do not invent totally new ways to have writable data before
relocation.  Use the existing machanisms.  While running from flash,
we have but what little memory we can find in on-chip memory or SRAM
or data chace; we use this for the stack and global data (which should
be kept as small as possible, to allow for a as much stack as possible).

So ideally keep this data on the stack, and if there is no way around
it, in the global data structure.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
A dog always bit deepest on the veterinary hand.
                                    - Terry Pratchett, _Wyrd Sisters_

  reply	other threads:[~2014-02-11 19:59 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-10 22:02 [U-Boot] [PATCH] driver/mxc_i2c: Move static data structure to global_data York Sun
2014-02-10 22:10 ` Tom Rini
2014-02-10 22:28   ` York Sun
2014-02-10 22:45     ` Tom Rini
2014-02-10 22:47       ` York Sun
2014-02-11 18:01       ` York Sun
2014-02-11 21:46         ` York Sun
2014-02-12 14:41           ` Tom Rini
2014-02-11  2:34 ` York Sun
2014-02-11 19:25   ` Troy Kisky
2014-02-11 19:46     ` York Sun
2014-02-11 19:59       ` Wolfgang Denk [this message]
2014-02-11 20:03         ` York Sun
2014-02-11 20:57           ` Wolfgang Denk
2014-02-11 21:02             ` York Sun
2014-02-11 22:12               ` Wolfgang Denk
2014-02-11 22:20                 ` York Sun
2014-02-12 14:27                   ` Wolfgang Denk
2014-02-12 14:43                     ` Tom Rini
2014-02-12 17:56                       ` York Sun

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=20140211195918.69BCE38032B@gemini.denx.de \
    --to=wd@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.