Re: [U-Boot] [PATCH v4 2/2] ORIGEN: Add MMC SPL support

2011-07-31 Thread Wolfgang Denk
Dear Chander Kashyap,

In message 
 Lei Wen 
wrote:
>
> On Fri, Jul 29, 2011 at 12:41 PM, Chander Kashyap
>  wrote:
> > Adds mmc boot support.
> >
> > Signed-off-by: Chander Kashyap 
> > ---
> >  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

It appears this patch has never been posted on the U-Boot mailing
list.Lei Wen

___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: [U-Boot] [PATCH v4 2/2] ORIGEN: Add MMC SPL support

2011-07-31 Thread Lei Wen
Hi Chander,

On Fri, Jul 29, 2011 at 12:41 PM, Chander Kashyap
 wrote:
> Adds mmc boot support.
>
> Signed-off-by: Chander Kashyap 
> ---
>  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
>
> diff --git a/mmc_spl/board/samsung/origen/Makefile 
> b/mmc_spl/board/samsung/origen/Makefile
> new file mode 100644
> index 000..1d61cc0
> --- /dev/null
> +++ b/mmc_spl/board/samsung/origen/Makefile
> @@ -0,0 +1,106 @@
> +#
> +# (C) Copyright 2006-2007
> +# Stefan Roese, DENX Software Engineering, s...@denx.de.
> +#
> +# (C) Copyright 2008
> +# Guennadi Liakhovetki, DENX Software Engineering, 
> +#
> +# (C) Copyright 2011
> +# Chander Kashyap, Samsung Electronics, 
> +#
> +# See file CREDITS for list of people who contributed to this
> +# project.
> +#
> +# This program is free software; you can redistribute it and/or
> +# modify it under the terms of the GNU General Public License as
> +# published by the Free Software Foundation; either version 2 of
> +# the License, or (at your option) any later version.
> +#
> +# This program is distributed in the hope that it will be useful,
> +# but WITHOUT ANY WARRANTY; without even the implied warranty of
> +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> +# GNU General Public License for more details.
> +#
> +# You should have received a copy of the GNU General Public License
> +# along with this program; if not, write to the Free Software
> +# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
> +# MA 02111-1307 USA
> +#
> +
> +CONFIG_MMC_SPL = y
> +
> +include $(TOPDIR)/config.mk
> +
> +LDSCRIPT= $(TOPDIR)/mmc_spl/board/$(BOARDDIR)/u-boot.lds
> +LDFLAGS        = -Bstatic -T $(mmcobj)u-boot.lds -Ttext 
> $(CONFIG_SYS_TEXT_BASE) $(PLATFORM_LDFLAGS)
> +AFLAGS += -DCONFIG_MMC_SPL
> +AFLAGS += -DCONFIG_SPL_BUILD
> +CFLAGS += -DCONFIG_MMC_SPL
> +CFLAGS += -DCONFIG_SPL_BUILD
> +
> +SOBJS  = start.o mem_setup.o lowlevel_init.o
> +COBJS  = mmc_boot.o
> +
> +SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
> +OBJS   := $(addprefix $(obj),$(SOBJS) $(COBJS))
> +__OBJS := $(SOBJS) $(COBJS)
> +LNDIR  := $(OBJTREE)/mmc_spl/board/$(BOARDDIR)
> +
> +mmcobj := $(OBJTREE)/mmc_spl/
> +
> +
> +MKV310_MMC_SPL_EXEC = mkv310_mmc_spl_exec
> +MMC_SPL_BIN = u-boot-mmc-spl.bin
> +
> +ALL = $(mmcobj)u-boot-spl $(mmcobj)u-boot-spl.bin $(mmcobj)$(MMC_SPL_BIN)
> +
> +all:    $(obj).depend $(ALL)
> +
> +$(mmcobj)$(MMC_SPL_BIN):  $(mmcobj)u-boot-spl.bin 
> tools/$(MKV310_MMC_SPL_EXEC)
> +       ./tools/$(MKV310_MMC_SPL_EXEC) $(mmcobj)u-boot-spl.bin 
> $(mmcobj)$(MMC_SPL_BIN)
> +       rm -f tools/$(MKV310_MMC_SPL_EXEC)
> +
> +tools/$(MKV310_MMC_SPL_EXEC): tools/mkv310_image.c
> +       $(HOSTCC) tools/mkv310_image.c -o tools/$(MKV310_MMC_SPL_EXEC)
> +
> +$(mmcobj)u-boot-spl.bin:       $(mmcobj)u-boot-spl
> +       $(OBJCOPY) ${OBJCFLAGS} -O binary $< $@
> +
> +$(mmcobj)u-boot-spl:   $(OBJS) $(mmcobj)u-boot.lds
> +       cd $(LNDIR) && $(LD) $(LDFLAGS) $(__OBJS) \
> +               -Map $(mmcobj)u-boot-spl.map \
> +               -o $(mmcobj)u-boot-spl
> +
> +$(mmcobj)u-boot.lds: $(LDSCRIPT)
> +       $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -ansi -D__ASSEMBLY__ -P - <$^ >$@
> +
> +# create symbolic links for common files
> +
> +# from cpu directory
> +start.S:
> +       @rm -f $@
> +       @ln -s $(TOPDIR)/arch/arm/cpu/armv7/start.S $@
> +
> +# from board directory
> +mem_setup.S:
> +       @rm -f $@
> +       @ln -s $(TOPDIR)/board/samsung/origen/mem_setup.S $@
> +
> +lowlevel_init.S:
> +       @rm -f $@
> +       @ln -s $(TOPDIR)/board/samsung/origen/lowlevel_init.S $@
> +
> +#
> +
> +$(obj)%.o:     %.S
> +       $(CC) $(AFLAGS) -c -o $@ $<
> +
> +$(obj)%.o:     %.c
> +       $(CC) $(CFLAGS) -c -o $@ $<
> +
> +# defines $(obj).depend target
> +include $(SRCTREE)/rules.mk
> +
> +sinclude $(obj).depend
> +
> +#
> diff --git a/mmc_spl/board/samsung/origen/mmc_boot.c 
> b/mmc_spl/board/samsung/origen/mmc_boot.c
> new file mode 100644
> index 000..d9b44d8
> --- /dev/null
> +++ b/mmc_spl/board/samsung/origen/mmc_boot.c
> @@ -0,0 +1,57 @@
> +/*
> + * Copyright (C) 2011 Samsung Electronics
> + *
> + * See file CREDITS for list of people who contributed to this
> + * project.
> + *
> + * This program is free software; you can redistribute it and/or
> + * modify it under the terms of the GNU General Public 

Re: [U-Boot] [PATCH v4 2/2] ORIGEN: Add MMC SPL support

2011-07-31 Thread Wolfgang Denk
In message <20110731081909.dfb8d12b7...@gemini.denx.de> I wrote:
> 
> In message 
>  Lei Wen 
> wrote:
> >
> > On Fri, Jul 29, 2011 at 12:41 PM, Chander Kashyap
> >  wrote:
> > > Adds mmc boot support.
> > >
> > > Signed-off-by: Chander Kashyap 
...
> It appears this patch has never been posted on the U-Boot mailing
> list.Lei Wen

oops.  Sorry, my fault.  Please ignore me.

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: w...@denx.de
"Why should we subsidize intellectual curiosity?" - Ronald Reagan

___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Private Room Number Wiki

2011-07-31 Thread Zach Pfeffer
All,

Arwen set up a private page for room numbers:

https://wiki.linaro.org/Internal/Events/LinaroConnectQ3.11/RoomNumbers

...if people want to share where they're at.

-Zach

___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: [PATCH v4 1/2] ARMV7: Add support for Samsung ORIGEN board

2011-07-31 Thread Wolfgang Denk
Dear Chander Kashyap,

In message <1311914519-10531-2-git-send-email-chander.kash...@linaro.org> you 
wrote:
> Origen board is based upon S5PV310 SoC which is similiar to
> S5PC210 SoC.
> 
> Signed-off-by: Chander Kashyap 
...
> + /* APLL(1), MPLL(1), CORE(0), HPM(0) */
> + ldr r1, =0x0101
> + ldr r2, =0x14200@CLK_SRC_CPU
...
> + mov r1, #0x1
...
> + ldr r1, =0x00
> + ldr r2, =0x0C210@CLK_SRC_TOP0
...
> + ldr r1, =0x00
> + ldr r2, =0x0C214@CLK_SRC_TOP1_OFFSET
...
> + ldr r1, =0x1
> + ldr r2, =0x10200@CLK_SRC_DMC_OFFSET
...

