Re: [U-Boot] Question about dfu flash rootfs image
Hi Heiko, > There was a discussion, how to reorganize the dfu_alt_info var, see: > > http://lists.denx.de/pipermail/u-boot/2013-July/158920.html > > I think, your question fits into this thread ... I plan to present some initial idea for dfu_alt_info at ELCE u-boot mini summit, so any input is welcome :-). -- Best regards, Lukasz Majewski Samsung R&D Institute Poland (SRPOL) | Linux Platform Group ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 1/3 v2] exynos: i2c: Fix i2c driver to handle NACKs properly
Hello Naveen, Am 03.10.2013 13:22, schrieb Naveen Krishna Chatradhi: The Exynos5 i2c driver does not handle NACKs properly. This change: - fixes the NACK processing problem (do not continue transaction if address cycle was NACKed) - eliminates a fair amount of duplicate code Signed-off-by: Vadim Bendebury Reviewed-by: Simon Glass Signed-off-by: Naveen Krishna Chatradhi --- Changes since v1: 1. Removed the compilation error mentioned by Heiko for VCMA9 board... Hmm.. just tried your patchset and I get for the VCMA9 board: http://patchwork.ozlabs.org/patch/280286/ http://patchwork.ozlabs.org/patch/280287/ http://patchwork.ozlabs.org/patch/280288/ Configuring for VCMA9 board... s3c24x0_i2c.c:125:39: error: 'CONFIG_MAX_I2C_NUM' undeclared here (not in a function) arm-linux-gnueabi-size: './u-boot': No such file s3c24x0_i2c.c:125:39: error: 'CONFIG_MAX_I2C_NUM' undeclared here (not in a function) s3c24x0_i2c.c:125:31: warning: 'i2c_bus' defined but not used [-Wunused-variable] s3c24x0_i2c.c:295:12: warning: 'hsi2c_get_clk_details' defined but not used [-Wunused-function] make[1]: *** [s3c24x0_i2c.o] Fehler 1 make: *** [drivers/i2c/libi2c.o] Fehler 2 make: *** Warte auf noch nicht beendete Prozesse... Could you check this complete patchset, 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] RFC: samsung: i2c: Enable new CONFIG_SYS_I2C framework
Hello Naveen, Am 30.09.2013 08:58, schrieb Naveen Krishna Chatradhi: This enables CONFIG_SYS_I2C on Samsung, updating existing s3c24x0 i2c driver to support this. Note: Not for merge, Just for review and suggestions. Signed-off-by: Naveen Krishna Chatradhi --- drivers/i2c/Makefile |2 +- drivers/i2c/s3c24x0_i2c.c | 156 +++-- 2 files changed, 108 insertions(+), 50 deletions(-) diff --git a/drivers/i2c/Makefile b/drivers/i2c/Makefile index 37ccbd1..96448a6 100644 --- a/drivers/i2c/Makefile +++ b/drivers/i2c/Makefile @@ -20,7 +20,7 @@ COBJS-$(CONFIG_DRIVER_OMAP1510_I2C) += omap1510_i2c.o COBJS-$(CONFIG_DRIVER_OMAP24XX_I2C) += omap24xx_i2c.o COBJS-$(CONFIG_DRIVER_OMAP34XX_I2C) += omap24xx_i2c.o COBJS-$(CONFIG_PCA9564_I2C) += pca9564_i2c.o -COBJS-$(CONFIG_DRIVER_S3C24X0_I2C) += s3c24x0_i2c.o +COBJS-$(CONFIG_SYS_I2C_S3C24X0_I2C) += s3c24x0_i2c.o Please keep lists sorted. COBJS-$(CONFIG_S3C44B0_I2C) += s3c44b0_i2c.o COBJS-$(CONFIG_TSI108_I2C) += tsi108_i2c.o COBJS-$(CONFIG_U8500_I2C) += u8500_i2c.o diff --git a/drivers/i2c/s3c24x0_i2c.c b/drivers/i2c/s3c24x0_i2c.c index 604d43d..89cb2d2 100644 --- a/drivers/i2c/s3c24x0_i2c.c +++ b/drivers/i2c/s3c24x0_i2c.c @@ -117,6 +117,8 @@ #define HSI2C_TIMEOUT_US 10 /* 100 ms, finer granularity */ +DECLARE_GLOBAL_DATA_PTR; + /* * For SPL boot some boards need i2c before SDRAM is initialised so force * variables to live in SRAM @@ -126,6 +128,9 @@ static unsigned int g_current_bus __attribute__((section(".data"))); static struct s3c24x0_i2c_bus i2c_bus[CONFIG_MAX_I2C_NUM] __attribute__((section(".data"))); #endif +static void i2c_ch_init(struct s3c24x0_i2c *i2c, int speed, int slaveadd); +static int hsi2c_get_clk_details(struct s3c24x0_i2c_bus *); +static void hsi2c_ch_init(struct s3c24x0_i2c_bus *); /** * Get a pointer to the given bus index @@ -133,20 +138,40 @@ static struct s3c24x0_i2c_bus i2c_bus[CONFIG_MAX_I2C_NUM] * @bus_idx: Bus index to look up * @return pointer to bus, or NULL if invalid or not available */ -static struct s3c24x0_i2c_bus *get_bus(unsigned int bus_idx) +static struct s3c24x0_i2c_bus *s3c_i2c_get_bus(struct i2c_adapter *adap) { - if (bus_idx< ARRAY_SIZE(i2c_bus)) { - struct s3c24x0_i2c_bus *bus; + struct s3c24x0_i2c_bus *bus; - bus =&i2c_bus[bus_idx]; - if (bus->active) - return bus; - } + bus =&i2c_bus[adap->hwadapnr]; + if (bus->active) + return bus; - debug("Undefined bus: %d\n", bus_idx); + debug("Undefined bus: %d\n", adap->hwadapnr); return NULL; } +static unsigned int s3c_i2c_set_bus_speed(struct i2c_adapter *adap, + unsigned int speed) +{ + struct s3c24x0_i2c_bus *i2c_bus; + + i2c_bus = s3c_i2c_get_bus(adap); + if (!i2c_bus) + return -1; + i2c_bus->clock_frequency = speed; + + if (i2c_bus->is_highspeed) { + if (hsi2c_get_clk_details(i2c_bus)) + return -1; + hsi2c_ch_init(i2c_bus); + } else { + i2c_ch_init(i2c_bus->regs, i2c_bus->clock_frequency, + CONFIG_SYS_I2C_SLAVE); + } + + return 0; +} + #if !(defined CONFIG_EXYNOS4 || defined CONFIG_EXYNOS5) static int GetI2CSDA(void) { @@ -392,39 +417,7 @@ static void exynos5_i2c_reset(struct s3c24x0_i2c_bus *i2c_bus) hsi2c_ch_init(i2c_bus); } -/* - * MULTI BUS I2C support - */ - -#ifdef CONFIG_I2C_MULTI_BUS -int i2c_set_bus_num(unsigned int bus) -{ - struct s3c24x0_i2c_bus *i2c_bus; - - i2c_bus = get_bus(bus); - if (!i2c_bus) - return -1; - g_current_bus = bus; - - if (i2c_bus->is_highspeed) { - if (hsi2c_get_clk_details(i2c_bus)) - return -1; - hsi2c_ch_init(i2c_bus); - } else { - i2c_ch_init(i2c_bus->regs, i2c_bus->clock_frequency, - CONFIG_SYS_I2C_SLAVE); - } - - return 0; -} - -unsigned int i2c_get_bus_num(void) -{ - return g_current_bus; -} -#endif - -void i2c_init(int speed, int slaveadd) +static void s3c_i2c_init(struct i2c_adapter *adap, int speed, int slaveaddr) { struct s3c24x0_i2c *i2c; #if !(defined CONFIG_EXYNOS4 || defined CONFIG_EXYNOS5) @@ -493,9 +486,15 @@ void i2c_init(int speed, int slaveadd) #endif } #endif /* #if !(defined CONFIG_EXYNOS4 || defined CONFIG_EXYNOS5) */ - i2c_ch_init(i2c, speed, slaveadd); + /* This will override the speed selected in the fdt for that port */ + debug("i2c_init(speed=%u, slaveaddr=0x%x)\n", speed, slaveaddr); + i2c_ch_init(i2c_bus->regs, speed, slaveaddr); } +static void exynos_i2c_init(struct i2c_adapter *adap, int speed, int sl
Re: [U-Boot] [PATCH] I2C:Zynq: Adapt this driver to the new model
Hello Michael, Am 26.09.2013 17:43, schrieb Michael Burr: Signed-off-by: Michael Burr Cc: Heiko Schocher Cc: Michal Simek --- === Note: this patch depends on the previous patch titled === "[PATCH] I2C: Zynq: Support for 0-length register address" === submitted 24 Sep. 2013. Tested on Xilinx ZC702 eval board: Select various I2C chips using TI PCA9548 bus multiplexer. Write and read registers with addresses of length 0 and 1. drivers/i2c/zynq_i2c.c | 108 ++-- 1 file changed, 67 insertions(+), 41 deletions(-) Could you please change the config define for this driver from CONFIG_ZYNQ_I2C to CONFIG_SYS_I2C_ZYNQ ? Also, adapt please all boards, which use this driver. and add a entry in README. Thanks! diff --git a/drivers/i2c/zynq_i2c.c b/drivers/i2c/zynq_i2c.c index 9cbd3e4..7972a59 100644 --- a/drivers/i2c/zynq_i2c.c +++ b/drivers/i2c/zynq_i2c.c @@ -7,6 +7,8 @@ * * Copyright (c) 2012-2013 Xilinx, Michal Simek * + * Copyright (c) 2013 Logic PD, Michael Burr + * * SPDX-License-Identifier: GPL-2.0+ */ @@ -64,18 +66,28 @@ struct zynq_i2c_registers { #define ZYNQ_I2C_FIFO_DEPTH 16 #define ZYNQ_I2C_TRANSFERT_SIZE_MAX 255 /* Controller transfer limit */ -#if defined(CONFIG_ZYNQ_I2C0) -# define ZYNQ_I2C_BASE ZYNQ_I2C_BASEADDR0 -#else -# define ZYNQ_I2C_BASE ZYNQ_I2C_BASEADDR1 -#endif - -static struct zynq_i2c_registers *zynq_i2c = - (struct zynq_i2c_registers *)ZYNQ_I2C_BASE; +static struct zynq_i2c_registers *i2c_select(struct i2c_adapter *adap) +{ + return adap->hwadapnr ? + /* Zynq PS I2C1 */ + (struct zynq_i2c_registers *)ZYNQ_I2C_BASEADDR1 : + /* Zynq PS I2C0 */ + (struct zynq_i2c_registers *)ZYNQ_I2C_BASEADDR0; +} /* I2C init called by cmd_i2c when doing 'i2c reset'. */ -void i2c_init(int requested_speed, int slaveadd) +static void zynq_i2c_init(struct i2c_adapter *adap, int speed, int slaveaddr) { + struct zynq_i2c_registers *zynq_i2c = i2c_select(adap); + + if (speed != 10) + debug("Warning: requested speed not supported.\n"); + if (slaveaddr) + debug("Warning: slave mode not supported.\n"); + + /* The following _assumes_ clock rate cpu_1x = 111 MHz */ + /* This could use improvement! Also see 'i2c_set_bus_speed' below */ + /* 111MHz / ( (3 * 17) * 22 ) = ~100KHz */ writel((16<< ZYNQ_I2C_CONTROL_DIV_B_SHIFT) | (2<< ZYNQ_I2C_CONTROL_DIV_A_SHIFT),&zynq_i2c->control); @@ -86,7 +98,7 @@ void i2c_init(int requested_speed, int slaveadd) } #ifdef DEBUG -static void zynq_i2c_debug_status(void) +static void zynq_i2c_debug_status(struct zynq_i2c_registers *zynq_i2c) { int int_status; int status; @@ -128,7 +140,7 @@ static void zynq_i2c_debug_status(void) #endif /* Wait for an interrupt */ -static u32 zynq_i2c_wait(u32 mask) +static u32 zynq_i2c_wait(struct zynq_i2c_registers *zynq_i2c, u32 mask) { int timeout, int_status; @@ -139,7 +151,7 @@ static u32 zynq_i2c_wait(u32 mask) break; } #ifdef DEBUG - zynq_i2c_debug_status(); + zynq_i2c_debug_status(zynq_i2c); #endif /* Clear interrupt status flags */ writel(int_status& mask,&zynq_i2c->interrupt_status); @@ -151,17 +163,19 @@ static u32 zynq_i2c_wait(u32 mask) * I2C probe called by cmd_i2c when doing 'i2c probe'. * Begin read, nak data byte, end. */ -int i2c_probe(u8 dev) +static int zynq_i2c_probe(struct i2c_adapter *adap, uint8_t chip) { + struct zynq_i2c_registers *zynq_i2c = i2c_select(adap); + /* Attempt to read a byte */ setbits_le32(&zynq_i2c->control, ZYNQ_I2C_CONTROL_CLR_FIFO | ZYNQ_I2C_CONTROL_RW); clrbits_le32(&zynq_i2c->control, ZYNQ_I2C_CONTROL_HOLD); writel(0xFF,&zynq_i2c->interrupt_status); - writel(dev,&zynq_i2c->address); + writel(chip,&zynq_i2c->address); writel(1,&zynq_i2c->transfer_size); - return (zynq_i2c_wait(ZYNQ_I2C_INTERRUPT_COMP | + return (zynq_i2c_wait(zynq_i2c, ZYNQ_I2C_INTERRUPT_COMP | ZYNQ_I2C_INTERRUPT_NACK)& ZYNQ_I2C_INTERRUPT_COMP) ? 0 : -ETIMEDOUT; } @@ -170,14 +184,18 @@ int i2c_probe(u8 dev) * I2C read called by cmd_i2c when doing 'i2c read' and by cmd_eeprom.c * Begin write, send address byte(s), begin read, receive data bytes, end. */ -int i2c_read(u8 dev, uint addr, int alen, u8 *data, int length) +static int zynq_i2c_read(struct i2c_adapter *adap, uint8_t chip, uint addr, +int alen, uint8_t *buffer, int len) { + struct zynq_i2c_registers *zynq_i2c; u32 status; u32 i = 0; - u8 *cur_data = data; + u8 *cur_data = buffer; + + zynq_i2c = i2c_select(adap); /* Check the hardware can handle the requested bytes */ - if ((length< 0) || (length> ZYNQ_I2C_TRANSFERT
Re: [U-Boot] [RFC] i2c_reloc_fixup fails on m68k
Hello Jens, Am 24.09.2013 09:41, schrieb Jens Scharsig: Hello Heiko, Hello Jens, I have a access violation problem with i2c_reloc_fixup on coldfire m68k systems. I found out, the i2c_reloc_fixup tries to relocate the adapter itself, but at this time i2c_adap_p is already relocated. Which toolchain? m68k-elf-gcc (Sourcery CodeBench Lite 2011.09-21) 4.6.1 Copyright (C) 2011 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Can anybody confirm this? Added Mike Frysinger, Sonic Zhang (for blackfin) Jason Jin (for m68k) and Macpaul Lin (for nds32) to Cc ... I think also m68k, backfin and nds32 systems are affected Sorry, I have no such system ... maybe you are the first who stepped in it ... I have only a m68k system, but only this tree arch's call i2c_reloc_fixup in this way. Any news here? @Jens: I want to add this patch in the new merge window, could you send a correct patch please, 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] Question about dfu flash rootfs image
Hello Bo, Am 12.10.2013 09:18, schrieb Bo Shen: Hi All, Now I am implementing DFU support on Atmel sama5d3xek board, when try to download rootfs image to NAND flash through DFU, we need to drop ffs from rootfs image. Do you use ubi or jffs2? In dfu_nand.c when it call nand_write_skip_bad() with flags as 0. However, I need to call nand_write_skip_bad() with flags at least with WITH_DROP_FFS set. Till now, I don't find any good solution to pass the parameter, except hard code it or through "#ifdef CONFIG_CMD_NAND_TRIMFFS" to set it. Any suggestions for it and any other solution? There was a discussion, how to reorganize the dfu_alt_info var, see: http://lists.denx.de/pipermail/u-boot/2013-July/158920.html I think, your question fits into this thread ... Currently, I think, you should add in drivers/dfu/dfu_nand.c:dfu_fill_entity_nand() a new "partdropffs" ? string, and set a marker like for "partubi" the dfu->data.nand.ubi var, and use this marker, where you need it ... 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 v5 2/8] ARM: add secure monitor handler to switchto non-secure state
Hi, Albert: >My apologies: I though you had meant "how to get the submission to go >into mainline", while you actually meant "how to get accepted >submissions" locally. > >Let me just add that if you want to (ir)regularly find out which code >has been accepted into mainline, there is no need to re-clone the >whole repository each time. Clone it once, then 'git fetch origin' >whenever you want to re-sync, that will only transfer what's new. Thanks a lot! Best wishes, ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v5 2/8] ARM: add secure monitor handler to switchto non-secure state
Hi tiger...@viatech.com.cn, On Mon, 14 Oct 2013 10:14:44 +0800, wrote: > Hi, Albert: > Thanks ! > I used cmd "git clone git://git.denx.de/u-boot.git " to get the master > source code. My apologies: I though you had meant "how to get the submission to go into mainline", while you actually meant "how to get accepted submissions" locally. Let me just add that if you want to (ir)regularly find out which code has been accepted into mainline, there is no need to re-clone the whole repository each time. Clone it once, then 'git fetch origin' whenever you want to re-sync, that will only transfer what's new. > Best wishes, Amicalement, -- Albert. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] kirkwood: ib62x0: use device tree and update config
On Sun, Oct 13, 2013 at 11:38 PM, Luka Perkov wrote: > Signed-off-by: Luka Perkov > --- > include/configs/ib62x0.h | 37 - > 1 file changed, 20 insertions(+), 17 deletions(-) > > diff --git a/include/configs/ib62x0.h b/include/configs/ib62x0.h > index 7fa0c53..90ed0fb 100644 > --- a/include/configs/ib62x0.h > +++ b/include/configs/ib62x0.h > @@ -23,9 +23,9 @@ > #define CONFIG_SKIP_LOWLEVEL_INIT /* disable board lowlevel_init */ > > /* > - * Machine type > + * Enable device tree support > */ > -#define CONFIG_MACH_TYPE MACH_TYPE_NAS6210 > +#define CONFIG_OF_LIBFDT I am not familiar with this platform, but couldn't you also keep CONFIG_MACH_TYPE ? This way people have the option to load both dt and non-dt kernels. Regards, Fabio Estevam ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] kirkwood: ib62x0: use device tree and update config
Signed-off-by: Luka Perkov --- include/configs/ib62x0.h | 37 - 1 file changed, 20 insertions(+), 17 deletions(-) diff --git a/include/configs/ib62x0.h b/include/configs/ib62x0.h index 7fa0c53..90ed0fb 100644 --- a/include/configs/ib62x0.h +++ b/include/configs/ib62x0.h @@ -23,9 +23,9 @@ #define CONFIG_SKIP_LOWLEVEL_INIT /* disable board lowlevel_init */ /* - * Machine type + * Enable device tree support */ -#define CONFIG_MACH_TYPE MACH_TYPE_NAS6210 +#define CONFIG_OF_LIBFDT /* * Compression configuration @@ -41,6 +41,7 @@ #define CONFIG_SYS_MVFS #include #define CONFIG_CMD_ENV +#define CONFIG_CMD_BOOTZ #define CONFIG_CMD_IDE #define CONFIG_CMD_MII #define CONFIG_CMD_NAND @@ -66,7 +67,7 @@ #define CONFIG_ENV_IS_NOWHERE #endif #define CONFIG_ENV_SIZE0x2 -#define CONFIG_ENV_OFFSET 0x8 +#define CONFIG_ENV_OFFSET 0xe /* * Default environment variables @@ -74,24 +75,26 @@ #define CONFIG_BOOTCOMMAND \ "setenv bootargs ${console} ${mtdparts} ${bootargs_root}; " \ "ubi part root; " \ - "ubifsmount ubi:root; " \ + "ubifsmount ubi:rootfs; " \ "ubifsload 0x80 ${kernel}; "\ - "ubifsload 0x110 ${initrd}; " \ - "bootm 0x80 0x110" - -#define CONFIG_MTDPARTS\ - "mtdparts=orion_nand:" \ - "0x8@0x0(uboot)," \ - "0x2@0x8(uboot_env)," \ - "-@0xa(root)\0" - -#define CONFIG_EXTRA_ENV_SETTINGS \ + "ubifsload 0x70 ${fdt}; " \ + "ubifsumount; " \ + "fdt addr 0x70 fdt resize; fdt chosen; "\ + "bootz 0x80 - 0x70" + +#define CONFIG_MTDPARTS \ + "mtdparts=orion_nand:" \ + "0xe@0x0(uboot)," \ + "0x2@0xe(uboot_env)," \ + "-@0x10(root)\0" + +#define CONFIG_EXTRA_ENV_SETTINGS \ "console=console=ttyS0,115200\0"\ "mtdids=nand0=orion_nand\0" \ "mtdparts="CONFIG_MTDPARTS \ - "kernel=/boot/uImage\0" \ - "initrd=/boot/uInitrd\0"\ - "bootargs_root=ubi.mtd=2 root=ubi0:root rootfstype=ubifs\0" + "kernel=/boot/zImage\0" \ + "fdt=/boot/ib62x0.dtb\0"\ + "bootargs_root=ubi.mtd=2 root=ubi0:rootfs rootfstype=ubifs rw\0" /* * Ethernet driver configuration -- 1.8.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v5 2/8] ARM: add secure monitor handler to switchto non-secure state
Hi, Albert: Thanks ! I used cmd "git clone git://git.denx.de/u-boot.git " to get the master source code. Best wishes, ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v14 09/10] arm64: board support of vexpress_aemv8a
From: David Feng Signed-off-by: David Feng Signed-off-by: Bhupesh Sharma --- board/armltd/vexpress64/Makefile | 27 + board/armltd/vexpress64/vexpress64.c | 50 + boards.cfg |1 + include/configs/vexpress_aemv8a.h| 191 ++ 4 files changed, 269 insertions(+) create mode 100644 board/armltd/vexpress64/Makefile create mode 100644 board/armltd/vexpress64/vexpress64.c create mode 100644 include/configs/vexpress_aemv8a.h diff --git a/board/armltd/vexpress64/Makefile b/board/armltd/vexpress64/Makefile new file mode 100644 index 000..f907c92 --- /dev/null +++ b/board/armltd/vexpress64/Makefile @@ -0,0 +1,27 @@ +# +# (C) Copyright 2000-2004 +# Wolfgang Denk, DENX Software Engineering, w...@denx.de. +# +# SPDX-License-Identifier: GPL-2.0+ +# + +include $(TOPDIR)/config.mk + +LIB= $(obj)lib$(BOARD).o + +COBJS := vexpress64.o + +SRCS := $(COBJS:.o=.c) +OBJS := $(addprefix $(obj),$(COBJS)) + +$(LIB):$(obj).depend $(OBJS) + $(call cmd_link_o_target, $(OBJS)) + +# + +# defines $(obj).depend target +include $(SRCTREE)/rules.mk + +sinclude $(obj).depend + +# diff --git a/board/armltd/vexpress64/vexpress64.c b/board/armltd/vexpress64/vexpress64.c new file mode 100644 index 000..dae18d4 --- /dev/null +++ b/board/armltd/vexpress64/vexpress64.c @@ -0,0 +1,50 @@ +/* + * (C) Copyright 2013 + * David Feng + * Sharma Bhupesh + * + * SPDX-License-Identifier:GPL-2.0+ + */ +#include +#include +#include +#include +#include +#include + +DECLARE_GLOBAL_DATA_PTR; + +int board_init(void) +{ + return 0; +} + +int dram_init(void) +{ + gd->ram_size = PHYS_SDRAM_1_SIZE; + return 0; +} + +int timer_init(void) +{ + return 0; +} + +/* + * Board specific reset that is system reset. + */ +void reset_cpu(ulong addr) +{ +} + +/* + * Board specific ethernet initialization routine. + */ +int board_eth_init(bd_t *bis) +{ + int rc = 0; +#ifdef CONFIG_SMC9 + rc = smc9_initialize(0, CONFIG_SMC9_BASE); +#endif + return rc; +} diff --git a/boards.cfg b/boards.cfg index 85143c6..6d3dd69 100644 --- a/boards.cfg +++ b/boards.cfg @@ -383,6 +383,7 @@ Active arm pxa- - vpac270 Active arm pxa- icpdas lp8x4x lp8x4x - Sergey Yanovich Active arm pxa- toradex - colibri_pxa270 - Marek Vasut Active arm sa1100 - - - jornada - Kristoffer Ericson +Active arm armv8 - armltd vexpress64 vexpress_aemv8a vexpress_aemv8a:ARM64 David Feng Active avr32 at32ap at32ap700x atmel - atngw100 - Haavard Skinnemoen Active avr32 at32ap at32ap700x atmel - atngw100mkii - Andreas Bießmann Active avr32 at32ap at32ap700x atmel atstk1000 atstk1002- Haavard Skinnemoen diff --git a/include/configs/vexpress_aemv8a.h b/include/configs/vexpress_aemv8a.h new file mode 100644 index 000..e93b00f --- /dev/null +++ b/include/configs/vexpress_aemv8a.h @@ -0,0 +1,191 @@ +/* + * Configuration for Versatile Express. Parts were derived from other ARM + * configurations. + * + * SPDX-License-Identifier:GPL-2.0+ + */ + +#ifndef __VEXPRESS_AEMV8A_H +#define __VEXPRESS_AEMV8A_H + +#define DEBUG + +#define CONFIG_REMAKE_ELF + +/*#define CONFIG_BOOTING_EL1*/ + +/*#define CONFIG_SYS_GENERIC_BOARD*/ + +#define CONFIG_SYS_NO_FLASH + +#define CONFIG_SUPPORT_RAW_INITRD + +/* Cache Definitions */ +#define CONFIG_SYS_DCACHE_OFF
Re: [U-Boot] [Patch v1 1/1] jffs2: change U_BOOT_CMD ls to fsls
Hello Wolfgang Denk, On Sat, Oct 12, 2013 at 11:38 AM, Wolfgang Denk wrote: > Dear Suriyan Ramasami, > > In message <1381366918-17590-1-git-send-email-suriya...@gmail.com> you wrote: >> multiple definitions of `_u_boot_list_2_cmd_2_ls' if CONFIG_CMD_JFFS2 >> and CONFIG_CMD_FS_GENERIC are defined. >> >> Signed-off-by: Suriyan Ramasami >> --- >> common/cmd_jffs2.c |2 +- >> 1 files changed, 1 insertions(+), 1 deletions(-) >> >> diff --git a/common/cmd_jffs2.c b/common/cmd_jffs2.c >> index bce0983..f38455f 100644 >> --- a/common/cmd_jffs2.c >> +++ b/common/cmd_jffs2.c >> @@ -606,7 +606,7 @@ U_BOOT_CMD( >> " with offset 'off'" >> ); >> U_BOOT_CMD( >> - ls, 2, 1, do_jffs2_ls, >> + fsls, 2, 1, do_jffs2_ls, > > This makes no sense to me. Either we mimick Unix style, then the > command name shouldbe "ls' (where else but in a file system could you > LiSt files?); or we implement file system specific commands, than the > name of the file system should be recognizable. > > I think your problem should be fixed differently (such that "ls" also > works with JFFS2). > I think I haven't defined the problem properly. I am sure you know about the below, but am just reemphasizing so we could discuss the issue. The macro U_BOOT_CMD maps the user invocable commands at the u-boot prompt to actual function calls. For example, looking at common/cmd_ext4.c It defines the below: ext4ls maps to do_ext4_ls() ext4load maps to do_ext4_load() etc. Looking at the CMD_SYS_FS_GENERIC (common/cmd_fs.c) implementation which works with the u-boot commands ls and load as follows: ls maps to do_ls_wrapper() load maps to do_load_wrapper() Looking at CONFIG_CMD_JFFS2 with comman/cmd_jffs2.c, we see that it defines the u-boot commands ls, fsinfo and fsload as follows: ls maps to do_jffs_fsload() fsload maps to do_jffs_fsload() fsinfo maps to do_jffs2_fsinfo() Firstly, this is a little inconsistent in the u-boot command name, namely, ls is for ls of jffs fs, but the load and info commands have an fs prefix - fsload, fsinfo. Hence, we are left with two u-boot commands with the same name - ls, one for jffs2 and the other for fs.c leading to the linking issue. > > 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 > backups: always in season, never out of style. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [RFC PATCH] usb: dfu: make nand upload working
Dear Lukasz Majewski, > On Sat, 12 Oct 2013 15:47:14 +0800 > > Bo Shen wrote: > > If won't pass value to dfu->r_left, it always 0, make no transfer, > > the dfu-util on host side report failed. So, before starting transfer, > > pass the value, then nand uploading can work. > > > > Signed-off-by: Bo Shen > > > > --- > > > > drivers/dfu/dfu.c |1 + > > 1 file changed, 1 insertion(+) > > > > diff --git a/drivers/dfu/dfu.c b/drivers/dfu/dfu.c > > index 56b21c7..3c3ad1b 100644 > > --- a/drivers/dfu/dfu.c > > +++ b/drivers/dfu/dfu.c > > @@ -274,6 +274,7 @@ int dfu_read(struct dfu_entity *dfu, void *buf, > > int size, int blk_seq_num) if (dfu->i_buf_start == NULL) > > > > return -ENOMEM; > > > > + dfu->r_left = dfu->data.nand.size; > > Please do not add nand related code to "generic" DFU code. This can > damage DFU operation with other memories (like eMMC). > > Such code shall be added to dfu_nand.c file. > ACK, waiting for V2. Lukasz, do you have a suggestion where this should be placed and why is this an actual issue? Best regards, Marek Vasut ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] ARM: mxs: Do not reconfigure FEC clock in FEC init
Hi, CCing Alexandre and Hector. Can you test please? > Do not reconfigure the FEC clock during board_eth_init(), otherwise > the FEC might have stability issues, refuse to autonegotiate link > entirely or even corrupt packets while indicating correct checksum > on them. Instead, move the FEC clock init to board_early_init_f(), > where all the other upstream clock are initialized and also make > sure there is proper stabilization delay. > > Signed-off-by: Marek Vasut > Cc: Fabio Estevam > Cc: Hector Palacios > Cc: Oliver Metz > Cc: Otavio Salvador > Cc: Stefano Babic > Cc: Tom Rini > --- > board/bluegiga/apx4devkit/apx4devkit.c | 10 -- > board/denx/m28evk/m28evk.c | 21 +++-- > board/freescale/mx28evk/mx28evk.c| 9 + > board/schulercontrol/sc_sps_1/sc_sps_1.c | 19 +++ > 4 files changed, 31 insertions(+), 28 deletions(-) > > NOTE: I'd like to get this into current release as it fixes a serious > issue I observe here on the MX28EVK (packets being corrupted on > long transfers initiated early after boot). Please test this and > report back ASAP. > > diff --git a/board/bluegiga/apx4devkit/apx4devkit.c > b/board/bluegiga/apx4devkit/apx4devkit.c index 08e79bd..044a182 100644 > --- a/board/bluegiga/apx4devkit/apx4devkit.c > +++ b/board/bluegiga/apx4devkit/apx4devkit.c > @@ -39,6 +39,10 @@ int board_early_init_f(void) > /* SSP0 clock at 96MHz */ > mxs_set_sspclk(MXC_SSPCLK0, 96000, 0); > > +#ifdef CONFIG_CMD_NET > + cpu_eth_init(NULL); > + udelay(1); > +#endif > return 0; > } > > @@ -79,12 +83,6 @@ int board_eth_init(bd_t *bis) > int ret; > struct eth_device *dev; > > - ret = cpu_eth_init(bis); > - if (ret) { > - printf("FEC MXS: Unable to init FEC clocks\n"); > - return ret; > - } > - > ret = fecmxc_initialize(bis); > if (ret) { > printf("FEC MXS: Unable to init FEC\n"); > diff --git a/board/denx/m28evk/m28evk.c b/board/denx/m28evk/m28evk.c > index 33d38cf..5065ee8 100644 > --- a/board/denx/m28evk/m28evk.c > +++ b/board/denx/m28evk/m28evk.c > @@ -26,6 +26,9 @@ DECLARE_GLOBAL_DATA_PTR; > */ > int board_early_init_f(void) > { > + struct mxs_clkctrl_regs *clkctrl_regs = > + (struct mxs_clkctrl_regs *)MXS_CLKCTRL_BASE; > + > /* IO0 clock at 480MHz */ > mxs_set_ioclk(MXC_IOCLK0, 48); > /* IO1 clock at 480MHz */ > @@ -36,6 +39,14 @@ int board_early_init_f(void) > /* SSP2 clock at 160MHz */ > mxs_set_sspclk(MXC_SSPCLK2, 16, 0); > > +#ifdef CONFIG_CMD_NET > + cpu_eth_init(NULL); > + clrsetbits_le32(&clkctrl_regs->hw_clkctrl_enet, > + CLKCTRL_ENET_TIME_SEL_MASK | CLKCTRL_ENET_CLK_OUT_EN, > + CLKCTRL_ENET_TIME_SEL_RMII_CLK); > + udelay(1); > +#endif > + > #ifdef CONFIG_CMD_USB > mxs_iomux_setup_pad(MX28_PAD_SSP2_SS1__USB1_OVERCURRENT); > mxs_iomux_setup_pad(MX28_PAD_AUART3_TX__GPIO_3_13 | > @@ -110,19 +121,9 @@ int fecmxc_mii_postcall(int phy) > > int board_eth_init(bd_t *bis) > { > - struct mxs_clkctrl_regs *clkctrl_regs = > - (struct mxs_clkctrl_regs *)MXS_CLKCTRL_BASE; > struct eth_device *dev; > int ret; > > - ret = cpu_eth_init(bis); > - if (ret) > - return ret; > - > - clrsetbits_le32(&clkctrl_regs->hw_clkctrl_enet, > - CLKCTRL_ENET_TIME_SEL_MASK | CLKCTRL_ENET_CLK_OUT_EN, > - CLKCTRL_ENET_TIME_SEL_RMII_CLK); > - > #if !defined(CONFIG_DENX_M28_V11) && !defined(CONFIG_DENX_M28_V10) > /* Reset the new PHY */ > gpio_direction_output(MX28_PAD_AUART2_RTS__GPIO_3_11, 0); > diff --git a/board/freescale/mx28evk/mx28evk.c > b/board/freescale/mx28evk/mx28evk.c index 5005fe2..2c93c44 100644 > --- a/board/freescale/mx28evk/mx28evk.c > +++ b/board/freescale/mx28evk/mx28evk.c > @@ -41,6 +41,11 @@ int board_early_init_f(void) > /* SSP2 clock at 160MHz */ > mxs_set_sspclk(MXC_SSPCLK2, 16, 0); > > +#ifdef CONFIG_CMD_NET > + cpu_eth_init(NULL); > + udelay(1); > +#endif > + > #ifdef CONFIG_CMD_USB > mxs_iomux_setup_pad(MX28_PAD_SSP2_SS1__USB1_OVERCURRENT); > mxs_iomux_setup_pad(MX28_PAD_AUART2_RX__GPIO_3_8 | > @@ -102,10 +107,6 @@ int board_eth_init(bd_t *bis) > struct eth_device *dev; > int ret; > > - ret = cpu_eth_init(bis); > - if (ret) > - return ret; > - > /* MX28EVK uses ENET_CLK PAD to drive FEC clock */ > writel(CLKCTRL_ENET_TIME_SEL_RMII_CLK | CLKCTRL_ENET_CLK_OUT_EN, > &clkctrl_regs->hw_clkctrl_enet); > diff --git a/board/schulercontrol/sc_sps_1/sc_sps_1.c > b/board/schulercontrol/sc_sps_1/sc_sps_1.c index 7f0b591..9d3c970 100644 > --- a/board/schulercontrol/sc_sps_1/sc_sps_1.c > +++ b/board/schulercontrol/sc_sps_1/sc_sps_1.c > @@ -26,6 +26,9 @@ DECLARE_GLOBAL_DATA_PTR; > */ > int board_early_init_f(voi
Re: [U-Boot] [PATCH v1] arm: remove unneeded symbol offsets and _TEXT_BASE
Hi Benoît, On Sun, 13 Oct 2013 17:00:25 +0200 (CEST), Benoît Thébaudeau wrote: > Hi Albert, > > On Sunday, October 13, 2013 9:10:28 AM, Albert ARIBAUD wrote: > > Remove the last uses of symbol offsets in ARM U-Boot. > > Remove some needless uses of _TEXT_BASE. > > Remove all _TEXT_BASE definitions. > > > > Signed-off-by: Albert ARIBAUD > > --- > > _TEXT_BASE was only used by ARM to allow resolution of > > symbol offsets, themselves only needed due to absolute > > relocations. > > > > In some places, _TEXT_BASE was locally defined only > > to provide a literal for CONFIG_SYS_TEXT_BASE when the > > latter could have been used directly. > > > > Sometimes even, _TEXT_BASE was defined but unused. > > > > Since all relocations in ARM are relative, offsets, > > _TEXT_BASE and CONFIG_SYS_SYM_OFFSETS can be completely > > removed, and their uses can be replaced with adequate > > use of compiler-generated symbols from sections.c file. > > [...] > > > diff --git a/arch/arm/cpu/arm1136/start.S b/arch/arm/cpu/arm1136/start.S > > index bd1e067..d15124b 100644 > > --- a/arch/arm/cpu/arm1136/start.S > > +++ b/arch/arm/cpu/arm1136/start.S > > [...] > > > @@ -295,7 +269,6 @@ cpu_init_crit: > > #ifdef CONFIG_SPL_BUILD > > .align 5 > > do_hang: > > - ldr sp, _TEXT_BASE /* use 32 words about stack */ > > bl hang/* hang and never return */ > > #else /* !CONFIG_SPL_BUILD */ > > .align 5 > > Is this change (and the same change in the other start.S files) safe? > > lib/hang.c/hang() may need a valid stack pointer because the functions that it > calls may use the stack. > > When the CPU lands in do_hang, it's because some exception occurred, which may > follow a situation having corrupted sp. If sp is corrupted, the CPU won't be > able to push the exception context onto the stack, but it might still be able > to > run the exception vector. > > Setting sp to *_TEXT_BASE was not great, but at least this provided a few > valid > words of RAM for the stack. Yes, there is a call to hang() which might or might not imply saving on the stack depending on code generation, and sp might be incorrect depending on the exception raised. I'll reintroduce the sp setting but use the runtime value of _start as stack top. As you say, not great but hey. > [...] > > > diff --git a/arch/arm/lib/board.c b/arch/arm/lib/board.c > > index 34f50b0..f8ac573 100644 > > --- a/arch/arm/lib/board.c > > +++ b/arch/arm/lib/board.c > > @@ -105,8 +105,8 @@ static int display_banner(void) > > { > > printf("\n\n%s\n\n", version_string); > > debug("U-Boot code: %08lX -> %08lX BSS: -> %08lX\n", > > - _TEXT_BASE, > > - _bss_start_ofs + _TEXT_BASE, _bss_end_ofs + _TEXT_BASE); > > + (ulong)&_start, > > + (ulong)&__bss_start, (ulong)&__bss_end); > > #ifdef CONFIG_MODEM_SUPPORT > > debug("Modem Support enabled\n"); > > #endif > > This hunk and all the other hunks using _TEXT_BASE in the same way will > introduce different resulting values than the original code for targets having > different build-time and run-time addresses. > > This is not too much of an issue for the debug() call here, but this may be > more > damaging for things like gd->reloc_off below. Indeed build-time and run-time values might be different. Normally, U-Boot starts by being loaded at its build-time address and run from there (or directly run there if from NOR). At that point, its build- and run-time addresses coincide. then we reach relocation. Then U-Boot runs from top of RAM, with a run-time address different from its build-time one, bu with all base-address-dependent locations fixed by relocation, so again, run-time and (relocated) build-time values are equal. IOW, this debug() line would use true build-time values if invoked before relocation, and actual run-time values after relocation, because the &symbol constructs would have relocation entries and thus be fixed during relocation. This does not preclude corner-case situations where some in-relocation code requires knowing both the pre- and post-relocation addresses of a symbol; usually it's a matter of looking at the "in-RAM" U-Boot image vs the "in-FLASH" U-Boot image, e.g. when relocating, we copy U-Bootfrom "source" to "destination" and then fix relocation using the "source" relocation table, because there is no "destination" relocation table. Normally these corner-case situations only arise near the relocation code itself. However, if e.g. some fields of this debug() call should be the "initial" addresses while the debug() is executed at "final" location, just point them to me. > > @@ -277,13 +277,13 @@ void board_init_f(ulong bootflag) > > > > memset((void *)gd, 0, sizeof(gd_t)); > > > > - gd->mon_len = _bss_end_ofs; > > + gd->mon_len = (ulong)&__bss_end - (ulong)_start; > > #ifdef CONFIG_OF_EMBED > > /* Get a pointer to the FDT */ > > gd->fdt_blob = _binary_dt_
[U-Boot] [PATCH] ARM: mxs: Do not reconfigure FEC clock in FEC init
Do not reconfigure the FEC clock during board_eth_init(), otherwise the FEC might have stability issues, refuse to autonegotiate link entirely or even corrupt packets while indicating correct checksum on them. Instead, move the FEC clock init to board_early_init_f(), where all the other upstream clock are initialized and also make sure there is proper stabilization delay. Signed-off-by: Marek Vasut Cc: Fabio Estevam Cc: Hector Palacios Cc: Oliver Metz Cc: Otavio Salvador Cc: Stefano Babic Cc: Tom Rini --- board/bluegiga/apx4devkit/apx4devkit.c | 10 -- board/denx/m28evk/m28evk.c | 21 +++-- board/freescale/mx28evk/mx28evk.c| 9 + board/schulercontrol/sc_sps_1/sc_sps_1.c | 19 +++ 4 files changed, 31 insertions(+), 28 deletions(-) NOTE: I'd like to get this into current release as it fixes a serious issue I observe here on the MX28EVK (packets being corrupted on long transfers initiated early after boot). Please test this and report back ASAP. diff --git a/board/bluegiga/apx4devkit/apx4devkit.c b/board/bluegiga/apx4devkit/apx4devkit.c index 08e79bd..044a182 100644 --- a/board/bluegiga/apx4devkit/apx4devkit.c +++ b/board/bluegiga/apx4devkit/apx4devkit.c @@ -39,6 +39,10 @@ int board_early_init_f(void) /* SSP0 clock at 96MHz */ mxs_set_sspclk(MXC_SSPCLK0, 96000, 0); +#ifdef CONFIG_CMD_NET + cpu_eth_init(NULL); + udelay(1); +#endif return 0; } @@ -79,12 +83,6 @@ int board_eth_init(bd_t *bis) int ret; struct eth_device *dev; - ret = cpu_eth_init(bis); - if (ret) { - printf("FEC MXS: Unable to init FEC clocks\n"); - return ret; - } - ret = fecmxc_initialize(bis); if (ret) { printf("FEC MXS: Unable to init FEC\n"); diff --git a/board/denx/m28evk/m28evk.c b/board/denx/m28evk/m28evk.c index 33d38cf..5065ee8 100644 --- a/board/denx/m28evk/m28evk.c +++ b/board/denx/m28evk/m28evk.c @@ -26,6 +26,9 @@ DECLARE_GLOBAL_DATA_PTR; */ int board_early_init_f(void) { + struct mxs_clkctrl_regs *clkctrl_regs = + (struct mxs_clkctrl_regs *)MXS_CLKCTRL_BASE; + /* IO0 clock at 480MHz */ mxs_set_ioclk(MXC_IOCLK0, 48); /* IO1 clock at 480MHz */ @@ -36,6 +39,14 @@ int board_early_init_f(void) /* SSP2 clock at 160MHz */ mxs_set_sspclk(MXC_SSPCLK2, 16, 0); +#ifdef CONFIG_CMD_NET + cpu_eth_init(NULL); + clrsetbits_le32(&clkctrl_regs->hw_clkctrl_enet, + CLKCTRL_ENET_TIME_SEL_MASK | CLKCTRL_ENET_CLK_OUT_EN, + CLKCTRL_ENET_TIME_SEL_RMII_CLK); + udelay(1); +#endif + #ifdef CONFIG_CMD_USB mxs_iomux_setup_pad(MX28_PAD_SSP2_SS1__USB1_OVERCURRENT); mxs_iomux_setup_pad(MX28_PAD_AUART3_TX__GPIO_3_13 | @@ -110,19 +121,9 @@ int fecmxc_mii_postcall(int phy) int board_eth_init(bd_t *bis) { - struct mxs_clkctrl_regs *clkctrl_regs = - (struct mxs_clkctrl_regs *)MXS_CLKCTRL_BASE; struct eth_device *dev; int ret; - ret = cpu_eth_init(bis); - if (ret) - return ret; - - clrsetbits_le32(&clkctrl_regs->hw_clkctrl_enet, - CLKCTRL_ENET_TIME_SEL_MASK | CLKCTRL_ENET_CLK_OUT_EN, - CLKCTRL_ENET_TIME_SEL_RMII_CLK); - #if !defined(CONFIG_DENX_M28_V11) && !defined(CONFIG_DENX_M28_V10) /* Reset the new PHY */ gpio_direction_output(MX28_PAD_AUART2_RTS__GPIO_3_11, 0); diff --git a/board/freescale/mx28evk/mx28evk.c b/board/freescale/mx28evk/mx28evk.c index 5005fe2..2c93c44 100644 --- a/board/freescale/mx28evk/mx28evk.c +++ b/board/freescale/mx28evk/mx28evk.c @@ -41,6 +41,11 @@ int board_early_init_f(void) /* SSP2 clock at 160MHz */ mxs_set_sspclk(MXC_SSPCLK2, 16, 0); +#ifdef CONFIG_CMD_NET + cpu_eth_init(NULL); + udelay(1); +#endif + #ifdef CONFIG_CMD_USB mxs_iomux_setup_pad(MX28_PAD_SSP2_SS1__USB1_OVERCURRENT); mxs_iomux_setup_pad(MX28_PAD_AUART2_RX__GPIO_3_8 | @@ -102,10 +107,6 @@ int board_eth_init(bd_t *bis) struct eth_device *dev; int ret; - ret = cpu_eth_init(bis); - if (ret) - return ret; - /* MX28EVK uses ENET_CLK PAD to drive FEC clock */ writel(CLKCTRL_ENET_TIME_SEL_RMII_CLK | CLKCTRL_ENET_CLK_OUT_EN, &clkctrl_regs->hw_clkctrl_enet); diff --git a/board/schulercontrol/sc_sps_1/sc_sps_1.c b/board/schulercontrol/sc_sps_1/sc_sps_1.c index 7f0b591..9d3c970 100644 --- a/board/schulercontrol/sc_sps_1/sc_sps_1.c +++ b/board/schulercontrol/sc_sps_1/sc_sps_1.c @@ -26,6 +26,9 @@ DECLARE_GLOBAL_DATA_PTR; */ int board_early_init_f(void) { + struct mxs_clkctrl_regs *clkctrl_regs = + (struct mxs_clkctrl_regs *)MXS_CLKCTRL_BASE; + /* IO0 clock at 480MHz */ mxs_set_ioclk(MXC_IOCLK0, 48); /* IO1 clock at 48
[U-Boot] [PATCH] .gitignore: add auto-generated /include/[s|t]pl-autoconf.mk
Signed-off-by: Daniel Schwierzeck --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 9069fff..869b1b8 100644 --- a/.gitignore +++ b/.gitignore @@ -70,6 +70,8 @@ /reloc_off /include/generated/ +/include/spl-autoconf.mk +/include/tpl-autoconf.mk asm-offsets.s # stgit generated dirs -- 1.8.3.2 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v1] arm: remove unneeded symbol offsets and _TEXT_BASE
Hi Albert, On Sunday, October 13, 2013 9:10:28 AM, Albert ARIBAUD wrote: > Remove the last uses of symbol offsets in ARM U-Boot. > Remove some needless uses of _TEXT_BASE. > Remove all _TEXT_BASE definitions. > > Signed-off-by: Albert ARIBAUD > --- > _TEXT_BASE was only used by ARM to allow resolution of > symbol offsets, themselves only needed due to absolute > relocations. > > In some places, _TEXT_BASE was locally defined only > to provide a literal for CONFIG_SYS_TEXT_BASE when the > latter could have been used directly. > > Sometimes even, _TEXT_BASE was defined but unused. > > Since all relocations in ARM are relative, offsets, > _TEXT_BASE and CONFIG_SYS_SYM_OFFSETS can be completely > removed, and their uses can be replaced with adequate > use of compiler-generated symbols from sections.c file. [...] > diff --git a/arch/arm/cpu/arm1136/start.S b/arch/arm/cpu/arm1136/start.S > index bd1e067..d15124b 100644 > --- a/arch/arm/cpu/arm1136/start.S > +++ b/arch/arm/cpu/arm1136/start.S [...] > @@ -295,7 +269,6 @@ cpu_init_crit: > #ifdef CONFIG_SPL_BUILD > .align 5 > do_hang: > - ldr sp, _TEXT_BASE /* use 32 words about stack */ > bl hang/* hang and never return */ > #else/* !CONFIG_SPL_BUILD */ > .align 5 Is this change (and the same change in the other start.S files) safe? lib/hang.c/hang() may need a valid stack pointer because the functions that it calls may use the stack. When the CPU lands in do_hang, it's because some exception occurred, which may follow a situation having corrupted sp. If sp is corrupted, the CPU won't be able to push the exception context onto the stack, but it might still be able to run the exception vector. Setting sp to *_TEXT_BASE was not great, but at least this provided a few valid words of RAM for the stack. [...] > diff --git a/arch/arm/lib/board.c b/arch/arm/lib/board.c > index 34f50b0..f8ac573 100644 > --- a/arch/arm/lib/board.c > +++ b/arch/arm/lib/board.c > @@ -105,8 +105,8 @@ static int display_banner(void) > { > printf("\n\n%s\n\n", version_string); > debug("U-Boot code: %08lX -> %08lX BSS: -> %08lX\n", > -_TEXT_BASE, > -_bss_start_ofs + _TEXT_BASE, _bss_end_ofs + _TEXT_BASE); > +(ulong)&_start, > +(ulong)&__bss_start, (ulong)&__bss_end); > #ifdef CONFIG_MODEM_SUPPORT > debug("Modem Support enabled\n"); > #endif This hunk and all the other hunks using _TEXT_BASE in the same way will introduce different resulting values than the original code for targets having different build-time and run-time addresses. This is not too much of an issue for the debug() call here, but this may be more damaging for things like gd->reloc_off below. > @@ -277,13 +277,13 @@ void board_init_f(ulong bootflag) > > memset((void *)gd, 0, sizeof(gd_t)); > > - gd->mon_len = _bss_end_ofs; > + gd->mon_len = (ulong)&__bss_end - (ulong)_start; > #ifdef CONFIG_OF_EMBED > /* Get a pointer to the FDT */ > gd->fdt_blob = _binary_dt_dtb_start; > #elif defined CONFIG_OF_SEPARATE > /* FDT is at end of image */ > - gd->fdt_blob = (void *)(_end_ofs + _TEXT_BASE); > + gd->fdt_blob = &_end; > #endif > /* Allow the early environment to override the fdt address */ > gd->fdt_blob = (void *)getenv_ulong("fdtcontroladdr", 16, > @@ -451,7 +451,7 @@ void board_init_f(ulong bootflag) > > gd->relocaddr = addr; > gd->start_addr_sp = addr_sp; > - gd->reloc_off = addr - _TEXT_BASE; > + gd->reloc_off = addr - (ulong)&_start; > debug("relocation Offset is: %08lx\n", gd->reloc_off); > if (new_fdt) { > memcpy(new_fdt, gd->fdt_blob, fdt_size); > @@ -516,7 +516,7 @@ void board_init_r(gd_t *id, ulong dest_addr) > gd->flags |= GD_FLG_RELOC; /* tell others: relocation done */ > bootstage_mark_name(BOOTSTAGE_ID_START_UBOOT_R, "board_init_r"); > > - monitor_flash_len = _end_ofs; > + monitor_flash_len = (ulong)&__rel_dyn_end - (ulong)_start; > > /* Enable caches */ > enable_caches(); [...] > diff --git a/common/board_f.c b/common/board_f.c > index 0ada1af..decd7f2 100644 > --- a/common/board_f.c > +++ b/common/board_f.c > @@ -149,13 +149,9 @@ static int display_text_info(void) > #ifndef CONFIG_SANDBOX > ulong bss_start, bss_end; > > -#ifdef CONFIG_SYS_SYM_OFFSETS > - bss_start = _bss_start_ofs + _TEXT_BASE; > - bss_end = _bss_end_ofs + _TEXT_BASE; > -#else > bss_start = (ulong)&__bss_start; > bss_end = (ulong)&__bss_end; > -#endif > + > debug("U-Boot code: %08X -> %08lX BSS: -> %08lX\n", > CONFIG_SYS_TEXT_BASE, bss_start, bss_end); > #endif Same comment as above regarding the use of _TEXT_BASE, except that here we want to use the runtime addresses, so the new code is more correct than the original one, and this change is hence fine. > @@ -275,8 +271,8 @@ static i
Re: [U-Boot] How/Where does "_start" get assigned a value ?
On Thu, Oct 10, 2013 at 17:37 +0200, Gerhard Sittig wrote: > > On Wed, Oct 09, 2013 at 09:07 -0700, djoker wrote: > > > > I have a armv7 board and am looking at the "_start" symbol address, using > > the following command: > > *nm u-boot | grep -w _start* > > > > It returned the following: > > *6720 T _start* > > > > I couldn't help notice that the the _start value is very "close" in vlaue to > > the value of CONFIG_SYS_TEXT_BASE defined in my board file: > > *#define CONFIG_SYS_TEXT_BASE 0x6704* Something else bubbled up in my mind: Your text base address (ending in ...04) is rather odd, and does not at all fit the expectation of those ARMv7 CPUs which mainline U-Boot supports (that is: Cortex-A, i.e. traditional ARM). Your "armv7 board" isn't by any chance an ARMv7-M variant, meaning that mainline U-Boot does not support it? And more importantly that the vector table "preamble" might get setup in different ways than what is done for ARMv7-A. ISTR that on v7-m the stack top is the first entry, and the reset vector is only the second entry in the table, and the number and meaning of vectors may differ from v7-a. You really should tell us more than "an armv7 board" if you want to receive more specific help. And about your code base (version and origin), as none of the boards in current 'master' has a reference to a '6700' number (except for leon, which is SPARC). > As with any ARM based CPU, I'd expect the "executable" to start > with a vector table, before the actual body of the start() > routine follows. > > The "reset vector" only has a few bytes in the vector table, and > should consist of a branch to the actual initialization code. > > So I'd rather be baffled if the _start symbol would reside at the > very start of the binary, since it then would clobber all the > vectors. For the record: Here I was wrong, having not looked at the start.S source code. The layout is similar but the names are different from what I said: '_start' _is_ the very first symbol in start.S, and marks the start of the vector table (the entry point). 'reset' is the name of the init routine (the actual code which does something), and the reset vector (residing at the _start address) directly branches to the reset() label. Optionally the start.S file may have dummy or default handlers, which then are located between the vector table and the reset() init routine. Reset vectors may not directly encode target addresses but could need intermediate data as well which usually follows the vector table. So the 'reset' label need not be at offset 0x20. As has been written elsewhere, the linker script specifies that start.o is the first file to load, and thus the _start symbol should be at the very start of the text section. But notice that linker script specs can get overridden at the command line, so you should check that in the build progress output as well. And build instructions optionally may add more build steps after linking the executable (format conversion, checksum stamps, padding, containers/envelopes). virtually yours Gerhard Sittig -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr. 5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: off...@denx.de ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 2/2] Enable btrfs support in mx53loco config
Enable btrfs support in mx53loco config Signed-off-by: Adnan Ali --- include/configs/mx53loco.h |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/configs/mx53loco.h b/include/configs/mx53loco.h index a4b610f..bf361a3 100644 --- a/include/configs/mx53loco.h +++ b/include/configs/mx53loco.h @@ -56,6 +56,8 @@ #define CONFIG_GENERIC_MMC #define CONFIG_CMD_FAT #define CONFIG_CMD_EXT2 +#define CONFIG_CMD_BTR +#define CONFIG_CMD_FS_GENERIC #define CONFIG_DOS_PARTITION /* Eth Configs */ @@ -128,7 +130,7 @@ "mmcroot=/dev/mmcblk0p3 rw rootwait\0" \ "mmcargs=setenv bootargs console=ttymxc0,${baudrate} root=${mmcroot}\0" \ "loadbootscript=" \ - "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \ + "load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \ "bootscript=echo Running bootscript from mmc ...; " \ "source\0" \ "loaduimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${uimage}\0" \ -- 1.7.9.5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 1/2] Introduced btrfs file-system with btrload command
Introduces btrfs file-system to read file from volume/sub-volumes with btrload command. This implementation has read-only support. This btrfs implementation is based on syslinux btrfs code. v13: Added pre-calculated crc for BE & LE v11: Mirro super block check. v10: patch problem reworked. v5: merged with master. v4: btrls command added. [port of syslinux commit 269ebc845ebc8b46ef4b0be7fa0005c7fdb95b8d] Signed-off-by: Adnan Ali --- Makefile |1 + common/Makefile|1 + common/cmd_btr.c | 65 +++ fs/btrfs/Makefile | 51 ++ fs/btrfs/btrfs.c | 1336 fs/fs.c| 10 + include/btrfs.h| 417 ++ include/config_fallbacks.h |4 + include/crc.h |5 + include/fs.h |1 + lib/Makefile |1 + lib/crc32_c.c | 108 12 files changed, 2000 insertions(+) create mode 100644 common/cmd_btr.c create mode 100644 fs/btrfs/Makefile create mode 100644 fs/btrfs/btrfs.c create mode 100644 include/btrfs.h create mode 100644 lib/crc32_c.c diff --git a/Makefile b/Makefile index 55bd55c..bd7981d 100644 --- a/Makefile +++ b/Makefile @@ -257,6 +257,7 @@ endif LIBS-$(CONFIG_OF_EMBED) += dts/libdts.o LIBS-y += arch/$(ARCH)/lib/lib$(ARCH).o LIBS-y += fs/libfs.o \ + fs/btrfs/libbtrfs.o \ fs/cbfs/libcbfs.o \ fs/cramfs/libcramfs.o \ fs/ext4/libext4fs.o \ diff --git a/common/Makefile b/common/Makefile index 719fc23..d1fae56 100644 --- a/common/Makefile +++ b/common/Makefile @@ -73,6 +73,7 @@ COBJS-$(CONFIG_CMD_BEDBUG) += bedbug.o cmd_bedbug.o COBJS-$(CONFIG_CMD_BMP) += cmd_bmp.o COBJS-$(CONFIG_CMD_BOOTLDR) += cmd_bootldr.o COBJS-$(CONFIG_CMD_BOOTSTAGE) += cmd_bootstage.o +COBJS-$(CONFIG_CMD_BTR) += cmd_btr.o COBJS-$(CONFIG_CMD_CACHE) += cmd_cache.o COBJS-$(CONFIG_CMD_CBFS) += cmd_cbfs.o COBJS-$(CONFIG_CMD_CONSOLE) += cmd_console.o diff --git a/common/cmd_btr.c b/common/cmd_btr.c new file mode 100644 index 000..e22154d --- /dev/null +++ b/common/cmd_btr.c @@ -0,0 +1,65 @@ +/* + * (C) Copyright 2013 Codethink Limited + * Btrfs port to Uboot by + * Adnan Ali + * 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 + */ + +/* + * Boot support + */ +#include +#include + +char subvolname[BTRFS_MAX_SUBVOL_NAME]; + +int do_btr_fsload(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +{ + if (argc > 5) + strcpy(subvolname, argv[5]); + else + subvolname[0] = '\0'; + + return do_load(cmdtp, flag, argc, argv, FS_TYPE_BTR, 16); +} + + +U_BOOT_CMD( +btrload,7, 0, do_btr_fsload, + "load binary file from a btr filesystem", + " [][subvol_name]\n" + "- Load binary file 'filename' from 'dev' on 'interface'\n" + " to address 'addr' from better filesystem.\n" + " the load stops on end of file.\n" + " subvol_name is used read that file from this subvolume.\n" + " All numeric parameters are assumed to be hex." +); + +static int do_btr_ls(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +{ + return do_ls(cmdtp, flag, argc, argv, FS_TYPE_BTR); +} + +U_BOOT_CMD( + btrls, 4, 1, do_btr_ls, + "list files in a directory (default /)", + " [] [directory]\n" + "- list files from 'dev' on 'interface' in a 'directory'" +); + diff --git a/fs/btrfs/Makefile b/fs/btrfs/Makefile new file mode 100644 index 000..a9e2021 --- /dev/null +++ b/fs/btrfs/Makefile @@ -0,0 +1,51 @@ +# +# (C) Copyright 2006 +# Wolfgang Denk, DENX Software Engineering, w...@denx.de. +# +# (C) Copyright 2003 +# Pavel Bartusek, Sysgo Real-Time Solutions AG, p...@sysgo.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, +# b
Re: [U-Boot] [PATCH v1] arm: remove unneeded symbol offsets and _TEXT_BASE
On Sun, 13 Oct 2013 09:10:28 +0200, Albert ARIBAUD wrote: > Remove the last uses of symbol offsets in ARM U-Boot. > Remove some needless uses of _TEXT_BASE. > Remove all _TEXT_BASE definitions. > > Signed-off-by: Albert ARIBAUD > --- > _TEXT_BASE was only used by ARM to allow resolution of > symbol offsets, themselves only needed due to absolute > relocations. > > In some places, _TEXT_BASE was locally defined only > to provide a literal for CONFIG_SYS_TEXT_BASE when the > latter could have been used directly. > > Sometimes even, _TEXT_BASE was defined but unused. > > Since all relocations in ARM are relative, offsets, > _TEXT_BASE and CONFIG_SYS_SYM_OFFSETS can be completely > removed, and their uses can be replaced with adequate > use of compiler-generated symbols from sections.c file. Of course, I've done some non-regression testing before submitting, but this should undergo heavier testing by people with various ARM hardware. Considering the changes, checks should concentrate on: - monitor_flash_len; - gd fields mon_len, fdt_blob, and reloc_off; - targets the lowlevel_init.S of which was moified. Also note two things I've noticed only after posting v1: > diff --git a/README b/README > index 0bb1ad5..1f9e16f 100644 > --- a/README > +++ b/README > @@ -3522,12 +3522,6 @@ Configuration Settings: > its config.mk file). If you find problems enabling this option on > your board please report the problem and send patches! > > -- CONFIG_SYS_SYM_OFFSETS > - This is set by architectures that use offsets for link symbols > - instead of absolute values. So bss_start is obtained using an > - offset _bss_start_ofs from CONFIG_SYS_TEXT_BASE, rather than > - directly. You should not need to touch this setting. The removal of CONFIG_SYS_SYM_OFFSETS from the codebase is not mentioned in the commit message. Will add in v2. > diff --git a/arch/arm/cpu/arm926ejs/at91/lowlevel_init.S > b/arch/arm/cpu/arm926ejs/at91/lowlevel_init.S > index 39de2f4..7d1a633 100644 > --- a/arch/arm/cpu/arm926ejs/at91/lowlevel_init.S > +++ b/arch/arm/cpu/arm926ejs/at91/lowlevel_init.S > @@ -26,27 +26,18 @@ > #define CONFIG_SYS_MATRIX_EBICSA_VAL CONFIG_SYS_MATRIX_EBI0CSA_VAL > #endif > > -_TEXT_BASE: > - .word CONFIG_SYS_TEXT_BASE > - > .globl lowlevel_init > .type lowlevel_init,function > lowlevel_init: > > - mov r5, pc /* r5 = POS1 + 4 current */ > POS1: > + adr r5, POS1/* r5 = POS1 run time */ > ldr r0, =POS1 /* r0 = POS1 compile */ This could in fact use the existing lowlevel_init label rather than introduce POS1 for this purpose. Will fix in v2. Amicalement, -- Albert. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v1] arm: remove unneeded symbol offsets and _TEXT_BASE
Remove the last uses of symbol offsets in ARM U-Boot. Remove some needless uses of _TEXT_BASE. Remove all _TEXT_BASE definitions. Signed-off-by: Albert ARIBAUD --- _TEXT_BASE was only used by ARM to allow resolution of symbol offsets, themselves only needed due to absolute relocations. In some places, _TEXT_BASE was locally defined only to provide a literal for CONFIG_SYS_TEXT_BASE when the latter could have been used directly. Sometimes even, _TEXT_BASE was defined but unused. Since all relocations in ARM are relative, offsets, _TEXT_BASE and CONFIG_SYS_SYM_OFFSETS can be completely removed, and their uses can be replaced with adequate use of compiler-generated symbols from sections.c file. README | 6 -- arch/arm/cpu/arm1136/start.S| 27 --- arch/arm/cpu/arm1176/start.S| 27 --- arch/arm/cpu/arm720t/start.S| 26 -- arch/arm/cpu/arm920t/start.S| 26 -- arch/arm/cpu/arm926ejs/at91/lowlevel_init.S | 14 +- arch/arm/cpu/arm926ejs/mxs/start.S | 27 --- arch/arm/cpu/arm926ejs/start.S | 27 --- arch/arm/cpu/arm946es/start.S | 26 -- arch/arm/cpu/arm_intcm/start.S | 26 -- arch/arm/cpu/armv7/omap3/lowlevel_init.S| 3 --- arch/arm/cpu/armv7/start.S | 23 --- arch/arm/cpu/ixp/start.S| 26 -- arch/arm/cpu/pxa/start.S| 27 --- arch/arm/cpu/sa1100/start.S | 26 -- arch/arm/lib/board.c| 12 ++-- board/armltd/integrator/lowlevel_init.S | 2 +- board/cm4008/flash.c| 2 +- board/cm41xx/flash.c| 2 +- board/mpl/vcma9/lowlevel_init.S | 5 + board/mx1ads/lowlevel_init.S| 4 board/samsung/goni/lowlevel_init.S | 3 --- board/samsung/smdk2410/lowlevel_init.S | 5 + board/samsung/smdk5250/lowlevel_init.S | 5 + board/samsung/smdkc100/lowlevel_init.S | 3 --- board/ti/omap5912osk/lowlevel_init.S| 4 board/ti/omap730p2/lowlevel_init.S | 3 --- common/board_f.c| 18 +++--- common/board_r.c| 4 ++-- include/asm-generic/sections.h | 26 +++--- 30 files changed, 29 insertions(+), 406 deletions(-) diff --git a/README b/README index 0bb1ad5..1f9e16f 100644 --- a/README +++ b/README @@ -3522,12 +3522,6 @@ Configuration Settings: its config.mk file). If you find problems enabling this option on your board please report the problem and send patches! -- CONFIG_SYS_SYM_OFFSETS - This is set by architectures that use offsets for link symbols - instead of absolute values. So bss_start is obtained using an - offset _bss_start_ofs from CONFIG_SYS_TEXT_BASE, rather than - directly. You should not need to touch this setting. - - CONFIG_OMAP_PLATFORM_RESET_TIME_MAX_USEC (OMAP only) This is set by OMAP boards for the max time that reset should be asserted. See doc/README.omap-reset-time for details on how diff --git a/arch/arm/cpu/arm1136/start.S b/arch/arm/cpu/arm1136/start.S index bd1e067..d15124b 100644 --- a/arch/arm/cpu/arm1136/start.S +++ b/arch/arm/cpu/arm1136/start.S @@ -70,32 +70,6 @@ _end_vect: * */ -.globl _TEXT_BASE -_TEXT_BASE: -#if defined(CONFIG_SPL_BUILD) && defined(CONFIG_SPL_TEXT_BASE) - .word CONFIG_SPL_TEXT_BASE -#else - .word CONFIG_SYS_TEXT_BASE -#endif - -/* - * These are defined in the board-specific linker script. - * Subtracting _start from them lets the linker put their - * relative position in the executable instead of leaving - * them null. - */ -.globl _bss_start_ofs -_bss_start_ofs: - .word __bss_start - _start - -.globl _bss_end_ofs -_bss_end_ofs: - .word __bss_end - _start - -.globl _end_ofs -_end_ofs: - .word _end - _start - #ifdef CONFIG_USE_IRQ /* IRQ stack memory (calculated at run-time) */ .globl IRQ_STACK_START @@ -295,7 +269,6 @@ cpu_init_crit: #ifdef CONFIG_SPL_BUILD .align 5 do_hang: - ldr sp, _TEXT_BASE /* use 32 words about stack */ bl hang/* hang and never return */ #else /* !CONFIG_SPL_BUILD */ .align 5 diff --git a/arch/arm/cpu/arm1176/start.S b/arch/arm/cpu/arm1176/start.S index ffd7dd0..ce62011 100644 --- a/arch/arm/cpu/arm1176/start.S +++ b/arch/arm/cpu/arm1176/start.S @@ -77,33 +77,6 @@ _end_vect: ***
[U-Boot] [PATCH v1] patman: add Series-commit-notes tag and section
Sometimes a commit should have notes enclosed with it rather than withing the cover letter -- possibly even because there is no cover letter. Add 'Series-commit-notes' tag, similar to 'Series-notes'; lines between this tag and the next END line are inserted in the patch right after the '---' separator line. Signed-off-by: Albert ARIBAUD --- tools/patman/commit.py | 2 ++ tools/patman/patchstream.py | 7 +-- tools/patman/series.py | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/tools/patman/commit.py b/tools/patman/commit.py index 900cfb3..89cce7f 100644 --- a/tools/patman/commit.py +++ b/tools/patman/commit.py @@ -21,6 +21,7 @@ class Commit: changes: Dict containing a list of changes (single line strings). The dict is indexed by change version (an integer) cc_list: List of people to aliases/emails to cc on this commit +notes: List of lines in the commit (not series) notes """ def __init__(self, hash): self.hash = hash @@ -28,6 +29,7 @@ class Commit: self.tags = [] self.changes = {} self.cc_list = [] +self.notes = [] def AddChange(self, version, info): """Add a new change line to the change list for a version. diff --git a/tools/patman/patchstream.py b/tools/patman/patchstream.py index c204523..4c20144 100644 --- a/tools/patman/patchstream.py +++ b/tools/patman/patchstream.py @@ -84,7 +84,7 @@ class PatchStream: name: Tag name (part after 'Series-') value: Tag value (part after 'Series-xxx: ') """ -if name == 'notes': +if (name == 'notes' or name == 'commit-notes'): self.in_section = name self.skip_blank = False if self.is_log: @@ -165,6 +165,9 @@ class PatchStream: elif self.in_section == 'notes': if self.is_log: self.series.notes += self.section +elif self.in_section == 'commit-notes': +if self.is_log: +self.commit.notes += self.section else: self.warn.append("Unknown section '%s'" % self.in_section) self.in_section = None @@ -276,7 +279,7 @@ class PatchStream: out = [] log = self.series.MakeChangeLog(self.commit) out += self.FormatTags(self.tags) -out += [line] + log +out += [line] + self.commit.notes + [''] + log elif self.found_test: if not re_allowed_after_test.match(line): self.lines_after_test += 1 diff --git a/tools/patman/series.py b/tools/patman/series.py index 88c0d87..5eeb452 100644 --- a/tools/patman/series.py +++ b/tools/patman/series.py @@ -12,7 +12,7 @@ import terminal # Series-xxx tags that we understand valid_series = ['to', 'cc', 'version', 'changes', 'prefix', 'notes', 'name', -'cover-cc', 'process_log'] +'cover-cc', 'process_log', 'commit_notes'] class Series(dict): """Holds information about a patch series, including all tags. -- 1.8.3.2 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot