From: Stefan Roese <sr@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] [PATCH] Fix relocation problem with "new" get_dev() function
Date: Wed, 21 Feb 2007 21:07:59 +0100 [thread overview]
Message-ID: <200702212107.59792.sr@denx.de> (raw)
In-Reply-To: <528646bc0702210901t5d72be93t893a6954250fbbde@mail.gmail.com>
On Wednesday 21 February 2007 18:01, Grant Likely wrote:
> On 2/20/07, Stefan Roese <sr@denx.de> wrote:
> > This patch enables the "new" get_dev() function for block devices
> > introduced by Grant Likely to be used on systems that still suffer
> > from the relocation problems (manual relocation neede because of
> > problems with linker script).
> >
> > Hopefully we can resolve this relocation issue soon for all platform
> > so we don't need this additional code anymore.
> >
> > Signed-off-by: Stefan Roese <sr@denx.de>
> >
> > ---
> > +#ifndef CFG_FIXUP_RELOCATION
> > + block_dev_desc_t* (*reloc_get_dev)(int dev);
> > +
> > + reloc_get_dev = drvr->get_dev + gd->reloc_off;
> > + if (strncmp(ifname, drvr->name, strlen(drvr->name)) == 0)
> > + return reloc_get_dev(dev);
> > +#else
> > if (strncmp(ifname, drvr->name, strlen(drvr->name)) == 0)
> > return drvr->get_dev(dev);
> > +#endif
>
> The changes look good, but I would drop the CFG_FIXUP_RELOCATION
> macros for now. Just fix it up unconditionally and let the patch that
> actually fixes relocation add them back in.
Yes, that does make more sense for now. I'll update my version.
> I know it doesn't hurt anything to have them in now; but I think the
> current relocation patch takes the wrong approach. That patch assumes
> that relocation is busted unless the board config says it isn't.
> Since this is something that we want to fix correctly; I think it is
> better to add a '#define CONFIG_RELOCATION_BROKEN' to all board
> configs files now; and steadly remove them as different ports are
> fixed.
>
> At first glance this looks like a bad idea because it means every
> board config file must be touched; but every config file needs to be
> touched regardless. Either:
> a) touch every config file now (by adding the "IT'S BROKEN" define; or
> b) touch every config file later (by removing the "IT'S FIXED" define
> when all board ports are working and the hooks are no longer needed).
>
> Thoughts?
I like this approach, since it seems to be the "right way" to fix this
problem. Any other ideas on this? Please speak up, since it's quite a big
change.
Best regards,
Stefan
=====================================================================
DENX Software Engineering GmbH, HRB 165235 Munich, CEO: Wolfgang Denk
Office: Kirchenstr. 5, D-82194 Groebenzell, Germany
=====================================================================
next prev parent reply other threads:[~2007-02-21 20:07 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-20 12:31 [U-Boot-Users] [PATCH] Fix relocation problem with "new" get_dev() function Stefan Roese
2007-02-21 17:01 ` Grant Likely
2007-02-21 20:07 ` Stefan Roese [this message]
2007-02-21 20:20 ` Grant Likely
-- strict thread matches above, loose matches on Subject: below --
2007-02-22 7:45 [U-Boot-Users] [PATCH] Fix relocation problem with "new"get_dev() function TXEMA LOPEZ
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=200702212107.59792.sr@denx.de \
--to=sr@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.