[U-Boot] [PATCH] mmc: fix wrong timeout check in mmc_send_status()
(!timeout) condition check in mmc_send_status() can never be met, because do-while loop ends up with negative timeout value, -1. Fix it by using pre-decrement. Signed-off-by: Jongman Heo jongman@gmail.com --- drivers/mmc/mmc.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c index aebe578..de19d4e 100644 --- a/drivers/mmc/mmc.c +++ b/drivers/mmc/mmc.c @@ -232,7 +232,7 @@ int mmc_send_status(struct mmc *mmc, int timeout) udelay(1000); - } while (timeout--); + } while (--timeout); #ifdef CONFIG_MMC_TRACE status = (cmd.response[0] MMC_STATUS_CURR_STATE) 9; -- 1.7.7.6 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 4/7] tegra: Allow boards to perform early GPIO setup
* Tom Warren wrote: Thierry, -Original Message- From: Thierry Reding [mailto:thierry.red...@avionic-design.de] Sent: Friday, May 25, 2012 11:00 AM To: Stephen Warren Cc: u-boot@lists.denx.de; Tom Warren; Simon Glass Subject: Re: [PATCH v2 4/7] tegra: Allow boards to perform early GPIO setup * PGP Signed by an unknown key * Thierry Reding wrote: Furthermore I'll need to rebase the patches onto the Tegra branch due to the major restructuring of the configuration files. This isn't true. But I'll still have to respin because of the MAINTAINERS entry and the other points that you brought up, so let me know if I should add a patch for Seaboard. When you respin this, make sure to base it on current u-boot-tegra/master, and change any CONFIG_TEGRA2_MMC or _SPI references to CONFIG_TEGRA_MMC _SPI (see my changes to rename tegra periph drivers for the upcoming Tegra3 rearch). I saw that you already carry a patch in your next branch that does the renames in the tec.h configuration. Can I assume that when I respin with those changes included in the patch that introduces TEC support you'll drop that hunk from your patch? Or should I rather follow up with patches based on your next branch? Thierry pgpeUW0ETMpbb.pgp Description: PGP signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] mmc: fix wrong timeout check in mmc_send_status()
Hi Jongman, On Mon, Jun 4, 2012 at 3:32 PM, Jongman Heo jongman@gmail.com wrote: (!timeout) condition check in mmc_send_status() can never be met, because do-while loop ends up with negative timeout value, -1. Fix it by using pre-decrement. Signed-off-by: Jongman Heo jongman@gmail.com --- drivers/mmc/mmc.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c index aebe578..de19d4e 100644 --- a/drivers/mmc/mmc.c +++ b/drivers/mmc/mmc.c @@ -232,7 +232,7 @@ int mmc_send_status(struct mmc *mmc, int timeout) udelay(1000); - } while (timeout--); + } while (--timeout); #ifdef CONFIG_MMC_TRACE status = (cmd.response[0] MMC_STATUS_CURR_STATE) 9; Changing if (!timeout) to if(timeout =0) would be more consistent with other usage in mmc.c Regards, Graeme ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] malloc: remove extern declarations of malloc_bin_reloc() in board.c files
Dear Daniel Schwierzeck, On 04.06.2012 00:40, Daniel Schwierzeck wrote: Declare malloc_bin_reloc() in malloc.h and remove all extern declarations in various board.c files to get rid of one checkpatch.pl warning. Signed-off-by: Daniel Schwierzeck daniel.schwierz...@googlemail.com Cc: Wolfgang Denk w...@denx.de Cc: Andreas Bießmann andreas.de...@gmail.com Acked-by: Andreas Bießmann andreas.de...@gmail.com Cc: Jason Jin jason@freescale.com Cc: Macpaul Lin macp...@andestech.com Cc: Daniel Hellstrom dan...@gaisler.com --- arch/avr32/lib/board.c |1 - arch/m68k/lib/board.c |1 - arch/mips/lib/board.c |1 - arch/nds32/lib/board.c |2 -- arch/sparc/lib/board.c |1 - include/malloc.h |1 + 6 files changed, 1 insertion(+), 6 deletions(-) ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2] mmc: fix wrong timeout check in mmc_send_status()
(!timeout) condition check in mmc_send_status() can never be met, because do-while loop ends up with negative timeout value, -1. Fix the check to handle TIMEOUT case correctly. Signed-off-by: Jongman Heo jongman@gmail.com --- drivers/mmc/mmc.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c index aebe578..d3cca6c 100644 --- a/drivers/mmc/mmc.c +++ b/drivers/mmc/mmc.c @@ -238,7 +238,7 @@ int mmc_send_status(struct mmc *mmc, int timeout) status = (cmd.response[0] MMC_STATUS_CURR_STATE) 9; printf(CURR STATE:%d\n, status); #endif - if (!timeout) { + if (timeout = 0) { printf(Timeout waiting card ready\n); return TIMEOUT; } -- 1.7.7.6 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 2/3] omap: emif: deal with rams that return duplicate mr data on all byte lanes
Hi, arch/arm/cpu/armv7/omap-common/emif-common.c |7 ++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/arch/arm/cpu/armv7/omap-common/emif-common.c b/arch/arm/cpu/armv7/omap-common/emif-common.c index db509c9..176520c 100644 --- a/arch/arm/cpu/armv7/omap-common/emif-common.c +++ b/arch/arm/cpu/armv7/omap-common/emif-common.c @@ -56,7 +56,12 @@ static inline u32 get_mr(u32 base, u32 cs, u32 mr_addr) mr = readl(emif-emif_lpddr2_mode_reg_data); debug(get_mr: EMIF%d cs %d mr %08x val 0x%x\n, emif_num(base), cs, mr_addr, mr); - return mr; + if (((mr 0xff00) 8) == (mr 0xff) + ((mr 0x00ff) 16) == (mr 0xff) + ((mr 0xff00) 24) == (mr 0xff)) + return mr 0xff; + else + return mr; This is much needed. Thanks. Thanks, Sricharan ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 3/3] omap: emif: fix bug in manufacturer code test
Code currently tests for = 0xff. Micron manufacturer code is 0xff, so Micron memory will not be detected! Signed-off-by: Steve Sakoman st...@sakoman.com --- arch/arm/cpu/armv7/omap-common/emif-common.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/arm/cpu/armv7/omap-common/emif-common.c b/arch/arm/cpu/armv7/omap-common/emif-common.c index 176520c..46be4e8 100644 --- a/arch/arm/cpu/armv7/omap-common/emif-common.c +++ b/arch/arm/cpu/armv7/omap-common/emif-common.c @@ -831,7 +831,7 @@ static u8 is_lpddr2_sdram_present(u32 base, u32 cs, } mr = get_mr(base, cs, LPDDR2_MR5); - if (mr = 0xFF) { + if (mr 0xFF) { Looks correct.. Thanks, Sricharan ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Support for drives larger than 2.1TB with U-Boot Kirkwood
-Original Message- From: u-boot-boun...@lists.denx.de [mailto:u-boot- boun...@lists.denx.de] On Behalf Of David Purdy Sent: 02 June 2012 23:54 To: u-boot@lists.denx.de Subject: [U-Boot] Support for drives larger than 2.1TB with U-Boot Kirkwood Hello, Does anyone in the community here have experience (first-hand, preferably) knowledge regarding the use of drives larger than 2.1TB? Sorry, at least I am not, I have used up to 750gB. Regards.. Prafulla . . . ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 2/2] P4080/PBL: add tool to support pbl image build.
Hello, Anatolij, Sorry for the late response, I had no chance until recently to work on the rebase of this patch. I've posted a new version and cc-ed to you. Thanks! Best Regards, Shaohui Xie -Original Message- From: Anatolij Gustschin [mailto:ag...@denx.de] Sent: Wednesday, April 25, 2012 5:35 PM To: Xie Shaohui-B21989 Cc: u-boot@lists.denx.de; kumar.g...@freescale.com Subject: Re: [U-Boot] [PATCH 2/2] P4080/PBL: add tool to support pbl image build. Hi, On Wed, 16 Mar 2011 10:11:03 +0800 Shaohui Xie b21...@freescale.com wrote: The tool can build u-boot image which can be used by PBL, run make P4080DS_RAMBOOT_PBL can make all works done, the default output image is u-boot.pbl, for more details please refer to doc/README.pblimage. Signed-off-by: Shaohui Xie b21...@freescale.com --- Makefile|5 + board/freescale/corenet_ds/config.mk| 26 +++ board/freescale/corenet_ds/pblimage.cfg | 59 ++ common/image.c |1 + doc/README.pblimage | 83 include/image.h |1 + tools/Makefile |2 + tools/mkimage.c |5 + tools/mkimage.h |2 + tools/pblimage.c| 329 +++ tools/pblimage.h| 36 11 files changed, 549 insertions(+), 0 deletions(-) create mode 100644 board/freescale/corenet_ds/config.mk create mode 100644 board/freescale/corenet_ds/pblimage.cfg create mode 100644 doc/README.pblimage create mode 100644 tools/pblimage.c create mode 100644 tools/pblimage.h This patch doesn't apply on top of current u-boot.git master. Please rebase and resubmit. Thanks. Anatolij ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] powerpc/CoreNet: add tool to support pbl image build.
From: Shaohui Xie b21...@freescale.com Provides a tool to build boot Image for PBL(Pre boot loader) which is used on Freescale CoreNet SoCs, PBL can be used to load some instructions and/or data for pre-initialization. The default output image is u-boot.pbl, for more details please refer to doc/README.pblimage. Signed-off-by: Shaohui Xie b21...@freescale.com --- rebased to lasted tree. Makefile|5 + board/freescale/corenet_ds/config.mk| 26 +++ board/freescale/corenet_ds/pblimage.cfg | 60 ++ common/image.c |1 + doc/README.pblimage | 140 + include/image.h |1 + tools/Makefile |2 + tools/mkimage.c |5 + tools/mkimage.h |2 + tools/pblimage.c| 329 +++ tools/pblimage.h| 36 11 files changed, 607 insertions(+), 0 deletions(-) create mode 100644 board/freescale/corenet_ds/config.mk create mode 100644 board/freescale/corenet_ds/pblimage.cfg create mode 100644 doc/README.pblimage create mode 100644 tools/pblimage.c create mode 100644 tools/pblimage.h diff --git a/Makefile b/Makefile index 57ad45b..99f993a 100644 --- a/Makefile +++ b/Makefile @@ -416,6 +416,10 @@ $(obj)u-boot.kwb: $(obj)u-boot.bin $(obj)tools/mkimage -n $(CONFIG_SYS_KWD_CONFIG) -T kwbimage \ -a $(CONFIG_SYS_TEXT_BASE) -e $(CONFIG_SYS_TEXT_BASE) -d $ $@ +$(obj)u-boot.pbl: $(obj)u-boot.bin + $(obj)tools/mkimage -n $(CONFIG_PBL_CONFIG) -T pblimage \ + -d $ $@ + $(obj)u-boot.sha1: $(obj)u-boot.bin $(obj)tools/ubsha1 $(obj)u-boot.bin @@ -773,6 +777,7 @@ clobber:tidy $(obj)cscope.* $(obj)*.*~ @rm -f $(obj)u-boot $(obj)u-boot.map $(obj)u-boot.hex $(ALL-y) @rm -f $(obj)u-boot.kwb + @rm -f $(obj)u-boot.pbl @rm -f $(obj)u-boot.imx @rm -f $(obj)u-boot.ubl @rm -f $(obj)u-boot.ais diff --git a/board/freescale/corenet_ds/config.mk b/board/freescale/corenet_ds/config.mk new file mode 100644 index 000..72464dc --- /dev/null +++ b/board/freescale/corenet_ds/config.mk @@ -0,0 +1,26 @@ +# +# Copyright 2012 Freescale Semiconductor, Inc. +# +# 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 +# + +ifeq ($(CONFIG_RAMBOOT_PBL), y) +CONFIG_PBL_CONFIG = $(SRCTREE)/$(CONFIG_BOARDDIR)/pblimage.cfg +ALL-y += $(obj)u-boot.pbl +endif diff --git a/board/freescale/corenet_ds/pblimage.cfg b/board/freescale/corenet_ds/pblimage.cfg new file mode 100644 index 000..898fe6d --- /dev/null +++ b/board/freescale/corenet_ds/pblimage.cfg @@ -0,0 +1,60 @@ +# +# Copyright 2012 Freescale Semiconductor, Inc. +# Written-by: Shaohui Xieb21...@freescale.com +# +# 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., 51 Franklin Street, Fifth Floor, Boston, +# MA 02110-1301 USA +# +# Refer docs/README.pblimage for more details about how-to configure +# and create PBL boot image +# + +#PBL preamble and RCW header +aa55aa55 010e0100 +#64 bytes RCW data for P4080, replace it when building image +#for P3041DS or P5020DS. +4c58 18185218 +40464000 3c3c2000 5800 6100 + 008b6000 + + +#PBI commands +#Initialize CPC1 +0901 00200400 +09138000 +091380c0 0100 +09010100 +09010104 fffb +09010f00 0800 +0901
[U-Boot] Please pull u-boot-avr32
The following changes since commit 4398d55991eb3c2484a2a8e991d701e5d7a64874: net: sh-eth: Add support Gigabit of SH7734 (2012-05-23 17:53:09 -0500) are available in the git repository at: git://git.denx.de/u-boot-avr32.git master for you to fetch changes up to d3a105a26f89ba9f43800f9452907e01b8211da5: avr32:board.c: fix compile warning (2012-06-04 09:21:34 +0200) Andreas Bießmann (2): avr32:grasshopper: fix PHY initialisation avr32:board.c: fix compile warning arch/avr32/lib/board.c |1 - board/in-circuit/grasshopper/grasshopper.c |7 +++ 2 files changed, 7 insertions(+), 1 deletion(-) ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 2/2] avr32:board.c: fix compile warning
On 25.05.2012 12:29, Andreas Bießmann wrote: This patch fixes following warning: ---8--- board.c: In function 'board_init_r': board.c:257: warning: unused variable 's' ---8--- Patch de30122bb58fee7b0f94bcfabab595b6ad757336 missed to remove this variable too. Signed-off-by: Andreas Bießmann andreas.de...@googlemail.com applied --- arch/avr32/lib/board.c |1 - 1 file changed, 1 deletion(-) diff --git a/arch/avr32/lib/board.c b/arch/avr32/lib/board.c index b390a6c..d7a64b4 100644 --- a/arch/avr32/lib/board.c +++ b/arch/avr32/lib/board.c @@ -254,7 +254,6 @@ void board_init_r(gd_t *new_gd, ulong dest_addr) #ifndef CONFIG_ENV_IS_NOWHERE extern char * env_name_spec; #endif - char *s; bd_t *bd; gd = new_gd; ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2] Consolidate bootcount code into drivers/bootcount
This patch moves all bootcount implementations into a common directory: drivers/bootcount. The generic bootcount driver is now usable not only by powerpc platforms, but others as well. Signed-off-by: Stefan Roese s...@denx.de Cc: Heiko Schocher h...@denx.de Cc: Valentin Longchamp valentin.longch...@keymile.com Cc: Christian Riesch christian.rie...@omicron.at Cc: Manfred Rudigier manfred.rudig...@omicron.at Cc: Mike Frysinger vap...@gentoo.org Cc: Rob Herring rob.herr...@calxeda.com Cc: Reinhard Meyer reinhard.me...@emk-elektronik.de --- v2: - Added CONFIG_BOOTCOUNT_LE to bootcount_davinci.c and enabled it in calimain.h to select little-endian accessors. Makefile |3 + arch/arm/cpu/arm926ejs/at91/cpu.c | 26 --- arch/arm/cpu/armv7/highbank/Makefile |2 +- arch/arm/cpu/armv7/highbank/bootcount.c| 36 -- arch/arm/cpu/ixp/cpu.c | 22 -- arch/powerpc/lib/Makefile |1 - board/enbw/enbw_cmc/enbw_cmc.c | 29 board/keymile/km_arm/km_arm.c | 51 -- board/omicron/calimain/calimain.c | 29 drivers/bootcount/Makefile | 47 + .../powerpc/lib = drivers/bootcount}/bootcount.c | 10 ++- drivers/bootcount/bootcount_at91.c | 43 .../bootcount/bootcount_blackfin.c |0 drivers/bootcount/bootcount_davinci.c | 72 drivers/bootcount/bootcount_ram.c | 72 include/configs/calimain.h |1 + include/configs/km/km_arm.h|2 + 17 files changed, 248 insertions(+), 198 deletions(-) delete mode 100644 arch/arm/cpu/armv7/highbank/bootcount.c create mode 100644 drivers/bootcount/Makefile rename {arch/powerpc/lib = drivers/bootcount}/bootcount.c (92%) create mode 100644 drivers/bootcount/bootcount_at91.c rename arch/blackfin/cpu/bootcount.c = drivers/bootcount/bootcount_blackfin.c (100%) create mode 100644 drivers/bootcount/bootcount_davinci.c create mode 100644 drivers/bootcount/bootcount_ram.c diff --git a/Makefile b/Makefile index 659e8f2..8fd51b8 100644 --- a/Makefile +++ b/Makefile @@ -249,6 +249,9 @@ LIBS += net/libnet.o LIBS += disk/libdisk.o LIBS += drivers/bios_emulator/libatibiosemu.o LIBS += drivers/block/libblock.o +ifeq ($(CONFIG_BOOTCOUNT_LIMIT),y) +LIBS += drivers/bootcount/libbootcount.o +endif LIBS += drivers/dma/libdma.o LIBS += drivers/fpga/libfpga.o LIBS += drivers/gpio/libgpio.o diff --git a/arch/arm/cpu/arm926ejs/at91/cpu.c b/arch/arm/cpu/arm926ejs/at91/cpu.c index c47fb31..5cf4fad 100644 --- a/arch/arm/cpu/arm926ejs/at91/cpu.c +++ b/arch/arm/cpu/arm926ejs/at91/cpu.c @@ -71,29 +71,3 @@ int print_cpuinfo(void) return 0; } #endif - -#ifdef CONFIG_BOOTCOUNT_LIMIT -/* - * We combine the BOOTCOUNT_MAGIC and bootcount in one 32-bit register. - * This is done so we need to use only one of the four GPBR registers. - */ -void bootcount_store (ulong a) -{ - at91_gpbr_t *gpbr = (at91_gpbr_t *) ATMEL_BASE_GPBR; - - writel((BOOTCOUNT_MAGIC 0x) | (a 0x), - gpbr-reg[AT91_GPBR_INDEX_BOOTCOUNT]); -} - -ulong bootcount_load (void) -{ - at91_gpbr_t *gpbr = (at91_gpbr_t *) ATMEL_BASE_GPBR; - - ulong val = readl(gpbr-reg[AT91_GPBR_INDEX_BOOTCOUNT]); - if ((val 0x) != (BOOTCOUNT_MAGIC 0x)) - return 0; - else - return val 0x; -} - -#endif /* CONFIG_BOOTCOUNT_LIMIT */ diff --git a/arch/arm/cpu/armv7/highbank/Makefile b/arch/arm/cpu/armv7/highbank/Makefile index 917c3a3..76faeb0 100644 --- a/arch/arm/cpu/armv7/highbank/Makefile +++ b/arch/arm/cpu/armv7/highbank/Makefile @@ -25,7 +25,7 @@ include $(TOPDIR)/config.mk LIB= $(obj)lib$(SOC).o -COBJS := timer.o bootcount.o +COBJS := timer.o SOBJS := SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) diff --git a/arch/arm/cpu/armv7/highbank/bootcount.c b/arch/arm/cpu/armv7/highbank/bootcount.c deleted file mode 100644 index 9ca0656..000 --- a/arch/arm/cpu/armv7/highbank/bootcount.c +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright 2011 Calxeda, Inc. - * - * 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 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,
Re: [U-Boot] [PATCH v2] Consolidate bootcount code into drivers/bootcount
Hi Stefan, On 06/04/2012 02:38 PM, Stefan Roese wrote: This patch moves all bootcount implementations into a common directory: drivers/bootcount. The generic bootcount driver is now usable not only by powerpc platforms, but others as well. I have tested it on km_kirkwood (km_arm) with the bootcount_ram driver and it works as expected on this platform. Tested-by: Valentin Longchamp valentin.longch...@keymile.com Signed-off-by: Stefan Roese s...@denx.de Cc: Heiko Schocher h...@denx.de Cc: Valentin Longchamp valentin.longch...@keymile.com Cc: Christian Riesch christian.rie...@omicron.at Cc: Manfred Rudigier manfred.rudig...@omicron.at Cc: Mike Frysinger vap...@gentoo.org Cc: Rob Herring rob.herr...@calxeda.com Cc: Reinhard Meyer reinhard.me...@emk-elektronik.de --- v2: - Added CONFIG_BOOTCOUNT_LE to bootcount_davinci.c and enabled it in calimain.h to select little-endian accessors. Makefile |3 + arch/arm/cpu/arm926ejs/at91/cpu.c | 26 --- arch/arm/cpu/armv7/highbank/Makefile |2 +- arch/arm/cpu/armv7/highbank/bootcount.c| 36 -- arch/arm/cpu/ixp/cpu.c | 22 -- arch/powerpc/lib/Makefile |1 - board/enbw/enbw_cmc/enbw_cmc.c | 29 board/keymile/km_arm/km_arm.c | 51 -- board/omicron/calimain/calimain.c | 29 drivers/bootcount/Makefile | 47 + .../powerpc/lib = drivers/bootcount}/bootcount.c | 10 ++- drivers/bootcount/bootcount_at91.c | 43 .../bootcount/bootcount_blackfin.c |0 drivers/bootcount/bootcount_davinci.c | 72 drivers/bootcount/bootcount_ram.c | 72 include/configs/calimain.h |1 + include/configs/km/km_arm.h|2 + 17 files changed, 248 insertions(+), 198 deletions(-) delete mode 100644 arch/arm/cpu/armv7/highbank/bootcount.c create mode 100644 drivers/bootcount/Makefile rename {arch/powerpc/lib = drivers/bootcount}/bootcount.c (92%) create mode 100644 drivers/bootcount/bootcount_at91.c rename arch/blackfin/cpu/bootcount.c = drivers/bootcount/bootcount_blackfin.c (100%) create mode 100644 drivers/bootcount/bootcount_davinci.c create mode 100644 drivers/bootcount/bootcount_ram.c ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2] Consolidate bootcount code into drivers/bootcount
On 06/04/2012 07:38 AM, Stefan Roese wrote: This patch moves all bootcount implementations into a common directory: drivers/bootcount. The generic bootcount driver is now usable not only by powerpc platforms, but others as well. Signed-off-by: Stefan Roese s...@denx.de Cc: Heiko Schocher h...@denx.de Cc: Valentin Longchamp valentin.longch...@keymile.com Cc: Christian Riesch christian.rie...@omicron.at Cc: Manfred Rudigier manfred.rudig...@omicron.at Cc: Mike Frysinger vap...@gentoo.org Cc: Rob Herring rob.herr...@calxeda.com Cc: Reinhard Meyer reinhard.me...@emk-elektronik.de --- v2: - Added CONFIG_BOOTCOUNT_LE to bootcount_davinci.c and enabled it in calimain.h to select little-endian accessors. highbank is also LE. Why don't you use __BYTE_ORDER rather than a new define? Rob Makefile |3 + arch/arm/cpu/arm926ejs/at91/cpu.c | 26 --- arch/arm/cpu/armv7/highbank/Makefile |2 +- arch/arm/cpu/armv7/highbank/bootcount.c| 36 -- arch/arm/cpu/ixp/cpu.c | 22 -- arch/powerpc/lib/Makefile |1 - board/enbw/enbw_cmc/enbw_cmc.c | 29 board/keymile/km_arm/km_arm.c | 51 -- board/omicron/calimain/calimain.c | 29 drivers/bootcount/Makefile | 47 + .../powerpc/lib = drivers/bootcount}/bootcount.c | 10 ++- drivers/bootcount/bootcount_at91.c | 43 .../bootcount/bootcount_blackfin.c |0 drivers/bootcount/bootcount_davinci.c | 72 drivers/bootcount/bootcount_ram.c | 72 include/configs/calimain.h |1 + include/configs/km/km_arm.h|2 + 17 files changed, 248 insertions(+), 198 deletions(-) delete mode 100644 arch/arm/cpu/armv7/highbank/bootcount.c create mode 100644 drivers/bootcount/Makefile rename {arch/powerpc/lib = drivers/bootcount}/bootcount.c (92%) create mode 100644 drivers/bootcount/bootcount_at91.c rename arch/blackfin/cpu/bootcount.c = drivers/bootcount/bootcount_blackfin.c (100%) create mode 100644 drivers/bootcount/bootcount_davinci.c create mode 100644 drivers/bootcount/bootcount_ram.c diff --git a/Makefile b/Makefile index 659e8f2..8fd51b8 100644 --- a/Makefile +++ b/Makefile @@ -249,6 +249,9 @@ LIBS += net/libnet.o LIBS += disk/libdisk.o LIBS += drivers/bios_emulator/libatibiosemu.o LIBS += drivers/block/libblock.o +ifeq ($(CONFIG_BOOTCOUNT_LIMIT),y) +LIBS += drivers/bootcount/libbootcount.o +endif LIBS += drivers/dma/libdma.o LIBS += drivers/fpga/libfpga.o LIBS += drivers/gpio/libgpio.o diff --git a/arch/arm/cpu/arm926ejs/at91/cpu.c b/arch/arm/cpu/arm926ejs/at91/cpu.c index c47fb31..5cf4fad 100644 --- a/arch/arm/cpu/arm926ejs/at91/cpu.c +++ b/arch/arm/cpu/arm926ejs/at91/cpu.c @@ -71,29 +71,3 @@ int print_cpuinfo(void) return 0; } #endif - -#ifdef CONFIG_BOOTCOUNT_LIMIT -/* - * We combine the BOOTCOUNT_MAGIC and bootcount in one 32-bit register. - * This is done so we need to use only one of the four GPBR registers. - */ -void bootcount_store (ulong a) -{ - at91_gpbr_t *gpbr = (at91_gpbr_t *) ATMEL_BASE_GPBR; - - writel((BOOTCOUNT_MAGIC 0x) | (a 0x), - gpbr-reg[AT91_GPBR_INDEX_BOOTCOUNT]); -} - -ulong bootcount_load (void) -{ - at91_gpbr_t *gpbr = (at91_gpbr_t *) ATMEL_BASE_GPBR; - - ulong val = readl(gpbr-reg[AT91_GPBR_INDEX_BOOTCOUNT]); - if ((val 0x) != (BOOTCOUNT_MAGIC 0x)) - return 0; - else - return val 0x; -} - -#endif /* CONFIG_BOOTCOUNT_LIMIT */ diff --git a/arch/arm/cpu/armv7/highbank/Makefile b/arch/arm/cpu/armv7/highbank/Makefile index 917c3a3..76faeb0 100644 --- a/arch/arm/cpu/armv7/highbank/Makefile +++ b/arch/arm/cpu/armv7/highbank/Makefile @@ -25,7 +25,7 @@ include $(TOPDIR)/config.mk LIB = $(obj)lib$(SOC).o -COBJS:= timer.o bootcount.o +COBJS:= timer.o SOBJS:= SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) diff --git a/arch/arm/cpu/armv7/highbank/bootcount.c b/arch/arm/cpu/armv7/highbank/bootcount.c deleted file mode 100644 index 9ca0656..000 --- a/arch/arm/cpu/armv7/highbank/bootcount.c +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright 2011 Calxeda, Inc. - * - * 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 it will be useful, but WITHOUT - * ANY WARRANTY; without even
Re: [U-Boot] [PATCH v2] Consolidate bootcount code into drivers/bootcount
On Monday 04 June 2012 15:03:27 Rob Herring wrote: On 06/04/2012 07:38 AM, Stefan Roese wrote: This patch moves all bootcount implementations into a common directory: drivers/bootcount. The generic bootcount driver is now usable not only by powerpc platforms, but others as well. Signed-off-by: Stefan Roese s...@denx.de Cc: Heiko Schocher h...@denx.de Cc: Valentin Longchamp valentin.longch...@keymile.com Cc: Christian Riesch christian.rie...@omicron.at Cc: Manfred Rudigier manfred.rudig...@omicron.at Cc: Mike Frysinger vap...@gentoo.org Cc: Rob Herring rob.herr...@calxeda.com Cc: Reinhard Meyer reinhard.me...@emk-elektronik.de --- v2: - Added CONFIG_BOOTCOUNT_LE to bootcount_davinci.c and enabled it in calimain.h to select little-endian accessors. highbank is also LE. Yes, sure. I could move those inline functions to a header, so that they can be used by the other drivers as well. Okay? Why don't you use __BYTE_ORDER rather than a new define? Unfortunately not. There are LE platforms that use BE accessors for the bootcounter already (Davinci enbw_cmc). Mostly historical reasons I assume, since the original bootcount implementation was powerpc specific with those be32() functions. Thanks, Stefan ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2] Consolidate bootcount code into drivers/bootcount
Hi, On Mon, Jun 4, 2012 at 3:14 PM, Stefan Roese s...@denx.de wrote: On Monday 04 June 2012 15:03:27 Rob Herring wrote: On 06/04/2012 07:38 AM, Stefan Roese wrote: This patch moves all bootcount implementations into a common directory: drivers/bootcount. The generic bootcount driver is now usable not only by powerpc platforms, but others as well. Signed-off-by: Stefan Roese s...@denx.de Cc: Heiko Schocher h...@denx.de Cc: Valentin Longchamp valentin.longch...@keymile.com Cc: Christian Riesch christian.rie...@omicron.at Cc: Manfred Rudigier manfred.rudig...@omicron.at Cc: Mike Frysinger vap...@gentoo.org Cc: Rob Herring rob.herr...@calxeda.com Cc: Reinhard Meyer reinhard.me...@emk-elektronik.de --- v2: - Added CONFIG_BOOTCOUNT_LE to bootcount_davinci.c and enabled it Thanks a lot! I will test it on the calimain board. in calimain.h to select little-endian accessors. highbank is also LE. Yes, sure. I could move those inline functions to a header, so that they can be used by the other drivers as well. Okay? I don't think this is necessary. As long as a board uses its native endianess to store the boot counter, nothing special is needed. Regards, Christian Why don't you use __BYTE_ORDER rather than a new define? Unfortunately not. There are LE platforms that use BE accessors for the bootcounter already (Davinci enbw_cmc). Mostly historical reasons I assume, since the original bootcount implementation was powerpc specific with those be32() functions. Thanks, Stefan ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2] Consolidate bootcount code into drivers/bootcount
Hi Stefan, On Mon, Jun 4, 2012 at 2:38 PM, Stefan Roese s...@denx.de wrote: This patch moves all bootcount implementations into a common directory: drivers/bootcount. The generic bootcount driver is now usable not only by powerpc platforms, but others as well. For the calimain board Tested-by: Christian Riesch christian.rie...@omicron.at Thanks, Christian Signed-off-by: Stefan Roese s...@denx.de Cc: Heiko Schocher h...@denx.de Cc: Valentin Longchamp valentin.longch...@keymile.com Cc: Christian Riesch christian.rie...@omicron.at Cc: Manfred Rudigier manfred.rudig...@omicron.at Cc: Mike Frysinger vap...@gentoo.org Cc: Rob Herring rob.herr...@calxeda.com Cc: Reinhard Meyer reinhard.me...@emk-elektronik.de --- v2: - Added CONFIG_BOOTCOUNT_LE to bootcount_davinci.c and enabled it in calimain.h to select little-endian accessors. Makefile | 3 + arch/arm/cpu/arm926ejs/at91/cpu.c | 26 --- arch/arm/cpu/armv7/highbank/Makefile | 2 +- arch/arm/cpu/armv7/highbank/bootcount.c | 36 -- arch/arm/cpu/ixp/cpu.c | 22 -- arch/powerpc/lib/Makefile | 1 - board/enbw/enbw_cmc/enbw_cmc.c | 29 board/keymile/km_arm/km_arm.c | 51 -- board/omicron/calimain/calimain.c | 29 drivers/bootcount/Makefile | 47 + .../powerpc/lib = drivers/bootcount}/bootcount.c | 10 ++- drivers/bootcount/bootcount_at91.c | 43 .../bootcount/bootcount_blackfin.c | 0 drivers/bootcount/bootcount_davinci.c | 72 drivers/bootcount/bootcount_ram.c | 72 include/configs/calimain.h | 1 + include/configs/km/km_arm.h | 2 + 17 files changed, 248 insertions(+), 198 deletions(-) delete mode 100644 arch/arm/cpu/armv7/highbank/bootcount.c create mode 100644 drivers/bootcount/Makefile rename {arch/powerpc/lib = drivers/bootcount}/bootcount.c (92%) create mode 100644 drivers/bootcount/bootcount_at91.c rename arch/blackfin/cpu/bootcount.c = drivers/bootcount/bootcount_blackfin.c (100%) create mode 100644 drivers/bootcount/bootcount_davinci.c create mode 100644 drivers/bootcount/bootcount_ram.c ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] ARM: OMAP4+: Move external phy initialisations to arch specific place.
The external phy is present in the case OMAP5 soc is currently configured in emif-common.c. This results in having dummy structures for those Socs which do not have a external phy. So by having a weak function in emif-common and overriding it in OMAP5, avoids the use of dummy structures. Signed-off-by: R Sricharan r.sricha...@ti.com --- arch/arm/cpu/armv7/omap-common/emif-common.c | 32 +- arch/arm/cpu/armv7/omap4/sdram_elpida.c |3 -- arch/arm/cpu/armv7/omap5/sdram.c | 31 + arch/arm/include/asm/emif.h |2 + 4 files changed, 39 insertions(+), 29 deletions(-) diff --git a/arch/arm/cpu/armv7/omap-common/emif-common.c b/arch/arm/cpu/armv7/omap-common/emif-common.c index db509c9..278162d 100644 --- a/arch/arm/cpu/armv7/omap-common/emif-common.c +++ b/arch/arm/cpu/armv7/omap-common/emif-common.c @@ -31,6 +31,7 @@ #include asm/arch/sys_proto.h #include asm/omap_common.h #include asm/utils.h +#include linux/compiler.h inline u32 emif_num(u32 base) { @@ -114,9 +115,6 @@ static void do_lpddr2_init(u32 base, u32 cs) static void lpddr2_init(u32 base, const struct emif_regs *regs) { struct emif_reg_struct *emif = (struct emif_reg_struct *)base; - u32 *ext_phy_ctrl_base = 0; - u32 *emif_ext_phy_ctrl_base = 0; - u32 i = 0; /* Not NVM */ clrbits_le32(emif-emif_lpddr2_nvm_config, EMIF_REG_CS1NVMEN_MASK); @@ -134,29 +132,7 @@ static void lpddr2_init(u32 base, const struct emif_regs *regs) writel(regs-sdram_config_init, emif-emif_sdram_config); writel(regs-emif_ddr_phy_ctlr_1, emif-emif_ddr_phy_ctrl_1); - ext_phy_ctrl_base = (u32 *) (regs-emif_ddr_ext_phy_ctrl_1); - emif_ext_phy_ctrl_base = (u32 *) (emif-emif_ddr_ext_phy_ctrl_1); - - if (omap_revision() = OMAP5430_ES1_0) { - /* Configure external phy control timing registers */ - for (i = 0; i EMIF_EXT_PHY_CTRL_TIMING_REG; i++) { - writel(*ext_phy_ctrl_base, emif_ext_phy_ctrl_base++); - /* Update shadow registers */ - writel(*ext_phy_ctrl_base++, emif_ext_phy_ctrl_base++); - } - - /* -* external phy 6-24 registers do not change with -* ddr frequency -*/ - for (i = 0; i EMIF_EXT_PHY_CTRL_CONST_REG; i++) { - writel(ext_phy_ctrl_const_base[i], - emif_ext_phy_ctrl_base++); - /* Update shadow registers */ - writel(ext_phy_ctrl_const_base[i], - emif_ext_phy_ctrl_base++); - } - } + do_ext_phy_settings(base, regs); do_lpddr2_init(base, CS0); if (regs-sdram_config EMIF_REG_EBANK_MASK) @@ -168,6 +144,10 @@ static void lpddr2_init(u32 base, const struct emif_regs *regs) /* Enable refresh now */ clrbits_le32(emif-emif_sdram_ref_ctrl, EMIF_REG_INITREF_DIS_MASK); + } + +__weak void do_ext_phy_settings(u32 base, const struct emif_regs *regs) +{ } void emif_update_timings(u32 base, const struct emif_regs *regs) diff --git a/arch/arm/cpu/armv7/omap4/sdram_elpida.c b/arch/arm/cpu/armv7/omap4/sdram_elpida.c index b538960..8761bc2 100644 --- a/arch/arm/cpu/armv7/omap4/sdram_elpida.c +++ b/arch/arm/cpu/armv7/omap4/sdram_elpida.c @@ -90,9 +90,6 @@ const struct emif_regs emif_regs_elpida_400_mhz_2cs = { .emif_ddr_phy_ctlr_1= 0x049ff418 }; -/* Dummy registers for OMAP44xx */ -const u32 ext_phy_ctrl_const_base[EMIF_EXT_PHY_CTRL_CONST_REG]; - const struct dmm_lisa_map_regs lisa_map_2G_x_1_x_2 = { .dmm_lisa_map_0 = 0xFF020100, .dmm_lisa_map_1 = 0, diff --git a/arch/arm/cpu/armv7/omap5/sdram.c b/arch/arm/cpu/armv7/omap5/sdram.c index b2b5753..c1cf6f1 100644 --- a/arch/arm/cpu/armv7/omap5/sdram.c +++ b/arch/arm/cpu/armv7/omap5/sdram.c @@ -156,6 +156,37 @@ void emif_get_device_details(u32 emif_nr, #endif /* CONFIG_SYS_EMIF_PRECALCULATED_TIMING_REGS */ +void do_ext_phy_settings(u32 base, const struct emif_regs *regs) +{ + u32 *ext_phy_ctrl_base = 0; + u32 *emif_ext_phy_ctrl_base = 0; + u32 i = 0; + + struct emif_reg_struct *emif = (struct emif_reg_struct *)base; + + ext_phy_ctrl_base = (u32 *) (regs-emif_ddr_ext_phy_ctrl_1); + emif_ext_phy_ctrl_base = (u32 *) (emif-emif_ddr_ext_phy_ctrl_1); + + /* Configure external phy control timing registers */ + for (i = 0; i EMIF_EXT_PHY_CTRL_TIMING_REG; i++) { + writel(*ext_phy_ctrl_base, emif_ext_phy_ctrl_base++); + /* Update shadow registers */ + writel(*ext_phy_ctrl_base++, emif_ext_phy_ctrl_base++); + } + + /* +* external phy 6-24 registers do not change with +* ddr frequency +*/ + for (i
Re: [U-Boot] [PATCH v2] Consolidate bootcount code into drivers/bootcount
Rob, On Monday 04 June 2012 15:03:27 Rob Herring wrote: On 06/04/2012 07:38 AM, Stefan Roese wrote: This patch moves all bootcount implementations into a common directory: drivers/bootcount. The generic bootcount driver is now usable not only by powerpc platforms, but others as well. Signed-off-by: Stefan Roese s...@denx.de Cc: Heiko Schocher h...@denx.de Cc: Valentin Longchamp valentin.longch...@keymile.com Cc: Christian Riesch christian.rie...@omicron.at Cc: Manfred Rudigier manfred.rudig...@omicron.at Cc: Mike Frysinger vap...@gentoo.org Cc: Rob Herring rob.herr...@calxeda.com Cc: Reinhard Meyer reinhard.me...@emk-elektronik.de --- v2: - Added CONFIG_BOOTCOUNT_LE to bootcount_davinci.c and enabled it in calimain.h to select little-endian accessors. highbank is also LE. Why don't you use __BYTE_ORDER rather than a new define? I just noticed, that highbank only uses one lword as bootcounter storage. So CONFIG_SYS_BOOTCOUNT_SINGLEWORD needs to be set for the generic bootcount driver to work here. I'll fix this in v3 after a short delay for further review comments. Thanks, Stefan ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/3] omap: fix compile error in emif-common.c
Hi Steve, [snip] --- arch/arm/cpu/armv7/omap4/sdram_elpida.c |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/arm/cpu/armv7/omap4/sdram_elpida.c b/arch/arm/cpu/armv7/omap4/sdram_elpida.c index b538960..0599aaa 100644 --- a/arch/arm/cpu/armv7/omap4/sdram_elpida.c +++ b/arch/arm/cpu/armv7/omap4/sdram_elpida.c @@ -46,6 +46,9 @@ * - emif_get_device_timings() */ +/* Dummy registers for OMAP44xx */ +const u32 ext_phy_ctrl_const_base[EMIF_EXT_PHY_CTRL_CONST_REG]; + #ifdef CONFIG_SYS_EMIF_PRECALCULATED_TIMING_REGS static const struct emif_regs emif_regs_elpida_200_mhz_2cs = { @@ -90,9 +93,6 @@ const struct emif_regs emif_regs_elpida_400_mhz_2cs = { .emif_ddr_phy_ctlr_1= 0x049ff418 }; -/* Dummy registers for OMAP44xx */ -const u32 ext_phy_ctrl_const_base[EMIF_EXT_PHY_CTRL_CONST_REG]; - const struct dmm_lisa_map_regs lisa_map_2G_x_1_x_2 = { .dmm_lisa_map_0 = 0xFF020100, .dmm_lisa_map_1 = 0, In fact ext phy registers are not required for OMAP4 at all. Just posted a patch to fix this. http://marc.info/?l=u-bootm=133881742422888w=2 Thanks, Sricharan ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Detecting board revision that needs to be done after relocation
On Tue, May 29, 2012 at 08:55:34, Fabio Estevam wrote: Hi, I need to provide a get_board_rev() function that depends on I2C probe of a PMIC to decide between the board revision. I2C is only available after relocation, Not necessarily. You can use i2c probe read even before relocation provided they are no data from bss section being used. Look at below commits for details http://git.denx.de/?p=u-boot.git;a=commitdiff;h=0b620ec97e05ddb09714d127a7880333fc4008fb http://arago-project.org/git/projects/?p=u-boot-am33x.git;a=commitdiff;h=4825603ea6b2f70df2986bb489c4179383c76b5a http://arago-project.org/git/projects/?p=u-boot-am33x.git;a=commitdiff;h=0ffb997b4d2fa3fd6e99310d7eb4d034cc78d63e so what is the correct way to delay get_board_rev, so that it gets called only at a time when I2C is ready? Thanks, Fabio Estevam ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot Regards, Gururaja ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] omap: am335x_evm: remove unused definitions
UART_RESET, UART_CLK_RUNNING_MASK, and UART_SMART_IDLE_EN are defined inn evm.c but not used. Also removes unnecessary include of serial.h PHYS_DRAM_1_SIZE is defined in am335x_evm.h but never used. Signed-off-by: Steve Sakoman st...@sakoman.com --- board/ti/am335x/evm.c|5 - include/configs/am335x_evm.h |1 - 2 files changed, 0 insertions(+), 6 deletions(-) diff --git a/board/ti/am335x/evm.c b/board/ti/am335x/evm.c index 13dc603..33758b5 100644 --- a/board/ti/am335x/evm.c +++ b/board/ti/am335x/evm.c @@ -17,15 +17,10 @@ #include asm/arch/cpu.h #include asm/arch/hardware.h #include asm/arch/common_def.h -#include serial.h #include i2c.h DECLARE_GLOBAL_DATA_PTR; -#define UART_RESET (0x1 1) -#define UART_CLK_RUNNING_MASK 0x1 -#define UART_SMART_IDLE_EN (0x1 0x3) - /* * Basic board specific setup */ diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h index d0fbc88..89e2aa0 100644 --- a/include/configs/am335x_evm.h +++ b/include/configs/am335x_evm.h @@ -85,7 +85,6 @@ /* Physical Memory Map */ #define CONFIG_NR_DRAM_BANKS 1 /* 1 bank of DRAM */ #define PHYS_DRAM_10x8000 /* DRAM Bank #1 */ -#define PHYS_DRAM_1_SIZE 0x1000 /*(0x8000 / 8) 256 MB */ #define CONFIG_MAX_RAM_BANK_SIZE (1024 20)/* 1GB */ #define CONFIG_SYS_SDRAM_BASE PHYS_DRAM_1 -- 1.7.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] omap: am335x_evm: enable i2c1 channel
This patch sets up pinmux, enables fclk, and defines CONFIG_I2C_MULTI_BUS Signed-off-by: Steve Sakoman st...@sakoman.com --- arch/arm/cpu/armv7/am33xx/clock.c |5 + board/ti/am335x/mux.c |8 include/configs/am335x_evm.h |1 + 3 files changed, 14 insertions(+), 0 deletions(-) diff --git a/arch/arm/cpu/armv7/am33xx/clock.c b/arch/arm/cpu/armv7/am33xx/clock.c index bbb9c13..57bec98 100644 --- a/arch/arm/cpu/armv7/am33xx/clock.c +++ b/arch/arm/cpu/armv7/am33xx/clock.c @@ -118,6 +118,11 @@ static void enable_per_clocks(void) writel(PRCM_MOD_EN, cmwkup-wkup_i2c0ctrl); while (readl(cmwkup-wkup_i2c0ctrl) != PRCM_MOD_EN) ; + + /* i2c1 */ + writel(PRCM_MOD_EN, cmper-i2c1clkctrl); + while (readl(cmper-i2c1clkctrl) != PRCM_MOD_EN) + ; } static void mpu_pll_config(void) diff --git a/board/ti/am335x/mux.c b/board/ti/am335x/mux.c index 9ccb436..b97cfc8 100644 --- a/board/ti/am335x/mux.c +++ b/board/ti/am335x/mux.c @@ -280,6 +280,14 @@ static struct module_pin_mux i2c0_pin_mux[] = { {-1}, }; +static struct module_pin_mux i2c1_pin_mux[] = { + {OFFSET(spi0_d1), (MODE(2) | RXACTIVE | + PULLUDEN | SLEWCTRL)}, /* I2C_DATA */ + {OFFSET(spi0_cs0), (MODE(2) | RXACTIVE | + PULLUDEN | SLEWCTRL)}, /* I2C_SCLK */ + {-1}, +}; + /* * Configure the pin mux for the module */ diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h index 89e2aa0..2b41c1c 100644 --- a/include/configs/am335x_evm.h +++ b/include/configs/am335x_evm.h @@ -108,6 +108,7 @@ #define CONFIG_HARD_I2C #define CONFIG_SYS_I2C_SPEED 10 #define CONFIG_SYS_I2C_SLAVE 1 +#define CONFIG_I2C_MULTI_BUS #define CONFIG_DRIVER_OMAP24XX_I2C #define CONFIG_BAUDRATE115200 -- 1.7.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] omap: am33xx: enable gpio support
This patch uses the code in omap-common to support gpio modules 1-3 on am33xx based boards. It adds base address and register definitions, enables clocks to the modules, and enables building the common gpio code for CONFIG_AM33XX as well as CONFIG_OMAP Signed-off-by: Steve Sakoman st...@sakoman.com --- arch/arm/cpu/armv7/am33xx/board.c | 10 ++ arch/arm/cpu/armv7/am33xx/clock.c | 15 +++ arch/arm/cpu/armv7/omap-common/Makefile |2 +- arch/arm/include/asm/arch-am33xx/cpu.h | 19 +++ arch/arm/include/asm/arch-am33xx/gpio.h | 29 + 5 files changed, 74 insertions(+), 1 deletions(-) create mode 100644 arch/arm/include/asm/arch-am33xx/gpio.h diff --git a/arch/arm/cpu/armv7/am33xx/board.c b/arch/arm/cpu/armv7/am33xx/board.c index 6b7a494..47ed63c 100644 --- a/arch/arm/cpu/armv7/am33xx/board.c +++ b/arch/arm/cpu/armv7/am33xx/board.c @@ -22,6 +22,7 @@ #include asm/arch/omap.h #include asm/arch/ddr_defs.h #include asm/arch/clock.h +#include asm/arch/gpio.h #include asm/arch/mmc_host_def.h #include asm/arch/common_def.h #include asm/io.h @@ -33,6 +34,15 @@ struct wd_timer *wdtimer = (struct wd_timer *)WDT_BASE; struct gptimer *timer_base = (struct gptimer *)CONFIG_SYS_TIMERBASE; struct uart_sys *uart_base = (struct uart_sys *)DEFAULT_UART_BASE; +static const struct gpio_bank gpio_bank_am33xx[4] = { + { (void *)AM33XX_GPIO0_BASE, METHOD_GPIO_24XX }, + { (void *)AM33XX_GPIO1_BASE, METHOD_GPIO_24XX }, + { (void *)AM33XX_GPIO2_BASE, METHOD_GPIO_24XX }, + { (void *)AM33XX_GPIO3_BASE, METHOD_GPIO_24XX }, +}; + +const struct gpio_bank *const omap_gpio_bank = gpio_bank_am33xx; + /* UART Defines */ #ifdef CONFIG_SPL_BUILD #define UART_RESET (0x1 1) diff --git a/arch/arm/cpu/armv7/am33xx/clock.c b/arch/arm/cpu/armv7/am33xx/clock.c index 57bec98..c1fb75c 100644 --- a/arch/arm/cpu/armv7/am33xx/clock.c +++ b/arch/arm/cpu/armv7/am33xx/clock.c @@ -123,6 +123,21 @@ static void enable_per_clocks(void) writel(PRCM_MOD_EN, cmper-i2c1clkctrl); while (readl(cmper-i2c1clkctrl) != PRCM_MOD_EN) ; + + /* gpio1 module */ + writel(PRCM_MOD_EN, cmper-gpio1clkctrl); + while (readl(cmper-gpio1clkctrl) != PRCM_MOD_EN) + ; + + /* gpio2 module */ + writel(PRCM_MOD_EN, cmper-gpio2clkctrl); + while (readl(cmper-gpio2clkctrl) != PRCM_MOD_EN) + ; + + /* gpio3 module */ + writel(PRCM_MOD_EN, cmper-gpio3clkctrl); + while (readl(cmper-gpio3clkctrl) != PRCM_MOD_EN) + ; } static void mpu_pll_config(void) diff --git a/arch/arm/cpu/armv7/omap-common/Makefile b/arch/arm/cpu/armv7/omap-common/Makefile index 2a6625f..1394c3f 100644 --- a/arch/arm/cpu/armv7/omap-common/Makefile +++ b/arch/arm/cpu/armv7/omap-common/Makefile @@ -29,7 +29,7 @@ SOBJS := reset.o COBJS := timer.o COBJS += utils.o -ifdef CONFIG_OMAP +ifneq ($(CONFIG_AM33XX)$(CONFIG_OMAP),) COBJS += gpio.o endif diff --git a/arch/arm/include/asm/arch-am33xx/cpu.h b/arch/arm/include/asm/arch-am33xx/cpu.h index be903fb..6ef82dc 100644 --- a/arch/arm/include/asm/arch-am33xx/cpu.h +++ b/arch/arm/include/asm/arch-am33xx/cpu.h @@ -234,6 +234,25 @@ struct ctrl_stat { unsigned int statusreg; /* ofset 0x40 */ }; +/* AM33XX GPIO registers */ +#define OMAP_GPIO_REVISION 0x +#define OMAP_GPIO_SYSCONFIG0x0010 +#define OMAP_GPIO_SYSSTATUS0x0114 +#define OMAP_GPIO_IRQSTATUS1 0x002c +#define OMAP_GPIO_IRQSTATUS2 0x0030 +#define OMAP_GPIO_CTRL 0x0130 +#define OMAP_GPIO_OE 0x0134 +#define OMAP_GPIO_DATAIN 0x0138 +#define OMAP_GPIO_DATAOUT 0x013c +#define OMAP_GPIO_LEVELDETECT0 0x0140 +#define OMAP_GPIO_LEVELDETECT1 0x0144 +#define OMAP_GPIO_RISINGDETECT 0x0148 +#define OMAP_GPIO_FALLINGDETECT0x014c +#define OMAP_GPIO_DEBOUNCE_EN 0x0150 +#define OMAP_GPIO_DEBOUNCE_VAL 0x0154 +#define OMAP_GPIO_CLEARDATAOUT 0x0190 +#define OMAP_GPIO_SETDATAOUT 0x0194 + void init_timer(void); #endif /* __ASSEMBLY__ */ #endif /* __KERNEL_STRICT_NAMES */ diff --git a/arch/arm/include/asm/arch-am33xx/gpio.h b/arch/arm/include/asm/arch-am33xx/gpio.h new file mode 100644 index 000..1a211e9 --- /dev/null +++ b/arch/arm/include/asm/arch-am33xx/gpio.h @@ -0,0 +1,29 @@ +/* + * + * 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
Re: [U-Boot] [PATCH] Kirkwood: Add support for Ka-Ro TK71
Hi Marek and Prafulla, On 06/01/2012 03:03 PM, Marek Vasut wrote: Dear Prafulla Wadaskar, -Original Message- From: Marek Vasut [mailto:ma...@denx.de] Sent: 31 May 2012 16:37 To: u-boot@lists.denx.de Cc: Marek Vasut; Prafulla Wadaskar; Wolfgang Denk Subject: [PATCH] Kirkwood: Add support for Ka-Ro TK71 Signed-off-by: Marek Vasut ma...@denx.de Cc: Prafulla Wadaskar prafu...@marvell.com Cc: Wolfgang Denk w...@denx.de --- board/karo/tk71/Makefile | 45 ++ board/karo/tk71/kwbimage-256.cfg | 174 ++ board/karo/tk71/kwbimage-512.cfg | 174 ++ Dear Marek Just for DRAM size change do not add one more cfg file, configure by default 256MB of RAM in default kwbimg.cfg file and in function board_early_init_f() tune it to 512 for your other board version. There's only one single bit flipped between those two kwb configs. Do you think it'd work if we just configured the system for 512MB RAM and ran get_ram_size() to see if it has only 256MB? That'd eliminate two board entries for this tk71. I would like to have your advice on this as well Prafulla. We have tested this on km_arm (we will have the same boards with 1/2 the RAM size) and with the above get_ram_size() it works as expected. We still should, however, at some point (board_early_init_f() is a good candidate) then reduce the corresponding RAM CS size (reg @1504 for CS0 so that the window is the same size as what was detected by get_ram_size). What do you guys think ? Valentin ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] Kirkwood: Add support for Ka-Ro TK71
-Original Message- From: Valentin Longchamp [mailto:valentin.longch...@keymile.com] Sent: 04 June 2012 21:07 To: Marek Vasut Cc: Prafulla Wadaskar; u-boot@lists.denx.de; Holger Brunck Subject: Re: [PATCH] Kirkwood: Add support for Ka-Ro TK71 Hi Marek and Prafulla, On 06/01/2012 03:03 PM, Marek Vasut wrote: Dear Prafulla Wadaskar, -Original Message- From: Marek Vasut [mailto:ma...@denx.de] Sent: 31 May 2012 16:37 To: u-boot@lists.denx.de Cc: Marek Vasut; Prafulla Wadaskar; Wolfgang Denk Subject: [PATCH] Kirkwood: Add support for Ka-Ro TK71 Signed-off-by: Marek Vasut ma...@denx.de Cc: Prafulla Wadaskar prafu...@marvell.com Cc: Wolfgang Denk w...@denx.de --- board/karo/tk71/Makefile | 45 ++ board/karo/tk71/kwbimage-256.cfg | 174 ++ board/karo/tk71/kwbimage-512.cfg | 174 ++ Dear Marek Just for DRAM size change do not add one more cfg file, configure by default 256MB of RAM in default kwbimg.cfg file and in function board_early_init_f() tune it to 512 for your other board version. There's only one single bit flipped between those two kwb configs. Do you think it'd work if we just configured the system for 512MB RAM and ran get_ram_size() to see if it has only 256MB? That'd eliminate two board entries for this tk71. I would like to have your advice on this as well Prafulla. We have tested this on km_arm (we will have the same boards with 1/2 the RAM size) and with the above get_ram_size() it works as expected. We still should, however, at some point (board_early_init_f() is a good candidate) then reduce the corresponding RAM CS size (reg @1504 for CS0 so that the window is the same size as what was detected by get_ram_size). What do you guys think ? Dear Valentin Yes, we should use this method. That's why I always ask if one can reuse any existing kwbimage.cfg. It makes no sense to add one more file of 250 lines just for one or two difference/s that can be handled through board_early_init_f(). Regards.. Prafulla . . . ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] OMAP5432: do not apply 5430 non-essential pad-confs to 5432
Some of the non-essential 5432 pads have a different purpose compared to 5430, so do not apply the 5430 non-essential pads configuration to 5432. Essential pad confs are common and can/shall be shared. Signed-off-by: Sebastien Jan s-...@ti.com --- board/ti/omap5_evm/evm.c | 18 -- 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/board/ti/omap5_evm/evm.c b/board/ti/omap5_evm/evm.c index c8dfdf8..e488fa5 100644 --- a/board/ti/omap5_evm/evm.c +++ b/board/ti/omap5_evm/evm.c @@ -82,13 +82,19 @@ void set_muxconf_regs_essential(void) void set_muxconf_regs_non_essential(void) { - do_set_mux(CONTROL_PADCONF_CORE, core_padconf_array_non_essential, - sizeof(core_padconf_array_non_essential) / - sizeof(struct pad_conf_entry)); + u32 omap_rev = omap_revision(); - do_set_mux(CONTROL_PADCONF_WKUP, wkup_padconf_array_non_essential, - sizeof(wkup_padconf_array_non_essential) / - sizeof(struct pad_conf_entry)); + if (omap_rev == OMAP5430_ES1_0) { + do_set_mux(CONTROL_PADCONF_CORE, + core_padconf_array_non_essential, + sizeof(core_padconf_array_non_essential) / + sizeof(struct pad_conf_entry)); + + do_set_mux(CONTROL_PADCONF_WKUP, + wkup_padconf_array_non_essential, + sizeof(wkup_padconf_array_non_essential) / + sizeof(struct pad_conf_entry)); + } } #if !defined(CONFIG_SPL_BUILD) defined(CONFIG_GENERIC_MMC) -- 1.7.9.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] Kirkwood: Add support for Ka-Ro TK71
On 06/04/2012 05:46 PM, Prafulla Wadaskar wrote: -Original Message- From: Valentin Longchamp [mailto:valentin.longch...@keymile.com] Sent: 04 June 2012 21:07 To: Marek Vasut Cc: Prafulla Wadaskar; u-boot@lists.denx.de; Holger Brunck Subject: Re: [PATCH] Kirkwood: Add support for Ka-Ro TK71 Hi Marek and Prafulla, On 06/01/2012 03:03 PM, Marek Vasut wrote: Dear Prafulla Wadaskar, -Original Message- From: Marek Vasut [mailto:ma...@denx.de] Sent: 31 May 2012 16:37 To: u-boot@lists.denx.de Cc: Marek Vasut; Prafulla Wadaskar; Wolfgang Denk Subject: [PATCH] Kirkwood: Add support for Ka-Ro TK71 Signed-off-by: Marek Vasut ma...@denx.de Cc: Prafulla Wadaskar prafu...@marvell.com Cc: Wolfgang Denk w...@denx.de --- board/karo/tk71/Makefile | 45 ++ board/karo/tk71/kwbimage-256.cfg | 174 ++ board/karo/tk71/kwbimage-512.cfg | 174 ++ Dear Marek Just for DRAM size change do not add one more cfg file, configure by default 256MB of RAM in default kwbimg.cfg file and in function board_early_init_f() tune it to 512 for your other board version. There's only one single bit flipped between those two kwb configs. Do you think it'd work if we just configured the system for 512MB RAM and ran get_ram_size() to see if it has only 256MB? That'd eliminate two board entries for this tk71. I would like to have your advice on this as well Prafulla. We have tested this on km_arm (we will have the same boards with 1/2 the RAM size) and with the above get_ram_size() it works as expected. We still should, however, at some point (board_early_init_f() is a good candidate) then reduce the corresponding RAM CS size (reg @1504 for CS0 so that the window is the same size as what was detected by get_ram_size). What do you guys think ? Dear Valentin Yes, we should use this method. That's why I always ask if one can reuse any existing kwbimage.cfg. It makes no sense to add one more file of 250 lines just for one or two difference/s that can be handled through board_early_init_f(). but how should this work for kwbimabe.cfg files for images which will be downloaded via serial terminal and the runs directly from RAM. This patch is related to this topic: http://lists.denx.de/pipermail/u-boot/2012-May/124802.html In this case we change already the *.kwb in that way that we can download it directly into RAM and execute it directly from there. Isn't it mandatory for this usecase to have the exact RAM size specified in u-boot.kwb ? If so the above approach would not work, or we enhance the kwboot tool proposed in the patch with an additional commandline argument for the ramsize. Regards Holger ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] crashed u+boot with MV88F6560
hello. I deleted the u-boot witch MV88F6560. The board is ZTE-88F6560-FXXX this is modem of epon (ftth). I have the copy of the rom with mtdblock0 (~10MB). If I look with hex editor when I see information witch first 512KB is u-boot room. If I connect with rs232 (added max232) and checked bootrom dipswitch for ths board I have information: BootROM 1.34 If I send the backup rom with mtdblock0 (xmodem with hyperterminal) then hyperterminal send me information checksum error. I find with internet u-boot.bin then I send with hyperterminal then hyperterminal send witch board first 1024block (uboot have 1670block :( ). This not work. Log with good board connected with hyperterminal: BootROM 1.34 Booting from NAND flash BootROM: Image checksum verification PASSED U-Boot 2009.08 (Sep 20 2011 - 17:28:41) CPU: Feroceon (Rev 1) @ 1200Mhz - LE, L2 @ 400Mhz DDR3 @ 400Mhz, TClock @ 200Mhz, P/V ID=7/15 DRAM: 128 MB CS 0: base 0x size 128 MB Addresses 26M - 0M are saved for the U-Boot usage. NAND: 1bit HM ECC, Size: 32 MiB Modules Detected: GPON module detected. TDM module. Ethernet Switch on MAC0. 3xFE PHY Module. GE-PHY on Switch port #0. Net: egiga0 [PRIME], egiga1 Hit 1 to upgrade softwate version Hit enter to stop autoboot: 0 select=0x0 NAND read: device 0 offset 0x198, size 0x100 256 bytes read: OK select=0x0 search=0x2 NAND read: device 0 offset 0x8, size 0x937110 9662736 bytes read: OK NAND read: device 0 offset 0x3, size 0x3 196608 bytes read: OK ## Booting kernel from Legacy Image at 02000100 ... Image Name: Linux Kernel Image Image Type: ARM Linux Kernel Image (lzma compressed) Data Size:9662403 Bytes = 9.2 MB Load Address: 8000 Entry Point: 8000 Verifying Checksum ... OK Uncompressing (lzma) Kernel Image ... OK -- |--setup start tag... -- |--setup memory tag... -- |--setup cmdline tag... -- |--setup marvell tag... -- |--setup versioninfo tag... -- |--setup end tag... -- Starting kernel ... Linux version 2.6.21.5 (wangkai@localhost.localdomain) (gcc version 4.3.4 (Build root 2010.05) ) #44 Tue Sep 20 17:53:59 CST 2011 CPU: ARM926EJ-S [56251311] revision 1 (ARMv5TE), cr=00053977 Machine: Feroceon-KW2 Using UBoot passing parameters structure Memory policy: ECC disabled, Data cache writeback 7On node 0 totalpages: 32512 7 Normal zone: 0 pages used for memmap CPU0: D VIVT write-back cache CPU0: I cache: 16384 bytes, associativity 4, 32 byte lines, 128 sets CPU0: D cache: 16384 bytes, associativity 4, 32 byte lines, 128 sets Built 1 zonelists. Total pages: 32258 Kernel command line: console=ttyS0,115200 root=/dev/ram0 rw load_ramdisk=1 rdini t=/sbin/init mv_net_config=0 mem=127M PID hash table entries: 512 (order: 9, 2048 bytes) Console: colour dummy device 80x30 Dentry cache hash table entries: 16384 (order: 4, 65536 bytes) Inode-cache hash table entries: 8192 (order: 3, 32768 bytes) Memory: 127MB = 127MB total Memory: 116352KB available (3536K code, 714K data, 8168K init) Mount-cache hash table entries: 512 6CPU: Testing write buffer coherency: ok pdt_cspkernel_init NET: Registered protocol family 16 CPU Interface - SDRAM_CS0 base , size 128MB SDRAM_CS1 no such SDRAM_CS2 no such SDRAM_CS3 no such DEVICE_CS0 no such DEVICE_CS1 no such DEVICE_CS2 no such DEVICE_CS3 no such PEX0_MEM base f300, size 16MB PEX0_IO base f200, size 1MB PEX1_MEM base f400, size 16MB PEX1_IO base f210, size 1MB INTER_REGS base f100, size 1MB NAND_NOR_CS base f800, size 2MB SPI_CS0 base f000, size 16MB SPI_CS1 no such SPI_CS2 no such SPI_CS3 no such 4SPI_CS4 no such SPI_CS5 no such SPI_CS6 no such SPI_CS7 no such SPI_B_CS0 no such BOOT_ROM_CS no such 4DEV_BOOTCS no such CRYPT1_ENG no such CRYPT2_ENG no such PNC_BM base f500, size 1MB ETH_CTRL base f510, size 1MB PON_CTRL base f520, size 1MB NFC_CTRL no such Marvell Development Board (LSP Version KW2_LSP_1.0.4_p26_KERNEL_2.6.21.5_NQ)-- ZTE-88F6560-FXXX Soc: MV88F6560 Rev 2 LE Detected Tclk 2 and SysClk 4 g_pdwWdRsvMemBase is c800g_dwWdRsvMemLen is 40052 magic has been changed! g_pdwWdRegTableBase = c80c : success register character device for /dev/watchdog Marvell USB EHCI Host controller #0: c0d75600 4PEX0 interface detected no Link. PEX1 interface detected Link X4 PCI: bus0: Fast back to back transfers enabled PCI: bus1: Fast back to back transfers disabled SCSI subsystem initialized Time: kw_clocksource clocksource has been installed. NET: Registered protocol family 2
[U-Boot] crashed u-boot with MV88F6560
hello. I deleted the u-boot witch MV88F6560. The board is ZTE-88F6560-FXXX this is modem of epon (ftth). I have the copy of the rom with mtdblock0 (~10MB). If I look with hex editor when I see information witch first 512KB is u-boot room. If I connect with rs232 (added max232) and checked bootrom dipswitch for ths board I have information: BootROM 1.34 If I send the backup rom with mtdblock0 (xmodem with hyperterminal) then hyperterminal send me information checksum error. I find with internet u-boot.bin then I send with hyperterminal then hyperterminal send witch board first 1024block (uboot have 1670block :( ). This not work. Log with good board connected with hyperterminal: BootROM 1.34 Booting from NAND flash BootROM: Image checksum verification PASSED U-Boot 2009.08 (Sep 20 2011 - 17:28:41) CPU: Feroceon (Rev 1) @ 1200Mhz - LE, L2 @ 400Mhz DDR3 @ 400Mhz, TClock @ 200Mhz, P/V ID=7/15 DRAM: 128 MB CS 0: base 0x size 128 MB Addresses 26M - 0M are saved for the U-Boot usage. NAND: 1bit HM ECC, Size: 32 MiB Modules Detected: GPON module detected. TDM module. Ethernet Switch on MAC0. 3xFE PHY Module. GE-PHY on Switch port #0. Net: egiga0 [PRIME], egiga1 Hit 1 to upgrade softwate version Hit enter to stop autoboot: 0 select=0x0 NAND read: device 0 offset 0x198, size 0x100 256 bytes read: OK select=0x0 search=0x2 NAND read: device 0 offset 0x8, size 0x937110 9662736 bytes read: OK NAND read: device 0 offset 0x3, size 0x3 196608 bytes read: OK ## Booting kernel from Legacy Image at 02000100 ... Image Name: Linux Kernel Image Image Type: ARM Linux Kernel Image (lzma compressed) Data Size:9662403 Bytes = 9.2 MB Load Address: 8000 Entry Point: 8000 Verifying Checksum ... OK Uncompressing (lzma) Kernel Image ... OK -- |--setup start tag... -- |--setup memory tag... -- |--setup cmdline tag... -- |--setup marvell tag... -- |--setup versioninfo tag... -- |--setup end tag... -- Starting kernel ... Linux version 2.6.21.5 (wangkai@localhost.localdomain) (gcc version 4.3.4 (Build root 2010.05) ) #44 Tue Sep 20 17:53:59 CST 2011 CPU: ARM926EJ-S [56251311] revision 1 (ARMv5TE), cr=00053977 Machine: Feroceon-KW2 Using UBoot passing parameters structure Memory policy: ECC disabled, Data cache writeback 7On node 0 totalpages: 32512 7 Normal zone: 0 pages used for memmap CPU0: D VIVT write-back cache CPU0: I cache: 16384 bytes, associativity 4, 32 byte lines, 128 sets CPU0: D cache: 16384 bytes, associativity 4, 32 byte lines, 128 sets Built 1 zonelists. Total pages: 32258 Kernel command line: console=ttyS0,115200 root=/dev/ram0 rw load_ramdisk=1 rdini t=/sbin/init mv_net_config=0 mem=127M PID hash table entries: 512 (order: 9, 2048 bytes) Console: colour dummy device 80x30 Dentry cache hash table entries: 16384 (order: 4, 65536 bytes) Inode-cache hash table entries: 8192 (order: 3, 32768 bytes) Memory: 127MB = 127MB total Memory: 116352KB available (3536K code, 714K data, 8168K init) Mount-cache hash table entries: 512 6CPU: Testing write buffer coherency: ok pdt_cspkernel_init NET: Registered protocol family 16 CPU Interface - SDRAM_CS0 base , size 128MB SDRAM_CS1 no such SDRAM_CS2 no such SDRAM_CS3 no such DEVICE_CS0 no such DEVICE_CS1 no such DEVICE_CS2 no such DEVICE_CS3 no such PEX0_MEM base f300, size 16MB PEX0_IO base f200, size 1MB PEX1_MEM base f400, size 16MB PEX1_IO base f210, size 1MB INTER_REGS base f100, size 1MB NAND_NOR_CS base f800, size 2MB SPI_CS0 base f000, size 16MB SPI_CS1 no such SPI_CS2 no such SPI_CS3 no such 4SPI_CS4 no such SPI_CS5 no such SPI_CS6 no such SPI_CS7 no such SPI_B_CS0 no such BOOT_ROM_CS no such 4DEV_BOOTCS no such CRYPT1_ENG no such CRYPT2_ENG no such PNC_BM base f500, size 1MB ETH_CTRL base f510, size 1MB PON_CTRL base f520, size 1MB NFC_CTRL no such Marvell Development Board (LSP Version KW2_LSP_1.0.4_p26_KERNEL_2.6.21.5_NQ)-- ZTE-88F6560-FXXX Soc: MV88F6560 Rev 2 LE Detected Tclk 2 and SysClk 4 g_pdwWdRsvMemBase is c800g_dwWdRsvMemLen is 40052 magic has been changed! g_pdwWdRegTableBase = c80c : success register character device for /dev/watchdog Marvell USB EHCI Host controller #0: c0d75600 4PEX0 interface detected no Link. PEX1 interface detected Link X4 PCI: bus0: Fast back to back transfers enabled PCI: bus1: Fast back to back transfers disabled SCSI subsystem initialized Time: kw_clocksource clocksource has been installed. NET: Registered protocol
Re: [U-Boot] [PATCH v2 4/7] tegra: Allow boards to perform early GPIO setup
Thierry, -Original Message- From: Thierry Reding [mailto:thierry.red...@avionic-design.de] Sent: Sunday, June 03, 2012 11:09 PM To: Tom Warren Cc: Stephen Warren; u-boot@lists.denx.de; Simon Glass Subject: Re: [PATCH v2 4/7] tegra: Allow boards to perform early GPIO setup * PGP Signed by an unknown key * Tom Warren wrote: Thierry, -Original Message- From: Thierry Reding [mailto:thierry.red...@avionic-design.de] Sent: Friday, May 25, 2012 11:00 AM To: Stephen Warren Cc: u-boot@lists.denx.de; Tom Warren; Simon Glass Subject: Re: [PATCH v2 4/7] tegra: Allow boards to perform early GPIO setup Old Signed by an unknown key * Thierry Reding wrote: Furthermore I'll need to rebase the patches onto the Tegra branch due to the major restructuring of the configuration files. This isn't true. But I'll still have to respin because of the MAINTAINERS entry and the other points that you brought up, so let me know if I should add a patch for Seaboard. When you respin this, make sure to base it on current u-boot-tegra/master, and change any CONFIG_TEGRA2_MMC or _SPI references to CONFIG_TEGRA_MMC _SPI (see my changes to rename tegra periph drivers for the upcoming Tegra3 rearch). I saw that you already carry a patch in your next branch that does the renames in the tec.h configuration. Can I assume that when I respin with those changes included in the patch that introduces TEC support you'll drop that hunk from your patch? Or should I rather follow up with patches based on your next branch? Of course, I'd like to minimize my churn in /next as much as possible, but I can work with whatever you come up with in your revised patchset. Thanks, Tom Thierry * Unknown Key * 0xA2E3269F -- nvpublic ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] Kirkwood: Add support for Ka-Ro TK71
-Original Message- From: Holger Brunck [mailto:holger.bru...@keymile.com] Sent: 04 June 2012 21:50 To: Prafulla Wadaskar Cc: Valentin Longchamp; Marek Vasut; u-boot@lists.denx.de Subject: Re: [PATCH] Kirkwood: Add support for Ka-Ro TK71 On 06/04/2012 05:46 PM, Prafulla Wadaskar wrote: -Original Message- From: Valentin Longchamp [mailto:valentin.longch...@keymile.com] Sent: 04 June 2012 21:07 To: Marek Vasut Cc: Prafulla Wadaskar; u-boot@lists.denx.de; Holger Brunck Subject: Re: [PATCH] Kirkwood: Add support for Ka-Ro TK71 Hi Marek and Prafulla, On 06/01/2012 03:03 PM, Marek Vasut wrote: Dear Prafulla Wadaskar, -Original Message- From: Marek Vasut [mailto:ma...@denx.de] Sent: 31 May 2012 16:37 To: u-boot@lists.denx.de Cc: Marek Vasut; Prafulla Wadaskar; Wolfgang Denk Subject: [PATCH] Kirkwood: Add support for Ka-Ro TK71 Signed-off-by: Marek Vasut ma...@denx.de Cc: Prafulla Wadaskar prafu...@marvell.com Cc: Wolfgang Denk w...@denx.de --- board/karo/tk71/Makefile | 45 ++ board/karo/tk71/kwbimage-256.cfg | 174 ++ board/karo/tk71/kwbimage-512.cfg | 174 ++ Dear Marek Just for DRAM size change do not add one more cfg file, configure by default 256MB of RAM in default kwbimg.cfg file and in function board_early_init_f() tune it to 512 for your other board version. There's only one single bit flipped between those two kwb configs. Do you think it'd work if we just configured the system for 512MB RAM and ran get_ram_size() to see if it has only 256MB? That'd eliminate two board entries for this tk71. I would like to have your advice on this as well Prafulla. We have tested this on km_arm (we will have the same boards with 1/2 the RAM size) and with the above get_ram_size() it works as expected. We still should, however, at some point (board_early_init_f() is a good candidate) then reduce the corresponding RAM CS size (reg @1504 for CS0 so that the window is the same size as what was detected by get_ram_size). What do you guys think ? Dear Valentin Yes, we should use this method. That's why I always ask if one can reuse any existing kwbimage.cfg. It makes no sense to add one more file of 250 lines just for one or two difference/s that can be handled through board_early_init_f(). but how should this work for kwbimabe.cfg files for images which will be downloaded via serial terminal and the runs directly from RAM. This patch is related to this topic: http://lists.denx.de/pipermail/u-boot/2012-May/124802.html In this case we change already the *.kwb in that way that we can download it directly into RAM and execute it directly from there. Isn't it mandatory for this usecase to have the exact RAM size specified in u-boot.kwb ? If so the above approach would not work, or we enhance the kwboot tool proposed in the patch with an additional commandline argument for the ramsize. In theory one common kwbimage.cfg should be used by both methods (boot from UART and boot from media) Currently kwbimage.cfg embeds boot option, it can be abstracted and u-boot.kwb can be prepared for boot from UART or boot from media (flash). This can be addressed through u-boot.kwb target generation ( mkimage tool is not mandatory). Whereas u-boot.kwb prepared for UART can be fetched by said tool into RAM by Kirkwood and will be executed in the same way (as it fetches and executes from flash) Regards.. Prafulla . . . ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] tegra: override compiler flags for low level init code
On Mon, May 14, 2012 at 04:23:33PM -0700, Stephen Warren wrote: On 05/14/2012 05:14 PM, Allen Martin wrote: Override -march setting for tegra to -march=armv4t for files that are necessary for low level init on tegra. The recent change to use -march=armv7-a for armv7 caused a regression on tegra because tegra starts boot on a arm7tdmi processor before transferring control to the cortex-a9. While still executing on the arm7tdmi there are calls to getenv_ulong() and memset() that cause an illegal instruction exception if compiled for armv7. Signed-off-by: Allen Martin amar...@nvidia.com Tested-by: Stephen Warren swar...@wwwdotorg.org (This seems to be necessary to use gcc-4.6.1, but not gcc-4.5.3. The Whistler patches I just sent were tested with this fix in place) Hi Tom, could you pick this up in u-boot-tegra? Without it tegra is currently broken in both u-boot-tegra and u-boot gits depending on the compiler you use. -Allen -- nvpublic ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] tegra: override compiler flags for low level init code
On 06/04/2012 11:54 AM, Allen Martin wrote: On Mon, May 14, 2012 at 04:23:33PM -0700, Stephen Warren wrote: On 05/14/2012 05:14 PM, Allen Martin wrote: Override -march setting for tegra to -march=armv4t for files that are necessary for low level init on tegra. The recent change to use -march=armv7-a for armv7 caused a regression on tegra because tegra starts boot on a arm7tdmi processor before transferring control to the cortex-a9. While still executing on the arm7tdmi there are calls to getenv_ulong() and memset() that cause an illegal instruction exception if compiled for armv7. Signed-off-by: Allen Martin amar...@nvidia.com Tested-by: Stephen Warren swar...@wwwdotorg.org (This seems to be necessary to use gcc-4.6.1, but not gcc-4.5.3. The Whistler patches I just sent were tested with this fix in place) Hi Tom, could you pick this up in u-boot-tegra? Without it tegra is currently broken in both u-boot-tegra and u-boot gits depending on the compiler you use. It's been there for a while, I believe, at least in u-boot-tegra/master. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] tegra: override compiler flags for low level init code
On Mon, Jun 04, 2012 at 11:00:35AM -0700, Stephen Warren wrote: On 06/04/2012 11:54 AM, Allen Martin wrote: Hi Tom, could you pick this up in u-boot-tegra? Without it tegra is currently broken in both u-boot-tegra and u-boot gits depending on the compiler you use. It's been there for a while, I believe, at least in u-boot-tegra/master. Ah you're right sorry, my remote was stale. What's the next merge window to get this into u-boot/master? I imagine other people must be running into this too. -Allen -- nvpublic ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] tegra: override compiler flags for low level init code
Allen, -Original Message- From: Allen Martin [mailto:amar...@nvidia.com] Sent: Monday, June 04, 2012 11:06 AM To: Stephen Warren Cc: Tom Warren; vap...@gentoo.org; w...@denx.de; u-boot@lists.denx.de Subject: Re: [PATCH] tegra: override compiler flags for low level init code On Mon, Jun 04, 2012 at 11:00:35AM -0700, Stephen Warren wrote: On 06/04/2012 11:54 AM, Allen Martin wrote: Hi Tom, could you pick this up in u-boot-tegra? Without it tegra is currently broken in both u-boot-tegra and u-boot gits depending on the compiler you use. It's been there for a while, I believe, at least in u-boot-tegra/master. Ah you're right sorry, my remote was stale. What's the next merge window to get this into u-boot/master? I imagine other people must be running into this too. Sorry, not sure. Adding Wolfgang and Albert - it really depends on them. The pull request that contains this patch went out on Thursday. Tom -Allen -- nvpublic ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] tegra: add enterrcm command
From: Stephen Warren swar...@nvidia.com Tegra's boot ROM supports a mode whereby code may be downloaded and flash programmed over a USB connection. On dev boards, this is typically entered by holding down a force recovery button and resetting the CPU. However, not all boards have such a button (one example is the Compulab Trimslice), so a method to enter RCM from software is useful. This change implements the command enterrcm to do this, and enables it for all Tegra boards by default. Even on boards other than Trimslice, controlling this over a UART may be useful, e.g. to allow simple remote control without the need for mechanical button actuators, or hooking up relays/... to the button. Signed-off-by: Stephen Warren swar...@nvidia.com --- arch/arm/cpu/armv7/tegra2/Makefile |1 + arch/arm/cpu/armv7/tegra2/cmd_enterrcm.c | 65 ++ include/configs/tegra2-common.h |1 + 3 files changed, 67 insertions(+), 0 deletions(-) create mode 100644 arch/arm/cpu/armv7/tegra2/cmd_enterrcm.c diff --git a/arch/arm/cpu/armv7/tegra2/Makefile b/arch/arm/cpu/armv7/tegra2/Makefile index 08c4137..80da453 100644 --- a/arch/arm/cpu/armv7/tegra2/Makefile +++ b/arch/arm/cpu/armv7/tegra2/Makefile @@ -39,6 +39,7 @@ COBJS-$(CONFIG_TEGRA_CLOCK_SCALING) += emc.o COBJS-$(CONFIG_TEGRA_PMU) += pmu.o COBJS-$(CONFIG_USB_EHCI_TEGRA) += usb.o COBJS-$(CONFIG_TEGRA2_LP0) += crypto.o warmboot.o warmboot_avp.o +COBJS-$(CONFIG_CMD_ENTERRCM) += cmd_enterrcm.o COBJS := $(COBJS-y) SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) diff --git a/arch/arm/cpu/armv7/tegra2/cmd_enterrcm.c b/arch/arm/cpu/armv7/tegra2/cmd_enterrcm.c new file mode 100644 index 000..2fcd107 --- /dev/null +++ b/arch/arm/cpu/armv7/tegra2/cmd_enterrcm.c @@ -0,0 +1,65 @@ +/* + * Copyright (c) 2012, NVIDIA CORPORATION. All rights reserved. + * + * Derived from code (arch/arm/lib/reset.c) that is: + * + * (C) Copyright 2002 + * Sysgo Real-Time Solutions, GmbH www.elinos.com + * Marius Groeger mgroe...@sysgo.de + * + * (C) Copyright 2002 + * Sysgo Real-Time Solutions, GmbH www.elinos.com + * Alex Zuepke a...@sysgo.de + * + * (C) Copyright 2002 + * Gary Jennejohn, DENX Software Engineering, ga...@denx.de + * + * (C) Copyright 2004 + * DAVE Srl + * http://www.dave-tech.it + * http://www.wawnet.biz + * mailto:i...@wawnet.biz + * + * (C) Copyright 2004 Texas Insturments + * + * 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, see http://www.gnu.org/licenses/. + */ + +#include common.h +#include asm/arch/tegra2.h +#include asm/arch/pmc.h + +static int do_enterrcm(cmd_tbl_t *cmdtp, int flag, int argc, + char * const argv[]) +{ + struct pmc_ctlr *pmc = (struct pmc_ctlr *)TEGRA2_PMC_BASE; + + puts(Entering RCM...\n); + udelay(5); + + pmc-pmc_scratch0 = 2; + disable_interrupts(); + reset_cpu(0); + + return 0; +} + +U_BOOT_CMD( + enterrcm, 1, 0, do_enterrcm, + reset Tegra and enter USB Recovery Mode, + +); diff --git a/include/configs/tegra2-common.h b/include/configs/tegra2-common.h index b11461c..8393901 100644 --- a/include/configs/tegra2-common.h +++ b/include/configs/tegra2-common.h @@ -194,4 +194,5 @@ #define CONFIG_TEGRA_GPIO #define CONFIG_CMD_GPIO +#define CONFIG_CMD_ENTERRCM #endif /* __TEGRA2_COMMON_H */ -- 1.7.0.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] net: Multiple updates/enhancements to designware.c
Hi Stefan, On Fri, Jun 1, 2012 at 7:55 AM, Stefan Roese s...@denx.de wrote: Joe, On Wednesday 09 May 2012 11:36:56 Stefan Roese wrote: +++ b/include/configs/spear-common.h @@ -38,6 +38,7 @@ #define CONFIG_NET_MULTI #define CONFIG_PHY_RESET_DELAY 1 /* in usec */ #define CONFIG_DW_AUTONEG +#define CONFIG_PHY_GIGE /* Include GbE speed/duplex detection */ Shouldn't this come in a separate patch? Not sure. This change is needed for this change in the designware driver to really work with 1000mbps links: - Use common functions miiphy_speed() miiphy_duplex() to read link status from PHY. Splitting it into a separate commit will result in a non working ethernet driver for such links. Even though it should still compile and be git bisectable. I would prefer to keep it in one patch. Are you okay with this patch? If yes, perhaps it would be best if I would push this patch with the other SPEAr platform patches upstream. What do you think? Can I have your Acked-by? I'm not especially fond of adding prints, but it seems in line with the existing behavior. Acked-by: Joe Hershberger joe.hershber...@gmail.com ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/3] common/cmd_rsmode.c: add imx reset mode command
Dear Troy Kisky, In message 1338066111-5835-1-git-send-email-troy.ki...@boundarydevices.com you wrote: This is useful for forcing the ROM's usb downloader to activate upon a watchdog reset. Or, you can boot from either SD Card. Currently, support added for MX53 and MX6Q Signed-off-by: Troy Kisky troy.ki...@boundarydevices.com This is highly architecture specific code. I do not want to have this in the common/ directory. --- /dev/null +++ b/common/cmd_rsmode.c @@ -0,0 +1,118 @@ ... +#ifdef CONFIG_MX53 ... +#ifdef CONFIG_MX6Q ... Instead of starting a (probably growing) list of #ifdef's here, you whould rather just include a header file which gets auto-selected for the CPU in use by the usual config mechanism. So please move allthese defines into appropriate header files. +#define SBMR_COPY_ADDR ((struct srtc_regs *)SRTC_BASE_ADDR)-lpgr NAK. This is ugly and does not scale. Feel free to provide architecturre specific (inline?) accessor functions to this register. +int do_rsmode(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +{ + int i; + if (argc 2) { Empty line between declarations and code, please. +options: + printf(Options:\n); + for (i = 0; i ARRAY_SIZE(modes); i++) + printf(%s\n, modes[i].name); + return 0; NAK. The command should return proper error codes. Please use the regular usage() call here. + if (i = ARRAY_SIZE(modes)) + goto options; Please get rid of this goto. + writel(modes[i].cfg_val, SBMR_COPY_ADDR); +#ifdef SMBR_COPY_ENABLE_ADDR + { + unsigned reg = readl(SMBR_COPY_ENABLE_ADDR); + if (i) + reg |= 1 28; + else + reg = ~(1 28); + writel(reg, SMBR_COPY_ENABLE_ADDR); + } +#endif You mean, if SMBR_COPY_ENABLE_ADDR was not defined, the command would silently turn into a NOP? One more reson not to allow such code. +U_BOOT_CMD( + rsmode, 2, 0, do_rsmode, + change reset mode to normal/usb/sata/ecspi1:1/esdhc1, How do you intend to keep this doucmentation in sync with the code? Either the above code (reading the entries to mode[]) is redundant, or this is incorrect - or probably both. 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 The question of whether a computer can think is no more interesting than the question of whether a submarine can swim - Edsgar W. Dijkstra ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/3] common/cmd_rsmode.c: add imx reset mode command
Dear Eric Nelson, In message 4fc4dc4e.9030...@boundarydevices.com you wrote: Writing a 4 to the WDOG_BASE register enables the watchdog with a 1/2s delay. I think there should be a delay or while(1) loop afterwards though. It appears that the reset_cpu() routine will return. I recommend NOT messing with the watchdog for any unrelated functions. The function of the watchdog should be reserved for auch systems who need it to implement security related functions; messing with it in unrelated places (like setting it into unexpected states and or timeouts) may cause undefined behaviour on such systems. Don't do it. 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 Name one thing windows is better than unix in? Making money for Microsoft? -- Randal L. Schwartz in 8cvi5t4c3t@gadget.cscaper.com ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v8 2/4] net: use common rand()/srand() functions
Hi Michael, On Fri, Jun 1, 2012 at 3:39 PM, Michael Walle mich...@walle.cc wrote: Replace rand() with the functions from lib/. The link-local network code stores its own seed, derived from the MAC address. Thus making it independent from calls to srand() in other modules. Signed-off-by: Michael Walle mich...@walle.cc Cc: Joe Hershberger joe.hershber...@ni.com --- Acked-by: Joe Hershberger joe.hershber...@ni.com ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/3] common/cmd_rsmode.c: add imx reset mode command
On 06/04/2012 12:52 PM, Wolfgang Denk wrote: Dear Eric Nelson, In message4fc4dc4e.9030...@boundarydevices.com you wrote: Writing a 4 to the WDOG_BASE register enables the watchdog with a 1/2s delay. I think there should be a delay or while(1) loop afterwards though. It appears that the reset_cpu() routine will return. I recommend NOT messing with the watchdog for any unrelated functions. The function of the watchdog should be reserved for auch systems who need it to implement security related functions; messing with it in unrelated places (like setting it into unexpected states and or timeouts) may cause undefined behaviour on such systems. Don't do it. Hi Wolfgang, My comment is that reset_cpu() should probably not return, and at the moment it will. The minimum WDT timeout value is 1/2 second, so execution will continue for some time less than that. It seems to me that this might be a bad thing, allowing unexpected execution of commands in a script after the execution of the 'reset' command. If I understand your comment, you're saying that reset_cpu() should not be implemented using the watchdog. Is that right? Please advise, Eric ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/3] common/cmd_rsmode.c: add imx reset mode command
On 6/4/2012 12:46 PM, Wolfgang Denk wrote: Dear Troy Kisky, In message1338066111-5835-1-git-send-email-troy.ki...@boundarydevices.com you wrote: This is useful for forcing the ROM's usb downloader to activate upon a watchdog reset. Or, you can boot from either SD Card. Currently, support added for MX53 and MX6Q Signed-off-by: Troy Kiskytroy.ki...@boundarydevices.com This is highly architecture specific code. I do not want to have this in the common/ directory. --- /dev/null +++ b/common/cmd_rsmode.c @@ -0,0 +1,118 @@ ... +#ifdef CONFIG_MX53 ... +#ifdef CONFIG_MX6Q ... Instead of starting a (probably growing) list of #ifdef's here, you whould rather just include a header file which gets auto-selected for the CPU in use by the usual config mechanism. So please move allthese defines into appropriate header files. +#define SBMR_COPY_ADDR((struct srtc_regs *)SRTC_BASE_ADDR)-lpgr NAK. This is ugly and does not scale. Feel free to provide architecturre specific (inline?) accessor functions to this register. +int do_rsmode(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +{ + int i; + if (argc 2) { Empty line between declarations and code, please. +options: + printf(Options:\n); + for (i = 0; i ARRAY_SIZE(modes); i++) + printf(%s\n, modes[i].name); + return 0; NAK. The command should return proper error codes. Please use the regular usage() call here. + if (i= ARRAY_SIZE(modes)) + goto options; Please get rid of this goto. + writel(modes[i].cfg_val, SBMR_COPY_ADDR); +#ifdef SMBR_COPY_ENABLE_ADDR + { + unsigned reg = readl(SMBR_COPY_ENABLE_ADDR); + if (i) + reg |= 1 28; + else + reg= ~(1 28); + writel(reg, SMBR_COPY_ENABLE_ADDR); + } +#endif You mean, if SMBR_COPY_ENABLE_ADDR was not defined, the command would silently turn into a NOP? One more reson not to allow such code. +U_BOOT_CMD( + rsmode, 2, 0, do_rsmode, + change reset mode to normal/usb/sata/ecspi1:1/esdhc1, How do you intend to keep this doucmentation in sync with the code? Either the above code (reading the entries to mode[]) is redundant, or this is incorrect - or probably both. Thanks for the feedback. I'll try building this string at run-time to keep consistent. Best regards, Wolfgang Denk ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 03/11] cfb_console: Fix function console_back
Hi, On Fri, 01 Jun 2012 20:42:29 +0200 Pali Rohár pali.ro...@gmail.com wrote: ... Ok, when this patch will be in u-boot master? I'm going to submit my pull request soon. It will be in master when Wolfgang pulls my tree. Thanks, Anatolij ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v3 05/11] cfb_console: Add console_clear_line function
On Sun, 20 May 2012 22:38:08 +0200 Anatolij Gustschin ag...@denx.de wrote: From: Pali Rohár pali.ro...@gmail.com console_clear_line() clears part of specified line or the full line. Signed-off-by: Pali Rohár pali.ro...@gmail.com Signed-off-by: Anatolij Gustschin ag...@denx.de --- Changes since v2: - remove console_clear() from this patch, it should be added in another patch which uses this function - fix arguments for hw accelerated fill and drop FIXME comments - fix console_clear_line() end argument, as we start counting columns from zero - fix coding style - extend comments - tested the code with hw accelerated fill drivers/video/cfb_console.c | 49 +++--- 1 files changed, 36 insertions(+), 13 deletions(-) Applied to u-boot-video/master. Thanks! Anatolij ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v3] video: atmel/lcd: add LCD driver for new Atmel SoC
On Fri, 25 May 2012 12:59:58 +0200 Anatolij Gustschin ag...@denx.de wrote: From: Bo Shen voice.s...@atmel.com The new Atmel SoC (at91sam9x5 series and at91sam9n12) add a totally different LCD controller. Add this new driver to support it. Using CONFIG_ATMEL_HLCD (distinguish with CONFIG_ATMEL_LCD) to enable this in board configuration file. Signed-off-by: Bo Shen voice.s...@atmel.com Signed-off-by: Anatolij Gustschin ag...@denx.de --- Changes since v2: - rebase on current tree - convert to use struct for register offsets - fix indentation in header file - slightly revise commit log drivers/video/Makefile |1 + drivers/video/atmel_hlcdfb.c | 211 ++ include/atmel_hlcdc.h| 231 ++ include/lcd.h|3 +- 4 files changed, 445 insertions(+), 1 deletions(-) create mode 100644 drivers/video/atmel_hlcdfb.c create mode 100644 include/atmel_hlcdc.h Applied to u-boot-video/master. Thanks! Anatolij ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 1/2] tegra: bootcmd enhancements
From: Stephen Warren swar...@nvidia.com Place the list of searched boot devices, file-system types, boot file locations/prefixes, and boot script names into variables. This allows the user to override them directly (e.g. to change boot order, or select the specific values they use) without having to edit the main bootcmd and script_boot variables. The default boot order is changed from USB, MMC, DHCP to MMC, USB, DHCP. This speeds up the typical MMC boot case. People who want USB boot can now edit variable boot_targets appropriately. Also, reformat BOOTCMDS_COMMON to fit within 80 columns. Potential future enhancements might be: * Allow boards to specify which of bootcmd_mmc0/... should be defined, based on the HW they contain. * Allow boards to influence the order that the boot targets are added into the boot_targets variable. Signed-off-by: Stephen Warren swar...@nvidia.com --- include/configs/tegra2-common-post.h | 82 + 1 files changed, 52 insertions(+), 30 deletions(-) diff --git a/include/configs/tegra2-common-post.h b/include/configs/tegra2-common-post.h index 0484a52..85b037c 100644 --- a/include/configs/tegra2-common-post.h +++ b/include/configs/tegra2-common-post.h @@ -31,15 +31,15 @@ #else #ifdef CONFIG_CMD_EXT2 -#define BOOTCMD_FS_EXT2 ext2 +#define BOOT_FSTYPE_EXT2 ext2 #else -#define BOOTCMD_FS_EXT2 +#define BOOT_FSTYPE_EXT2 #endif #ifdef CONFIG_CMD_FAT -#define BOOTCMD_FS_FAT fat +#define BOOT_FSTYPE_FAT fat #else -#define BOOTCMD_FS_FAT +#define BOOT_FSTYPE_FAT #endif #ifdef CONFIG_CMD_MMC @@ -47,15 +47,14 @@ mmc_boot= \ setenv devtype mmc; \ if mmc dev ${devnum}; then \ - run script_boot; \ + run scan_boot; \ fi\0 \ - mmc0_boot=setenv devnum 0; run mmc_boot;\0 \ - mmc1_boot=setenv devnum 1; run mmc_boot;\0 \ - bootcmd_mmc=run mmc1_boot; run mmc0_boot\0 -#define BOOTCMD_MMC run bootcmd_mmc; + bootcmd_mmc0=setenv devnum 0; run mmc_boot;\0 \ + bootcmd_mmc1=setenv devnum 1; run mmc_boot;\0 +#define BOOT_TARGETS_MMC mmc1 mmc0 #else #define BOOTCMDS_MMC -#define BOOTCMD_MMC +#define BOOT_TARGETS_MMC #endif #ifdef CONFIG_CMD_USB @@ -63,15 +62,14 @@ usb_boot= \ setenv devtype usb; \ if usb dev ${devnum}; then \ - run script_boot; \ + run scan_boot; \ fi\0 \ - usb0_boot=setenv devnum 0; run usb_boot;\0 \ - bootcmd_usb=run usb0_boot\0 -#define BOOTCMD_USB run bootcmd_usb; + bootcmd_usb0=setenv devnum 0; run usb_boot;\0 +#define BOOT_TARGETS_USB usb0 #define BOOTCMD_INIT_USB usb start 0; #else #define BOOTCMDS_USB -#define BOOTCMD_USB +#define BOOT_TARGETS_USB #define BOOTCMD_INIT_USB #endif @@ -81,32 +79,56 @@ if dhcp ${scriptaddr} boot.scr.uimg; then \ source ${scriptaddr}; \ fi\0 -#define BOOTCMD_DHCP run bootcmd_dhcp; +#define BOOT_TARGETS_DHCP dhcp #else #define BOOTCMDS_DHCP -#define BOOTCMD_DHCP +#define BOOT_TARGETS_DHCP #endif #define BOOTCMDS_COMMON \ scriptaddr=0x40\0 \ + \ rootpart=1\0 \ - script_boot= \ - for fs in BOOTCMD_FS_EXT2 BOOTCMD_FS_FAT ; do \ - for prefix in / /boot/; do \ - for script in boot.scr.uimg boot.scr; do \ - echo Scanning ${devtype} ${devnum}:${rootpart} ${fs} ${prefix}${script} ...; \ - if ${fs}load ${devtype} ${devnum}:${rootpart} ${scriptaddr} ${prefix}${script}; then \ - echo ${script} found! Executing ...; \ - source ${scriptaddr}; \ - fi; \ - done; \ - done; \ - done;\0 \ + \ + script_boot=\ + if ${fs}load ${devtype} ${devnum}:${rootpart} \ + ${scriptaddr} ${prefix}${script}; then \ +
[U-Boot] [PATCH 2/2] tegra: bootcmd: start USB only when needed
From: Stephen Warren swar...@nvidia.com Instead of initializing USB as soon as bootcmd is executed, defer it until the first boot device that (potentially in the case of network) uses USB is scanned. This avoids initializing USB when booting from MMC, so speeds that up. Signed-off-by: Stephen Warren swar...@nvidia.com --- include/configs/tegra2-common-post.h | 14 +++--- 1 files changed, 11 insertions(+), 3 deletions(-) diff --git a/include/configs/tegra2-common-post.h b/include/configs/tegra2-common-post.h index 85b037c..80d9c35 100644 --- a/include/configs/tegra2-common-post.h +++ b/include/configs/tegra2-common-post.h @@ -58,24 +58,33 @@ #endif #ifdef CONFIG_CMD_USB +#define BOOTCMD_INIT_USB run usb_init; #define BOOTCMDS_USB \ + usb_init= \ + if ${usb_need_init}; then \ + set usb_need_init false; \ + usb start 0; \ + fi\0 \ + \ usb_boot= \ setenv devtype usb; \ + BOOTCMD_INIT_USB \ if usb dev ${devnum}; then \ run scan_boot; \ fi\0 \ + \ bootcmd_usb0=setenv devnum 0; run usb_boot;\0 #define BOOT_TARGETS_USB usb0 -#define BOOTCMD_INIT_USB usb start 0; #else +#define BOOTCMD_INIT_USB #define BOOTCMDS_USB #define BOOT_TARGETS_USB -#define BOOTCMD_INIT_USB #endif #ifdef CONFIG_CMD_DHCP #define BOOTCMDS_DHCP \ bootcmd_dhcp= \ + BOOTCMD_INIT_USB \ if dhcp ${scriptaddr} boot.scr.uimg; then \ source ${scriptaddr}; \ fi\0 @@ -127,7 +136,6 @@ BOOTCMDS_DHCP #define CONFIG_BOOTCOMMAND \ - BOOTCMD_INIT_USB \ for target in ${boot_targets}; do run bootcmd_${target}; done #endif -- 1.7.0.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH resend] Added watchdog support for davinchi_dm365evm
On 06/02/2012 01:38 PM, Stijn Souffriau wrote: --- arch/arm/cpu/arm926ejs/davinci/dm365.c | 61 arch/arm/include/asm/arch-davinci/timer_defs.h |2 + board/davinci/dm365evm/dm365evm.c | 19 include/configs/davinci_dm365evm.h | 11 + 4 files changed, 93 insertions(+) First, the proper way to send revised patches is to put 'v2' or 'v3' rather than resend in the subject and to include, after the full commit message, --- and then changes from v1 to v2, v2 to v3 and so forth. Second, I just re-read this code and the in-tree arch/arm/cpu/arm926ejs/davinci/timer.c code and think you really really need to sort out what magic value(s) has changed slightly and re-use that code. The reset code is the same. The programming sequence looks to be the same. I just didn't write out all of the non-0 values used to see what's different. I'm 99% certain this is small change from one revision to another of the basic IP block and you need to see what bits are being set (or not set!) in both cases and see what the differences between them are all about. -- Tom ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH resend] Added UBL_MAGIC_PLL number for ublimage + added automatic page size calculation
On 06/02/2012 01:38 PM, Stijn Souffriau wrote: --- tools/mkimage.h |6 ++ tools/ublimage.c | 29 +++-- tools/ublimage.h |2 ++ 3 files changed, 35 insertions(+), 2 deletions(-) In addition to what I just said about v2, v3 and so forth (and needing a body of the commit message, in this case explain what PLL mode is and so forth), you have a few cases of '//' or: /* multi line * comments. */ that don't match the required style. Using checkpatch.pl should catch one or both of these cases. [snip] + {UBL_MAGIC_SAFE,safe, Safe boot mode, }, + {UBL_MAGIC_PLL, pll, With PLL enabled to have higher ARM/DMA clocks,}, Missing space. Thanks! -- Tom ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/7] da850/omap-l138: Add MMC support for DA850/OMAP-L138
On Fri, Jun 01, 2012 at 08:00:43PM +0530, Prabhakar Lad wrote: From: Lad, Prabhakar prabhakar@ti.com This patch adds support for MMC/SD on DA850/OMAP-L138. [snip] +/* SD/MMC */ +#define CONFIG_MMC +#define CONFIG_DAVINCI_MMC_SD1 +#define CONFIG_MMC_MBLOCK CONFIG_MMC_MBLOCK isn't used anywhere in code, remove it please. +#define CONFIG_GENERIC_MMC +#define CONFIG_DAVINCI_MMC + +#ifdef CONFIG_MMC +#define CONFIG_DOS_PARTITION +#define CONFIG_CMD_EXT2 +#define CONFIG_CMD_FAT +#define CONFIG_CMD_MMC +#endif I'm not a fan of #define FOO, then checking right away for #ifdef FOO. Just add a comment about these only been needed when you have MMC support so it's clear to folks working from this as a template for their custom board they can remove it. -- Tom ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] da850/omap-l138: Enable auto negotiation in RMII mode
On Fri, Jun 01, 2012 at 07:04:37PM +0530, Prabhakar Lad wrote: From: Rajashekhara, Sudhakar sudhakar@ti.com On DA850/OMAP-L138 it was observed that in RMII mode, auto negotiation was not performed. This patch enables auto negotiation in RMII mode. Without this patch, EMAC initialization takes more time and sometimes tftp fails in RMII mode. Signed-off-by: Rajashekhara, Sudhakar sudhakar@ti.com Signed-off-by: Lad, Prabhakar prabhakar@ti.com Signed-off-by: Hadli, Manjunath manjunath.ha...@ti.com --- drivers/net/davinci_emac.c |5 + 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/drivers/net/davinci_emac.c b/drivers/net/davinci_emac.c index fbd0f1b..9bbd625 100644 --- a/drivers/net/davinci_emac.c +++ b/drivers/net/davinci_emac.c @@ -895,5 +895,10 @@ int davinci_emac_initialize(void) miiphy_register(phy[i].name, davinci_mii_phy_read, davinci_mii_phy_write); } + +#if defined(CONFIG_DRIVER_TI_EMAC_USE_RMII) \ + defined(CONFIG_MACH_DAVINCI_DA850_EVM) + gen_auto_negotiate(active_phy_addr); +#endif Why not just check on CONFIG_DRIVER_TI_EMAC_USE_RMII ? Would it be harmful to try and re-auto negotiate on some RMII hardware that already did it? -- Tom ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 7/7] da850/omap-l138: add support for direct NOR boot mode
On Fri, Jun 01, 2012 at 08:00:49PM +0530, Prabhakar Lad wrote: From: Lad, Prabhakar prabhakar@ti.com This patch adds support for direct NOR boot mode on da850/omap-l138. Define the CONFIG_DIRECT_NOR_BOOT macro along with CONFIG_USE_NOR in the DA850/OMAP-L138 configuration file to enable this feature. We should be using boards.cfg to add additional build targets that will toggle CONFIG_DIRECT_NOR_BOOT and other cases where we can't have SW that works in conflicting cases. -- Tom ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] OMAP5432: do not apply 5430 non-essential pad-confs to 5432
On Mon, Jun 04, 2012 at 06:04:37PM +0200, Sebastien Jan wrote: Some of the non-essential 5432 pads have a different purpose compared to 5430, so do not apply the 5430 non-essential pads configuration to 5432. Essential pad confs are common and can/shall be shared. Signed-off-by: Sebastien Jan s-...@ti.com One of the things that's been discussed before is that enabling non-essential things can lead to PM problems later in the kernel, so should we be enabling anything U-Boot doesn't really need, ever, in these cases? -- Tom ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] powerpc/CoreNet: add tool to support pbl image build.
On 06/04/2012 03:57 AM, Shaohui Xie wrote: From: Shaohui Xie b21...@freescale.com Provides a tool to build boot Image for PBL(Pre boot loader) which is used on Freescale CoreNet SoCs, PBL can be used to load some instructions and/or data for pre-initialization. The default output image is u-boot.pbl, for more details please refer to doc/README.pblimage. Signed-off-by: Shaohui Xie b21...@freescale.com --- rebased to lasted tree. Makefile|5 + board/freescale/corenet_ds/config.mk| 26 +++ board/freescale/corenet_ds/pblimage.cfg | 60 ++ common/image.c |1 + doc/README.pblimage | 140 + include/image.h |1 + tools/Makefile |2 + tools/mkimage.c |5 + tools/mkimage.h |2 + tools/pblimage.c| 329 +++ tools/pblimage.h| 36 11 files changed, 607 insertions(+), 0 deletions(-) create mode 100644 board/freescale/corenet_ds/config.mk create mode 100644 board/freescale/corenet_ds/pblimage.cfg create mode 100644 doc/README.pblimage create mode 100644 tools/pblimage.c create mode 100644 tools/pblimage.h diff --git a/Makefile b/Makefile index 57ad45b..99f993a 100644 --- a/Makefile +++ b/Makefile @@ -416,6 +416,10 @@ $(obj)u-boot.kwb: $(obj)u-boot.bin $(obj)tools/mkimage -n $(CONFIG_SYS_KWD_CONFIG) -T kwbimage \ -a $(CONFIG_SYS_TEXT_BASE) -e $(CONFIG_SYS_TEXT_BASE) -d $ $@ * +$(obj)u-boot.pbl: $(obj)u-boot.bin + $(obj)tools/mkimage -n $(CONFIG_PBL_CONFIG) -T pblimage \ + -d $ $@ + $(obj)u-boot.sha1: $(obj)u-boot.bin $(obj)tools/ubsha1 $(obj)u-boot.bin @@ -773,6 +777,7 @@ clobber: tidy $(obj)cscope.* $(obj)*.*~ @rm -f $(obj)u-boot $(obj)u-boot.map $(obj)u-boot.hex $(ALL-y) @rm -f $(obj)u-boot.kwb + @rm -f $(obj)u-boot.pbl @rm -f $(obj)u-boot.imx @rm -f $(obj)u-boot.ubl @rm -f $(obj)u-boot.ais diff --git a/board/freescale/corenet_ds/config.mk b/board/freescale/corenet_ds/config.mk new file mode 100644 index 000..72464dc --- /dev/null +++ b/board/freescale/corenet_ds/config.mk @@ -0,0 +1,26 @@ +# +# Copyright 2012 Freescale Semiconductor, Inc. +# +# 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 +# + +ifeq ($(CONFIG_RAMBOOT_PBL), y) +CONFIG_PBL_CONFIG = $(SRCTREE)/$(CONFIG_BOARDDIR)/pblimage.cfg +ALL-y += $(obj)u-boot.pbl +endif Why is this specific to corenet_ds? diff --git a/board/freescale/corenet_ds/pblimage.cfg b/board/freescale/corenet_ds/pblimage.cfg new file mode 100644 index 000..898fe6d --- /dev/null +++ b/board/freescale/corenet_ds/pblimage.cfg @@ -0,0 +1,60 @@ +# +# Copyright 2012 Freescale Semiconductor, Inc. +# Written-by: Shaohui Xieb21...@freescale.com +# +# 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., 51 Franklin Street, Fifth Floor, Boston, +# MA 02110-1301 USA +# +# Refer docs/README.pblimage for more details about how-to configure +# and create PBL boot image +# + +#PBL preamble and RCW header +aa55aa55 010e0100 +#64 bytes RCW data for P4080, replace it when building image +#for P3041DS or P5020DS. +4c58 18185218 +40464000 3c3c2000 5800 6100 + 008b6000 +
Re: [U-Boot] [PATCH] OMAP5432: do not apply 5430 non-essential pad-confs to 5432
Hi, Signed-off-by: Sebastien Jan s-...@ti.com One of the things that's been discussed before is that enabling non-essential things can lead to PM problems later in the kernel, so should we be enabling anything U-Boot doesn't really need, ever, in these cases? Yes, in fact non- essential muxes/clocks/dplls should never be enabled in the bootloader. But today the kernel up to OMAP5430 based boards are dependent upon these settings. But atleast for 5432 by removing this, we can force things to be fixed in the kernel. Also we should remove these non essential stuff for all. I will send a patch to remove this for OMAP4/5 as well. Thanks, Sricharan ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] powerpc/CoreNet: add tool to support pbl image build.
-Original Message- From: Wood Scott-B07421 Sent: Tuesday, June 05, 2012 8:33 AM To: Xie Shaohui-B21989 Cc: u-boot@lists.denx.de; Tabi Timur-B04825 Subject: Re: [U-Boot] [PATCH] powerpc/CoreNet: add tool to support pbl image build. On 06/04/2012 03:57 AM, Shaohui Xie wrote: From: Shaohui Xie b21...@freescale.com Provides a tool to build boot Image for PBL(Pre boot loader) which is used on Freescale CoreNet SoCs, PBL can be used to load some instructions and/or data for pre-initialization. The default output image is u-boot.pbl, for more details please refer to doc/README.pblimage. Signed-off-by: Shaohui Xie b21...@freescale.com --- rebased to lasted tree. Makefile|5 + board/freescale/corenet_ds/config.mk| 26 +++ board/freescale/corenet_ds/pblimage.cfg | 60 ++ common/image.c |1 + doc/README.pblimage | 140 + include/image.h |1 + tools/Makefile |2 + tools/mkimage.c |5 + tools/mkimage.h |2 + tools/pblimage.c| 329 +++ tools/pblimage.h| 36 11 files changed, 607 insertions(+), 0 deletions(-) create mode 100644 board/freescale/corenet_ds/config.mk create mode 100644 board/freescale/corenet_ds/pblimage.cfg create mode 100644 doc/README.pblimage create mode 100644 tools/pblimage.c create mode 100644 tools/pblimage.h diff --git a/Makefile b/Makefile index 57ad45b..99f993a 100644 --- a/Makefile +++ b/Makefile @@ -416,6 +416,10 @@ $(obj)u-boot.kwb: $(obj)u-boot.bin $(obj)tools/mkimage -n $(CONFIG_SYS_KWD_CONFIG) -T kwbimage \ -a $(CONFIG_SYS_TEXT_BASE) -e $(CONFIG_SYS_TEXT_BASE) -d $ $@ * +$(obj)u-boot.pbl: $(obj)u-boot.bin +$(obj)tools/mkimage -n $(CONFIG_PBL_CONFIG) -T pblimage \ +-d $ $@ + $(obj)u-boot.sha1: $(obj)u-boot.bin $(obj)tools/ubsha1 $(obj)u-boot.bin @@ -773,6 +777,7 @@ clobber: tidy $(obj)cscope.* $(obj)*.*~ @rm -f $(obj)u-boot $(obj)u-boot.map $(obj)u-boot.hex $(ALL-y) @rm -f $(obj)u-boot.kwb +@rm -f $(obj)u-boot.pbl @rm -f $(obj)u-boot.imx @rm -f $(obj)u-boot.ubl @rm -f $(obj)u-boot.ais diff --git a/board/freescale/corenet_ds/config.mk b/board/freescale/corenet_ds/config.mk new file mode 100644 index 000..72464dc --- /dev/null +++ b/board/freescale/corenet_ds/config.mk @@ -0,0 +1,26 @@ +# + +#PBL preamble and RCW header +aa55aa55 010e0100 +#64 bytes RCW data for P4080, replace it when building image #for +P3041DS or P5020DS. +4c58 18185218 +40464000 3c3c2000 5800 6100 + 008b6000 + Could you have the tool source this from a separate file, rather than require the user to replace it manually? [Xie Shaohui] Then I have to prepare a separate file and a tool... It is quite simple to replace, just copy and paste, and users may need to modify the RCW when the default one does not fit their use case, they will always have to do it manually. It's simple to do it here. Talk to Timur (when he gets back from vacation in a couple weeks) about his RCW tool and how best to accept the output it produces. Why is eSPI in here? Isn't this supposed to just generically write an image into CPC SRAM? [Xie Shaohui] No. some interfaces need to be pre-initialized before PBL start to load stuff from it, and default configurations for SPI is suitable, this tool provides a more compatible configurations. diff --git a/doc/README.pblimage b/doc/README.pblimage new file mode 100644 index 000..73d90f1 --- /dev/null +++ b/doc/README.pblimage @@ -0,0 +1,140 @@ +3). Boot from Nand +Write u-boot.pbl to Nand from offset 0x0, Note that in case of eLBC NAND +flash, the address starts from the first good block. +for ex in u-boot: +=tftp 10 u-boot.pbl +=nand info +=nand erase 0 10 +=nand write 10 0 $filesize +Change SW1[1:5] = off on off off on +Change SW7[1:4] = on off off on How do you load the environment? We should find a way, possibly using SPL, to have the environment ready early. We do not want to wait post relocation for the full NAND/SD/SPI driver to load the environment. [Xie Shaohui] This tool did not intend to provide a way to load the environment. The ENV thing should belong to the boot Image, this tool is a wrapper. diff --git a/tools/mkimage.h b/tools/mkimage.h index 5fe1a48..a886305 100644 --- a/tools/mkimage.h +++ b/tools/mkimage.h @@ -147,6 +147,8 @@ void mkimage_register (struct image_type_params *tparams); * * Supported image types init functions */ +void pbl_load_uboot(int, struct mkimage_params *); Please provide
[U-Boot] [PATCH 1/2 V5] EXYNOS5: PINMUX: Added default pinumx settings
This patch performs the pinmux configuration in a common file. As of now only EXYNOS5 pinmux for SDMMC, UART and Ethernet is supported. Signed-off-by: Abhilash Kesavan a.kesa...@samsung.com Signed-off-by: Che-Liang Chiou clch...@chromium.org Signed-off-by: Rajeshwari Shinde rajeshwar...@samsung.com Acked-by: Chander Kashyap chander.kash...@linaro.org --- Changes in V2: - Adding pinmux.c to Makefile moved to this patch. - exynos5_pinmux_config made static Changes in V3: - Separate functions made for each peripheral - enum periph_id moved to a separate periph.h Changes in V4: - removed variable declarations from exynos5_pinmux_config Chnages in V5: - added a return statement for function exynos5_mmc_config and added a check for same arch/arm/cpu/armv7/exynos/Makefile|2 +- arch/arm/cpu/armv7/exynos/pinmux.c| 219 + arch/arm/include/asm/arch-exynos/periph.h | 47 ++ arch/arm/include/asm/arch-exynos/pinmux.h | 58 4 files changed, 325 insertions(+), 1 deletions(-) create mode 100644 arch/arm/cpu/armv7/exynos/pinmux.c create mode 100644 arch/arm/include/asm/arch-exynos/periph.h create mode 100644 arch/arm/include/asm/arch-exynos/pinmux.h diff --git a/arch/arm/cpu/armv7/exynos/Makefile b/arch/arm/cpu/armv7/exynos/Makefile index 90ec2bd..9119961 100644 --- a/arch/arm/cpu/armv7/exynos/Makefile +++ b/arch/arm/cpu/armv7/exynos/Makefile @@ -22,7 +22,7 @@ include $(TOPDIR)/config.mk LIB= $(obj)lib$(SOC).o -COBJS += clock.o power.o soc.o system.o +COBJS += clock.o power.o soc.o system.o pinmux.o SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) OBJS := $(addprefix $(obj),$(COBJS) $(SOBJS)) diff --git a/arch/arm/cpu/armv7/exynos/pinmux.c b/arch/arm/cpu/armv7/exynos/pinmux.c new file mode 100644 index 000..23ed2bf --- /dev/null +++ b/arch/arm/cpu/armv7/exynos/pinmux.c @@ -0,0 +1,219 @@ +/* + * Copyright (c) 2012 Samsung Electronics. + * Abhilash Kesavan a.kesa...@samsung.com + * + * 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 + */ + +#include common.h +#include asm/arch/gpio.h +#include asm/arch/pinmux.h +#include asm/arch/sromc.h + +static void exynos5_uart_config(int peripheral) +{ + struct exynos5_gpio_part1 *gpio1 = + (struct exynos5_gpio_part1 *) samsung_get_base_gpio_part1(); + struct s5p_gpio_bank *bank; + int i, start, count; + + switch (peripheral) { + case PERIPH_ID_UART0: + bank = gpio1-a0; + start = 0; + count = 4; + break; + case PERIPH_ID_UART1: + bank = gpio1-a0; + start = 4; + count = 4; + break; + case PERIPH_ID_UART2: + bank = gpio1-a1; + start = 0; + count = 4; + break; + case PERIPH_ID_UART3: + bank = gpio1-a1; + start = 4; + count = 2; + break; + } + for (i = start; i start + count; i++) { + s5p_gpio_set_pull(bank, i, GPIO_PULL_NONE); + s5p_gpio_cfg_pin(bank, i, GPIO_FUNC(0x2)); + } +} + +static int exynos5_mmc_config(int peripheral, int flags) +{ + struct exynos5_gpio_part1 *gpio1 = + (struct exynos5_gpio_part1 *) samsung_get_base_gpio_part1(); + struct s5p_gpio_bank *bank, *bank_ext; + int i; + switch (peripheral) { + case PERIPH_ID_SDMMC0: + bank = gpio1-c0; + bank_ext = gpio1-c1; + break; + case PERIPH_ID_SDMMC1: + bank = gpio1-c1; + bank_ext = NULL; + break; + case PERIPH_ID_SDMMC2: + bank = gpio1-c2; + bank_ext = gpio1-c3; + break; + case PERIPH_ID_SDMMC3: + bank = gpio1-c3; + bank_ext = NULL; + break; + } + if ((flags PINMUX_FLAG_8BIT_MODE) !bank_ext) { + debug(SDMMC device %d does not support 8bit mode, + peripheral); + return -1; + } + if (flags PINMUX_FLAG_8BIT_MODE) {
[U-Boot] [PATCH 2/2 V5] EXYNOS: SMDK5250: Enable the pinmux setup
Use the pinmux configuration function for SMDK5250. Signed-off-by: Abhilash Kesavan a.kesa...@samsung.com Signed-off-by: Rajeshwari Shinde rajeshwar...@samsung.com Acked-by: Chander Kashyap chander.kash...@linaro.org Acked-by: Simon Glass s...@chromium.org --- Changes in V2: - Removed exynos5_gpio_part1 *gpio1 global variable as initialised in pinmux.c. Changes in V3: - Added a error return for smc9115_pre_init and board_uart_init. board/samsung/smdk5250/smdk5250.c | 176 - 1 files changed, 38 insertions(+), 138 deletions(-) diff --git a/board/samsung/smdk5250/smdk5250.c b/board/samsung/smdk5250/smdk5250.c index 32786e2..3b078da 100644 --- a/board/samsung/smdk5250/smdk5250.c +++ b/board/samsung/smdk5250/smdk5250.c @@ -26,81 +26,16 @@ #include asm/arch/cpu.h #include asm/arch/gpio.h #include asm/arch/mmc.h +#include asm/arch/pinmux.h #include asm/arch/sromc.h DECLARE_GLOBAL_DATA_PTR; -struct exynos5_gpio_part1 *gpio1; #ifdef CONFIG_SMC911X -static void smc9115_pre_init(void) +static int smc9115_pre_init(void) { u32 smc_bw_conf, smc_bc_conf; - int i; - - /* -* SROM:CS1 and EBI -* -* GPY0[0] SROM_CSn[0] -* GPY0[1] SROM_CSn[1](2) -* GPY0[2] SROM_CSn[2] -* GPY0[3] SROM_CSn[3] -* GPY0[4] EBI_OEn(2) -* GPY0[5] EBI_EEn(2) -* -* GPY1[0] EBI_BEn[0](2) -* GPY1[1] EBI_BEn[1](2) -* GPY1[2] SROM_WAIT(2) -* GPY1[3] EBI_DATA_RDn(2) -*/ - s5p_gpio_cfg_pin(gpio1-y0, CONFIG_ENV_SROM_BANK, GPIO_FUNC(2)); - s5p_gpio_cfg_pin(gpio1-y0, 4, GPIO_FUNC(2)); - s5p_gpio_cfg_pin(gpio1-y0, 5, GPIO_FUNC(2)); - - for (i = 0; i 4; i++) - s5p_gpio_cfg_pin(gpio1-y1, i, GPIO_FUNC(2)); - - /* -* EBI: 8 Addrss Lines -* -* GPY3[0] EBI_ADDR[0](2) -* GPY3[1] EBI_ADDR[1](2) -* GPY3[2] EBI_ADDR[2](2) -* GPY3[3] EBI_ADDR[3](2) -* GPY3[4] EBI_ADDR[4](2) -* GPY3[5] EBI_ADDR[5](2) -* GPY3[6] EBI_ADDR[6](2) -* GPY3[7] EBI_ADDR[7](2) -* -* EBI: 16 Data Lines -* -* GPY5[0] EBI_DATA[0](2) -* GPY5[1] EBI_DATA[1](2) -* GPY5[2] EBI_DATA[2](2) -* GPY5[3] EBI_DATA[3](2) -* GPY5[4] EBI_DATA[4](2) -* GPY5[5] EBI_DATA[5](2) -* GPY5[6] EBI_DATA[6](2) -* GPY5[7] EBI_DATA[7](2) -* -* GPY6[0] EBI_DATA[8](2) -* GPY6[1] EBI_DATA[9](2) -* GPY6[2] EBI_DATA[10](2) -* GPY6[3] EBI_DATA[11](2) -* GPY6[4] EBI_DATA[12](2) -* GPY6[5] EBI_DATA[13](2) -* GPY6[6] EBI_DATA[14](2) -* GPY6[7] EBI_DATA[15](2) -*/ - for (i = 0; i 8; i++) { - s5p_gpio_cfg_pin(gpio1-y3, i, GPIO_FUNC(2)); - s5p_gpio_set_pull(gpio1-y3, i, GPIO_PULL_UP); - - s5p_gpio_cfg_pin(gpio1-y5, i, GPIO_FUNC(2)); - s5p_gpio_set_pull(gpio1-y5, i, GPIO_PULL_UP); - - s5p_gpio_cfg_pin(gpio1-y6, i, GPIO_FUNC(2)); - s5p_gpio_set_pull(gpio1-y6, i, GPIO_PULL_UP); - } + int err; /* Ethernet needs data bus width of 16 bits */ smc_bw_conf = SROMC_DATA16_WIDTH(CONFIG_ENV_SROM_BANK) @@ -112,14 +47,20 @@ static void smc9115_pre_init(void) | SROMC_BC_PMC(0x01); /* Select and configure the SROMC bank */ + err = exynos_pinmux_config(PERIPH_ID_SROMC, + CONFIG_ENV_SROM_BANK | PINMUX_FLAG_16BIT); + if (err) { + debug(SROMC not configured\n); + return err; + } + s5p_config_sromc(CONFIG_ENV_SROM_BANK, smc_bw_conf, smc_bc_conf); + return 0; } #endif int board_init(void) { - gpio1 = (struct exynos5_gpio_part1 *) samsung_get_base_gpio_part1(); - gd-bd-bi_boot_params = (PHYS_SDRAM_1 + 0x100UL); return 0; } @@ -168,7 +109,8 @@ void dram_init_banksize(void) int board_eth_init(bd_t *bis) { #ifdef CONFIG_SMC911X - smc9115_pre_init(); + if (smc9115_pre_init()) + return -1; return smc911x_initialize(0, CONFIG_SMC911X_BASE); #endif return 0; @@ -186,31 +128,12 @@ int checkboard(void) #ifdef CONFIG_GENERIC_MMC int board_mmc_init(bd_t *bis) { - int i, err; - - /* -* MMC2 SD card GPIO: -* -* GPC2[0] SD_2_CLK(2) -* GPC2[1] SD_2_CMD(2) -* GPC2[2] SD_2_CDn -* GPC2[3:6]SD_2_DATA[0:3](2) -*/ - for (i = 0; i 7; i++) { - /* GPC2[0:6] special function 2 */ - s5p_gpio_cfg_pin(gpio1-c2, i, GPIO_FUNC(0x2)); - - /* GPK2[0:6] drv 4x */ -