[U-Boot] uboot.lds
Hi, When I read the scource of uboot 1.1.6,I find . = .; in the file of \board\smdk2410\u-boot.lds. I can't understand why . = .; is here.why not . = ALIGN(4);? what does . = .; mean? ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] tps6586x: staticize funtions
Hi Tom, On Thu, Apr 24, 2014 at 8:55 AM, Manish Badarkhe badarkhe.man...@gmail.com wrote: Make funtions static which are locally used in file. Signed-off-by: Manish Badarkhe badarkhe.man...@gmail.com --- :100644 100644 704c243... d29d969... M drivers/power/tps6586x.c drivers/power/tps6586x.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/power/tps6586x.c b/drivers/power/tps6586x.c index 704c243..d29d969 100644 --- a/drivers/power/tps6586x.c +++ b/drivers/power/tps6586x.c @@ -32,7 +32,7 @@ enum { }; #define MAX_I2C_RETRY 3 -int tps6586x_read(int reg) +static int tps6586x_read(int reg) { int i; uchar data; @@ -61,7 +61,7 @@ exit: return retval; } -int tps6586x_write(int reg, uchar *data, uint len) +static int tps6586x_write(int reg, uchar *data, uint len) { int i; int retval = -1; -- 1.7.10.4 Please provide your comments on this patch. Thanks Manish Badarkhe ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] Mainline u-boot SPL for socfpga
On Thu, May 8, 2014 at 10:24 PM, Chin Liang See cl...@altera.com wrote: Hi Charles, On Tue, 2014-05-06 at 12:22 +1200, Charles Manning wrote: Hello I am trying to understand the state of the socfpga preloader in mainline u-boot. From what I see, this is broken and perhaps has never worked. When I build the code in u-boot-socfpga I get a healthy working u-boot-spl.bin of approx 45kbytes. When I build the mainline u-boot code I get a broken u-boot-spl.bin of approx 3kbytes. It seems the mainline u-boot is missing stuff, including the all-critical sdram initialisation without which the SPL is useless. As of now, we have most of the drivers already upstreamed to main line. The missing piece here are the SDRAM driver. The SDRAM driver poses a big challenge as its now licensed under BSD-3 clause. I am still working with legal team to look into potential to make it GPL license. So, I have a few related questions: 1. The SDRAM init code, like other SocFPGA hand-off files is generated by the Altera tools. Since it is not hand written, and is not compliant with u-boot coding style. Is it more important to preserve coding style and have a broken SPL than it is to have a working SPL and broken code? The SDRAM handoff files generated by tools is not compliance as the original code developer doesn't familiar with open source world. But if you look into the SDRAM handoff files within rocketboard.org git, the existing code already updated. I enhanced the code to ensure it meet with basic coding standard. But further enhancement is needed and on-going now. What is really needed is that the hand-off files are actually generated as compliant code. Enhancing and hand-editing then checking in machine generated code is a broken work-flow because: 1) It has to be redone every time the code is regenerated. 2) There are so many changes that it is impossible to check for errors and diff for changes. 2. Is there a practical half-way compromise whereby the generated code is run through lindent and we just accept that this is as good as it gets? The on-going plan now is to use the enhanced SDRAM handoff file at rocketboard.org. From there, we want to streamline the driver by removing unused code. Once its ready, we will upstream this file. That might work if it is a once-off exercise that places the sdram code in arch/arm/cpu/armv7/socfpga The only stuff that should really be in a board/xxx directory is board-specific stuff and tuning files. In other words: * sequence.c (a file of over 11000 lines of C code) should be in arch/.../scofpga * sequencer_auto_ac_init.c (300 lines of board-specific register config values) should be in board/.../socfpga 3. Can we get some sort of coding style waiver, considering that this code is off in a board file and does not impact on anyone working on anything other than socfpga (indeed nobody even working on socfpga even reads it). Clearly significant hand editing generated code makes for a very broken workflow, but running it through an automated step like lindent is Ok from a workflow point of view. Unless this can be resolved we end up with a situation where people working on SocFPGA are forced to fork for practical reasons. I believe it would be tough to get the waiver. Nevertheless, we are further enhancing the handoff files to a state which is good for upstreaming. At same time, I am also working with tools team to ensure all these enhancement is putting back to original code. Maybe splitting the code better as I suggest above would make this far simpler. If the board specific part of the hand-offs is reduced to just header files and register config tables, then it is a trivial matter to run them through an extra **automated** step to produce a compliant file. Apart from gaining the mainstreaming, this would also make it far easier to create configs for different boards (eg. sockit board would just become a few hundred lines of register configs and not 13 thousand lines of code - most of that duplicated between platforms). Regards Charles ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 2/2] kbuild: add missing PERL definition
checkstack target uses $(PERL) so PERL must be defined. Signed-off-by: Masahiro Yamada yamad...@jp.panasonic.com --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 1c8af3f..9b5c9d6 100644 --- a/Makefile +++ b/Makefile @@ -354,6 +354,7 @@ STRIP = $(CROSS_COMPILE)strip OBJCOPY= $(CROSS_COMPILE)objcopy OBJDUMP= $(CROSS_COMPILE)objdump AWK= awk +PERL = perl DTC= dtc CHECK = sparse @@ -375,7 +376,7 @@ export VERSION PATCHLEVEL SUBLEVEL UBOOTRELEASE UBOOTVERSION export ARCH CPU BOARD VENDOR SOC CPUDIR BOARDDIR export CONFIG_SHELL HOSTCC HOSTCFLAGS HOSTLDFLAGS CROSS_COMPILE AS LD CC export CPP AR NM LDR STRIP OBJCOPY OBJDUMP -export MAKE AWK +export MAKE AWK PERL export DTC CHECK CHECKFLAGS export KBUILD_CPPFLAGS NOSTDINC_FLAGS UBOOTINCLUDE OBJCOPYFLAGS LDFLAGS -- 1.8.3.2 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 0/2] kbuild - trivial fixes
Masahiro Yamada (2): kbuild: remove unused RANLIB kbuild: add missing PERL definition Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 1.8.3.2 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 1/2] kbuild: remove unused RANLIB
RANLIB was added by commit e221174 (more than a decade ago) but it has been never referenced at all. Signed-off-by: Masahiro Yamada yamad...@jp.panasonic.com --- Makefile | 1 - 1 file changed, 1 deletion(-) diff --git a/Makefile b/Makefile index 9ff9e23..1c8af3f 100644 --- a/Makefile +++ b/Makefile @@ -354,7 +354,6 @@ STRIP = $(CROSS_COMPILE)strip OBJCOPY= $(CROSS_COMPILE)objcopy OBJDUMP= $(CROSS_COMPILE)objdump AWK= awk -RANLIB = $(CROSS_COMPILE)RANLIB DTC= dtc CHECK = sparse -- 1.8.3.2 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH v2] zynq: treat ps7_init.c/h as external files to ignore them
ps7_init.c and ps7_init.h are supposed to be exported by hw project and copied to board/xilinx/zynq/ directory. We want them to be ignored by git. So what we should do is to always treat them as external files rather than replacing ps7_init.c This commit does: - Move a weak function ps7_init() to arch/arm/cpu/armv7/zynq/spl.c and delete board/xilinx/zynq/ps7_init.c - Compile board/xilinx/zynq/ps7_init.c only when it exists - Add .gitignore to ignore ps7_init.c/h Signed-off-by: Masahiro Yamada yamad...@jp.panasonic.com Signed-off-by: Michal Simek michal.si...@xilinx.com --- Changes in v2: (only cosmetic changes in v2) - Improve the comment in arch/arm/cpu/armv7/zynq/spl.c s/replaced/overridden/ - Add Signed-off-by credit of Michal Simek arch/arm/cpu/armv7/zynq/spl.c | 8 board/xilinx/zynq/.gitignore | 1 + board/xilinx/zynq/Makefile| 5 - board/xilinx/zynq/ps7_init.c | 12 4 files changed, 13 insertions(+), 13 deletions(-) create mode 100644 board/xilinx/zynq/.gitignore delete mode 100644 board/xilinx/zynq/ps7_init.c diff --git a/arch/arm/cpu/armv7/zynq/spl.c b/arch/arm/cpu/armv7/zynq/spl.c index fcad762..60da4d1 100644 --- a/arch/arm/cpu/armv7/zynq/spl.c +++ b/arch/arm/cpu/armv7/zynq/spl.c @@ -67,3 +67,11 @@ int spl_start_uboot(void) return 0; } #endif + +__weak void ps7_init(void) +{ + /* +* This function is overridden by the one in +* board/xilinx/zynq/ps7_init.c, if it exists. +*/ +} diff --git a/board/xilinx/zynq/.gitignore b/board/xilinx/zynq/.gitignore new file mode 100644 index 000..68b8edd --- /dev/null +++ b/board/xilinx/zynq/.gitignore @@ -0,0 +1 @@ +ps7_init.[ch] diff --git a/board/xilinx/zynq/Makefile b/board/xilinx/zynq/Makefile index 3f19a1c..fd93f63 100644 --- a/board/xilinx/zynq/Makefile +++ b/board/xilinx/zynq/Makefile @@ -6,4 +6,7 @@ # obj-y := board.o -obj-$(CONFIG_SPL_BUILD)+= ps7_init.o + +# Please copy ps7_init.c/h from hw project to this directory +obj-$(CONFIG_SPL_BUILD) += \ + $(if $(wildcard $(srctree)/$(src)/ps7_init.c), ps7_init.o) diff --git a/board/xilinx/zynq/ps7_init.c b/board/xilinx/zynq/ps7_init.c deleted file mode 100644 index c47da09..000 --- a/board/xilinx/zynq/ps7_init.c +++ /dev/null @@ -1,12 +0,0 @@ -/* - * (C) Copyright 2014 Xilinx, Inc. Michal Simek - * - * SPDX-License-Identifier:GPL-2.0+ - */ -#include common.h -#include asm/arch/spl.h - -__weak void ps7_init(void) -{ - puts(Please copy ps7_init.c/h from hw project\n); -} -- 1.8.3.2 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [RFC PATCH v2 04/13] Makefile: Support include files for .dts files
Hi Simon, On Fri, 9 May 2014 11:28:19 -0600 Simon Glass s...@chromium.org wrote: Linux supports this, and if we are to have compatible device tree files, U-Boot should also. Avoid giving the device tree files access to U-Boot's include/ directory. Only include/dt-bindings is accessible. Signed-off-by: Simon Glass s...@chromium.org Thanks! Reviewed-by: Masahiro Yamada yamad...@jp.panasonic.com Best Regards Masahiro Yamada ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] Fwd: uboot.lds
Hi, When I read the scource of uboot 1.1.6,I find . = .; in the file of \board\smdk2410\u-boot.lds. I can't understand why . = .; is here.why not . = ALIGN(4);? what does . = .; mean? ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] tools, env, aes: fix compiling env tools for target
compiling env tools for the target leads with current u-boot in following compile error: $ make CROSS_COMPILE=powerpc-linux- env make[1]: *** Keine Regel vorhanden, um das Target »tools/env/aes.c«, benötigt von »tools/env/aes.o«, zu erstellen. Schluss. make: *** [env] Fehler 2 $ Fix it! Signed-off-by: Heiko Schocher h...@denx.de Cc: Marek Vasut ma...@denx.de Cc: Masahiro Yamada yamad...@jp.panasonic.com --- tools/env/aes.c | 1 + 1 file changed, 1 insertion(+) create mode 100644 tools/env/aes.c diff --git a/tools/env/aes.c b/tools/env/aes.c new file mode 100644 index 000..9e42679 --- /dev/null +++ b/tools/env/aes.c @@ -0,0 +1 @@ +#include ../../lib/aes.c -- 1.8.3.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot