From: Prabhakar Kushwaha <prabhakar@freescale.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v6 1/2] powerpc:mpc85xx: Add ifc nand boot support for TPL/SPL
Date: Mon, 13 Jan 2014 11:58:07 +0530 [thread overview]
Message-ID: <52D38777.4090800@freescale.com> (raw)
In-Reply-To: <1389319859-18547-1-git-send-email-Po.Liu@freescale.com>
On 1/10/2014 7:40 AM, Po Liu wrote:
> Using the TPL method for nand boot by sram was already
> supported. Here add some code for mpc85xx ifc nand boot.
>
> - For ifc, elbc, esdhc, espi, all need the SPL without
> section .resetvec.
> - Use a clear function name for nand spl boot.
> - Add CONFIG_SPL_DRIVERS_MISC_SUPPORT to compile the fsl_ifc.c
> in spl/Makefile;
>
> Signed-off-by: Po Liu <Po.Liu@freescale.com>
> ---
> changes for v2:
> - seperate public code and c29xpcie board code
> - add ifc support
> changes for v3:
> - remove the redundant plus
> - ifc support use CONFIG_SPL_DRIVERS_MISC_SUPPORT
> changes for v4:
> - modify the nand_load function
> - add comments in README.SPL
> changes for v5:
> -none
> changes for v6:
> - modify the readme file for the include lib file
>
> arch/powerpc/cpu/mpc85xx/u-boot-spl.lds | 15 ++++++++-------
> doc/README.SPL | 1 +
> drivers/mtd/nand/fsl_ifc_spl.c | 31 ++++++++++++++++++++++++-------
> spl/Makefile | 1 +
> 4 files changed, 34 insertions(+), 14 deletions(-)
>
> diff --git a/arch/powerpc/cpu/mpc85xx/u-boot-spl.lds b/arch/powerpc/cpu/mpc85xx/u-boot-spl.lds
> index bc13267..acaa093 100644
> --- a/arch/powerpc/cpu/mpc85xx/u-boot-spl.lds
> +++ b/arch/powerpc/cpu/mpc85xx/u-boot-spl.lds
> @@ -57,7 +57,14 @@ SECTIONS
> . = ALIGN(8);
> __init_begin = .;
> __init_end = .;
> -/* FIXME for non-NAND SPL */
> +
> +/* For ifc, elbc, esdhc, espi, all need the SPL without section .resetvec */
> +#ifdef CONFIG_SYS_MPC85XX_NO_RESETVEC
> + .bootpg ADDR(.text) - 0x1000 :
> + {
> + KEEP(*(.bootpg))
> + } :text = 0xffff
> +#else
> #if defined(CONFIG_FSL_IFC) /* Restrict bootpg at 4K boundry for IFC */
> .bootpg ADDR(.text) + 0x1000 :
> {
> @@ -69,12 +76,6 @@ SECTIONS
> #else
> #error unknown NAND controller
> #endif
> -#ifdef CONFIG_SYS_MPC85XX_NO_RESETVEC
> - .bootpg ADDR(.text) - 0x1000 :
> - {
> - KEEP(*(.bootpg))
> - } :text = 0xffff
> -#else
> .resetvec ADDR(.text) + RESET_VECTOR_OFFSET : {
> KEEP(*(.resetvec))
> } = 0xffff
> diff --git a/doc/README.SPL b/doc/README.SPL
> index 312a6a6..b1bc3ca 100644
> --- a/doc/README.SPL
> +++ b/doc/README.SPL
> @@ -62,6 +62,7 @@ CONFIG_SPL_FAT_SUPPORT (fs/fat/libfat.o)
> CONFIG_SPL_LIBGENERIC_SUPPORT (lib/libgeneric.o)
> CONFIG_SPL_POWER_SUPPORT (drivers/power/libpower.o)
> CONFIG_SPL_NAND_SUPPORT (drivers/mtd/nand/libnand.o)
> +CONFIG_SPL_DRIVERS_MISC_SUPPORT (drivers/misc)
> CONFIG_SPL_DMA_SUPPORT (drivers/dma/libdma.o)
> CONFIG_SPL_POST_MEM_SUPPORT (post/drivers/memory.o)
> CONFIG_SPL_NAND_LOAD (drivers/mtd/nand/nand_spl_load.o)
> diff --git a/drivers/mtd/nand/fsl_ifc_spl.c b/drivers/mtd/nand/fsl_ifc_spl.c
> index 9de327b..6b43496 100644
> --- a/drivers/mtd/nand/fsl_ifc_spl.c
> +++ b/drivers/mtd/nand/fsl_ifc_spl.c
> @@ -88,7 +88,11 @@ static inline int bad_block(uchar *marker, int port_size)
> return __raw_readw((u16 *)marker) != 0xffff;
> }
>
> -static void nand_load(unsigned int offs, int uboot_size, uchar *dst)
> +#ifdef CONFIG_TPL_BUILD
> +int nand_spl_load_image(uint32_t offs, unsigned int uboot_size, void *vdst)
> +#else
> +static int nand_load(uint32_t offs, unsigned int uboot_size, void *vdst)
> +#endif
nand_load definition is
static void nand_load(unsigned int offs, int uboot_size, uchar *dst);
have you checked the compilation warning for non TPL framework?
Regards,
Prabhakar
next prev parent reply other threads:[~2014-01-13 6:28 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-02 4:12 [U-Boot] [PATCH] powerpc/c29xpcie: 8k page size NAND boot support base on TPL/SPL Po Liu
2013-12-05 6:18 ` [U-Boot] [PATCH v2 1/2] powerpc:mpc85xx: Add ifc nand boot support for TPL/SPL Po Liu
2013-12-05 6:19 ` [U-Boot] [PATCH v2 2/2] powerpc/c29xpcie: 8k page size NAND boot support base on TPL/SPL Po Liu
2013-12-07 1:21 ` Scott Wood
2013-12-09 5:40 ` Prabhakar Kushwaha
2013-12-09 17:51 ` Scott Wood
2013-12-10 6:07 ` Prabhakar Kushwaha
2013-12-10 18:20 ` Scott Wood
[not found] ` <5d27987f1d694ae9977cba2e8a78d843@DM2PR03MB317.namprd03.prod.outlook.com>
2013-12-11 3:00 ` Po.Liu at freescale.com
2013-12-11 7:00 ` Prabhakar Kushwaha
2013-12-11 6:40 ` Prabhakar Kushwaha
2013-12-11 16:42 ` Scott Wood
[not found] ` <c957f7e802e245488c0c0e0fc0f425ed@DM2PR03MB317.namprd03.prod.outlook.com>
2013-12-11 2:46 ` Po.Liu at freescale.com
2013-12-13 21:22 ` Scott Wood
[not found] ` <ce05f24a72e0474f82d7f99c215353e6@DM2PR03MB317.namprd03.prod.outlook.com>
2013-12-11 6:20 ` Po.Liu at freescale.com
2013-12-13 20:25 ` Scott Wood
[not found] ` <8cbfa2585cd04b348c5883a628e3a33c@DM2PR03MB317.namprd03.prod.outlook.com>
2013-12-14 3:21 ` Scott Wood
2013-12-14 3:08 ` [U-Boot] [PATCH v3 1/2] powerpc:mpc85xx: Add ifc nand boot support for TPL/SPL Po Liu
2013-12-14 3:08 ` [U-Boot] [PATCH v3 2/2] powerpc/c29xpcie: 8k page size NAND boot support base on TPL/SPL Po Liu
2014-01-02 22:01 ` [U-Boot] [PATCH v3 1/2] powerpc:mpc85xx: Add ifc nand boot support for TPL/SPL Scott Wood
2014-01-06 6:15 ` [U-Boot] [PATCH v4 " Po Liu
2014-01-06 6:15 ` [U-Boot] [PATCH v4 2/2] powerpc/c29xpcie: 8k page size NAND boot support base on TPL/SPL Po Liu
2014-01-07 3:37 ` [U-Boot] [PATCH v5 1/2] powerpc:mpc85xx: Add ifc nand boot support for TPL/SPL Po Liu
2014-01-07 3:37 ` [U-Boot] [PATCH v5 2/2] powerpc/c29xpcie: 8k page size NAND boot support base on TPL/SPL Po Liu
2014-01-08 0:03 ` [U-Boot] [PATCH v5 1/2] powerpc:mpc85xx: Add ifc nand boot support for TPL/SPL Scott Wood
2014-01-10 2:10 ` [U-Boot] [PATCH v6 " Po Liu
2014-01-10 2:10 ` [U-Boot] [PATCH v6 2/2] powerpc/c29xpcie: 8k page size NAND boot support base on TPL/SPL Po Liu
2014-01-21 22:54 ` York Sun
2014-01-10 19:03 ` [U-Boot] [PATCH v6 1/2] powerpc:mpc85xx: Add ifc nand boot support for TPL/SPL Scott Wood
2014-01-21 22:54 ` York Sun
2014-01-13 6:28 ` Prabhakar Kushwaha [this message]
2014-01-14 1:09 ` Scott Wood
2014-01-14 3:44 ` Prabhakar Kushwaha
2013-12-07 1:33 ` [U-Boot] [PATCH v2 " Scott Wood
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=52D38777.4090800@freescale.com \
--to=prabhakar@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 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.