From: Scott Wood <scottwood@freescale.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 6/7 v8] NAND: TPL : introduce the TPL based on the SPL
Date: Fri, 19 Jul 2013 17:33:51 -0500 [thread overview]
Message-ID: <1374273231.5357.30@snotra> (raw)
In-Reply-To: <B3A295C5BD5B13458B2F5C6AFAD910460A2E9D7C@039-SN2MPN1-022.039d.mgd.msft.net> (from B40530@freescale.com on Thu Jul 18 04:48:58 2013)
On 07/18/2013 04:48:58 AM, Zhang Ying-B40530 wrote:
>
>
> -----Original Message-----
> From: Wood Scott-B07421
> Sent: Wednesday, July 17, 2013 2:07 AM
> To: Zhang Ying-B40530
> Cc: Wood Scott-B07421; u-boot at lists.denx.de; afleming at gmail.com; Xie
> Xiaobo-R63061
> Subject: Re: [PATCH 6/7 v8] NAND: TPL : introduce the TPL based on
> the SPL
>
> On 07/16/2013 05:04:55 AM, Zhang Ying-B40530 wrote:
> >
> >
> > -----Original Message-----
> > From: Wood Scott-B07421
> > Sent: Tuesday, July 16, 2013 7:56 AM
> > To: Zhang Ying-B40530
> > Cc: u-boot at lists.denx.de; afleming at gmail.com; Xie Xiaobo-R63061;
> > Zhang Ying-B40530
> > Subject: Re: [PATCH 6/7 v8] NAND: TPL : introduce the TPL based on
> > the SPL
> >
>
> > How about something like:
> >
> > # $@ is output, $(1) and $(2) are inputs, $(3) is padded
> intermediate,
> > $(4) is pad-to
> > SPL_PAD_APPEND = \
> > $(OBJCOPY) ${OBJCFLAGS} --pad-to=$(4) -I binary -O
> > binary \
> > $(1) $(obj)$(3); \
> > cat $(obj)$(3) $(obj)$(2) > $@; \
> > rm $(obj)$(3)
> >
> > $(obj)u-boot-with-spl.bin: $(obj)spl/u-boot-spl.bin
> > $(obj)tpl/u-boot-with-tpl.bin
> > $(call
> >
> SPL_PAD_APPEND,$<,u-boot-with-tpl.bin,spl/u-boot-spl-pad.bin,$(CONFIG_SPL_PAD_TO))
> >
> > $(obj)u-boot-with-tpl.bin: $(obj)tpl/u-boot-tpl.bin $(obj)u-boot.bin
> > $(call
> >
> SPL_PAD_APPEND,$<,u-boot.bin,tpl/u-boot-tpl-pad.bin,$(CONFIG_TPL_PAD_TO))
> > [Zhang Ying]
> > According to your advice, how to do for those don't have TPL?
>
> They would use the rule for u-boot-with-spl.bin, and the TPL rule
> would
> be ignored. No ifdef needed.
> [Zhang Ying]
> But, Don't u-boot-with-spl.bin contain tpl/u-boot-with-tpl.bin in the
> following rule?
>
> $(obj)u-boot-with-spl.bin: $(obj)spl/u-boot-spl.bin
> $(obj)tpl/u-boot-with-tpl.bin
> $(call
> SPL_PAD_APPEND,$<,u-boot-with-tpl.bin,spl/u-boot-spl-pad.bin,$(CONFIG_SPL_PAD_TO))
Oh, right -- replace that with a variable that says what the SPL
payload should be.
> You're defining a function called "nand_load_image" ind
> include/nand.h. There's nothing eLBC-specific about that. It is
> entirely possible that another implementation will want to export that
> function in an ordinary SPL -- or even possibly in the main U-Boot
> image.
>
> In fact, there's already a common definition for this, which is
> nand_spl_load_image(). Use that.
> [Zhang Ying]
> There has a prolem:
> nand_spl_simple.c: In function 'nand_init':
> nand_spl_simple.c:265:2: error: too many arguments to function
> 'board_nand_init'
>
> This because the functionality "board_nand_init" is called and
> parameter is not null,
> but board_nand_init prototype is declared to "void
> board_nand_init(void)".
Whether board_nand_init() takes a parameter depends on whether
CONFIG_SYS_NAND_SELF_INIT is defined. Apparently nand_spl_simple.c
doesn't support CONFIG_SYS_NAND_SELF_INIT.
But I wasn't saying to use nand_spl_simple.c -- I was saying to use the
same function name and arguments for nand_spl_load_image(). This would
mean the caller of nand_spl_load_image() would be the same regardless
of whether nand_spl_simple.c or fsl_elbc_spl.c is used.
Note that fsl_ifc_spl.c also uses nand_spl_load_image().
-Scott
next prev parent reply other threads:[~2013-07-19 22:33 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-15 9:36 [U-Boot] [PATCH 1/7 v8] powerpc: deleted unused symbol CONFIG_SPL_NAND_MINIMAL and enabled some functionality for common SPL ying.zhang at freescale.com
2013-07-15 9:36 ` [U-Boot] [PATCH 2/7 v8] powerpc: mpc85xx: Support booting from SD Card with SPL ying.zhang at freescale.com
2013-07-15 9:36 ` [U-Boot] [PATCH 3/7 v8] powerpc: p1022ds: Enable P1022DS to boot " ying.zhang at freescale.com
2013-07-15 9:36 ` [U-Boot] [PATCH 4/7 v8] powerpc : spi flash : Support to start from eSPI " ying.zhang at freescale.com
2013-07-15 9:36 ` [U-Boot] [PATCH 5/7 v8] powerpc : p1022ds : enable p1022ds " ying.zhang at freescale.com
2013-07-15 9:36 ` [U-Boot] [PATCH 6/7 v8] NAND: TPL : introduce the TPL based on the SPL ying.zhang at freescale.com
2013-07-15 23:56 ` Scott Wood
2013-07-16 10:04 ` Zhang Ying-B40530
2013-07-16 18:06 ` Scott Wood
2013-07-18 9:48 ` Zhang Ying-B40530
2013-07-19 22:33 ` Scott Wood [this message]
2013-07-15 9:36 ` [U-Boot] [PATCH 7/7 v8] powerpc: p1022ds: add TPL for p1022ds nand boot ying.zhang at freescale.com
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=1374273231.5357.30@snotra \
--to=scottwood@freescale.com \
--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