..
> + /*
> +  * CLK_DIV_DMC0:
> +  *
> +  * CORE_TIMERS_RATIO[28]0x1
> +  * COPY2_RATIO[24]  0x3
> +  * DMCP_RATIO[20]   0x1
> +  * DMCD_RATIO[16]   0x1
> +  * DMC_RATIO[12]0x1
> +  * DPHY_RATIO[8]0x1
> +  * ACP_PCLK_RATIO[4]0x1
> +  * ACP_RATIO[0] 0x3
> +  */
> + ldr r1, =0x1313
> + ldr r2, =0x010500   @CLK_DIV_DMC0_OFFSET
> + str r1, [r0, r2]


lease get rid of all these magic hard coded constants.  Use symbolic
names instead. If needed, auto-generate these from the respective C
structs.  If needed, create the C structs.

...
> --- /dev/null
> +++ b/board/samsung/origen/mem_setup.S
> @@ -0,0 +1,359 @@

What exactly is the reeason for not coding this in C ?

...
> +#ifdef CONFIG_MIU_1BIT_12_INTERLEAVED
> + ldr r1, =0x000c
> + str r1, [r0, #0x400]
> + ldr r1, =0x0001
> + str r1, [r0, #0xc00]
> +#elif defined(CONFIG_MIU_1BIT_7_INTERLEAVED)
> + ldr r1, =0x0007
> + str r1, [r0, #0x400]
> + ldr r1, =0x0001
> + str r1, [r0, #0xc00]
> +#elif defined(CONFIG_MIU_2BIT_21_12_INTERLEAVED)
> + ldr r1, =0x2000150c
> + str r1, [r0, #0x400]
> + ldr r1, =0x0001
> + str r1, [r0, #0xc00]
> +#elif defined(CONFIG_MIU_2BIT_21_7_INTERLEAVED)
> + ldr r1, =0x20001507
> + str r1, [r0, #0x400]
> + ldr r1, =0x0001
> + str r1, [r0, #0xc00]
> +#elif defined(CONFIG_MIU_2BIT_31_INTERLEAVED)
> + ldr r1, =0x001d
> + str r1, [r0, #0x400]
> + ldr r1, =0x0001
> + str r1, [r0, #0xc00]

See above.  Please get rid of all these hard-ciooded magic numbers.
[Eventually this happens automativcally when you rewrite this in C.]

> +int dram_init(void)
> +{
> + gd->ram_size= get_ram_size((long *)PHYS_SDRAM_1, PHYS_SDRAM_1_SIZE)
> + + get_ram_size((long *)PHYS_SDRAM_2, PHYS_SDRAM_2_SIZE)
> + + get_ram_size((long *)PHYS_SDRAM_3, PHYS_SDRAM_3_SIZE)
> + + get_ram_size((long *)PHYS_SDRAM_4, PHYS_SDRAM_4_SIZE);
> +
> + return 0;
> +}
> +
> +void dram_init_banksize(void)
> +{
> + gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
> + gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE;
> + gd->bd->bi_dram[1].start = PHYS_SDRAM_2;
> + gd->bd->bi_dram[1].size = PHYS_SDRAM_2_SIZE;
> + gd->bd->bi_dram[2].start = PHYS_SDRAM_3;
> + gd->bd->bi_dram[2].size = PHYS_SDRAM_3_SIZE;
> + gd->bd->bi_dram[3].start = PHYS_SDRAM_4;
> + gd->bd->bi_dram[3].size = PHYS_SDRAM_4_SIZE;
> +}

How do you detect memory issues in one of the memory banks, say, a
memory error in bank 3?

> diff --git a/include/configs/origen.h b/include/configs/origen.h
> new file mode 100644
> index 000..3cd9bfe
> --- /dev/null
> +++ b/include/configs/origen.h
...
> +#define COPY_BL2_SIZE0x8
> +#define BL2_START_OFFSET ((CONFIG_ENV_OFFSET + CONFIG_ENV_SIZE)/512)
> +#define BL2_SIZE_BLOC_COUNT  (COPY_BL2_SIZE/512)

Some of the defines in this file are not used anywhere in the code
(for example, COPY_BL2_SIZE, COPY_BL2_SIZEBL2_START_OFFSET or
BL2_SIZE_BLOC_COUNT.  Please remove unused defines from this patch.

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: w...@denx.de
Don't hit a man when he's down - kick him; it's easier.

___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: [PATCH v4 2/2] ORIGEN: Add MMC SPL support

2011-07-31 Thread Wolfgang Denk
Dear Chander Kashyap,

In message <1311914519-10531-3-git-send-email-chander.kash...@linaro.org> you 
wrote:
> Adds mmc boot support.
> 
> Signed-off-by: Chander Kashyap 
> ---
>  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.


> +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 000..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: w...@denx.de
Defaults are wonderful, just like fire.
  - Larry Wall in <1996mar6.004121.27...@netlabs.com>

___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Android Plugfest

2011-07-31 Thread Zach Pfeffer
I have expanded and clarified the Android Plugfest page. I've also
listed a notes section for each session. Please take a look and send
me any questions you may have.

https://wiki.linaro.org/Events/LinaroConnectQ3.11/AndroidPlugfest/Agenda

I'm looking forward to working with everyone.

-Zach

___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


physical_package_id value

2011-07-31 Thread Daniel Lezcano
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


Hi Vincent,


I compiled the linux-linaro-3.0 kernel and checked the content of
/sys/devices/system/cpu/cpu[0-1]/topology/physical_package_id and found
it is equal to '-1'.

Is it the expected value ?

Thanks

  -- Daniel

- -- 
  Linaro.org ? Open source software for ARM SoCs

Follow Linaro:   Facebook |
 Twitter |
 Blog

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJONatBAAoJEAKBbMCpUGYAzAYH/0I4+QiF9AhyC70uUgopwaG4
2lVuqfPnCC6/gEWh/mgsNvhKMEXjV+F6A60VhyiQIpGwLUmYzUtKH4ZuG2r5k0Z4
4U3WFIJS1poIixfpOKxXhp8gl/k++v8HBAiQhfsT/FxhQvvxIsy+hb7mGHS2aRl1
GXzCH4Pm0eC6PN/Yy3HQcbYsOK45RmS5bUxr314wmjskiLxFwyhWc00lWvLhf/Jp
j41A3D9Bip52Dt12gnQT071/1u1fla1WzxNjxAs7ti4HKGLUq4/ED/Q+h7k6mvkA
kUZ+kAzywYcFAEkiafr6lmRqfOK8YOu9pp0KSoubymf1Qa2GYhUIC1DEUvLRCLQ=
=q/ln
-END PGP SIGNATURE-

___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: physical_package_id value

2011-07-31 Thread Amit Kucheria
On Sun, Jul 31, 2011 at 10:21 PM, Daniel Lezcano
 wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
>
> Hi Vincent,
>
>
> I compiled the linux-linaro-3.0 kernel and checked the content of
> /sys/devices/system/cpu/cpu[0-1]/topology/physical_package_id and found
> it is equal to '-1'.
>
> Is it the expected value ?
>

Was this on a OMAP3 device? Not sure whether MPIDR register is defined
on Cortex-A8...

/Amit

___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: physical_package_id value

2011-07-31 Thread Daniel Lezcano
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 08/01/2011 12:42 AM, Amit Kucheria wrote:
> On Sun, Jul 31, 2011 at 10:21 PM, Daniel Lezcano
>  wrote:
>> -BEGIN PGP SIGNED MESSAGE-
>> Hash: SHA1
>>
>>
>> Hi Vincent,
>>
>>
>> I compiled the linux-linaro-3.0 kernel and checked the content of
>> /sys/devices/system/cpu/cpu[0-1]/topology/physical_package_id and found
>> it is equal to '-1'.
>>
>> Is it the expected value ?
>>
> 
> Was this on a OMAP3 device? Not sure whether MPIDR register is defined
> on Cortex-A8...


Oh, sorry. I forgot to mention it is on a pandaboard.


- -- 
  Linaro.org ? Open source software for ARM SoCs

Follow Linaro:   Facebook |
 Twitter |
 Blog

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJONeEVAAoJEAKBbMCpUGYAGZgH/3p44gyWysqp2iSnwDEIEBum
9eEiuUnuWx/89pPxcsdu3CZWkH9aK9D337ntOi5nKNlxFV2PHcZmKBdwvgd9e8pk
Q0/5i+ISfg9+0+y1WZQ3PE9MneyWJA2Lo371JJk7VjMjavrPGQH3dPg9+bFALkTR
Uc5P4McxtucAw3zWlJSsW3U+0vRXjIVSGgpctMTukAk1L2l8Va1FiAQvqk9FYzA9
pVadRebzBdsXgW77sl8WogW3KCArdkJTnhFzVLr3Hsg+HUgZH82BSukvPFm97qtr
HhWWd96L1P89fJ4gJ0crgdcWGdE2XVHlXoZ9vPhC6rPxljfuJTuCLdcig3S30BU=
=oiR4
-END PGP SIGNATURE-

___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev