Re: [U-Boot] [PATCH 2/2 v2] Blackfin: tweak embedded env config option
On Tuesday 15 September 2009 16:49:42 Wolfgang Denk wrote: > Mike Frysinger wrote: > > Use the common config option for extracting the environment for embedding > > into LDR files. > > $(obj)u-boot.ldr: $(obj)u-boot > > - $(obj)tools/envcrc --binary > $(obj)env-ldr.o > > + $(CREATE_LDR_ENV) > > $(LDR) -T $(CONFIG_BFIN_CPU) -c $@ $< $(LDR_FLAGS) > > This is all BF specific stuff, right? Maybe we should move this into > some BF Makefile, then, instead of adding more and more references to > magic variables that have no meaning anywhere except for BF. here's what i'm thinking (it wont apply to mainline, so it's just an idea). from what i can see, there shouldnt be *anything* related to Blackfin left in the top level files now (except for MAKEALL, but that's another day). -mike diff --git a/Makefile b/Makefile index 40cca2e..61210e8 100644 --- a/Makefile +++ b/Makefile @@ -305,16 +305,6 @@ $(obj)u-boot.srec: $(obj)u-boot $(obj)u-boot.bin: $(obj)u-boot $(OBJCOPY) ${OBJCFLAGS} -O binary $< $@ -$(obj)u-boot.ldr: $(obj)u-boot - $(CREATE_LDR_ENV) - $(LDR) -T $(CONFIG_BFIN_CPU) -c $@ $< $(LDR_FLAGS) - -$(obj)u-boot.ldr.hex: $(obj)u-boot.ldr - $(OBJCOPY) ${OBJCFLAGS} -O ihex $< $@ -I binary - -$(obj)u-boot.ldr.srec: $(obj)u-boot.ldr - $(OBJCOPY) ${OBJCFLAGS} -O srec $< $@ -I binary - $(obj)u-boot.img: $(obj)u-boot.bin ./tools/mkimage -A $(ARCH) -T firmware -C none \ -a $(TEXT_BASE) -e 0 \ @@ -482,6 +472,9 @@ dep tags ctags etags cscope $(obj)System.map: @ exit 1 endif # config.mk +# Pull in architecture-specific top level targets +sinclude $(TOPDIR)/lib_*/targets.mk + .PHONY : CHANGELOG CHANGELOG: git log --no-merges U-Boot-1_1_5.. | \ @@ -3487,30 +3480,6 @@ suzaku_config: unconfig @$(MKCONFIG) -a $(@:_config=) microblaze microblaze suzaku AtmarkTechno # -# Blackfin -# - -# Analog Devices boards -BFIN_BOARDS = bf518f-ezbrd bf526-ezbrd bf527-ezkit bf533-ezkit bf533-stamp \ - bf537-pnav bf537-stamp bf538f-ezkit bf548-ezkit bf561-ezkit - -# Bluetechnix tinyboards -BFIN_BOARDS += cm-bf527 cm-bf533 cm-bf537e cm-bf537u cm-bf548 cm-bf561 tcm- bf537 - -# Misc third party boards -BFIN_BOARDS += bf537-minotaur bf537-srv1 blackstamp - -# I-SYST Micromodule -BFIN_BOARDS += ibf-dsp561 - -$(BFIN_BOARDS:%=%_config) : unconfig - @$(MKCONFIG) $(@:_config=) blackfin blackfin $(@:_config=) - -$(BFIN_BOARDS): - $(MAKE) $...@_config - $(MAKE) - -# # AVR32 # @@ -3681,9 +3650,8 @@ clean: $(obj)board/netstar/{eeprom,crcek,crcit,*.srec,*.bin} \ $(obj)board/trab/trab_fkt $(obj)board/voiceblue/eeprom \ $(obj)board/armltd/{integratorap,integratorcp}/u-boot.lds \ - $(obj)lib_blackfin/u-boot.lds \ - $(obj)u-boot.lds \ - $(obj)cpu/blackfin/bootrom-asm-offsets.[chs] + $(obj)u-boot.lds + @rm -f $(EXTRA_CLEAN_TARGETS) @rm -f $(obj)include/bmp_logo.h @rm -f $(obj)nand_spl/{u-boot.lds,u-boot-spl,u-boot-spl.map,System.map} @rm -f $(obj)onenand_ipl/onenand-{ipl,ipl.bin,ipl-2k.bin,ipl-4k.bin,ipl.map} diff --git a/lib_blackfin/config.mk b/lib_blackfin/config.mk index 323d28f..ff6f45b 100644 --- a/lib_blackfin/config.mk +++ b/lib_blackfin/config.mk @@ -43,11 +43,6 @@ endif ifneq ($(CONFIG_BFIN_BOOT_MODE),BFIN_BOOT_BYPASS) ALL += $(obj)u-boot.ldr endif -ifeq ($(CONFIG_ENV_IS_EMBEDDED_IN_LDR),y) -CREATE_LDR_ENV = $(obj)tools/envcrc --binary > $(obj)env-ldr.o -else -CREATE_LDR_ENV = -endif SYM_PREFIX = _ diff --git a/lib_blackfin/targets.mk b/lib_blackfin/targets.mk new file mode 100644 index 000..629ace3 --- /dev/null +++ b/lib_blackfin/targets.mk @@ -0,0 +1,70 @@ +# +# Blackfin specific top level targets +# +# Copyright (c) 2005-2009 Analog Devices Inc. +# +# Licensed under the GPL-2 or later. +# + + +EXTRA_CLEAN_TARGETS += \ + $(obj)cpu/blackfin/bootrom-asm-offsets.[chs] + + +# +# Blackfin LDR targets +# + +$(obj)u-boot.ldr: $(obj)u-boot +ifeq ($(CONFIG_ENV_IS_EMBEDDED_IN_LDR),y) + $(obj)tools/envcrc --binary > $(obj)env-ldr.o +endif + $(LDR) -T $(CONFIG_BFIN_CPU) -c $@ $< $(LDR_FLAGS) + +$(obj)u-boot.ldr.hex: $(obj)u-boot.ldr + $(OBJCOPY) ${OBJCFLAGS} -O ihex $< $@ -I binary + +$(obj)u-boot.ldr.srec: $(obj)u-boot.ldr + $(OBJCOPY) ${OBJCFLAGS} -O srec $< $@ -I binary + + +# +# Blackfin boards +# + +BFIN_BOARDS = + +# Analog Devices boards +BFIN_BOARDS += \ + bf
[U-Boot] [PATCH] Make arm926ejs use -mabi=apcs-gnu to avoid EABI problems
Using -mabi=apcs-gnu allows Marvell Kirkwood-based boards to boot with the EABI changes introduced in commit f772acf8a584067033eff1e231fcd1fb3a00d3d9. Signed-off-by: Simon Kagstrom --- Wolfgang can live with this change to make Kirkwood builds work again: On Wed, 30 Sep 2009 22:32:08 +0200 Wolfgang Denk wrote: > > -PLATFORM_CPPFLAGS += -march=armv5te > > +PLATFORM_CPPFLAGS += -march=armv5te -mabi=apcs-gnu > > I could live with this part, if it was thoroughly tested and does not > cause problems with the most frequently used tool chains (which I'm > afraid it would - I think I remember that I saw errors or unexpected > behaviour when using multiple, different "-mabi" settings). It would be nice though if owners of other arm926ejs-boards could test the patch and see that it doesn't break things. Depending on the compiler, you might want to build with USE_PRIVATE_LIBGCC=yes. I've tested on a OpenRD-base board. cpu/arm926ejs/config.mk |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/cpu/arm926ejs/config.mk b/cpu/arm926ejs/config.mk index f8ef90f..466ccff 100644 --- a/cpu/arm926ejs/config.mk +++ b/cpu/arm926ejs/config.mk @@ -23,7 +23,7 @@ PLATFORM_RELFLAGS += -fno-common -ffixed-r8 -msoft-float -PLATFORM_CPPFLAGS += -march=armv5te +PLATFORM_CPPFLAGS += -march=armv5te -mabi=apcs-gnu # = # # Supply options according to compiler version -- 1.6.0.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v3] AT91: Add SD/MMC controller support
Hello there, I tried to get mmc working on a board using an at91sam9g20. The mmc-card is wired on slotb. I applied the patches: http://lists.denx.de/pipermail/u-boot/2009-September/060053.html http://lists.denx.de/pipermail/u-boot/2009-August/059456.html http://lists.denx.de/pipermail/u-boot/2009-September/060243.html It didn't work as I always got (apart from the message of a too low clock which I avoided by setting f_min / f_max on my own): mmc: command 8 failed (status: 0x0010c1e5) mmc: command 55 failed (status: 0x0010c1e5) mmc: command 1 failed (status: 0x0010c1e5) Card did not respond to voltage select! So I had a look at linux sources and discovered that the MCI selected the wrong slot. After modifying atmel_mci_set_ios() to set SDCR to use slotb ("mmci_writel(SDCR, sdcr | 1);") I got my card working. Hope this helps someone. Regards Sebastian Heutling ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] arm: Correct build with CONFIG_SYS_HUSH_PARSER set
From: u-boot-boun...@lists.denx.de [u-boot-boun...@lists.denx.de] On Behalf Of Prafulla Wadaskar [prafu...@marvell.com] Sent: Thursday, September 24, 2009 10:38 PM To: Simon Kagstrom Cc: U-Boot ML Subject: Re: [U-Boot] [PATCH] arm: Correct build with CONFIG_SYS_HUSH_PARSER set > -Original Message- > From: Simon Kagstrom [mailto:simon.kagst...@netinsight.net] > Sent: Thursday, September 24, 2009 7:54 PM > To: Simon Kagstrom; Prafulla Wadaskar > Cc: U-Boot ML > Subject: Re: [U-Boot] [PATCH] arm: Correct build with > CONFIG_SYS_HUSH_PARSER set > > Hi Prafulla! > > Small reminder :-). Perhaps you missed this patch - and I also forgot > to add you under To:. It's a simple one-liner to get kirkwood/cpu.c to > build when CONFIG_SYS_HUSH_PARSER is set. > Applied to u-boot-marvell.git/next Regards.. Prafulla . . ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] AT91 working SD with u-boot
Hi, for me this is working: Downloaded u-boot 2009.08 file cpu/arm926ejs/at91/at91sam9260_devices.c > > changed: > >#if defined(CONFIG_HAS_DATAFLASH) > to: > >#if defined(CONFIG_HAS_DATAFLASH) || defined(CONFIG_ATMEL_SPI) patches: SOC headers: http://lists.denx.de/pipermail/u-boot/2009-September/060053.html SD Patch V3 http://lists.denx.de/pipermail/u-boot/2009-September/060243.html MCI support http://lists.denx.de/pipermail/u-boot/2009-August/059595.html add to board init code: at91_mciX_hw_init (X for mci unit 0 / 1) for parameters have a look at cpu/arm926ejs/at91/at91sam9260_devices.c bye Konrad Mattheis ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] Merge Window
Hi, I already read that the merge window is closed. My question is, can I also send now patches to the list and somebody collect them for the next release, or is it better to wait for the next merge window? bye Konrad Mattheis ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Merge Window
Hi Konrad, On Thursday 01 October 2009 10:01:58 Konrad Mattheis wrote: > I already read that the merge window is closed. > > My question is, can I also send now patches to the list and somebody > collect them for the next release, or is it better to wait for the next > merge window? Please send your patches always right away. If the patches are bug fixes, they will most likely make it into the upcoming release. And if not, they usually are added to the "next" branches of the responsible custodian. Cheers, Stefan -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: off...@denx.de ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 1/4 v4] s5pc1xx: support Samsung s5pc1xx SoC
This patch adds support for the Samsung s5pc100 and s5pc110 SoCs. The s5pc1xx SoC is an ARM Cortex A8 processor. Signed-off-by: Minkyu Kang Signed-off-by: HeungJun, Kim --- Changes since v1: - make C struct instead of base+offset - use writel/readl function - use the strmhz function - fix some comments Changes since v2: - use function pointer for separate Soc - provide two separate functions for each Soc - remove not helpful cpu informations - modify to lower case letter in C struct - remove unnecessary Macro and header files Changes since v3: - N/A cpu/arm_cortexa8/s5pc1xx/Makefile| 53 ++ cpu/arm_cortexa8/s5pc1xx/cache.c | 43 + cpu/arm_cortexa8/s5pc1xx/clock.c | 308 ++ cpu/arm_cortexa8/s5pc1xx/cpu_info.c | 57 +++ cpu/arm_cortexa8/s5pc1xx/reset.S | 47 + cpu/arm_cortexa8/s5pc1xx/timer.c | 195 + include/asm-arm/arch-s5pc1xx/clk.h | 32 include/asm-arm/arch-s5pc1xx/clock.h | 94 ++ include/asm-arm/arch-s5pc1xx/cpu.h | 72 include/asm-arm/arch-s5pc1xx/gpio.h | 129 ++ include/asm-arm/arch-s5pc1xx/power.h | 42 + include/asm-arm/arch-s5pc1xx/pwm.h | 59 +++ include/asm-arm/arch-s5pc1xx/uart.h | 47 + 13 files changed, 1178 insertions(+), 0 deletions(-) create mode 100644 cpu/arm_cortexa8/s5pc1xx/Makefile create mode 100644 cpu/arm_cortexa8/s5pc1xx/cache.c create mode 100644 cpu/arm_cortexa8/s5pc1xx/clock.c create mode 100644 cpu/arm_cortexa8/s5pc1xx/cpu_info.c create mode 100644 cpu/arm_cortexa8/s5pc1xx/reset.S create mode 100644 cpu/arm_cortexa8/s5pc1xx/timer.c create mode 100644 include/asm-arm/arch-s5pc1xx/clk.h create mode 100644 include/asm-arm/arch-s5pc1xx/clock.h create mode 100644 include/asm-arm/arch-s5pc1xx/cpu.h create mode 100644 include/asm-arm/arch-s5pc1xx/gpio.h create mode 100644 include/asm-arm/arch-s5pc1xx/power.h create mode 100644 include/asm-arm/arch-s5pc1xx/pwm.h create mode 100644 include/asm-arm/arch-s5pc1xx/uart.h diff --git a/cpu/arm_cortexa8/s5pc1xx/Makefile b/cpu/arm_cortexa8/s5pc1xx/Makefile new file mode 100644 index 000..e08d9d8 --- /dev/null +++ b/cpu/arm_cortexa8/s5pc1xx/Makefile @@ -0,0 +1,53 @@ +# +# (C) Copyright 2000-2003 +# Wolfgang Denk, DENX Software Engineering, w...@denx.de. +# +# (C) Copyright 2008 +# Guennadi Liakhovetki, DENX Software Engineering, +# +# 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 $(TOPDIR)/config.mk + +LIB= $(obj)lib$(SOC).a + +SOBJS = reset.o + +COBJS += cache.o +COBJS += clock.o +COBJS += cpu_info.o +COBJS += timer.o + +SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) +OBJS := $(addprefix $(obj),$(COBJS) $(SOBJS)) + +all:$(obj).depend $(LIB) + +$(LIB):$(OBJS) + $(AR) $(ARFLAGS) $@ $(OBJS) + +# + +# defines $(obj).depend target +include $(SRCTREE)/rules.mk + +sinclude $(obj).depend + +# diff --git a/cpu/arm_cortexa8/s5pc1xx/cache.c b/cpu/arm_cortexa8/s5pc1xx/cache.c new file mode 100644 index 000..8652a45 --- /dev/null +++ b/cpu/arm_cortexa8/s5pc1xx/cache.c @@ -0,0 +1,43 @@ +/* + * Copyright (C) 2009 Samsung Electronics + * Minkyu Kang + * + * 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 +#include + +void l2_cache_enable(void) +{ + unsigned long i; + + __asm__ __volati
[U-Boot] [PATCH 2/4 v4] s5pc1xx: support onenand driver
This patch includes the onenand driver for s5pc100 Signed-off-by: Minkyu Kang Signed-off-by: Kyungmin Park --- Changes since v1: - move samsung_onenand.h to include/linux/mtd/ - make C struct instead of base+offset - Remove the "1 &&" in while loop Changes since v2: - drop blank lines - adds some comments - modify to lower case letter in C struct Changes since v3: - fix the copyright drivers/mtd/onenand/Makefile|1 + drivers/mtd/onenand/samsung.c | 636 +++ include/linux/mtd/onenand.h |1 + include/linux/mtd/onenand_regs.h|4 + include/linux/mtd/samsung_onenand.h | 131 +++ 5 files changed, 773 insertions(+), 0 deletions(-) create mode 100644 drivers/mtd/onenand/samsung.c create mode 100644 include/linux/mtd/samsung_onenand.h diff --git a/drivers/mtd/onenand/Makefile b/drivers/mtd/onenand/Makefile index 1d35a57..2571df0 100644 --- a/drivers/mtd/onenand/Makefile +++ b/drivers/mtd/onenand/Makefile @@ -26,6 +26,7 @@ include $(TOPDIR)/config.mk LIB:= $(obj)libonenand.a COBJS-$(CONFIG_CMD_ONENAND):= onenand_uboot.o onenand_base.o onenand_bbt.o +COBJS-$(CONFIG_SAMSUNG_ONENAND)+= samsung.o COBJS := $(COBJS-y) SRCS := $(COBJS:.o=.c) diff --git a/drivers/mtd/onenand/samsung.c b/drivers/mtd/onenand/samsung.c new file mode 100644 index 000..f2be687 --- /dev/null +++ b/drivers/mtd/onenand/samsung.c @@ -0,0 +1,636 @@ +/* + * S3C64XX/S5PC100 OneNAND driver at U-Boot + * + * Copyright (C) 2008-2009 Samsung Electronics + * Kyungmin Park + * + * Implementation: + * Emulate the pseudo BufferRAM + * + * 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 +#include +#include +#include +#include +#include + +#include +#include + +#ifdef ONENAND_DEBUG +#define DPRINTK(format, args...) \ +do { \ + printf("%s[%d]: " format "\n", __func__, __LINE__, ##args); \ +} while (0) +#else +#define DPRINTK(...) do { } while (0) +#endif + +#define ONENAND_ERASE_STATUS 0x00 +#define ONENAND_MULTI_ERASE_SET0x01 +#define ONENAND_ERASE_START0x03 +#define ONENAND_UNLOCK_START 0x08 +#define ONENAND_UNLOCK_END 0x09 +#define ONENAND_LOCK_START 0x0A +#define ONENAND_LOCK_END 0x0B +#define ONENAND_LOCK_TIGHT_START 0x0C +#define ONENAND_LOCK_TIGHT_END 0x0D +#define ONENAND_UNLOCK_ALL 0x0E +#define ONENAND_OTP_ACCESS 0x12 +#define ONENAND_SPARE_ACCESS_ONLY 0x13 +#define ONENAND_MAIN_ACCESS_ONLY 0x14 +#define ONENAND_ERASE_VERIFY 0x15 +#define ONENAND_MAIN_SPARE_ACCESS 0x16 +#define ONENAND_PIPELINE_READ 0x4000 + +#if defined(CONFIG_S3C64XX) +#define MAP_00 (0x0 << 24) +#define MAP_01 (0x1 << 24) +#define MAP_10 (0x2 << 24) +#define MAP_11 (0x3 << 24) +#elif defined(CONFIG_S5PC1XX) +#define MAP_00 (0x0 << 26) +#define MAP_01 (0x1 << 26) +#define MAP_10 (0x2 << 26) +#define MAP_11 (0x3 << 26) +#endif + +/* read/write of XIP buffer */ +#define CMD_MAP_00(mem_addr) (MAP_00 | ((mem_addr) << 1)) +/* read/write to the memory device */ +#define CMD_MAP_01(mem_addr) (MAP_01 | (mem_addr)) +/* control special functions of the memory device */ +#define CMD_MAP_10(mem_addr) (MAP_10 | (mem_addr)) +/* direct interface(direct access) with the memory device */ +#define CMD_MAP_11(mem_addr) (MAP_11 | ((mem_addr) << 2)) + +struct s3c_onenand { + struct mtd_info *mtd; + void __iomem*base; + void __iomem*ahb_addr; + int bootram_command; + void __iomem*page_buf; + void __iomem*oob_buf; + unsigned int(*mem_addr)(int fba, int fpa, int fsa); + struct samsung_onenand *reg; +}; + +static struct s3c_onenand *onenand; + +static int s3c_read_cmd(unsigned int cmd) +{ + return readl(onenand->ahb_addr + cm
[U-Boot] [PATCH 3/4 v4] s5pc1xx: support serial driver
This patch includes the serial driver for s5pc1xx. s5pc1xx uart driver needs own register setting and clock configuration. So, need to special driver. Signed-off-by: Minkyu Kang --- Changes since v1: - use serial multi API - use writel/readl function - remove duplicate code Changes since v2: - use sizeof() instead of the constant Changes since v3: - fix the commit log - fix the style - remove unnecessary codes - add error check logic in while loop common/serial.c | 18 drivers/serial/Makefile |1 + drivers/serial/serial_s5pc1xx.c | 195 +++ include/serial.h|7 ++ 4 files changed, 221 insertions(+), 0 deletions(-) create mode 100644 drivers/serial/serial_s5pc1xx.c diff --git a/common/serial.c b/common/serial.c index 41a24c2..e5ce9fd 100644 --- a/common/serial.c +++ b/common/serial.c @@ -69,6 +69,18 @@ struct serial_device *__default_serial_console (void) #else #error "CONFIG_SERIAL? missing." #endif +#elif defined(CONFIG_S5PC1XX) +#if defined(CONFIG_SERIAL0) + return &s5pc1xx_serial0_device; +#elif defined(CONFIG_SERIAL1) + return &s5pc1xx_serial1_device; +#elif defined(CONFIG_SERIAL2) + return &s5pc1xx_serial2_device; +#elif defined(CONFIG_SERIAL3) + return &s5pc1xx_serial3_device; +#else +#error "CONFIG_SERIAL? missing." +#endif #elif defined(CONFIG_OMAP3_ZOOM2) return ZOOM2_DEFAULT_SERIAL_DEVICE; #else @@ -139,6 +151,12 @@ void serial_initialize (void) serial_register(&s3c24xx_serial1_device); serial_register(&s3c24xx_serial2_device); #endif +#if defined(CONFIG_S5PC1XX) + serial_register(&s5pc1xx_serial0_device); + serial_register(&s5pc1xx_serial1_device); + serial_register(&s5pc1xx_serial2_device); + serial_register(&s5pc1xx_serial3_device); +#endif serial_assign (default_serial_console ()->name); } diff --git a/drivers/serial/Makefile b/drivers/serial/Makefile index 64882a2..3c77a7c 100644 --- a/drivers/serial/Makefile +++ b/drivers/serial/Makefile @@ -33,6 +33,7 @@ COBJS-$(CONFIG_NS9750_UART) += ns9750_serial.o COBJS-$(CONFIG_SYS_NS16550) += ns16550.o COBJS-$(CONFIG_DRIVER_S3C4510_UART) += s3c4510b_uart.o COBJS-$(CONFIG_S3C64XX) += s3c64xx.o +COBJS-$(CONFIG_S5PC1XX) += serial_s5pc1xx.o COBJS-$(CONFIG_SYS_NS16550_SERIAL) += serial.o COBJS-$(CONFIG_CLPS7111_SERIAL) += serial_clps7111.o COBJS-$(CONFIG_IMX_SERIAL) += serial_imx.o diff --git a/drivers/serial/serial_s5pc1xx.c b/drivers/serial/serial_s5pc1xx.c new file mode 100644 index 000..64c1dcc --- /dev/null +++ b/drivers/serial/serial_s5pc1xx.c @@ -0,0 +1,195 @@ +/* + * (C) Copyright 2009 SAMSUNG Electronics + * Minkyu Kang + * Heungjun Kim + * + * based on drivers/serial/s3c64xx.c + * + * 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 +#include +#include +#include +#include + +static inline struct s5pc1xx_uart *s5pc1xx_get_base_uart(int dev_index) +{ + u32 offset = dev_index * sizeof(struct s5pc1xx_uart); + + if (cpu_is_s5pc100()) + return (struct s5pc1xx_uart *)(S5PC100_UART_BASE + offset); + else + return (struct s5pc1xx_uart *)(S5PC110_UART_BASE + offset); +} + +/* + * The coefficient, used to calculate the baudrate on S5PC1XX UARTs is + * calculated as + * C = UBRDIV * 16 + number_of_set_bits_in_UDIVSLOT + * however, section 31.6.11 of the datasheet doesn't recomment using 1 for 1, + * 3 for 2, ... (2^n - 1) for n, instead, they suggest using these constants: + */ +static const int udivslot[] = { + 0, + 0x0080, + 0x0808, + 0x0888, + 0x, + 0x4924, + 0x4a52, + 0x54aa, + 0x, + 0xd555, + 0xd5d5, + 0xddd5, + 0x, + 0xdfdd, + 0xdfdf, + 0xffdf, +}; + +void serial_setbrg_dev(const int dev_index) +{ + DECLARE_GLOBAL_DATA_PTR; + struct s5pc1xx_uart *const uart = s5pc1xx_get_base_uart(dev_index); + u32 pclk = get_pclk(); + u32 baudrate = gd->baudrate; + u32 val; + + val = pclk / baudrate; + + writel(val / 16 - 1, &uart->ubrdiv); + writel(udivslot[val % 16], &uart->udivslot); +} + +/* + * Initialise the serial port with the given baudrate. The settings + * are always 8
[U-Boot] [PATCH 4/4 v4] s5pc1xx: add support SMDKC100 board
Adds new board SMDKC100 that uses s5pc100 SoC Signed-off-by: Minkyu Kang Signed-off-by: HeungJun, Kim --- Changes since v1: - arrange env values for more readable - make C struct instead of base+offset - use MACH_TYPE_SMDKC100 directly - fix the CONFIG_SYS_HZ to 1000 - enable LOADB, LOADS, BOOTD, XIMG, FPGA Changes since v2: - remove and SZ_XX defines - remove the define of machine type - remove the unnecessary comment Changes since v3: - add README.s5pc1xx file MAINTAINERS|4 + MAKEALL|1 + Makefile |3 + board/samsung/smdkc100/Makefile| 55 +++ board/samsung/smdkc100/config.mk | 16 ++ board/samsung/smdkc100/lowlevel_init.S | 215 board/samsung/smdkc100/mem_setup.S | 197 ++ board/samsung/smdkc100/onenand.c | 83 +++ board/samsung/smdkc100/smdkc100.c | 51 +++ doc/README.s5pc1xx | 56 include/configs/smdkc100.h | 242 11 files changed, 923 insertions(+), 0 deletions(-) create mode 100644 board/samsung/smdkc100/Makefile create mode 100644 board/samsung/smdkc100/config.mk create mode 100644 board/samsung/smdkc100/lowlevel_init.S create mode 100644 board/samsung/smdkc100/mem_setup.S create mode 100644 board/samsung/smdkc100/onenand.c create mode 100644 board/samsung/smdkc100/smdkc100.c create mode 100644 doc/README.s5pc1xx create mode 100644 include/configs/smdkc100.h diff --git a/MAINTAINERS b/MAINTAINERS index f42c8f0..778d5da 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -725,6 +725,10 @@ Alex Z lartSA1100 dnp1110 SA1110 +Minkyu Kang + + SMDKC100ARM CORTEX-A8 (S5PC100 SoC) + - Unknown / orphaned boards: diff --git a/MAKEALL b/MAKEALL index 776f968..a01fb11 100755 --- a/MAKEALL +++ b/MAKEALL @@ -601,6 +601,7 @@ LIST_ARM_CORTEX_A8="\ omap3_pandora \ omap3_zoom1 \ omap3_zoom2 \ + smdkc100\ " # diff --git a/Makefile b/Makefile index 9c5b2a5..eee6649 100644 --- a/Makefile +++ b/Makefile @@ -3137,6 +3137,9 @@ omap3_zoom1_config : unconfig omap3_zoom2_config : unconfig @$(MKCONFIG) $(@:_config=) arm arm_cortexa8 zoom2 logicpd omap3 +smdkc100_config: unconfig + @$(MKCONFIG) $(@:_config=) arm arm_cortexa8 smdkc100 samsung s5pc1xx + # ## XScale Systems # diff --git a/board/samsung/smdkc100/Makefile b/board/samsung/smdkc100/Makefile new file mode 100644 index 000..808d0dd --- /dev/null +++ b/board/samsung/smdkc100/Makefile @@ -0,0 +1,55 @@ +# +# (C) Copyright 2000, 2001, 2002 +# Wolfgang Denk, DENX Software Engineering, w...@denx.de. +# +# (C) Copyright 2008 +# Guennadi Liakhovetki, DENX Software Engineering, +# +# 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 $(TOPDIR)/config.mk + +LIB= $(obj)lib$(BOARD).a + +COBJS-y:= smdkc100.o +COBJS-$(CONFIG_SAMSUNG_ONENAND)+= onenand.o +SOBJS := lowlevel_init.o + +SRCS:= $(SOBJS:.o=.S) $(COBJS-y:.o=.c) +OBJS := $(addprefix $(obj),$(COBJS-y)) +SOBJS := $(addprefix $(obj),$(SOBJS)) + +$(LIB):$(obj).depend $(SOBJS) $(OBJS) + $(AR) $(ARFLAGS) $@ $(SOBJS) $(OBJS) + +clean: + rm -f $(SOBJS) $(OBJS) + +distclean: clean + rm -f $(LIB) core *.bak $(obj).depend + +# + +# defines $(obj).depend target +include $(SRCTREE)/rules.mk + +sinclude $(obj).depend + +# diff --git a/board/samsung/smdkc100/config.mk b/board/samsung/smdkc100/config.mk new file mode 100644 index 000..ebab420 --- /dev/null +++ b/board/samsung/smdkc100/config.mk @@ -0,0 +1,16 @@ +# +# Copyright (C) 200
Re: [U-Boot] AT91 working SD with u-boot
Hi Konrad, are you using the AT91SAM9G20-EK? In that case the difference between us is that I'm working on a different board which is using the slotb MCI while the AT91SAM9G20-EK uses slota. In case of slota it just worked because MCI_SDCR is 0 on reset but for slotb the SDCSEL field must be set to 1. Regards Sebastian Heutling On 10/01/2009 09:59 AM, Konrad Mattheis wrote: > Hi, > > for me this is working: > > Downloaded u-boot 2009.08 > > file cpu/arm926ejs/at91/at91sam9260_devices.c >> >> changed: >>> #if defined(CONFIG_HAS_DATAFLASH) >> to: >>> #if defined(CONFIG_HAS_DATAFLASH) || defined(CONFIG_ATMEL_SPI) > > patches: > > SOC headers: > http://lists.denx.de/pipermail/u-boot/2009-September/060053.html > > SD Patch V3 > http://lists.denx.de/pipermail/u-boot/2009-September/060243.html > > MCI support > http://lists.denx.de/pipermail/u-boot/2009-August/059595.html > > add to board init code: > > at91_mciX_hw_init (X for mci unit 0 / 1) for parameters have a look at > cpu/arm926ejs/at91/at91sam9260_devices.c > > bye > Konrad Mattheis > > > ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] AT91 working SD with u-boot
Hi Sebastian, yes I'm using an AT91SAM9G20-EK Rev.c with two SD slots. I used slot a but I think you just have to init slot b. in PatchV3 you can read: >at91_mci0_hw_init(int slot, int bus_width) >switch (slot) { > case 0: > . > case 1: So I think you just have to call at91_mci0_hw_init(1,4) for slot b. bye Konrad > -Ursprüngliche Nachricht- > Von: Sebastian Heutling [mailto:heutl...@who-ing.de] > Gesendet: Donnerstag, 1. Oktober 2009 10:26 > An: Konrad Mattheis > Cc: u-boot@lists.denx.de > Betreff: Re: AT91 working SD with u-boot > > Hi Konrad, > > are you using the AT91SAM9G20-EK? > > In that case the difference between us is that I'm working on a > different board which is using the slotb MCI while the AT91SAM9G20-EK > uses slota. > > In case of slota it just worked because MCI_SDCR is 0 on reset but for > slotb the SDCSEL field must be set to 1. > > Regards > > Sebastian Heutling > > > On 10/01/2009 09:59 AM, Konrad Mattheis wrote: > > Hi, > > > > for me this is working: > > > > Downloaded u-boot 2009.08 > > > > file cpu/arm926ejs/at91/at91sam9260_devices.c > >> > >> changed: > >>> #if defined(CONFIG_HAS_DATAFLASH) > >> to: > >>> #if defined(CONFIG_HAS_DATAFLASH) || defined(CONFIG_ATMEL_SPI) > > > > patches: > > > > SOC headers: > > http://lists.denx.de/pipermail/u-boot/2009-September/060053.html > > > > SD Patch V3 > > http://lists.denx.de/pipermail/u-boot/2009-September/060243.html > > > > MCI support > > http://lists.denx.de/pipermail/u-boot/2009-August/059595.html > > > > add to board init code: > > > > at91_mciX_hw_init (X for mci unit 0 / 1) for parameters have a look > at cpu/arm926ejs/at91/at91sam9260_devices.c > > > > bye > > Konrad Mattheis > > > > > > > ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] new default shortcut to config & build a board
Hi Mike, > On Monday 24 August 2009 17:28:26 Mike Frysinger wrote: >> The majority of the time that I build things in U-Boot, I want to just >> build for the board. I don't make board config tweaks after selecting the >> board. So add a new pattern rule that allows people to combine two steps >> in one go: >> `make foo_config && make` => `make foo` >> >> This shouldn't conflict with any existing make rules as the pattern rule >> is used only the rule doesn't already exist. Hm, I just tried this patch and I see a strange behaviour: [...@pollux u-boot-testing (mao-rd-hor)]$ make -s sequoia Configuring for sequoia board... Configuring for sequoia board... It is not obvious for me why I get this message twice - all I verified is that both messages are definitely from stdout only. Apart from that, I don't see a reason why this should not go in. Currently I use "./MAKEALL " for the same purpose btw. Cheers Detlev -- If we knew what it was we were doing, we wouldn't call it research. -- Einstein -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: d...@denx.de ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] AT91 working SD with u-boot
Hi Konrad, On 10/01/2009 10:33 AM, Konrad Mattheis wrote: > Hi Sebastian, > > yes I'm using an AT91SAM9G20-EK Rev.c with two SD slots. > I used slot a but I think you just have to init slot b. > > in PatchV3 you can read: > >> at91_mci0_hw_init(int slot, int bus_width) > >> switch (slot) { >> case 0: >> . >> case 1: > So I think you just have to call at91_mci0_hw_init(1,4) for > slot b. No - that is not enough. It just enables the clock for MCI and configures the pins. But the MCI itself needs to know which slot to address. Suppose you want to use both slots at the same time (and the drivers would support that). Then you would call: at91_mci0_hw_init(0, 4) at91_mci0_hw_init(1, 4) In order to access both slots the driver (atmel_mci) needs to select which slot to address. And that is what the SDCSEL field of MCI-SDCR is for (see also Datasheet of the AT91SAM9G20 35.9.4 (probably at page 607)). Regards Sebastian ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] Make arm926ejs use -mabi=apcs-gnu to avoid EABI problems
> -Original Message- > From: Simon Kagstrom [mailto:simon.kagst...@netinsight.net] > Sent: Thursday, October 01, 2009 12:59 PM > To: Wolfgang Denk > Cc: dk-arm-li...@gmx.de; u-boot@lists.denx.de; Prafulla > Wadaskar; Stefan Roese; Tom Rix; Paulraj, Sandeep; > Jean-Christophe PLAGNIOL-VILLARD > Subject: [PATCH] Make arm926ejs use -mabi=apcs-gnu to avoid > EABI problems > > Using -mabi=apcs-gnu allows Marvell Kirkwood-based boards to boot with > the EABI changes introduced in commit > f772acf8a584067033eff1e231fcd1fb3a00d3d9. > > Signed-off-by: Simon Kagstrom > --- > Wolfgang can live with this change to make Kirkwood builds work again: > > On Wed, 30 Sep 2009 22:32:08 +0200 > Wolfgang Denk wrote: > > > > -PLATFORM_CPPFLAGS += -march=armv5te > > > +PLATFORM_CPPFLAGS += -march=armv5te -mabi=apcs-gnu > > > > I could live with this part, if it was thoroughly tested > and does not > > cause problems with the most frequently used tool chains (which I'm > > afraid it would - I think I remember that I saw errors or unexpected > > behaviour when using multiple, different "-mabi" settings). > > It would be nice though if owners of other arm926ejs-boards could test > the patch and see that it doesn't break things. Depending on the > compiler, you might want to build with USE_PRIVATE_LIBGCC=yes. > > I've tested on a OpenRD-base board. > > cpu/arm926ejs/config.mk |2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/cpu/arm926ejs/config.mk b/cpu/arm926ejs/config.mk > index f8ef90f..466ccff 100644 > --- a/cpu/arm926ejs/config.mk > +++ b/cpu/arm926ejs/config.mk > @@ -23,7 +23,7 @@ > > PLATFORM_RELFLAGS += -fno-common -ffixed-r8 -msoft-float > > -PLATFORM_CPPFLAGS += -march=armv5te > +PLATFORM_CPPFLAGS += -march=armv5te -mabi=apcs-gnu Ack But I think ack for other Arm architecture really important here :-) Regards. Prafulla . . > # > == > === > # > # Supply options according to compiler version > -- > 1.6.0.4 > ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] Bluetooth support in u-boot
Hi all, Did anyone work towards providing bluetooth support in U-boot? if not full atleast initial stack & HCI support ? It will be very helpful if someone can please provide any link / clues of work done in this regard. Thanks Rupesh ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] new default shortcut to config & build a board
On Mon, Aug 24, 2009 at 11:28 PM, Mike Frysinger wrote: > > +%: %_config > + $(MAKE) $...@_config <--- Delete this, because the %_config already > calls the target config block > + $(MAKE) > + best regards, luigi -- Luigi 'Comio' Mantellini R&D - Software Industrie Dial Face S.p.A. Via Canzo, 4 20068 Peschiera Borromeo (MI), Italy Tel.: +39 02 5167 2813 Fax: +39 02 5167 2459 web: www.idf-hit.com mail: luigi.mantell...@idf-hit.com ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v0 2/2] u-boot-2009.08 NET: Base support for etsec2.0
On Sep 24, 2009, at 7:07 AM, Sandeep Gopalpet wrote: > 1. Modified the tsec_mdio structure to include the new regs > 2. Modified the MDIO_BASE_ADDR so that it will handle both > older version and new version of etsec. > > Signed-off-by: Sandeep Gopalpet > --- > include/asm-ppc/immap_85xx.h |6 +- > include/tsec.h | 13 - > 2 files changed, 17 insertions(+), 2 deletions(-) > > diff --git a/include/asm-ppc/immap_85xx.h b/include/asm-ppc/ > immap_85xx.h > index dc82f49..bbeb585 100644 > --- a/include/asm-ppc/immap_85xx.h > +++ b/include/asm-ppc/immap_85xx.h > @@ -1936,10 +1936,14 @@ typedef struct ccsr_gur { > (CONFIG_SYS_IMMR + CONFIG_SYS_MPC85xx_USB_OFFSET) > > /* TSEC and MDIO OFFSETS */ > +#ifdef CONFIG_P1020 we should use something like TSECV2 instead of CONFIG_P1020 > +#define CONFIG_SYS_TSEC1_OFFSET (0xB) > +#else > #define CONFIG_SYS_TSEC1_OFFSET (0x24000) > +#endif > #define TSEC_SIZE (0x01000) > > -#define CONFIG_SYS_MDIO1_OFFSET (0x24520) > +#define CONFIG_SYS_MDIO1_OFFSET (0x24000) > #define MDIO_OFFSET (0x01000) > > #define TSEC_BASE_ADDR(CONFIG_SYS_IMMR + > CONFIG_SYS_TSEC1_OFFSET) > diff --git a/include/tsec.h b/include/tsec.h > index 342c07e..a915266 100644 > --- a/include/tsec.h > +++ b/include/tsec.h > @@ -29,7 +29,7 @@ > #endif > > #ifndef CONFIG_SYS_MDIO1_OFFSET > -#define CONFIG_SYS_MDIO1_OFFSET (0x24520) > +#define CONFIG_SYS_MDIO1_OFFSET (0x24000) > #endif > > #ifndef MDIO_OFFSET > @@ -478,14 +478,25 @@ typedef struct tsec_hash_regs > uintres2[24]; > } tsec_hash_t; > > +/* MDIO structure for etsec2.0. > + * Backward compatible to etsec1.x > + */ > + > typedef struct tsec_mdio > { > + uintres1[4]; > + uintieventm;/* MDIO Interrupt event register */ > + uintimaskm; /* MDIO Interrupt mask register */ > + uintres2; > + uintemapm; /* MDIO Event mapping register */ > + uintres3[320]; > uintmiimcfg;/* MII Management: Configuration */ > uintmiimcom;/* MII Management: Command */ > uintmiimadd;/* MII Management: Address */ > uintmiimcon;/* MII Management: Control */ > uintmiimstat; /* MII Management: Status */ > uintmiimind;/* MII Management: Indicators */ > + uintres4[690]; > } tsec_mdio_t; > > typedef struct tsec > -- > 1.5.2.2 > > ___ > 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] mem_mtest: bail out after finding 1st memory error.
Wolfgang Denk wrote: > Dear Paul Gortmaker, > > In message <4ac3c540.9050...@windriver.com> you wrote: >> If you still think it is best to maintain current behaviour >> and not stop after the 1st error, that is fine, I can do that, >> but I just wanted to be sure it was clear why I did it this >> way. > > I have used the code many times (well, to be honest, not sooo many > times, but several times) exactly that way: letting it run forever > (or, for a long time), while manipulating the hardware (like using a > hair dryer resp. cooling spray on it). In such a situation it is very > useful when the code does _not_ terminate after the first error (even > is this might have been the intention in earlier versions). Definitely a valid use case. Hopefully one I never have to use personally, mind you. > > So beause (1) it is the behaviour users might be used to, (2) I see > use cases for this and (3) adding a new option will allow to have both > beheaviours so anybody can chose what he wants, I think we should do > as I suggested. OK. I can do that. What about the CONFIG_ALT_MEMTEST then? Should it be changed to run continuously as well, so at least the two tests are consistent in their default behaviours? Paul. > > Best regards, > > Wolfgang Denk > ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] Pull request u-boot-blackfin.git
The following changes since commit 984f10baac8ef6032df52f135943d6b0bc96f724: Wolfgang Denk (1): mpc5121ads: fix breakage introduced when reordering elpida_mddrc_config[] are available in the git repository at: git://www.denx.de/git/u-boot-blackfin.git master Mike Frysinger (2): Blackfin: bf533-ezkit: update env location Blackfin: update default console= settings include/configs/bf533-ezkit.h |2 +- include/configs/bfin_adi_common.h |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2] new default shortcut to config & build a board
The majority of the time that I build things in U-Boot, I want to just build for the board. I don't make board config tweaks after selecting the board. So add a new pattern rule that allows people to combine two steps in one go: `make foo_config && make` => `make foo` This shouldn't conflict with any existing make rules as the pattern rule is used only the rule doesn't already exist. Signed-off-by: Mike Frysinger --- v2 - fix duplicate config left over from original code pointed out by Luigi Makefile |7 +++ 1 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 9c5b2a5..15363b8 100644 --- a/Makefile +++ b/Makefile @@ -501,6 +501,9 @@ unconfig: $(obj)board/*/config.tmp $(obj)board/*/*/config.tmp \ $(obj)include/autoconf.mk $(obj)include/autoconf.mk.dep +%: %_config + $(MAKE) + # # PowerPC # @@ -3525,10 +3528,6 @@ BFIN_BOARDS += ibf-dsp561 $(BFIN_BOARDS:%=%_config) : unconfig @$(MKCONFIG) $(@:_config=) blackfin blackfin $(@:_config=) -$(BFIN_BOARDS): - $(MAKE) $...@_config - $(MAKE) - # # AVR32 # -- 1.6.5.rc2 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] Make arm926ejs use -mabi=apcs-gnu to avoid EABI problems
Dear Prafulla & all, in message <73173d32e9439e4abb5151606c3e19e202ef7e9...@sc-vexch1.marvell.com> you wrote: > > > > > -PLATFORM_CPPFLAGS += -march=armv5te > > > > +PLATFORM_CPPFLAGS += -march=armv5te -mabi=apcs-gnu > > > > > > I could live with this part, if it was thoroughly tested and does not > > > cause problems with the most frequently used tool chains (which I'm > > > afraid it would - I think I remember that I saw errors or unexpected > > > behaviour when using multiple, different "-mabi" settings). > > > > It would be nice though if owners of other arm926ejs-boards could test > > the patch and see that it doesn't break things. Depending on the > > compiler, you might want to build with USE_PRIVATE_LIBGCC=yes. Actually testing it is just one part of the issue, and actually the less important one. > Ack > But I think ack for other Arm architecture really important here :-) I have to admit that I really hesitate ifwe should add this - the longer I think about it, the more I tend to say no. I understand that it's a quick workaround for the acute problem that works with some tool chains and on some boards. This makes the "pro" for this patch. On the other hand, the fact remains that we do not understand the exact nature of the problem, as nobody has debugged it to the that level yet. So even when we add this, we cannot be sure if it fixes all problems, on all systems, and with all tool chains - it might happen as well that we run into the same issue again soon, or that there are still issues left somewhere, undetected. If we check in this workaround, the motivation for digging for the real cause will fade away quickly, until it hits us really hard. This makes a big "con" for this patch. I call upon everybody who has some time and resources and who is able to reproduce the problem (so far I was not) to help and dig into this, so we can understand what's going on, and finally fix the cause of the problem, instead of trying to hush it up. 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 All a hacker needs is a tight PUSHJ, a loose pair of UUOs, and a warm place to shift. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v0 1/2] u-boot-2009.08 NET: Move MDIO regs out of TSEC Space
Dear Sandeep Gopalpet, In message <12537940473817-git-send-email-sandeep.ku...@freescale.com> you wrote: > Moved the mdio regs out of the tsec structure,and > provided different offsets for tsec base and mdio > base so that provision for etsec2.0 can be provided. > > This patch helps in providing the support for etsec2.0 > In etsec2.0, the MDIO register space and the etsec reg > space are different Please omit the "u-boot-2009.08" from the commit message. It has no place there (same in the following patch, too). 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 Worlds may change, galaxies disintegrate, but a woman always remains a woman. -- Kirk, "The Conscience of the King", stardate 2818.9 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] mem_mtest: bail out after finding 1st memory error.
Dear Paul, in message <4ac4b612.7020...@windriver.com> you wrote: > > > So beause (1) it is the behaviour users might be used to, (2) I see > > use cases for this and (3) adding a new option will allow to have both > > beheaviours so anybody can chose what he wants, I think we should do > > as I suggested. > > OK. I can do that. What about the CONFIG_ALT_MEMTEST then? > Should it be changed to run continuously as well, so at least > the two tests are consistent in their default behaviours? Yes, I guess that would be best. Thanks. 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 Where a calculator on the ENIAC is equipped with 18,000 vacuum tubes and weighs 30 tons, computers in the future may have only 1,000 vacuum tubes and weigh only 1/2 tons. - Popular Mechanics, March 1949 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] NAND UnCorrectable RS-ECC Error on Freescale MXC
Hi All, I am trying to introduce a Samsung NAND flash part (K9F8G08U0M) to a Freescale mxc platform. Looks like the device code used in the NAND "read id" operation is already a part of the drivers/mtd/nand/nand_ids.c, looking at line "{"NAND 1GiB 3,3V 8-bit", 0xD3, 0, 1024, 0, LP_OPTIONS},) Its different in the sense that it has a page size of 4K but the code specific to 4k page size handling seems to be there in the code After booting out of RAM, i am getting "UnCorrectable RS-ECC Error" during an initial page read operation. NAND: UnCorrectable RS-ECC Error Bad block table found at page 262080, version 0x01 UnCorrectable RS-ECC Error UnCorrectable RS-ECC Error Bad block table found at page 262016, version 0x01 UnCorrectable RS-ECC Error UnCorrectable RS-ECC Error nand_read_bbt: Bad block at 0x1e08 nand_read_bbt: Bad block at 0x1e0c nand_read_bbt: Bad block at 0x1e30 nand_read_bbt: Bad block at 0x1e34 nand_read_bbt: Bad block at 0x2334 nand_read_bbt: Bad block at 0x3694 nand_read_bbt: Bad block at 0x3698 nand_read_bbt: Bad block at 0x369c nand_read_bbt: Bad block at 0x36a0 nand_read_bbt: Bad block at 0x3ad0 nand_read_bbt: Bad block at 0x3ad4 nand_read_bbt: Bad block at 0x3ad8 nand_read_bbt: Bad block at 0x3f70 nand_read_bbt: Bad block at 0x3f74 nand_read_bbt: Bad block at 0x3f80 nand_read_bbt: Bad block at 0x3f84 nand_read_bbt: Bad block at 0x3f88 nand_read_bbt: Bad block at 0x3f90 nand_read_bbt: Bad block at 0x3f9c nand_read_bbt: Bad block at 0x3fa4 nand_read_bbt: Bad block at 0x3fa8 nand_read_bbt: Bad block at 0x3fac nand_read_bbt: Bad block at 0x3fb0 nand_read_bbt: Bad block at 0x3fb4 nand_read_bbt: Bad block at 0x3fb8 nand_read_bbt: Bad block at 0x3fc4 nand_read_bbt: Bad block at 0x3fc8 nand_read_bbt: Bad block at 0x3fd0 nand_read_bbt: Bad block at 0x3fd4 nand_read_bbt: Bad block at 0x3fe8 nand_read_bbt: Bad block at 0x3ff0 nand_read_bbt: Bad block at 0x3ff4 nand_read_bbt: Bad block at 0x3ff8 nand_read_bbt: Bad block at 0x3ffc 1024 MiB Please let me know the fastest path to get around or debug this issue. Thanks, Alfred ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH][v4] mpc8260: move FDT memory node fixup into common CPU code.
Signed-off-by: Marcel Ziswiler Tested-by: Heiko Schocher --- Changes since v1: - Added previously missed mgcoge board as pointed out by Peter Tyser and Heiko - Moved the board-specific Ethernet modifications into separate patch Changes since v2: - Added Heiko's tested-by Changes since v3: - Re-based to origin/master board/freescale/mpc8260ads/mpc8260ads.c | 13 - board/ids8247/ids8247.c | 16 board/keymile/mgcoge/mgcoge.c |8 +--- board/muas3001/muas3001.c | 16 cpu/mpc8260/cpu.c |1 + 5 files changed, 2 insertions(+), 52 deletions(-) diff --git a/board/freescale/mpc8260ads/mpc8260ads.c b/board/freescale/mpc8260ads/mpc8260ads.c index 49a88bb..be55626 100644 --- a/board/freescale/mpc8260ads/mpc8260ads.c +++ b/board/freescale/mpc8260ads/mpc8260ads.c @@ -550,24 +550,11 @@ void pci_init_board(void) #endif #if defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP) -void ft_blob_update(void *blob, bd_t *bd) -{ - int ret; - - ret = fdt_fixup_memory(blob, (u64)bd->bi_memstart, (u64)bd->bi_memsize); - - if (ret < 0) { - printf("ft_blob_update(): cannot set /memory/reg " - "property err:%s\n", fdt_strerror(ret)); - } -} - void ft_board_setup(void *blob, bd_t *bd) { ft_cpu_setup(blob, bd); #ifdef CONFIG_PCI ft_pci_setup(blob, bd); #endif - ft_blob_update(blob, bd); } #endif diff --git a/board/ids8247/ids8247.c b/board/ids8247/ids8247.c index 79fe9da..d621833 100644 --- a/board/ids8247/ids8247.c +++ b/board/ids8247/ids8247.c @@ -400,24 +400,8 @@ int board_nand_init(struct nand_chip *nand) #endif /* CONFIG_CMD_NAND */ #if defined(CONFIG_OF_BOARD_SETUP) && defined(CONFIG_OF_LIBFDT) -/* - * update "memory" property in the blob - */ -void ft_blob_update(void *blob, bd_t *bd) -{ - int ret; - - ret = fdt_fixup_memory(blob, (u64)bd->bi_memstart, (u64)bd->bi_memsize); - - if (ret < 0) { - printf("ft_blob_update(): cannot set /memory/reg " - "property err:%s\n", fdt_strerror(ret)); - } -} - void ft_board_setup(void *blob, bd_t *bd) { ft_cpu_setup( blob, bd); - ft_blob_update(blob, bd); } #endif /* defined(CONFIG_OF_BOARD_SETUP) && defined(CONFIG_OF_LIBFDT) */ diff --git a/board/keymile/mgcoge/mgcoge.c b/board/keymile/mgcoge/mgcoge.c index b16a01c..932a805 100644 --- a/board/keymile/mgcoge/mgcoge.c +++ b/board/keymile/mgcoge/mgcoge.c @@ -312,11 +312,10 @@ int hush_init_var (void) #if defined(CONFIG_OF_BOARD_SETUP) && defined(CONFIG_OF_LIBFDT) /* - * update "memory" property in the blob + * update "flash" property in the blob */ void ft_blob_update (void *blob, bd_t *bd) { - ulong memory_data[2] = {0}; ulong *flash_data = NULL; ulong flash_reg[6] = {0}; flash_info_t*info; @@ -324,11 +323,6 @@ void ft_blob_update (void *blob, bd_t *bd) int size; int i = 0; - memory_data[0] = cpu_to_be32 (bd->bi_memstart); - memory_data[1] = cpu_to_be32 (bd->bi_memsize); - fdt_set_node_and_value (blob, "/memory", "reg", memory_data, - sizeof (memory_data)); - len = fdt_get_node_and_value (blob, "/localbus", "ranges", (void *)&flash_data); diff --git a/board/muas3001/muas3001.c b/board/muas3001/muas3001.c index 36caed8..e0a7f32 100644 --- a/board/muas3001/muas3001.c +++ b/board/muas3001/muas3001.c @@ -308,25 +308,9 @@ int board_early_init_r (void) void ft_blob_update (void *blob, bd_t *bd) { int ret, nodeoffset = 0; - ulong memory_data[2] = {0}; ulong flash_data[4] = {0}; ulong speed = 0; - memory_data[0] = cpu_to_be32 (bd->bi_memstart); - memory_data[1] = cpu_to_be32 (bd->bi_memsize); - - nodeoffset = fdt_path_offset (blob, "/memory"); - if (nodeoffset >= 0) { - ret = fdt_setprop (blob, nodeoffset, "reg", memory_data, - sizeof(memory_data)); - if (ret < 0) - printf ("ft_blob_update): cannot set /memory/reg " - "property err:%s\n", fdt_strerror (ret)); - } else { - /* memory node is required in dts */ - printf ("ft_blob_update(): cannot find /memory node " - "err:%s\n", fdt_strerror(nodeoffset)); - } /* update Flash addr, size */ flash_data[2] = cpu_to_be32 (CONFIG_SYS_FLASH_BASE); flash_data[3] = cpu_to_be32 (CONFIG_SYS_FLASH_SIZE); diff --git a/cpu/mpc8260/cpu.c b/cpu/mpc8260/cpu.c index 17e6248..aedbf29 100644 --- a/cpu/mpc8260/cpu.c +++ b/cpu/mpc8260/cpu.c @@ -318,6 +318,7 @@ void ft_cpu_setup (void *blob, bd_t *bd) "timebase-frequency", OF_TBCLK, 1); do_fixup_by_prop_u32(blob, "device_type", "cpu", 4,
[U-Boot] problem detecting CFI
I have a working u-boot 2008.10 on a mips 32 board and am trying to port it over to u-boot 2009.06. So I used buildroot 2009.08 to build the tool chain for my mips32 board as well as u-boot2009.06. I also copied the previous u-boot initialization code to initialize timer, serial port, ram and etc from u-boot 2008.10 to 2009.06. Right now the problem is the new u-boot 2009.06 does not detect cfi of the flash. I am pretty sure u-boot is running from SDRAM when the problem happens because the address is in the range of SDRAM. Please let me know if you have any suggestion - I am running out of ideas. I am attaching the printout from both the working u-boot 2008.10 and u-boot 2009.06 below. Thanks a lot. U-Boot 2009.06 (Sep 30 2009 - 18:41:26) Reset Cause: Hardware Reset DRAM: 64 MB Top of RAM usable for U-Boot at: 9800 Reserving 139k for U-Boot at: 97fdc000 Reserving 4352k for malloc() at: 97b9c000 Reserving 36 Bytes for Board Info at: 97b9bfdc Reserving 36 Bytes for Global Data at: 97b9bfb8 Reserving 128k for boot params() at: 97b7bfb8 Stack Pointer at: 97b7bf98 Now running in RAM - U-Boot at: 97fdc000 flash detect cfi not found flash detect cfi not found U-Boot 2008.10 (Sep 30 2009 - 11:37:03) Reset Cause: Hardware Reset DRAM: 64 MB Top of RAM usable for U-Boot at: 9800 Reserving 736k for U-Boot at: 97f44000 Reserving 4352k for malloc() at: 97b04000 Reserving 44 Bytes for Board Info at: 97b03fd4 Reserving 36 Bytes for Global Data at: 97b03fb0 Reserving 128k for boot params() at: 97ae3fb0 Stack Pointer at: 97ae3f98 Now running in RAM - U-Boot at: 97f44000 flash detect cfi fwc addr b000 cmd f0 f0 8bit x 8 bit fwc addr b000 cmd ff ff 8bit x 8 bit fwc addr b055 cmd 98 98 8bit x 8 bit is= cmd 51(Q) addr b010 is= 4f 51 fwc addr b555 cmd 98 98 8bit x 8 bit is= cmd 51(Q) addr b010 is= 4f 51 fwc addr b000 cmd f0 f0f0 16bit x 8 bit fwc addr b000 cmd ff 16bit x 8 bit fwc addr b0aa cmd 98 9898 16bit x 8 bit is= cmd 51(Q) addr b020 is= 5151 5151 is= cmd 52(R) addr b022 is= 5252 5252 is= cmd 59(Y) addr b024 is= 5959 5959 device interface is 2 found port 2 chip 1 port 16 bits chip 8 bits ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] problem detecting CFI
I just found something interesting - In my previous email I thought the CFI detection was running from DRAM, but that assumption seems to be wrong. Previously I though it was running from DRAM because I traced the execution using BDI into mips/start">cpu/mips/start.S relocate_code, it runs to the place where it relocates itself. To be exact, here - addi t0, s2, in_ram - start jr t0 nop I checked and found the pc register changed to pointing to a SDRAM location, so relocation seems to be fine. I also load the symbol-file to the DRAM location at that point. But afterwards if I set breakpoint to board_init_r, the breakpoint is not triggered. Then I realized if I keep using the same symbol-file, the breakpoint at board_init_r can be triggered, and at that point, I can see the PC is still pointing to the flash. I don't understand how can the code, which has been relocated to SDRAM at one point, suddenly going back to run in the flash when it calls board_init_r. Can someone help me? Thanks. On Thu, 01 Oct 2009 16:47 -0500, w...@fastmail.fm wrote: > I have a working u-boot 2008.10 on a mips 32 board and am trying to port > it over to u-boot 2009.06. > So I used buildroot 2009.08 to build the tool chain for my mips32 board > as well as u-boot2009.06. I also copied the previous u-boot > initialization code to > initialize timer, serial port, ram and etc from u-boot 2008.10 to > 2009.06. > > Right now the problem is the new u-boot 2009.06 does not detect cfi of > the flash. I am pretty sure u-boot is running from SDRAM when the > problem happens because the address is in the range of SDRAM. Please let > me know if you have any suggestion - I am running out of ideas. I am > attaching the printout from both the working u-boot 2008.10 and u-boot > 2009.06 below. > > Thanks a lot. > > U-Boot 2009.06 (Sep 30 2009 - 18:41:26) > > Reset Cause: Hardware Reset > DRAM: 64 MB > Top of RAM usable for U-Boot at: 9800 > Reserving 139k for U-Boot at: 97fdc000 > Reserving 4352k for malloc() at: 97b9c000 > Reserving 36 Bytes for Board Info at: 97b9bfdc > Reserving 36 Bytes for Global Data at: 97b9bfb8 > Reserving 128k for boot params() at: 97b7bfb8 > Stack Pointer at: 97b7bf98 > Now running in RAM - U-Boot at: 97fdc000 > flash detect cfi > not found > flash detect cfi > not found > > > U-Boot 2008.10 (Sep 30 2009 - 11:37:03) > > Reset Cause: Hardware Reset > DRAM: 64 MB > Top of RAM usable for U-Boot at: 9800 > Reserving 736k for U-Boot at: 97f44000 > Reserving 4352k for malloc() at: 97b04000 > Reserving 44 Bytes for Board Info at: 97b03fd4 > Reserving 36 Bytes for Global Data at: 97b03fb0 > Reserving 128k for boot params() at: 97ae3fb0 > Stack Pointer at: 97ae3f98 > Now running in RAM - U-Boot at: 97f44000 > flash detect cfi > fwc addr b000 cmd f0 f0 8bit x 8 bit > fwc addr b000 cmd ff ff 8bit x 8 bit > fwc addr b055 cmd 98 98 8bit x 8 bit > is= cmd 51(Q) addr b010 is= 4f 51 > fwc addr b555 cmd 98 98 8bit x 8 bit > is= cmd 51(Q) addr b010 is= 4f 51 > fwc addr b000 cmd f0 f0f0 16bit x 8 bit > fwc addr b000 cmd ff 16bit x 8 bit > fwc addr b0aa cmd 98 9898 16bit x 8 bit > is= cmd 51(Q) addr b020 is= 5151 5151 > is= cmd 52(R) addr b022 is= 5252 5252 > is= cmd 59(Y) addr b024 is= 5959 5959 > device interface is 2 > found port 2 chip 1 port 16 bits chip 8 bits > ___ > 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
[U-Boot] [PATCH] mem_mtest: fix error reporting, allow escape with ^C
The basic memtest function tries to watch for ^C after each pattern pass as an escape mechanism, but if things are horribly wrong, we'll be stuck in an inner loop flooding the console with error messages and never check for ^C. To make matters worse, if the user waits for all the error messages to complete, we then incorrectly report the test passed without errors. Adding a check for ^C after any error is printed will give the end user an escape mechanism from a console flood without slowing down the overall test speed on a slow processor. Also, the more extensive memtest quit after just a single error, which is inconsistent with the normal memtest, and not useful if if you are doing dynamic environmental impact testing, such as heating/cooling etc. Both tests now track the error count and report it properly at test completion. Signed-off-by: Paul Gortmaker --- common/cmd_mem.c | 54 ++ 1 files changed, 42 insertions(+), 12 deletions(-) diff --git a/common/cmd_mem.c b/common/cmd_mem.c index 9850800..e1a7964 100644 --- a/common/cmd_mem.c +++ b/common/cmd_mem.c @@ -631,7 +631,7 @@ int do_mem_mtest (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) vu_long *addr, *start, *end; ulong val; ulong readback; - int rcode = 0; + ulong errs = 0; int iterations = 1; int iteration_limit; @@ -698,8 +698,8 @@ int do_mem_mtest (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) if (iteration_limit && iterations > iteration_limit) { - printf("Tested %d iteration(s) without errors.\n", - iterations-1); + printf("Tested %d iteration(s) with %lu errors.\n", + iterations-1, errs); return 0; } @@ -732,9 +732,14 @@ int do_mem_mtest (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) *dummy = ~val; /* clear the test data off of the bus */ readback = *addr; if(readback != val) { -printf ("FAILURE (data line): " + printf ("FAILURE (data line): " "expected %08lx, actual %08lx\n", val, readback); + errs++; + if (ctrlc()) { + putc ('\n'); + return 1; + } } *addr = ~val; *dummy = val; @@ -743,6 +748,11 @@ int do_mem_mtest (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) printf ("FAILURE (data line): " "Is %08lx, should be %08lx\n", readback, ~val); + errs++; + if (ctrlc()) { + putc ('\n'); + return 1; + } } } } @@ -808,7 +818,11 @@ int do_mem_mtest (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) printf ("\nFAILURE: Address bit stuck high @ 0x%.8lx:" " expected 0x%.8lx, actual 0x%.8lx\n", (ulong)&start[offset], pattern, temp); - return 1; + errs++; + if (ctrlc()) { + putc ('\n'); + return 1; + } } } start[test_offset] = pattern; @@ -826,7 +840,11 @@ int do_mem_mtest (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) printf ("\nFAILURE: Address bit stuck low or shorted @" " 0x%.8lx: expected 0x%.8lx, actual 0x%.8lx\n", (ulong)&start[offset], pattern, temp); - return 1; + errs++; + if (ctrlc()) { + putc ('\n'); + return 1; + } } } start[test_offset] = pattern; @@ -864,7 +882,11 @@ int do_mem_mtest (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) printf ("\nFAILURE (read/write) @ 0x%.8lx:" " expected 0x%.8lx, actual 0x%.8lx)\n", (ulong)&start[offset], pattern, temp); - return 1; + errs++; + if (ctrlc()) { + putc ('\n'); + return 1; +
Re: [U-Boot] [PATCH] mem_mtest: fix error reporting, allow escape with ^C
On Thursday 01 October 2009 19:52:27 Paul Gortmaker wrote: > if (iteration_limit && iterations > iteration_limit) { > - printf("Tested %d iteration(s) without errors.\n", > - iterations-1); > + printf("Tested %d iteration(s) with %lu errors.\n", > + iterations-1, errs); > return 0; if you're showing the errs variable, then presumably it could possibly be non- zero, so you wouldnt want to return 0 right ? return !!errs; > char *argv[]) incr = -incr; > } > #endif > - return rcode; > + return 0; i dont think you want to return 0 all the time here right ? return !!errs; otherwise, the basic ^C handling is something that has annoyed me in the past, so acked-by for that :) -mike signature.asc Description: This is a digitally signed message part. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] mem_mtest: fix error reporting, allow escape with ^C
Mike Frysinger wrote: > On Thursday 01 October 2009 19:52:27 Paul Gortmaker wrote: >> if (iteration_limit && iterations > iteration_limit) { >> -printf("Tested %d iteration(s) without errors.\n", >> -iterations-1); >> +printf("Tested %d iteration(s) with %lu errors.\n", >> +iterations-1, errs); >> return 0; > > if you're showing the errs variable, then presumably it could possibly be non- > zero, so you wouldnt want to return 0 right ? > return !!errs; > >> char *argv[]) incr = -incr; >> } >> #endif >> -return rcode; >> +return 0; > > i dont think you want to return 0 all the time here right ? > return !!errs; Doh! I had it in my mind to "return errs!=0;" and then forgot. Thanks, I'll respin and resend tomorrow. Paul. > > otherwise, the basic ^C handling is something that has annoyed me in the > past, > so acked-by for that :) > -mike ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] TI DaVinci DM646x: Adding initial support for DM6467 EVM
From: Sandeep Paulraj This patch adds the initial support for DM6467 EVM. Other features like NET and NAND support will be added as follow up patches. Signed-off-by: Sandeep Paulraj --- There are multiple flavours of the DM646x. The newest DM646x SOC can operate at 1 GHz. The DM6467 EVM from Spectrum Digital can be used for both speed grades of the DM646x SOC . The only change on the EVM being an oscilator that operated at a higher frequency. The same board file will be used to support both SOC's. Support for this feature will be added as follow up patches. Patches will also be sent to enable EMAC, NAND and other features. Makefile|3 + board/davinci/dm6467evm/Makefile| 52 ++ board/davinci/dm6467evm/config.mk |2 + board/davinci/dm6467evm/dm6467evm.c | 31 include/configs/davinci_dm6467evm.h | 131 +++ 5 files changed, 219 insertions(+), 0 deletions(-) create mode 100644 board/davinci/dm6467evm/Makefile create mode 100644 board/davinci/dm6467evm/config.mk create mode 100644 board/davinci/dm6467evm/dm6467evm.c create mode 100644 include/configs/davinci_dm6467evm.h diff --git a/Makefile b/Makefile index 0b61d05..dc797b0 100644 --- a/Makefile +++ b/Makefile @@ -2962,6 +2962,9 @@ davinci_dm355evm_config : unconfig davinci_dm365evm_config : unconfig @$(MKCONFIG) $(@:_config=) arm arm926ejs dm365evm davinci davinci +davinci_dm6467evm_config : unconfig + @$(MKCONFIG) $(@:_config=) arm arm926ejs dm6467evm davinci davinci + imx27lite_config: unconfig @$(MKCONFIG) $(@:_config=) arm arm926ejs imx27lite logicpd mx27 diff --git a/board/davinci/dm6467evm/Makefile b/board/davinci/dm6467evm/Makefile new file mode 100644 index 000..26b0705 --- /dev/null +++ b/board/davinci/dm6467evm/Makefile @@ -0,0 +1,52 @@ +# +# (C) Copyright 2000, 2001, 2002 +# Wolfgang Denk, DENX Software Engineering, w...@denx.de. +# +# Copyright (C) 2007 Sergey Kubushyn +# +# 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 $(TOPDIR)/config.mk + +LIB= $(obj)lib$(BOARD).a + +COBJS := $(BOARD).o +SOBJS := + +SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) +OBJS := $(addprefix $(obj),$(COBJS)) +SOBJS := $(addprefix $(obj),$(SOBJS)) + +$(LIB):$(obj).depend $(OBJS) $(SOBJS) + $(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS) + +clean: + rm -f $(SOBJS) $(OBJS) + +distclean: clean + rm -f $(LIB) core *.bak $(obj).depend + +# +# This is for $(obj).depend target +include $(SRCTREE)/rules.mk + +sinclude $(obj).depend + +# diff --git a/board/davinci/dm6467evm/config.mk b/board/davinci/dm6467evm/config.mk new file mode 100644 index 000..ca801c2 --- /dev/null +++ b/board/davinci/dm6467evm/config.mk @@ -0,0 +1,2 @@ +#Provide at least 16MB spacing between us and the Linux Kernel image +TEXT_BASE = 0x8108 diff --git a/board/davinci/dm6467evm/dm6467evm.c b/board/davinci/dm6467evm/dm6467evm.c new file mode 100644 index 000..9605818 --- /dev/null +++ b/board/davinci/dm6467evm/dm6467evm.c @@ -0,0 +1,31 @@ +/* + * Copyright (C) 2009 Texas Instruments Incorporated + * + * 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., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#include +#include + +DECLARE_GLOBAL_DATA_PTR; + +int board_init(void) +{ + gd->bd->bi_arch_number = MACH_TYPE_DAVINCI_DM6467_EVM; + gd->bd->bi_boot_params = PHYS_SDRAM_1 + 0x100; + + return 0; +} + diff --git a/incl
[U-Boot] [PATCH] TI DaVinci DM355: Fix Compilation warning for DM355 EVM
From: Sandeep Paulraj This patch fixes a compilation warning while compiling the DM355 EVM. Signed-off-by: Sandeep Paulraj --- board/davinci/dm355evm/dm355evm.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/board/davinci/dm355evm/dm355evm.c b/board/davinci/dm355evm/dm355evm.c index 0a44748..87f284c 100644 --- a/board/davinci/dm355evm/dm355evm.c +++ b/board/davinci/dm355evm/dm355evm.c @@ -92,8 +92,8 @@ int board_eth_init(bd_t *bis) static void nand_dm355evm_select_chip(struct mtd_info *mtd, int chip) { struct nand_chip*this = mtd->priv; - u32 wbase = (u32) this->IO_ADDR_W; - u32 rbase = (u32) this->IO_ADDR_R; + unsigned long wbase = (unsigned long) this->IO_ADDR_W; + unsigned long rbase = (unsigned long) this->IO_ADDR_R; if (chip == 1) { __set_bit(14, &wbase); -- 1.6.0.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] TI DaVinci DM365: Fix Compilation warning for DM365 EVM
From: Sandeep Paulraj This patch fixes a compilation warning while compiling the DM365 EVM. Signed-off-by: Sandeep Paulraj --- board/davinci/dm365evm/dm365evm.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/board/davinci/dm365evm/dm365evm.c b/board/davinci/dm365evm/dm365evm.c index 5b97060..1e3a14f 100644 --- a/board/davinci/dm365evm/dm365evm.c +++ b/board/davinci/dm365evm/dm365evm.c @@ -79,8 +79,8 @@ int board_eth_init(bd_t *bis) static void nand_dm365evm_select_chip(struct mtd_info *mtd, int chip) { struct nand_chip*this = mtd->priv; - u32 wbase = (u32) this->IO_ADDR_W; - u32 rbase = (u32) this->IO_ADDR_R; + unsigned long wbase = (unsigned long) this->IO_ADDR_W; + unsigned long rbase = (unsigned long) this->IO_ADDR_R; if (chip == 1) { __set_bit(14, &wbase); -- 1.6.0.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] TI: DaVinci: Updating EMAC driver for DM365 and DM646x
From: Sandeep Paulraj The EMAC IP on DM365 and DM646x is slightly different from that on DM644x. This patch updates the DaVinci EMAC driver so that EMAC becomes operational on DM365 in U-Boot. A flag 'CONFIG_DAVINCI_EMAC_VERSION2' is used in the driver. This flag will need to be defined in the DM365 config file. Signed-off-by: Sandeep Paulraj --- The same modifications work on DM646x in a slightly older version of U-Boot. So when enabled this should work on the DM6467 EVM as well. This has at this point of time not been tested on the DM6467 in the latest version of U-Boot. drivers/net/davinci_emac.c | 79 ++- 1 files changed, 77 insertions(+), 2 deletions(-) diff --git a/drivers/net/davinci_emac.c b/drivers/net/davinci_emac.c index fa8cee4..0d61c91 100644 --- a/drivers/net/davinci_emac.c +++ b/drivers/net/davinci_emac.c @@ -107,6 +107,33 @@ static void davinci_eth_mdio_enable(void) while (adap_mdio->CONTROL & MDIO_CONTROL_IDLE) {;} } +/* Read a PHY register via MDIO inteface */ +static int mdio_read(int phy_addr, int reg_num) +{ + adap_mdio->USERACCESS0 = MDIO_USERACCESS0_GO | + MDIO_USERACCESS0_WRITE_READ | + ((reg_num & 0x1F) << 21) | + ((phy_addr & 0x1F) << 16); + + /* Wait for command to complete */ + while ((adap_mdio->USERACCESS0 & MDIO_USERACCESS0_GO) != 0); + + return adap_mdio->USERACCESS0 & 0x; +} + +/* Write to a PHY register via MDIO inteface */ +void mdio_write(int phy_addr, int reg_num, unsigned int data) +{ + /* Wait for User access register to be ready */ + while ((adap_mdio->USERACCESS0 & MDIO_USERACCESS0_GO) != 0); + + adap_mdio->USERACCESS0 = MDIO_USERACCESS0_GO | + MDIO_USERACCESS0_WRITE_WRITE | + ((reg_num & 0x1F) << 21) | + ((phy_addr & 0x1F) << 16) | + (data & 0x); +} + /* * Tries to find an active connected PHY. Returns 1 if address if found. * If no active PHY (or more than one PHY) found returns 0. @@ -248,6 +275,31 @@ static int davinci_mii_phy_write(char *devname, unsigned char addr, unsigned cha #endif +static void emac_gigabit_enable(void) +{ + int temp; + + temp = mdio_read(EMAC_MDIO_PHY_NUM, 0); + + if (temp & (1 << 6)) { + /* +* Check if link detected is giga-bit +* If Gigabit mode detected, enable gigbit in MAC and PHY +*/ + adap_emac->MACCONTROL |= EMAC_MACCONTROL_GIGFORCE | + EMAC_MACCONTROL_GIGABIT_ENABLE; + + /* +* The SYS_CLK which feeds the SOC for giga-bit operation +* does not seem to be enabled after reset as expected. +* Force enabling SYS_CLK by writing to the PHY +*/ + temp = mdio_read(EMAC_MDIO_PHY_NUM, 22); + temp |= (1 << 4); + mdio_write(EMAC_MDIO_PHY_NUM, 22, temp); + } +} + /* Eth device open */ static int davinci_eth_open(struct eth_device *dev, bd_t *bis) @@ -261,10 +313,15 @@ static int davinci_eth_open(struct eth_device *dev, bd_t *bis) /* Reset EMAC module and disable interrupts in wrapper */ adap_emac->SOFTRESET = 1; while (adap_emac->SOFTRESET != 0) {;} +#if defined(CONFIG_DAVINCI_EMAC_VERSION2) + adap_ewrap->SOFTRST = 1; + while (adap_ewrap->SOFTRST != 0); +#else adap_ewrap->EWCTL = 0; for (cnt = 0; cnt < 5; cnt++) { clkdiv = adap_ewrap->EWCTL; } +#endif rx_desc = emac_rx_desc; @@ -282,6 +339,10 @@ static int davinci_eth_open(struct eth_device *dev, bd_t *bis) adap_emac->MACADDRLO = (davinci_eth_mac_addr[5] << 8) | (davinci_eth_mac_addr[4]); +#if defined(CONFIG_DAVINCI_EMAC_VERSION2) + /* Set the Match and Valid Bits */ + adap_emac->MACADDRLO |= (1 << 19) | (1 << 20); +#endif adap_emac->MACHASH1 = 0; adap_emac->MACHASH2 = 0; @@ -347,8 +408,15 @@ static int davinci_eth_open(struct eth_device *dev, bd_t *bis) clkdiv = (EMAC_MDIO_BUS_FREQ / EMAC_MDIO_CLOCK_FREQ) - 1; adap_mdio->CONTROL = ((clkdiv & 0xff) | MDIO_CONTROL_ENABLE | MDIO_CONTROL_FAULT); +#if defined(CONFIG_DAVINCI_EMAC_VERSION2) + /* We need to wait for MDIO to start */ + udelay(1000); +#endif + if (!phy.get_link_speed(active_phy_addr)) return(0); + else + emac_gigabit_enable(); /* Start receive process */ adap_emac->RX0HDP = (u_int32_t)emac_rx_desc; @@ -411,7 +479,11 @@ static void davinci_eth_close(struct eth_device *dev) /* Reset EMAC module and disable interrupts in wrapper */
[U-Boot] [PATCH] TI: DaVinci DM365: Flag for updated EMAC driver.
From: Sandeep Paulraj The flag "CONFIG_DAVINCI_EMAC_VERSION2" is used by the DaVinci EMAC driver to differentiate between different versions of the IP. Signed-off-by: Sandeep Paulraj --- include/configs/davinci_dm365evm.h |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/include/configs/davinci_dm365evm.h b/include/configs/davinci_dm365evm.h index 2797f82..643d26c 100644 --- a/include/configs/davinci_dm365evm.h +++ b/include/configs/davinci_dm365evm.h @@ -57,6 +57,7 @@ /* Network Configuration */ #define CONFIG_DRIVER_TI_EMAC +#define CONFIG_DAVINCI_EMAC_VERSION2 #define CONFIG_MII #define CONFIG_BOOTP_DEFAULT #define CONFIG_BOOTP_DNS -- 1.6.0.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot