Re: [U-Boot] [PATCH] Davinci: add a pin multiplexer configuration API
Dear Kim Phillips, In message 20091029182304.469c9f7f.kim.phill...@freescale.com you wrote: + if (field PIN_MUX_NUM_FIELDS + (value ~PIN_MUX_FIELD_MASK) == 0) { the second line should not be indented as though it is the code subblock; it should fall directly underneath the column where 'field ..' starts, like this: Agreed. if (field PIN_MUX_NUM_FIELDS (value ~PIN_MUX_FIELD_MASK) == 0) { + int offset = field * PIN_MUX_FIELD_SIZE; + unsigned int mux = pins[i].mux; + unsigned int mask = PIN_MUX_FIELD_MASK offset; also please just declare everything at the top of the function - same for value and field declarations above. No! Why should that be needed? It would be just a waste of stack space (except that recent compilers don't care abouyt this anyway), and keeping variables as localized as possible seems to be a good thing to me. + value = offset; + writel(value | (readl(mux) (~mask)), mux); I guess arm doesn't have setbits32 and friends, huh. Not yet. Patches welcome! 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 Evil does seek to maintain power by suppressing the truth. Or by misleading the innocent. -- Spock and McCoy, And The Children Shall Lead, stardate 5029.5. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] makefiles: fixes/cleanup for building build tools
Dear Scott Wood, In message 20091029161835.ga28...@loki.buserror.net you wrote: We can't build everything with it, as we have a lot of code that is incompatible. There were already exceptions in the makefiles for these files. Fixing that code is beyond the scope of this change, especially for code like libfdt that has an external upstream. I'd be OK with removing -pedantic from everything, if Wolfgang agrees. I don't agree. Rather I'd like to see it added everywhere, or at least to all code that is compiled using HOSTCC. 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 Love sometimes expresses itself in sacrifice. -- Kirk, Metamorphosis, stardate 3220.3 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] ARM AT91 new board EB+CPUx9K2
Dear Jens Scharsig, In message 4ae99ba5.3090...@bus-elektronik.de you wrote: By the way, the AT91RM9200.h. has hundreds of style problems. This requires a complete revision of the AT91RM9200.h. I can try this, but will take a while and I can't test other RM9200 boards. I am aware of these issues. AT91 is indeed in a poor shape. Also, it's still lacking a custodian. Nobody volunteered for this job so far. Seems AT91 is not much used any more these days ? 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 Every program has at least one bug and can be shortened by at least one instruction - from which, by induction, one can deduce that every program can be reduced to one instruction which doesn't work. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/6] mkconfig: Create board directory (CONFIG_BOARDDIR) in include/config.h
Hi Wolfgang, On Tuesday 27 October 2009 16:42:03 Stefan Roese wrote: This patch extends the mkconfig script to automatically create a define for the board directory in include/config.h: #define CONFIG_BOARDDIR board/amcc/canyonlands This is needed for the upcoming PPC4xx linker script consolidation, where the PPC440 platforms need to include a board specific file in the common linker script. I would like to apply this patch series to the u-boot-ppc4xx/next branch soon. Is it ok for you, if I also apply this patch (1/6) which not ppc4xx related to this branch too? 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
Re: [U-Boot] [PATCH] ARM AT91 new board EB+CPUx9K2
Dear Wolfgang Denk Dear Jens Scharsig, In message 4ae99ba5.3090...@bus-elektronik.de you wrote: By the way, the AT91RM9200.h. has hundreds of style problems. This requires a complete revision of the AT91RM9200.h. I can try this, but will take a while and I can't test other RM9200 boards. I am aware of these issues. AT91 is indeed in a poor shape. Also, it's still lacking a custodian. Nobody volunteered for this job so far. Seems AT91 is not much used any more these days ? That is exactly the problem the AT91RM9200 is around 10 years old. It isn't 100% compatible with the newer AT91SAM derivatives. I think the RM9200 is only used in redesigns of old projects. We ourselves use AT91SAM9xxx for new projects. But we have several customer board that use the same hardware like our reference board EB+CPUx9K2. I think there is an second reason, why nobody volunteered for this. Some people want to benefit from the open-source projects, but nobody will help. Best regards Jens Scharsig ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 02/10] ARM Add New Board GEC2410
GEC2410 boot from NAND FLASH. Signed-off-by: Hui.Tang zetal...@gmail.com --- nand_spl/board/gec/gec2410/Makefile | 102 + nand_spl/board/gec/gec2410/config.mk | 40 + nand_spl/board/gec/gec2410/u-boot.lds | 60 +++ 3 files changed, 202 insertions(+), 0 deletions(-) create mode 100644 nand_spl/board/gec/gec2410/Makefile create mode 100644 nand_spl/board/gec/gec2410/config.mk create mode 100644 nand_spl/board/gec/gec2410/u-boot.lds diff --git a/nand_spl/board/gec/gec2410/Makefile b/nand_spl/board/gec/gec2410/Makefile new file mode 100644 index 000..1d4cb18 --- /dev/null +++ b/nand_spl/board/gec/gec2410/Makefile @@ -0,0 +1,102 @@ +# +# (C) Copyright 2006-2007 +# Stefan Roese, DENX Software Engineering, s...@denx.de. +# +# (C) Copyright 2008 +# Guennadi Liakhovetki, DENX Software Engineering, l...@denx.de +# +# See file CREDITS for list of people who contributed to this +# project. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of +# the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, +# MA 02111-1307 USA +# + +CONFIG_NAND_SPL= y + +include $(TOPDIR)/config.mk +include $(TOPDIR)/nand_spl/board/$(BOARDDIR)/config.mk + +LDSCRIPT= $(TOPDIR)/nand_spl/board/$(BOARDDIR)/u-boot.lds +LDFLAGS= -Bstatic -T $(nandobj)u-boot.lds -Ttext $(TEXT_BASE) $(PLATFORM_LDFLAGS) +AFLAGS += -DCONFIG_NAND_SPL +CFLAGS += -DCONFIG_NAND_SPL + +SOBJS = start.o lowlevel_init.o +COBJS = nand_boot.o s3c2410_nand.o + +SRCS := $(addprefix $(obj),$(SOBJS:.o=.S) $(COBJS:.o=.c)) +OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS)) +__OBJS := $(SOBJS) $(COBJS) +LNDIR := $(OBJTREE)/nand_spl/board/$(BOARDDIR) + +nandobj:= $(OBJTREE)/nand_spl/ + +ALL= $(nandobj)u-boot-spl $(nandobj)u-boot-spl.bin $(nandobj)u-boot-spl-16k.bin + +all: $(obj).depend $(ALL) + +$(nandobj)u-boot-spl-16k.bin: $(nandobj)u-boot-spl + $(OBJCOPY) ${OBJCFLAGS} --pad-to=$(PAD_TO) -O binary $ $@ + +$(nandobj)u-boot-spl.bin: $(nandobj)u-boot-spl + $(OBJCOPY) ${OBJCFLAGS} -O binary $ $@ + +$(nandobj)u-boot-spl: $(OBJS) $(nandobj)u-boot.lds + cd $(LNDIR) $(LD) $(LDFLAGS) $(__OBJS) \ + -Map $(nandobj)u-boot-spl.map \ + -o $(nandobj)u-boot-spl + +$(nandobj)u-boot.lds: $(LDSCRIPT) + $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -ansi -D__ASSEMBLY__ -P - $^ $@ + +# create symbolic links for common files + +# from cpu directory +$(obj)start.S: + @rm -f $@ + @ln -s $(TOPDIR)/cpu/arm920t/start.S $@ + +# from SoC directory + +# from board directory +$(obj)lowlevel_init.S: + @rm -f $@ + @ln -s $(TOPDIR)/board/gec/gec2410/lowlevel_init.S $@ + +# from nand_spl directory +$(obj)nand_boot.c: + @rm -f $@ + @ln -s $(TOPDIR)/nand_spl/nand_boot.c $@ + +# from drivers/mtd/nand directory +$(obj)s3c2410_nand.c: + @rm -f $@ + @ln -s $(TOPDIR)/drivers/mtd/nand/s3c2410_nand.c $@ + +# + +$(obj)%.o: $(obj)%.S + $(CC) $(AFLAGS) -c -o $@ $ + +$(obj)%.o: $(obj)%.c + $(CC) $(CFLAGS) -c -o $@ $ + +# defines $(obj).depend target +include $(SRCTREE)/rules.mk + +sinclude $(obj).depend + +# diff --git a/nand_spl/board/gec/gec2410/config.mk b/nand_spl/board/gec/gec2410/config.mk new file mode 100644 index 000..7db7fd1 --- /dev/null +++ b/nand_spl/board/gec/gec2410/config.mk @@ -0,0 +1,40 @@ +# +# (C) Copyright 2006 +# Stefan Roese, DENX Software Engineering, s...@denx.de. +# +# 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 +# +# +# GEC2410
[U-Boot] [PATCH 01/10] ARM Add New Board GEC2410
New Board GEC2410 Setup. Signed-off-by: Hui.Tang zetal...@gmail.com --- board/gec/gec2410/Makefile| 54 + board/gec/gec2410/README | 85 board/gec/gec2410/config.mk | 32 +++ board/gec/gec2410/flash.c | 417 + board/gec/gec2410/gec2410.c | 150 + board/gec/gec2410/lowlevel_init.S | 171 +++ board/gec/gec2410/u-boot-nand.lds | 61 ++ 7 files changed, 970 insertions(+), 0 deletions(-) create mode 100644 board/gec/gec2410/Makefile create mode 100644 board/gec/gec2410/README create mode 100644 board/gec/gec2410/config.mk create mode 100644 board/gec/gec2410/flash.c create mode 100644 board/gec/gec2410/gec2410.c create mode 100644 board/gec/gec2410/lowlevel_init.S create mode 100644 board/gec/gec2410/u-boot-nand.lds diff --git a/board/gec/gec2410/Makefile b/board/gec/gec2410/Makefile new file mode 100644 index 000..b0a216f --- /dev/null +++ b/board/gec/gec2410/Makefile @@ -0,0 +1,54 @@ +# +# (C) Copyright 2000-2006 +# Wolfgang Denk, DENX Software Engineering, w...@denx.de. +# +# (C) Copyright 2009 +# Hui Tang zetal...@gmail.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 $(TOPDIR)/config.mk + +LIB= $(obj)lib$(BOARD).a + +COBJS := gec2410.o flash.o +SOBJS := lowlevel_init.o + +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 + +# + +# defines $(obj).depend target +include $(SRCTREE)/rules.mk + +sinclude $(obj).depend + +# diff --git a/board/gec/gec2410/README b/board/gec/gec2410/README new file mode 100644 index 000..952aae8 --- /dev/null +++ b/board/gec/gec2410/README @@ -0,0 +1,85 @@ +U-Boot for GEC2410 + + +The supported features of the GEC2410 board are: +CPU (Samsung S3C2410 SoC) +SDRAM (64 MB , 2 pcs K4S561632, 32 bit) +NAND FLASH (64MB , 1 pcs K9F1208) +NOR FLASH (only on rev1.1 board, 2MB , 1 pcs SST39VF1601) +ETHERNET (10M , 1 pcs CS8900) + + + +Memory Map from CPU point of view: + +for NAND FLASH boot: +Start Size Access to +- +0x 64MB NAND FLASH (first 4K SRAM for stepptingstone) +0x19000300 CS8900 I/O base +0x3000 64MB SDRAM +0x4800 128MB Special Function Registers Area + + +for NOR FLASH boot: +Start Size Access to +- +0x 2MBNOR FLASH +0x19000300 CS8900 I/O base +0x3000 64MB SDRAM +0x4000 4KBBootSRAM +0x4800 128MB Special Function Registers Area + + + +Setting the board Jumpers Switches: + + In order to get the board running with the default configuration the + jumpers need to be set as follows: + + Core board Jumpers: + JP1 close (Set boot mode, close for booting from NAND FLASH, +otherwise from NOR FLASH) + + Main board Jumpers: + J1 close (Set beep, close for enabling beep, or disabling beep) + J18 1-2 (1-2 set RXD2 as UART; 2-3 set RXD2 as IrDA) + J9,J10 2-3 (1-2 set USB HOST 1 to Host mode; +2-3 set USB HOST 1 to Device mode) + J13 1-2 (1-2 set LCD working power to 5V; +2-3 set LCD working power to 3.3V) + + Core board Switches: + S1 open(Reset button) + + Main board Switches: + K1~K16 open(4x4 keyboard) + + + +LED Connector Interfaces: + + Core board LEDs: + D1,D2 I/O port + D3 PWREN pin LED + D4 Core board power + + Main board LEDs: + D1~D4
[U-Boot] [PATCH 03/10] ARM Add New Board GEC2410
Add GEC2410 default config. Signed-off-by: Hui.Tang zetal...@gmail.com --- include/configs/gec2410.h | 275 + 1 files changed, 275 insertions(+), 0 deletions(-) create mode 100644 include/configs/gec2410.h diff --git a/include/configs/gec2410.h b/include/configs/gec2410.h new file mode 100644 index 000..98c8040 --- /dev/null +++ b/include/configs/gec2410.h @@ -0,0 +1,275 @@ +/* + * (C) Copyright 2002 + * Sysgo Real-Time Solutions, GmbH www.elinos.com + * Marius Groeger mgroe...@sysgo.de + * Gary Jennejohn ga...@denx.de + * David Mueller d.muel...@elsoft.ch + * + * Configuation settings for the GD-Embedded Software Center GEC2410 board. + * + * 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 + */ + +#ifndef __CONFIG_H +#define __CONFIG_H + +/* + * High Level Configuration Options + * (easy to change) + */ +#define CONFIG_ARM920T 1 /* This is an ARM920T Core */ +#define CONFIG_S3C2410 1 /* in a SAMSUNG S3C2410 SoC */ +#define CONFIG_GEC2410 1 /* on a GD-Embedded Software Center GEC2410 Board */ + +#define CONFIG_SYS_SDRAM_BASE 0x3000 + +/* input clock of PLL */ +#define CONFIG_SYS_CLK_FREQ1200/* the GEC2410 has 12MHz input clock */ + +#if !defined(CONFIG_NAND_SPL) (TEXT_BASE = 0xc000) +#define CONFIG_ENABLE_MMU +#endif + +#define CONFIG_MEMORY_UPPER_CODE + +#define CONFIG_SETUP_MEMORY_TAGS +#define CONFIG_CMDLINE_TAG +#define CONFIG_INITRD_TAG + +#define USE_920T_MMU 1 +#undef CONFIG_USE_IRQ /* we don't need IRQ/FIQ stuff */ + +#undef CONFIG_SKIP_RELOCATE_UBOOT + +/* + * Size of malloc() pool + */ +#define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + 1024 * 1024) +#define CONFIG_SYS_GBL_DATA_SIZE 128 /* size in bytes reserved for initial data */ + +/* + * Hardware drivers + */ +#define CONFIG_NET_MULTI +#define CONFIG_CS8900 /* we have a CS8900 on-board */ +#define CONFIG_CS8900_BASE 0x19000300 +#define CONFIG_CS8900_BUS16/* the Linux driver does accesses as shorts */ + +/* + * select serial console configuration + */ +#define CONFIG_S3C24X0_SERIAL 1 +#define CONFIG_SERIAL1 1 /* we use SERIAL 1 on GEC2410 */ + +/ + * RTC + / +#defineCONFIG_RTC_S3C24X0 1 + +/* allow to overwrite serial and ethaddr */ +#define CONFIG_ENV_OVERWRITE + +#define CONFIG_BAUDRATE115200 + + +/* + * BOOTP options + */ +#define CONFIG_BOOTP_BOOTFILESIZE +#define CONFIG_BOOTP_BOOTPATH +#define CONFIG_BOOTP_GATEWAY +#define CONFIG_BOOTP_HOSTNAME + + +/* + * Command line configuration. + */ +#include config_cmd_default.h + +#define CONFIG_CMD_CACHE +#define CONFIG_CMD_SAVEENV +#define CONFIG_CMD_NAND +#if defined(CONFIG_BOOT_ONENAND) +#define CONFIG_CMD_ONENAND +#endif +#define CONFIG_CMD_PING +#define CONFIG_CMD_ELF +#define CONFIG_CMD_FAT + +#define CONFIG_BOOTDELAY 3 +/*#define CONFIG_BOOTARGS root=ramfs devfs=mount console=ttySA0,9600 */ +#define CONFIG_ETHADDR 08:00:3e:26:0a:5b +#define CONFIG_NETMASK 255.255.255.0 +#define CONFIG_IPADDR 192.168.1.10 +#define CONFIG_SERVERIP192.168.1.254 +/*#define CONFIG_BOOTFILE elinos-lart */ +/*#define CONFIG_BOOTCOMMAND tftp; bootm */ + +#if defined(CONFIG_CMD_KGDB) +#define CONFIG_KGDB_BAUDRATE 115200 /* speed to run kgdb serial port */ +/* what's this ? it's not used anywhere */ +#define CONFIG_KGDB_SER_INDEX 1 /* which serial port to use */ +#endif + +/* + * Miscellaneous configurable options + */ +#define CONFIG_SYS_LONGHELP/* undef to save memory */ +#define CONFIG_SYS_PROMPT GEC2410# /* Monitor Command Prompt */ +#define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size*/ +#define CONFIG_SYS_PBSIZE 384 /* Print Buffer Size */ +#define CONFIG_SYS_MAXARGS 16 /* max number of command args */ +#define CONFIG_SYS_BARGSIZECONFIG_SYS_CBSIZE /* Boot Argument
[U-Boot] [PATCH 04/10] ARM Add New Board GEC2410
Add gec2410_config option for GEC2410 Signed-off-by: Hui.Tang zetal...@gmail.com --- Makefile |7 +++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/Makefile b/Makefile index bcb3fe9..2de0b1d 100644 --- a/Makefile +++ b/Makefile @@ -2951,6 +2951,13 @@ davinci_dm365evm_config :unconfig davinci_dm6467evm_config : unconfig @$(MKCONFIG) $(@:_config=) arm arm926ejs dm6467evm davinci davinci +gec2410_config : unconfig + @mkdir -p $(obj)include $(obj)board/gec/gec2410 + @mkdir -p $(obj)nand_spl/board/gec/gec2410 + @echo RAM_TEXT = 0x33e0 $(obj)board/gec/gec2410/config.tmp + @$(MKCONFIG) $(@:_config=) arm arm920t gec2410 gec s3c24x0 + @echo CONFIG_NAND_U_BOOT = y $(obj)include/config.mk + imx27lite_config: unconfig @$(MKCONFIG) $(@:_config=) arm arm926ejs imx27lite logicpd mx27 -- 1.6.0.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 05/10] ARM Add New Board GEC2410
Add GEC2410 Clock Setting. Signed-off-by: Hui.Tang zetal...@gmail.com --- cpu/arm920t/s3c24x0/timer.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/cpu/arm920t/s3c24x0/timer.c b/cpu/arm920t/s3c24x0/timer.c index 20cedd4..d4787b9 100644 --- a/cpu/arm920t/s3c24x0/timer.c +++ b/cpu/arm920t/s3c24x0/timer.c @@ -188,6 +188,7 @@ ulong get_tbclk(void) tbclk = timer_load_val * 100; #elif defined(CONFIG_SBC2410X) || \ defined(CONFIG_SMDK2410) || \ + defined(CONFIG_GEC2410) || \ defined(CONFIG_VCMA9) tbclk = CONFIG_SYS_HZ; #else -- 1.6.0.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 06/10] ARM Add New Board GEC2410
GEC2410 Boot from NAND FLASH. Signed-off-by: Hui.Tang zetal...@gmail.com --- cpu/arm920t/start.S | 36 1 files changed, 36 insertions(+), 0 deletions(-) diff --git a/cpu/arm920t/start.S b/cpu/arm920t/start.S index 114427a..d8b832a 100644 --- a/cpu/arm920t/start.S +++ b/cpu/arm920t/start.S @@ -27,6 +27,10 @@ #include common.h #include config.h +#if !defined(CONFIG_ENABLE_MMU) !defined(CONFIG_SYS_PHY_UBOOT_BASE) +#define CONFIG_SYS_PHY_UBOOT_BASE CONFIG_SYS_UBOOT_BASE +#endif + /* * * @@ -38,6 +42,7 @@ .globl _start _start:b start_code +#ifndef CONFIG_NAND_SPL ldr pc, _undefined_instruction ldr pc, _software_interrupt ldr pc, _prefetch_abort @@ -53,7 +58,13 @@ _data_abort: .word data_abort _not_used: .word not_used _irq: .word irq _fiq: .word fiq +_pad: .word 0x12345678 /* now 16*4=64 */ +#else + . = _start + 64 +#endif +.global _end_vect +_end_vect: .balignl 16,0xdeadbeef @@ -73,6 +84,14 @@ _fiq:.word fiq _TEXT_BASE: .word TEXT_BASE +/* + * Below variable is very important because we use MMU in U-Boot. + * Without it, we cannot run code correctly before MMU is ON. + * by scsuh. + */ +_TEXT_PHY_BASE: + .word CONFIG_SYS_PHY_UBOOT_BASE + .globl _armboot_start _armboot_start: .word _start @@ -114,8 +133,10 @@ start_code: orr r0, r0, #0xd3 msr cpsr, r0 +#ifndef CONFIG_NAND_SPL bl coloured_LED_init bl red_LED_on +#endif #ifdefined(CONFIG_AT91RM9200DK) || defined(CONFIG_AT91RM9200EK) /* @@ -176,6 +197,7 @@ copyex: bl cpu_init_crit #endif +#ifndef CONFIG_NAND_SPL #ifndef CONFIG_SKIP_RELOCATE_UBOOT relocate: /* relocate U-Boot to RAM */ adr r0, _start /* r0 - current position of code */ @@ -194,9 +216,13 @@ copy_loop: cmp r0, r2 /* until source end addreee [r2]*/ ble copy_loop #endif /* CONFIG_SKIP_RELOCATE_UBOOT */ +#endif /* CONFIG_NAND_SPL */ /* Set up the stack */ stack_setup: +#ifdef CONFIG_MEMORY_UPPER_CODE + ldr sp, =(CONFIG_SYS_UBOOT_BASE + CONFIG_SYS_UBOOT_SIZE - 0xc) +#else ldr r0, _TEXT_BASE /* upper 128 KiB: relocated uboot */ sub r0, r0, #CONFIG_SYS_MALLOC_LEN /* malloc area */ sub r0, r0, #CONFIG_SYS_GBL_DATA_SIZE /* bdinfo */ @@ -204,6 +230,7 @@ stack_setup: sub r0, r0, #(CONFIG_STACKSIZE_IRQ+CONFIG_STACKSIZE_FIQ) #endif sub sp, r0, #12 /* leave 3 words for abort-stack*/ +#endif /* CONFIG_MEMORY_UPPER_CODE */ clear_bss: ldr r0, _bss_start /* find start of bss segment*/ @@ -215,9 +242,14 @@ clbss_l:strr2, [r0]/* clear loop...*/ cmp r0, r1 ble clbss_l +#ifndef CONFIG_NAND_SPL ldr pc, _start_armboot _start_armboot:.word start_armboot +#else + b nand_boot +/* .word nand_boot */ +#endif /* @@ -234,6 +266,7 @@ _start_armboot: .word start_armboot #ifndef CONFIG_SKIP_LOWLEVEL_INIT cpu_init_crit: +#ifndef CONFIG_NAND_SPL /* * flush v4 I/D caches */ @@ -251,6 +284,7 @@ cpu_init_crit: orr r0, r0, #0x1000 @ set bit 12 (I) I-Cache mcr p15, 0, r0, c1, c0, 0 +#endif /* CONFIG_NAND_SPL */ /* * before relocating, we have to setup RAM timing * because memory timing is board-dependend, you will @@ -264,6 +298,7 @@ cpu_init_crit: mov pc, lr #endif /* CONFIG_SKIP_LOWLEVEL_INIT */ +#ifndef CONFIG_NAND_SPL /* * * @@ -434,3 +469,4 @@ fiq: bl do_fiq #endif +#endif /* CONFIG_NAND_SPL */ -- 1.6.0.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 07/10] ARM Add New Board GEC2410
Fix CS8900 dev-priv not init issue. Signed-off-by: Hui.Tang zetal...@gmail.com --- drivers/net/cs8900.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/net/cs8900.c b/drivers/net/cs8900.c index 587f7f6..962b74c 100644 --- a/drivers/net/cs8900.c +++ b/drivers/net/cs8900.c @@ -320,12 +320,12 @@ int cs8900_initialize(u8 dev_num, int base_addr) } memset(priv, 0, sizeof(*priv)); priv-regs = (struct cs8900_regs *)base_addr; + dev-priv = priv; /* Load MAC address from EEPROM */ cs8900_get_enetaddr(dev); dev-iobase = base_addr; - dev-priv = priv; dev-init = cs8900_init; dev-halt = cs8900_halt; dev-send = cs8900_send; -- 1.6.0.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 08/10] ARM Add New Board GEC2410
Add missing function for CONFIG_NAND_SPL Signed-off-by: Hui.Tang zetal...@gmail.com --- drivers/mtd/nand/s3c2410_nand.c | 29 - 1 files changed, 24 insertions(+), 5 deletions(-) diff --git a/drivers/mtd/nand/s3c2410_nand.c b/drivers/mtd/nand/s3c2410_nand.c index f2f3e72..7fefe10 100644 --- a/drivers/mtd/nand/s3c2410_nand.c +++ b/drivers/mtd/nand/s3c2410_nand.c @@ -36,6 +36,17 @@ #define S3C2410_ADDR_NALE 4 #define S3C2410_ADDR_NCLE 8 +#ifdef CONFIG_NAND_SPL +static void nand_read_buf(struct mtd_info *mtd, u_char *buf, int len) +{ + int i; + struct nand_chip *this = mtd-priv; + + for (i = 0; i len; i++) + buf[i] = readb(this-IO_ADDR_R); +} +#endif + static void s3c2410_hwcontrol(struct mtd_info *mtd, int cmd, unsigned int ctrl) { struct nand_chip *chip = mtd-priv; @@ -83,9 +94,10 @@ void s3c2410_nand_enable_hwecc(struct mtd_info *mtd, int mode) static int s3c2410_nand_calculate_ecc(struct mtd_info *mtd, const u_char *dat, u_char *ecc_code) { - ecc_code[0] = NFECC0; - ecc_code[1] = NFECC1; - ecc_code[2] = NFECC2; + struct s3c2410_nand *nand = s3c2410_get_base_nand(); + ecc_code[0] = readb(nand-NFECC); + ecc_code[1] = readb(nand-NFECC + 1); + ecc_code[2] = readb(nand-NFECC + 2); debugX(1, s3c2410_nand_calculate_hwecc(%p,): 0x%02x 0x%02x 0x%02x\n, mtd , ecc_code[0], ecc_code[1], ecc_code[2]); @@ -100,7 +112,7 @@ static int s3c2410_nand_correct_data(struct mtd_info *mtd, u_char *dat, read_ecc[2] == calc_ecc[2]) return 0; - printf(s3c2410_nand_correct_data: not implemented\n); + debugX(1, s3c2410_nand_correct_data: not implemented\n); return -1; } #endif @@ -130,8 +142,13 @@ int board_nand_init(struct nand_chip *nand) /* initialize nand_chip data structure */ nand-IO_ADDR_R = nand-IO_ADDR_W = (void *)nand_reg-NFDATA; + nand-select_chip = NULL; + /* read_buf and write_buf are default */ /* read_byte and write_byte are default */ +#ifdef CONFIG_NAND_SPL + nand-read_buf = nand_read_buf; +#endif /* hwcontrol always must be implemented */ nand-cmd_ctrl = s3c2410_hwcontrol; @@ -142,7 +159,9 @@ int board_nand_init(struct nand_chip *nand) nand-ecc.hwctl = s3c2410_nand_enable_hwecc; nand-ecc.calculate = s3c2410_nand_calculate_ecc; nand-ecc.correct = s3c2410_nand_correct_data; - nand-ecc.mode = NAND_ECC_HW3_512; + nand-ecc.mode = NAND_ECC_HW; + nand-ecc.size = CONFIG_SYS_NAND_ECCSIZE; + nand-ecc.bytes = CONFIG_SYS_NAND_ECCBYTES; #else nand-ecc.mode = NAND_ECC_SOFT; #endif -- 1.6.0.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 09/10] ARM Add New Board GEC2410
Add GEC2410 Maintainers. Signed-off-by: Hui.Tang zetal...@gmail.com --- MAINTAINERS |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index d70a9d2..6ecba41 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -429,6 +429,10 @@ Timur Tabi ti...@freescale.com MPC8349E-mITX MPC8349 MPC8349E-mITX-GP MPC8349 +Hui Tang zetal...@gmail.com + + gec2410 ARM920T + Erik Theisen ethei...@mindspring.com W7OLMC PPC4xx -- 1.6.0.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 10/10] ARM Add New Board GEC2410
Add gec2410 in MAKEALL. Signed-off-by: Hui.Tang zetal...@gmail.com --- MAKEALL |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/MAKEALL b/MAKEALL index d63c5c2..fffa58a 100755 --- a/MAKEALL +++ b/MAKEALL @@ -548,6 +548,7 @@ LIST_ARM9= \ cp926ejs\ cp946es \ cp966 \ + gec2410 \ imx27lite \ lpd7a400\ mv88f6281gtw_ge \ -- 1.6.0.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] Environment, flash, config.
I have some questions about MTD flash partitioning in OMAP3EVM. From the OMAP3 manual: 0x-0x0008 : X-Loader-ONENAND 0x0008-0x0024 : U-Boot-ONENAND 0x0024-0x0028 : Boot Env-ONENAND 0x0028-0x0078 : Kernel-ONENAND 0x0078-0x0800 : File System-ONENAND Is it correct? When I print CONFIG_ENV_OFFSET I get 0x26. So where the environments are stored? In 26 or in 24? -- Software Developer General Satellite Corp. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] POST: Remove duplicated post_hotkey_pressed() functions
This patch introduces a weak default function for post_hotkey_pressed(), returning 0, for boards without hotkey support. The long-running tests won't be started on those boards. This default function was implemented in many board directories. By implementing this weak default we can remove all those duplicate versions. Boards with hotkey support, can override this weak default function by defining one in their board specific code. Signed-off-by: Stefan Roese s...@denx.de --- board/amcc/katmai/katmai.c| 11 --- board/amcc/kilauea/kilauea.c | 11 --- board/amcc/makalu/makalu.c| 11 --- board/amcc/ocotea/ocotea.c| 12 board/amcc/sequoia/sequoia.c | 11 --- board/amcc/taishan/taishan.c | 11 --- board/amcc/yucca/yucca.c | 11 --- board/cm5200/cm5200.c |8 board/esd/pmc440/pmc440.c | 11 --- board/gen860t/gen860t.c | 11 --- board/korat/korat.c | 11 --- board/kup/common/kup.c| 11 --- board/mpl/mip405/mip405.c | 11 --- board/netstal/hcu4/hcu4.c | 11 --- board/netstal/hcu5/hcu5.c | 11 --- board/netstal/mcu25/mcu25.c | 11 --- board/netta/netta.c | 11 --- board/prodrive/alpr/alpr.c| 12 board/sacsng/sacsng.c | 12 board/ssv/adnpesc1/adnpesc1.c | 11 --- board/uc100/uc100.c | 12 post/post.c | 16 22 files changed, 16 insertions(+), 232 deletions(-) diff --git a/board/amcc/katmai/katmai.c b/board/amcc/katmai/katmai.c index 908f1a5..7c2c976 100644 --- a/board/amcc/katmai/katmai.c +++ b/board/amcc/katmai/katmai.c @@ -441,17 +441,6 @@ void pcie_setup_hoses(int busno) } #endif /* defined(CONFIG_PCI) */ -#ifdef CONFIG_POST -/* - * Returns 1 if keys pressed to start the power-on long-running tests - * Called from board_init_f(). - */ -int post_hotkeys_pressed(void) -{ - return (ctrlc()); -} -#endif - int board_eth_init(bd_t *bis) { cpu_eth_init(bis); diff --git a/board/amcc/kilauea/kilauea.c b/board/amcc/kilauea/kilauea.c index 5cd822a..efcc75b 100644 --- a/board/amcc/kilauea/kilauea.c +++ b/board/amcc/kilauea/kilauea.c @@ -366,14 +366,3 @@ void pcie_setup_hoses(int busno) } } #endif - -#if defined(CONFIG_POST) -/* - * Returns 1 if keys pressed to start the power-on long-running tests - * Called from board_init_f(). - */ -int post_hotkeys_pressed(void) -{ - return 0; /* No hotkeys supported */ -} -#endif /* CONFIG_POST */ diff --git a/board/amcc/makalu/makalu.c b/board/amcc/makalu/makalu.c index d4277dd..b069a6c 100644 --- a/board/amcc/makalu/makalu.c +++ b/board/amcc/makalu/makalu.c @@ -322,14 +322,3 @@ void pcie_setup_hoses(int busno) } } #endif - -#if defined(CONFIG_POST) -/* - * Returns 1 if keys pressed to start the power-on long-running tests - * Called from board_init_f(). - */ -int post_hotkeys_pressed(void) -{ - return 0; /* No hotkeys supported */ -} -#endif /* CONFIG_POST */ diff --git a/board/amcc/ocotea/ocotea.c b/board/amcc/ocotea/ocotea.c index 0aa317e..9e26067 100644 --- a/board/amcc/ocotea/ocotea.c +++ b/board/amcc/ocotea/ocotea.c @@ -496,15 +496,3 @@ void fpga_init(void) return; } - -#ifdef CONFIG_POST -/* - * Returns 1 if keys pressed to start the power-on long-running tests - * Called from board_init_f(). - */ -int post_hotkeys_pressed(void) -{ - - return (ctrlc()); -} -#endif diff --git a/board/amcc/sequoia/sequoia.c b/board/amcc/sequoia/sequoia.c index 00f6408..4896fba 100644 --- a/board/amcc/sequoia/sequoia.c +++ b/board/amcc/sequoia/sequoia.c @@ -530,17 +530,6 @@ int is_pci_host(struct pci_controller *hose) } #endif /* defined(CONFIG_PCI) */ -#if defined(CONFIG_POST) -/* - * Returns 1 if keys pressed to start the power-on long-running tests - * Called from board_init_f(). - */ -int post_hotkeys_pressed(void) -{ - return 0; /* No hotkeys supported */ -} -#endif /* CONFIG_POST */ - #if defined(CONFIG_NAND_U_BOOT) || defined(CONFIG_SYS_RAMBOOT) /* * On NAND-booting sequoia, we need to patch the chips select numbers diff --git a/board/amcc/taishan/taishan.c b/board/amcc/taishan/taishan.c index 0c20faf..a14792b 100644 --- a/board/amcc/taishan/taishan.c +++ b/board/amcc/taishan/taishan.c @@ -302,17 +302,6 @@ int is_pci_host(struct pci_controller *hose) } #endif /* defined(CONFIG_PCI) */ -#ifdef CONFIG_POST -/* - * Returns 1 if keys pressed to start the power-on long-running tests - * Called from board_init_f(). - */ -int post_hotkeys_pressed(void) -{ - return (ctrlc()); -} -#endif - int board_eth_init(bd_t *bis) { cpu_eth_init(bis); diff --git a/board/amcc/yucca/yucca.c b/board/amcc/yucca/yucca.c index d8f4bcb..02cf62d 100644 --- a/board/amcc/yucca/yucca.c +++ b/board/amcc/yucca/yucca.c @@ -929,17 +929,6 @@
Re: [U-Boot] [PATCH 07/10] ARM Add New Board GEC2410
Hui.Tang, On Fri, Oct 30, 2009 at 3:39 AM, Hui.Tang zetal...@gmail.com wrote: Fix CS8900 dev-priv not init issue. Signed-off-by: Hui.Tang zetal...@gmail.com --- drivers/net/cs8900.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/net/cs8900.c b/drivers/net/cs8900.c index 587f7f6..962b74c 100644 --- a/drivers/net/cs8900.c +++ b/drivers/net/cs8900.c @@ -320,12 +320,12 @@ int cs8900_initialize(u8 dev_num, int base_addr) } memset(priv, 0, sizeof(*priv)); priv-regs = (struct cs8900_regs *)base_addr; + dev-priv = priv; /* Load MAC address from EEPROM */ cs8900_get_enetaddr(dev); dev-iobase = base_addr; - dev-priv = priv; dev-init = cs8900_init; dev-halt = cs8900_halt; dev-send = cs8900_send; Since you've decided to re-send this, please do so again. This time, do it this way: - - /* Load MAC address from EEPROM */ http://git.denx.de/?p=u-boot.git;a=blob;f=drivers/net/cs8900.c;h=587f7f62a760308fc3c39331d68f600056d42e35;hb=HEAD#l325- cs8900_get_enetaddr(dev); http://git.denx.de/?p=u-boot.git;a=blob;f=drivers/net/cs8900.c;h=587f7f62a760308fc3c39331d68f600056d42e35;hb=HEAD#l326 http://git.denx.de/?p=u-boot.git;a=blob;f=drivers/net/cs8900.c;h=587f7f62a760308fc3c39331d68f600056d42e35;hb=HEAD#l327 dev-iobase = base_addr; http://git.denx.de/?p=u-boot.git;a=blob;f=drivers/net/cs8900.c;h=587f7f62a760308fc3c39331d68f600056d42e35;hb=HEAD#l328 dev-priv = priv; http://git.denx.de/?p=u-boot.git;a=blob;f=drivers/net/cs8900.c;h=587f7f62a760308fc3c39331d68f600056d42e35;hb=HEAD#l329 dev-init = cs8900_init; http://git.denx.de/?p=u-boot.git;a=blob;f=drivers/net/cs8900.c;h=587f7f62a760308fc3c39331d68f600056d42e35;hb=HEAD#l330 dev-halt = cs8900_halt; http://git.denx.de/?p=u-boot.git;a=blob;f=drivers/net/cs8900.c;h=587f7f62a760308fc3c39331d68f600056d42e35;hb=HEAD#l331 dev-send = cs8900_send; http://git.denx.de/?p=u-boot.git;a=blob;f=drivers/net/cs8900.c;h=587f7f62a760308fc3c39331d68f600056d42e35;hb=HEAD#l332 dev-recv = cs8900_recv; + + /* Load MAC address from EEPROM */ http://git.denx.de/?p=u-boot.git;a=blob;f=drivers/net/cs8900.c;h=587f7f62a760308fc3c39331d68f600056d42e35;hb=HEAD#l325+ cs8900_get_enetaddr(dev); http://git.denx.de/?p=u-boot.git;a=blob;f=drivers/net/cs8900.c;h=587f7f62a760308fc3c39331d68f600056d42e35;hb=HEAD#l333 sprintf(dev-name, %s-%hu, CS8900_DRIVERNAME, dev_num); -- 1.6.0.4 Since this fixes a bug, it may get in the current release. The other parts of you submission will have to wait. regards, Ben ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 03/10] ARM Add New Board GEC2410
Hui.Tang, On Fri, Oct 30, 2009 at 3:39 AM, Hui.Tang zetal...@gmail.com wrote: Add GEC2410 default config. Signed-off-by: Hui.Tang zetal...@gmail.com --- include/configs/gec2410.h | 275 + snip + +#define CONFIG_BOOTDELAY 3 +/*#define CONFIG_BOOTARGS root=ramfs devfs=mount console=ttySA0,9600 */ +#define CONFIG_ETHADDR 08:00:3e:26:0a:5b +#define CONFIG_NETMASK 255.255.255.0 +#define CONFIG_IPADDR 192.168.1.10 +#define CONFIG_SERVERIP192.168.1.254 Please remove all default network parameters. snip regards, Ben 1.6.0.4 ___ 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] FPGA relocation/C environment
Hi, thank you all for all the comments so far. It seems I have at least 2 problems: - my gcc (m68k-elf-gcc (Sourcery G++ Lite 4.3-208) 4.3.3) does not produce correctly relocatable code; no matter if I give -fPIC or not (-mrelocatable is not accepted at all), I do not get any entries in .got2 or .fixup, only .got However, there still may be anything wrong in my conclusion, because I can use this compiler to compile uClinux-dist-20071107 and get working applications (which, as far as I understand, have to be relocated at runtime, too, but I do not know if any of these use such features as statically initialized function pointers that I have in the U-Boot fpga code...). - the current coldfire startup code (at least for MCF532x/MCF537x) would not handle these sections even if they existed - however, this seems to be rather easily (i.e. maybe even I could do it) fixed, looking at the ppc examples. I will first live with the problem (relocating the fpga struct pointers in my own board code, where it is filled anyways - for coldfire, gd-reloc_off is still present) and see if I can get hold of a better gcc version. I tried gcc-4.4.1, but was unable to compile one of U-Boot or uClinux, so switched back to this one which I found to compile (old and current) U-Boot, old uClinux _and_ support mcf5445x, which I am designing in now... Thank you and sorry for my stupid questions. Regards, Wolfgang ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/2] Add minimal SJA1000 header for basic CAN mode
Wolfgang, can you please apply this patch. It currently prevents Stefan to proceed with my other 4xx patches. Alternatively this could be done by Stefan through the 4xx repo. Regards, Matthias On Monday 26 October 2009 09:55, Matthias Fuchs wrote: This patch is in preparation for the upcoming PLU405 board fix. Signed-off-by: Matthias Fuchs matthias.fu...@esd.eu --- include/sja1000.h | 60 + 1 files changed, 60 insertions(+), 0 deletions(-) create mode 100644 include/sja1000.h diff --git a/include/sja1000.h b/include/sja1000.h new file mode 100644 index 000..59e35af --- /dev/null +++ b/include/sja1000.h @@ -0,0 +1,60 @@ +/* + * Copyright 2009, Matthias Fuchs matthias.fu...@esd.eu + * + * SJA1000 register layout for basic CAN mode + * + * 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 + */ + +#ifndef _SJA1000_H_ +#define _SJA1000_H_ + +/* + * SJA1000 register layout in basic can mode + */ +struct sja1000_basic_s { + u8 cr; + u8 cmr; + u8 sr; + u8 ir; + u8 ac; + u8 am; + u8 btr0; + u8 btr1; + u8 oc; + u8 txb[10]; + u8 rxb[10]; + u8 unused; + u8 cdr; +}; + +/* control register */ +#define CR_RR0x01 + +/* output control register */ +#define OC_MODE0 0x01 +#define OC_MODE1 0x02 +#define OC_POL0 0x04 +#define OC_TN0 0x08 +#define OC_TP0 0x10 +#define OC_POL1 0x20 +#define OC_TN1 0x40 +#define OC_TP1 0x80 + +#endif ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] Please pull u-boot-i2c.git next
Hello Wolfgang, The following changes since commit f2b4bc04d6aed6be712d236dab48ac4c4da22cbf: Wolfgang Denk (1): Merge branch 'master' of git://git.denx.de/u-boot-cfi-flash are available in the git repository at: git://git.denx.de/u-boot-i2c.git next Mike Frysinger (2): Blackfin: TWI/I2C: add timeout to transfer Blackfin: TWI/I2C: implement bus speed get/set functions Valentin Yakovenkov (1): new PCA9564 i2c bridge driver drivers/i2c/Makefile |1 + drivers/i2c/bfin-twi_i2c.c | 74 ++--- drivers/i2c/pca9564_i2c.c | 189 include/pca9564.h | 50 4 files changed, 300 insertions(+), 14 deletions(-) create mode 100644 drivers/i2c/pca9564_i2c.c create mode 100644 include/pca9564.h Thanks bye Heiko -- DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 0/6] ppc4xx: Linker script consolidation
Tested on two esd boards. Works fine! Matthias On Tuesday 27 October 2009 16:41, Stefan Roese wrote: This patchset will consolidate the linker scripts for PPC4xx. My plan is to push this in the next merge window. I've pushed this patchset in the 4xx-linker-script branch of the ppc4xx repository: http://git.denx.de/?p=u-boot/u-boot-ppc4xx.git;a=shortlog;h=refs/heads/4xx-linker-script Please go ahead and test it on your ppc4xx platforms. And please also note, that I will most likely rebase this branch from time to time. Thanks. Stefan Roese (6): mkconfig: Create board directory (CONFIG_BOARDDIR) in include/config.h ppc4xx: sc3: Remove unreferenced external declarations from sc3.h ppc4xx: Fix problems in some ppc4xx board Makefiles ppc4xx: Add custom linker script to board/*/config.mk ppc4xx: Add common ppc4xx linker script ppc4xx: Remove board specific linker scripts from most PPC4xx boards board/amcc/acadia/u-boot.lds | 134 - board/amcc/bamboo/u-boot.lds | 143 -- board/amcc/bubinga/u-boot.lds | 134 - board/amcc/canyonlands/u-boot.lds | 141 -- board/amcc/ebony/u-boot.lds | 141 -- board/amcc/katmai/u-boot.lds | 138 - board/amcc/kilauea/u-boot.lds | 134 - board/amcc/luan/u-boot.lds| 141 -- board/amcc/makalu/u-boot.lds | 134 - board/amcc/ocotea/u-boot.lds | 141 -- board/amcc/redwood/u-boot.lds | 145 --- board/amcc/sequoia/u-boot.lds | 142 -- board/amcc/taihu/u-boot.lds | 134 - board/amcc/taishan/u-boot.lds | 141 -- board/amcc/walnut/u-boot.lds | 135 - board/amcc/yosemite/u-boot.lds| 141 -- board/amcc/yucca/u-boot.lds | 141 -- board/amirix/ap1000/config.mk |3 + board/cray/L1/u-boot.lds | 150 --- board/csb272/u-boot.lds | 151 board/csb472/u-boot.lds | 151 board/dave/PPChameleonEVB/u-boot.lds | 153 board/eric/Makefile |2 +- board/eric/u-boot.lds | 150 --- board/esd/adciop/u-boot.lds | 132 board/esd/apc405/u-boot.lds | 132 board/esd/ar405/u-boot.lds| 132 board/esd/ash405/u-boot.lds | 131 board/esd/canbt/u-boot.lds| 132 board/esd/cms700/u-boot.lds | 132 board/esd/cpci2dp/u-boot.lds | 132 board/esd/cpci405/u-boot.lds | 132 board/esd/cpciiser4/u-boot.lds| 132 board/esd/dasa_sim/config.mk |3 + board/esd/dp405/u-boot.lds| 132 board/esd/du405/u-boot.lds| 132 board/esd/du440/u-boot.lds| 139 - board/esd/hh405/u-boot.lds| 132 board/esd/hub405/u-boot.lds | 131 board/esd/ocrtc/u-boot.lds| 147 --- board/esd/pci405/u-boot.lds | 132 board/esd/plu405/u-boot.lds | 131 board/esd/pmc405/u-boot.lds | 131 board/esd/pmc405de/u-boot.lds | 132 board/esd/pmc440/u-boot.lds | 139 - board/esd/voh405/u-boot.lds | 132 board/esd/vom405/u-boot.lds | 132 board/esd/wuh405/u-boot.lds | 131 board/exbitgen/u-boot.lds | 149 --- board/g2000/u-boot.lds| 132 board/gdsys/dlvision/u-boot.lds | 131 board/gdsys/gdppc440etx/u-boot.lds| 141 -- board/gdsys/intip/u-boot.lds | 143 --
[U-Boot] [u-boot] [PATCH][1/2] mx27: Add necessary defines and helper functions to support I2C in i.MX27.
Add proper register definitions, macros and clock functions required for I2C driver to be developed. Signed-off-by: Javier Martin javier.mar...@vista-silicon.com -- diff --git a/cpu/arm926ejs/mx27/generic.c b/cpu/arm926ejs/mx27/generic.c index 808371f..540ef0c 100644 --- a/cpu/arm926ejs/mx27/generic.c +++ b/cpu/arm926ejs/mx27/generic.c @@ -22,11 +22,21 @@ #include div64.h #include netdev.h #include asm/io.h +#include asm/arch/asm-offsets.h #include asm/arch/imx-regs.h #ifdef CONFIG_MXC_MMC #include asm/arch/mxcmmc.h #endif +int imx_get_revision(void) +{ + ulong val; + + val = readl(SYSCTRL_CID); + + return (int)(val 28); +} + /* * get the system pll clock in Hz * @@ -152,6 +162,19 @@ ulong imx_get_perclk4(void) return imx_decode_perclk(((readl(pll-pcdr1) 24) 0x3f) + 1); } +ulong imx_get_ipgclk(void) +{ + ulong rate, ipg_pdf; + + if (imx_get_revision() = CHIP_REV_2_0) + return imx_get_ahbclk(); + else + ipg_pdf = (readl(CSCR) 8) 1; + + rate = imx_get_ahbclk(); + return rate / (ipg_pdf + 1); +} + #if defined(CONFIG_DISPLAY_CPUINFO) int print_cpuinfo (void) { diff --git a/include/asm-arm/arch-mx27/asm-offsets.h b/include/asm-arm/arch-mx27/asm-offsets.h index 497afe5..cdecef6 100644 --- a/include/asm-arm/arch-mx27/asm-offsets.h +++ b/include/asm-arm/arch-mx27/asm-offsets.h @@ -14,3 +14,5 @@ #define ESDCTL1_ROF0x08 #define ESDCFG1_ROF0x0C #define ESDMISC_ROF0x10 +#define SYSCTRL_CID0x10027800 +#define CHIP_REV_2_0 0x01 diff --git a/include/asm-arm/arch-mx27/imx-regs.h b/include/asm-arm/arch-mx27/imx-regs.h index d36a6da..2b89b4e 100644 --- a/include/asm-arm/arch-mx27/imx-regs.h +++ b/include/asm-arm/arch-mx27/imx-regs.h @@ -206,6 +206,10 @@ struct iim_regs { }; #endif +#define __REG(x) (*((volatile u32 *)(x))) +#define __REG16(x) (*((volatile u16 *)(x))) +#define __REG8(x)(*((volatile u8 *)(x))) + #define IMX_IO_BASE0x1000 #define IMX_AIPI1_BASE (0x0 + IMX_IO_BASE) -- Javier Martin Vista Silicon S.L. CDTUC - FASE C - Oficina S-345 Avda de los Castros s/n 39005- Santander. Cantabria. Spain +34 942 25 32 60 www.vista-silicon.com ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [u-boot][PATCH][2/2] i2c_mxc: Add I2C support for i.MX27 chip processor.
Add support for I2C in i.MX27 chip. Tested on imx27_visstrim_m10 board. Signed-off-by: Javier Martin javier.mar...@vista-silicon.com -- diff --git a/drivers/i2c/mxc_i2c.c b/drivers/i2c/mxc_i2c.c index 8e10fbb..63a8085 100644 --- a/drivers/i2c/mxc_i2c.c +++ b/drivers/i2c/mxc_i2c.c @@ -2,6 +2,8 @@ * i2c driver for Freescale mx31 * * (c) 2007 Pengutronix, Sascha Hauer s.ha...@pengutronix.de + * (c) 2009 Vista Silicon, Javier Martin + * javier.mar...@vista-silicon.com * * See file CREDITS for list of people who contributed to this * project. @@ -21,13 +23,19 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * MA 02111-1307 USA */ - #include common.h #if defined(CONFIG_HARD_I2C) +#ifdef CONFIG_MX31 #include asm/arch/mx31.h #include asm/arch/mx31-regs.h +#elif defined (CONFIG_MX27) +#include asm/arch/imx-regs.h +#include asm/arch/asm-offsets.h +#else +#error architecture not supported by mxc_i2c driver +#endif #define IADR 0x00 #define IFDR 0x04 @@ -47,6 +55,7 @@ #define I2SR_IIF (1 1) #define I2SR_RX_NO_AK (1 0) +#ifdef CONFIG_MX31 #ifdef CONFIG_SYS_I2C_MX31_PORT1 #define I2C_BASE 0x43f8 #define I2C_CLK_OFFSET 26 @@ -59,6 +68,18 @@ #else #error define CONFIG_SYS_I2C_MX31_PORTx to use the mx31 I2C driver #endif +#endif /* CONFIG_MX31 */ + +#ifdef CONFIG_MX27 +#ifdef CONFIG_SYS_I2C_MX27_PORT1 +#define I2C_BASE IMX_I2C1_BASE +#elif defined (CONFIG_SYS_I2C_MX27_PORT2) +#define I2C_BASE IMX_I2C2_BASE +#else +#error define CONFIG_SYS_I2C_MX27_PORTx to use the mx27 I2C driver +#endif +#endif /* CONFIG_MX27 */ + #ifdef DEBUG #define DPRINTF(args...) printf(args) @@ -70,17 +91,37 @@ static u16 div[] = { 30, 32, 36, 42, 48, 52, 60, 72, 80, 88, 104, 128, 144, 160, 192, 240, 288, 320, 384, 480, 576, 640, 768, 960, 1152, 1280, 1536, 1920, 2304, 2560, 3072, 3840}; +static void i2c_clken(void) +{ +#ifdef CONFIG_MX31 + __REG(CCM_CGR0) = __REG(CCM_CGR0) | (3 I2C_CLK_OFFSET); +#elif defined(CONFIG_MX27) +#ifdef CONFIG_SYS_I2C_MX27_PORT1 + __REG(PCCR0) = __REG(PCCR0) | PCCR0_I2C1_EN; +#else + __REG(PCCR0) = __REG(PCCR0) | PCCR0_I2C2_EN; +#endif +#endif /* CONFIG_MX31 */ +} + void i2c_init(int speed, int unused) { - int freq = mx31_get_ipg_clk(); + int freq; int i; +#ifdef CONFIG_MX31 + freq = mx31_get_ipg_clk(); +#elif defined(CONFIG_MX27) + freq = imx_get_ipgclk(); +#endif /* start the required I2C clock */ - __REG(CCM_CGR0) = __REG(CCM_CGR0) | (3 I2C_CLK_OFFSET); + i2c_clken(); + DPRINTF(ipg_freq is %d\n, freq); for (i = 0; i 0x1f; i++) if (freq / div[i] = speed) break; + DPRINTF(i2c_clk divisor is %d\n, div[i]); DPRINTF(%s: speed: %d\n,__FUNCTION__, speed); @@ -121,7 +162,6 @@ static int rx_byte(void) int i2c_probe(uchar chip) { int ret; - __REG16(I2C_BASE + I2CR) = 0; /* Reset module */ __REG16(I2C_BASE + I2CR) = I2CR_IEN; -- Javier Martin Vista Silicon S.L. CDTUC - FASE C - Oficina S-345 Avda de los Castros s/n 39005- Santander. Cantabria. Spain +34 942 25 32 60 www.vista-silicon.com ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [RFC PATCH] Implementation of non-blocking flash write/erase/status check functions.
write_buff_nb() introduces quite an amount of duplicate code compared to write_buff(), but I did not find an elegant solution to partition them. Signed-off-by: Wolfgang Wegner w.weg...@astro-kom.de --- drivers/mtd/cfi_flash.c | 440 ++- include/flash.h |3 + 2 files changed, 365 insertions(+), 78 deletions(-) diff --git a/drivers/mtd/cfi_flash.c b/drivers/mtd/cfi_flash.c index 4e8f5bf..0f813b0 100644 --- a/drivers/mtd/cfi_flash.c +++ b/drivers/mtd/cfi_flash.c @@ -681,17 +681,13 @@ static int flash_status_check (flash_info_t * info, flash_sect_t sector, } /*--- - * Wait for XSR.7 to be set, if it times out print an error, otherwise - * do a full status check. + * check retcode of flash_full_status_check[_nb] * * This routine sets the flash to read-array mode. */ -static int flash_full_status_check (flash_info_t * info, flash_sect_t sector, - ulong tout, char *prompt) +static int flash_full_status_retcode_check (flash_info_t * info, flash_sect_t sector, + char *prompt, int retcode) { - int retcode; - - retcode = flash_status_check (info, sector, tout, prompt); switch (info-vendor) { case CFI_CMDSET_INTEL_PROG_REGIONS: case CFI_CMDSET_INTEL_EXTENDED: @@ -728,6 +724,21 @@ static int flash_full_status_check (flash_info_t * info, flash_sect_t sector, } /*--- + * Wait for XSR.7 to be set, if it times out print an error, otherwise + * do a full status check. + * + * This routine sets the flash to read-array mode. + */ +static int flash_full_status_check (flash_info_t * info, flash_sect_t sector, + ulong tout, char *prompt) +{ + int retcode; + + retcode = flash_status_check (info, sector, tout, prompt); + return flash_full_status_retcode_check (info, sector, prompt, retcode); +} + +/*--- */ static void flash_add_byte (flash_info_t * info, cfiword_t * cword, uchar c) { @@ -796,12 +807,11 @@ static flash_sect_t find_sector (flash_info_t * info, ulong addr) /*--- */ -static int flash_write_cfiword (flash_info_t * info, ulong dest, - cfiword_t cword) +static int flash_write_cfiword_stub (flash_info_t * info, ulong dest, +cfiword_t cword, flash_sect_t *sect) { void *dstaddr = (void *)dest; int flag; - flash_sect_t sect = 0; char sect_found = 0; /* Check if Flash is (sufficiently) erased */ @@ -837,14 +847,14 @@ static int flash_write_cfiword (flash_info_t * info, ulong dest, break; case CFI_CMDSET_AMD_EXTENDED: case CFI_CMDSET_AMD_STANDARD: - sect = find_sector(info, dest); - flash_unlock_seq (info, sect); - flash_write_cmd (info, sect, info-addr_unlock1, AMD_CMD_WRITE); + *sect = find_sector(info, dest); + flash_unlock_seq (info, *sect); + flash_write_cmd (info, *sect, info-addr_unlock1, AMD_CMD_WRITE); sect_found = 1; break; #ifdef CONFIG_FLASH_CFI_LEGACY case CFI_CMDSET_AMD_LEGACY: - sect = find_sector(info, dest); + *sect = find_sector(info, dest); flash_unlock_seq (info, 0); flash_write_cmd (info, 0, info-addr_unlock1, AMD_CMD_WRITE); sect_found = 1; @@ -872,19 +882,31 @@ static int flash_write_cfiword (flash_info_t * info, ulong dest, enable_interrupts (); if (!sect_found) - sect = find_sector (info, dest); + *sect = find_sector (info, dest); + + return 0; +} + +static int flash_write_cfiword (flash_info_t * info, ulong dest, + cfiword_t cword) +{ + int retcode; + flash_sect_t sect = 0; + + retcode = flash_write_cfiword_stub (info, dest, cword, sect); + if (retcode) + return retcode; return flash_full_status_check (info, sect, info-write_tout, write); } #ifdef CONFIG_SYS_FLASH_USE_BUFFER_WRITE -static int flash_write_cfibuffer (flash_info_t * info, ulong dest, uchar * cp, - int len) +static int flash_write_cfibuffer_stub (flash_info_t * info, ulong dest, uchar * cp, + int len, flash_sect_t *sector) { - flash_sect_t sector; int cnt; - int retcode; + int retcode = 0; void *src = cp; void *dst = (void *)dest; void *dst2 = dst; @@ -943,7 +965,7 @@ static int flash_write_cfibuffer (flash_info_t * info,
Re: [U-Boot] [PATCH] Davinci: add a pin multiplexer configuration API
On Fri, 30 Oct 2009 09:26:12 +0100 Wolfgang Denk w...@denx.de wrote: Dear Kim Phillips, In message 20091029182304.469c9f7f.kim.phill...@freescale.com you wrote: if (field PIN_MUX_NUM_FIELDS (value ~PIN_MUX_FIELD_MASK) == 0) { + int offset = field * PIN_MUX_FIELD_SIZE; + unsigned int mux = pins[i].mux; + unsigned int mask = PIN_MUX_FIELD_MASK offset; also please just declare everything at the top of the function - same for value and field declarations above. No! Why should that be needed? It would be just a waste of stack space (except that recent compilers don't care abouyt this anyway), and keeping variables as localized as possible seems to be a good thing to me. not when it sacrifices readability. I'm looking for assignments and finding 'unsigned'! Either put a blank line between the declarations and the rest of the code, or declare everything at the top of the function, since it does nothing for the compiler (my preference is the latter in this case). Kim ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [RFC PATCH] Implementation of non-blocking flash write/erase/status check functions.
Hi list, sorry, there should have been more description on top, but somehow I messed up the commit log message and did not realize it until now. :-( Implementation of non-blocking flash write/erase/status check functions. Enable with CONFIG_SYS_FLASH_CFI_NONBLOCK These can be useful to erase flash/write data during a serial data transfer for software updates. In reference to the comments of Wolfgang Denk: The update protocol is surely not perfect (although I probably have other things in mind I do not like about it than you), but the update is normally done from the application. When this update fails due to power loss or whatever reason, the bootloader shall be able to update the software on its own. The advantage of this rather crude approach is that it needs less flash space and there is no check necessary to see which image in flash is the most current one. Regards, Wolfgang ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] Davinci: add a pin multiplexer configuration API
From: Kim Phillips [mailto:kim.phill...@freescale.com] Sent: 30 October 2009 14:57 On Fri, 30 Oct 2009 09:26:12 +0100 Wolfgang Denk w...@denx.de wrote: Dear Kim Phillips, In message 20091029182304.469c9f7f.kim.phill...@freescale.com you wrote: if (field PIN_MUX_NUM_FIELDS (value ~PIN_MUX_FIELD_MASK) == 0) { + int offset = field * PIN_MUX_FIELD_SIZE; + unsigned int mux = pins[i].mux; + unsigned int mask = PIN_MUX_FIELD_MASK offset; also please just declare everything at the top of the function - same for value and field declarations above. No! Why should that be needed? It would be just a waste of stack space (except that recent compilers don't care abouyt this anyway), and keeping variables as localized as possible seems to be a good thing to me. not when it sacrifices readability. I'm looking for assignments and finding 'unsigned'! Either put a blank line between the declarations and the rest of the code, or declare everything at the top of the function, since it does nothing for the compiler (my preference is the latter in this case). Kim All three of these declarations could be const, which may or may not help the compiler, but would be technically correct and document my intentions better. This would not be possible if they where moved to the start of the function or if the declaration and assignments where split up in any other way. Nick. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [RFC PATCH] add ability to handle compressed images to imxtract
imxtract currently can not handle compressed images. This patch adds handling for bzip2 and zip compression. In both cases, a destination address has to be specified for extraction. Signed-off-by: Wolfgang Wegner w.weg...@astro-kom.de --- common/cmd_ximg.c | 82 +--- 1 files changed, 77 insertions(+), 5 deletions(-) diff --git a/common/cmd_ximg.c b/common/cmd_ximg.c index 5593b2d..e6eb336 100644 --- a/common/cmd_ximg.c +++ b/common/cmd_ximg.c @@ -31,8 +31,20 @@ #include common.h #include command.h #include image.h +#include watchdog.h +#include u-boot/zlib.h +#if defined(CONFIG_BZIP2) +#include bzlib.h +#endif #include asm/byteorder.h +/* there is no prototype in zlib.h */ +int gunzip (void *, int, unsigned char *, unsigned long *); + +#ifndef CFG_XIMG_LEN +#define CFG_XIMG_LEN 0x80/* use 8MByte as default max gunzip size */ +#endif + int do_imgextract(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) { @@ -50,6 +62,8 @@ do_imgextract(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) const void *fit_data; size_t fit_len; #endif + uintunc_len = CFG_XIMG_LEN; + uint8_t comp; verify = getenv_yesno (verify); @@ -92,8 +106,9 @@ do_imgextract(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) return 1; } - if (image_get_comp (hdr) != IH_COMP_NONE) { - printf(Wrong Compression Type for %s command\n, + comp = image_get_comp (hdr); + if ((comp != IH_COMP_NONE) (argc 4)) { + printf(Must specify load address for %s command with compressed image\n, cmdtp-name); return 1; } @@ -138,8 +153,8 @@ do_imgextract(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) return 1; } - if (fit_image_check_comp (fit_hdr, noffset, IH_COMP_NONE)) { - printf(Wrong Compression Type for %s command\n, + if ((fit_image_check_comp (fit_hdr, noffset, IH_COMP_NONE)) (argc 4)) { + printf(Must specify load address for %s command with compressed image\n, cmdtp-name); return 1; } @@ -158,6 +173,11 @@ do_imgextract(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) return 1; } + if (fit_image_get_comp (fit_hdr, noffset, comp)) { + puts (Could not find script subimage compression type\n); + return 1; + } + data = (ulong)fit_data; len = (ulong)fit_len; break; @@ -168,7 +188,59 @@ do_imgextract(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) } if (argc 3) { - memcpy((char *) dest, (char *) data, len); + switch (comp) { + case IH_COMP_NONE: +#if defined(CONFIG_HW_WATCHDOG) || defined(CONFIG_WATCHDOG) + { + size_t l = len; + void *to = (void *) dest; + void *from = (void *)data; + + printf ( Loading part %d ... , part); + + while (l 0) { + size_t tail = (l CHUNKSZ) ? CHUNKSZ : l; + WATCHDOG_RESET(); + memmove (to, from, tail); + to += tail; + from += tail; + l -= tail; + } + } +#else /* !(CONFIG_HW_WATCHDOG || CONFIG_WATCHDOG) */ + memmove ((char *) dest, (char *)data, len); +#endif /* CONFIG_HW_WATCHDOG || CONFIG_WATCHDOG */ + break; + case IH_COMP_GZIP: + printf ( Uncompressing part %d (len %d) ... , part, len); + if (gunzip ((void *) dest, unc_len, + (uchar *) data, len) != 0) { + puts (GUNZIP ERROR - image not loaded\n); + return 1; + } + break; +#if defined(CONFIG_BZIP2) + case IH_COMP_BZIP2: + printf ( Uncompressing part %d ... , part); + /* +* If we've got less than 4 MB of malloc() space, +* use slower decompression algorithm which requires +* at most 2300 KB of memory. +*/ + i =
Re: [U-Boot] [PATCH] makefiles: fixes/cleanup for building build tools
On Fri, Oct 30, 2009 at 09:28:04AM +0100, Wolfgang Denk wrote: Dear Scott Wood, In message 20091029161835.ga28...@loki.buserror.net you wrote: We can't build everything with it, as we have a lot of code that is incompatible. There were already exceptions in the makefiles for these files. Fixing that code is beyond the scope of this change, especially for code like libfdt that has an external upstream. I'd be OK with removing -pedantic from everything, if Wolfgang agrees. I don't agree. Rather I'd like to see it added everywhere, or at least to all code that is compiled using HOSTCC. Well, then someone has to fix the code that doesn't build with -pedantic -- including upstream code from libfdt. That's beyond the scope of a makefile restructuring, though this patch does make it a little simpler to move files from one set to another as they get fixed. -Scott ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] add block write function to spartan3 slave serial load
Using seperate function calls for each bit-bang of slave serial load can be painfully slow. This patch adds the possibility to supply a block write function that loads the complete block of data in one call (like it can already be done with Altera FPGAs). On an MCF5373L (240 MHz) loading an XC3S4000 this reduces the load time from around 15 seconds to around 3 seconds Signed-off-by: Wolfgang Wegner w.weg...@astro-kom.de --- drivers/fpga/spartan3.c | 54 +- include/spartan3.h |1 + include/xilinx.h|1 + 3 files changed, 31 insertions(+), 25 deletions(-) diff --git a/drivers/fpga/spartan3.c b/drivers/fpga/spartan3.c index 0fe3041..7a89b56 100644 --- a/drivers/fpga/spartan3.c +++ b/drivers/fpga/spartan3.c @@ -385,34 +385,38 @@ static int Spartan3_ss_load (Xilinx_desc * desc, void *buf, size_t bsize) } while ((*fn-init) (cookie)); /* Load the data */ - while (bytecount bsize) { - - /* Xilinx detects an error if INIT goes low (active) - while DONE is low (inactive) */ - if ((*fn-done) (cookie) == 0 (*fn-init) (cookie)) { - puts (** CRC error during FPGA load.\n); - return (FPGA_FAIL); - } - val = data [bytecount ++]; - i = 8; - do { - /* Deassert the clock */ - (*fn-clk) (FALSE, TRUE, cookie); - CONFIG_FPGA_DELAY (); - /* Write data */ - (*fn-wr) ((val 0x80), TRUE, cookie); - CONFIG_FPGA_DELAY (); - /* Assert the clock */ - (*fn-clk) (TRUE, TRUE, cookie); - CONFIG_FPGA_DELAY (); - val = 1; - i --; - } while (i 0); + if(*fn-bwr) + (*fn-bwr) (data, bsize, TRUE, cookie); + else { + while (bytecount bsize) { + + /* Xilinx detects an error if INIT goes low (active) + while DONE is low (inactive) */ + if ((*fn-done) (cookie) == 0 (*fn-init) (cookie)) { + puts (** CRC error during FPGA load.\n); + return (FPGA_FAIL); + } + val = data [bytecount ++]; + i = 8; + do { + /* Deassert the clock */ + (*fn-clk) (FALSE, TRUE, cookie); + CONFIG_FPGA_DELAY (); + /* Write data */ + (*fn-wr) ((val 0x80), TRUE, cookie); + CONFIG_FPGA_DELAY (); + /* Assert the clock */ + (*fn-clk) (TRUE, TRUE, cookie); + CONFIG_FPGA_DELAY (); + val = 1; + i --; + } while (i 0); #ifdef CONFIG_SYS_FPGA_PROG_FEEDBACK - if (bytecount % (bsize / 40) == 0) - putc ('.'); /* let them know we are alive */ + if (bytecount % (bsize / 40) == 0) + putc ('.'); /* let them know we are alive */ #endif + } } CONFIG_FPGA_DELAY (); diff --git a/include/spartan3.h b/include/spartan3.h index 30b1c2d..d5a589d 100644 --- a/include/spartan3.h +++ b/include/spartan3.h @@ -57,6 +57,7 @@ typedef struct { Xilinx_done_fn done; Xilinx_wr_fnwr; Xilinx_post_fn post; + Xilinx_bwr_fn bwr; /* block write function */ } Xilinx_Spartan3_Slave_Serial_fns; /* Device Image Sizes diff --git a/include/xilinx.h b/include/xilinx.h index d0799bc..2cb2e5b 100644 --- a/include/xilinx.h +++ b/include/xilinx.h @@ -100,5 +100,6 @@ typedef int (*Xilinx_busy_fn)( int cookie ); typedef int (*Xilinx_abort_fn)( int cookie ); typedef int (*Xilinx_pre_fn)( int cookie ); typedef int (*Xilinx_post_fn)( int cookie ); +typedef int (*Xilinx_bwr_fn)( void *buf, size_t len, int flush, int cookie ); #endif /* _XILINX_H_ */ -- 1.5.6.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] Build breaks on some OMAP3 configs
Hi, I was trying to build u-boot for omap3_3430sdp and omap3_zoom2, and the build fails with the error below. I'm on commit f2b4bc0 from the master branch. I'm using CodeSourcery's 2008q3 toolchain. The commands I ran were: make CROSS_COMPILE=arm-none-linux-gnueabi- omap3_3430sdp_config; make CROSS_COMPILE=arm-none-linux-gnueabi- Any ideas what I'm doing wrong? Thanks in advance, Anand make -C examples/standalone all make[1]: Entering directory `/data/git/denx-uboot/u-boot/examples/standalone' arm-none-linux-gnueabi-gcc -g -Os -fno-common -ffixed-r8 -msoft-float -D__KERNEL__ -DTEXT_BASE=0x80e8 -I/data/git/denx-uboot/u-boot/include -fno-builtin -ffreestanding -nostdinc -isystem /data/arm-2008q3/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.2/include -pipe -DCONFIG_ARM -D__ARM__ -marm -mabi=aapcs-linux -mno-thumb-interwork -march=armv5 -Wall -Wstrict-prototypes -fno-stack-protector -g -Os -fno-common -ffixed-r8 -msoft-float -D__KERNEL__ -DTEXT_BASE=0x80e8 -I/data/git/denx-uboot/u-boot/include -fno-builtin -ffreestanding -nostdinc -isystem /data/arm-2008q3/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.2/include -pipe -DCONFIG_ARM -D__ARM__ -marm -mabi=aapcs-linux -mno-thumb-interwork -march=armv5 -I.. -Bstatic -T u-boot.lds -Ttext 0x80e8 -o .c arm-none-linux-gnueabi-gcc: no input files make[1]: *** [.c] Error 1 make[1]: Leaving directory `/data/git/denx-uboot/u-boot/examples/standalone' make: *** [examples/standalone] Error 2 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] Beagle Zippy: OMAP3 SPI code for U-Boot?
Hi, does anybody have code for OMAP3 SPI? Zippy board [1] for Beagle connects ENC28J60 ethernet via OMAP3's SPI4. Or even better: Does anybody have already done any Zippy U-Boot work? Thanks Dirk [1] http://www.tincantools.com/product.php?productid=16147cat=0page=1featured ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] Davinci: add a pin multiplexer configuration API
On Fri, 30 Oct 2009 15:17:40 + Thompson, Nick (GE EntSol, Intelligent Platforms) nick.thomp...@gefanuc.com wrote: From: Kim Phillips [mailto:kim.phill...@freescale.com] Sent: 30 October 2009 14:57 On Fri, 30 Oct 2009 09:26:12 +0100 Wolfgang Denk w...@denx.de wrote: Dear Kim Phillips, In message 20091029182304.469c9f7f.kim.phill...@freescale.com you wrote: if (field PIN_MUX_NUM_FIELDS (value ~PIN_MUX_FIELD_MASK) == 0) { + int offset = field * PIN_MUX_FIELD_SIZE; + unsigned int mux = pins[i].mux; + unsigned int mask = PIN_MUX_FIELD_MASK offset; also please just declare everything at the top of the function - same for value and field declarations above. No! Why should that be needed? It would be just a waste of stack space (except that recent compilers don't care abouyt this anyway), and keeping variables as localized as possible seems to be a good thing to me. not when it sacrifices readability. I'm looking for assignments and finding 'unsigned'! Either put a blank line between the declarations and the rest of the code, or declare everything at the top of the function, since it does nothing for the compiler (my preference is the latter in this case). Kim All three of these declarations could be const, which may or may not help the compiler, but would be technically correct and document my intentions better. This would not be possible if they where moved to the start of the function or if the declaration and assignments where split up in any other way. Even with a blank line? Either comply to the level of compiler effectiveness you seek, or make the code more readable for the rest of us. Kim ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] about nand_read_byte() interface
On Fri, Oct 30, 2009 at 01:20:58PM +0800, HeLei wrote: Hi, all Hi, please wrap your lines at 75 or so characters -- and definitely don't paste code as all one line. I'm a little confused on NAND read operation. According to NAND character, NAND flash is read page by page, which mean's once you read, at least you should read data with page size (such as 512Bytes) Yes, unless you're reading from the out-of-band area. But the nand_read_byte() is implemented as following: static u_char nand_read_byte(struct mtd_info *mtd) { struct nand_chip *this = mtd-priv; return readb(this-IO_ADDR_R); } it seems only one byte is read out. It's reading one byte out of a buffer that was previously filled with some operation. It is used for reading status bytes and OOB bad block markers. -Scott ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] makefiles: fixes/cleanup for building build tools
On Friday 30 October 2009 11:53:43 Scott Wood wrote: On Fri, Oct 30, 2009 at 09:28:04AM +0100, Wolfgang Denk wrote: Scott Wood wrote: We can't build everything with it, as we have a lot of code that is incompatible. There were already exceptions in the makefiles for these files. Fixing that code is beyond the scope of this change, especially for code like libfdt that has an external upstream. I'd be OK with removing -pedantic from everything, if Wolfgang agrees. I don't agree. Rather I'd like to see it added everywhere, or at least to all code that is compiled using HOSTCC. Well, then someone has to fix the code that doesn't build with -pedantic -- including upstream code from libfdt. That's beyond the scope of a makefile restructuring, though this patch does make it a little simpler to move files from one set to another as they get fixed. then lets go the route you proposed -- invert the logic. default includes the -pedantic flag while the HOSTCOMPILE_NOPED does not. and we use that for the code that needs newer standards. -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] makefiles: fixes/cleanup for building build tools
Mike Frysinger wrote: then lets go the route you proposed -- invert the logic. default includes the -pedantic flag while the HOSTCOMPILE_NOPED does not. and we use that for the code that needs newer standards. OK. Should I drop the easylogo change, if it's currently being built outside the toplevel makefile system? -Scott ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Build breaks on some OMAP3 configs
Gadiyar, Anand wrote: Hi, I was trying to build u-boot for omap3_3430sdp and omap3_zoom2, and the build fails with the error below. I'm on commit f2b4bc0 from the master branch. I'm using CodeSourcery's 2008q3 toolchain. The commands I ran were: make CROSS_COMPILE=arm-none-linux-gnueabi- omap3_3430sdp_config; make CROSS_COMPILE=arm-none-linux-gnueabi- Any ideas what I'm doing wrong? Not really. Maybe tool chain version? But most probably not... I get: ./MAKEALL ARM_CORTEX_A8 Configuring for devkit8000 board... textdata bss dec hex filename 1927288604 214608 415940 658c4 ./u-boot Configuring for omap3_beagle board... textdata bss dec hex filename 1705928104 201484 380180 5cd14 ./u-boot Configuring for omap3_overo board... textdata bss dec hex filename 1740258164 210568 392757 5fe35 ./u-boot Configuring for omap3_evm board... textdata bss dec hex filename 1620505436 216804 384290 5dd22 ./u-boot Configuring for omap3_pandora board... textdata bss dec hex filename 1581997732 200672 366603 5980b ./u-boot Configuring for omap3_sdp3430 board... eth.c:497:2: warning: #warning Ethernet driver is deprecated. Please update to use CONFIG_NET_MULTI textdata bss dec hex filename 1564784732 214932 376142 5bd4e ./u-boot Configuring for omap3_zoom1 board... textdata bss dec hex filename 1589797812 200672 367463 59b67 ./u-boot Configuring for omap3_zoom2 board... textdata bss dec hex filename 1308716676 199456 337003 5246b ./u-boot Configuring for smdkc100 board... textdata bss dec hex filename 1255326460 209660 341652 53694 ./u-boot - SUMMARY Boards compiled: 9 Boards with warnings or errors: 1 ( omap3_sdp3430 ) -- arm-none-linux-gnueabi-gcc -v gcc version 4.3.3 (Sourcery G++ Lite 2009q1-203) git log -n 1 commit f2b4bc04d6aed6be712d236dab48ac4c4da22cbf Cheers Dirk ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Build breaks on some OMAP3 configs
Hi, I was trying to build u-boot for omap3_3430sdp and omap3_zoom2, and the build fails with the error below. I'm on commit f2b4bc0 from the master branch. I'm using CodeSourcery's 2008q3 toolchain. The commands I ran were: make CROSS_COMPILE=arm-none-linux-gnueabi- omap3_3430sdp_config; make CROSS_COMPILE=arm-none-linux-gnueabi- Any ideas what I'm doing wrong? make -C examples/standalone all make[1]: Entering directory `/data/git/denx-uboot/u-boot/examples/standalone' arm-none-linux-gnueabi-gcc -g -Os -fno-common -ffixed-r8 -msoft-float -D__KERNEL__ -DTEXT_BASE=0x80e8 -I/data/git/denx-uboot/u-boot/include -fno-builtin -ffreestanding -nostdinc -isystem /data/arm-2008q3/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.2/include -pipe -DCONFIG_ARM -D__ARM__ -marm -mabi=aapcs-linux -mno-thumb-interwork -march=armv5 -Wall -Wstrict-prototypes -fno-stack-protector -g -Os -fno-common -ffixed-r8 -msoft-float -D__KERNEL__ -DTEXT_BASE=0x80e8 -I/data/git/denx-uboot/u-boot/include -fno-builtin -ffreestanding -nostdinc -isystem /data/arm-2008q3/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.2/include -pipe -DCONFIG_ARM -D__ARM__ -marm -mabi=aapcs-linux -mno-thumb-interwork -march=armv5 -I.. -Bstatic -T u-boot.lds -Ttext 0x80e8 -o .c arm-none-linux-gnueabi-gcc: no input files make[1]: *** [.c] Error 1 make[1]: Leaving directory `/data/git/denx-uboot/u-boot/examples/standalone' make: *** [examples/standalone] Error 2 I took a look at examples/standalone/Makefile: The patch below gets things going again. So looks like something clobbered $(ELF-y). Any ideas what it could be? Thanks in advance, Anand diff --git a/examples/standalone/Makefile b/examples/standalone/Makefile index 5e2f2bc..73b19e9 100644 --- a/examples/standalone/Makefile +++ b/examples/standalone/Makefile @@ -39,6 +39,7 @@ ELF-ppc += sched ELF-oxc += eepro100_eeprom ELF := $(ELF-y) $(ELF-$(ARCH)) $(ELF-$(BOARD)) $(ELF-$(CPU)) +ELF := hello_world SREC = $(addsuffix .srec,$(ELF)) BIN = $(addsuffix .bin,$(ELF)) ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Build breaks on some OMAP3 configs
Nishant Menon wrote: On Fri, Oct 30, 2009 at 6:47 PM, Dirk Behme dirk.be...@googlemail.com wrote: Gadiyar, Anand wrote: Hi, I was trying to build u-boot for omap3_3430sdp and omap3_zoom2, and the build fails with the error below. I'm on commit f2b4bc0 from the master branch. I'm using CodeSourcery's 2008q3 toolchain. The commands I ran were: make CROSS_COMPILE=arm-none-linux-gnueabi- omap3_3430sdp_config; make CROSS_COMPILE=arm-none-linux-gnueabi- Any ideas what I'm doing wrong? Not really. Maybe tool chain version? But most probably not... [...] could you point which tree you are working on? Regards, Nishanth Menon This one: git://git.denx.de/u-boot.git ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Build breaks on some OMAP3 configs
On Fri, Oct 30, 2009 at 6:47 PM, Dirk Behme dirk.be...@googlemail.com wrote: Gadiyar, Anand wrote: Hi, I was trying to build u-boot for omap3_3430sdp and omap3_zoom2, and the build fails with the error below. I'm on commit f2b4bc0 from the master branch. I'm using CodeSourcery's 2008q3 toolchain. The commands I ran were: make CROSS_COMPILE=arm-none-linux-gnueabi- omap3_3430sdp_config; make CROSS_COMPILE=arm-none-linux-gnueabi- Any ideas what I'm doing wrong? Not really. Maybe tool chain version? But most probably not... [...] could you point which tree you are working on? Regards, Nishanth Menon ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] makefiles: fixes/cleanup for building build tools
On Friday 30 October 2009 12:47:33 Scott Wood wrote: Mike Frysinger wrote: Should I drop the easylogo change, if it's currently being built outside the toplevel makefile system? if you tested what you said (setting the var from the cmdline), then i'd leave it. we can address poor tool integration later since it affects a lot of subdirs beyond easylogo. -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
[U-Boot] [PATCH v4 1/2] NET: Move MDIO regs out of TSEC Space
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. Also, moved the TSEC_BASE_ADDR and MDIO_BASE_ADDR definitons into platform specific files. Signed-off-by: Sandeep Gopalpet sandeep.ku...@freescale.com --- drivers/net/tsec.c | 21 +-- include/asm-ppc/immap_83xx.h | 11 +- include/asm-ppc/immap_85xx.h |9 include/asm-ppc/immap_86xx.h | 10 - include/tsec.h | 44 +- 5 files changed, 60 insertions(+), 35 deletions(-) diff --git a/drivers/net/tsec.c b/drivers/net/tsec.c index 3f74118..d8b6619 100644 --- a/drivers/net/tsec.c +++ b/drivers/net/tsec.c @@ -5,7 +5,7 @@ * terms of the GNU Public License, Version 2, incorporated * herein by reference. * - * Copyright (C) 2004-2009 Freescale Semiconductor, Inc. + * Copyright 2004-2009 Freescale Semiconductor, Inc. * (C) Copyright 2003, Motorola, Inc. * author Andy Fleming * @@ -80,7 +80,7 @@ static struct tsec_info_struct tsec_info[] = { #ifdef CONFIG_MPC85XX_FEC { .regs = (tsec_t *)(TSEC_BASE_ADDR + 0x2000), - .miiregs = (tsec_t *)(TSEC_BASE_ADDR), + .miiregs = (tsec_mdio_t *)(MDIO_BASE_ADDR), .devname = CONFIG_MPC85XX_FEC_NAME, .phyaddr = FEC_PHY_ADDR, .flags = FEC_FLAGS @@ -133,6 +133,7 @@ int tsec_initialize(bd_t * bis, struct tsec_info_struct *tsec_info) privlist[num_tsecs++] = priv; priv-regs = tsec_info-regs; priv-phyregs = tsec_info-miiregs; + priv-phyregs_sgmii = tsec_info-miiregs_sgmii; priv-phyaddr = tsec_info-phyaddr; priv-flags = tsec_info-flags; @@ -219,7 +220,7 @@ int tsec_init(struct eth_device *dev, bd_t * bd) } /* Writes the given phy's reg with value, using the specified MDIO regs */ -static void tsec_local_mdio_write(volatile tsec_t *phyregs, uint addr, +static void tsec_local_mdio_write(volatile tsec_mdio_t *phyregs, uint addr, uint reg, uint value) { int timeout = 100; @@ -242,7 +243,7 @@ static void tsec_local_mdio_write(volatile tsec_t *phyregs, uint addr, * notvalid bit cleared), and the bus to cease activity (miimind * busy bit cleared), and then returns the value */ -uint tsec_local_mdio_read(volatile tsec_t *phyregs, uint phyid, uint regnum) +uint tsec_local_mdio_read(volatile tsec_mdio_t *phyregs, uint phyid, uint regnum) { uint value; @@ -287,11 +288,11 @@ static void tsec_configure_serdes(struct tsec_private *priv) { /* Access TBI PHY registers at given TSEC register offset as opposed to the * register offset used for external PHY accesses */ - tsec_local_mdio_write(priv-regs, priv-regs-tbipa, TBI_ANA, + tsec_local_mdio_write(priv-phyregs_sgmii, priv-regs-tbipa, TBI_ANA, TBIANA_SETTINGS); - tsec_local_mdio_write(priv-regs, priv-regs-tbipa, TBI_TBICON, + tsec_local_mdio_write(priv-phyregs_sgmii, priv-regs-tbipa, TBI_TBICON, TBICON_CLK_SELECT); - tsec_local_mdio_write(priv-regs, priv-regs-tbipa, TBI_CR, + tsec_local_mdio_write(priv-phyregs_sgmii, priv-regs-tbipa, TBI_CR, TBICR_SETTINGS); } @@ -303,12 +304,10 @@ static int init_phy(struct eth_device *dev) { struct tsec_private *priv = (struct tsec_private *)dev-priv; struct phy_info *curphy; - volatile tsec_t *phyregs = priv-phyregs; volatile tsec_t *regs = priv-regs; /* Assign a Physical address to the TBI */ regs-tbipa = CONFIG_SYS_TBIPA_VALUE; - phyregs-tbipa = CONFIG_SYS_TBIPA_VALUE; asm(sync); /* Reset MII (due to new addresses) */ @@ -733,7 +732,7 @@ uint mii_parse_dm9161_scsr(uint mii_reg, struct tsec_private * priv) uint mii_cis8204_fixled(uint mii_reg, struct tsec_private * priv) { uint phyid; - volatile tsec_t *regbase = priv-phyregs; + volatile tsec_mdio_t *regbase = priv-phyregs; int timeout = 100; for (phyid = 0; phyid 4; phyid++) { @@ -1766,7 +1765,7 @@ void phy_run_commands(struct tsec_private *priv, struct phy_cmd *cmd) { int i; uint result; - volatile tsec_t *phyregs = priv-phyregs; + volatile tsec_mdio_t *phyregs = priv-phyregs; phyregs-miimcfg = MIIMCFG_RESET; diff --git a/include/asm-ppc/immap_83xx.h b/include/asm-ppc/immap_83xx.h index c60a7d2..6dd477c 100644 --- a/include/asm-ppc/immap_83xx.h +++ b/include/asm-ppc/immap_83xx.h @@ -1,5 +1,5 @@ /* - * (C) Copyright 2004-2009 Freescale Semiconductor, Inc. + * Copyright 2004-2009 Freescale Semiconductor, Inc. * * MPC83xx Internal Memory Map * @@ -868,4 +868,13 @@
[U-Boot] [PATCH v4 2/2] NET: Base support for etsec2.0
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 sandeep.ku...@freescale.com --- include/asm-ppc/immap_83xx.h |2 +- include/asm-ppc/immap_85xx.h |6 +- include/asm-ppc/immap_86xx.h |2 +- include/configs/P1_P2_RDB.h |5 + include/tsec.h |7 +++ 5 files changed, 19 insertions(+), 3 deletions(-) diff --git a/include/asm-ppc/immap_83xx.h b/include/asm-ppc/immap_83xx.h index 6dd477c..2e6ba2d 100644 --- a/include/asm-ppc/immap_83xx.h +++ b/include/asm-ppc/immap_83xx.h @@ -872,7 +872,7 @@ typedef struct immap { #define CONFIG_SYS_TSEC1_OFFSET0x24000 #define TSEC_SIZE 0x01000 -#define CONFIG_SYS_MDIO1_OFFSET0x24520 +#define CONFIG_SYS_MDIO1_OFFSET0x24000 #define TSEC_MDIO_OFFSET 0x01000 #define TSEC_BASE_ADDR (CONFIG_SYS_IMMR + CONFIG_SYS_TSEC1_OFFSET) diff --git a/include/asm-ppc/immap_85xx.h b/include/asm-ppc/immap_85xx.h index 54b43b1..2f2ebfe 100644 --- a/include/asm-ppc/immap_85xx.h +++ b/include/asm-ppc/immap_85xx.h @@ -1933,9 +1933,13 @@ typedef struct ccsr_gur { (CONFIG_SYS_IMMR + CONFIG_SYS_MPC85xx_USB_OFFSET) /* TSEC and MDIO OFFSETS */ +#ifdef CONFIG_TSECV2 +#define CONFIG_SYS_TSEC1_OFFSET0xB +#else #define CONFIG_SYS_TSEC1_OFFSET0x24000 +#endif -#define CONFIG_SYS_MDIO1_OFFSET0x24520 +#define CONFIG_SYS_MDIO1_OFFSET0x24000 #define TSEC_MDIO_OFFSET 0x01000 #define TSEC_BASE_ADDR (CONFIG_SYS_IMMR + CONFIG_SYS_TSEC1_OFFSET) diff --git a/include/asm-ppc/immap_86xx.h b/include/asm-ppc/immap_86xx.h index be2eadd..783ea2e 100644 --- a/include/asm-ppc/immap_86xx.h +++ b/include/asm-ppc/immap_86xx.h @@ -1300,7 +1300,7 @@ extern immap_t *immr; #define CONFIG_SYS_TSEC1_OFFSET0x24000 -#define CONFIG_SYS_MDIO1_OFFSET0x24520 +#define CONFIG_SYS_MDIO1_OFFSET0x24000 #define TSEC_MDIO_OFFSET 0x01000 #define TSEC_BASE_ADDR (CONFIG_SYS_IMMR + CONFIG_SYS_TSEC1_OFFSET) diff --git a/include/configs/P1_P2_RDB.h b/include/configs/P1_P2_RDB.h index 310242e..4d93ed8 100644 --- a/include/configs/P1_P2_RDB.h +++ b/include/configs/P1_P2_RDB.h @@ -84,6 +84,11 @@ extern unsigned long get_board_sys_clk(unsigned long dummy); #define CONFIG_MP #endif +/* TSECV2 */ +#if defined(CONFIG_P1020) +#define CONFIG_TSECV2 +#endif + /* * These can be toggled for performance analysis, otherwise use default. */ diff --git a/include/tsec.h b/include/tsec.h index 5c13d52..e33ef61 100644 --- a/include/tsec.h +++ b/include/tsec.h @@ -456,12 +456,19 @@ typedef struct tsec_hash_regs } tsec_hash_t; typedef struct tsec_mdio { + uintres1[4]; + uintieventm; + uintimaskm; + uintres2; + uintemapm; + 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] [PATCH] NAND: Update to support 64 bit device size
From: Sandeep Paulraj s-paul...@ti.com This patch adds support for NANDs greater than 2 GB. Patch is based on the MTD NAND driver in the kernel. Signed-off-by: Sandeep Paulraj s-paul...@ti.com --- Tested this on the DaVinci DM355 EVM. drivers/mtd/nand/nand_base.c | 29 +-- drivers/mtd/nand/nand_bbt.c| 41 ++- include/linux/mtd/nand.h |2 +- include/linux/mtd/partitions.h |4 +- 4 files changed, 44 insertions(+), 32 deletions(-) diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c index 426bb95..6848f28 100644 --- a/drivers/mtd/nand/nand_base.c +++ b/drivers/mtd/nand/nand_base.c @@ -2211,13 +2211,15 @@ static int nand_erase(struct mtd_info *mtd, struct erase_info *instr) int nand_erase_nand(struct mtd_info *mtd, struct erase_info *instr, int allowbbt) { - int page, len, status, pages_per_block, ret, chipnr; + int page, status, pages_per_block, ret, chipnr; struct nand_chip *chip = mtd-priv; - int rewrite_bbt[CONFIG_SYS_NAND_MAX_CHIPS]={0}; + loff_t rewrite_bbt[CONFIG_SYS_NAND_MAX_CHIPS] = {0}; unsigned int bbt_masked_page = 0x; + loff_t len; - MTDDEBUG (MTD_DEBUG_LEVEL3, nand_erase: start = 0x%08x, len = %i\n, - (unsigned int) instr-addr, (unsigned int) instr-len); + MTDDEBUG(MTD_DEBUG_LEVEL3, nand_erase: start = 0x%012llx, + len = %llu\n, (unsigned long long) instr-addr, + (unsigned long long) instr-len); /* Start address must align on block boundary */ if (instr-addr ((1 chip-phys_erase_shift) - 1)) { @@ -2313,7 +2315,7 @@ int nand_erase_nand(struct mtd_info *mtd, struct erase_info *instr, MTDDEBUG (MTD_DEBUG_LEVEL0, nand_erase: Failed erase, page 0x%08x\n, page); instr-state = MTD_ERASE_FAILED; - instr-fail_addr = (page chip-page_shift); + instr-fail_addr = ((loff_t)page chip-page_shift); goto erase_exit; } @@ -2322,8 +2324,9 @@ int nand_erase_nand(struct mtd_info *mtd, struct erase_info *instr, * page being erased */ if (bbt_masked_page != 0x - (page BBT_PAGE_MASK) == bbt_masked_page) - rewrite_bbt[chipnr] = (page chip-page_shift); + (page BBT_PAGE_MASK) == bbt_masked_page) + rewrite_bbt[chipnr] = ((loff_t)page + chip-page_shift); /* Increment page address and decrement length */ len -= (1 chip-phys_erase_shift); @@ -2370,8 +2373,9 @@ int nand_erase_nand(struct mtd_info *mtd, struct erase_info *instr, continue; /* update the BBT for chip */ MTDDEBUG (MTD_DEBUG_LEVEL0, nand_erase_nand: nand_update_bbt - (%d:0x%0x 0x%0x)\n, chipnr, rewrite_bbt[chipnr], - chip-bbt_td-pages[chipnr]); + (%d:0x%0llx 0x%0x)\n, chipnr, + rewrite_bbt[chipnr], + chip-bbt_td-pages[chipnr]); nand_update_bbt(mtd, rewrite_bbt[chipnr]); } @@ -2566,7 +2570,7 @@ static struct nand_flash_dev *nand_get_flash_type(struct mtd_info *mtd, if (!mtd-name) mtd-name = type-name; - chip-chipsize = type-chipsize 20; + chip-chipsize = (uint64_t)type-chipsize 20; /* Newer devices have all the information in additional id bytes */ if (!type-pagesize) { @@ -2624,7 +2628,10 @@ static struct nand_flash_dev *nand_get_flash_type(struct mtd_info *mtd, chip-bbt_erase_shift = chip-phys_erase_shift = ffs(mtd-erasesize) - 1; - chip-chip_shift = ffs(chip-chipsize) - 1; + if (chip-chipsize 0x) + chip-chip_shift = ffs(chip-chipsize) - 1; + else + chip-chip_shift = ffs((unsigned)(chip-chipsize 32)) + 31; /* Set the bad block position */ chip-badblockpos = mtd-writesize 512 ? diff --git a/drivers/mtd/nand/nand_bbt.c b/drivers/mtd/nand/nand_bbt.c index d68a315..1167c90 100644 --- a/drivers/mtd/nand/nand_bbt.c +++ b/drivers/mtd/nand/nand_bbt.c @@ -182,16 +182,19 @@ static int read_bbt(struct mtd_info *mtd, uint8_t *buf, int page, int num, if (tmp == msk) continue; if (reserved_block_code (tmp == reserved_block_code)) { - printk(KERN_DEBUG nand_read_bbt: Reserved block at 0x%08x\n, - ((offs 2) + (act 1))
Re: [U-Boot] [PATCH] NAND: Update to support 64 bit device size
I referred to this http://git.infradead.org/mtd-2.6.git?a=commit;h=69423d99fc182a81f3c5db3eb5c140acc6fc64be and picked up the MTD NAND specific stuff From: Sandeep Paulraj s-paul...@ti.com This patch adds support for NANDs greater than 2 GB. Patch is based on the MTD NAND driver in the kernel. Signed-off-by: Sandeep Paulraj s-paul...@ti.com --- Tested this on the DaVinci DM355 EVM. drivers/mtd/nand/nand_base.c | 29 +-- drivers/mtd/nand/nand_bbt.c| 41 ++- include/linux/mtd/nand.h |2 +- include/linux/mtd/partitions.h |4 +- 4 files changed, 44 insertions(+), 32 deletions(-) diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c index 426bb95..6848f28 100644 --- a/drivers/mtd/nand/nand_base.c +++ b/drivers/mtd/nand/nand_base.c @@ -2211,13 +2211,15 @@ static int nand_erase(struct mtd_info *mtd, struct erase_info *instr) int nand_erase_nand(struct mtd_info *mtd, struct erase_info *instr, int allowbbt) { - int page, len, status, pages_per_block, ret, chipnr; + int page, status, pages_per_block, ret, chipnr; struct nand_chip *chip = mtd-priv; - int rewrite_bbt[CONFIG_SYS_NAND_MAX_CHIPS]={0}; + loff_t rewrite_bbt[CONFIG_SYS_NAND_MAX_CHIPS] = {0}; unsigned int bbt_masked_page = 0x; + loff_t len; - MTDDEBUG (MTD_DEBUG_LEVEL3, nand_erase: start = 0x%08x, len = %i\n, - (unsigned int) instr-addr, (unsigned int) instr-len); + MTDDEBUG(MTD_DEBUG_LEVEL3, nand_erase: start = 0x%012llx, + len = %llu\n, (unsigned long long) instr-addr, + (unsigned long long) instr-len); /* Start address must align on block boundary */ if (instr-addr ((1 chip-phys_erase_shift) - 1)) { @@ -2313,7 +2315,7 @@ int nand_erase_nand(struct mtd_info *mtd, struct erase_info *instr, MTDDEBUG (MTD_DEBUG_LEVEL0, nand_erase: Failed erase, page 0x%08x\n, page); instr-state = MTD_ERASE_FAILED; - instr-fail_addr = (page chip-page_shift); + instr-fail_addr = ((loff_t)page chip-page_shift); goto erase_exit; } @@ -2322,8 +2324,9 @@ int nand_erase_nand(struct mtd_info *mtd, struct erase_info *instr, * page being erased */ if (bbt_masked_page != 0x - (page BBT_PAGE_MASK) == bbt_masked_page) - rewrite_bbt[chipnr] = (page chip-page_shift); + (page BBT_PAGE_MASK) == bbt_masked_page) + rewrite_bbt[chipnr] = ((loff_t)page + chip-page_shift); /* Increment page address and decrement length */ len -= (1 chip-phys_erase_shift); @@ -2370,8 +2373,9 @@ int nand_erase_nand(struct mtd_info *mtd, struct erase_info *instr, continue; /* update the BBT for chip */ MTDDEBUG (MTD_DEBUG_LEVEL0, nand_erase_nand: nand_update_bbt - (%d:0x%0x 0x%0x)\n, chipnr, rewrite_bbt[chipnr], - chip-bbt_td-pages[chipnr]); + (%d:0x%0llx 0x%0x)\n, chipnr, + rewrite_bbt[chipnr], + chip-bbt_td-pages[chipnr]); nand_update_bbt(mtd, rewrite_bbt[chipnr]); } @@ -2566,7 +2570,7 @@ static struct nand_flash_dev *nand_get_flash_type(struct mtd_info *mtd, if (!mtd-name) mtd-name = type-name; - chip-chipsize = type-chipsize 20; + chip-chipsize = (uint64_t)type-chipsize 20; /* Newer devices have all the information in additional id bytes */ if (!type-pagesize) { @@ -2624,7 +2628,10 @@ static struct nand_flash_dev *nand_get_flash_type(struct mtd_info *mtd, chip-bbt_erase_shift = chip-phys_erase_shift = ffs(mtd-erasesize) - 1; - chip-chip_shift = ffs(chip-chipsize) - 1; + if (chip-chipsize 0x) + chip-chip_shift = ffs(chip-chipsize) - 1; + else + chip-chip_shift = ffs((unsigned)(chip-chipsize 32)) + 31; /* Set the bad block position */ chip-badblockpos = mtd-writesize 512 ? diff --git a/drivers/mtd/nand/nand_bbt.c b/drivers/mtd/nand/nand_bbt.c index d68a315..1167c90 100644 --- a/drivers/mtd/nand/nand_bbt.c +++ b/drivers/mtd/nand/nand_bbt.c @@ -182,16 +182,19 @@ static int read_bbt(struct mtd_info *mtd, uint8_t *buf, int page, int num, if (tmp == msk) continue; if (reserved_block_code (tmp == reserved_block_code)) { -
Re: [U-Boot] [RFC PATCH] Implementation of non-blocking flash write/erase/status check functions.
Dear Wolfgang Wegner, In message 1256914121-26044-1-git-send-email-w.weg...@astro-kom.de you wrote: write_buff_nb() introduces quite an amount of duplicate code compared to write_buff(), but I did not find an elegant solution to partition them. Signed-off-by: Wolfgang Wegner w.weg...@astro-kom.de --- drivers/mtd/cfi_flash.c | 440 ++- include/flash.h |3 + 2 files changed, 365 insertions(+), 78 deletions(-) This summary alone is a pretty clear message to me. This is indeed a lot of added, and even worse, duplicated code. I see currently no reason to change my mind: I don;t want to see this code in mainline. It breaks with the design principles, and makes the common code more difficult to maintain with no benefit for the majority of the users. Sorry. 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 But it's real. And if it's real it can be affected ... we may not be able to break it, but, I'll bet you credits to Navy Beans we can put a dent in it. -- deSalle, Catspaw, stardate 3018.2 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v4 1/2] NET: Move MDIO regs out of TSEC Space
On Sat, 31 Oct 2009 00:35:04 +0530 Sandeep Gopalpet sandeep.ku...@freescale.com 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. Also, moved the TSEC_BASE_ADDR and MDIO_BASE_ADDR definitons into platform specific files. Signed-off-by: Sandeep Gopalpet sandeep.ku...@freescale.com --- so now this is v5? Can you start listing the differences between your patches? the place to list them is here, under the '---' line. doing a manual patch diff ah, so this is just the same as v4 (the second submission labeled v3), with the diff I provided to Kumar to squash into this commit at apply time - in that case, Sandeep, you're free to add my acked-by upon resubmission (even though in this case I didn't think resubmission was necessary). just making things ultra-clear so everyone knows what's going on! Kim ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] ads5121 - remove PSC serial console support
Hi all, I'm working on freescale ev. board ads5121ev and I'm trying to remove serial console support. Do you know the right procedure to remove it? Thanks in advance. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Build breaks on some OMAP3 configs
Gadiyar, Anand said the following on 10/30/2009 06:54 PM: Hi, I was trying to build u-boot for omap3_3430sdp and omap3_zoom2, and the build fails with the error below. I'm on commit f2b4bc0 from the master branch. I'm using CodeSourcery's 2008q3 toolchain. The commands I ran were: make CROSS_COMPILE=arm-none-linux-gnueabi- omap3_3430sdp_config; make CROSS_COMPILE=arm-none-linux-gnueabi- Any ideas what I'm doing wrong? make -C examples/standalone all make[1]: Entering directory `/data/git/denx-uboot/u-boot/examples/standalone' arm-none-linux-gnueabi-gcc -g -Os -fno-common -ffixed-r8 -msoft-float -D__KERNEL__ -DTEXT_BASE=0x80e8 -I/data/git/denx-uboot/u-boot/include -fno-builtin -ffreestanding -nostdinc -isystem /data/arm-2008q3/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.2/include -pipe -DCONFIG_ARM -D__ARM__ -marm -mabi=aapcs-linux -mno-thumb-interwork -march=armv5 -Wall -Wstrict-prototypes -fno-stack-protector -g -Os -fno-common -ffixed-r8 -msoft-float -D__KERNEL__ -DTEXT_BASE=0x80e8 -I/data/git/denx-uboot/u-boot/include -fno-builtin -ffreestanding -nostdinc -isystem /data/arm-2008q3/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.2/include -pipe -DCONFIG_ARM -D__ARM__ -marm -mabi=aapcs-linux -mno-thumb-interwork -march=armv5 -I.. -Bstatic -T u-boot.lds -Ttext 0x80e8 -o .c arm-none-linux-gnueabi-gcc: no input files make[1]: *** [.c] Error 1 make[1]: Leaving directory `/data/git/denx-uboot/u-boot/examples/standalone' make: *** [examples/standalone] Error 2 I took a look at examples/standalone/Makefile: The patch below gets things going again. So looks like something clobbered $(ELF-y). Any ideas what it could be? Thanks in advance, Anand diff --git a/examples/standalone/Makefile b/examples/standalone/Makefile index 5e2f2bc..73b19e9 100644 --- a/examples/standalone/Makefile +++ b/examples/standalone/Makefile @@ -39,6 +39,7 @@ ELF-ppc += sched ELF-oxc += eepro100_eeprom ELF := $(ELF-y) $(ELF-$(ARCH)) $(ELF-$(BOARD)) $(ELF-$(CPU)) +ELF := hello_world SREC = $(addsuffix .srec,$(ELF)) BIN = $(addsuffix .bin,$(ELF)) The build command i use is this: alias mymake='make ARCH=ARM CROSS_COMPILE=arm-none-linux-gnueabi- V=1 -j2' though on a fresh clone, I seem to have run into a wierd issue - MAKEALL seems to build things fine, but if I: mymake distclean rm -rvf * git reset --hard mymake omap3_sdp3430_config mymake [] arm-none-linux-gnueabi-gcc -g -Os -fno-common -ffixed-r8 -msoft-float -D__KERNEL__ -DTEXT_BASE=0x80e8 -I/home/nmenon/Src/r/x/u-boot/include -fno-builtin -ffreestanding -nostdinc -isystem /home/opt/tools/arm-2009q1/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.3/include -pipe -march=armv5 -Wall -Wstrict-prototypes -fno-stack-protector -o hello_world.o hello_world.c -c In file included from /home/nmenon/Src/r/x/u-boot/include/common.h:113, from hello_world.c:24: /home/nmenon/Src/r/x/u-boot/include/image.h:507:3: error: #error Unknown CPU type for some wierd reason, it does not seem to take the include/config.mk file (where the defines are present).. now, if i do a local clone of the cloned directory, it builds just fine! gotta dig at it a little more.. Regards, Nishanth Menon ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] ads5121 - remove PSC serial console support
Dear Angelo, In message 630811.21371...@web23106.mail.ird.yahoo.com you wrote: I'm working on freescale ev. board ads5121ev and I'm trying to remove serial console support. Which sense would this make? Do you know the right procedure to remove it? The right procedure is to keep it! U-Boot is designed around the principle of having a serial console avaialable as early as possible. You don't give up this lightly. 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 Harrison's Postulate: For every action, there is an equal and opposite criticism. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Build breaks on some OMAP3 configs
Dear Nishanth Menon, In message 4aeb4dc5.9040...@gmail.com you wrote: for some wierd reason, it does not seem to take the include/config.mk file (where the defines are present).. now, if i do a local clone of the cloned directory, it builds just fine! gotta dig at it a little more.. Maybe some files have been stored on or transferred through a Windoze system which messed up the line endings with CR-LF sequences? 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 Far back in the mists of ancient time, in the great and glorious days of the former Galactic Empire, life was wild, rich and largely tax free. - Douglas Adams, _The Hitchhiker's Guide to the Galaxy_ ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] FPGA relocation/C environment
Wolfgang Wegner wrote: Hi, thank you all for all the comments so far. It seems I have at least 2 problems: - my gcc (m68k-elf-gcc (Sourcery G++ Lite 4.3-208) 4.3.3) does not produce correctly relocatable code; no matter if I give -fPIC or not (-mrelocatable is not accepted at all), I do not get any entries in .got2 or .fixup, only .got -mreloctable only applies to PPC CPUs - not version of gcc will give you .got2 and .fixup unless you are building for PPC However, there still may be anything wrong in my conclusion, because I can use this compiler to compile uClinux-dist-20071107 and get working applications (which, as far as I understand, have to be relocated at runtime, too, but I do not know if any of these use such features as statically initialized function pointers that I have in the U-Boot fpga code...). They are build and linked as pic or pie (position independent executable) This puts information in the elf binary that the dynamic loader/linker can user to modify the executable as it is loaded into memory to enable it to run at the target load address - the current coldfire startup code (at least for MCF532x/MCF537x) would not handle these sections even if they existed - however, this seems to be rather easily (i.e. maybe even I could do it) fixed, looking at the ppc examples. You might want to look at the x86 example instead. I posted a patch a while ago (http://thread.gmane.org/gmane.comp.boot-loaders.u-boot/68923) I will first live with the problem (relocating the fpga struct pointers in my own board code, where it is filled anyways - for coldfire, gd-reloc_off is still present) and see if I can get hold of a better gcc version. Yes, this manual 'fixup' will work, but the long term goal is to remove this I tried gcc-4.4.1, but was unable to compile one of U-Boot or uClinux, so switched back to this one which I found to compile (old and current) U-Boot, old uClinux _and_ support mcf5445x, which I am designing in now... Thank you and sorry for my stupid questions. Not stupid at all - Proper relocation can be very tricky to achieve. I spent a _long_ time getting it to work for x86, and in the end the solution is rather trivial - Have a search through the u-boot mailing list ;) Regards, Wolfgang Regards, Graeme ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] ads5121 - remove PSC serial console support
Ok, I'm trying to reduce boot time and i don't want to omit anything! I know that console is fundamental, but i need to disable it. After some modifies it seems like u-boot execute an infinite loop, waiting for unknown something. Are there some special file (e.g. cpu/mpc512x/serial.c, include/configs/ads5121.h ...) that I have to modify? I suppose that should be a way to remove it completely. Thanks --- Ven 30/10/09, Wolfgang Denk w...@denx.de ha scritto: Da: Wolfgang Denk w...@denx.de Oggetto: Re: [U-Boot] ads5121 - remove PSC serial console support A: Angelo s104...@yahoo.it Cc: u-boot@lists.denx.de Data: Venerdì 30 ottobre 2009, 22:23 Dear Angelo, In message 630811.21371...@web23106.mail.ird.yahoo.com you wrote: I'm working on freescale ev. board ads5121ev and I'm trying to remove serial console support. Which sense would this make? Do you know the right procedure to remove it? The right procedure is to keep it! U-Boot is designed around the principle of having a serial console avaialable as early as possible. You don't give up this lightly. 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 Harrison's Postulate: For every action, there is an equal and opposite criticism. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] S3C6400/SMDK6400: fix stack_setup in start.S
stack_setup is modified to initialize the stack on the correct address in DRAM accroding to the typical memory configuration described in README and the related CONFIG_* macro definitions. This makes macro CONFIG_MEMORY_UPPER_CODE no longer necessry. This was introduced and used only by this board for some unclear reason. The definition of this macro is removed because it's not referenced elsewhere. Signed-off-by: Seunghyeon Rhee seunghy...@lpmtec.com --- cpu/arm1176/start.S|7 +-- include/configs/smdk6400.h |2 -- 2 files changed, 1 insertions(+), 8 deletions(-) diff --git a/cpu/arm1176/start.S b/cpu/arm1176/start.S index cb891df..1ecb3b9 100644 --- a/cpu/arm1176/start.S +++ b/cpu/arm1176/start.S @@ -241,16 +241,11 @@ mmu_enable: skip_hw_init: /* Set up the stack*/ stack_setup: -#ifdef CONFIG_MEMORY_UPPER_CODE -ldrsp, =(CONFIG_SYS_UBOOT_BASE + CONFIG_SYS_UBOOT_SIZE - 0xc) -#else -ldrr0, _TEXT_BASE/* upper 128 KiB: relocated uboot */ +ldrr0, =CONFIG_SYS_UBOOT_BASE/* base of copy in DRAM*/ subr0, r0, #CONFIG_SYS_MALLOC_LEN/* malloc area */ subr0, r0, #CONFIG_SYS_GBL_DATA_SIZE /* bdinfo*/ subsp, r0, #12/* leave 3 words for abort-stack*/ -#endif - clear_bss: ldrr0, _bss_start/* find start of bss segment*/ ldrr1, _bss_end/* stop here*/ diff --git a/include/configs/smdk6400.h b/include/configs/smdk6400.h index f6e1221..f644cd2 100644 --- a/include/configs/smdk6400.h +++ b/include/configs/smdk6400.h @@ -49,8 +49,6 @@ #define CONFIG_ENABLE_MMU #endif -#define CONFIG_MEMORY_UPPER_CODE - #define CONFIG_SETUP_MEMORY_TAGS #define CONFIG_CMDLINE_TAG #define CONFIG_INITRD_TAG -- 1.6.2.5 -- Seunghyeon Rhee, Ph.D. / Director LPM Technology Inc. T +82-70-8255-6007 F +82-2-6442-6462 M +82-10-2790-0657 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot