[U-Boot] [PATCH v4 2/2] ORIGEN: Add MMC SPL support
Chander Kashyap
chander.kashyap at linaro.org
Wed Aug 3 05:49:06 CEST 2011
Dear Wolfgang Denk,
On 31 July 2011 15:33, Wolfgang Denk <wd at denx.de> wrote:
> Dear Chander Kashyap,
>
> In message <1311914519-10531-3-git-send-email-chander.kashyap at linaro.org>
> you wrote:
> > Adds mmc boot support.
> >
> > Signed-off-by: Chander Kashyap <chander.kashyap at linaro.org>
> > ---
> > mmc_spl/board/samsung/origen/Makefile | 106
> ++++++++++++++++
> > mmc_spl/board/samsung/origen/mmc_boot.c | 57 +++++++++
> > mmc_spl/board/samsung/origen/tools/mkv310_image.c | 140
> +++++++++++++++++++++
> > mmc_spl/board/samsung/origen/u-boot.lds | 88 +++++++++++++
> > 4 files changed, 391 insertions(+), 0 deletions(-)
> > create mode 100644 mmc_spl/board/samsung/origen/Makefile
> > create mode 100644 mmc_spl/board/samsung/origen/mmc_boot.c
> > create mode 100644 mmc_spl/board/samsung/origen/tools/mkv310_image.c
> > create mode 100644 mmc_spl/board/samsung/origen/u-boot.lds
>
> PLease adapt this code to the new SPL infrastructure that has recently
> been introduced.
>
Yes i will use the new SPL Infrastructure.
>
>
> > +typedef u32(*copy_sd_mmc_to_mem) \
> > + (u32 start_block, u32 block_count, u32 *dest_addr);
>
> Quote CodingStyle:
>
> Lots of people think that typedefs "help readability". Not so.
>
> > +void copy_uboot_to_ram(void)
> > +{
> > + copy_sd_mmc_to_mem copy_bl2 = (copy_sd_mmc_to_mem)*(u32
> *)(0x02020030);
> > + copy_bl2(BL2_START_OFFSET,\
> > + BL2_SIZE_BLOC_COUNT, (u32 *)CONFIG_SYS_TEXT_BASE);
> > +}
>
> This code is, in addition to the magic 0x02020030 constant, basicly
> unreadable.
>
> The typedef is especially useless as it is used only in this single
> case. Please clean this up.
>
> > diff --git a/mmc_spl/board/samsung/origen/u-boot.lds
> b/mmc_spl/board/samsung/origen/u-boot.lds
> > new file mode 100644
> > index 0000000..4a231d9
> > --- /dev/null
> > +++ b/mmc_spl/board/samsung/origen/u-boot.lds
>
> What exactly is the reason for needing your own, custom linker script?
>
> 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
> Defaults are wonderful, just like fire.
> - Larry Wall in <1996Mar6.004121.27890 at netlabs.com>
>
--
with warm regards,
Chander Kashyap
More information about the U-Boot
mailing list