Help: U-Boot on Nokia RX-51 (aka N900)
Subsystems (3)
Hello,
U-Boot patches which add support for Nokia RX-51 (aka N900) is here:
http://al.robotfuzz.com/~al/maemo/u-boot/
RX-51 has closed 2nd stage bootloader NOLO which can load kernel image from nand (or usb) to ram and boot it. NOLO also done all HW initializations. These U-Boot patches for RX-51 add support that builded U-Boot binary can be loaded and booted by NOLO. So U-Boot will be 3rd bootloader.
Patches are on top of revision bd2313078114c4b44c4a5ce149af43bcb7fc8854 and working fine. I rebased these patches on top of u-boot git master repository, but booting failed. No output on device. Using git bisect I found that problem appeared at revision
561142af20f1fd7b425d9425730014e656defb91
ARM: implement relocation for ARM V7 (OMAP)
If I defined CONFIG_SYS_ARM_WITHOUT_RELOC U-Boot working and booting fine up to revision a9aa3926295df759306258e5e24cace414f53b67
So problem is that relocation patches broke RX-51 support. Can somebody help me how to rewrite/port rx-51 patches to work with ARM relocation (do not forget that U-Boot is loaded by 2nd bootloader to RAM after HW is initialized by NOLO)? If U-Boot will be working on RX-51 I will prepair patches for upstreaming.
Signature · 9 lines
Pali Roh?r pali.rohar at gmail.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 198 bytes Desc: This is a digitally signed message part. Url : http://lists.denx.de/pipermail/u-boot/attachments/20110901/f03b0f3f/attachment.pgp
Quoted 18 lines · Pali Roh?r
Hello,
U-Boot patches which add support for Nokia RX-51 (aka N900) is here:
http://al.robotfuzz.com/~al/maemo/u-boot/RX-51 has closed 2nd stage bootloader NOLO which can load kernel image from nand (or usb) to ram and boot it. NOLO also done all HW initializations. These U-Boot patches for RX-51 add support that builded U-Boot binary can be loaded and booted by NOLO. So U-Boot will be 3rd bootloader.
Patches are on top of revision
bd2313078114c4b44c4a5ce149af43bcb7fc8854and working fine. I rebased these patches on top of u-boot git master repository, but booting failed. No output on device. Using git bisect I found that problem appeared at revision
561142af20f1fd7b425d9425730014e656defb91
ARM: implement relocation for ARM V7 (OMAP)
Quoted 8 lines
If I defined
CONFIG_SYS_ARM_WITHOUT_RELOCU-Boot working and booting fine up to revisiona9aa3926295df759306258e5e24cace414f53b67So problem is that relocation patches broke RX-51 support. Can somebody help me how to rewrite/port rx-51 patches to work with ARM relocation (do not forget that U-Boot is loaded by 2nd bootloader to RAM after HW is initialized by NOLO)? If U-Boot will be working on RX-51 I will prepair patches for upstreaming.
Does NOLO enable MMU ?
btw can you post the patches to the ML for review ?
Cheers
Quoted 24 lines · On Thursday 01 September 2011 10:46:38 Marek Vasut wrote:
Quoted 23 lines · Pali Roh?r
Hello,
U-Boot patches which add support for Nokia RX-51 (aka N900) is here:
http://al.robotfuzz.com/~al/maemo/u-boot/RX-51 has closed 2nd stage bootloader NOLO which can load kernel image from nand (or usb) to ram and boot it. NOLO also done all HW initializations. These U-Boot patches for RX-51 add support that builded U-Boot binary can be loaded and booted by NOLO. So U-Boot will be 3rd bootloader.
Patches are on top of revision
bd2313078114c4b44c4a5ce149af43bcb7fc8854and working fine. I rebased these patches on top of u-boot git master repository, but booting failed. No output on device. Using git bisect I found that problem appeared at revision
561142af20f1fd7b425d9425730014e656defb91
ARM: implement relocation for ARM V7 (OMAP)If I defined
CONFIG_SYS_ARM_WITHOUT_RELOCU-Boot working and booting fine
up to revisiona9aa3926295df759306258e5e24cace414f53b67
Quoted 8 lines
Quoted 6 lines
So problem is that relocation patches broke RX-51 support. Can somebody help me how to rewrite/port rx-51 patches to work with ARM relocation (do
not forget that U-Boot is loaded by 2nd bootloader to RAM after HW is initialized by NOLO)? If U-Boot will be working on RX-51 I will prepair patches for upstreaming.Does NOLO enable MMU ?
I'm not sure, because NOLO is proprietary, closed and without any documentation. Nobody knows what all NOLO doing...
Quoted 2 lines
btw can you post the patches to the ML for review ?
4 patches on http://al.robotfuzz.com/~al/maemo/u-boot/ is not mine and is not ready for merging - but working.
I'm prepairing patch series which fix some problems (keymap, watchog, ...). Now it is still based on bd2313078114c4b44c4a5ce149af43bcb7fc8854
Quoted 2 lines
Cheers
Signature · 9 lines
Pali Roh?r pali.rohar at gmail.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 198 bytes Desc: This is a digitally signed message part. Url : http://lists.denx.de/pipermail/u-boot/attachments/20110901/97c0bdc1/attachment.pgp
Quoted 32 lines · Pali Roh?r
Quoted 31 lines · On Thursday 01 September 2011 10:46:38 Marek Vasut wrote:
Quoted 29 lines · Pali Roh?r
Hello,
U-Boot patches which add support for Nokia RX-51 (aka N900) is here:
http://al.robotfuzz.com/~al/maemo/u-boot/RX-51 has closed 2nd stage bootloader NOLO which can load kernel image from nand (or usb) to ram and boot it. NOLO also done all HW initializations. These U-Boot patches for RX-51 add support that builded U-Boot binary can be loaded and booted by NOLO. So U-Boot will be 3rd bootloader.
Patches are on top of revision
bd2313078114c4b44c4a5ce149af43bcb7fc8854and working fine. I rebased these patches on top of u-boot git master repository, but booting failed. No output on device. Using git bisect I found that problem appeared at revision
561142af20f1fd7b425d9425730014e656defb91
ARM: implement relocation for ARM V7 (OMAP)If I defined
CONFIG_SYS_ARM_WITHOUT_RELOCU-Boot working and booting fine
up to revisiona9aa3926295df759306258e5e24cace414f53b67So problem is that relocation patches broke RX-51 support. Can somebody help me how to rewrite/port rx-51 patches to work with ARM relocation (do
not forget that U-Boot is loaded by 2nd bootloader to RAM after HW is initialized by NOLO)? If U-Boot will be working on RX-51 I will prepair patches for upstreaming.
Quoted 4 lines
Quoted 1 line
Does NOLO enable MMU ?
I'm not sure, because NOLO is proprietary, closed and without any documentation. Nobody knows what all NOLO doing...
Check CPSR
Quoted 8 lines
Quoted 2 lines
btw can you post the patches to the ML for review ?
4 patches on http://al.robotfuzz.com/~al/maemo/u-boot/ is not mine and is not ready for merging - but working.
I'm prepairing patch series which fix some problems (keymap, watchog, ...). Now it is still based on
bd2313078114c4b44c4a5ce149af43bcb7fc8854
Well ok.
Quoted 2 lines
Quoted 2 lines
Cheers
Quoted 2 lines · Pali Roh?r
Hello,
Hi Pali,
Quoted 2 lines
U-Boot patches which add support for Nokia RX-51 (aka N900) is here:
http://al.robotfuzz.com/~al/maemo/u-boot/
It is quite difficult to review patches in this way, considering you have already changed something to adapt to the currect release. I suggest you post your modified patches to ML.
Quoted 11 lines
RX-51 has closed 2nd stage bootloader NOLO which can load kernel image from nand (or usb) to ram and boot it. NOLO also done all HW initializations. These U-Boot patches for RX-51 add support that builded U-Boot binary can be loaded and booted by NOLO. So U-Boot will be 3rd bootloader.
Patches are on top of revision
bd2313078114c4b44c4a5ce149af43bcb7fc8854and working fine. I rebased these patches on top of u-boot git master repository, but booting failed. No output on device. Using git bisect I found that problem appeared at revision
Quoted 7 lines
561142af20f1fd7b425d9425730014e656defb91
ARM: implement relocation for ARM V7 (OMAP)If I defined
CONFIG_SYS_ARM_WITHOUT_RELOCU-Boot working and booting fine up to revisiona9aa3926295df759306258e5e24cace414f53b67So problem is that relocation patches broke RX-51 support.
Well, it does mean that the RX51 was not adapted for the relocation...
You should take care that the initial stackpointer (check for CONFIG_SYS_INIT_SP_ADDR) is set to a a range into RAM (or internal RAM, if any) and it is not overwritten by other parts (where is your TEXT code ?).
Move all first initialization into board_early_init_f, if any.
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== 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: office at denx.de =====================================================================
Quoted 11 lines · On Thursday 01 September 2011 11:02:25 Stefano Babic wrote:
Quoted 1 line · Pali Roh?r
Hello,
Hi Pali,
Quoted 2 lines
U-Boot patches which add support for Nokia RX-51 (aka N900) is here:
http://al.robotfuzz.com/~al/maemo/u-boot/It is quite difficult to review patches in this way, considering you have already changed something to adapt to the currect release. I suggest you post your modified patches to ML.
Should I rebase patches on top on master now (which still not working) and send here?
Quoted 18 lines
Quoted 18 lines
RX-51 has closed 2nd stage bootloader NOLO which can load kernel image from nand (or usb) to ram and boot it. NOLO also done all HW initializations. These U-Boot patches for RX-51 add support that builded U-Boot binary can be loaded and booted by NOLO. So U-Boot will be 3rd bootloader.
Patches are on top of revision
bd2313078114c4b44c4a5ce149af43bcb7fc8854and working fine. I rebased these patches on top of u-boot git master repository, but booting failed. No output on device. Using git bisect I found that problem appeared at revision
561142af20f1fd7b425d9425730014e656defb91
ARM: implement relocation for ARM V7 (OMAP)If I defined
CONFIG_SYS_ARM_WITHOUT_RELOCU-Boot working and booting fine up to revisiona9aa3926295df759306258e5e24cace414f53b67
Quoted 8 lines
Quoted 1 line
So problem is that relocation patches broke RX-51 support.
Well, it does mean that the RX51 was not adapted for the relocation...
You should take care that the initial stackpointer (check for
CONFIG_SYS_INIT_SP_ADDR) is set to a a range into RAM (or internal RAM, if any) and it is not overwritten by other parts (where is your TEXT code ?).
I check this.
Quoted 5 lines
Move all first initialization into
board_early_init_f, if any.Best regards,
Stefano Babic
Signature · 9 lines
Pali Roh?r pali.rohar at gmail.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 198 bytes Desc: This is a digitally signed message part. Url : http://lists.denx.de/pipermail/u-boot/attachments/20110901/1e3b81dd/attachment.pgp
Quoted 6 lines · Pali Roh?r
Quoted 3 lines
It is quite difficult to review patches in this way, considering you have already changed something to adapt to the currect release. I suggest you post your modified patches to ML.
Should I rebase patches on top on master now (which still not working) and send here?
Because the goal is to have not only the RX51 working, but to integrate it into mainline, this is the best way. A lot of people can check into your code and give you useful hints.
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== 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: office at denx.de =====================================================================
Quoted 8 lines · On Thursday 01 September 2011 11:24:58 Stefano Babic wrote:
Quoted 6 lines · Pali Roh?r
Quoted 3 lines
It is quite difficult to review patches in this way, considering you have already changed something to adapt to the currect release. I suggest you post your modified patches to ML.
Should I rebase patches on top on master now (which still not working) and send here?
Quoted 6 lines
Because the goal is to have not only the RX51 working, but to integrate it into mainline, this is the best way. A lot of people can check into your code and give you useful hints.
Best regards,
Stefano Babic
Ok, I attached all patches which I rebased on top of master. But U-Boot still not working, not booting, no output on device.
Patches 0001 - 0006 are not mine, comes from initial u-boot version for rx-51
Patches 0001 - 0009 are for RX-51 support
Patches 0010 - 0014 implement on screen ansi terminal boot menu Patch 0015 add bootmenu support for RX-51
Signature · 9 lines
Pali Roh?r pali.rohar at gmail.com -------------- next part -------------- A non-text attachment was scrubbed... Name: 0001-Make-bootm-optionally-use-pre-existing-atags-for-Lin.patch Type: text/x-patch Size: 0 bytes Desc: not available Url : http://lists.denx.de/pipermail/u-boot/attachments/20110901/a54eae9e/attachment.bin
Quoted 19 lines · Pali Roh?r
Quoted 8 lines · On Thursday 01 September 2011 11:24:58 Stefano Babic wrote:
Quoted 6 lines · Pali Roh?r
Quoted 3 lines
It is quite difficult to review patches in this way, considering you have already changed something to adapt to the currect release. I suggest you post your modified patches to ML.
Should I rebase patches on top on master now (which still not working) and send here?
Quoted 6 lines
Because the goal is to have not only the RX51 working, but to integrate it into mainline, this is the best way. A lot of people can check into your code and give you useful hints.
Best regards,
Stefano BabicOk, I attached all patches which I rebased on top of master. But U-Boot still not working, not booting, no output on device.
Quoted 6 lines
Patches 0001 - 0006 are not mine, comes from initial u-boot version for rx-51
Patches 0001 - 0009 are for RX-51 support
Patches 0010 - 0014 implement on screen ansi terminal boot menu Patch 0015 add bootmenu support for RX-51
git send-email please.
Cheers
PATCH 1/15 Make bootm optionally use pre-existing atags for Linux kernel boot.
From: Alistair Buxton <[email protected]>
This patch adapts the bootm command so that it can use an existing atags command set up by a previous bootloader. If the environment variable "atags" is unset, bootm behaves as normal. If "atags" is set, bootm will skip all boot args setup entirely, and pass the address found in "atags". For example, if a previous boot loader already set up the atags struct at 0x80000100:
setenv atags 0x80000100; bootm 0x80008000
--- arch/arm/lib/bootm.c | 37 ++++++++++++++++++++++++++++--------- 1 files changed, 28 insertions(+), 9 deletions(-)
arch/arm/lib/bootm.c +28 -9
@@ -100,6 +100,13 @@ int do_bootm_linux(int flag, int argc, char *argv[], bootm_headers_t *images)int machid = bd->bi_arch_number;void (*kernel_entry)(int zero,int arch,uint params); +#ifdef CONFIG_CHAINLOADER +uint params; +#define PARAMS params +#else +#define PARAMS (bd->bi_boot_params) +#endif +#ifdef CONFIG_CMDLINE_TAG char *commandline =getenv ("bootargs" );#endif
@@ -125,34 +132,46 @@ int do_bootm_linux(int flag, int argc, char *argv[], bootm_headers_t *images)debug ("## Transferring control to Linux (at address %08lx) ...\n" , (ulong ) kernel_entry); +#ifdef CONFIG_CHAINLOADER + s =getenv ("atags" ); +if (s) { + params =simple_strtoul (s,NULL ,16 ); +printf ("Using existing atags at 0x%x\n" , params); + }else { +#endif +#if defined (CONFIG_SETUP_MEMORY_TAGS ) || \ defined (CONFIG_CMDLINE_TAG ) || \ defined (CONFIG_INITRD_TAG ) || \ defined (CONFIG_SERIAL_TAG ) || \ defined (CONFIG_REVISION_TAG ) -setup_start_tag (bd); +setup_start_tag (bd);#ifdef CONFIG_SERIAL_TAG -setup_serial_tag (¶ms); +setup_serial_tag (¶ms);#endif #ifdef CONFIG_REVISION_TAG -setup_revision_tag (¶ms); +setup_revision_tag (¶ms);#endif #ifdef CONFIG_SETUP_MEMORY_TAGS -setup_memory_tags (bd); +setup_memory_tags (bd);#endif #ifdef CONFIG_CMDLINE_TAG -setup_commandline_tag (bd, commandline); +setup_commandline_tag (bd, commandline);#endif #ifdef CONFIG_INITRD_TAG -if (images->rd_start && images->rd_end) -setup_initrd_tag (bd, images->rd_start, images->rd_end); +if (images->rd_start && images->rd_end) +setup_initrd_tag (bd, images->rd_start, images->rd_end); +#endif +setup_end_tag (bd);#endif -setup_end_tag (bd); + +#ifdef CONFIG_CHAINLOADER + }#endif announce_and_cleanup (); -kernel_entry (0 , machid, bd->bi_boot_params); +kernel_entry (0 , machid,PARAMS );/* does not return */ return 1 ;
Signature · 1 line
1.7.4.1
PATCH 2/15 Store existing atags at startup if chainloading.
From: Alistair Buxton <[email protected]>
This patch stores the values in r1 and r2 at startup. It also stores the address which u-boot was originally loaded to. This is useful if you feed some other bootloader a u-boot.bin instead of the linux kernel it was expecting. It is rather ugly because it stores these values in an arbitrary memory address.
--- arch/arm/cpu/armv7/start.S | 16 ++++++++++++++++ 1 files changed, 16 insertions(+), 0 deletions(-)
arch/arm/cpu/armv7/start.S +16 -0
@@ -134,6 +134,22 @@ IRQ_STACK_START_IN: */ reset: +#if (CONFIG_CHAINLOADER) + /* + * Ugly hack: store the u-boot load address and kernel params + * 0x82000004: address where this image was loaded + * 0x82000008: mach_type + * 0x8200000c: atags address + */ + adr r0, _start + mov r3, #0x82000000 + add r3, r3, #4 + str r0, [r3] + add r3, r3, #4 + str r1, [r3] + add r3, r3, #4 + str r2, [r3] +#endif bl save_boot_params /* * set the cpu to SVC32 mode
Signature · 1 line
1.7.4.1
PATCH 3/15 Nokia RX-51 aka N900 support
In reply to Pali RohárFrom: Alistair Buxton <[email protected]>
This board definition results in a u-boot.bin which can be chainloaded from NOLO in qemu or on a real N900. It does very little hardware config because NOLO has already configured the board.
NOLO is expecting a kernel image and will treat any image it finds in onenand as such. This u-boot is intended to be flashed to the N900 like a kernel. In order to transparently boot the original kernel, it will be appended to u-boot.bin at 0x40000. NOLO will load the entire image into memory and execute u-boot, which saves the ATAGs set by NOLO. Then the bootscripts will attempt to load uImage or boot.scr from a fat filesystem on MMC1 partition 3. If this fails, the appended kernel image will be booted using the stored ATAGs.
There is also support for framebuffer and the N900 keyboard. USB tty works but is disabled because it prevents the current Maemo kernel from booting.
--- board/nokia/rx51/Makefile | 49 ++++++ board/nokia/rx51/config.mk | 33 ++++ board/nokia/rx51/rx51.c | 255 ++++++++++++++++++++++++++++ board/nokia/rx51/rx51.h | 382 ++++++++++++++++++++++++++++++++++++++++++ boards.cfg | 1 + include/configs/nokia_rx51.h | 329 ++++++++++++++++++++++++++++++++++++ 6 files changed, 1049 insertions(+), 0 deletions(-) create mode 100644 board/nokia/rx51/Makefile create mode 100644 board/nokia/rx51/config.mk create mode 100644 board/nokia/rx51/rx51.c create mode 100644 board/nokia/rx51/rx51.h create mode 100644 include/configs/nokia_rx51.h
board/nokia/rx51/Makefile new file +49 -0
@@ -0,0 +1,49 @@ +# +# (C) Copyright 2000, 2001, 2002 +# Wolfgang Denk, DENX Software Engineering, wd at 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 +# + +include $(TOPDIR)/config.mk + +LIB = $(obj)lib$(BOARD).a + +COBJS := rx51.o + +SRCS := $(COBJS:.o=.c) +OBJS := $(addprefix $(obj),$(COBJS)) + +$(LIB): $(obj).depend $(OBJS) + $(AR) $(ARFLAGS) $@ $(OBJS) + +clean: + rm -f $(OBJS) + +distclean: clean + rm -f $(LIB) core *.bak $(obj).depend + +######################################################################### + +# defines $(obj).depend target +include $(SRCTREE)/rules.mk + +sinclude $(obj).depend + +#########################################################################
board/nokia/rx51/config.mk new file +33 -0
@@ -0,0 +1,33 @@ +# +# (C) Copyright 2006 +# Texas Instruments, <www.ti.com> +# +# Nokia N900 uses OMAP3 (ARM-CortexA8) cpu +# see http://www.ti.com/ for more information on Texas Instruments +# +# 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 +# +# Physical Address: +# 8000'0000 (bank0) +# 8800/0000 (bank1) +# Linux-Kernel is expected to be at 8000'8000, entry 8000'8000 +# (mem base + reserved) + +# For use with external or internal boots. +TEXT_BASE = 0x80e80000
board/nokia/rx51/rx51.c new file +255 -0
255 lines not on this page · raw message
board/nokia/rx51/rx51.h new file +382 -0
382 lines not on this page · raw message
boards.cfg +1 -0
@@ -178,6 +178,7 @@ omap3_beagle arm armv7 beagle ti omap3_evm arm armv7 evm ti omap3 omap3_sdp3430 arm armv7 sdp3430 ti omap3 devkit8000 arm armv7 devkit8000 timll omap3 +nokia_rx51 arm armv7 rx51 nokia omap3 omap4_panda arm armv7 panda ti omap4 omap4_sdp4430 arm armv7 sdp4430 ti omap4 s5p_goni arm armv7 goni samsung s5pc1xx
include/configs/nokia_rx51.h new file +329 -0
329 lines not on this page · raw message
Signature · 1 line
1.7.4.1
PATCH 3/15 Nokia RX-51 aka N900 support
board/nokia/rx51/Makefile line 34
Quoted 6 lines · On Thursday, September 01, 2011 07:34:29 Pali Roh?r wrote:
board/nokia/rx51/Makefile new file +3
-0+LIB = $(obj)lib$(BOARD).a +$(LIB): $(obj).depend $(OBJS) + $(AR) $(ARFLAGS) $@ $(OBJS)
your makefiles are old. the LIB is supposed to be a .o not .a now, and you need to call the link command rather than use $(AR). look at board/bf537- stamp/Makefile as a simple example.
board/nokia/rx51/config.mk
Quoted 4 lines
board/nokia/rx51/config.mk new file +1
-0+TEXT_BASE = 0x80e80000
pretty sure this is old and you should use a CONFIG_xxx in your board config header. then you can delete this config.mk file.
board/nokia/rx51/rx51.c
Quoted 4 lines
board/nokia/rx51/rx51.c new file +1
-0+GraphicDevice gdev;
no camel case
Quoted 16 lines
board/nokia/rx51/rx51.c new file +16
-0+char keymap[] = { +/* normal */ +'q' ,'o' ,'p' ,',' ,'\b' ,0 ,'a' ,'s' , +'w' ,'d' ,'f' ,'g' ,'h' ,'j' ,'k' ,'l' , +'e' ,'.' ,0 ,'\r' ,0 ,'z' ,'x' ,'c' , +'r' ,'v' ,'b' ,'n' ,'m' ,' ' ,0 ,0 , +'t' ,0 ,0 ,0 ,0 ,0 ,0 ,0 , +'y' ,0 ,0 ,0 ,0 ,0 ,0 ,0 , +'u' ,0 ,0 ,0 ,0 ,0 ,0 ,0 , +'i' ,0 ,0 ,0 ,0 ,0 ,0 ,0 , +/* fn */ +'1' ,'9' ,'0' ,'=' ,'\b' ,0 ,'*' ,'+' , +'2' ,'#' ,'-' ,'_' ,'(' ,')' ,'&' ,'!' , +'3' ,'?' ,0 ,'\r' ,0 ,0 ,'$' ,0 , +'4' ,'/' ,'\\' ,'"' ,'\'' ,'@' ,0 ,0 , +'5' ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,
board/nokia/rx51/rx51.c line 152
Quoted 10 lines
board/nokia/rx51/rx51.c new file +10
-0+'6' ,0 ,0 ,0 ,0 ,0 ,0 ,0 , +'7' ,0 ,0 ,0 ,0 ,0 ,0 ,0 , + '8', 0, 0, 0, 0, 0, 0, 0, +}; + +u8 keys[8 ]; +u8 old_keys[8 ] = {0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 }; +#define KEYBUF_SIZE 4 +u8 keybuf[KEYBUF_SIZE ]; +u8 keybuf_head =0 , keybuf_tail =0 ;
these probably all should be static. and "keymap[]" should probably also be const.
board/nokia/rx51/rx51.h
Quoted 4 lines
board/nokia/rx51/rx51.h new file +1
-0+const omap3_sysinfo sysinfo = {
you should not be defining variable storage in header files
Quoted 10 lines
+/*
+ * IEN - Input Enable
+ * IDIS - Input Disable+ * PTD - Pull type Down + * PTU - Pull type Up + * DIS - Pull type selection is inactive + * EN - Pull type selection is active + * M0 - Mode 0+ * The commented string gives the final mux configuration for that pin
+ */
this looks like SoC info and not board specific. should this be in an SoC header somewhere instead ?
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20110901/3179f005/attachment.pgp
PATCH 3/15 Nokia RX-51 aka N900 support
Quoted 11 lines · On Thursday 01 September 2011 09:57:13 you wrote:
board/nokia/rx51/Makefile line 34
Quoted 6 lines · On Thursday, September 01, 2011 07:34:29 Pali Roh?r wrote:
board/nokia/rx51/Makefile new file +3
-0+LIB = $(obj)lib$(BOARD).a +$(LIB): $(obj).depend $(OBJS) + $(AR) $(ARFLAGS) $@ $(OBJS)your makefiles are old. the LIB is supposed to be a .o not .a now, and you need to call the link command rather than use $(AR). look at board/bf537- stamp/Makefile as a simple example.
ok, now I have updated makefile
Quoted 8 lines
board/nokia/rx51/config.mk
Quoted 5 lines
board/nokia/rx51/config.mk new file +1
-0+TEXT_BASE = 0x80e80000pretty sure this is old and you should use a
CONFIG_xxxin your board config header. then you can delete this config.mk file.
deleted
Quoted 7 lines
board/nokia/rx51/rx51.c
Quoted 5 lines
board/nokia/rx51/rx51.c new file +1
-0+GraphicDevice gdev;no camel case
GraphicDevice is defined in include/video_fb.h
Quoted 22 lines
Quoted 22 lines
board/nokia/rx51/rx51.c new file +21
-0+char keymap[] = { +/* normal */ +'q' ,'o' ,'p' ,',' ,'\b' ,0 ,'a' ,'s' , +'w' ,'d' ,'f' ,'g' ,'h' ,'j' ,'k' ,'l' , +'e' ,'.' ,0 ,'\r' ,0 ,'z' ,'x' ,'c' , +'r' ,'v' ,'b' ,'n' ,'m' ,' ' ,0 ,0 , +'t' ,0 ,0 ,0 ,0 ,0 ,0 ,0 , +'y' ,0 ,0 ,0 ,0 ,0 ,0 ,0 , +'u' ,0 ,0 ,0 ,0 ,0 ,0 ,0 , +'i' ,0 ,0 ,0 ,0 ,0 ,0 ,0 , +/* fn */ +'1' ,'9' ,'0' ,'=' ,'\b' ,0 ,'*' ,'+' , +'2' ,'#' ,'-' ,'_' ,'(' ,')' ,'&' ,'!' , +'3' ,'?' ,0 ,'\r' ,0 ,0 ,'$' ,0 , +'4' ,'/' ,'\\' ,'"' ,'\'' ,'@' ,0 ,0 , +'5' ,0 ,0 ,0 ,0 ,0 ,0 ,0 , +'6' ,0 ,0 ,0 ,0 ,0 ,0 ,0 , +'7' ,0 ,0 ,0 ,0 ,0 ,0 ,0 , +'8' ,0 ,0 ,0 ,0 ,0 ,0 ,0 , +}; +
Quoted 8 lines
board/nokia/rx51/rx51.c line 152
Quoted 5 lines
board/nokia/rx51/rx51.c new file +5
-0+u8 keys[8 ]; +u8 old_keys[8 ] = {0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 }; +#define KEYBUF_SIZE 4 +u8 keybuf[KEYBUF_SIZE ]; +u8 keybuf_head =0 , keybuf_tail =0 ;these probably all should be static. and "keymap[]" should probably also be const.
done
Quoted 7 lines
board/nokia/rx51/rx51.h
Quoted 5 lines
board/nokia/rx51/rx51.h new file +1
-0+const omap3_sysinfo sysinfo = {you should not be defining variable storage in header files
this code was derivated from board/ti/beagle/beagle.h and beagle.h still has this code
Quoted 12 lines
Quoted 11 lines
+/*
+ * IEN - Input Enable
+ * IDIS - Input Disable+ * PTD - Pull type Down + * PTU - Pull type Up + * DIS - Pull type selection is inactive + * EN - Pull type selection is active + * M0 - Mode 0+ * The commented string gives the final mux configuration for that pin
+ */
Quoted 2 lines
this looks like SoC info and not board specific. should this be in an SoC header somewhere instead ?
all boards in board/ti/ has this code
Quoted 1 line
-mike
Signature · 9 lines
Pali Roh?r pali.rohar at gmail.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 198 bytes Desc: This is a digitally signed message part. Url : http://lists.denx.de/pipermail/u-boot/attachments/20111009/3b130db6/attachment.pgp
PATCH 3/15 Nokia RX-51 aka N900 support
Quoted 10 lines · On Saturday 08 October 2011 20:20:47 Pali Roh?r wrote:
Quoted 7 lines · On Thursday 01 September 2011 09:57:13 you wrote:
board/nokia/rx51/rx51.c
Quoted 4 lines · On Thursday, September 01, 2011 07:34:29 Pali Roh?r wrote:
board/nokia/rx51/rx51.c new file +1
-0+GraphicDevice gdev;no camel case
GraphicDevice is defined in
include/video_fb.h
ok, nothing you can do about that
Quoted 9 lines
Quoted 6 lines
board/nokia/rx51/rx51.h
Quoted 4 lines
board/nokia/rx51/rx51.h new file +1
-0+const omap3_sysinfo sysinfo = {you should not be defining variable storage in header files
this code was derivated from
board/ti/beagle/beagle.handbeagle.hstill has this code
beagle.h is broken too. please don't copy their brokenness :).
Quoted 11 lines
Quoted 11 lines
Quoted 10 lines
+/*
+ * IEN - Input Enable
+ * IDIS - Input Disable+ * PTD - Pull type Down + * PTU - Pull type Up + * DIS - Pull type selection is inactive + * EN - Pull type selection is active + * M0 - Mode 0+ * The commented string gives the final mux configuration for that pin
+ */
Quoted 4 lines
Quoted 2 lines
this looks like SoC info and not board specific. should this be in an SoC header somewhere instead ?
all boards in board/ti/ has this code
dumb behavior shouldn't be encouraged :). that indicates even more strongly that this should be in a SoC header somewhere.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20111009/91aab377/attachment.pgp
PATCH 3/15 Nokia RX-51 aka N900 support
Quoted 17 lines · On Sunday 09 October 2011 11:59:29 Mike Frysinger wrote:
Quoted 10 lines · On Saturday 08 October 2011 20:20:47 Pali Roh?r wrote:
Quoted 7 lines · On Thursday 01 September 2011 09:57:13 you wrote:
board/nokia/rx51/rx51.c
Quoted 4 lines · On Thursday, September 01, 2011 07:34:29 Pali Roh?r wrote:
board/nokia/rx51/rx51.c new file +1
-0+GraphicDevice gdev;no camel case
GraphicDevice is defined in
include/video_fb.hok, nothing you can do about that
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
board/nokia/rx51/rx51.h new file +0
-0
Quoted 8 lines
Quoted 6 lines
Quoted 3 lines
Quoted 1 line
+const
omap3_sysinfosysinfo = {you should not be defining variable storage in header files
this code was derivated from
board/ti/beagle/beagle.handbeagle.hstill has this code
beagle.his broken too. please don't copy their brokenness :).
Ok, this RX-51 code I mode into rx51.c (I hope it will be ok)
Quoted 16 lines
Quoted 16 lines
Quoted 15 lines
Quoted 11 lines
+/*
+ * IEN - Input Enable
+ * IDIS - Input Disable+ * PTD - Pull type Down + * PTU - Pull type Up + * DIS - Pull type selection is inactive + * EN - Pull type selection is active + * M0 - Mode 0+ * The commented string gives the final mux configuration for that pin + */
this looks like SoC info and not board specific. should this be in an
SoC header somewhere instead ?
Quoted 5 lines
Quoted 1 line
all boards in board/ti/ has this code
dumb behavior shouldn't be encouraged :). that indicates even more strongly that this should be in a SoC header somewhere.
-mike
definitions of MUX are in arch/arm/include/asm/arch/mux.h and in rx51.h is used these defines. Info in rx51.h is RX-51 specified, other ti boards have similar but different code.
Signature · 9 lines
Pali Roh?r pali.rohar at gmail.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 198 bytes Desc: This is a digitally signed message part. Url : http://lists.denx.de/pipermail/u-boot/attachments/20111012/945ccf24/attachment.pgp
PATCH 4/15 Only delay boot if keyboard open
In reply to Pali RohárFrom: Matan Ziv-Av <[email protected]>
--- board/nokia/rx51/rx51.c | 7 +++++++ include/configs/nokia_rx51.h | 1 + 2 files changed, 8 insertions(+), 0 deletions(-)
board/nokia/rx51/rx51.c +7 -0
@@ -104,6 +104,13 @@ int misc_init_r(void)setenv ("nolo_atagaddr" , buf);#endif +// set environment variable slide_sw +// if keyboard slide is open/close +omap_set_gpio_direction (71 ,1 ); +unsigned val =omap_get_gpio_datain (71 ); +omap_free_gpio (71 ); +setenv ("slide_sw" , val ?"close" :"open" ); +dieid_num_r ();return 0 ;
include/configs/nokia_rx51.h +1 -0
@@ -200,6 +200,7 @@ int rx51_kp_getc(void);"bootm ${nolo_kernaddr}\0" #define CONFIG_PREBOOT \ +"if test $slide_sw != open ; then run noloboot; fi ;" \"echo Extra commands:;" \"echo run sercon - Use serial port for control.;" \"echo run usbcon - Use usbtty for control.;" \
Signature · 1 line
1.7.4.1
PATCH 4/15 Only delay boot if keyboard open
Quoted 2 lines · On Thursday, September 01, 2011 07:34:30 Pali Roh?r wrote:
board/nokia/rx51/rx51.c | 7 +++++++ include/configs/nokia_rx51.h | 1 +
this is a new board port. why not squash all your fixes into one instead of sending out an incomplete/buggy board port which needs patches to fixup ? -mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20110901/738ab2af/attachment.pgp
PATCH 4/15 Only delay boot if keyboard open
Quoted 6 lines · On Thursday 01 September 2011 09:58:06 you wrote:
Quoted 2 lines · On Thursday, September 01, 2011 07:34:30 Pali Roh?r wrote:
board/nokia/rx51/rx51.c | 7 +++++++ include/configs/nokia_rx51.h | 1 +this is a new board port. why not squash all your fixes into one instead of sending out an incomplete/buggy board port which needs patches to fixup ?
I wrote that my patch series was not complete and not correct. In next (complete) series I will mix board files into one patch.
Quoted 1 line
-mike
Signature · 9 lines
Pali Roh?r pali.rohar at gmail.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 198 bytes Desc: This is a digitally signed message part. Url : http://lists.denx.de/pipermail/u-boot/attachments/20111009/c2527e48/attachment.pgp
PATCH 4/15 Only delay boot if keyboard open
Quoted 11 lines · On Saturday 08 October 2011 19:29:27 Pali Roh?r wrote:
Quoted 7 lines · On Thursday 01 September 2011 09:58:06 you wrote:
Quoted 2 lines · On Thursday, September 01, 2011 07:34:30 Pali Roh?r wrote:
board/nokia/rx51/rx51.c | 7 +++++++ include/configs/nokia_rx51.h | 1 +this is a new board port. why not squash all your fixes into one instead of sending out an incomplete/buggy board port which needs patches to fixup ?
I wrote that my patch series was not complete and not correct. In next (complete) series I will mix board files into one patch.
OK
please keep replies on the list and don't seen them to specific people -mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20111009/7732af00/attachment.pgp
PATCH 5/15 Change Wireless LAN mode from M4 to M0
In reply to Pali RohárFrom: Matan Ziv-Av <[email protected]>
--- board/nokia/rx51/rx51.h | 20 ++++++++++---------- 1 files changed, 10 insertions(+), 10 deletions(-)
board/nokia/rx51/rx51.h +10 -10
@@ -199,16 +199,16 @@ const omap3_sysinfo sysinfo = { MUX_VAL(CP(MMC1_DAT6), (IEN | PTU | EN | M0)) /*MMC1_DAT6*/\MUX_VAL (CP (MMC1_DAT7 ), (IEN |PTU |EN |M0 ))/*MMC1_DAT7*/ \ /*Wireless LAN */\ - MUX_VAL(CP(MMC2_CLK), (IEN | PTU | EN | M4)) /*GPIO_130*/\ - MUX_VAL(CP(MMC2_CMD), (IEN | PTU | EN | M4)) /*GPIO_131*/\ - MUX_VAL(CP(MMC2_DAT0), (IEN | PTU | EN | M4)) /*GPIO_132*/\ - MUX_VAL(CP(MMC2_DAT1), (IEN | PTU | EN | M4)) /*GPIO_133*/\ - MUX_VAL(CP(MMC2_DAT2), (IEN | PTU | EN | M4)) /*GPIO_134*/\ - MUX_VAL(CP(MMC2_DAT3), (IEN | PTU | EN | M4)) /*GPIO_135*/\ - MUX_VAL(CP(MMC2_DAT4), (IEN | PTU | EN | M4)) /*GPIO_136*/\ - MUX_VAL(CP(MMC2_DAT5), (IEN | PTU | EN | M4)) /*GPIO_137*/\ - MUX_VAL(CP(MMC2_DAT6), (IEN | PTU | EN | M4)) /*GPIO_138*/\ -MUX_VAL (CP (MMC2_DAT7 ), (IEN |PTU |EN |M4 ))/*GPIO_139*/ \ + MUX_VAL(CP(MMC2_CLK), (IEN | PTU | EN | M0)) /*GPIO_130*/\ + MUX_VAL(CP(MMC2_CMD), (IEN | PTU | EN | M0)) /*GPIO_131*/\ + MUX_VAL(CP(MMC2_DAT0), (IEN | PTU | EN | M0)) /*GPIO_132*/\ + MUX_VAL(CP(MMC2_DAT1), (IEN | PTU | EN | M0)) /*GPIO_133*/\ + MUX_VAL(CP(MMC2_DAT2), (IEN | PTU | EN | M0)) /*GPIO_134*/\ + MUX_VAL(CP(MMC2_DAT3), (IEN | PTU | EN | M0)) /*GPIO_135*/\ + MUX_VAL(CP(MMC2_DAT4), (IEN | PTU | EN | M0)) /*GPIO_136*/\ + MUX_VAL(CP(MMC2_DAT5), (IEN | PTU | EN | M0)) /*GPIO_137*/\ + MUX_VAL(CP(MMC2_DAT6), (IEN | PTU | EN | M0)) /*GPIO_138*/\ +MUX_VAL (CP (MMC2_DAT7 ), (IEN |PTU |EN |M0 ))/*GPIO_139*/ \ /*Bluetooth*/\ MUX_VAL(CP(MCBSP3_DX), (IEN | PTD | DIS | M1)) /*UART2_CTS*/\MUX_VAL (CP (MCBSP3_DR ), (IDIS |PTD |DIS |M1 ))/*UART2_RTS*/ \
Signature · 1 line
1.7.4.1
PATCH 6/15 Look for boot.scr on 'mmc 0:3' instead 'mmc 0' and add support for loading boot.scr from 'mmc 2:1'
In reply to Pali RohárFrom: Matan Ziv-Av <[email protected]>
--- include/configs/nokia_rx51.h | 24 ++++++++++++++++++------ 1 files changed, 18 insertions(+), 6 deletions(-)
include/configs/nokia_rx51.h +18 -6
@@ -188,16 +188,22 @@ int rx51_kp_getc(void);"vgacon=setenv con vga; run setcon\0" \"loadaddr=0x82000000\0" \"meegoargs=setenv bootargs\0" \ -"loadbootscript=fatload mmc 0 ${loadaddr} boot.scr\0" \ +"loadbootscript=fatload mmc 0:3 ${loadaddr} boot.scr\0" \ +"loadibootscript=fatload mmc 2:1 ${loadaddr} boot.scr\0" \"bootscript=echo Running bootscript from mmc ...; " \"source ${loadaddr}\0" \"loaduimage=fatload mmc 0:3 ${loadaddr} uImage\0" \ +"loadiuimage=fatload mmc 2:1 ${loadaddr} uImage\0" \"mmcboot=echo Booting from mmc ...; " \"run meegoargs; " \"bootm ${loadaddr}\0" \"noloboot=echo Booting NOLO supplied kernel ...; " \"setenv atags ${nolo_atagaddr};" \ -"bootm ${nolo_kernaddr}\0" +"bootm ${nolo_kernaddr}\0" \ +"mmciboot=echo Booting from internal mmc ...; " \ +"fatload mmc 2:1 ${loadaddr} uImage;" \ +"run meegoargs; " \ +"bootm ${loadaddr}\0" #define CONFIG_PREBOOT \"if test $slide_sw != open ; then run noloboot; fi ;" \
@@ -210,12 +216,18 @@ int rx51_kp_getc(void);#define CONFIG_BOOTCOMMAND \ "if mmc init; then " \ - "if run loadbootscript; then " \ + "if run loadibootscript; then " \ + "echo Found boot.scr on mmc 2:1; " \ "run bootscript; " \ "else " \ - "if run loaduimage; then " \ - "run mmcboot; " \ - "else run noloboot; " \ + "if run loadbootscript; then " \ + "echo Found boot.scr on mmc 0:3; " \ + "run bootscript; " \ + "else " \ + "if run loaduimage; then " \ + "run mmcboot; " \ + "else run noloboot; " \ + "fi; " \ "fi; " \ "fi; " \ "else run noloboot; fi"
Signature · 1 line
1.7.4.1
PATCH 7/15 RX-51: Fixed compilation on top of master (changes from Beagle Board)
In reply to Pali Rohár--- board/nokia/rx51/Makefile | 7 ++++--- board/nokia/rx51/config.mk | 2 +- board/nokia/rx51/rx51.c | 2 +- include/configs/nokia_rx51.h | 7 +++++++ 4 files changed, 13 insertions(+), 5 deletions(-)
board/nokia/rx51/Makefile +4 -3
@@ -23,15 +23,16 @@ include $(TOPDIR)/config.mk -LIB = $(obj)lib$(BOARD).a +LIB = $(obj)lib$(BOARD).o -COBJS := rx51.o +COBJS-y := $(BOARD).o +COBJS := $(sort $(COBJS-y)) SRCS := $(COBJS:.o=.c) OBJS := $(addprefix $(obj),$(COBJS)) $(LIB): $(obj).depend $(OBJS) - $(AR) $(ARFLAGS) $@ $(OBJS) + $(call cmd_link_o_target, $(OBJS)) clean: rm -f $(OBJS)
board/nokia/rx51/config.mk +1 -1
@@ -30,4 +30,4 @@ # (mem base + reserved) # For use with external or internal boots. -TEXT_BASE = 0x80e80000 +CONFIG_SYS_TEXT_BASE = 0x80008000
board/nokia/rx51/rx51.c +1 -1
@@ -38,7 +38,7 @@#include <asm/io.h> #include <asm/arch/mux.h> #include <asm/arch/sys_proto.h> -#include <asm/arch/gpio.h> +#include <asm/omap_gpio.h> #include <asm/mach-types.h> #include "rx51.h"
include/configs/nokia_rx51.h +7 -0
@@ -316,6 +316,13 @@ int rx51_kp_getc(void);#define CONFIG_ENV_OFFSET boot_flash_off#define CONFIG_ENV_ADDR SMNAND_ENV_OFFSET +#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1 +#define CONFIG_SYS_INIT_RAM_ADDR 0x4020f800 +#define CONFIG_SYS_INIT_RAM_SIZE 0x800 +#define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_INIT_RAM_ADDR + \ + CONFIG_SYS_INIT_RAM_SIZE - \ + GENERATED_GBL_DATA_SIZE) +/*----------------------------------------------------------------------- * CFI FLASH driver setup */
Signature · 1 line
1.7.4.1
PATCH 8/15 RX-51: Add support for resetting twl4030 watchdog
In reply to Pali Rohár * use test_and_set_bit and __clear_bit to access twl4030 i2c bus only once at same time
* do not reset watchdog too often (max every 2 seconds)
--- board/nokia/rx51/rx51.c | 25 +++++++++++++++++++++++-- include/configs/nokia_rx51.h | 1 + 2 files changed, 24 insertions(+), 2 deletions(-)
board/nokia/rx51/rx51.c +23 -2
@@ -36,6 +36,7 @@#include <i2c.h> #include <video_fb.h> #include <asm/io.h> +#include <asm/bitops.h> #include <asm/arch/mux.h> #include <asm/arch/sys_proto.h> #include <asm/omap_gpio.h>
@@ -192,6 +193,23 @@ int rx51_kp_init(void)return ret; } +static unsigned long int twl_wd_start =0 ; +static volatile unsigned long int twl_chip_lock; + +void hw_watchdog_reset (void ) +{ + +if (get_timer (twl_wd_start) <2 *CONFIG_SYS_HZ ) +return ; + +if (test_and_set_bit (0 , &twl_chip_lock) ) +return ; +twl4030_i2c_write_u8 (TWL4030_CHIP_PM_RECEIVER ,31 ,TWL4030_PM_RECEIVER_WATCHDOG_CFG ); +__clear_bit (0 , &twl_chip_lock); + + twl_wd_start =get_timer (0 ); +} +char rx51_kp_fill (u8 k,u8 mods) {if (mods &2 ) {/* fn */
@@ -217,6 +235,9 @@ int rx51_kp_tstc(void)u8 intr;u8 mods; +if (test_and_set_bit (0 , &twl_chip_lock) ) +return 0 ; +/* twl4030 remembers up to 2 events */ for (i =0 ; i <2 ; i++) {
@@ -249,6 +270,7 @@ int rx51_kp_tstc(void) } } } +__clear_bit (0 , &twl_chip_lock);return (KEYBUF_SIZE + keybuf_tail - keybuf_head)%KEYBUF_SIZE ; }
@@ -256,7 +278,6 @@ int rx51_kp_getc(void) { keybuf_head %=KEYBUF_SIZE ;while (!rx51_kp_tstc ()) - ; +udelay (10000 );return keybuf[keybuf_head++]; } -
include/configs/nokia_rx51.h +1 -0
@@ -144,6 +144,7 @@#define CONFIG_SYS_I2C_BUS 0#define CONFIG_SYS_I2C_BUS_SELECT 1#define CONFIG_DRIVER_OMAP34XX_I2C 1 +#define CONFIG_HW_WATCHDOG /* * TWL4030
Signature · 1 line
1.7.4.1
PATCH 9/15 RX-51: Fix keymap
In reply to Pali Rohár * make functions and variables static
* add support for additional key combination with ctrl and fn
* add support for keys: up, down, left, right, volume_up, volume_down
--- board/nokia/rx51/rx51.c | 34 +++++++++++++++++++--------------- 1 files changed, 19 insertions(+), 15 deletions(-)
board/nokia/rx51/rx51.c +19 -15
@@ -132,32 +132,32 @@ void set_muxconf_regs(void)* TWL4030 keypad handler for cfb_console */ -char keymap[] = { +static char keymap[] = {/* normal */ 'q' ,'o' ,'p' ,',' ,'\b' ,0 ,'a' ,'s' ,'w' ,'d' ,'f' ,'g' ,'h' ,'j' ,'k' ,'l' , -'e' ,'.' ,0 ,'\r' ,0 ,'z' ,'x' ,'c' , -'r' ,'v' ,'b' ,'n' ,'m' ,' ' ,0 ,0 , -'t' ,0 ,0 ,0 ,0 ,0 ,0 ,0 , +'e' ,'.' ,24 ,'\r' ,0 ,'z' ,'x' ,'c' , +'r' ,'v' ,'b' ,'n' ,'m' ,' ' ,' ' ,27 , +'t' ,25 ,26 ,0 ,0 ,0 ,0 ,0 ,'y' ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,'u' ,0 ,0 ,0 ,0 ,0 ,0 ,0 , -'i' ,0 ,0 ,0 ,0 ,0 ,0 ,0 , +'i' ,5 ,6 ,0 ,0 ,0 ,0 ,0 ,/* fn */ '1' ,'9' ,'0' ,'=' ,'\b' ,0 ,'*' ,'+' ,'2' ,'#' ,'-' ,'_' ,'(' ,')' ,'&' ,'!' , -'3' ,'?' ,0 ,'\r' ,0 ,0 ,'$' ,0 , -'4' ,'/' ,'\\' ,'"' ,'\'' ,'@' ,0 ,0 , -'5' ,0 ,0 ,0 ,0 ,0 ,0 ,0 , +'3' ,'?' ,'^' ,'\r' ,0 ,156 ,'$' ,238 , +'4' ,'/' ,'\\' ,'"' ,'\'' ,'@' ,0 ,'<' , +'5' ,'|' ,'>' ,0 ,0 ,0 ,0 ,0 ,'6' ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,'7' ,0 ,0 ,0 ,0 ,0 ,0 ,0 , -'8' ,0 ,0 ,0 ,0 ,0 ,0 ,0 , +'8' ,16 ,17 ,0 ,0 ,0 ,0 ,0 , }; -u8 keys[8 ]; -u8 old_keys[8 ] = {0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 }; +static u8 keys[8 ]; +static u8 old_keys[8 ] = {0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 };#define KEYBUF_SIZE 4 -u8 keybuf[KEYBUF_SIZE ]; -u8 keybuf_head =0 , keybuf_tail =0 ; +static u8 keybuf[KEYBUF_SIZE ]; +static u8 keybuf_head =0 , keybuf_tail =0 ;int rx51_kp_init (void ) {
@@ -210,12 +210,16 @@ void hw_watchdog_reset(void) twl_wd_start =get_timer (0 ); } -char rx51_kp_fill (u8 k,u8 mods) +static void rx51_kp_fill (u8 k,u8 mods) {if (mods &2 ) {/* fn */ k = keymap[k+64 ]; }else { k = keymap[k]; +if (mods &1 ) {/* ctrl */ +if (k >='a' && k <='z' ) + k -='a' +1 ; + }if (mods &4 ) {/* shift */ if (k >='a' && k <='z' ) k +='A' -'a' ;
@@ -231,7 +235,7 @@ char rx51_kp_fill(u8 k, u8 mods)int rx51_kp_tstc (void ) { -u8 c, r, dk, k, i; +u8 c, r, dk, i;u8 intr;u8 mods;
Signature · 1 line
1.7.4.1
PATCH 10/15 include/common.h: Add some macros for ANSI escape codes
In reply to Pali Rohár--- include/common.h | 32 ++++++++++++++++++++++++++++++++ 1 files changed, 32 insertions(+), 0 deletions(-)
include/common.h +32 -0
@@ -680,6 +680,38 @@ void clear_ctrlc (void); /* clear the Control-C condition */int disable_ctrlc (int );/* 1 to disable, 0 to enable Control-C detect */ /* +* ANSI terminal +*/ + +#define ANSI_CURSOR_UP "\e[%dA" +#define ANSI_CURSOR_DOWN "\e[%dB" +#define ANSI_CURSOR_FORWARD "\e[%dC" +#define ANSI_CURSOR_BACK "\e[%dD" +#define ANSI_CURSOR_NEXTLINE "\e[%dE" +#define ANSI_CURSOR_PREVIOUSLINE "\e[%dF" +#define ANSI_CURSOR_COLUMN "\e[%dG" +#define ANSI_CURSOR_POSITION "\e[%d;%dH" +#define ANSI_CLEAR_CONSOLE "\e[2J" +#define ANSI_CLEAR_LINE_TO_END "\e[0K" +#define ANSI_CLEAR_LINE "\e[2K" +#define ANSI_COLOR "\e[%dm" + +#define BLACK 0 +#define RED 1 +#define GREEN 2 +#define YELLOW 3 +#define BLUE 4 +#define MAGENTA 5 +#define CYAN 6 +#define WHITE 7 +#define DEFAULT 8 + +#define ANSI_COLOR_ATTR_RESET 0 +#define ANSI_COLOR_ATTR_REVERSE 7 +#define ANSI_COLOR_TEXT (c) (30+c) +#define ANSI_COLOR_BG (c) (40+c) + +/* * STDIO based functions (can always be used) */ /* serial stuff */
Signature · 1 line
1.7.4.1
PATCH 11/15 drivers/video/cfb_console.c: Added support for ANSI escape codes
In reply to Pali Rohár--- drivers/video/cfb_console.c | 387 ++++++++++++++++++++++++++++++++++++++++--- 1 files changed, 361 insertions(+), 26 deletions(-)
drivers/video/cfb_console.c +361 -26
@@ -371,6 +371,10 @@ static int console_row; /* cursor row */static u32 eorx, fgx, bgx;/* color pats */ +static char ansi_buf[10 ] = {0 , }; +static int ansi_buf_size =0 ; +static int ansi_colors_need_revert =0 ; +static const int video_font_draw_table8[] = {0x00000000 ,0x000000ff ,0x0000ff00 ,0x0000ffff ,0x00ff0000 ,0x00ff00ff ,0x00ffff00 ,0x00ffffff ,
@@ -597,22 +601,34 @@ static void video_putchar(int xx, int yy, unsigned char c)video_drawchars (xx, yy + video_logo_height, &c,1 ); } -#if defined(CONFIG_CONSOLE_CURSOR ) || defined(CONFIG_VIDEO_SW_CURSOR ) -static void video_set_cursor (void ) +static void console_swap_colors (void ) { -/* swap drawing colors */ eorx = fgx; fgx = bgx; bgx = eorx; eorx = fgx ^ bgx; +} + +static void console_set_text_color (int c) +{ +// TODO +} + +static void console_set_background_color (int c) +{ +// TODO +} + +#if defined(CONFIG_CONSOLE_CURSOR ) || defined(CONFIG_VIDEO_SW_CURSOR ) +static void video_set_cursor (void ) +{ +/* swap drawing colors */ +console_swap_colors ();/* draw cursor */ video_putchar (console_col *VIDEO_FONT_WIDTH , console_row *VIDEO_FONT_HEIGHT ,' ' );/* restore drawing colors */ - eorx = fgx; - fgx = bgx; - bgx = eorx; - eorx = fgx ^ bgx; +console_swap_colors (); }#endif
@@ -672,6 +688,49 @@ static void memcpyl(int *d, int *s, int c) }#endif +static void console_clear (void ) +{ +#ifdef VIDEO_HW_RECTFILL +video_hw_rectfill (VIDEO_PIXEL_SIZE ,/* bytes per pixel */ +0 ,/* dest pos x */ + video_logo_height,/* dest pos y */ +VIDEO_VISIBLE_COLS ,/* frame width */ +VIDEO_VISIBLE_ROWS ,/* frame height */ + bgx/* fill color */ + ); +#else +memsetl (CONSOLE_ROW_FIRST ,CONSOLE_SIZE , bgx); +#endif +} + +static void console_clear_line (int line,int begin,int end) +{ +#ifdef VIDEO_HW_RECTFILL +video_hw_rectfill (VIDEO_PIXEL_SIZE ,/* bytes per pixel */ +VIDEO_FONT_WIDTH * begin,/* dest pos x */ /* FIXME: correct? */ + video_logo_height +CONSOLE_ROW_SIZE * line,/* dest pos y */ /* FIXME: correct? */ +VIDEO_FONT_WIDTH * ( end - begin ),/* frame width */ /* FIXME: correct? */ +VIDEO_FONT_HEIGHT ,/* frame height */ + bgx/* fill color */ + ); +#else +int i; +if ( begin ==0 && end ==CONSOLE_COLS ) +memsetl (CONSOLE_ROW_FIRST +CONSOLE_ROW_SIZE * line,/* offset of row */ +CONSOLE_ROW_SIZE >>2 ,/* length of row */ + bgx/* fill color */ + ); +else +for ( i =0 ; i <VIDEO_FONT_HEIGHT ; ++i ) +memsetl (CONSOLE_ROW_FIRST +CONSOLE_ROW_SIZE * line +/* offset of row */ +VIDEO_FONT_WIDTH *VIDEO_PIXEL_SIZE * begin +/* offset of col */ + i *VIDEO_LINE_LEN ,/* col offset of i-th line */ +VIDEO_FONT_WIDTH * ( end - begin ) /2 ,/* length to end of line */ + bgx/* fill color */ + ); +#endif +} +static void console_scrollup (void ) {/* copy up rows ignoring the first one */
@@ -694,18 +753,7 @@ static void console_scrollup(void)#endif /* clear the last one */ -#ifdef VIDEO_HW_RECTFILL -video_hw_rectfill (VIDEO_PIXEL_SIZE ,/* bytes per pixel */ -0 ,/* dest pos x */ -VIDEO_VISIBLE_ROWS - -VIDEO_FONT_HEIGHT ,/* dest pos y */ -VIDEO_VISIBLE_COLS ,/* frame width */ -VIDEO_FONT_HEIGHT ,/* frame height */ -CONSOLE_BG_COL /* fill color */ - ); -#else -memsetl (CONSOLE_ROW_LAST ,CONSOLE_ROW_SIZE >>2 ,CONSOLE_BG_COL ); -#endif +console_clear_line (CONSOLE_ROWS -1 ,0 ,CONSOLE_COLS ); }static void console_back (void )
@@ -723,7 +771,7 @@ static void console_back(void) console_row * VIDEO_FONT_HEIGHT, ' '); } -static void console_newline (void ) +static void console_cursor_check (void ) {/* Check if last character in the line was just drawn. If so, cursor was overwriten and need not to be cleared. Cursor clearing without this
@@ -732,7 +780,62 @@ static void console_newline(void)*/ if (console_col <CONSOLE_COLS )CURSOR_OFF ; - console_row++; +} + +static void console_cursor_fix (void ) +{ +if (console_row <=0 ) + console_row =0 ; +if (console_row >CONSOLE_ROWS ) + console_row =CONSOLE_ROWS -1 ; +if (console_col <=0 ) + console_col =0 ; +if (console_col >CONSOLE_COLS ) + console_col =CONSOLE_COLS ; +} + +static void console_cursor_up (int n) +{ +console_cursor_check (); + console_row -= n; +console_cursor_fix (); +} + +static void console_cursor_down (int n) +{ +console_cursor_check (); + console_row += n; +console_cursor_fix (); +} + +static void console_cursor_left (int n) +{ +console_cursor_check (); + console_col -= n; +console_cursor_fix (); +} + +static void console_cursor_right (int n) +{ +console_cursor_check (); + console_col += n; +console_cursor_fix (); +} + +static void console_cursor_set_position (int row,int col) +{ +console_cursor_check (); +if (console_row !=-1 ) + console_row = row; +if (console_col !=-1 ) + console_col = col; +console_cursor_fix (); +} + +static void console_newline (int n) +{ +console_cursor_check (); + console_row += n; console_col =0 ;/* Check if we need to scroll the terminal */
@@ -741,17 +844,25 @@ static void console_newline(void)console_scrollup ();/* Decrement row number */ - console_row--; + console_row =CONSOLE_ROWS -1 ; } } +static void console_previewsline (int n) +{ +/* FIXME: also scroll terminal ? */ +console_cursor_check (); + console_row -= n; +console_cursor_fix (); +} +static void console_cr (void ) {CURSOR_OFF ; console_col =0 ; } -void video_putc (const char c) +static void parse_putc (const char c) {static int nl =1 ;
@@ -762,7 +873,7 @@ void video_putc(const char c)case '\n' :/* next line */ if (console_col || (!console_col && nl)) -console_newline (); +console_newline (1 ); nl =1 ;break ;
@@ -772,7 +883,7 @@ void video_putc(const char c) console_col &= ~0x0007 ;if (console_col >=CONSOLE_COLS ) -console_newline (); +console_newline (1 );break ;case 8 :/* backspace */
@@ -786,13 +897,237 @@ void video_putc(const char c)/* check for newline */ if (console_col >=CONSOLE_COLS ) { -console_newline (); +console_newline (1 ); nl =0 ; } }CURSOR_SET ; } +void video_putc (const char c) +{ +int i; + +if (c ==27 ) + { +for (i =0 ; i < ansi_buf_size; ++i) +parse_putc (ansi_buf[i]); + ansi_buf[0 ] =27 ; + ansi_buf_size =1 ; +return ; + } + +if (ansi_buf_size >0 ) + { +// 0 - ESC +// 1 - [ +// 2 - num1 +// 3 - .. +// 4 - ; +// 5 - num2 +// 6 - .. +// 7 - cchar +int next =0 ; + +int flush =0 ; +int fail =0 ; + +int num1 =0 ; +int num2 =0 ; +int cchar =0 ; + + ansi_buf[ansi_buf_size++] = c; + +if (ansi_buf_size >=sizeof (ansi_buf)) + fail =1 ; + +for (i =0 ; i < ansi_buf_size; ++i) + { +if (fail) +break ; + +switch (next) { +case 0 : +if (ansi_buf[i] ==27 ) + next =1 ; +else + fail =1 ; +break ; + +case 1 : +if (ansi_buf[i] =='[' ) + next =2 ; +else + fail =1 ; +break ; + +case 2 : +if (ansi_buf[i] >='0' && ansi_buf[i] <='9' ) + { + num1 = ansi_buf[i]-'0' ; + next =3 ; + } +else + fail =1 ; +break ; + +case 3 : +if (ansi_buf[i] >='0' && ansi_buf[i] <='9' ) + { + num1 *=10 ; + num1 += ansi_buf[i]-'0' ; + } +else + { + --i; + next =4 ; + } +break ; + +case 4 : +if (ansi_buf[i] !=';' ) + { + --i; + next =7 ; + } +else + next =5 ; +break ; + +case 5 : +if (ansi_buf[i] >='0' && ansi_buf[i] <='9' ) + { + num2 = ansi_buf[i]-'0' ; + next =6 ; + } +else + fail =1 ; +break ; + +case 6 : +if (ansi_buf[i] >='0' && ansi_buf[i] <='9' ) + { + num2 *=10 ; + num2 += ansi_buf[i]-'0' ; + } +else + { + --i; + next =7 ; + } +break ; + +case 7 : +if ((ansi_buf[i] >='A' && ansi_buf[i] <='H' ) || ansi_buf[i] =='J' || ansi_buf[i] =='K' || ansi_buf[i] =='m' ) + { + cchar = ansi_buf[i]; + flush =1 ; + } +else + fail =1 ; +break ; + } + } + +if (fail) + { +for (i =0 ; i < ansi_buf_size; ++i) +parse_putc (ansi_buf[i]); + ansi_buf_size =0 ; +return ; + } + +if (flush) + { + ansi_buf_size =0 ; +switch (cchar) { +case 'A' : +//move cursor num1 rows up +console_cursor_up (num1); +break ; +case 'B' : +//move cursor num1 rows down +console_cursor_down (num1); +break ; +case 'C' : +//move cursor num1 columns forward +console_cursor_right (num1); +break ; +case 'D' : +//move cursor num1 columns back +console_cursor_left (num1); +break ; +case 'E' : +//move cursor num1 rows up at begin of row +console_previewsline (num1); +break ; +case 'F' : +//move cursor num1 rows down@begin of row +console_newline (num1); +break ; +case 'G' : +//move cursor to column num1 +console_cursor_set_position (-1 , num1-1 ); +break ; +case 'H' : +//move cursor to row num1, column num2 +console_cursor_set_position (num1-1 , num2-1 ); +break ; +case 'J' : +//clear console and move cursor to 0, 0 +console_clear (); +console_cursor_set_position (0 ,0 ); +break ; +case 'K' : +//clear line +if ( num1 ==0 ) +console_clear_line (console_row, console_col,CONSOLE_COLS -1 ); +else if ( num1 ==1 ) +console_clear_line (console_row,0 , console_col); +else +console_clear_line (console_row,0 ,CONSOLE_COLS -1 ); +break ; +case 'm' : +if (num1 ==0 )//reset swapped colors + { +if (ansi_colors_need_revert) + { +console_swap_colors (); + ansi_colors_need_revert =0 ; + } + } +else if (num1 ==7 )//swap colors (only once) + { +if (!ansi_colors_need_revert) + { +console_swap_colors (); + ansi_colors_need_revert =1 ; + } + } +else if (num1 ==38 )// set default text color + { + fgx =CONSOLE_FG_COL ; + eorx = fgx ^ bgx; + } +else if (num1 ==48 )// set default background color + { + bgx =CONSOLE_BG_COL ; + eorx = fgx ^ bgx; + } +else if (num1 >=30 && num1 <=37 )//set text color +console_set_text_color (num1-30 ); +else if (num1 >=40 && num1 <=37 )//set background color +console_set_background_color (num1-40 ); +break ; + } + } + } +else + { +parse_putc (c); + } +} +void video_puts (const char *s) {int count =strlen (s);
Signature · 1 line
1.7.4.1
PATCH 12/15 New command bootmenu: ANSI terminal Boot Menu support
In reply to Pali Rohár * Configuration is done via env variables bootmenu_delay and bootmenu_<num>:
bootmenu_delay=<delay>
bootmenu_<num>="<title>: <commands>" (title and commands are separated by first char ':')
<delay> is delay in seconds of autobooting first entry
<num> is boot menu entry, starting from zero
<title> is text shown in boot screen
<commands> are commands which will be executed when menu entry will be selected
* First argument of bootmenu command override bootmenu_delay env
* If env bootmenu_delay or bootmenu argument is not specified, 10 seconds for delay will be used
* If delay is 0, no entry will be show on screen, screen will not be cleared and first entry will be called
* If delay is less then 0, no autoboot delay will be used
* Boot Menu will stop finding next menu entry if last was not defined
* Boot Menu always add menu entry "U-Boot console" at end of all entries
* Example using:
setenv bootmenu_0 "First: bootm 0x82000000" # Set first menu entry setenv bootmenu_1 "Second: bootm 0x83000000" # Set second menu entry
setenv bootmenu_2 "Reset: reset" # Set third menu entry
bootmenu 20 # Run bootmenu with autoboot delay 20s
--- common/Makefile | 1 + common/cmd_bootmenu.c | 316 ++++++++++++++++++++++++++++++++++++++++++++++ include/config_cmd_all.h | 1 + 3 files changed, 318 insertions(+), 0 deletions(-) create mode 100644 common/cmd_bootmenu.c
common/Makefile +1 -0
@@ -68,6 +68,7 @@ COBJS-$(CONFIG_CMD_SOURCE) += cmd_source.o COBJS-$(CONFIG_CMD_BDI) += cmd_bdinfo.o COBJS-$(CONFIG_CMD_BEDBUG) += bedbug.o cmd_bedbug.o COBJS-$(CONFIG_CMD_BMP) += cmd_bmp.o +COBJS-$(CONFIG_CMD_BOOTMENU) += cmd_bootmenu.o COBJS-$(CONFIG_CMD_BOOTLDR) += cmd_bootldr.o COBJS-$(CONFIG_CMD_CACHE) += cmd_cache.o COBJS-$(CONFIG_CMD_CONSOLE) += cmd_console.o
common/cmd_bootmenu.c new file +316 -0
316 lines not on this page · raw message
include/config_cmd_all.h +1 -0
@@ -20,6 +20,7 @@#define CONFIG_CMD_BEDBUG /* Include BedBug Debugger */ #define CONFIG_CMD_BMP /* BMP support */ #define CONFIG_CMD_BOOTD /* bootd */ +#define CONFIG_CMD_BOOTMENU /* ANSI terminal Boot Menu */ #define CONFIG_CMD_BSP /* Board Specific functions */ #define CONFIG_CMD_CACHE /* icache, dcache */ #define CONFIG_CMD_CDP /* Cisco Discovery Protocol */
Signature · 1 line
1.7.4.1
Mike Frysinger
NAKPATCH 12/15 New command bootmenu: ANSI terminal Boot Menu support
NAK: someone has just posted menu support to the list. we dont want multiple implementations getting merged.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20110901/3601f4de/attachment.pgp
PATCH 12/15 New command bootmenu: ANSI terminal Boot Menu support
Quoted 2 lines · On Thursday 01 September 2011 09:59:05 you wrote:
NAK: someone has just posted menu support to the list. we dont want multiple implementations getting merged.
ok, if my bootmenu is not for upstream I move bootmenu support (with rx51 board) into separate patch which can be applied on top of master.
Quoted 1 line
-mike
Signature · 9 lines
Pali Roh?r pali.rohar at gmail.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 198 bytes Desc: This is a digitally signed message part. Url : http://lists.denx.de/pipermail/u-boot/attachments/20111009/88749878/attachment.pgp
PATCH 13/15 New config variable CONFIG_MENU
In reply to Pali Rohár * If defined CONFIG_MENU and CONFIG_MENUKEY to 0 run env "menu_cmd" if key any pressed
* If defined CONFIG_MENU and other CONFIG_MENUKEY run env "menu_cmd" if key pressed is save as CONFIG_MENUKEY
* If defined CONFIG_MENU and not CONFIG_MENUKEY run env "menu_cmd" always
* If not defined CONFIG_MENU do nothing
* CONFIG_MENUKEY working only if defined CONFIG_MENU and CONFIG_BOOTDELAY >= 0
--- common/main.c | 32 +++++++++++++++++++++----------- 1 files changed, 21 insertions(+), 11 deletions(-)
common/main.c +21 -11
@@ -81,6 +81,19 @@ int do_mdm_init = 0;extern void mdm_init (void );/* defined in board.c */ #endif +#if defined (CONFIG_MENUKEY ) && ! defined (CONFIG_MENU ) && ( ! defined(CONFIG_BOOTDELAY ) ||CONFIG_BOOTDELAY <0 ) +#error CONFIG_MENUKEY is defined, but not CONFIG_MENU and/or CONFIG_BOOTDELAY >= 0 +#error define CONFIG_MENU and CONFIG_BOOTDELAY too +#endif + +#ifdef CONFIG_MENU +# ifdef CONFIG_MENUKEY +static int menucmd =0 ; +# else +static int menucmd =1 ; +# endif +#endif +/*************************************************************************** * Watch for 'delay' seconds for autoboot stop or autoboot delay string. * returns: 0 - no key string, allow autoboot
@@ -198,10 +211,6 @@ static inline int abortboot(int bootdelay)# else /* !defined(CONFIG_AUTOBOOT_KEYED) */ -#ifdef CONFIG_MENUKEY -static int menukey =0 ; -#endif -static inline int abortboot (int bootdelay) {int abort =0 ;
@@ -235,8 +244,9 @@ static inline int abortboot(int bootdelay)if (tstc ()) {/* we got a key press */ abort =1 ;/* don't auto boot */ bootdelay =0 ;/* no more delay */ -# ifdef CONFIG_MENUKEY - menukey =getc (); +# if defined (CONFIG_MENU ) && defined (CONFIG_MENUKEY ) +if (CONFIG_MENUKEY ==0 ||CONFIG_MENUKEY ==getc ()) + menucmd =1 ;# else (void )getc ();/* consume input */ # endif
@@ -264,6 +274,7 @@ static inline int abortboot(int bootdelay)void main_loop (void ) { +char *s;#ifndef CONFIG_SYS_HUSH_PARSER static char lastcommand[CONFIG_SYS_CBSIZE ] = {0 , };int len;
@@ -272,7 +283,6 @@ void main_loop (void)#endif #if defined(CONFIG_BOOTDELAY ) && (CONFIG_BOOTDELAY >=0 ) -char *s;int bootdelay;#endif #ifdef CONFIG_PREBOOT
@@ -387,9 +397,10 @@ void main_loop (void)disable_ctrlc (prev);/* restore Control C checking */ # endif } +#endif /* CONFIG_BOOTDELAY */ -# ifdef CONFIG_MENUKEY -if (menukey ==CONFIG_MENUKEY ) { +#ifdef CONFIG_MENU +if (menucmd ==1 ) { s =getenv ("menucmd" );if (s) {# ifndef CONFIG_SYS_HUSH_PARSER
@@ -400,8 +411,7 @@ void main_loop (void) # endif } } -#endif /* CONFIG_MENUKEY */ -#endif /* CONFIG_BOOTDELAY */ +#endif /* * Main Loop for Monitor Command Processing
Signature · 1 line
1.7.4.1
PATCH 14/15 New config variable CONFIG_PREMONITOR
In reply to Pali Rohár* if defined run env "premonitor" before Main Loop for Monitor Command Processing
--- common/env_common.c | 3 +++ common/main.c | 10 ++++++++++ 2 files changed, 13 insertions(+), 0 deletions(-)
common/env_common.c +3 -0
@@ -99,6 +99,9 @@ const uchar default_environment[] = {#ifdef CONFIG_PREBOOT "preboot=" CONFIG_PREBOOT "\0"#endif +#ifdef CONFIG_PREMONITOR + "premonitor=" CONFIG_PREMONITOR "\0" +#endif #ifdef CONFIG_ROOTPATH "rootpath=" MK_STR(CONFIG_ROOTPATH) "\0"#endif
common/main.c +10 -0
@@ -413,6 +413,16 @@ void main_loop (void) }#endif +#ifdef CONFIG_PREMONITOR +if ((s =getenv ("premonitor" )) !=NULL ) { +# ifndef CONFIG_SYS_HUSH_PARSER +run_command (s,0 ); +# else +parse_string_outer (s,FLAG_PARSE_SEMICOLON |FLAG_EXIT_FROM_LOOP ); +# endif + } +#endif /* CONFIG_PREMONITOR */ +/* * Main Loop for Monitor Command Processing */
Signature · 1 line
1.7.4.1
PATCH 15/15 RX-51: Add support for bootmenu
In reply to Pali Rohár--- include/configs/nokia_rx51.h | 54 +++++++++++++++++++++++++++++++----------- 1 files changed, 40 insertions(+), 14 deletions(-)
include/configs/nokia_rx51.h +40 -14
@@ -130,6 +130,8 @@#define CONFIG_CMD_MMC /* MMC support */ #define CONFIG_CMD_ONENAND /* NAND support */ +#define CONFIG_CMD_BOOTMENU /* ANSI terminal Boot Menu */ +#undef CONFIG_CMD_FLASH/* flinfo, erase, protect */ #undef CONFIG_CMD_FPGA/* FPGA configuration Support */ #undef CONFIG_CMD_IMI/* iminfo */
@@ -176,7 +178,7 @@ int rx51_kp_getc(void);#endif /* Environment information */ -#define CONFIG_BOOTDELAY 3 +#define CONFIG_MENU #define CONFIG_EXTRA_ENV_SETTINGS \ "usbtty=cdc_acm\0" \
@@ -191,29 +193,42 @@ int rx51_kp_getc(void);"meegoargs=setenv bootargs\0" \"loadbootscript=fatload mmc 0:3 ${loadaddr} boot.scr\0" \"loadibootscript=fatload mmc 2:1 ${loadaddr} boot.scr\0" \ -"bootscript=echo Running bootscript from mmc ...; " \ +"bootscript=echo Running bootscript ...; " \"source ${loadaddr}\0" \"loaduimage=fatload mmc 0:3 ${loadaddr} uImage\0" \"loadiuimage=fatload mmc 2:1 ${loadaddr} uImage\0" \ -"mmcboot=echo Booting from mmc ...; " \ -"run meegoargs; " \ -"bootm ${loadaddr}\0" \"noloboot=echo Booting NOLO supplied kernel ...; " \"setenv atags ${nolo_atagaddr};" \"bootm ${nolo_kernaddr}\0" \ -"mmciboot=echo Booting from internal mmc ...; " \ -"fatload mmc 2:1 ${loadaddr} uImage;" \ +"mmcboot=echo Booting from external SD card ...; " \ +"loaduimage; " \"run meegoargs; " \ - "bootm ${loadaddr}\0" +"bootm ${loadaddr}\0" \ +"mmciboot=echo Booting from internal eMMC memory ...; " \ +"loadiuimage; " \ +"run meegoargs; " \ +"bootm ${loadaddr}\0" \ +"menucmd=bootmenu\0" \ +"bootmenu_0=Maemo 5 kernel (Internal flash): run noloboot\0" \ +"bootmenu_1=Boot script (Internal eMMC, partition 1): if run loadibootscript; then run bootscript; fi\0" \ +"bootmenu_2=Boot script (External SD card, partition 3): if run loadbootscript; then run bootscript; fi\0" \ +"bootmenu_3=uImage kernel (Internal eMMC, partition 1): run mmciboot\0" \ +"bootmenu_4=uImage kernel (External SD card, partition 3): run mmcboot\0" \ +"bootmenu_5=Follow U-Boot boot order: boot\0" \ + "bootmenu_delay=3\0"#define CONFIG_PREBOOT \ - "if test $slide_sw != open ; then run noloboot; fi ;" \ + "if test $slide_sw != open; then setenv bootmenu_delay 0; fi" + +#define CONFIG_PREMONITOR \ "echo Extra commands:;" \ "echo run sercon - Use serial port for control.;" \ "echo run usbcon - Use usbtty for control.;" \ "echo run vgacon - Use framebuffer/keyboard.;" \ + "echo run noloboot - Boot kernel loaded by NOLO.;" \ + "echo run mmciboot - Boot from internal eMMC.;" \ "echo run mmcboot - Boot from SD card slot.;" \ - "echo run noloboot - Boot kernel loaded by NOLO." + "echo"#define CONFIG_BOOTCOMMAND \ "if mmc init; then " \
@@ -225,13 +240,24 @@ int rx51_kp_getc(void);"echo Found boot.scr on mmc 0:3; " \"run bootscript; " \"else " \ -"if run loaduimage; then " \ -"run mmcboot; " \ -"else run noloboot; " \ +"if run loadiuimage; then " \ +"echo Found uImage on mmc 2:1; " \ +"run mmciboot; " \ +"else " \ +"if run loaduimage; then " \ +"echo Found uImage on mmc 0:3; " \ +"run mmcboot; " \ +"else " \ +"echo Not found boot.scr or uImage on mmc 2:1 or 0:3; " \ +"run noloboot; " \ +"fi; " \"fi; " \"fi; " \"fi; " \ - "else run noloboot; fi" +"else " \ +"echo Initializing eMMC and/or SD card failed; " \ +"run noloboot; " \ + "fi"#define CONFIG_AUTO_COMPLETE 1/*
Signature · 1 line
1.7.4.1
PATCH 1/15 Make bootm optionally use pre-existing atags for Linux kernel boot.
In reply to Pali Rohárarch/arm/lib/bootm.c int do_bootm_linux(int flag, int argc, char *argv[], bootm_headers_t *images) · line 108
Quoted 6 lines
arch/arm/lib/bootm.c +6
-0+#ifdef CONFIG_CHAINLOADER +uint params; +#define PARAMS params +#else +#define PARAMS (bd->bi_boot_params) +#endif
do not indent the "#" with preprocessors
also, this can be rewritten a bit. always declare uint params regardless of the define, and then when in the chainloader logic, set it to the env value, otherwise set it to bd->bi_boot_params. then you can delete this dedicated and ugly "PARAMS" define.
Quoted 1 line
+#ifdef
CONFIG_CHAINLOADER
this is kind of a crappy define. how about "CONFIG_ATAGSADDR".
also, you'll need to update toplevel README to document the new option.
arch/arm/lib/bootm.c int do_bootm_linux(int flag, int argc, char *argv[], bootm_headers_t *images) · line 136
Quoted 1 line
arch/arm/lib/bootm.c +1
-0+ s =getenv ("atags" );
"atagsaddr" is probably a better name as a plain "atags" can be interpreted multiple ways
arch/arm/lib/bootm.c int do_bootm_linux(int flag, int argc, char *argv[], bootm_headers_t *images) · line 138
Quoted 1 line
arch/arm/lib/bootm.c +1
-0+ params =simple_strtoul (s,NULL ,16 );
no spaces before the open paren in func calls.
wrong: foo (a);
right: foo(a);
arch/arm/lib/bootm.c int do_bootm_linux(int flag, int argc, char *argv[], bootm_headers_t *images) · line 139
Quoted 1 line
arch/arm/lib/bootm.c +1
-0+printf ("Using existing atags at 0x%x\n" , params);
0x%x -> %#x
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20110901/521a388d/attachment.pgp
PATCH 1/15 Make bootm optionally use pre-existing atags for Linux kernel boot.
Quoted 8 lines · On Thursday 01 September 2011 09:52:08 you wrote:
arch/arm/lib/bootm.c int do_bootm_linux(int flag, int argc, char *argv[], bootm_headers_t *images) · line 108
Quoted 6 lines
arch/arm/lib/bootm.c +6
-0+#ifdef CONFIG_CHAINLOADER +uint params; +#define PARAMS params +#else +#define PARAMS (bd->bi_boot_params) +#endif do not indent the "#" with preprocessors
ok
Quoted 5 lines
also, this can be rewritten a bit. always declare uint params regardless of the define, and then when in the chainloader logic, set it to the env value, otherwise set it to
bd->bi_boot_params. then you can delete this dedicated and ugly "PARAMS" define.
ok, PARAMS was deleted.
Quoted 4 lines
Quoted 2 lines
+#ifdef
CONFIG_CHAINLOADERthis is kind of a crappy define. how about "
CONFIG_ATAGSADDR".
I think that here CONFIG_CHAINLOADER is not needed. I think that bootm can use other atag without needed defined CONFIG_CHAINLOADER.
Quoted 2 lines
also, you'll need to update toplevel README to document the new option.
ok, I update toplevel README file.
Quoted 5 lines
arch/arm/lib/bootm.c int do_bootm_linux(int flag, int argc, char *argv[], bootm_headers_t *images) · line 136
Quoted 2 lines
arch/arm/lib/bootm.c +1
-0+ s =getenv ("atags" );"atagsaddr" is probably a better name as a plain "atags" can be interpreted multiple ways
renamed to atagaddr.
Quoted 6 lines
arch/arm/lib/bootm.c int do_bootm_linux(int flag, int argc, char *argv[], bootm_headers_t *images) · line 138
Quoted 2 lines
arch/arm/lib/bootm.c +1
-0+ params =simple_strtoul (s,NULL ,16 );no spaces before the open paren in func calls.
wrong: foo (a);
right: foo(a);
fixed
Quoted 4 lines
arch/arm/lib/bootm.c int do_bootm_linux(int flag, int argc, char *argv[], bootm_headers_t *images) · line 139
Quoted 2 lines
arch/arm/lib/bootm.c +1
-0+printf ("Using existing atags at 0x%x\n" , params);0x%x -> %#x
fixed
Quoted 1 line
-mike
Signature · 9 lines
Pali Roh?r pali.rohar at gmail.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 198 bytes Desc: This is a digitally signed message part. Url : http://lists.denx.de/pipermail/u-boot/attachments/20111009/784cf424/attachment.pgp
Dear Pali =?ISO-8859-1?Q?Roh=E1r?=,
Quoted 3 lines · In message <34603899.3xsChgV26D@pali-elitebook> you wrote:
Ok, I attached all patches which I rebased on top of master. But U-Boot still not working, not booting, no output on device.
Please stick to standard patch submission rules - all patches must be submitted inline; MIME attachments are strongly discouraged. Fpr details pleass see http://www.denx.de/wiki/U-Boot/Patches
Quoted 9 lines
From: Alistair Buxton <[email protected]>
Date: Wed, 1 Sep 2010 23:07:20 +0100
Subject: [PATCH 01/15] Make bootm optionally use pre-existing atags for Linux kernel boot.This patch adapts the bootm command so that it can use an existing atags command set up by a previous bootloader. If the environment variable "atags" is unset, bootm behaves as normal. If "atags" is set, bootm will skip all boot args setup entirely, and pass the address found in "atags". For example, if a previous boot loader already set up the atags struct at
0x80000100:
This has zero chances for being mainlined. Please stick with standard boot commands, and adapt this for a standard SPL approach.
Quoted 8 lines
From: Alistair Buxton <[email protected]>
Date: Wed, 1 Sep 2010 23:04:03 +0100
Subject: [PATCH 02/15] Store existing atags at startup if chainloading.This patch stores the values in r1 and r2 at startup. It also stores the address which u-boot was originally loaded to. This is useful if you feed some other bootloader a u-boot.bin instead of the linux kernel it was expecting. It is rather ugly because it stores these values in an arbitrary memory address.
Ditto. This should be adapted to fit into the regular SPL framework instead.
...
Quoted 7 lines
From: Alistair Buxton <[email protected]>
Date: Mon, 6 Sep 2010 03:01:34 +0100
Subject: [PATCH 03/15] Nokia RX-51 aka N900 supportThis board definition results in a u-boot.bin which can be chainloaded from NOLO in qemu or on a real N900. It does very little hardware config because NOLO has already configured the board.
As mentioned before, this is normal in a SPL context.
board/nokia/rx51/config.mk
Quoted 2 lines
board/nokia/rx51/config.mk new file +0
-0
Please get rid of board specific config.mk files.
Quoted 1 line
+TEXT_BASE
0x80e80000
This is wrong and needs to be fixed anyway.
board/nokia/rx51/config.mk
Quoted 3 lines
board/nokia/rx51/config.mk new file +3
-0+int board_init(void) +{ + DECLARE_GLOBAL_DATA_PTR;
This cannot work.. The compiler miscompiles this. This declaration MUST be done at file scope.
Quoted 12 lines
board/nokia/rx51/config.mk new file +12
-0+ /* turn on keyboard and use hardware scanning */ + ctrl |TWL4030_KEYPAD_CTRL_KBD_ON; + ctrl |TWL4030_KEYPAD_CTRL_SOFT_NRST; + ctrl |TWL4030_KEYPAD_CTRL_SOFTMODEN; + ret |twl4030_i2c_write_u8(TWL4030_CHIP_KEYPAD, ctrl, + TWL4030_KEYPAD_KEYP_CTRL_REG); + /* enable key event status */ + ret |twl4030_i2c_write_u8(TWL4030_CHIP_KEYPAD, 0xfe, + TWL4030_KEYPAD_KEYP_IMR1); + /* using the second interrupt event breaks meamo pr1.2 kernel */ + /*ret |twl4030_i2c_write_u8(TWL4030_CHIP_KEYPAD, 0xfe, + TWL4030_KEYPAD_KEYP_IMR2);*/
board/nokia/rx51/config.mk
Quoted 10 lines
board/nokia/rx51/config.mk new file +10
-0+ /* enable missed event tracking */ + /*ret |twl4030_i2c_write_u8(TWL4030_CHIP_KEYPAD, 0x20, + TWL4030_KEYPAD_KEYP_SMS);*/ + /* enable interrupt generation on rising and falling */ + /* this is a workaround for qemu twl4030 emulation */ + ret |twl4030_i2c_write_u8(TWL4030_CHIP_KEYPAD, 0x57, + TWL4030_KEYPAD_KEYP_EDR); + /* enable ISR clear on read */ + ret |twl4030_i2c_write_u8(TWL4030_CHIP_KEYPAD, 0x05, + TWL4030_KEYPAD_KEYP_SIH_CTRL);
I have no idea what you think this code is doing. It will definitely not be accepted for mainline.
Also, please make sure to remove dead (commented out) code.
...
Quoted 5 lines
include/configs/nokia_rx51.h new file +0
-0
...
include/configs/nokia_rx51.h
Quoted 6 lines
include/configs/nokia_rx51.h new file +6
-0+#define CONFIG_ARMV7 1/* This is an ARM V7 CPU core */ +#define CONFIG_OMAP 1/* in a TI OMAP core */ +#define CONFIG_OMAP34XX 1/* which is a 34XX */ +#define CONFIG_OMAP3430 1/* which is in a 3430 */ +#define CONFIG_OMAP3_RX51 1/* working with RX51 */ +#define CONFIG_CHAINLOADER 1/* Loaded by NOLO */
Please never set any values for #defines which select features only. Please fix globally.
...
Quoted 15 lines
From
c5c232a3669bed778c438db0280ea78273d17e25Mon Sep 17 00:00:00 2001
From: Matan Ziv-Av <[email protected]>
Date: Tue, 7 Dec 2010 12:01:34 +0100
Subject: [PATCH 04/15] Only delay boot if keyboard open--- board/nokia/rx51/rx51.c | 7 +++++++ include/configs/nokia_rx51.h | 1 + 2 files changed, 8 insertions(+), 0 deletions(-)board/nokia/rx51/rx51.c +0
-0
board/nokia/rx51/rx51.c int misc_init_r(void) · line 108
Quoted 5 lines
board/nokia/rx51/rx51.c +2
-0@@ -104,6 +104,13 @@ int misc_init_r(void)setenv ("nolo_atagaddr" , buf);#endif +// set environment variable slide_sw +// if keyboard slide is open/close
C++ comments are not allowed. Please fix globally. Make sure to run your patches through checkpatch.
Quoted 3 lines
From: Matan Ziv-Av <[email protected]>
Date: Tue, 7 Dec 2010 12:03:38 +0100
Subject: [PATCH 05/15] Change Wireless LAN mode from M4 to M0
Please squash into earlier patch that creates this file.
Quoted 7 lines
--- board/nokia/rx51/rx51.h | 20 ++++++++++---------- 1 files changed, 10 insertions(+), 10 deletions(-)From: Matan Ziv-Av <[email protected]>
Date: Tue, 7 Dec 2010 12:08:54 +0100
Subject: [PATCH 06/15] Look for boot.scr on 'mmc 0:3' instead 'mmc 0' and add support for loading boot.scr from 'mmc 2:1'
Subject too long.
Please squash into earlier patch that creates this file.
Quoted 3 lines
From: ?UTF-8?q?Pali Roh??r?<[email protected]>
Date: Thu, 1 Sep 2011 12:13:32 +0200
Subject: [PATCH 07/15] RX-51: Fixed compilation on top of master (changes from Beagle Board)
Please squash into earlier patch that creates these files.
Quoted 5 lines
From: ?UTF-8?q?Pali Roh??r?<[email protected]>
Date: Wed, 31 Aug 2011 10:58:35 +0200
Subject: [PATCH 08/15] RX-51: Add support for resetting twl4030 watchdog* use
test_and_set_bitand__clear_bitto access twl4030 i2c bus only once at same time
Mind line length. Please fix globally.
board/nokia/rx51/rx51.c
Quoted 1 line
board/nokia/rx51/rx51.c +1
-0+__clear_bit (0 , &twl_chip_lock);
Don't invent yoru own macros when we have standard mecros in place that do the same (here: clrbits_*() from <asm/io.h>).
board/nokia/rx51/rx51.c int rx51_kp_getc(void) · line 281
Quoted 6 lines
board/nokia/rx51/rx51.c +1
-1@@ -256,7 +278,6 @@ int rx51_kp_getc(void) { keybuf_head %KEYBUF_SIZE ;while (!rx51_kp_tstc ()) - ; +udelay (10000 );
Use a much shorter delay here, maybe even udelay(1).
Quoted 7 lines
From: ?UTF-8?q?Pali Roh??r?<[email protected]>
Date: Wed, 31 Aug 2011 11:02:08 +0200
Subject: [PATCH 09/15] RX-51: Fix keymap* make functions and variables static
* add support for additional key combination with ctrl and fn
* add support for keys: up, down, left, right,volume_up,volume_down
Squash into earlier patches.
Quoted 7 lines
From: ?UTF-8?q?Pali Roh??r?<[email protected]>
Date: Wed, 31 Aug 2011 15:40:58 +0200
Subject: [PATCH 10/15]include/common.h: Add some macros for ANSI escape codes--- include/common.h | 32 ++++++++++++++++++++++++++++++++ 1 files changed, 32 insertions(+), 0 deletions(-)
This does not belong into common.h.
...
Quoted 3 lines
From: ?UTF-8?q?Pali Roh??r?<[email protected]>
Date: Wed, 31 Aug 2011 15:41:24 +0200
Subject: [PATCH 11/15]drivers/video/cfb_console.c: Added support for ANSI escape codes
This has several issues:
- You add it unconditionally, thus blowing up the code soze for everybody, whether they want this feature or not.
- You add it only here, not to all console drivers, thus creating incompatible behaviour. This is not nice.
board/nokia/rx51/rx51.c
Quoted 9 lines
board/nokia/rx51/rx51.c +9
-0+static void console_set_text_color (int c) +{ +// TODO +} + +static void console_set_background_color (int c) +{ +// TODO +}
Either implement the code, or omit the functions alltogeter. Do not add dead code.
...
board/nokia/rx51/rx51.c
Quoted 7 lines
board/nokia/rx51/rx51.c +7
-0+ if (num1 0) //reset swapped colors + { +if (ansi_colors_need_revert) + { +console_swap_colors (); + ansi_colors_need_revert 0; + }
Incorrect brace style. Please fix globally.
Quoted 5 lines
From: =?UTF-8?q?Pali=20Roh=C3=A1r?= <[email protected]>
Date: Wed, 31 Aug 2011 12:07:50 +0200
Subject: [PATCH 12/15] New command bootmenu: ANSI terminal Boot Menu support* Configuration is done via env variables
bootmenu_delayand bootmenu_<num>:
Please check if you can rather use Jason Hobbs' "Add generic, reusable menu code" patch series.
...
Quoted 5 lines
From: ?UTF-8?q?Pali Roh??r?<[email protected]>
Date: Wed, 31 Aug 2011 14:12:06 +0200
Subject: [PATCH 14/15] New config variableCONFIG_PREMONITOR* if defined run env "premonitor" before Main Loop for Monitor Command Processing
What does this do that preboot cannot do?
Best regards,
Wolfgang Denk
Signature · 5 lines
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: wd at denx.de Unix: Some say the learning curve is steep, but you only have to climb it once. - Karl Lehenbauer
Quoted 9 lines · On Thursday 01 September 2011 13:53:42 you wrote:
Dear Pali =?ISO-8859-1?Q?Roh=E1r?=,
Quoted 2 lines · In message <34603899.3xsChgV26D@pali-elitebook> you wrote:
Ok, I attached all patches which I rebased on top of master. But U-Boot still not working, not booting, no output on device.
Please stick to standard patch submission rules - all patches must be submitted inline; MIME attachments are strongly discouraged. Fpr details pleass see http://www.denx.de/wiki/U-Boot/Patches
I wrote that this patch series was incomplete and not correct. I will fix that and I will use git send-email.
Quoted 6 lines
Quoted 6 lines
From: Alistair Buxton <[email protected]>
Date: Wed, 1 Sep 2010 23:07:20 +0100
Subject: [PATCH 01/15] Make bootm optionally use pre-existing atags for Linux kernel boot.
Quoted 8 lines
Quoted 6 lines
This patch adapts the bootm command so that it can use an existing atags command set up by a previous bootloader. If the environment variable "atags" is unset, bootm behaves as normal. If "atags" is set, bootm will skip all boot args setup entirely, and pass the address found in "atags". For example, if a previous boot
loader already set up the atags struct at0x80000100:This has zero chances for being mainlined. Please stick with standard boot commands, and adapt this for a standard SPL approach.
what is problem with using bi_boot_params from enviromental variable atagaddr? what is SPL?
Quoted 5 lines
Quoted 5 lines
From: Alistair Buxton <[email protected]>
Date: Wed, 1 Sep 2010 23:04:03 +0100
Subject: [PATCH 02/15] Store existing atags at startup if chainloading.
Quoted 7 lines
Quoted 5 lines
This patch stores the values in r1 and r2 at startup. It also stores the address which u-boot was originally loaded to. This is useful if you feed some other bootloader a u-boot.bin instead of the linux kernel it was expecting. It is rather ugly because it stores these values in an arbitrary memory address.
Ditto. This should be adapted to fit into the regular SPL framework instead.
so, what is correct way how to store atag address (register r2) for board code?
Quoted 11 lines
...
Quoted 7 lines
From: Alistair Buxton <[email protected]>
Date: Mon, 6 Sep 2010 03:01:34 +0100
Subject: [PATCH 03/15] Nokia RX-51 aka N900 supportThis board definition results in a u-boot.bin which can be chainloaded from NOLO in qemu or on a real N900. It does very little hardware config because NOLO has already configured the board.
Quoted 6 lines
As mentioned before, this is normal in a SPL context.
board/nokia/rx51/config.mk
Quoted 2 lines
board/nokia/rx51/config.mk new file +0
-0Please get rid of board specific config.mk files.
file deleted
Quoted 11 lines
Quoted 2 lines
+TEXT_BASE
0x80e80000This is wrong and needs to be fixed anyway.
board/nokia/rx51/config.mk
Quoted 3 lines
board/nokia/rx51/config.mk new file +3
-0+int board_init(void) +{ + DECLARE_GLOBAL_DATA_PTR;This cannot work.. The compiler miscompiles this. This declaration MUST be done at file scope.
fixed
Quoted 18 lines
Quoted 18 lines
board/nokia/rx51/config.mk new file +17
-0+ /* turn on keyboard and use hardware scanning */ + ctrl |TWL4030_KEYPAD_CTRL_KBD_ON; + ctrl |TWL4030_KEYPAD_CTRL_SOFT_NRST; + ctrl |TWL4030_KEYPAD_CTRL_SOFTMODEN; + ret |twl4030_i2c_write_u8(TWL4030_CHIP_KEYPAD, ctrl, + TWL4030_KEYPAD_KEYP_CTRL_REG); + /* enable key event status */ + ret |twl4030_i2c_write_u8(TWL4030_CHIP_KEYPAD, 0xfe, + TWL4030_KEYPAD_KEYP_IMR1); + /* using the second interrupt event breaks meamo pr1.2 kernel */ + /*ret |twl4030_i2c_write_u8(TWL4030_CHIP_KEYPAD, 0xfe, + TWL4030_KEYPAD_KEYP_IMR2);*/ + /* enable missed event tracking */ + /*ret |twl4030_i2c_write_u8(TWL4030_CHIP_KEYPAD, 0x20, + TWL4030_KEYPAD_KEYP_SMS);*/ + /* enable interrupt generation on rising and falling */ + /* this is a workaround for qemu twl4030 emulation */
Quoted 8 lines
board/nokia/rx51/config.mk
Quoted 5 lines
board/nokia/rx51/config.mk new file +5
-0+ ret |twl4030_i2c_write_u8(TWL4030_CHIP_KEYPAD, 0x57, + TWL4030_KEYPAD_KEYP_EDR); + /* enable ISR clear on read */ + ret |twl4030_i2c_write_u8(TWL4030_CHIP_KEYPAD, 0x05, + TWL4030_KEYPAD_KEYP_SIH_CTRL);I have no idea what you think this code is doing. It will definitely not be accepted for mainline.
this enable HW keyboard
Quoted 2 lines
Also, please make sure to remove dead (commented out) code.
ok, commented code will be deleted
Quoted 11 lines
...
Quoted 5 lines
include/configs/nokia_rx51.h new file +0
-0...
Quoted 9 lines
include/configs/nokia_rx51.h
Quoted 6 lines
include/configs/nokia_rx51.h new file +6
-0+#define CONFIG_ARMV7 1/* This is an ARM V7 CPU core */ +#define CONFIG_OMAP 1/* in a TI OMAP core */ +#define CONFIG_OMAP34XX 1/* which is a 34XX */ +#define CONFIG_OMAP3430 1/* which is in a 3430 */ +#define CONFIG_OMAP3_RX51 1/* working with RX51 */ +#define CONFIG_CHAINLOADER 1/* Loaded by NOLO */ Please never set any values for #defines which select features only. Please fix globally.
fixed all defines
Quoted 22 lines
...
Quoted 19 lines
From
c5c232a3669bed778c438db0280ea78273d17e25Mon Sep 17 00:00:00 2001
From: Matan Ziv-Av <[email protected]>
Date: Tue, 7 Dec 2010 12:01:34 +0100
Subject: [PATCH 04/15] Only delay boot if keyboard open---
board/nokia/rx51/rx51.c | 7 +++++++ include/configs/nokia_rx51.h | 1 + 2 files changed, 8 insertions(+), 0 deletions(-)board/nokia/rx51/rx51.c +0
-0@@ -104,6 +104,13 @@ int misc_init_r(void)setenv ("nolo_atagaddr" , buf);
Quoted 7 lines
board/nokia/rx51/rx51.c int misc_init_r(void) · line 110
Quoted 4 lines
board/nokia/rx51/rx51.c +2
-0#endif +// set environment variable slide_sw +// if keyboard slide is open/close C++ comments are not allowed. Please fix globally. Make sure to run your patches through checkpatch.
"//" comments changed to /* .. */
Quoted 6 lines
Quoted 4 lines
From: Matan Ziv-Av <[email protected]>
Date: Tue, 7 Dec 2010 12:03:38 +0100
Subject: [PATCH 05/15] Change Wireless LAN mode from M4 to M0Please squash into earlier patch that creates this file.
I will squash all board files/commits into one patch.
Quoted 24 lines
Quoted 10 lines
---
board/nokia/rx51/rx51.h | 20 ++++++++++---------- 1 files changed, 10 insertions(+), 10 deletions(-)From: Matan Ziv-Av <[email protected]>
Date: Tue, 7 Dec 2010 12:08:54 +0100
Subject: [PATCH 06/15] Look for boot.scr on 'mmc 0:3' instead 'mmc 0' and add support for loading boot.scr from 'mmc 2:1'Subject too long.
Please squash into earlier patch that creates this file.
Quoted 4 lines
From: ?UTF-8?q?Pali Roh??r?<[email protected]>
Date: Thu, 1 Sep 2011 12:13:32 +0200
Subject: [PATCH 07/15] RX-51: Fixed compilation on top of master (changes from Beagle Board)Please squash into earlier patch that creates these files.
Quoted 4 lines
From: ?UTF-8?q?Pali Roh??r?<[email protected]>
Date: Wed, 31 Aug 2011 10:58:35 +0200
Subject: [PATCH 08/15] RX-51: Add support for resetting twl4030 watchdog
Quoted 8 lines
Quoted 2 lines
* use
test_and_set_bitand__clear_bitto access twl4030 i2c bus only once at same timeMind line length. Please fix globally.
board/nokia/rx51/rx51.c
Quoted 1 line
board/nokia/rx51/rx51.c +1
-0+__clear_bit (0 , &twl_chip_lock);Don't invent yoru own macros when we have standard mecros in place that do the same (here: clrbits_*() from <
asm/io.h>).
I think that these are standrad macros. test_and_set_bit and __clear_bit are defined in include/asm/bitops.h and include/linux/bitops.h
Quoted 5 lines
Quoted 5 lines
board/nokia/rx51/rx51.c +0
-0@@ -256,7 +278,6 @@ int rx51_kp_getc(void) {
Quoted 7 lines
board/nokia/rx51/rx51.c int rx51_kp_getc(void)
Quoted 5 lines
board/nokia/rx51/rx51.c +1
-1keybuf_head %KEYBUF_SIZE ;while (!rx51_kp_tstc ()) - ; +udelay (10000 );Use a much shorter delay here, maybe even udelay(1).
Ok I'm using udelay(1) + hw_watchdog_reset()
Quoted 16 lines
Quoted 8 lines
From: ?UTF-8?q?Pali Roh??r?<[email protected]>
Date: Wed, 31 Aug 2011 11:02:08 +0200
Subject: [PATCH 09/15] RX-51: Fix keymap* make functions and variables static
* add support for additional key combination with ctrl and fn
* add support for keys: up, down, left, right,volume_up,volume_downSquash into earlier patches.
Quoted 5 lines
From: ?UTF-8?q?Pali Roh??r?<[email protected]>
Date: Wed, 31 Aug 2011 15:40:58 +0200
Subject: [PATCH 10/15]include/common.h: Add some macros for ANSI escape codes
Quoted 6 lines
Quoted 4 lines
---
include/common.h | 32 ++++++++++++++++++++++++++++++++ 1 files changed, 32 insertions(+), 0 deletions(-)This does not belong into
common.h.
So where it should be defined?
Quoted 11 lines
...
Quoted 4 lines
From: ?UTF-8?q?Pali Roh??r?<[email protected]>
Date: Wed, 31 Aug 2011 15:41:24 +0200
Subject: [PATCH 11/15]drivers/video/cfb_console.c: Added support for ANSI escape codesThis has several issues:
- You add it unconditionally, thus blowing up the code soze for everybody, whether they want this feature or not.
Ok, I create for this config macro (CONFIG_VIDEO_CFB_ANSI) which can enable/disable ANSI termal support in cfb video driver.
Quoted 2 lines
- You add it only here, not to all console drivers, thus creating incompatible behaviour. This is not nice.
Serial console output and usbtty are using host terminal (on PC). And all modern terminal support ANSI escape chars. So only framebuffer devices are without ANSI support. And this patch implement support fot standard framebuffer driver.
Quoted 13 lines
board/nokia/rx51/rx51.c
Quoted 10 lines
board/nokia/rx51/rx51.c +9
-0+static void console_set_text_color (int c) +{ +// TODO +} + +static void console_set_background_color (int c) +{ +// TODO +}Either implement the code, or omit the functions alltogeter. Do not add dead code.
background and text color is not used, functions deleted.
Quoted 12 lines
...
board/nokia/rx51/rx51.c
Quoted 7 lines
board/nokia/rx51/rx51.c +7
-0+ if (num1 0) //reset swapped colors + { +if (ansi_colors_need_revert) + { +console_swap_colors (); + ansi_colors_need_revert 0; + }Incorrect brace style. Please fix globally.
fixed
Quoted 6 lines
Quoted 6 lines
From: =?UTF-8?q?Pali=20Roh=C3=A1r?= <[email protected]>
Date: Wed, 31 Aug 2011 12:07:50 +0200
Subject: [PATCH 12/15] New command bootmenu: ANSI terminal Boot Menu support>
* Configuration is done via env variablesbootmenu_delayand
bootmenu_<num>:
Quoted 2 lines
Please check if you can rather use Jason Hobbs' "Add generic, reusable menu code" patch series.
I'd like to use for rx51 my bootmenu. I rebase bootmenu patches on top of master so then bootmenu can be simple added/deleted by one patch.
Quoted 10 lines
...
Quoted 6 lines
From: ?UTF-8?q?Pali Roh??r?<[email protected]>
Date: Wed, 31 Aug 2011 14:12:06 +0200
Subject: [PATCH 14/15] New config variableCONFIG_PREMONITOR* if defined run env "premonitor" before Main Loop for Monitor Command Processing
What does this do that preboot cannot do?
before running monitor loop I'd like wrote some info to console (specific board info, board commands, board macros). but if these info will be written in preboot it can be deleted by menu section. after preboot is running menu where can be used for example my bootmenu (which clean console output). so section after menu and before preboot is needed.
Quoted 5 lines
Best regards,
Wolfgang Denk
Signature · 9 lines
Pali Roh?r pali.rohar at gmail.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 198 bytes Desc: This is a digitally signed message part. Url : http://lists.denx.de/pipermail/u-boot/attachments/20111009/a96b9281/attachment.pgp
Quoted 18 lines · On Thursday 01 September 2011 10:42:48 you wrote:
Hello,
U-Boot patches which add support for Nokia RX-51 (aka N900) is here:
http://al.robotfuzz.com/~al/maemo/u-boot/RX-51 has closed 2nd stage bootloader NOLO which can load kernel image from nand (or usb) to ram and boot it. NOLO also done all HW initializations. These U-Boot patches for RX-51 add support that builded U-Boot binary can be loaded and booted by NOLO. So U-Boot will be 3rd bootloader.
Patches are on top of revision
bd2313078114c4b44c4a5ce149af43bcb7fc8854and working fine. I rebased these patches on top of u-boot git master repository, but booting failed. No output on device. Using git bisect I found that problem appeared at revision
561142af20f1fd7b425d9425730014e656defb91
ARM: implement relocation for ARM V7 (OMAP)
Quoted 8 lines
If I defined
CONFIG_SYS_ARM_WITHOUT_RELOCU-Boot working and booting fine up to revisiona9aa3926295df759306258e5e24cace414f53b67So problem is that relocation patches broke RX-51 support. Can somebody help me how to rewrite/port rx-51 patches to work with ARM relocation (do not forget that U-Boot is loaded by 2nd bootloader to RAM after HW is initialized by NOLO)? If U-Boot will be working on RX-51 I will prepair patches for upstreaming.
Ali1234 now fixed relocation problem on RX-51. I rebase and fix all patches.
https://github.com/ali1234/u-boot-
n900/commit/35669073e8f785acbc11c01faae531b5183ec3ba
Signature · 9 lines
Pali Roh?r pali.rohar at gmail.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 198 bytes Desc: This is a digitally signed message part. Url : http://lists.denx.de/pipermail/u-boot/attachments/20110901/bffcfe93/attachment.pgp
[U-Boot] U-Boot on Nokia RX-51 (aka N900)
In reply to Pali RohárHello,
I'm sending new patch series, which add Nokia RX-51 support to U-Boot. This patches are based on master commit 06e42c6e2ce269667daecd6229d0b7c813838203 and now U-Boot working on Nokia RX-51.
Signature · 9 lines
Pali Roh?r pali.rohar at gmail.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 198 bytes Desc: This is a digitally signed message part. URL: <http://lists.denx.de/pipermail/u-boot/attachments/20111217/4b5da6d7/attachment.pgp>
PATCH 1/16 arch/arm/cpu/armv7/omap3/lowlevel_init.S: save_boot_params
* Hide function save_boot_params if CONFIG_SPL_BUILD is not defined (function do nothing)
* Same behaviour as in file arch/arm/cpu/armv7/omap4/lowlevel_init.S
* This allow to implement board specified function save_boot_params in board code
--- arch/arm/cpu/armv7/omap3/lowlevel_init.S | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
arch/arm/cpu/armv7/omap3/lowlevel_init.S +2 -2
@@ -35,15 +35,15 @@ _TEXT_BASE: .word CONFIG_SYS_TEXT_BASE /* sdram load addr from config.mk */ +#ifdef CONFIG_SPL_BUILD .global save_boot_params save_boot_params: -#ifdef CONFIG_SPL_BUILD ldr r4, =omap3_boot_device ldr r5, [r0, #0x4] and r5, r5, #0xff str r5, [r4] -#endif bx lr +#endif .global omap3_gp_romcode_call omap3_gp_romcode_call:
Signature · 1 line
1.7.5.4
PATCH 2/16 arch/arm/lib/bootm.c: Optionally use existing atags
This patch adapts the bootm command so that it can use an existing atags command set up by a previous bootloader. If the environment variable "atagaddr" is unset, bootm behaves as normal. If "atagaddr" is set, bootm will use atags address from environment variable and also append new boot args (if specified in u-boot). For example, if a previous boot loader already set up the atags struct at 0x80000100:
setenv atagaddr 0x80000100; bootm 0x80008000
--- README | 2 ++ arch/arm/lib/bootm.c | 27 +++++++++++++++++++++++++-- 2 files changed, 27 insertions(+), 2 deletions(-)
README +2 -0
@@ -3564,6 +3564,8 @@ Some configuration options can be set using Environment Variables. List of environment variables (most likely not complete): + atagaddr - bootm will use ATAGs struct from specified address (arm only) + baudrate - see CONFIG_BAUDRATE bootdelay - see CONFIG_BOOTDELAY
arch/arm/lib/bootm.c +25 -2
@@ -125,12 +125,24 @@ int do_bootm_linux(int flag, int argc, char *argv[], bootm_headers_t *images)debug ("## Transferring control to Linux (at address %08lx) ...\n" , (ulong ) kernel_entry); + s =getenv ("atagaddr" ); +if (s) { + bd->bi_boot_params =simple_strtoul (s,NULL ,16 ); +printf ("Using existing atags at %#x\n" , bd->bi_boot_params); + + params = (struct tag *) bd->bi_boot_params; +while (params->hdr.size >0 ) + params =tag_next (params); + }else {#if defined (CONFIG_SETUP_MEMORY_TAGS ) || \ defined (CONFIG_CMDLINE_TAG ) || \ defined (CONFIG_INITRD_TAG ) || \ defined (CONFIG_SERIAL_TAG ) || \ defined (CONFIG_REVISION_TAG ) -setup_start_tag (bd); + setup_start_tag (bd); + } +#endif +#ifdef CONFIG_SERIAL_TAG setup_serial_tag (¶ms);#endif
@@ -147,8 +159,19 @@ int do_bootm_linux(int flag, int argc, char *argv[], bootm_headers_t *images)if (images->rd_start && images->rd_end)setup_initrd_tag (bd, images->rd_start, images->rd_end);#endif -setup_end_tag (bd); + +if (s) { +if (params->hdr.size >0 ) +setup_end_tag (bd); + }else { +#if defined (CONFIG_SETUP_MEMORY_TAGS ) || \ + defined (CONFIG_CMDLINE_TAG ) || \ + defined (CONFIG_INITRD_TAG ) || \ + defined (CONFIG_SERIAL_TAG ) || \ + defined (CONFIG_REVISION_TAG ) +setup_end_tag (bd);#endif + }announce_and_cleanup ();
Signature · 1 line
1.7.5.4
PATCH 2/16 arch/arm/lib/bootm.c: Optionally use existing atags
arch/arm/lib/bootm.c int do_bootm_linux(int flag, int argc, char *argv[], bootm_headers_t *images) · line 128
Quoted 1 line · On Saturday 17 December 2011 12:03:04 Pali Roh?r wrote:
arch/arm/lib/bootm.c +1
-0+ s =getenv ("atagaddr" );
no space before the "("
arch/arm/lib/bootm.c int do_bootm_linux(int flag, int argc, char *argv[], bootm_headers_t *images) · line 171
Quoted 11 lines
#if defined (CONFIG_SETUP_MEMORY_TAGS) || \ defined (CONFIG_CMDLINE_TAG) || \ defined (CONFIG_INITRD_TAG) || \ defined (CONFIG_SERIAL_TAG) || \ defined (CONFIG_REVISION_TAG)...
arch/arm/lib/bootm.c +5
-0+#if defined (CONFIG_SETUP_MEMORY_TAGS ) || \ + defined (CONFIG_CMDLINE_TAG ) || \ + defined (CONFIG_INITRD_TAG ) || \ + defined (CONFIG_SERIAL_TAG ) || \ + defined (CONFIG_REVISION_TAG )
rather than duplicating the same list in multiple places, why not setup a local define in this file and then use that everywhere else.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20111218/0af923bd/attachment.pgp>
PATCH 2/16 arch/arm/lib/bootm.c: Optionally use existing atags
Quoted 19 lines · On Sunday 18 December 2011 13:54:21 Mike Frysinger wrote:
arch/arm/lib/bootm.c int do_bootm_linux(int flag, int argc, char *argv[], bootm_headers_t *images) · line 128
Quoted 1 line · On Saturday 17 December 2011 12:03:04 Pali Roh?r wrote:
arch/arm/lib/bootm.c +1
-0+ s =getenv ("atagaddr" );no space before the "("
arch/arm/lib/bootm.c int do_bootm_linux(int flag, int argc, char *argv[], bootm_headers_t *images) · line 171
Quoted 13 lines
#if defined (
CONFIG_SETUP_MEMORY_TAGS) || \defined (CONFIG_CMDLINE_TAG) || \ defined (CONFIG_INITRD_TAG) || \ defined (CONFIG_SERIAL_TAG) || \defined (
CONFIG_REVISION_TAG)...
arch/arm/lib/bootm.c +5
-0+#if defined (CONFIG_SETUP_MEMORY_TAGS ) || \ + defined (CONFIG_CMDLINE_TAG ) || \ + defined (CONFIG_INITRD_TAG ) || \ + defined (CONFIG_SERIAL_TAG ) || \ + defined (CONFIG_REVISION_TAG )
Quoted 3 lines
rather than duplicating the same list in multiple places, why not setup a local define in this file and then use that everywhere else. -mike
I will add local define CONFIG_ANY_TAG to bootm.c
+#if defined (CONFIG_SETUP_MEMORY_TAGS) || \
+ defined (CONFIG_CMDLINE_TAG) || \ + defined (CONFIG_INITRD_TAG) || \ + defined (CONFIG_SERIAL_TAG) || \ + defined (CONFIG_REVISION_TAG)
+#define CONFIG_ANY_TAG
+#endif
Signature · 9 lines
Pali Roh?r pali.rohar at gmail.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 198 bytes Desc: This is a digitally signed message part. URL: <http://lists.denx.de/pipermail/u-boot/attachments/20111218/45a2a595/attachment.pgp>
PATCH 3/16 include/twl4030.h: Add power bus message definitions
In reply to Pali Rohár* Code from linux kernel: include/linux/i2c/twl.h
--- include/twl4030.h | 98 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 98 insertions(+), 0 deletions(-)
include/twl4030.h +98 -0
@@ -151,6 +151,103 @@#define TWL4030_PM_MASTER_SW_EVENTS_DEVSLP (1 << 1)#define TWL4030_PM_MASTER_SW_EVENTS_DEVOFF (1 << 0) +/* Power bus message definitions */ + +/* The TWL4030/5030 splits its power-management resources (the various +* regulators, clock and reset lines) into 3 processor groups - P1, P2 and +* P3. These groups can then be configured to transition between sleep, wait-on +* and active states by sending messages to the power bus. See Section 5.4.2 +* Power Resources of TWL4030 TRM +*/ + +/* Processor groups */ +#define DEV_GRP_NULL 0x0 +#define DEV_GRP_P1 0x1/* P1: all OMAP devices */ +#define DEV_GRP_P2 0x2/* P2: all Modem devices */ +#define DEV_GRP_P3 0x4/* P3: all peripheral devices */ + +/* Resource groups */ +#define RES_GRP_RES 0x0/* Reserved */ +#define RES_GRP_PP 0x1/* Power providers */ +#define RES_GRP_RC 0x2/* Reset and control */ +#define RES_GRP_PP_RC 0x3 +#define RES_GRP_PR 0x4/* Power references */ +#define RES_GRP_PP_PR 0x5 +#define RES_GRP_RC_PR 0x6 +#define RES_GRP_ALL 0x7/* All resource groups */ + +#define RES_TYPE2_R0 0x0 + +#define RES_TYPE_ALL 0x7 + +/* Resource states */ +#define RES_STATE_WRST 0xF +#define RES_STATE_ACTIVE 0xE +#define RES_STATE_SLEEP 0x8 +#define RES_STATE_OFF 0x0 + +/* Power resources */ + +/* Power providers */ +#define RES_VAUX1 1 +#define RES_VAUX2 2 +#define RES_VAUX3 3 +#define RES_VAUX4 4 +#define RES_VMMC1 5 +#define RES_VMMC2 6 +#define RES_VPLL1 7 +#define RES_VPLL2 8 +#define RES_VSIM 9 +#define RES_VDAC 10 +#define RES_VINTANA1 11 +#define RES_VINTANA2 12 +#define RES_VINTDIG 13 +#define RES_VIO 14 +#define RES_VDD1 15 +#define RES_VDD2 16 +#define RES_VUSB_1V5 17 +#define RES_VUSB_1V8 18 +#define RES_VUSB_3V1 19 +#define RES_VUSBCP 20 +#define RES_REGEN 21 +/* Reset and control */ +#define RES_NRES_PWRON 22 +#define RES_CLKEN 23 +#define RES_SYSEN 24 +#define RES_HFCLKOUT 25 +#define RES_32KCLKOUT 26 +#define RES_RESET 27 +/* Power Reference */ +#define RES_Main_Ref 28 + +#define TOTAL_RESOURCES 28 +/* +* Power Bus Message Format ... these can be sent individually by Linux, +* but are usually part of downloaded scripts that are run when various +* power events are triggered. +* +* Broadcast Message (16 Bits): +* DEV_GRP[15:13] MT[12] RES_GRP[11:9] RES_TYPE2[8:7] RES_TYPE[6:4] +* RES_STATE[3:0] +* +* Singular Message (16 Bits): +* DEV_GRP[15:13] MT[12] RES_ID[11:4] RES_STATE[3:0] +*/ + +#define MSG_BROADCAST (devgrp, grp, type, type2, state) \ + ( (devgrp) << 13 | 1 << 12 | (grp) << 9 | (type2) << 7 \ + | (type) << 4 | (state)) + +#define MSG_SINGULAR (devgrp, id, state) \ + ((devgrp) << 13 | 0 << 12 | (id) << 4 | (state)) + +#define MSG_BROADCAST_ALL (devgrp, state) \ + ((devgrp) << 5 | (state)) + +#define MSG_BROADCAST_REF MSG_BROADCAST_ALL +#define MSG_BROADCAST_PROV MSG_BROADCAST_ALL +#define MSG_BROADCAST__CLK_RST MSG_BROADCAST_ALL +/* Power Managment Receiver */ #define TWL4030_PM_RECEIVER_SC_CONFIG 0x5B#define TWL4030_PM_RECEIVER_SC_DETECT1 0x5C
@@ -311,6 +408,7 @@#define TWL4030_PM_RECEIVER_VDAC_VSEL_18 0x03#define TWL4030_PM_RECEIVER_VMMC1_VSEL_30 0x02#define TWL4030_PM_RECEIVER_VMMC1_VSEL_32 0x03 +#define TWL4030_PM_RECEIVER_VSIM_VSEL_18 0x03/* Device Selection in PM Receiver Module */ #define TWL4030_PM_RECEIVER_DEV_GRP_P1 0x20
Signature · 1 line
1.7.5.4
PATCH 4/16 include/common.h: Add some ANSI escape codes definitions
In reply to Pali Rohár--- include/common.h | 18 ++++++++++++++++++ 1 files changed, 18 insertions(+), 0 deletions(-)
include/common.h +18 -0
@@ -760,6 +760,24 @@ void clear_ctrlc (void); /* clear the Control-C condition */int disable_ctrlc (int );/* 1 to disable, 0 to enable Control-C detect */ /* +* ANSI terminal +*/ + +#define ANSI_CURSOR_UP "\e[%dA" +#define ANSI_CURSOR_DOWN "\e[%dB" +#define ANSI_CURSOR_FORWARD "\e[%dC" +#define ANSI_CURSOR_BACK "\e[%dD" +#define ANSI_CURSOR_NEXTLINE "\e[%dE" +#define ANSI_CURSOR_PREVIOUSLINE "\e[%dF" +#define ANSI_CURSOR_COLUMN "\e[%dG" +#define ANSI_CURSOR_POSITION "\e[%d;%dH" +#define ANSI_CLEAR_CONSOLE "\e[2J" +#define ANSI_CLEAR_LINE_TO_END "\e[0K" +#define ANSI_CLEAR_LINE "\e[2K" +#define ANSI_COLOR_RESET "\e[0m" +#define ANSI_COLOR_REVERSE "\e[7m" + +/* * STDIO based functions (can always be used) */ /* serial stuff */
Signature · 1 line
1.7.5.4
PATCH 5/16 common/main.c: Fix function readline
In reply to Pali Rohár* Ignore ANSI escape sequences for moving cursor, which are generated by keyboard
--- common/main.c | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 49 insertions(+), 0 deletions(-)
common/main.c +49 -0
@@ -958,6 +958,7 @@ int readline_into_buffer (const char *const prompt, char * buffer)int n =0 ;/* buffer index */ int plen =0 ;/* prompt length */ int col;/* output column cnt */ +int esc =0 ;/* ansi escape char */ char c;/* print prompt */
@@ -1024,7 +1025,55 @@ int readline_into_buffer (const char *const prompt, char * buffer) p=delete_char (p_buf, p, &col, &n, plen);continue ; +case '\e' :/* ANSI escape char */ + esc =1 ; +continue ; +default : + +/* +* Check for ANSI escape chars +*/ +if (esc ==0 && c =='\e' ) { + esc =1 ; +continue ; + }else if (esc ==1 ) { +if (c =='[' ) { + esc =2 ; +continue ; + } +if (n <CONFIG_SYS_CBSIZE -2 ) { + ++n; + *p++ ='\e' ; +putc ('\e' ); + } + esc =0 ; + }else if (esc ==2 || esc ==3 ) { +if (esc ==2 && c =='1' ) { + esc =3 ; +continue ; + } +/* Ignore ANSI escape sequences generated by keyboard */ +/* \e [ 1 A-D and \e [ A-D */ +if ( c >='A' && c <='D' ) { + esc =0 ; +continue ; + } +if (esc ==2 && n <CONFIG_SYS_CBSIZE -3 ) { + n +=2 ; + *p++ ='\e' ; + *p++ ='[' ; +puts ("\e[" ); + }else if (esc ==3 && n <CONFIG_SYS_CBSIZE -4 ) { + n +=3 ; + *p++ ='\e' ; + *p++ ='[' ; + *p++ ='1' ; +puts ("\e[1" ); + } + esc =0 ; + } +/* * Must be a normal character then */
Signature · 1 line
1.7.5.4
PATCH 5/16 common/main.c: Fix function readline
Quoted 2 lines · On Saturday 17 December 2011 12:03:07 Pali Roh?r wrote:
* Ignore ANSI escape sequences for moving cursor, which are generated by
keyboard
you need to line wrap your changelogs
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20111218/9282f4be/attachment.pgp>
PATCH 5/16 common/main.c: Fix function readline
Quoted 8 lines · On Sunday 18 December 2011 13:58:30 Mike Frysinger wrote:
Quoted 4 lines · On Saturday 17 December 2011 12:03:07 Pali Roh?r wrote:
* Ignore ANSI escape sequences for moving cursor, which are generated by
keyboard
you need to line wrap your changelogs
-mike
I will fix all commit messages.
Signature · 9 lines
Pali Roh?r pali.rohar at gmail.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 198 bytes Desc: This is a digitally signed message part. URL: <http://lists.denx.de/pipermail/u-boot/attachments/20111218/c7f2933a/attachment.pgp>
PATCH 6/16 drivers/video/cfb_console.c: Fix function console_scrollup
In reply to Pali Rohár* Use correct buffer size, do not damage screen output
--- drivers/video/cfb_console.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/video/cfb_console.c +1 -1
@@ -701,7 +701,7 @@ static void console_scrollup(void) );#else memcpyl (CONSOLE_ROW_FIRST ,CONSOLE_ROW_SECOND , -CONSOLE_SCROLL_SIZE >>2 ); +CONSOLE_SCROLL_SIZE );#endif /* clear the last one */
Signature · 1 line
1.7.5.4
PATCH 7/16 drivers/video/cfb_console.c: Add function console_swap_colors
In reply to Pali Rohár* swap background and text color
--- drivers/video/cfb_console.c | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-)
drivers/video/cfb_console.c +8 -0
@@ -602,6 +602,14 @@ static void video_putchar(int xx, int yy, unsigned char c)video_drawchars (xx, yy + video_logo_height, &c,1 ); } +static void console_swap_colors (void ) +{ + eorx = fgx; + fgx = bgx; + bgx = eorx; + eorx = fgx ^ bgx; +} +#if defined(CONFIG_CONSOLE_CURSOR ) || defined(CONFIG_VIDEO_SW_CURSOR )static void video_set_cursor (void ) {
Signature · 1 line
1.7.5.4
PATCH 7/16 drivers/video/cfb_console.c: Add function console_swap_colors
drivers/video/cfb_console.c static void video_putchar(int xx, int yy, unsigned char c) · line 611
Quoted 10 lines · On Saturday 17 December 2011 12:03:09 Pali Roh?r wrote:
drivers/video/cfb_console.c +7
-0+static void console_swap_colors (void ) +{ + eorx = fgx; + fgx = bgx; + bgx = eorx; + eorx = fgx ^ bgx; +}
there's nothing calling this new func in this patch ...
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20111218/809cd242/attachment.pgp>
PATCH 7/16 drivers/video/cfb_console.c: Add function console_swap_colors
Quoted 4 lines · On Sunday 18 December 2011 13:57:40 Mike Frysinger wrote:
Quoted 3 lines · On Saturday 17 December 2011 12:03:09 Pali Roh?r wrote:
drivers/video/cfb_console.c +0
-0
Quoted 10 lines
drivers/video/cfb_console.c static void video_putchar(int xx, int yy, unsigned char c) · line 611
Quoted 7 lines
drivers/video/cfb_console.c +7
-0+static void console_swap_colors (void ) +{ + eorx = fgx; + fgx = bgx; + bgx = eorx; + eorx = fgx ^ bgx; +}there's nothing calling this new func in this patch ... -mike
This function in needed for ANSI terminal support in Patch 10.
Signature · 9 lines
Pali Roh?r pali.rohar at gmail.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 198 bytes Desc: This is a digitally signed message part. URL: <http://lists.denx.de/pipermail/u-boot/attachments/20111218/089dca5f/attachment.pgp>
PATCH 7/16 drivers/video/cfb_console.c: Add function console_swap_colors
Quoted 15 lines · On Sunday 18 December 2011 14:00:10 Pali Roh?r wrote:
Quoted 4 lines · On Sunday 18 December 2011 13:57:40 Mike Frysinger wrote:
Quoted 3 lines · On Saturday 17 December 2011 12:03:09 Pali Roh?r wrote:
drivers/video/cfb_console.c +0
-0Quoted 9 lines
drivers/video/cfb_console.c static void video_putchar(int xx, int yy, unsigned char c) · line 611
Quoted 7 lines
drivers/video/cfb_console.c +7
-0+static void console_swap_colors (void ) +{ + eorx = fgx; + fgx = bgx; + bgx = eorx; + eorx = fgx ^ bgx; +}there's nothing calling this new func in this patch ...
Quoted 1 line
This function in needed for ANSI terminal support in Patch 10.
so squash it into the patch where it actually gets used
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20111218/0da8acde/attachment.pgp>
PATCH 8/16 drivers/video/cfb_console.c: Add function console_clear and console_clear_line
In reply to Pali Rohár * console_clear - clear full console framebuffer output
* console_clear_line - clear part of specified line (or full)
--- drivers/video/cfb_console.c | 56 +++++++++++++++++++++++++++++++++--------- 1 files changed, 44 insertions(+), 12 deletions(-)
drivers/video/cfb_console.c +44 -12
@@ -691,6 +691,49 @@ static void memcpyl(int *d, int *s, int c) }#endif +static void console_clear (void ) +{ +#ifdef VIDEO_HW_RECTFILL +video_hw_rectfill (VIDEO_PIXEL_SIZE ,/* bytes per pixel */ +0 ,/* dest pos x */ + video_logo_height,/* dest pos y */ +VIDEO_VISIBLE_COLS ,/* frame width */ +VIDEO_VISIBLE_ROWS ,/* frame height */ + bgx/* fill color */ + ); +#else +memsetl (CONSOLE_ROW_FIRST ,CONSOLE_SIZE , bgx); +#endif +} + +static void console_clear_line (int line,int begin,int end) +{ +#ifdef VIDEO_HW_RECTFILL +video_hw_rectfill (VIDEO_PIXEL_SIZE ,/* bytes per pixel */ +VIDEO_FONT_WIDTH * begin,/* dest pos x */ /* FIXME: correct? */ + video_logo_height +CONSOLE_ROW_SIZE * line,/* dest pos y */ /* FIXME: correct? */ +VIDEO_FONT_WIDTH * ( end - begin ),/* frame width */ /* FIXME: correct? */ +VIDEO_FONT_HEIGHT ,/* frame height */ + bgx/* fill color */ + ); +#else +int i; +if ( begin ==0 && end ==CONSOLE_COLS ) +memsetl (CONSOLE_ROW_FIRST +CONSOLE_ROW_SIZE * line,/* offset of row */ +CONSOLE_ROW_SIZE >>2 ,/* length of row */ + bgx/* fill color */ + ); +else +for ( i =0 ; i <VIDEO_FONT_HEIGHT ; ++i ) +memsetl (CONSOLE_ROW_FIRST +CONSOLE_ROW_SIZE * line +/* offset of row */ +VIDEO_FONT_WIDTH *VIDEO_PIXEL_SIZE * begin +/* offset of col */ + i *VIDEO_LINE_LEN ,/* col offset of i-th line */ + (VIDEO_FONT_WIDTH *VIDEO_PIXEL_SIZE * ( end - begin +1 )) >>2 ,/* length to end of line */ + bgx/* fill color */ + ); +#endif +} +static void console_scrollup (void ) {/* copy up rows ignoring the first one */
@@ -713,18 +756,7 @@ static void console_scrollup(void)#endif /* clear the last one */ -#ifdef VIDEO_HW_RECTFILL -video_hw_rectfill (VIDEO_PIXEL_SIZE ,/* bytes per pixel */ -0 ,/* dest pos x */ -VIDEO_VISIBLE_ROWS - -VIDEO_FONT_HEIGHT ,/* dest pos y */ -VIDEO_VISIBLE_COLS ,/* frame width */ -VIDEO_FONT_HEIGHT ,/* frame height */ -CONSOLE_BG_COL /* fill color */ - ); -#else -memsetl (CONSOLE_ROW_LAST ,CONSOLE_ROW_SIZE >>2 ,CONSOLE_BG_COL ); -#endif +console_clear_line (CONSOLE_ROWS -1 ,0 ,CONSOLE_COLS ); }static void console_back (void )
Signature · 1 line
1.7.5.4
PATCH 8/16 drivers/video/cfb_console.c: Add function console_clear and console_clear_line
drivers/video/cfb_console.c static void memcpyl(int *d, int *s, int c)
Quoted 8 lines · On Saturday 17 December 2011 12:03:10 Pali Roh?r wrote:
drivers/video/cfb_console.c +5
-0+static void console_clear_line (int line,int begin,int end) +{ +#ifdef VIDEO_HW_RECTFILL + video_hw_rectfill(VIDEO_PIXEL_SIZE, /* bytes per pixel */ + VIDEO_FONT_WIDTH * begin, /* dest pos x */ /* FIXME:
correct? */
drivers/video/cfb_console.c
Quoted 1 line
drivers/video/cfb_console.c +1
-0+ video_logo_height + CONSOLE_ROW_SIZE * line, /* dest pos y */
/*
Quoted 1 line
FIXME: correct? */ +
VIDEO_FONT_WIDTH* ( end - begin ),
/* frame
Quoted 1 line
width */ /* FIXME: correct? */ +
VIDEO_FONT_HEIGHT,
/* frame height
drivers/video/cfb_console.c static void memcpyl(int *d, int *s, int c)
Quoted 7 lines
*/
drivers/video/cfb_console.c +6
-0+bgx /* fill color */ + ); +#else +int i; +if ( begin ==0 && end ==CONSOLE_COLS ) + memsetl(CONSOLE_ROW_FIRST + CONSOLE_ROW_SIZE * line, /* offset of
row */
drivers/video/cfb_console.c static void memcpyl(int *d, int *s, int c)
Quoted 6 lines
drivers/video/cfb_console.c +6
-0+CONSOLE_ROW_SIZE >>2 ,/* length of row */ + bgx/* fill color */ + ); + else + for ( i = 0; i < VIDEO_FONT_HEIGHT; ++i ) + memsetl(CONSOLE_ROW_FIRST + CONSOLE_ROW_SIZE * line + /* offset
of row
Quoted 1 line
*/ +
VIDEO_FONT_WIDTH*VIDEO_PIXEL_SIZE* begin + /*
offset of col */
drivers/video/cfb_console.c
Quoted 1 line
drivers/video/cfb_console.c +1
-0+ i * VIDEO_LINE_LEN, /* col offset of i-th
line */
Quoted 3 lines
drivers/video/cfb_console.c +1
-0+ (VIDEO_FONT_WIDTH *VIDEO_PIXEL_SIZE * ( end - begin +1 ))Quoted 1 line
2, /*
length to end of line */ + bgx /*
fill color */
drivers/video/cfb_console.c
Quoted 1 line
drivers/video/cfb_console.c +1
-0+ );
these lines are way too long -- notice how my e-mail client craps everywhere because of it ;). put the comments on their own line, move them all to before the func call, or drop them.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20111218/7dfdf9af/attachment.pgp>
PATCH 9/16 drivers/video/cfb_console.c: Add functions for moving with cursor
In reply to Pali Rohár * console_cursor_fix - check and fix cursor position (if it is not out of screen)
* console_cursor_up, console_cursor_down, console_cursor_left, console_cursor_right and console_cursor_set_position for changing cursor position
* console_newline - added param to specify count of creating new lines
* console_previewsline - opposite of console_newline
--- drivers/video/cfb_console.c | 64 +++++++++++++++++++++++++++++++++++++++---- 1 files changed, 58 insertions(+), 6 deletions(-)
drivers/video/cfb_console.c +58 -6
@@ -773,9 +773,54 @@ static void console_back(void)CURSOR_SET ; } -static void console_newline (void ) +static void console_cursor_fix (void ) { - console_row++; +if (console_row <0 ) + console_row =0 ; +if (console_row >=CONSOLE_ROWS ) + console_row =CONSOLE_ROWS -1 ; +if (console_col <0 ) + console_col =0 ; +if (console_col >=CONSOLE_COLS ) + console_col =CONSOLE_COLS -1 ; +} + +static void console_cursor_up (int n) +{ + console_row -= n; +console_cursor_fix (); +} + +static void console_cursor_down (int n) +{ + console_row += n; +console_cursor_fix (); +} + +static void console_cursor_left (int n) +{ + console_col -= n; +console_cursor_fix (); +} + +static void console_cursor_right (int n) +{ + console_col += n; +console_cursor_fix (); +} + +static void console_cursor_set_position (int row,int col) +{ +if (console_row !=-1 ) + console_row = row; +if (console_col !=-1 ) + console_col = col; +console_cursor_fix (); +} + +static void console_newline (int n) +{ + console_row += n; console_col =0 ;/* Check if we need to scroll the terminal */
@@ -784,10 +829,17 @@ static void console_newline(void)console_scrollup ();/* Decrement row number */ - console_row--; + console_row =CONSOLE_ROWS -1 ; } } +static void console_previewsline (int n) +{ +/* FIXME: also scroll terminal ? */ + console_row -= n; +console_cursor_fix (); +} +static void console_cr (void ) { console_col =0 ;
@@ -806,7 +858,7 @@ void video_putc(const char c)case '\n' :/* next line */ if (console_col || (!console_col && nl)) -console_newline (); +console_newline (1 ); nl =1 ;break ;
@@ -815,7 +867,7 @@ void video_putc(const char c) console_col &= ~0x0007 ;if (console_col >=CONSOLE_COLS ) -console_newline (); +console_newline (1 );break ;case 8 :/* backspace */
@@ -829,7 +881,7 @@ void video_putc(const char c)/* check for newline */ if (console_col >=CONSOLE_COLS ) { -console_newline (); +console_newline (1 ); nl =0 ; } }
Signature · 1 line
1.7.5.4
PATCH 9/16 drivers/video/cfb_console.c: Add functions for moving with cursor
Quoted 5 lines · On Saturday 17 December 2011 12:03:11 Pali Roh?r wrote:
*
console_cursor_fix- check and fix cursor position (if it is not out of
screen) *console_cursor_up,console_cursor_down,console_cursor_left,console_cursor_rightandconsole_cursor_set_positionfor changing cursor position *console_newline- added param to specify count of creating new lines *console_previewsline- opposite ofconsole_newline
you need to line wrap your changelogs
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20111218/5e26dfda/attachment.pgp>
PATCH 10/16 drivers/video/cfb_console.c: Add support for some ANSI terminal escape codes
In reply to Pali Rohár * This patch add support for cursor move and reverse colors via ANSI espace codes in cfb_console driver
* ANSI escape codes can be enabled/disabled via CONFIG_CFB_CONSOLE_ANSI
--- drivers/video/cfb_console.c | 205 ++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 204 insertions(+), 1 deletions(-)
drivers/video/cfb_console.c +204 -1
@@ -377,6 +377,10 @@ static int console_row; /* cursor row */static u32 eorx, fgx, bgx;/* color pats */ +static char ansi_buf[10 ] = {0 , }; +static int ansi_buf_size =0 ; +static int ansi_colors_need_revert =0 ; +static const int video_font_draw_table8[] = {0x00000000 ,0x000000ff ,0x0000ff00 ,0x0000ffff ,0x00ff0000 ,0x00ff00ff ,0x00ffff00 ,0x00ffffff ,
@@ -845,7 +849,7 @@ static void console_cr(void) console_col =0 ; } -void video_putc (const char c) +static void parse_putc (const char c) {static int nl =1 ;
@@ -888,6 +892,205 @@ void video_putc(const char c)CURSOR_SET ; } +void video_putc (const char c) +{ +#ifdef CONFIG_CFB_CONSOLE_ANSI +int i; + +if (c ==27 ) { +for (i =0 ; i < ansi_buf_size; ++i) +parse_putc (ansi_buf[i]); + ansi_buf[0 ] =27 ; + ansi_buf_size =1 ; +return ; + } + +if (ansi_buf_size >0 ) { +/* +0 - ESC +1 - [ +2 - num1 +3 - .. +4 - ; +5 - num2 +6 - .. +7 - cchar +*/ +int next =0 ; + +int flush =0 ; +int fail =0 ; + +int num1 =0 ; +int num2 =0 ; +int cchar =0 ; + + ansi_buf[ansi_buf_size++] = c; + +if (ansi_buf_size >=sizeof (ansi_buf)) + fail =1 ; + +for (i =0 ; i < ansi_buf_size; ++i) { +if (fail) +break ; + +switch (next) { +case 0 : +if (ansi_buf[i] ==27 ) + next =1 ; +else + fail =1 ; +break ; + +case 1 : +if (ansi_buf[i] =='[' ) + next =2 ; +else + fail =1 ; +break ; + +case 2 : +if (ansi_buf[i] >='0' && ansi_buf[i] <='9' ) { + num1 = ansi_buf[i]-'0' ; + next =3 ; + }else { + --i; + num1 =1 ; + next =4 ; + } +break ; + +case 3 : +if (ansi_buf[i] >='0' && ansi_buf[i] <='9' ) { + num1 *=10 ; + num1 += ansi_buf[i]-'0' ; + }else { + --i; + next =4 ; + } +break ; + +case 4 : +if (ansi_buf[i] !=';' ) { + --i; + next =7 ; + }else + next =5 ; +break ; + +case 5 : +if (ansi_buf[i] >='0' && ansi_buf[i] <='9' ) { + num2 = ansi_buf[i]-'0' ; + next =6 ; + }else + fail =1 ; +break ; + +case 6 : +if (ansi_buf[i] >='0' && ansi_buf[i] <='9' ) { + num2 *=10 ; + num2 += ansi_buf[i]-'0' ; + }else { + --i; + next =7 ; + } +break ; + +case 7 : +if ((ansi_buf[i] >='A' && ansi_buf[i] <='H' ) || ansi_buf[i] =='J' || ansi_buf[i] =='K' || ansi_buf[i] =='m' ) { + cchar = ansi_buf[i]; + flush =1 ; + }else + fail =1 ; +break ; + } + } + +if (fail) + { +for (i =0 ; i < ansi_buf_size; ++i) +parse_putc (ansi_buf[i]); + ansi_buf_size =0 ; +return ; + } + +if (flush) + { +CURSOR_OFF ; + ansi_buf_size =0 ; +switch (cchar) { +case 'A' : +/* move cursor num1 rows up */ +console_cursor_up (num1); +break ; +case 'B' : +/* move cursor num1 rows down */ +console_cursor_down (num1); +break ; +case 'C' : +/* move cursor num1 columns forward */ +console_cursor_right (num1); +break ; +case 'D' : +/* move cursor num1 columns back */ +console_cursor_left (num1); +break ; +case 'E' : +/* move cursor num1 rows up at begin of row */ +console_previewsline (num1); +break ; +case 'F' : +/* move cursor num1 rows down@begin of row */ +console_newline (num1); +break ; +case 'G' : +/* move cursor to column num1 */ +console_cursor_set_position (-1 , num1-1 ); +break ; +case 'H' : +/* move cursor to row num1, column num2 */ +console_cursor_set_position (num1-1 , num2-1 ); +break ; +case 'J' : +/* clear console and move cursor to 0, 0 */ +console_clear (); +console_cursor_set_position (0 ,0 ); +break ; +case 'K' : +/* clear line */ +if (num1 ==0 ) +console_clear_line (console_row, console_col,CONSOLE_COLS -1 ); +else if (num1 ==1 ) +console_clear_line (console_row,0 , console_col); +else +console_clear_line (console_row,0 ,CONSOLE_COLS -1 ); +break ; +case 'm' : +if (num1 ==0 ) {/* reset swapped colors */ +if (ansi_colors_need_revert) { +console_swap_colors (); + ansi_colors_need_revert =0 ; + } + }else if (num1 ==7 ) {/* swap colors (only once) */ +if (!ansi_colors_need_revert) { +console_swap_colors (); + ansi_colors_need_revert =1 ; + } + } +break ; + } +CURSOR_SET ; + } + } +else + { +parse_putc (c); + } +#else +parse_putc (c); +#endif +} +void video_puts (const char *s) {int count =strlen (s);
Signature · 1 line
1.7.5.4
PATCH 10/16 drivers/video/cfb_console.c: Add support for some ANSI terminal escape codes
Quoted 3 lines · On Saturday 17 December 2011 12:03:12 Pali Roh?r wrote:
* This patch add support for cursor move and reverse colors via ANSI
espace codes incfb_consoledriver * ANSI escape codes can be enabled/disabled viaCONFIG_CFB_CONSOLE_ANSI
your changelog needs to be line wrapped
Review
Quoted 2 lines
(quoted diff) +2
-0+ case 7: + if ((ansi_buf[i] >= 'A' && ansi_buf[i] <= 'H') ||
ansi_buf[i] == 'J'
Quoted 1 line
|| ansi_buf[i] == 'K' || ansi_buf[i] == 'm') { + cchar
= ansi_buf[i];
this line is way too long
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20111218/b94840c1/attachment.pgp>
PATCH 11/16 New command clr: Clear the ANSI terminal
In reply to Pali RohárFrom: Marcel Mol <[email protected]>
* Command can be enabled by CONFIG_CMD_CLR
--- common/Makefile | 1 + common/cmd_clr.c | 38 ++++++++++++++++++++++++++++++++++++++ include/config_cmd_all.h | 1 + 3 files changed, 40 insertions(+), 0 deletions(-) create mode 100644 common/cmd_clr.c
common/Makefile +1 -0
@@ -69,6 +69,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_CACHE) += cmd_cache.o +COBJS-$(CONFIG_CMD_CLR) += cmd_clr.o COBJS-$(CONFIG_CMD_CONSOLE) += cmd_console.o COBJS-$(CONFIG_CMD_CPLBINFO) += cmd_cplbinfo.o COBJS-$(CONFIG_DATAFLASH_MMC_SELECT) += cmd_dataflash_mmc_mux.o
common/cmd_clr.c new file +38 -0
@@ -0,0 +1,38 @@ +/* +* Copyright 2011 +* Marcel Mol, MESA Consulting, marcel at mesa.nl +* +* See file CREDITS for list of people who contributed to this +* project. +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License as +* published by the Free Software Foundation; either version 2 of +* the License, or (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software +* Foundation, Inc., 59 Temple Place, Suite 330, Boston, +* MA 02111-1307 USA +*/ + +#include <common.h> +#include <command.h> + +int do_clr (cmd_tbl_t *cmdtp,int flag,int argc,char *const argv[]) +{ +printf (ANSI_CLEAR_CONSOLE ); +return 0 ; +} + +U_BOOT_CMD ( + clr,CONFIG_SYS_MAXARGS ,1 , do_clr, +"clr" , +"\n" +" - clear screen and move cursor to top of screen" +);
include/config_cmd_all.h +1 -0
@@ -23,6 +23,7 @@#define CONFIG_CMD_BSP /* Board Specific functions */ #define CONFIG_CMD_CACHE /* icache, dcache */ #define CONFIG_CMD_CDP /* Cisco Discovery Protocol */ +#define CONFIG_CMD_CLR /* ANSI clear screen command */ #define CONFIG_CMD_CONSOLE /* coninfo */ #define CONFIG_CMD_DATE /* support for RTC, date/time...*/ #define CONFIG_CMD_DHCP /* DHCP Support */
Signature · 1 line
1.7.5.4
PATCH 11/16 New command clr: Clear the ANSI terminal
common/cmd_clr.c
Quoted 4 lines · On Saturday 17 December 2011 12:03:13 Pali Roh?r wrote:
common/cmd_clr.c new file +1
-0+int do_clr (cmd_tbl_t *cmdtp,int flag,int argc,char *const argv[])
static
common/cmd_clr.c line 29
Quoted 1 line
common/cmd_clr.c new file +1
-0+printf (ANSI_CLEAR_CONSOLE );
puts()
common/cmd_clr.c line 38
Quoted 6 lines
common/cmd_clr.c new file +6
-0+U_BOOT_CMD ( + clr,CONFIG_SYS_MAXARGS ,1 , do_clr, +"clr" , +"\n" +" - clear screen and move cursor to top of screen" +);
"clr" is unusual. name it "clear" instead. that's what all the standard *nix systems use after all.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20111218/ec0fc555/attachment.pgp>
PATCH 11/16 New command clr: Clear the ANSI terminal
Quoted 11 lines · On Sunday 18 December 2011 13:56:12 Mike Frysinger wrote:
common/cmd_clr.c
Quoted 4 lines · On Saturday 17 December 2011 12:03:13 Pali Roh?r wrote:
common/cmd_clr.c new file +1
-0+int do_clr (cmd_tbl_t *cmdtp,int flag,int argc,char *const argv[])static
common/cmd_clr.c line 29
Quoted 1 line
common/cmd_clr.c new file +1
-0+printf (ANSI_CLEAR_CONSOLE );
puts()
puts(s) will output s + '\n'. And we do not want newline after clear screen.
Quoted 11 lines
common/cmd_clr.c line 38
Quoted 7 lines
common/cmd_clr.c new file +6
-0+U_BOOT_CMD ( + clr,CONFIG_SYS_MAXARGS ,1 , do_clr, +"clr" , +"\n" +" - clear screen and move cursor to top of screen" +);"clr" is unusual. name it "clear" instead. that's what all the standard *nix systems use after all.
-mike
ok, I will rename clr to clear.
Signature · 9 lines
Pali Roh?r pali.rohar at gmail.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 198 bytes Desc: This is a digitally signed message part. URL: <http://lists.denx.de/pipermail/u-boot/attachments/20111218/c5de2a7d/attachment.pgp>
PATCH 11/16 New command clr: Clear the ANSI terminal
Quoted 9 lines · On Sunday 18 December 2011 14:20:35 Pali Roh?r wrote:
Quoted 8 lines · On Sunday 18 December 2011 13:56:12 Mike Frysinger wrote:
common/cmd_clr.c
Quoted 4 lines · On Saturday 17 December 2011 12:03:13 Pali Roh?r wrote:
common/cmd_clr.c new file +1
-0+int do_clr (cmd_tbl_t *cmdtp,int flag,int argc,char *const argv[])static
Quoted 6 lines
Quoted 3 lines
common/cmd_clr.c line 29
Quoted 1 line
common/cmd_clr.c new file +1
-0+printf (ANSI_CLEAR_CONSOLE );
puts()puts(s) will output s + '\n'. And we do not want newline after clear screen.
no it won't. u-boot's puts() is diff from the POSIX puts().
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20111218/78ca87e5/attachment.pgp>
PATCH 12/16 New config variable CONFIG_MENUCMD
In reply to Pali Rohár * If defined CONFIG_MENUCMD and CONFIG_MENUKEY to 0 run env "menu_cmd" if key any pressed
* If defined CONFIG_MENUCMD and other CONFIG_MENUKEY run env "menu_cmd" if key pressed is save as CONFIG_MENUKEY
* If defined CONFIG_MENUCMD and not CONFIG_MENUKEY run env "menu_cmd" always
* If not defined CONFIG_MENUCMD do nothing
* CONFIG_MENUKEY working only if defined CONFIG_MENUCMD and CONFIG_BOOTDELAY >= 0
--- common/main.c | 32 +++++++++++++++++++++----------- 1 files changed, 21 insertions(+), 11 deletions(-)
common/main.c +21 -11
@@ -82,6 +82,19 @@ int do_mdm_init = 0;extern void mdm_init (void );/* defined in board.c */ #endif +#if defined (CONFIG_MENUKEY ) && ! defined (CONFIG_MENUCMD ) && ( ! defined(CONFIG_BOOTDELAY ) ||CONFIG_BOOTDELAY <0 ) +#error CONFIG_MENUKEY is defined, but not CONFIG_MENUCMD and/or CONFIG_BOOTDELAY >= 0 +#error define CONFIG_MENUCMD and CONFIG_BOOTDELAY too +#endif + +#ifdef CONFIG_MENUCMD +# ifdef CONFIG_MENUKEY +static int menucmd =0 ; +# else +static int menucmd =1 ; +# endif +#endif +/*************************************************************************** * Watch for 'delay' seconds for autoboot stop or autoboot delay string. * returns: 0 - no key string, allow autoboot 1 - got key string, abort
@@ -201,10 +214,6 @@ int abortboot(int bootdelay)# else /* !defined(CONFIG_AUTOBOOT_KEYED) */ -#ifdef CONFIG_MENUKEY -static int menukey =0 ; -#endif -#ifndef CONFIG_MENU static inline#endif
@@ -241,8 +250,9 @@ int abortboot(int bootdelay)if (tstc ()) {/* we got a key press */ abort =1 ;/* don't auto boot */ bootdelay =0 ;/* no more delay */ -# ifdef CONFIG_MENUKEY - menukey =getc (); +# if defined (CONFIG_MENUCMD ) && defined (CONFIG_MENUKEY ) +if (CONFIG_MENUKEY ==0 ||CONFIG_MENUKEY ==getc ()) + menucmd =1 ;# else (void )getc ();/* consume input */ # endif
@@ -292,6 +302,7 @@ int run_command2(const char *cmd, int flag)void main_loop (void ) { +char *s;#ifndef CONFIG_SYS_HUSH_PARSER static char lastcommand[CONFIG_SYS_CBSIZE ] = {0 , };int len;
@@ -300,7 +311,6 @@ void main_loop (void)#endif #if defined(CONFIG_BOOTDELAY ) && (CONFIG_BOOTDELAY >=0 ) -char *s;int bootdelay;#endif #ifdef CONFIG_PREBOOT
@@ -405,15 +415,15 @@ void main_loop (void)disable_ctrlc (prev);/* restore Control C checking */ # endif } +#endif /* CONFIG_BOOTDELAY */ -# ifdef CONFIG_MENUKEY -if (menukey ==CONFIG_MENUKEY ) { +#ifdef CONFIG_MENUCMD +if (menucmd ==1 ) { s =getenv ("menucmd" );if (s)run_command2 (s,0 ); } -#endif /* CONFIG_MENUKEY */ -#endif /* CONFIG_BOOTDELAY */ +#endif /* * Main Loop for Monitor Command Processing
Signature · 1 line
1.7.5.4
PATCH 13/16 New config variable CONFIG_PREMONITOR
In reply to Pali Rohár* if defined run env "premonitor" before Main Loop for Monitor Command Processing
--- common/env_common.c | 3 +++ common/main.c | 10 ++++++++++ 2 files changed, 13 insertions(+), 0 deletions(-)
common/env_common.c +3 -0
@@ -92,6 +92,9 @@ const uchar default_environment[] = {#ifdef CONFIG_PREBOOT "preboot=" CONFIG_PREBOOT "\0"#endif +#ifdef CONFIG_PREMONITOR + "premonitor=" CONFIG_PREMONITOR "\0" +#endif #ifdef CONFIG_ROOTPATH "rootpath=" CONFIG_ROOTPATH "\0"#endif
common/main.c +10 -0
@@ -425,6 +425,16 @@ void main_loop (void) }#endif +#ifdef CONFIG_PREMONITOR +if ((s =getenv ("premonitor" )) !=NULL ) { +# ifndef CONFIG_SYS_HUSH_PARSER +run_command (s,0 ); +# else +parse_string_outer (s,FLAG_PARSE_SEMICOLON |FLAG_EXIT_FROM_LOOP ); +# endif + } +#endif /* CONFIG_PREMONITOR */ +/* * Main Loop for Monitor Command Processing */
Signature · 1 line
1.7.5.4
PATCH 13/16 New config variable CONFIG_PREMONITOR
common/main.c void main_loop (void) · line 429
Quoted 12 lines · On Saturday 17 December 2011 12:03:15 Pali Roh?r wrote:
common/env_common.c +3
-0+#ifdef CONFIG_PREMONITOR + "premonitor=" CONFIG_PREMONITOR "\0" +#endif common/main.c +2
-0+#ifdef CONFIG_PREMONITOR +if ((s =getenv ("premonitor" )) !=NULL ) {
i don't these should be the same define. one is to control the default env var value only. i would just drop the check in main.c.
common/main.c void main_loop (void) · line 431
Quoted 2 lines
common/main.c +2
-0+# ifndef CONFIG_SYS_HUSH_PARSER +run_command (s,0 );
no space before the "("
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20111218/34a58043/attachment.pgp>
PATCH 13/16 New config variable CONFIG_PREMONITOR
Quoted 17 lines · On Sunday 18 December 2011 14:05:17 Mike Frysinger wrote:
common/main.c void main_loop (void) · line 429
Quoted 12 lines · On Saturday 17 December 2011 12:03:15 Pali Roh?r wrote:
common/env_common.c +3
-0+#ifdef CONFIG_PREMONITOR + "premonitor=" CONFIG_PREMONITOR "\0" +#endif common/main.c +2
-0+#ifdef CONFIG_PREMONITOR +if ((s =getenv ("premonitor" )) !=NULL ) {i don't these should be the same define. one is to control the default env var value only. i would just drop the check in
main.c.
Quoted 5 lines
common/main.c void main_loop (void) · line 431
Quoted 2 lines
common/main.c +2
-0+# ifndef CONFIG_SYS_HUSH_PARSER +run_command (s,0 );no space before the "("
-mike
So do you think that I should delete changes in env_common.c and add to main.c only this code?
+#ifdef CONFIG_PREMONITOR
+ run_command2(CONFIG_PREMONITOR, 0);
+#endif
Signature · 9 lines
Pali Roh?r pali.rohar at gmail.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 198 bytes Desc: This is a digitally signed message part. URL: <http://lists.denx.de/pipermail/u-boot/attachments/20111218/50004b05/attachment.pgp>
PATCH 13/16 New config variable CONFIG_PREMONITOR
Quoted 12 lines · On Sunday 18 December 2011 14:37:12 Pali Roh?r wrote:
Quoted 11 lines · On Sunday 18 December 2011 14:05:17 Mike Frysinger wrote:
Quoted 10 lines · On Saturday 17 December 2011 12:03:15 Pali Roh?r wrote:
common/env_common.c +3
-0+#ifdef CONFIG_PREMONITOR + "premonitor=" CONFIG_PREMONITOR "\0" +#endif common/main.c +0
-0
Quoted 8 lines
Quoted 5 lines
common/main.c void main_loop (void) · line 429
Quoted 2 lines
common/main.c +2
-0+#ifdef CONFIG_PREMONITOR +if ((s =getenv ("premonitor" )) !=NULL ) {i don't these should be the same define. one is to control the default env var value only. i would just drop the check in
main.c.So do you think that I should delete changes in
env_common.cand add tomain.conly this code?
i mean keep the code in env_common.c, and delete the "#ifdef CONFIG_PREMONITOR" line from main.c
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20111218/edbbfa5e/attachment.pgp>
PATCH 13/16 New config variable CONFIG_PREMONITOR
Quoted 20 lines · On Sunday 18 December 2011 15:08:30 Mike Frysinger wrote:
Quoted 19 lines · On Sunday 18 December 2011 14:37:12 Pali Roh?r wrote:
Quoted 17 lines · On Sunday 18 December 2011 14:05:17 Mike Frysinger wrote:
common/main.c void main_loop (void) · line 429
Quoted 12 lines · On Saturday 17 December 2011 12:03:15 Pali Roh?r wrote:
common/env_common.c +3
-0+#ifdef CONFIG_PREMONITOR + "premonitor=" CONFIG_PREMONITOR "\0" +#endif common/main.c +2
-0+#ifdef CONFIG_PREMONITOR +if ((s =getenv ("premonitor" )) !=NULL ) {i don't these should be the same define. one is to control the default
env var value only. i would just drop the check inmain.c.
Quoted 6 lines
Quoted 2 lines
So do you think that I should delete changes in
env_common.cand add tomain.conly this code?i mean keep the code in
env_common.c, and delete the "#ifdefCONFIG_PREMONITOR" line frommain.c
-mike
Ok.
Signature · 9 lines
Pali Roh?r pali.rohar at gmail.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 198 bytes Desc: This is a digitally signed message part. URL: <http://lists.denx.de/pipermail/u-boot/attachments/20111218/177e84bb/attachment.pgp>
PATCH 14/16 New board support: Nokia RX-51 aka N900
In reply to Pali RohárThis board definition results in a u-boot.bin which can be chainloaded from NOLO in qemu or on a real N900. It does very little hardware config because NOLO has already configured the board. Only needed is enabling internal eMMC memory via twl4030 regulator which is not enabled by NOLO.
NOLO is expecting a kernel image and will treat any image it finds in onenand as such. This u-boot is intended to be flashed to the N900 like a kernel. In order to transparently boot the original kernel, it will be appended to u-boot.bin at 0x40000. NOLO will load the entire image into memory and execute u-boot, which saves the ATAGs set by NOLO. Then the bootscripts will attempt to load uImage or boot.scr from a fat or ext2 filesystem in external SD card or internal eMMC memory. If this fails or keyboard is closed the appended kernel image will be booted using the stored ATAGs (see boot order).
There is support for hardware watchdog. It is started by NOLO so u-boot must kick watchdog to prevent reboot device (but not very often, max every 2 seconds). There is also support for framebuffer display output with ANSI espace codes and the N900 HW keyboard input. USB tty works but is disabled because it prevents the current Maemo kernel from booting.
Based on previous work by: Alistair Buxton <[email protected]>
Default boot order:
* 0. if keyboard is closed boot automatically NOLO kernel image
* 1. try boot from external SD card
* 2. try boot from internal eMMC memory
* 3. try boot from attached NOLO kernel image
Boot from SD or eMMC in this order:
* find boot.scr on first fat partition
* find uImage on first fat parition
* same order for 2. - 4. fat partition
* find boot.scr on first ext2 partition
* find uImage on first ext2 parition
* same order for 2. - 4. ext2 partition
Available additional commands/variables:
* run sercon - Use serial port for control
* run usbcon - Use usbtty for control
* run vgacon - Use framebuffer and HW keyboard for control (default)
* run emmcboot - Boot from external SD card (see boot order)
* run immcboot - Boot from internal eMMC memory (see boot order)
* run noloboot - Boot NOLO kernel image (attached to U-Boot binary)
* run scriptload - Load boot script: mmc ${mmcnum} (0 - external, 1 - internal), partition number ${mmcpart} (1 - 4), parition type ${mmctype} (fat, ext2), file name ${mmcfile}
* run scriptboot - Run loaded boot script (see scriptload)
* run uimageload - Load kernel image: mmc ${mmcnum} (0 - external, 1 - internal), partition number ${mmcpart} (1 - 4), parition type ${mmctype} (fat, ext2), file name ${mmcfile}
* run uimageboot - Boot kernel image (see uimageload)
--- board/nokia/rx51/Makefile | 50 +++++ board/nokia/rx51/rx51.c | 427 ++++++++++++++++++++++++++++++++++++++++++ board/nokia/rx51/rx51.h | 372 ++++++++++++++++++++++++++++++++++++ boards.cfg | 1 + include/configs/nokia_rx51.h | 317 +++++++++++++++++++++++++++++++ 5 files changed, 1167 insertions(+), 0 deletions(-) create mode 100644 board/nokia/rx51/Makefile create mode 100644 board/nokia/rx51/rx51.c create mode 100644 board/nokia/rx51/rx51.h create mode 100644 include/configs/nokia_rx51.h
board/nokia/rx51/Makefile new file +50 -0
@@ -0,0 +1,50 @@ +# +# (C) Copyright 2000, 2001, 2002 +# Wolfgang Denk, DENX Software Engineering, wd at 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 +# + +include $(TOPDIR)/config.mk + +LIB = $(obj)lib$(BOARD).o + +COBJS-y := $(BOARD).o + +COBJS := $(sort $(COBJS-y)) +SRCS := $(COBJS:.o=.c) +OBJS := $(addprefix $(obj),$(COBJS)) + +$(LIB): $(obj).depend $(OBJS) + $(call cmd_link_o_target, $(OBJS)) + +clean: + rm -f $(OBJS) + +distclean: clean + rm -f $(LIB) core *.bak $(obj).depend + +######################################################################### + +# defines $(obj).depend target +include $(SRCTREE)/rules.mk + +sinclude $(obj).depend + +#########################################################################
board/nokia/rx51/rx51.c new file +427 -0
427 lines not on this page · raw message
board/nokia/rx51/rx51.h new file +372 -0
372 lines not on this page · raw message
boards.cfg +1 -0
@@ -210,6 +210,7 @@ omap3_evm_quick_mmc arm armv7 evm ti omap3_evm_quick_nand arm armv7 evm ti omap3 omap3_sdp3430 arm armv7 sdp3430 ti omap3 devkit8000 arm armv7 devkit8000 timll omap3 +nokia_rx51 arm armv7 rx51 nokia omap3 omap4_panda arm armv7 panda ti omap4 omap4_sdp4430 arm armv7 sdp4430 ti omap4 omap5_evm arm armv7 omap5_evm ti omap5
include/configs/nokia_rx51.h new file +317 -0
317 lines not on this page · raw message
Signature · 1 line
1.7.5.4
PATCH 14/16 New board support: Nokia RX-51 aka N900
board/nokia/rx51/Makefile line 41
Quoted 8 lines · On Saturday 17 December 2011 12:03:16 Pali Roh?r wrote:
board/nokia/rx51/Makefile new file +5
-0+clean: + rm -f $(OBJS) + +distclean: clean + rm -f $(LIB) core *.bak $(obj).depend
these are unused. delete these targets.
this file def needs checkpatch.pl run on it ... many long lines
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20111218/8df5ad6c/attachment.pgp>
PATCH 15/16 New command bootmenu: ANSI terminal Boot Menu support
In reply to Pali Rohár * Configuration is done via env variables bootmenu_delay and bootmenu_<num>:
bootmenu_delay=<delay>
bootmenu_<num>="<title>=<commands>" (title and commands are separated by first char '=')
<delay> is delay in seconds of autobooting first entry
<num> is boot menu entry, starting from zero
<title> is text shown in boot screen
<commands> are commands which will be executed when menu entry will be selected
* First argument of bootmenu command override bootmenu_delay env
* If env bootmenu_delay or bootmenu argument is not specified, 10 seconds for delay will be used
* If delay is 0, no entry will be show on screen, screen will not be cleared and first entry will be called
* If delay is less then 0, no autoboot delay will be used
* Boot Menu will stop finding next menu entry if last was not defined
* Boot Menu always add menu entry "U-Boot console" at end of all entries
* Example using:
setenv bootmenu_0 Boot first kernel=bootm 0x82000000 # Set first menu entry setenv bootmenu_1 Boot second kernel=bootm 0x83000000 # Set second menu entry
setenv bootmenu_2 Reset board=reset # Set third menu entry
setenv bootmenu_3 U-Boot boot order=boot # Set four menu entry (default u-boot boot script)
setenv bootmenu_4 # Empty string is end of all bootmenu entries
bootmenu 20 # Run bootmenu with autoboot delay 20s
--- common/Makefile | 1 + common/cmd_bootmenu.c | 355 ++++++++++++++++++++++++++++++++++++++++++++++ include/config_cmd_all.h | 1 + 3 files changed, 357 insertions(+), 0 deletions(-) create mode 100644 common/cmd_bootmenu.c
common/Makefile +1 -0
@@ -67,6 +67,7 @@ COBJS-$(CONFIG_CMD_SOURCE) += cmd_source.o COBJS-$(CONFIG_CMD_BDI) += cmd_bdinfo.o COBJS-$(CONFIG_CMD_BEDBUG) += bedbug.o cmd_bedbug.o COBJS-$(CONFIG_CMD_BMP) += cmd_bmp.o +COBJS-$(CONFIG_CMD_BOOTMENU) += cmd_bootmenu.o COBJS-$(CONFIG_CMD_BOOTLDR) += cmd_bootldr.o COBJS-$(CONFIG_CMD_CACHE) += cmd_cache.o COBJS-$(CONFIG_CMD_CLR) += cmd_clr.o
common/cmd_bootmenu.c new file +355 -0
355 lines not on this page · raw message
include/config_cmd_all.h +1 -0
@@ -20,6 +20,7 @@#define CONFIG_CMD_BEDBUG /* Include BedBug Debugger */ #define CONFIG_CMD_BMP /* BMP support */ #define CONFIG_CMD_BOOTD /* bootd */ +#define CONFIG_CMD_BOOTMENU /* ANSI terminal Boot Menu */ #define CONFIG_CMD_BSP /* Board Specific functions */ #define CONFIG_CMD_CACHE /* icache, dcache */ #define CONFIG_CMD_CDP /* Cisco Discovery Protocol */
Signature · 1 line
1.7.5.4
PATCH 15/16 New command bootmenu: ANSI terminal Boot Menu support
this needs checkpatch for sure
seems like this doesn't use the existing common/menu.c code ... shouldn't it ? -mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20111218/23bbe1a0/attachment.pgp>
PATCH 15/16 New command bootmenu: ANSI terminal Boot Menu support
Quoted 4 lines · On Sunday 18 December 2011 14:07:37 Mike Frysinger wrote:
this needs checkpatch for sure
seems like this doesn't use the existing
common/menu.ccode ... shouldn't it ? -mike
No my ANSI terminal bootmenu does not use common/menu.c (4 months ago, there was no menu.c file)
Signature · 9 lines
Pali Roh?r pali.rohar at gmail.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 198 bytes Desc: This is a digitally signed message part. URL: <http://lists.denx.de/pipermail/u-boot/attachments/20111218/6b04e68a/attachment.pgp>
PATCH 15/16 New command bootmenu: ANSI terminal Boot Menu support
Quoted 8 lines · On Sunday 18 December 2011 14:12:38 Pali Roh?r wrote:
Quoted 4 lines · On Sunday 18 December 2011 14:07:37 Mike Frysinger wrote:
this needs checkpatch for sure
seems like this doesn't use the existing
common/menu.ccode ... shouldn't it ?No my ANSI terminal bootmenu does not use
common/menu.c(4 months ago, there was nomenu.cfile)
so you'll be updating the patchseries to utilize common code that now exists ? -mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20111218/14c48e9a/attachment.pgp>
PATCH 15/16 New command bootmenu: ANSI terminal Boot Menu support
Quoted 4 lines · On Sunday 18 December 2011 15:07:25 Mike Frysinger wrote:
Quoted 3 lines · On Sunday 18 December 2011 14:12:38 Pali Roh?r wrote:
Quoted 2 lines · On Sunday 18 December 2011 14:07:37 Mike Frysinger wrote:
this needs checkpatch for sure
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
seems like this doesn't use the existing
common/menu.ccode ... shouldn't it ?No my ANSI terminal bootmenu does not use
common/menu.c(4 months ago, there was nomenu.cfile)so you'll be updating the patchseries to utilize common code that now exists ? -mike
What is implemented in that file common/menu.c? It here any info/doc?
Signature · 9 lines
Pali Roh?r pali.rohar at gmail.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 198 bytes Desc: This is a digitally signed message part. URL: <http://lists.denx.de/pipermail/u-boot/attachments/20111218/5004a65e/attachment.pgp>
PATCH 15/16 New command bootmenu: ANSI terminal Boot Menu support
Quoted 8 lines · On Sunday 18 December 2011 15:16:21 Pali Roh?r wrote:
Quoted 7 lines · On Sunday 18 December 2011 15:07:25 Mike Frysinger wrote:
Quoted 6 lines · On Sunday 18 December 2011 14:12:38 Pali Roh?r wrote:
Quoted 4 lines · On Sunday 18 December 2011 14:07:37 Mike Frysinger wrote:
this needs checkpatch for sure
seems like this doesn't use the existing
common/menu.ccode ... shouldn't it ?
Quoted 7 lines
Quoted 5 lines
Quoted 2 lines
No my ANSI terminal bootmenu does not use
common/menu.c(4 months ago, there was nomenu.cfile)so you'll be updating the patchseries to utilize common code that now exists ?
What is implemented in that file
common/menu.c? It here any info/doc?
doc/README.menu
if there are features you have/want that this code base doesn't support, the answer would be to enhance/extend rather than drop in an entirely new/parallel codebase. i know this is more work for you, but long term, the latter would be much more work for everyone.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20120106/748c90e8/attachment.pgp>
PATCH 16/16 RX-51: Add support for bootmenu
In reply to Pali Rohár * default bootmenu contains: NOLO kernel, internal eMMC memory, external SD card, u-boot boot order
* when keyboard is closed always boot NOLO kernel
* when keyborad is open in CONFIG_PREBOOT try load bootmenu.scr from first FAT partition of internal eMMC memory (know as MyDocs) which (should) overwrite default bootmenu
--- include/configs/nokia_rx51.h | 21 +++++++++++++++++---- 1 files changed, 17 insertions(+), 4 deletions(-)
include/configs/nokia_rx51.h +17 -4
@@ -134,6 +134,7 @@#define CONFIG_CMD_MMC /* MMC support */ #undef CONFIG_CMD_ONENAND/* NAND support */ +#define CONFIG_CMD_BOOTMENU /* ANSI terminal Boot Menu */ #define CONFIG_CMD_CLR /* ANSI terminal clear screen command */ #undef CONFIG_CMD_FLASH/* flinfo, erase, protect */
@@ -185,8 +186,6 @@ int rx51_kp_getc(void);#endif /* Environment information */ -#define CONFIG_BOOTDELAY 3 -#define CONFIG_EXTRA_ENV_SETTINGS \ "usbtty=cdc_acm\0" \ "stdin=vga\0" \
@@ -232,10 +231,21 @@ int rx51_kp_getc(void);"fi;" \"fi\0" \"immcboot=setenv mmcnum 1; run trymmcboot\0" \ - "emmcboot=setenv mmcnum 0; run trymmcboot\0" +"emmcboot=setenv mmcnum 0; run trymmcboot\0" \ +"menucmd=bootmenu\0" \ +"bootmenu_0=Internal flash=run noloboot\0" \ +"bootmenu_1=Internal eMMC=run immcboot\0" \ +"bootmenu_2=External SD card=run emmcboot\0" \ +"bootmenu_3=U-Boot boot order=boot\0" \ + "bootmenu_delay=3\0"#define CONFIG_PREBOOT \ - "if test $slide_sw != open; then run noloboot; fi;" + "if test $slide_sw = open; then " \ + "setenv mmcnum 1; setenv mmcpart 1; setenv mmctype fat; setenv mmcfile bootmenu.scr;" \ + "run trymmcscript;" \ + "else " \ + "setenv bootmenu_delay 0;" \ + "fi"#define CONFIG_PREMONITOR \ "echo Extra commands:;" \
@@ -253,7 +263,10 @@ int rx51_kp_getc(void);"run noloboot;" \ "echo" +#define CONFIG_MENUCMD +#define CONFIG_AUTO_COMPLETE +/* * Miscellaneous configurable options */
Signature · 1 line
1.7.5.4
[U-Boot] U-Boot on Nokia RX-51 (aka N900)
In reply to Pali RohárDear Pali =?ISO-8859-1?Q?Roh=E1r?=,
Quoted 6 lines · In message <2772527.Czs1Sl5aoH@pali-elitebook> you wrote:
I'm sending new patch series, which add Nokia RX-51 support to U-Boot. This
patches are based on master commit06e42c6e2ce269667daecd6229d0b7c813838203
and now U-Boot working on Nokia RX-51.
This patch series generates a ton of checkpatch warnings. Please run your code through checkpatch, and make sure to read the respective hits at http://www.denx.de/wiki/U-Boot/Patches ; then clean up the code and resubmit.
Um, and while doing so, please make sure NOT to send all this stuff base64 encoded. Thanks.
WARNING: space prohibited between function name and open parenthesis '(' #130: FILE: arch/arm/lib/bootm.c:128:
+ s = getenv ("atagaddr");
WARNING: consider using kstrto* in preference to simple_strtoul #132: FILE: arch/arm/lib/bootm.c:130:
+ bd->bi_boot_params = simple_strtoul(s, NULL, 16);
WARNING: space prohibited between function name and open parenthesis '(' #137: FILE: arch/arm/lib/bootm.c:135:
+ params = tag_next (params);
WARNING: space prohibited between function name and open parenthesis '(' #145: FILE: arch/arm/lib/bootm.c:142:
+ setup_start_tag (bd);
WARNING: space prohibited between function name and open parenthesis '(' #162: FILE: arch/arm/lib/bootm.c:167:
+#if defined (CONFIG_SETUP_MEMORY_TAGS) || \
WARNING: please, no spaces at the start of a line
#163: FILE: arch/arm/lib/bootm.c:168:
+ defined (CONFIG_CMDLINE_TAG) || \$
WARNING: space prohibited between function name and open parenthesis '(' #163: FILE: arch/arm/lib/bootm.c:168:
+ defined (CONFIG_CMDLINE_TAG) || \
WARNING: please, no spaces at the start of a line
#164: FILE: arch/arm/lib/bootm.c:169:
+ defined (CONFIG_INITRD_TAG) || \$
WARNING: space prohibited between function name and open parenthesis '(' #164: FILE: arch/arm/lib/bootm.c:169:
+ defined (CONFIG_INITRD_TAG) || \
WARNING: please, no spaces at the start of a line
#165: FILE: arch/arm/lib/bootm.c:170:
+ defined (CONFIG_SERIAL_TAG) || \$
WARNING: space prohibited between function name and open parenthesis '(' #165: FILE: arch/arm/lib/bootm.c:170:
+ defined (CONFIG_SERIAL_TAG) || \
WARNING: please, no spaces at the start of a line
#166: FILE: arch/arm/lib/bootm.c:171:
+ defined (CONFIG_REVISION_TAG)$
WARNING: space prohibited between function name and open parenthesis '(' #166: FILE: arch/arm/lib/bootm.c:171:
+ defined (CONFIG_REVISION_TAG)
total: 0 errors, 13 warnings, 53 lines checked
/home/wd/Mail/U-Boot/12777 has style problems, please review.
If any of these errors are false positives, please report them to the maintainer, see CHECKPATCH in MAINTAINERS.
ERROR: space prohibited after that open parenthesis '(' #194: FILE: include/twl4030.h:238:
+ ( (devgrp) << 13 | 1 << 12 | (grp) << 9 | (type2) << 7 \
total: 1 errors, 0 warnings, 110 lines checked
/home/wd/Mail/U-Boot/12778 has style problems, please review.
If any of these errors are false positives, please report them to the maintainer, see CHECKPATCH in MAINTAINERS.
total: 0 errors, 0 warnings, 24 lines checked
/home/wd/Mail/U-Boot/12779 has no obvious style problems and is ready for submission.
WARNING: line over 80 characters
#117: FILE: common/main.c:1028:
+ case '\e': /* ANSI escape char */
WARNING: line over 80 characters
#145: FILE: common/main.c:1056:
+ /* Ignore ANSI escape sequences generated by keyboard */
ERROR: space prohibited after that open parenthesis '(' #147: FILE: common/main.c:1058:
+ if ( c >= 'A' && c <= 'D' ) {
ERROR: space prohibited before that close parenthesis ')' #147: FILE: common/main.c:1058:
+ if ( c >= 'A' && c <= 'D' ) {
WARNING: line over 80 characters
#156: FILE: common/main.c:1067:
+ } else if (esc == 3 && n < CONFIG_SYS_CBSIZE-4) {
total: 2 errors, 3 warnings, 62 lines checked
/home/wd/Mail/U-Boot/12780 has style problems, please review.
If any of these errors are false positives, please report them to the maintainer, see CHECKPATCH in MAINTAINERS.
total: 0 errors, 0 warnings, 8 lines checked
/home/wd/Mail/U-Boot/12781 has no obvious style problems and is ready for submission.
WARNING: line over 80 characters
#129: FILE: drivers/video/cfb_console.c:712:
+ video_hw_rectfill(VIDEO_PIXEL_SIZE, /* bytes per pixel */
WARNING: line over 80 characters
#130: FILE: drivers/video/cfb_console.c:713:
+ VIDEO_FONT_WIDTH * begin, /* dest pos x */ /* FIXME: correct? */
WARNING: line over 80 characters
#131: FILE: drivers/video/cfb_console.c:714:
+ video_logo_height + CONSOLE_ROW_SIZE * line, /* dest pos y */ /* FIXME: correct? */
WARNING: line over 80 characters
#132: FILE: drivers/video/cfb_console.c:715:
+ VIDEO_FONT_WIDTH * ( end - begin ), /* frame width */ /* FIXME: correct? */
ERROR: space prohibited after that open parenthesis '(' #132: FILE: drivers/video/cfb_console.c:715:
+ VIDEO_FONT_WIDTH * ( end - begin ), /* frame width */ /* FIXME: correct? */
ERROR: space prohibited before that close parenthesis ')' #132: FILE: drivers/video/cfb_console.c:715:
+ VIDEO_FONT_WIDTH * ( end - begin ), /* frame width */ /* FIXME: correct? */
WARNING: line over 80 characters
#133: FILE: drivers/video/cfb_console.c:716:
+ VIDEO_FONT_HEIGHT, /* frame height */
WARNING: line over 80 characters
#134: FILE: drivers/video/cfb_console.c:717:
+ bgx /* fill color */
ERROR: space prohibited after that open parenthesis '(' #138: FILE: drivers/video/cfb_console.c:721:
+ if ( begin == 0 && end == CONSOLE_COLS )
ERROR: space prohibited before that close parenthesis ')' #138: FILE: drivers/video/cfb_console.c:721:
+ if ( begin == 0 && end == CONSOLE_COLS )
WARNING: line over 80 characters
#139: FILE: drivers/video/cfb_console.c:722:
+ memsetl(CONSOLE_ROW_FIRST + CONSOLE_ROW_SIZE * line, /* offset of row */
WARNING: line over 80 characters
#140: FILE: drivers/video/cfb_console.c:723:
+ CONSOLE_ROW_SIZE >> 2, /* length of row */
WARNING: line over 80 characters
#141: FILE: drivers/video/cfb_console.c:724:
+ bgx /* fill color */
ERROR: space prohibited after that open parenthesis '(' #144: FILE: drivers/video/cfb_console.c:727:
+ for ( i = 0; i < VIDEO_FONT_HEIGHT; ++i )
ERROR: space prohibited before that close parenthesis ')' #144: FILE: drivers/video/cfb_console.c:727:
+ for ( i = 0; i < VIDEO_FONT_HEIGHT; ++i )
WARNING: line over 80 characters
#145: FILE: drivers/video/cfb_console.c:728:
+ memsetl(CONSOLE_ROW_FIRST + CONSOLE_ROW_SIZE * line + /* offset of row */
WARNING: line over 80 characters
#146: FILE: drivers/video/cfb_console.c:729:
+ VIDEO_FONT_WIDTH * VIDEO_PIXEL_SIZE * begin + /* offset of col */
WARNING: line over 80 characters
#147: FILE: drivers/video/cfb_console.c:730:
+ i * VIDEO_LINE_LEN, /* col offset of i-th line */
WARNING: line over 80 characters
#148: FILE: drivers/video/cfb_console.c:731:
+ (VIDEO_FONT_WIDTH * VIDEO_PIXEL_SIZE * ( end - begin + 1)) >> 2, /* length to end of line */
ERROR: space prohibited after that open parenthesis '(' #148: FILE: drivers/video/cfb_console.c:731:
+ (VIDEO_FONT_WIDTH * VIDEO_PIXEL_SIZE * ( end - begin + 1)) >> 2, /* length to end of line */
WARNING: line over 80 characters
#149: FILE: drivers/video/cfb_console.c:732:
+ bgx /* fill color */
total: 7 errors, 14 warnings, 68 lines checked
/home/wd/Mail/U-Boot/12782 has style problems, please review.
If any of these errors are false positives, please report them to the maintainer, see CHECKPATCH in MAINTAINERS.
total: 0 errors, 0 warnings, 98 lines checked
/home/wd/Mail/U-Boot/12783 has no obvious style problems and is ready for submission.
ERROR: do not initialise statics to 0 or NULL
#112: FILE: drivers/video/cfb_console.c:381:
+static int ansi_buf_size = 0;
ERROR: do not initialise statics to 0 or NULL
#113: FILE: drivers/video/cfb_console.c:382:
+static int ansi_colors_need_revert = 0;
WARNING: space prohibited between function name and open parenthesis '(' #166: FILE: drivers/video/cfb_console.c:930:
+ if (ansi_buf_size >= sizeof (ansi_buf))
WARNING: line over 80 characters
#236: FILE: drivers/video/cfb_console.c:1000:
+ if ((ansi_buf[i] >= 'A' && ansi_buf[i] <= 'H') || ansi_buf[i] == 'J' || ansi_buf[i] == 'K' || ansi_buf[i] == 'm') {
ERROR: that open brace { should be on the previous line #245: FILE: drivers/video/cfb_console.c:1009:
+ if (fail)
+ {
ERROR: that open brace { should be on the previous line #253: FILE: drivers/video/cfb_console.c:1017:
+ if (flush)
+ {
WARNING: line over 80 characters
#298: FILE: drivers/video/cfb_console.c:1062:
+ console_clear_line(console_row, console_col, CONSOLE_COLS-1);
WARNING: line over 80 characters
#300: FILE: drivers/video/cfb_console.c:1064:
+ console_clear_line(console_row, 0, console_col);
WARNING: line over 80 characters
#302: FILE: drivers/video/cfb_console.c:1066:
+ console_clear_line(console_row, 0, CONSOLE_COLS-1);
WARNING: line over 80 characters
#310: FILE: drivers/video/cfb_console.c:1074:
+ } else if (num1 == 7) { /* swap colors (only once) */
ERROR: that open brace { should be on the previous line #321: FILE: drivers/video/cfb_console.c:1085:
+ else
+ {
ERROR: else should follow close brace '}'
#321: FILE: drivers/video/cfb_console.c:1085:
+ }
+ else
total: 6 errors, 6 warnings, 223 lines checked
/home/wd/Mail/U-Boot/12784 has style problems, please review.
If any of these errors are false positives, please report them to the maintainer, see CHECKPATCH in MAINTAINERS.
total: 0 errors, 0 warnings, 14 lines checked
/home/wd/Mail/U-Boot/12785 has no obvious style problems and is ready for submission.
total: 0 errors, 0 warnings, 52 lines checked
/home/wd/Mail/U-Boot/12786 has no obvious style problems and is ready for submission.
WARNING: line over 80 characters
#113: FILE: common/main.c:85:
+#if defined (CONFIG_MENUKEY) && ! defined (CONFIG_MENUCMD) && ( ! defined(CONFIG_BOOTDELAY) || CONFIG_BOOTDELAY < 0 )
WARNING: space prohibited between function name and open parenthesis '('
#113: FILE: common/main.c:85:
+#if defined (CONFIG_MENUKEY) && ! defined (CONFIG_MENUCMD) && ( ! defined(CONFIG_BOOTDELAY) || CONFIG_BOOTDELAY < 0 )
WARNING: space prohibited between function name and open parenthesis '('
#113: FILE: common/main.c:85:
+#if defined (CONFIG_MENUKEY) && ! defined (CONFIG_MENUCMD) && ( ! defined(CONFIG_BOOTDELAY) || CONFIG_BOOTDELAY < 0 )
ERROR: space prohibited after that '!' (ctx:WxW)
#113: FILE: common/main.c:85:
+#if defined (CONFIG_MENUKEY) && ! defined (CONFIG_MENUCMD) && ( ! defined(CONFIG_BOOTDELAY) || CONFIG_BOOTDELAY < 0 )
^
ERROR: space prohibited after that '!' (ctx:WxW)
#113: FILE: common/main.c:85:
+#if defined (CONFIG_MENUKEY) && ! defined (CONFIG_MENUCMD) && ( ! defined(CONFIG_BOOTDELAY) || CONFIG_BOOTDELAY < 0 )
^
ERROR: space prohibited after that open parenthesis '('
#113: FILE: common/main.c:85:
+#if defined (CONFIG_MENUKEY) && ! defined (CONFIG_MENUCMD) && ( ! defined(CONFIG_BOOTDELAY) || CONFIG_BOOTDELAY < 0 )
ERROR: space prohibited before that close parenthesis ')'
#113: FILE: common/main.c:85:
+#if defined (CONFIG_MENUKEY) && ! defined (CONFIG_MENUCMD) && ( ! defined(CONFIG_BOOTDELAY) || CONFIG_BOOTDELAY < 0 )
WARNING: line over 80 characters
#114: FILE: common/main.c:86:
+#error CONFIG_MENUKEY is defined, but not CONFIG_MENUCMD and/or CONFIG_BOOTDELAY >= 0
ERROR: do not initialise statics to 0 or NULL
#120: FILE: common/main.c:92:
+static int menucmd = 0;
WARNING: space prohibited between function name and open parenthesis '(' #146: FILE: common/main.c:253:
+# if defined (CONFIG_MENUCMD) && defined (CONFIG_MENUKEY)
WARNING: space prohibited between function name and open parenthesis '(' #146: FILE: common/main.c:253:
+# if defined (CONFIG_MENUCMD) && defined (CONFIG_MENUKEY)
WARNING: line over 80 characters
#147: FILE: common/main.c:254:
+ if (CONFIG_MENUKEY == 0 || CONFIG_MENUKEY == getc())
total: 5 errors, 7 warnings, 73 lines checked
/home/wd/Mail/U-Boot/12787 has style problems, please review.
If any of these errors are false positives, please report them to the maintainer, see CHECKPATCH in MAINTAINERS.
WARNING: space prohibited between function name and open parenthesis '(' #125: FILE: common/main.c:429:
+ if ((s = getenv ("premonitor")) != NULL) {
ERROR: do not use assignment in if condition
#125: FILE: common/main.c:429:
+ if ((s = getenv ("premonitor")) != NULL) {
WARNING: space prohibited between function name and open parenthesis '(' #127: FILE: common/main.c:431:
+ run_command (s, 0);
WARNING: line over 80 characters
#129: FILE: common/main.c:433:
+ parse_string_outer(s, FLAG_PARSE_SEMICOLON | FLAG_EXIT_FROM_LOOP);
total: 1 errors, 3 warnings, 25 lines checked
/home/wd/Mail/U-Boot/12788 has style problems, please review.
If any of these errors are false positives, please report them to the maintainer, see CHECKPATCH in MAINTAINERS.
WARNING: externs should be avoided in .c files #282: FILE: board/nokia/rx51/rx51.c:59:
+extern u32 rx51_atagaddr; /* atag address */
WARNING: externs should be avoided in .c files #283: FILE: board/nokia/rx51/rx51.c:60:
+extern u32 rx51_kernaddr; /* attached kernel address */
WARNING: line over 80 characters
#297: FILE: board/nokia/rx51/rx51.c:74:
+"startaddr:\n" /* address where should be u-boot after relocation */
WARNING: line over 80 characters
#299: FILE: board/nokia/rx51/rx51.c:76:
+"relocaddr:\n" /* address of this relocaddr section after relocation */
WARNING: line over 80 characters
#300: FILE: board/nokia/rx51/rx51.c:77:
+" .word .\n" /* dot - address of this section (calculated at compile time, so same as after relocation) */
WARNING: line over 80 characters
#307: FILE: board/nokia/rx51/rx51.c:84:
+"kernaddr:\n" /* stored attached kernel address (u-boot + 0x40000) */
WARNING: line over 80 characters
#310: FILE: board/nokia/rx51/rx51.c:87:
+"save_boot_params:\n" /* function save_boot_params, called after reset */
WARNING: line over 80 characters
#313: FILE: board/nokia/rx51/rx51.c:90:
+" ldr r1, relocaddr\n" /* r1 - address where should be this relocaddr section after relocation */
WARNING: line over 80 characters
#314: FILE: board/nokia/rx51/rx51.c:91:
+" sub r0, r0, r1\n" /* r1 - calculated offset for relocation */
WARNING: line over 80 characters
#315: FILE: board/nokia/rx51/rx51.c:92:
+" ldr r1, startaddr\n" /* r1 - address where u-boot should be after relocation */
WARNING: line over 80 characters
#316: FILE: board/nokia/rx51/rx51.c:93:
+" add r0, r0, r1\n" /* r0 - address where is u-boot (address after relocation + offset) */
WARNING: line over 80 characters
#319: FILE: board/nokia/rx51/rx51.c:96:
+" bne reloc\n" /* start relocation if u-boot is not loaded at correct address CONFIG_SYS_TEXT_BASE */
WARNING: line over 80 characters
#320: FILE: board/nokia/rx51/rx51.c:97:
+" bx lr\n" /* else return back to reset section (relocation is not needed) */
WARNING: line over 80 characters
#324: FILE: board/nokia/rx51/rx51.c:101:
+" add r2, r0, #0x40000\n" /* r2 - address where is attached kernel (u-boot address + kernel offset 0x40000) - also end address of u-boot */
WARNING: line over 80 characters
#334: FILE: board/nokia/rx51/rx51.c:111:
+" ldr pc, startaddr\n" /* jump to start section (where should be u-boot after relocation) and restart u-boot */
WARNING: line over 80 characters
#375: FILE: board/nokia/rx51/rx51.c:152:
+ twl4030_i2c_write_u8(TWL4030_CHIP_PM_MASTER, msg >> 8, TWL4030_PM_MASTER_PB_WORD_MSB);
WARNING: line over 80 characters
#376: FILE: board/nokia/rx51/rx51.c:153:
+ twl4030_i2c_write_u8(TWL4030_CHIP_PM_MASTER, msg & 0xff, TWL4030_PM_MASTER_PB_WORD_LSB);
WARNING: line over 80 characters
#403: FILE: board/nokia/rx51/rx51.c:180:
+ twl4030_i2c_write_u8(TWL4030_CHIP_PM_MASTER, 0x02, TWL4030_PM_MASTER_PB_CFG);
ERROR: do not initialise statics to 0 or NULL
#432: FILE: board/nokia/rx51/rx51.c:209:
+static unsigned long int twl_wd_time = 0; /* last time of watchdog reset */
WARNING: Use of volatile is usually wrong: see Documentation/volatile-considered-harmful.txt #433: FILE: board/nokia/rx51/rx51.c:210:
+static volatile unsigned long int twl_i2c_lock;
ERROR: space prohibited after that open parenthesis '(' #444: FILE: board/nokia/rx51/rx51.c:221:
+ if ( get_timer(twl_wd_time) < 4 * CONFIG_SYS_HZ )
ERROR: space prohibited before that close parenthesis ')' #444: FILE: board/nokia/rx51/rx51.c:221:
+ if ( get_timer(twl_wd_time) < 4 * CONFIG_SYS_HZ )
ERROR: space prohibited after that open parenthesis '(' #448: FILE: board/nokia/rx51/rx51.c:225:
+ if ( test_and_set_bit(0, &twl_i2c_lock) )
ERROR: space prohibited before that close parenthesis ')' #448: FILE: board/nokia/rx51/rx51.c:225:
+ if ( test_and_set_bit(0, &twl_i2c_lock) )
WARNING: line over 80 characters
#452: FILE: board/nokia/rx51/rx51.c:229:
+ twl4030_i2c_read_u8(TWL4030_CHIP_PM_RECEIVER, &timeout, TWL4030_PM_RECEIVER_WATCHDOG_CFG);
ERROR: space prohibited after that open parenthesis '(' #456: FILE: board/nokia/rx51/rx51.c:233:
+ if ( timeout != 0 )
ERROR: space prohibited before that close parenthesis ')' #456: FILE: board/nokia/rx51/rx51.c:233:
+ if ( timeout != 0 )
WARNING: line over 80 characters
#457: FILE: board/nokia/rx51/rx51.c:234:
+ twl4030_i2c_write_u8(TWL4030_CHIP_PM_RECEIVER, 31, TWL4030_PM_RECEIVER_WATCHDOG_CFG);
ERROR: do not initialise statics to 0 or NULL
#495: FILE: board/nokia/rx51/rx51.c:272:
+static u8 keybuf_head = 0;
ERROR: do not initialise statics to 0 or NULL
#496: FILE: board/nokia/rx51/rx51.c:273:
+static u8 keybuf_tail = 0;
WARNING: line over 80 characters
#532: FILE: board/nokia/rx51/rx51.c:309:
+ if (!(mods & 2) && (k == 18 || k == 31 || k == 33 || k == 34)) { /* cursor keys, without fn */
ERROR: space prohibited after that open parenthesis '(' #582: FILE: board/nokia/rx51/rx51.c:359:
+ if ( test_and_set_bit(0, &twl_i2c_lock) )
ERROR: space prohibited before that close parenthesis ')' #582: FILE: board/nokia/rx51/rx51.c:359:
+ if ( test_and_set_bit(0, &twl_i2c_lock) )
WARNING: line over 80 characters
#764: FILE: board/nokia/rx51/rx51.h:108:
+ MUX_VAL(CP(GPMC_NCS6), (IEN | PTD | DIS | M1)) /*SYS_nDMA_REQ2*/\
WARNING: line over 80 characters
#765: FILE: board/nokia/rx51/rx51.h:109:
+ MUX_VAL(CP(GPMC_NCS7), (IEN | PTU | EN | M1)) /*SYS_nDMA_REQ3*/\
WARNING: line over 80 characters
#770: FILE: board/nokia/rx51/rx51.h:114:
+ MUX_VAL(CP(GPMC_NADV_ALE), (IDIS | PTD | DIS | M0)) /*GPMC_nADV_ALE*/\
WARNING: line over 80 characters
#773: FILE: board/nokia/rx51/rx51.h:117:
+ MUX_VAL(CP(GPMC_NBE0_CLE), (IDIS | PTD | DIS | M0)) /*GPMC_nBE0_CLE*/\
WARNING: line over 80 characters
#833: FILE: board/nokia/rx51/rx51.h:177:
+ MUX_VAL(CP(MCBSP2_CLKX), (IEN | PTD | DIS | M0)) /*McBSP2_CLKX*/\
WARNING: line over 80 characters
#872: FILE: board/nokia/rx51/rx51.h:216:
+ MUX_VAL(CP(MCBSP4_CLKX), (IEN | PTD | DIS | M1)) /*SSI1_DAT_RX*/\
WARNING: line over 80 characters
#873: FILE: board/nokia/rx51/rx51.h:217:
+ MUX_VAL(CP(MCBSP4_DR), (IEN | PTD | DIS | M1)) /*SSI1_FLAG_RX*/\
WARNING: line over 80 characters
#874: FILE: board/nokia/rx51/rx51.h:218:
+ MUX_VAL(CP(MCBSP4_DX), (IEN | PTD | DIS | M1)) /*SSI1_RDY_RX*/\
WARNING: line over 80 characters
#884: FILE: board/nokia/rx51/rx51.h:228:
+ MUX_VAL(CP(UART3_CTS_RCTX), (IEN | PTD | EN | M0)) /*UART3_CTS_RCTX*/\
WARNING: line over 80 characters
#885: FILE: board/nokia/rx51/rx51.h:229:
+ MUX_VAL(CP(UART3_RTS_SD), (IDIS | PTD | DIS | M0)) /*UART3_RTS_SD */\
WARNING: line over 80 characters
#886: FILE: board/nokia/rx51/rx51.h:230:
+ MUX_VAL(CP(UART3_RX_IRRX), (IEN | PTD | DIS | M0)) /*UART3_RX_IRRX*/\
WARNING: line over 80 characters
#887: FILE: board/nokia/rx51/rx51.h:231:
+ MUX_VAL(CP(UART3_TX_IRTX), (IDIS | PTD | DIS | M0)) /*UART3_TX_IRTX*/\
WARNING: line over 80 characters
#892: FILE: board/nokia/rx51/rx51.h:236:
+ MUX_VAL(CP(HSUSB0_DATA0), (IEN | PTD | DIS | M0)) /*HSUSB0_DATA0*/\
WARNING: line over 80 characters
#893: FILE: board/nokia/rx51/rx51.h:237:
+ MUX_VAL(CP(HSUSB0_DATA1), (IEN | PTD | DIS | M0)) /*HSUSB0_DATA1*/\
WARNING: line over 80 characters
#894: FILE: board/nokia/rx51/rx51.h:238:
+ MUX_VAL(CP(HSUSB0_DATA2), (IEN | PTD | DIS | M0)) /*HSUSB0_DATA2*/\
WARNING: line over 80 characters
#895: FILE: board/nokia/rx51/rx51.h:239:
+ MUX_VAL(CP(HSUSB0_DATA3), (IEN | PTD | DIS | M0)) /*HSUSB0_DATA3*/\
WARNING: line over 80 characters
#896: FILE: board/nokia/rx51/rx51.h:240:
+ MUX_VAL(CP(HSUSB0_DATA4), (IEN | PTD | DIS | M0)) /*HSUSB0_DATA4*/\
WARNING: line over 80 characters
#897: FILE: board/nokia/rx51/rx51.h:241:
+ MUX_VAL(CP(HSUSB0_DATA5), (IEN | PTD | DIS | M0)) /*HSUSB0_DATA5*/\
WARNING: line over 80 characters
#898: FILE: board/nokia/rx51/rx51.h:242:
+ MUX_VAL(CP(HSUSB0_DATA6), (IEN | PTD | DIS | M0)) /*HSUSB0_DATA6*/\
WARNING: line over 80 characters
#899: FILE: board/nokia/rx51/rx51.h:243:
+ MUX_VAL(CP(HSUSB0_DATA7), (IEN | PTD | DIS | M0)) /*HSUSB0_DATA7*/\
WARNING: line over 80 characters
#911: FILE: board/nokia/rx51/rx51.h:255:
+ MUX_VAL(CP(MCSPI1_SOMI), (IEN | PTD | DIS | M0)) /*McSPI1_SOMI*/\
WARNING: line over 80 characters
#916: FILE: board/nokia/rx51/rx51.h:260:
+ MUX_VAL(CP(MCSPI1_CS3), (IEN | PTU | DIS | M3)) /*HSUSB2_DATA2*/\
WARNING: line over 80 characters
#917: FILE: board/nokia/rx51/rx51.h:261:
+ MUX_VAL(CP(MCSPI2_CLK), (IEN | PTU | DIS | M3)) /*HSUSB2_DATA7*/\
WARNING: line over 80 characters
#918: FILE: board/nokia/rx51/rx51.h:262:
+ MUX_VAL(CP(MCSPI2_SIMO), (IEN | PTU | DIS | M3)) /*HSUSB2_DATA4*/\
WARNING: line over 80 characters
#919: FILE: board/nokia/rx51/rx51.h:263:
+ MUX_VAL(CP(MCSPI2_SOMI), (IEN | PTU | DIS | M3)) /*HSUSB2_DATA5*/\
WARNING: line over 80 characters
#920: FILE: board/nokia/rx51/rx51.h:264:
+ MUX_VAL(CP(MCSPI2_CS0), (IEN | PTU | DIS | M3)) /*HSUSB2_DATA6*/\
WARNING: line over 80 characters
#921: FILE: board/nokia/rx51/rx51.h:265:
+ MUX_VAL(CP(MCSPI2_CS1), (IEN | PTU | DIS | M3)) /*HSUSB2_DATA3*/\
WARNING: line over 80 characters
#926: FILE: board/nokia/rx51/rx51.h:270:
+ MUX_VAL(CP(ETK_D14_ES2), (IEN | PTU | DIS | M3)) /*HSUSB2_DATA0*/\
WARNING: line over 80 characters
#927: FILE: board/nokia/rx51/rx51.h:271:
+ MUX_VAL(CP(ETK_D15_ES2), (IEN | PTU | DIS | M3)) /*HSUSB2_DATA1*/\
WARNING: line over 80 characters
#934: FILE: board/nokia/rx51/rx51.h:278:
+ MUX_VAL(CP(SYS_BOOT2), (IEN | PTD | DIS | M4)) /*GPIO_4 - MMC1_WP*/\
WARNING: line over 80 characters
#939: FILE: board/nokia/rx51/rx51.h:283:
+ MUX_VAL(CP(SYS_OFF_MODE), (IEN | PTD | DIS | M0)) /*SYS_OFF_MODE*/\
WARNING: line over 80 characters
#940: FILE: board/nokia/rx51/rx51.h:284:
+ MUX_VAL(CP(SYS_CLKOUT1), (IEN | PTD | DIS | M0)) /*SYS_CLKOUT1*/\
WARNING: line over 80 characters
#944: FILE: board/nokia/rx51/rx51.h:288:
+ MUX_VAL(CP(ETK_D0_ES2), (IEN | PTU | DIS | M3)) /*HSUSB1_DATA0*/\
WARNING: line over 80 characters
#945: FILE: board/nokia/rx51/rx51.h:289:
+ MUX_VAL(CP(ETK_D1_ES2), (IEN | PTU | DIS | M3)) /*HSUSB1_DATA1*/\
WARNING: line over 80 characters
#946: FILE: board/nokia/rx51/rx51.h:290:
+ MUX_VAL(CP(ETK_D2_ES2), (IEN | PTU | DIS | M3)) /*HSUSB1_DATA2*/\
WARNING: line over 80 characters
#947: FILE: board/nokia/rx51/rx51.h:291:
+ MUX_VAL(CP(ETK_D3_ES2), (IEN | PTU | DIS | M3)) /*HSUSB1_DATA7*/\
WARNING: line over 80 characters
#948: FILE: board/nokia/rx51/rx51.h:292:
+ MUX_VAL(CP(ETK_D4_ES2), (IEN | PTU | DIS | M3)) /*HSUSB1_DATA4*/\
WARNING: line over 80 characters
#949: FILE: board/nokia/rx51/rx51.h:293:
+ MUX_VAL(CP(ETK_D5_ES2), (IEN | PTU | DIS | M3)) /*HSUSB1_DATA5*/\
WARNING: line over 80 characters
#950: FILE: board/nokia/rx51/rx51.h:294:
+ MUX_VAL(CP(ETK_D6_ES2), (IEN | PTU | DIS | M3)) /*HSUSB1_DATA6*/\
WARNING: line over 80 characters
#951: FILE: board/nokia/rx51/rx51.h:295:
+ MUX_VAL(CP(ETK_D7_ES2), (IEN | PTU | DIS | M3)) /*HSUSB1_DATA3*/\
WARNING: line over 80 characters
#990: FILE: board/nokia/rx51/rx51.h:334:
+ MUX_VAL(CP(D2D_CLK26MI), (IEN | PTD | DIS | M0)) /*d2d_clk26mi*/\
WARNING: line over 80 characters
#991: FILE: board/nokia/rx51/rx51.h:335:
+ MUX_VAL(CP(D2D_NRESPWRON), (IEN | PTD | EN | M0)) /*d2d_nrespwron*/\
WARNING: line over 80 characters
#992: FILE: board/nokia/rx51/rx51.h:336:
+ MUX_VAL(CP(D2D_NRESWARM), (IEN | PTU | EN | M0)) /*d2d_nreswarm */\
WARNING: line over 80 characters
#993: FILE: board/nokia/rx51/rx51.h:337:
+ MUX_VAL(CP(D2D_ARM9NIRQ), (IEN | PTD | DIS | M0)) /*d2d_arm9nirq */\
WARNING: line over 80 characters
#994: FILE: board/nokia/rx51/rx51.h:338:
+ MUX_VAL(CP(D2D_UMA2P6FIQ), (IEN | PTD | DIS | M0)) /*d2d_uma2p6fiq*/\
WARNING: line over 80 characters
#997: FILE: board/nokia/rx51/rx51.h:341:
+ MUX_VAL(CP(D2D_DMAREQ0), (IEN | PTD | DIS | M0)) /*d2d_dmareq0*/\
WARNING: line over 80 characters
#998: FILE: board/nokia/rx51/rx51.h:342:
+ MUX_VAL(CP(D2D_DMAREQ1), (IEN | PTD | DIS | M0)) /*d2d_dmareq1*/\
WARNING: line over 80 characters
#999: FILE: board/nokia/rx51/rx51.h:343:
+ MUX_VAL(CP(D2D_DMAREQ2), (IEN | PTD | DIS | M0)) /*d2d_dmareq2*/\
WARNING: line over 80 characters
#1000: FILE: board/nokia/rx51/rx51.h:344:
+ MUX_VAL(CP(D2D_DMAREQ3), (IEN | PTD | DIS | M0)) /*d2d_dmareq3*/\
WARNING: line over 80 characters
#1001: FILE: board/nokia/rx51/rx51.h:345:
+ MUX_VAL(CP(D2D_N3GTRST), (IEN | PTD | DIS | M0)) /*d2d_n3gtrst*/\
WARNING: line over 80 characters
#1006: FILE: board/nokia/rx51/rx51.h:350:
+ MUX_VAL(CP(D2D_N3GRTCK), (IEN | PTD | DIS | M0)) /*d2d_n3grtck*/\
WARNING: line over 80 characters
#1008: FILE: board/nokia/rx51/rx51.h:352:
+ MUX_VAL(CP(D2D_SWAKEUP), (IEN | PTD | EN | M0)) /*d2d_swakeup*/\
WARNING: line over 80 characters
#1009: FILE: board/nokia/rx51/rx51.h:353:
+ MUX_VAL(CP(D2D_IDLEREQ), (IEN | PTD | DIS | M0)) /*d2d_idlereq*/\
WARNING: line over 80 characters
#1010: FILE: board/nokia/rx51/rx51.h:354:
+ MUX_VAL(CP(D2D_IDLEACK), (IEN | PTU | EN | M0)) /*d2d_idleack*/\
WARNING: line over 80 characters
#1015: FILE: board/nokia/rx51/rx51.h:359:
+ MUX_VAL(CP(D2D_MBUSFLAG), (IEN | PTD | DIS | M0)) /*d2d_mbusflag*/\
WARNING: line over 80 characters
#1016: FILE: board/nokia/rx51/rx51.h:360:
+ MUX_VAL(CP(D2D_SBUSFLAG), (IEN | PTD | DIS | M0)) /*d2d_sbusflag*/\
WARNING: line over 80 characters
#1088: FILE: include/configs/nokia_rx51.h:42:
+#define CONFIG_ARMV7 /* This is an ARM V7 CPU core */
WARNING: line over 80 characters
#1089: FILE: include/configs/nokia_rx51.h:43:
+#define CONFIG_OMAP /* in a TI OMAP core */
WARNING: line over 80 characters
#1090: FILE: include/configs/nokia_rx51.h:44:
+#define CONFIG_OMAP34XX /* which is a 34XX */
WARNING: line over 80 characters
#1091: FILE: include/configs/nokia_rx51.h:45:
+#define CONFIG_OMAP3430 /* which is in a 3430 */
WARNING: line over 80 characters
#1092: FILE: include/configs/nokia_rx51.h:46:
+#define CONFIG_CHAINLOADER /* Loaded by NOLO */
WARNING: line over 80 characters
#1093: FILE: include/configs/nokia_rx51.h:47:
+#define CONFIG_L2_OFF /* kernel won't boot if l2 enabled (old u-boot tried but failed to enable it, due to a bug.) */
WARNING: line over 80 characters
#1100: FILE: include/configs/nokia_rx51.h:54:
+#define CONFIG_SDRC /* The chip has SDRC controller */
WARNING: line over 80 characters
#1102: FILE: include/configs/nokia_rx51.h:56:
+#include <asm/arch/cpu.h> /* get chip and board defs */
WARNING: line over 80 characters
#1112: FILE: include/configs/nokia_rx51.h:66:
+#define V_OSCK 26000000 /* Clock output from T2 */
WARNING: line over 80 characters
#1115: FILE: include/configs/nokia_rx51.h:69:
+#undef CONFIG_USE_IRQ /* no support for IRQs */
WARNING: line over 80 characters
#1117: FILE: include/configs/nokia_rx51.h:71:
+#define CONFIG_SKIP_LOWLEVEL_INIT /* NOLO set everything up */
WARNING: line over 80 characters
#1119: FILE: include/configs/nokia_rx51.h:73:
+#define CONFIG_CMDLINE_TAG /* enable passing kernel command line string */
WARNING: line over 80 characters
#1120: FILE: include/configs/nokia_rx51.h:74:
+#define CONFIG_INITRD_TAG /* enable passing initrd */
WARNING: line over 80 characters
#1125: FILE: include/configs/nokia_rx51.h:79:
+#define CONFIG_ENV_SIZE (128 << 10) /* 128 KiB Sector */
WARNING: line over 80 characters
#1135: FILE: include/configs/nokia_rx51.h:89:
+#define V_NS16550_CLK 48000000 /* 48MHz (APLL96/2) */
WARNING: line over 80 characters
#1147: FILE: include/configs/nokia_rx51.h:101:
+#define CONFIG_SERIAL3 3 /* UART3 on RX-51 */
ERROR: space required after that ',' (ctx:VxV)
#1152: FILE: include/configs/nokia_rx51.h:106:
+#define CONFIG_SYS_BAUDRATE_TABLE {4800, 9600, 19200, 38400, 57600,115200}
^
WARNING: line over 80 characters
#1176: FILE: include/configs/nokia_rx51.h:130:
+#define CONFIG_CMD_EXT2 /* EXT2 Support */
WARNING: line over 80 characters
#1177: FILE: include/configs/nokia_rx51.h:131:
+#define CONFIG_CMD_FAT /* FAT support */
WARNING: line over 80 characters
#1179: FILE: include/configs/nokia_rx51.h:133:
+#define CONFIG_CMD_I2C /* I2C serial bus support */
WARNING: line over 80 characters
#1180: FILE: include/configs/nokia_rx51.h:134:
+#define CONFIG_CMD_MMC /* MMC support */
WARNING: line over 80 characters
#1181: FILE: include/configs/nokia_rx51.h:135:
+#undef CONFIG_CMD_ONENAND /* NAND support */
WARNING: line over 80 characters
#1183: FILE: include/configs/nokia_rx51.h:137:
+#define CONFIG_CMD_CLR /* ANSI terminal clear screen command */
WARNING: line over 80 characters
#1185: FILE: include/configs/nokia_rx51.h:139:
+#undef CONFIG_CMD_FLASH /* flinfo, erase, protect */
WARNING: line over 80 characters
#1186: FILE: include/configs/nokia_rx51.h:140:
+#undef CONFIG_CMD_FPGA /* FPGA configuration Support */
WARNING: line over 80 characters
#1188: FILE: include/configs/nokia_rx51.h:142:
+#undef CONFIG_CMD_IMLS /* List all found images */
WARNING: line over 80 characters
#1189: FILE: include/configs/nokia_rx51.h:143:
+#undef CONFIG_CMD_NET /* bootp, tftpboot, rarpboot */
WARNING: line over 80 characters
#1190: FILE: include/configs/nokia_rx51.h:144:
+#undef CONFIG_CMD_NFS /* NFS support */
WARNING: line over 80 characters
#1216: FILE: include/configs/nokia_rx51.h:170:
+#define CONFIG_CFB_CONSOLE_ANSI /* Enable ANSI escape codes in framebuffer */
WARNING: line over 80 characters
#1249: FILE: include/configs/nokia_rx51.h:203:
+ "scriptload=${mmctype}load mmc ${mmcnum}:${mmcpart} ${loadaddr} ${mmcfile}\0" \
WARNING: line over 80 characters
#1250: FILE: include/configs/nokia_rx51.h:204:
+ "scriptboot=echo Running ${mmcfile} from mmc ${mmcnum}:${mmcpart} ...;" \
WARNING: line over 80 characters
#1252: FILE: include/configs/nokia_rx51.h:206:
+ "uimageload=${mmctype}load mmc ${mmcnum}:${mmcpart} ${loadaddr} ${mmcfile}\0" \
WARNING: line over 80 characters
#1253: FILE: include/configs/nokia_rx51.h:207:
+ "uimageboot=echo Booting ${mmcfile} from mmc ${mmcnum}:${mmcpart} ...;" \
WARNING: line over 80 characters
#1306: FILE: include/configs/nokia_rx51.h:260:
+#define CONFIG_SYS_LONGHELP /* undef to save memory */
WARNING: line over 80 characters
#1307: FILE: include/configs/nokia_rx51.h:261:
+#define CONFIG_SYS_HUSH_PARSER /* use "hush" command parser */
WARNING: line over 80 characters
#1310: FILE: include/configs/nokia_rx51.h:264:
+#define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */
WARNING: line over 80 characters
#1312: FILE: include/configs/nokia_rx51.h:266:
+#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
WARNING: line over 80 characters
#1313: FILE: include/configs/nokia_rx51.h:267:
+#define CONFIG_SYS_MAXARGS 16 /* max number of command args */
WARNING: line over 80 characters
#1317: FILE: include/configs/nokia_rx51.h:271:
+#define CONFIG_SYS_MEMTEST_START (OMAP34XX_SDRC_CS0) /* memtest works on */
WARNING: line over 80 characters
#1318: FILE: include/configs/nokia_rx51.h:272:
+#define CONFIG_SYS_MEMTEST_END (OMAP34XX_SDRC_CS0 + 0x01F00000) /* 31MB */
WARNING: line over 80 characters
#1320: FILE: include/configs/nokia_rx51.h:274:
+#define CONFIG_SYS_LOAD_ADDR (OMAP34XX_SDRC_CS0) /* default load address */
WARNING: line over 80 characters
#1328: FILE: include/configs/nokia_rx51.h:282:
+#define CONFIG_SYS_PTV 2 /* Divisor: 2^(PTV+1) => 8 */
WARNING: line over 80 characters
#1336: FILE: include/configs/nokia_rx51.h:290:
+#define CONFIG_STACKSIZE (128 << 10) /* regular stack 128 KiB */
WARNING: line over 80 characters
#1338: FILE: include/configs/nokia_rx51.h:292:
+#define CONFIG_STACKSIZE_IRQ (4 << 10) /* IRQ stack 4 KiB */
WARNING: line over 80 characters
#1339: FILE: include/configs/nokia_rx51.h:293:
+#define CONFIG_STACKSIZE_FIQ (4 << 10) /* FIQ stack 4 KiB */
WARNING: line over 80 characters
#1345: FILE: include/configs/nokia_rx51.h:299:
+#define CONFIG_NR_DRAM_BANKS 2 /* CS1 may or may not be populated */
WARNING: line over 80 characters
#1361: FILE: include/configs/nokia_rx51.h:315:
+#define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
total: 12 errors, 124 warnings, 1173 lines checked
/home/wd/Mail/U-Boot/12789 has style problems, please review.
If any of these errors are false positives, please report them to the maintainer, see CHECKPATCH in MAINTAINERS.
ERROR: "foo * bar" should be "foo *bar"
#178: FILE: common/cmd_bootmenu.c:32:
+static char * get_option(int n) {
ERROR: open brace '{' following function declarations go on the next line #178: FILE: common/cmd_bootmenu.c:32:
+static char * get_option(int n) {
ERROR: space prohibited after that open parenthesis '(' #182: FILE: common/cmd_bootmenu.c:36:
+ if ( n < 0 || n > 99 )
ERROR: space prohibited before that close parenthesis ')' #182: FILE: common/cmd_bootmenu.c:36:
+ if ( n < 0 || n > 99 )
ERROR: "foo * bar" should be "foo *bar"
#191: FILE: common/cmd_bootmenu.c:45:
+static char * get_end_of_title(char * str) {
ERROR: open brace '{' following function declarations go on the next line #191: FILE: common/cmd_bootmenu.c:45:
+static char * get_end_of_title(char * str) {
ERROR: space prohibited after that '!' (ctx:WxW)
#193: FILE: common/cmd_bootmenu.c:47:
+ if ( ! str )
^
ERROR: space prohibited after that open parenthesis '(' #193: FILE: common/cmd_bootmenu.c:47:
+ if ( ! str )
ERROR: space prohibited before that close parenthesis ')' #193: FILE: common/cmd_bootmenu.c:47:
+ if ( ! str )
ERROR: "foo * bar" should be "foo *bar" #200: FILE: common/cmd_bootmenu.c:54:
+static int print_title(char * begin, char * end) {
ERROR: open brace '{' following function declarations go on the next line #200: FILE: common/cmd_bootmenu.c:54:
+static int print_title(char * begin, char * end) {
ERROR: space prohibited after that '!' (ctx:WxW)
#202: FILE: common/cmd_bootmenu.c:56:
+ if ( ! begin || ! end || end < begin )
^
ERROR: space prohibited after that '!' (ctx:WxW)
#202: FILE: common/cmd_bootmenu.c:56:
+ if ( ! begin || ! end || end < begin )
^
ERROR: space prohibited after that open parenthesis '(' #202: FILE: common/cmd_bootmenu.c:56:
+ if ( ! begin || ! end || end < begin )
ERROR: space prohibited before that close parenthesis ')' #202: FILE: common/cmd_bootmenu.c:56:
+ if ( ! begin || ! end || end < begin )
ERROR: space prohibited after that open parenthesis '(' #205: FILE: common/cmd_bootmenu.c:59:
+ while ( begin != end )
ERROR: space prohibited before that close parenthesis ')' #205: FILE: common/cmd_bootmenu.c:59:
+ while ( begin != end )
ERROR: open brace '{' following function declarations go on the next line #212: FILE: common/cmd_bootmenu.c:66:
+static int print_entry(int n, int reverse) {
ERROR: "foo * bar" should be "foo *bar"
#214: FILE: common/cmd_bootmenu.c:68:
+ char * str = get_option(n);
ERROR: "foo * bar" should be "foo *bar"
#215: FILE: common/cmd_bootmenu.c:69:
+ char * end = get_end_of_title(str);
ERROR: space prohibited after that '!' (ctx:WxW)
#217: FILE: common/cmd_bootmenu.c:71:
+ if ( ! end )
^
ERROR: space prohibited after that open parenthesis '(' #217: FILE: common/cmd_bootmenu.c:71:
+ if ( ! end )
ERROR: space prohibited before that close parenthesis ')' #217: FILE: common/cmd_bootmenu.c:71:
+ if ( ! end )
ERROR: space prohibited after that open parenthesis '(' #222: FILE: common/cmd_bootmenu.c:76:
+ if ( reverse )
ERROR: space prohibited before that close parenthesis ')' #222: FILE: common/cmd_bootmenu.c:76:
+ if ( reverse )
ERROR: space prohibited after that open parenthesis '(' #229: FILE: common/cmd_bootmenu.c:83:
+ if ( reverse )
ERROR: space prohibited before that close parenthesis ')' #229: FILE: common/cmd_bootmenu.c:83:
+ if ( reverse )
ERROR: open brace '{' following function declarations go on the next line #236: FILE: common/cmd_bootmenu.c:90:
+static int print_menu(int active) {
ERROR: space prohibited after that open parenthesis '(' #248: FILE: common/cmd_bootmenu.c:102:
+ while ( 1 ) {
ERROR: space prohibited before that close parenthesis ')' #248: FILE: common/cmd_bootmenu.c:102:
+ while ( 1 ) {
ERROR: space prohibited after that open parenthesis '(' #252: FILE: common/cmd_bootmenu.c:106:
+ if ( ret == 1 )
ERROR: space prohibited before that close parenthesis ')' #252: FILE: common/cmd_bootmenu.c:106:
+ if ( ret == 1 )
ERROR: space prohibited after that open parenthesis '(' #261: FILE: common/cmd_bootmenu.c:115:
+ if ( n == active )
ERROR: space prohibited before that close parenthesis ')' #261: FILE: common/cmd_bootmenu.c:115:
+ if ( n == active )
ERROR: space prohibited after that open parenthesis '(' #267: FILE: common/cmd_bootmenu.c:121:
+ if ( n == active )
ERROR: space prohibited before that close parenthesis ')' #267: FILE: common/cmd_bootmenu.c:121:
+ if ( n == active )
ERROR: open brace '{' following function declarations go on the next line #282: FILE: common/cmd_bootmenu.c:136:
+int do_bootmenu(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) {
ERROR: "foo * bar" should be "foo *bar"
#291: FILE: common/cmd_bootmenu.c:145:
+ char * delay_str = NULL;
ERROR: space prohibited after that open parenthesis '(' #293: FILE: common/cmd_bootmenu.c:147:
+ if ( argc >= 2 )
ERROR: space prohibited before that close parenthesis ')' #293: FILE: common/cmd_bootmenu.c:147:
+ if ( argc >= 2 )
ERROR: space prohibited after that '!' (ctx:WxW)
#296: FILE: common/cmd_bootmenu.c:150:
+ if ( ! delay_str )
^
ERROR: space prohibited after that open parenthesis '(' #296: FILE: common/cmd_bootmenu.c:150:
+ if ( ! delay_str )
ERROR: space prohibited before that close parenthesis ')' #296: FILE: common/cmd_bootmenu.c:150:
+ if ( ! delay_str )
ERROR: space prohibited after that open parenthesis '(' #299: FILE: common/cmd_bootmenu.c:153:
+ if ( delay_str )
ERROR: space prohibited before that close parenthesis ')' #299: FILE: common/cmd_bootmenu.c:153:
+ if ( delay_str )
WARNING: consider using kstrto* in preference to simple_strtol #300: FILE: common/cmd_bootmenu.c:154:
+ delay = (int)simple_strtol(delay_str, NULL, 10);
ERROR: space prohibited after that open parenthesis '(' #302: FILE: common/cmd_bootmenu.c:156:
+ if ( delay == 0 ) {
ERROR: space prohibited before that close parenthesis ')' #302: FILE: common/cmd_bootmenu.c:156:
+ if ( delay == 0 ) {
ERROR: space prohibited after that open parenthesis '(' #305: FILE: common/cmd_bootmenu.c:159:
+ if ( get_end_of_title(get_option(0)) )
ERROR: space prohibited before that close parenthesis ')' #305: FILE: common/cmd_bootmenu.c:159:
+ if ( get_end_of_title(get_option(0)) )
ERROR: space prohibited after that open parenthesis '(' #312: FILE: common/cmd_bootmenu.c:166:
+ if ( delay < 0 )
ERROR: space prohibited before that close parenthesis ')' #312: FILE: common/cmd_bootmenu.c:166:
+ if ( delay < 0 )
ERROR: space prohibited after that '!' (ctx:WxW)
#315: FILE: common/cmd_bootmenu.c:169:
+ if ( ! instant ) {
^
ERROR: space prohibited after that open parenthesis '(' #315: FILE: common/cmd_bootmenu.c:169:
+ if ( ! instant ) {
ERROR: space prohibited before that close parenthesis ')' #315: FILE: common/cmd_bootmenu.c:169:
+ if ( ! instant ) {
ERROR: space prohibited after that open parenthesis '(' #322: FILE: common/cmd_bootmenu.c:176:
+ while ( 1 ) {
ERROR: space prohibited before that close parenthesis ')' #322: FILE: common/cmd_bootmenu.c:176:
+ while ( 1 ) {
ERROR: space prohibited after that open parenthesis '(' #324: FILE: common/cmd_bootmenu.c:178:
+ if ( abort || delay > 0 )
ERROR: space prohibited before that close parenthesis ')' #324: FILE: common/cmd_bootmenu.c:178:
+ if ( abort || delay > 0 )
ERROR: space prohibited after that '!' (ctx:WxW)
#327: FILE: common/cmd_bootmenu.c:181:
+ if ( ! abort ) {
^
ERROR: space prohibited after that open parenthesis '(' #327: FILE: common/cmd_bootmenu.c:181:
+ if ( ! abort ) {
ERROR: space prohibited before that close parenthesis ')' #327: FILE: common/cmd_bootmenu.c:181:
+ if ( ! abort ) {
ERROR: space prohibited after that open parenthesis '(' #329: FILE: common/cmd_bootmenu.c:183:
+ if ( delay > 0 )
ERROR: space prohibited before that close parenthesis ')' #329: FILE: common/cmd_bootmenu.c:183:
+ if ( delay > 0 )
WARNING: line over 80 characters
#330: FILE: common/cmd_bootmenu.c:184:
+ printf(" Hit any key to stop autoboot: %2d ", delay);
ERROR: space prohibited after that open parenthesis '(' #332: FILE: common/cmd_bootmenu.c:186:
+ while ( delay > 0 ) {
ERROR: space prohibited before that close parenthesis ')' #332: FILE: common/cmd_bootmenu.c:186:
+ while ( delay > 0 ) {
ERROR: space prohibited after that open parenthesis '(' #336: FILE: common/cmd_bootmenu.c:190:
+ for ( i = 0; i < 100; ++i ) {
ERROR: space prohibited before that close parenthesis ')' #336: FILE: common/cmd_bootmenu.c:190:
+ for ( i = 0; i < 100; ++i ) {
ERROR: space prohibited after that open parenthesis '(' #338: FILE: common/cmd_bootmenu.c:192:
+ if ( tstc() ) {
ERROR: space prohibited before that close parenthesis ')' #338: FILE: common/cmd_bootmenu.c:192:
+ if ( tstc() ) {
ERROR: space prohibited after that open parenthesis '(' #343: FILE: common/cmd_bootmenu.c:197:
+ if ( key == '\e' ) {
ERROR: space prohibited before that close parenthesis ')' #343: FILE: common/cmd_bootmenu.c:197:
+ if ( key == '\e' ) {
ERROR: space prohibited after that open parenthesis '(' #346: FILE: common/cmd_bootmenu.c:200:
+ } else if ( key == '\r' )
ERROR: space prohibited before that close parenthesis ')' #346: FILE: common/cmd_bootmenu.c:200:
+ } else if ( key == '\r' )
ERROR: space prohibited after that open parenthesis '(' #360: FILE: common/cmd_bootmenu.c:214:
+ if ( abort )
ERROR: space prohibited before that close parenthesis ')' #360: FILE: common/cmd_bootmenu.c:214:
+ if ( abort )
ERROR: space prohibited after that open parenthesis '(' #368: FILE: common/cmd_bootmenu.c:222:
+ if ( delay <= 0 )
ERROR: space prohibited before that close parenthesis ')' #368: FILE: common/cmd_bootmenu.c:222:
+ if ( delay <= 0 )
ERROR: space prohibited after that '!' (ctx:WxW)
#373: FILE: common/cmd_bootmenu.c:227:
+ while ( ! tstc() ) {
^
ERROR: space prohibited after that open parenthesis '(' #373: FILE: common/cmd_bootmenu.c:227:
+ while ( ! tstc() ) {
ERROR: space prohibited before that close parenthesis ')' #373: FILE: common/cmd_bootmenu.c:227:
+ while ( ! tstc() ) {
ERROR: space prohibited after that open parenthesis '(' #382: FILE: common/cmd_bootmenu.c:236:
+ if ( esc == 0 ) {
ERROR: space prohibited before that close parenthesis ')' #382: FILE: common/cmd_bootmenu.c:236:
+ if ( esc == 0 ) {
ERROR: space prohibited after that open parenthesis '(' #384: FILE: common/cmd_bootmenu.c:238:
+ if ( key == '\e' ) {
ERROR: space prohibited before that close parenthesis ')' #384: FILE: common/cmd_bootmenu.c:238:
+ if ( key == '\e' ) {
ERROR: space prohibited after that open parenthesis '(' #389: FILE: common/cmd_bootmenu.c:243:
+ } else if ( esc == 1 ) {
ERROR: space prohibited before that close parenthesis ')' #389: FILE: common/cmd_bootmenu.c:243:
+ } else if ( esc == 1 ) {
ERROR: space prohibited after that open parenthesis '(' #391: FILE: common/cmd_bootmenu.c:245:
+ if ( key == '[' ) {
ERROR: space prohibited before that close parenthesis ')' #391: FILE: common/cmd_bootmenu.c:245:
+ if ( key == '[' ) {
ERROR: space prohibited after that open parenthesis '(' #397: FILE: common/cmd_bootmenu.c:251:
+ } else if ( esc == 2 || esc == 3 ) {
ERROR: space prohibited before that close parenthesis ')' #397: FILE: common/cmd_bootmenu.c:251:
+ } else if ( esc == 2 || esc == 3 ) {
ERROR: space prohibited after that open parenthesis '(' #399: FILE: common/cmd_bootmenu.c:253:
+ if ( esc == 2 && key == '1' ) {
ERROR: space prohibited before that close parenthesis ')' #399: FILE: common/cmd_bootmenu.c:253:
+ if ( esc == 2 && key == '1' ) {
ERROR: space prohibited after that open parenthesis '(' #405: FILE: common/cmd_bootmenu.c:259:
+ if ( key == 'A' )
ERROR: space prohibited before that close parenthesis ')' #405: FILE: common/cmd_bootmenu.c:259:
+ if ( key == 'A' )
ERROR: space prohibited after that open parenthesis '(' #407: FILE: common/cmd_bootmenu.c:261:
+ else if ( key == 'B' )
ERROR: space prohibited before that close parenthesis ')' #407: FILE: common/cmd_bootmenu.c:261:
+ else if ( key == 'B' )
ERROR: space prohibited after that open parenthesis '(' #414: FILE: common/cmd_bootmenu.c:268:
+ if ( key == '\r' )
ERROR: space prohibited before that close parenthesis ')' #414: FILE: common/cmd_bootmenu.c:268:
+ if ( key == '\r' )
ERROR: space prohibited after that open parenthesis '(' #419: FILE: common/cmd_bootmenu.c:273:
+ if ( key == 1 ) {
ERROR: space prohibited before that close parenthesis ')' #419: FILE: common/cmd_bootmenu.c:273:
+ if ( key == 1 ) {
ERROR: space prohibited after that open parenthesis '(' #421: FILE: common/cmd_bootmenu.c:275:
+ if ( active > 0 )
ERROR: space prohibited before that close parenthesis ')' #421: FILE: common/cmd_bootmenu.c:275:
+ if ( active > 0 )
ERROR: space prohibited after that open parenthesis '(' #424: FILE: common/cmd_bootmenu.c:278:
+ } else if ( key == 2 ) {
ERROR: space prohibited before that close parenthesis ')' #424: FILE: common/cmd_bootmenu.c:278:
+ } else if ( key == 2 ) {
ERROR: space prohibited after that open parenthesis '(' #426: FILE: common/cmd_bootmenu.c:280:
+ if ( active < count )
ERROR: space prohibited before that close parenthesis ')' #426: FILE: common/cmd_bootmenu.c:280:
+ if ( active < count )
ERROR: space prohibited after that open parenthesis '(' #429: FILE: common/cmd_bootmenu.c:283:
+ } else if ( key == 3 ) {
ERROR: space prohibited before that close parenthesis ')' #429: FILE: common/cmd_bootmenu.c:283:
+ } else if ( key == 3 ) {
ERROR: "foo * bar" should be "foo *bar"
#431: FILE: common/cmd_bootmenu.c:285:
+ char * str;
ERROR: "foo * bar" should be "foo *bar"
#432: FILE: common/cmd_bootmenu.c:286:
+ char * end;
ERROR: space prohibited after that '!' (ctx:WxW)
#436: FILE: common/cmd_bootmenu.c:290:
+ if ( ! instant ) {
^
ERROR: space prohibited after that open parenthesis '(' #436: FILE: common/cmd_bootmenu.c:290:
+ if ( ! instant ) {
ERROR: space prohibited before that close parenthesis ')' #436: FILE: common/cmd_bootmenu.c:290:
+ if ( ! instant ) {
ERROR: space prohibited after that open parenthesis '(' #446: FILE: common/cmd_bootmenu.c:300:
+ if ( active == count ) {
ERROR: space prohibited before that close parenthesis ')' #446: FILE: common/cmd_bootmenu.c:300:
+ if ( active == count ) {
ERROR: space prohibited after that '!' (ctx:WxW)
#456: FILE: common/cmd_bootmenu.c:310:
+ if ( ! end ) {
^
ERROR: space prohibited after that open parenthesis '(' #456: FILE: common/cmd_bootmenu.c:310:
+ if ( ! end ) {
ERROR: space prohibited before that close parenthesis ')' #456: FILE: common/cmd_bootmenu.c:310:
+ if ( ! end ) {
WARNING: line over 80 characters
#458: FILE: common/cmd_bootmenu.c:312:
+ printf("Invalid Boot Menu entry %d\nStarting U-Boot console\n\n", active);
ERROR: space prohibited after that '!' (ctx:WxW)
#463: FILE: common/cmd_bootmenu.c:317:
+ if ( ! end[1] ) {
^
ERROR: space prohibited after that open parenthesis '(' #463: FILE: common/cmd_bootmenu.c:317:
+ if ( ! end[1] ) {
ERROR: space prohibited before that close parenthesis ')' #463: FILE: common/cmd_bootmenu.c:317:
+ if ( ! end[1] ) {
WARNING: line over 80 characters
#479: FILE: common/cmd_bootmenu.c:333:
+ parse_string_outer(end+1, FLAG_PARSE_SEMICOLON | FLAG_EXIT_FROM_LOOP);
total: 121 errors, 4 warnings, 369 lines checked
/home/wd/Mail/U-Boot/12790 has style problems, please review.
If any of these errors are false positives, please report them to the maintainer, see CHECKPATCH in MAINTAINERS.
WARNING: line over 80 characters
#111: FILE: include/configs/nokia_rx51.h:137:
+#define CONFIG_CMD_BOOTMENU /* ANSI terminal Boot Menu */
WARNING: line over 80 characters
#140: FILE: include/configs/nokia_rx51.h:244:
+ "setenv mmcnum 1; setenv mmcpart 1; setenv mmctype fat; setenv mmcfile bootmenu.scr;" \
total: 0 errors, 2 warnings, 48 lines checked
/home/wd/Mail/U-Boot/12791 has style problems, please review.
If any of these errors are false positives, please report them to the maintainer, see CHECKPATCH in MAINTAINERS.
Best regards,
Wolfgang Denk
Signature · 6 lines
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: [email protected] Our universe is a fragile house of atoms, held together by the mortar of cause-and-effect. One magician would be two too many. - Terry Pratchett, _The Dark Side of the Sun_
[U-Boot] U-Boot on Nokia RX-51 (aka N900)
Quoted 19 lines · On Saturday 17 December 2011 20:25:24 Wolfgang Denk wrote:
Dear Pali =?ISO-8859-1?Q?Roh=E1r?=,
Quoted 5 lines · In message <2772527.Czs1Sl5aoH@pali-elitebook> you wrote:
I'm sending new patch series, which add Nokia RX-51 support to U-Boot. This
patches are based on master commit06e42c6e2ce269667daecd6229d0b7c813838203
and now U-Boot working on Nokia RX-51.This patch series generates a ton of checkpatch warnings. Please run your code through checkpatch, and make sure to read the respective hits at http://www.denx.de/wiki/U-Boot/Patches ; then clean up the code and resubmit.
Um, and while doing so, please make sure NOT to send all this stuff base64 encoded. Thanks.
WARNING: space prohibited between function name and open parenthesis '(' #130: FILE:
arch/arm/lib/bootm.c:128:
Review
Quoted 1 line
(quoted diff) +1
-0+ s = getenv ("atagaddr");
see file arch/arm/lib/bootm.c - it has this code styling. so this is not error unless you want to mix more code styling in one file.
Review
Quoted 4 lines
WARNING: consider using kstrto* in preference to
simple_strtoul#132: FILE:arch/arm/lib/bootm.c:130:(quoted diff) +1
-0+ bd->bi_boot_params = simple_strtoul(s, NULL, 16);
really? I was not able to find kstrtoul function
Quoted 41 lines
WARNING: space prohibited between function name and open parenthesis '(' #137: FILE:
arch/arm/lib/bootm.c:135:(quoted diff) +1
-0+ params = tag_next (params);WARNING: space prohibited between function name and open parenthesis '(' #145: FILE:
arch/arm/lib/bootm.c:142:(quoted diff) +1
-0+ setup_start_tag (bd);WARNING: space prohibited between function name and open parenthesis '(' #162: FILE:
arch/arm/lib/bootm.c:167:
+#if defined (CONFIG_SETUP_MEMORY_TAGS) || \WARNING: please, no spaces at the start of a line #163: FILE:
arch/arm/lib/bootm.c:168:
+ defined (CONFIG_CMDLINE_TAG) || \$WARNING: space prohibited between function name and open parenthesis '(' #163: FILE:
arch/arm/lib/bootm.c:168:
+ defined (CONFIG_CMDLINE_TAG) || \WARNING: please, no spaces at the start of a line #164: FILE:
arch/arm/lib/bootm.c:169:
+ defined (CONFIG_INITRD_TAG) || \$WARNING: space prohibited between function name and open parenthesis '(' #164: FILE:
arch/arm/lib/bootm.c:169:
+ defined (CONFIG_INITRD_TAG) || \WARNING: please, no spaces at the start of a line #165: FILE:
arch/arm/lib/bootm.c:170:
+ defined (CONFIG_SERIAL_TAG) || \$WARNING: space prohibited between function name and open parenthesis '(' #165: FILE:
arch/arm/lib/bootm.c:170:
+ defined (CONFIG_SERIAL_TAG) || \WARNING: please, no spaces at the start of a line #166: FILE:
arch/arm/lib/bootm.c:171:
+ defined (CONFIG_REVISION_TAG)$
Quoted 7 lines
WARNING: space prohibited between function name and open parenthesis '(' #166: FILE:
arch/arm/lib/bootm.c:171:
+ defined (CONFIG_REVISION_TAG)total: 0 errors, 13 warnings, 53 lines checked
/home/wd/Mail/U-Boot/12777has style problems, please review.
same - see my first comment
Quoted 10 lines
If any of these errors are false positives, please report them to the maintainer, see CHECKPATCH in
MAINTAINERS.
ERROR: space prohibited after that open parenthesis '(' #194: FILE:include/twl4030.h:238:(quoted diff) +1
-0+ ( (devgrp) << 13 | 1 << 12 | (grp) << 9 | (type2) << 7 \total: 1 errors, 0 warnings, 110 lines checked
/home/wd/Mail/U-Boot/12778has style problems, please review.
see commit message - this patch is from linux upstream and uf u-boot has same styling this should be ok too.
Review
Quoted 9 lines
If any of these errors are false positives, please report them to the maintainer, see CHECKPATCH in
MAINTAINERS.
total: 0 errors, 0 warnings, 24 lines checked
/home/wd/Mail/U-Boot/12779has no obvious style problems and is ready for submission. WARNING: line over 80 characters
#117: FILE:common/main.c:1028:(quoted diff) +1
-0+ case '\e': /* ANSI escape char */
again - same formating in file common/main.c
Review
Quoted 12 lines
WARNING: line over 80 characters
#145: FILE:common/main.c:1056:(quoted diff) +1
-0+ /* Ignore ANSI escape sequences generated by keyboard */ERROR: space prohibited after that open parenthesis '(' #147: FILE:
common/main.c:1058:(quoted diff) +1
-0+ if ( c >= 'A' && c <= 'D' ) {ERROR: space prohibited before that close parenthesis ')' #147: FILE:
common/main.c:1058:(quoted diff) +1
-0+ if ( c >= 'A' && c <= 'D' ) {
Ok, this problem I fix.
Quoted 20 lines
WARNING: line over 80 characters
#156: FILE:common/main.c:1067:(quoted diff) +1
-0+ } else if (esc == 3 && n < CONFIG_SYS_CBSIZE-4) {total: 2 errors, 3 warnings, 62 lines checked
/home/wd/Mail/U-Boot/12780has style problems, please review.If any of these errors are false positives, please report them to the maintainer, see CHECKPATCH in
MAINTAINERS.
total: 0 errors, 0 warnings, 8 lines checked
/home/wd/Mail/U-Boot/12781has no obvious style problems and is ready for submission. WARNING: line over 80 characters
#129: FILE:drivers/video/cfb_console.c:712:(quoted diff) +1
-0+ video_hw_rectfill(VIDEO_PIXEL_SIZE, /* bytes per pixel */WARNING: line over 80 characters
#130: FILE:drivers/video/cfb_console.c:713:
Review
Quoted 1 line
(quoted diff) +1
-0+ VIDEO_FONT_WIDTH * begin, /* dest pos x */ /* FIXME:
correct? */
Review
Quoted 4 lines
WARNING: line over 80 characters
#131: FILE:drivers/video/cfb_console.c:714:(quoted diff) +1
-0+ video_logo_height + CONSOLE_ROW_SIZE * line, /* dest pos y */
/*
Review
Quoted 5 lines
FIXME: correct? */
WARNING: line over 80 characters
#132: FILE:drivers/video/cfb_console.c:715:(quoted diff) +1
-0+ VIDEO_FONT_WIDTH * ( end - begin ), /* frame width */ /*
FIXME:
Review
Quoted 5 lines
correct? */
ERROR: space prohibited after that open parenthesis '(' #132: FILE:
drivers/video/cfb_console.c:715:(quoted diff) +1
-0+ VIDEO_FONT_WIDTH * ( end - begin ), /* frame width */ /*
FIXME:
Review
Quoted 5 lines
correct? */
ERROR: space prohibited before that close parenthesis ')' #132: FILE:
drivers/video/cfb_console.c:715:(quoted diff) +1
-0+ VIDEO_FONT_WIDTH * ( end - begin ), /* frame width */ /*
FIXME:
Review
Quoted 9 lines
correct? */
WARNING: line over 80 characters
#133: FILE:drivers/video/cfb_console.c:716:(quoted diff) +1
-0+ VIDEO_FONT_HEIGHT, /* frame height */WARNING: line over 80 characters
#134: FILE:drivers/video/cfb_console.c:717:(quoted diff) +1
-0+ bgx /* fill color */
If you want I remove above comments /* ... */
Review
Quoted 8 lines
ERROR: space prohibited after that open parenthesis '(' #138: FILE:
drivers/video/cfb_console.c:721:(quoted diff) +1
-0+ if ( begin == 0 && end == CONSOLE_COLS )ERROR: space prohibited before that close parenthesis ')' #138: FILE:
drivers/video/cfb_console.c:721:(quoted diff) +1
-0+ if ( begin == 0 && end == CONSOLE_COLS )
I will fix this.
Review
Quoted 4 lines
WARNING: line over 80 characters
#139: FILE:drivers/video/cfb_console.c:722:(quoted diff) +1
-0+ memsetl(CONSOLE_ROW_FIRST + CONSOLE_ROW_SIZE * line, /* offset of row
*/
Quoted 15 lines
WARNING: line over 80 characters
#140: FILE:drivers/video/cfb_console.c:723:(quoted diff) +1
-0+ CONSOLE_ROW_SIZE >> 2, /* length of row */WARNING: line over 80 characters
#141: FILE:drivers/video/cfb_console.c:724:(quoted diff) +1
-0+ bgx /* fill color */ERROR: space prohibited after that open parenthesis '(' #144: FILE:
drivers/video/cfb_console.c:727:(quoted diff) +1
-0+ for ( i = 0; i < VIDEO_FONT_HEIGHT; ++i )ERROR: space prohibited before that close parenthesis ')' #144: FILE:
drivers/video/cfb_console.c:727:
Review
Quoted 1 line
(quoted diff) +1
-0+ for ( i = 0; i < VIDEO_FONT_HEIGHT; ++i )
Also I fix this.
Review
Quoted 4 lines
WARNING: line over 80 characters
#145: FILE:drivers/video/cfb_console.c:728:(quoted diff) +1
-0+ memsetl(CONSOLE_ROW_FIRST + CONSOLE_ROW_SIZE * line + /* offset of
row
Review
Quoted 5 lines
*/
WARNING: line over 80 characters
#146: FILE:drivers/video/cfb_console.c:729:(quoted diff) +1
-0+ VIDEO_FONT_WIDTH * VIDEO_PIXEL_SIZE * begin + /* offset of
col */
Review
Quoted 8 lines
WARNING: line over 80 characters
#147: FILE:drivers/video/cfb_console.c:730:(quoted diff) +1
-0+ i * VIDEO_LINE_LEN, /* col offset of i-th line */WARNING: line over 80 characters
#148: FILE:drivers/video/cfb_console.c:731:(quoted diff) +1
-0+ (VIDEO_FONT_WIDTH * VIDEO_PIXEL_SIZE * ( end - begin + 1)) >>
2, /*
Review
Quoted 5 lines
length to end of line */
ERROR: space prohibited after that open parenthesis '(' #148: FILE:
drivers/video/cfb_console.c:731:(quoted diff) +1
-0+ (VIDEO_FONT_WIDTH * VIDEO_PIXEL_SIZE * ( end - begin + 1)) >>
2, /*
Quoted 14 lines
length to end of line */
WARNING: line over 80 characters
#149: FILE:drivers/video/cfb_console.c:732:(quoted diff) +1
-0+ bgx /* fill color */total: 7 errors, 14 warnings, 68 lines checked
/home/wd/Mail/U-Boot/12782has style problems, please review.If any of these errors are false positives, please report them to the maintainer, see CHECKPATCH in
MAINTAINERS.
total: 0 errors, 0 warnings, 98 lines checked
Quoted 8 lines
/home/wd/Mail/U-Boot/12783has no obvious style problems and is ready for submission. ERROR: do not initialise statics to 0 or NULL #112: FILE:drivers/video/cfb_console.c:381:
+static intansi_buf_size= 0;ERROR: do not initialise statics to 0 or NULL #113: FILE:
drivers/video/cfb_console.c:382:
+static intansi_colors_need_revert= 0;
what is problem with initialising to 0?
Review
Quoted 8 lines
WARNING: space prohibited between function name and open parenthesis '(' #166: FILE:
drivers/video/cfb_console.c:930:(quoted diff) +1
-0+ if (ansi_buf_size >= sizeof (ansi_buf))WARNING: line over 80 characters
#236: FILE:drivers/video/cfb_console.c:1000:(quoted diff) +1
-0+ if ((ansi_buf[i] >= 'A' && ansi_buf[i] <= 'H') || ansi_buf[i]
== 'J' ||
Review
Quoted 11 lines
ansi_buf[i] == 'K' || ansi_buf[i] == 'm') {
ERROR: that open brace { should be on the previous line #245: FILE:
drivers/video/cfb_console.c:1009:(quoted diff) +2
-0+ if (fail) + {ERROR: that open brace { should be on the previous line #253: FILE:
drivers/video/cfb_console.c:1017:(quoted diff) +2
-0+ if (flush) + {
Also I will fix above problems with braces.
Review
Quoted 4 lines
WARNING: line over 80 characters
#298: FILE:drivers/video/cfb_console.c:1062:(quoted diff) +1
-0+ console_clear_line(console_row, console_col,
CONSOLE_COLS-1);
Quoted 91 lines
WARNING: line over 80 characters
#300: FILE:drivers/video/cfb_console.c:1064:(quoted diff) +1
-0+ console_clear_line(console_row, 0, console_col);WARNING: line over 80 characters
#302: FILE:drivers/video/cfb_console.c:1066:(quoted diff) +1
-0+ console_clear_line(console_row, 0, CONSOLE_COLS-1);WARNING: line over 80 characters
#310: FILE:drivers/video/cfb_console.c:1074:(quoted diff) +1
-0+ } else if (num1 == 7) { /* swap colors (only once) */ERROR: that open brace { should be on the previous line #321: FILE:
drivers/video/cfb_console.c:1085:(quoted diff) +2
-0+ else + {ERROR: else should follow close brace '}'
#321: FILE:drivers/video/cfb_console.c:1085:(quoted diff) +2
-0+ } + elsetotal: 6 errors, 6 warnings, 223 lines checked
/home/wd/Mail/U-Boot/12784has style problems, please review.If any of these errors are false positives, please report them to the maintainer, see CHECKPATCH in
MAINTAINERS.
total: 0 errors, 0 warnings, 14 lines checked
/home/wd/Mail/U-Boot/12785has no obvious style problems and is ready for submission. total: 0 errors, 0 warnings, 52 lines checked
/home/wd/Mail/U-Boot/12786has no obvious style problems and is ready for submission. WARNING: line over 80 characters
#113: FILE:common/main.c:85:
+#if defined (CONFIG_MENUKEY) && ! defined (CONFIG_MENUCMD) && ( !defined(CONFIG_BOOTDELAY)||CONFIG_BOOTDELAY< 0 )WARNING: space prohibited between function name and open parenthesis '(' #113: FILE:
common/main.c:85:
+#if defined (CONFIG_MENUKEY) && ! defined (CONFIG_MENUCMD) && ( !defined(CONFIG_BOOTDELAY)||CONFIG_BOOTDELAY< 0 )WARNING: space prohibited between function name and open parenthesis '(' #113: FILE:
common/main.c:85:
+#if defined (CONFIG_MENUKEY) && ! defined (CONFIG_MENUCMD) && ( !defined(CONFIG_BOOTDELAY)||CONFIG_BOOTDELAY< 0 )ERROR: space prohibited after that '!' (ctx:WxW)
#113: FILE:common/main.c:85:
+#if defined (CONFIG_MENUKEY) && ! defined (CONFIG_MENUCMD) && ( !defined(CONFIG_BOOTDELAY)||CONFIG_BOOTDELAY< 0 ) ^ERROR: space prohibited after that '!' (ctx:WxW)
#113: FILE:common/main.c:85:
+#if defined (CONFIG_MENUKEY) && ! defined (CONFIG_MENUCMD) && ( !defined(CONFIG_BOOTDELAY)||CONFIG_BOOTDELAY< 0 ) ^ERROR: space prohibited after that open parenthesis '(' #113: FILE:
common/main.c:85:
+#if defined (CONFIG_MENUKEY) && ! defined (CONFIG_MENUCMD) && ( !defined(CONFIG_BOOTDELAY)||CONFIG_BOOTDELAY< 0 )ERROR: space prohibited before that close parenthesis ')' #113: FILE:
common/main.c:85:
+#if defined (CONFIG_MENUKEY) && ! defined (CONFIG_MENUCMD) && ( !defined(CONFIG_BOOTDELAY)||CONFIG_BOOTDELAY< 0 )WARNING: line over 80 characters
#114: FILE:common/main.c:86:
+#errorCONFIG_MENUKEYis defined, but notCONFIG_MENUCMDand/orCONFIG_BOOTDELAY>= 0ERROR: do not initialise statics to 0 or NULL #120: FILE:
common/main.c:92:
+static int menucmd = 0;WARNING: space prohibited between function name and open parenthesis '(' #146: FILE:
common/main.c:253:
+# if defined (CONFIG_MENUCMD) && defined (CONFIG_MENUKEY)WARNING: space prohibited between function name and open parenthesis '(' #146: FILE:
common/main.c:253:
+# if defined (CONFIG_MENUCMD) && defined (CONFIG_MENUKEY)WARNING: line over 80 characters
#147: FILE:common/main.c:254:(quoted diff) +1
-0+ if (CONFIG_MENUKEY == 0 || CONFIG_MENUKEY == getc())
Quoted 3 lines
total: 5 errors, 7 warnings, 73 lines checked
/home/wd/Mail/U-Boot/12787has style problems, please review.
Ok, I will fix this file.
Quoted 19 lines
If any of these errors are false positives, please report them to the maintainer, see CHECKPATCH in
MAINTAINERS.
WARNING: space prohibited between function name and open parenthesis '(' #125: FILE:common/main.c:429:(quoted diff) +1
-0+ if ((s = getenv ("premonitor")) != NULL) {ERROR: do not use assignment in if condition
#125: FILE:common/main.c:429:(quoted diff) +1
-0+ if ((s = getenv ("premonitor")) != NULL) {WARNING: space prohibited between function name and open parenthesis '(' #127: FILE:
common/main.c:431:(quoted diff) +1
-0+ run_command (s, 0);WARNING: line over 80 characters
#129: FILE:common/main.c:433:(quoted diff) +1
-0+ parse_string_outer(s, FLAG_PARSE_SEMICOLON | FLAG_EXIT_FROM_LOOP);
Quoted 3 lines
total: 1 errors, 3 warnings, 25 lines checked
/home/wd/Mail/U-Boot/12788has style problems, please review.
I will fix this too.
Quoted 7 lines
If any of these errors are false positives, please report them to the maintainer, see CHECKPATCH in
MAINTAINERS.
WARNING: externs should be avoided in .c files #282: FILE:board/nokia/rx51/rx51.c:59:
+extern u32rx51_atagaddr; /* atag address */
Quoted 7 lines
WARNING: externs should be avoided in .c files #283: FILE:
board/nokia/rx51/rx51.c:60:
+extern u32rx51_kernaddr; /* attached kernel address */WARNING: line over 80 characters
#297: FILE:board/nokia/rx51/rx51.c:74:
+"startaddr:\n" /* address where should be u-boot after
relocation */
Quoted 4 lines
WARNING: line over 80 characters
#299: FILE:board/nokia/rx51/rx51.c:76:
+"relocaddr:\n" /* address of this relocaddr section after
relocation */
Quoted 4 lines
WARNING: line over 80 characters
#300: FILE:board/nokia/rx51/rx51.c:77:
+" .word .\n" /* dot - address of this section (calculated at
compile
Quoted 5 lines
time, so same as after relocation) */
WARNING: line over 80 characters
#307: FILE:board/nokia/rx51/rx51.c:84:
+"kernaddr:\n" /* stored attached kernel address (u-boot +
0x40000) */
Quoted 4 lines
WARNING: line over 80 characters
#310: FILE:board/nokia/rx51/rx51.c:87:
+"save_boot_params:\n" /* functionsave_boot_params, called after
reset */
Quoted 20 lines
WARNING: line over 80 characters
#313: FILE:board/nokia/rx51/rx51.c:90:
+" ldr r1, relocaddr\n" /* r1 - address where should be this relocaddr
section after relocation */WARNING: line over 80 characters
#314: FILE:board/nokia/rx51/rx51.c:91:
+" sub r0, r0, r1\n" /* r1 - calculated offset for relocation */WARNING: line over 80 characters
#315: FILE:board/nokia/rx51/rx51.c:92:
+" ldr r1, startaddr\n" /* r1 - address where u-boot should be after
relocation */WARNING: line over 80 characters
#316: FILE:board/nokia/rx51/rx51.c:93:
+" add r0, r0, r1\n" /* r0 - address where is u-boot (address after
relocation + offset) */
Quoted 8 lines
WARNING: line over 80 characters
#319: FILE:board/nokia/rx51/rx51.c:96:
+" bne reloc\n" /* start relocation if u-boot is not loaded at correct
addressCONFIG_SYS_TEXT_BASE*/WARNING: line over 80 characters
#320: FILE:board/nokia/rx51/rx51.c:97:
+" bx lr\n" /* else return back to reset section (relocation is
not
Quoted 5 lines
needed) */
WARNING: line over 80 characters
#324: FILE:board/nokia/rx51/rx51.c:101:
+" add r2, r0, #0x40000\n" /* r2 - address where is attached kernel (u-
boot
Quoted 84 lines
address + kernel offset
0x40000) - also end address of u-boot */WARNING: line over 80 characters
#334: FILE:board/nokia/rx51/rx51.c:111:
+" ldr pc, startaddr\n" /* jump to start section (where should be u-boot
after relocation) and restart u-boot */WARNING: line over 80 characters
#375: FILE:board/nokia/rx51/rx51.c:152:(quoted diff) +1
-0+ twl4030_i2c_write_u8(TWL4030_CHIP_PM_MASTER, msg >> 8,
TWL4030_PM_MASTER_PB_WORD_MSB);WARNING: line over 80 characters
#376: FILE:board/nokia/rx51/rx51.c:153:(quoted diff) +1
-0+ twl4030_i2c_write_u8(TWL4030_CHIP_PM_MASTER, msg & 0xff,
TWL4030_PM_MASTER_PB_WORD_LSB);WARNING: line over 80 characters
#403: FILE:board/nokia/rx51/rx51.c:180:(quoted diff) +1
-0+ twl4030_i2c_write_u8(TWL4030_CHIP_PM_MASTER, 0x02,
TWL4030_PM_MASTER_PB_CFG);ERROR: do not initialise statics to 0 or NULL
#432: FILE:board/nokia/rx51/rx51.c:209:
+static unsigned long inttwl_wd_time= 0; /* last time of watchdog reset */WARNING: Use of volatile is usually wrong: see
Documentation/volatile-considered-harmful.txt#433: FILE:board/nokia/rx51/rx51.c:210:
+static volatile unsigned long inttwl_i2c_lock;ERROR: space prohibited after that open parenthesis '(' #444: FILE:
board/nokia/rx51/rx51.c:221:(quoted diff) +1
-0+ if ( get_timer(twl_wd_time) < 4 * CONFIG_SYS_HZ )ERROR: space prohibited before that close parenthesis ')' #444: FILE:
board/nokia/rx51/rx51.c:221:(quoted diff) +1
-0+ if ( get_timer(twl_wd_time) < 4 * CONFIG_SYS_HZ )ERROR: space prohibited after that open parenthesis '(' #448: FILE:
board/nokia/rx51/rx51.c:225:(quoted diff) +1
-0+ if ( test_and_set_bit(0, &twl_i2c_lock) )ERROR: space prohibited before that close parenthesis ')' #448: FILE:
board/nokia/rx51/rx51.c:225:(quoted diff) +1
-0+ if ( test_and_set_bit(0, &twl_i2c_lock) )WARNING: line over 80 characters
#452: FILE:board/nokia/rx51/rx51.c:229:(quoted diff) +1
-0+ twl4030_i2c_read_u8(TWL4030_CHIP_PM_RECEIVER, &timeout,
TWL4030_PM_RECEIVER_WATCHDOG_CFG);ERROR: space prohibited after that open parenthesis '(' #456: FILE:
board/nokia/rx51/rx51.c:233:(quoted diff) +1
-0+ if ( timeout != 0 )ERROR: space prohibited before that close parenthesis ')' #456: FILE:
board/nokia/rx51/rx51.c:233:(quoted diff) +1
-0+ if ( timeout != 0 )WARNING: line over 80 characters
#457: FILE:board/nokia/rx51/rx51.c:234:(quoted diff) +1
-0+ twl4030_i2c_write_u8(TWL4030_CHIP_PM_RECEIVER, 31,
TWL4030_PM_RECEIVER_WATCHDOG_CFG);ERROR: do not initialise statics to 0 or NULL #495: FILE:
board/nokia/rx51/rx51.c:272:
+static u8keybuf_head= 0;ERROR: do not initialise statics to 0 or NULL #496: FILE:
board/nokia/rx51/rx51.c:273:
+static u8keybuf_tail= 0;WARNING: line over 80 characters
#532: FILE:board/nokia/rx51/rx51.c:309:(quoted diff) +1
-0+ if (!(mods & 2) && (k == 18 || k == 31 || k == 33 || k == 34)) { /* cursorkeys, without fn */
ERROR: space prohibited after that open parenthesis '(' #582: FILE:
board/nokia/rx51/rx51.c:359:(quoted diff) +1
-0+ if ( test_and_set_bit(0, &twl_i2c_lock) )ERROR: space prohibited before that close parenthesis ')' #582: FILE:
board/nokia/rx51/rx51.c:359:
Review
Quoted 1 line
(quoted diff) +1
-0+ if ( test_and_set_bit(0, &twl_i2c_lock) )
I will look at rx51.c file
Quoted 223 lines
WARNING: line over 80 characters
#764: FILE:board/nokia/rx51/rx51.h:108:(quoted diff) +1
-0+ MUX_VAL(CP(GPMC_NCS6), (IEN | PTD | DIS | M1)) /*SYS_nDMA_REQ2*/\WARNING: line over 80 characters
#765: FILE:board/nokia/rx51/rx51.h:109:(quoted diff) +1
-0+ MUX_VAL(CP(GPMC_NCS7), (IEN | PTU | EN | M1)) /*SYS_nDMA_REQ3*/\WARNING: line over 80 characters
#770: FILE:board/nokia/rx51/rx51.h:114:(quoted diff) +1
-0+ MUX_VAL(CP(GPMC_NADV_ALE), (IDIS | PTD | DIS | M0)) /*GPMC_nADV_ALE*/\WARNING: line over 80 characters
#773: FILE:board/nokia/rx51/rx51.h:117:(quoted diff) +1
-0+ MUX_VAL(CP(GPMC_NBE0_CLE), (IDIS | PTD | DIS | M0)) /*GPMC_nBE0_CLE*/\WARNING: line over 80 characters
#833: FILE:board/nokia/rx51/rx51.h:177:(quoted diff) +1
-0+ MUX_VAL(CP(MCBSP2_CLKX), (IEN | PTD | DIS | M0)) /*McBSP2_CLKX*/\WARNING: line over 80 characters
#872: FILE:board/nokia/rx51/rx51.h:216:(quoted diff) +1
-0+ MUX_VAL(CP(MCBSP4_CLKX), (IEN | PTD | DIS | M1)) /*SSI1_DAT_RX*/\WARNING: line over 80 characters
#873: FILE:board/nokia/rx51/rx51.h:217:(quoted diff) +1
-0+ MUX_VAL(CP(MCBSP4_DR), (IEN | PTD | DIS | M1)) /*SSI1_FLAG_RX*/\WARNING: line over 80 characters
#874: FILE:board/nokia/rx51/rx51.h:218:(quoted diff) +1
-0+ MUX_VAL(CP(MCBSP4_DX), (IEN | PTD | DIS | M1)) /*SSI1_RDY_RX*/\WARNING: line over 80 characters
#884: FILE:board/nokia/rx51/rx51.h:228:(quoted diff) +1
-0+ MUX_VAL(CP(UART3_CTS_RCTX), (IEN | PTD | EN | M0)) /*UART3_CTS_RCTX*/\WARNING: line over 80 characters
#885: FILE:board/nokia/rx51/rx51.h:229:(quoted diff) +1
-0+ MUX_VAL(CP(UART3_RTS_SD), (IDIS | PTD | DIS | M0)) /*UART3_RTS_SD */\WARNING: line over 80 characters
#886: FILE:board/nokia/rx51/rx51.h:230:(quoted diff) +1
-0+ MUX_VAL(CP(UART3_RX_IRRX), (IEN | PTD | DIS | M0)) /*UART3_RX_IRRX*/\WARNING: line over 80 characters
#887: FILE:board/nokia/rx51/rx51.h:231:(quoted diff) +1
-0+ MUX_VAL(CP(UART3_TX_IRTX), (IDIS | PTD | DIS | M0)) /*UART3_TX_IRTX*/\WARNING: line over 80 characters
#892: FILE:board/nokia/rx51/rx51.h:236:(quoted diff) +1
-0+ MUX_VAL(CP(HSUSB0_DATA0), (IEN | PTD | DIS | M0)) /*HSUSB0_DATA0*/\WARNING: line over 80 characters
#893: FILE:board/nokia/rx51/rx51.h:237:(quoted diff) +1
-0+ MUX_VAL(CP(HSUSB0_DATA1), (IEN | PTD | DIS | M0)) /*HSUSB0_DATA1*/\WARNING: line over 80 characters
#894: FILE:board/nokia/rx51/rx51.h:238:(quoted diff) +1
-0+ MUX_VAL(CP(HSUSB0_DATA2), (IEN | PTD | DIS | M0)) /*HSUSB0_DATA2*/\WARNING: line over 80 characters
#895: FILE:board/nokia/rx51/rx51.h:239:(quoted diff) +1
-0+ MUX_VAL(CP(HSUSB0_DATA3), (IEN | PTD | DIS | M0)) /*HSUSB0_DATA3*/\WARNING: line over 80 characters
#896: FILE:board/nokia/rx51/rx51.h:240:(quoted diff) +1
-0+ MUX_VAL(CP(HSUSB0_DATA4), (IEN | PTD | DIS | M0)) /*HSUSB0_DATA4*/\WARNING: line over 80 characters
#897: FILE:board/nokia/rx51/rx51.h:241:(quoted diff) +1
-0+ MUX_VAL(CP(HSUSB0_DATA5), (IEN | PTD | DIS | M0)) /*HSUSB0_DATA5*/\WARNING: line over 80 characters
#898: FILE:board/nokia/rx51/rx51.h:242:(quoted diff) +1
-0+ MUX_VAL(CP(HSUSB0_DATA6), (IEN | PTD | DIS | M0)) /*HSUSB0_DATA6*/\WARNING: line over 80 characters
#899: FILE:board/nokia/rx51/rx51.h:243:(quoted diff) +1
-0+ MUX_VAL(CP(HSUSB0_DATA7), (IEN | PTD | DIS | M0)) /*HSUSB0_DATA7*/\WARNING: line over 80 characters
#911: FILE:board/nokia/rx51/rx51.h:255:(quoted diff) +1
-0+ MUX_VAL(CP(MCSPI1_SOMI), (IEN | PTD | DIS | M0)) /*McSPI1_SOMI*/\WARNING: line over 80 characters
#916: FILE:board/nokia/rx51/rx51.h:260:(quoted diff) +1
-0+ MUX_VAL(CP(MCSPI1_CS3), (IEN | PTU | DIS | M3)) /*HSUSB2_DATA2*/\WARNING: line over 80 characters
#917: FILE:board/nokia/rx51/rx51.h:261:(quoted diff) +1
-0+ MUX_VAL(CP(MCSPI2_CLK), (IEN | PTU | DIS | M3)) /*HSUSB2_DATA7*/\WARNING: line over 80 characters
#918: FILE:board/nokia/rx51/rx51.h:262:(quoted diff) +1
-0+ MUX_VAL(CP(MCSPI2_SIMO), (IEN | PTU | DIS | M3)) /*HSUSB2_DATA4*/\WARNING: line over 80 characters
#919: FILE:board/nokia/rx51/rx51.h:263:(quoted diff) +1
-0+ MUX_VAL(CP(MCSPI2_SOMI), (IEN | PTU | DIS | M3)) /*HSUSB2_DATA5*/\WARNING: line over 80 characters
#920: FILE:board/nokia/rx51/rx51.h:264:(quoted diff) +1
-0+ MUX_VAL(CP(MCSPI2_CS0), (IEN | PTU | DIS | M3)) /*HSUSB2_DATA6*/\WARNING: line over 80 characters
#921: FILE:board/nokia/rx51/rx51.h:265:(quoted diff) +1
-0+ MUX_VAL(CP(MCSPI2_CS1), (IEN | PTU | DIS | M3)) /*HSUSB2_DATA3*/\WARNING: line over 80 characters
#926: FILE:board/nokia/rx51/rx51.h:270:(quoted diff) +1
-0+ MUX_VAL(CP(ETK_D14_ES2), (IEN | PTU | DIS | M3)) /*HSUSB2_DATA0*/\WARNING: line over 80 characters
#927: FILE:board/nokia/rx51/rx51.h:271:(quoted diff) +1
-0+ MUX_VAL(CP(ETK_D15_ES2), (IEN | PTU | DIS | M3)) /*HSUSB2_DATA1*/\WARNING: line over 80 characters
#934: FILE:board/nokia/rx51/rx51.h:278:(quoted diff) +1
-0+ MUX_VAL(CP(SYS_BOOT2), (IEN | PTD | DIS | M4)) /*GPIO_4 - MMC1_WP*/\WARNING: line over 80 characters
#939: FILE:board/nokia/rx51/rx51.h:283:(quoted diff) +1
-0+ MUX_VAL(CP(SYS_OFF_MODE), (IEN | PTD | DIS | M0)) /*SYS_OFF_MODE*/\WARNING: line over 80 characters
#940: FILE:board/nokia/rx51/rx51.h:284:(quoted diff) +1
-0+ MUX_VAL(CP(SYS_CLKOUT1), (IEN | PTD | DIS | M0)) /*SYS_CLKOUT1*/\WARNING: line over 80 characters
#944: FILE:board/nokia/rx51/rx51.h:288:(quoted diff) +1
-0+ MUX_VAL(CP(ETK_D0_ES2), (IEN | PTU | DIS | M3)) /*HSUSB1_DATA0*/\WARNING: line over 80 characters
#945: FILE:board/nokia/rx51/rx51.h:289:(quoted diff) +1
-0+ MUX_VAL(CP(ETK_D1_ES2), (IEN | PTU | DIS | M3)) /*HSUSB1_DATA1*/\WARNING: line over 80 characters
#946: FILE:board/nokia/rx51/rx51.h:290:(quoted diff) +1
-0+ MUX_VAL(CP(ETK_D2_ES2), (IEN | PTU | DIS | M3)) /*HSUSB1_DATA2*/\WARNING: line over 80 characters
#947: FILE:board/nokia/rx51/rx51.h:291:(quoted diff) +1
-0+ MUX_VAL(CP(ETK_D3_ES2), (IEN | PTU | DIS | M3)) /*HSUSB1_DATA7*/\WARNING: line over 80 characters
#948: FILE:board/nokia/rx51/rx51.h:292:(quoted diff) +1
-0+ MUX_VAL(CP(ETK_D4_ES2), (IEN | PTU | DIS | M3)) /*HSUSB1_DATA4*/\WARNING: line over 80 characters
#949: FILE:board/nokia/rx51/rx51.h:293:(quoted diff) +1
-0+ MUX_VAL(CP(ETK_D5_ES2), (IEN | PTU | DIS | M3)) /*HSUSB1_DATA5*/\WARNING: line over 80 characters
#950: FILE:board/nokia/rx51/rx51.h:294:(quoted diff) +1
-0+ MUX_VAL(CP(ETK_D6_ES2), (IEN | PTU | DIS | M3)) /*HSUSB1_DATA6*/\WARNING: line over 80 characters
#951: FILE:board/nokia/rx51/rx51.h:295:(quoted diff) +1
-0+ MUX_VAL(CP(ETK_D7_ES2), (IEN | PTU | DIS | M3)) /*HSUSB1_DATA3*/\WARNING: line over 80 characters
#990: FILE:board/nokia/rx51/rx51.h:334:(quoted diff) +1
-0+ MUX_VAL(CP(D2D_CLK26MI), (IEN | PTD | DIS | M0)) /*d2d_clk26mi*/\WARNING: line over 80 characters
#991: FILE:board/nokia/rx51/rx51.h:335:(quoted diff) +1
-0+ MUX_VAL(CP(D2D_NRESPWRON), (IEN | PTD | EN | M0)) /*d2d_nrespwron*/\WARNING: line over 80 characters
#992: FILE:board/nokia/rx51/rx51.h:336:(quoted diff) +1
-0+ MUX_VAL(CP(D2D_NRESWARM), (IEN | PTU | EN | M0)) /*d2d_nreswarm */\WARNING: line over 80 characters
#993: FILE:board/nokia/rx51/rx51.h:337:(quoted diff) +1
-0+ MUX_VAL(CP(D2D_ARM9NIRQ), (IEN | PTD | DIS | M0)) /*d2d_arm9nirq */\WARNING: line over 80 characters
#994: FILE:board/nokia/rx51/rx51.h:338:(quoted diff) +1
-0+ MUX_VAL(CP(D2D_UMA2P6FIQ), (IEN | PTD | DIS | M0)) /*d2d_uma2p6fiq*/\WARNING: line over 80 characters
#997: FILE:board/nokia/rx51/rx51.h:341:(quoted diff) +1
-0+ MUX_VAL(CP(D2D_DMAREQ0), (IEN | PTD | DIS | M0)) /*d2d_dmareq0*/\WARNING: line over 80 characters
#998: FILE:board/nokia/rx51/rx51.h:342:(quoted diff) +1
-0+ MUX_VAL(CP(D2D_DMAREQ1), (IEN | PTD | DIS | M0)) /*d2d_dmareq1*/\WARNING: line over 80 characters
#999: FILE:board/nokia/rx51/rx51.h:343:(quoted diff) +1
-0+ MUX_VAL(CP(D2D_DMAREQ2), (IEN | PTD | DIS | M0)) /*d2d_dmareq2*/\WARNING: line over 80 characters
#1000: FILE:board/nokia/rx51/rx51.h:344:(quoted diff) +1
-0+ MUX_VAL(CP(D2D_DMAREQ3), (IEN | PTD | DIS | M0)) /*d2d_dmareq3*/\WARNING: line over 80 characters
#1001: FILE:board/nokia/rx51/rx51.h:345:(quoted diff) +1
-0+ MUX_VAL(CP(D2D_N3GTRST), (IEN | PTD | DIS | M0)) /*d2d_n3gtrst*/\WARNING: line over 80 characters
#1006: FILE:board/nokia/rx51/rx51.h:350:(quoted diff) +1
-0+ MUX_VAL(CP(D2D_N3GRTCK), (IEN | PTD | DIS | M0)) /*d2d_n3grtck*/\WARNING: line over 80 characters
#1008: FILE:board/nokia/rx51/rx51.h:352:(quoted diff) +1
-0+ MUX_VAL(CP(D2D_SWAKEUP), (IEN | PTD | EN | M0)) /*d2d_swakeup*/\WARNING: line over 80 characters
#1009: FILE:board/nokia/rx51/rx51.h:353:(quoted diff) +1
-0+ MUX_VAL(CP(D2D_IDLEREQ), (IEN | PTD | DIS | M0)) /*d2d_idlereq*/\WARNING: line over 80 characters
#1010: FILE:board/nokia/rx51/rx51.h:354:(quoted diff) +1
-0+ MUX_VAL(CP(D2D_IDLEACK), (IEN | PTU | EN | M0)) /*d2d_idleack*/\WARNING: line over 80 characters
#1015: FILE:board/nokia/rx51/rx51.h:359:(quoted diff) +1
-0+ MUX_VAL(CP(D2D_MBUSFLAG), (IEN | PTD | DIS | M0)) /*d2d_mbusflag*/\WARNING: line over 80 characters
#1016: FILE:board/nokia/rx51/rx51.h:360:
Review
Quoted 1 line
(quoted diff) +1
-0+ MUX_VAL(CP(D2D_SBUSFLAG), (IEN | PTD | DIS | M0)) /*d2d_sbusflag*/\
This code was copied from beagle board.
Quoted 17 lines
WARNING: line over 80 characters
#1088: FILE:include/configs/nokia_rx51.h:42:
+#defineCONFIG_ARMV7/* This is an ARM V7 CPU core */WARNING: line over 80 characters
#1089: FILE:include/configs/nokia_rx51.h:43:
+#defineCONFIG_OMAP/* in a TI OMAP core */WARNING: line over 80 characters
#1090: FILE:include/configs/nokia_rx51.h:44:
+#defineCONFIG_OMAP34XX/* which is a 34XX */WARNING: line over 80 characters
#1091: FILE:include/configs/nokia_rx51.h:45:
+#defineCONFIG_OMAP3430/* which is in a 3430 */
Quoted 7 lines
WARNING: line over 80 characters
#1092: FILE:include/configs/nokia_rx51.h:46:
+#defineCONFIG_CHAINLOADER/* Loaded by NOLO */WARNING: line over 80 characters
#1093: FILE:include/configs/nokia_rx51.h:47:
+#defineCONFIG_L2_OFF/* kernel won't boot if l2
enabled (old u-boot
Quoted 18 lines
tried but failed to enable it, due to a bug.) */
WARNING: line over 80 characters
#1100: FILE:include/configs/nokia_rx51.h:54:
+#defineCONFIG_SDRC/* The chip has SDRC controller */WARNING: line over 80 characters
#1102: FILE:include/configs/nokia_rx51.h:56:
+#include <asm/arch/cpu.h> /* get chip and board defs */WARNING: line over 80 characters
#1112: FILE:include/configs/nokia_rx51.h:66:
+#defineV_OSCK26000000 /* Clock output from T2 */WARNING: line over 80 characters
#1115: FILE:include/configs/nokia_rx51.h:69:
+#undefCONFIG_USE_IRQ/* no support for IRQs */
Quoted 7 lines
WARNING: line over 80 characters
#1117: FILE:include/configs/nokia_rx51.h:71:
+#defineCONFIG_SKIP_LOWLEVEL_INIT/* NOLO set everything up */WARNING: line over 80 characters
#1119: FILE:include/configs/nokia_rx51.h:73:
+#defineCONFIG_CMDLINE_TAG/* enable passing kernel
command line string
Quoted 39 lines
*/
WARNING: line over 80 characters
#1120: FILE:include/configs/nokia_rx51.h:74:
+#defineCONFIG_INITRD_TAG/* enable passing initrd */WARNING: line over 80 characters
#1125: FILE:include/configs/nokia_rx51.h:79:
+#defineCONFIG_ENV_SIZE(128 << 10) /* 128 KiB Sector */WARNING: line over 80 characters
#1135: FILE:include/configs/nokia_rx51.h:89:
+#defineV_NS16550_CLK48000000 /* 48MHz (APLL96/2) */WARNING: line over 80 characters
#1147: FILE:include/configs/nokia_rx51.h:101:
+#defineCONFIG_SERIAL33 /* UART3 on RX-51 */ERROR: space required after that ',' (ctx:VxV) #1152: FILE:
include/configs/nokia_rx51.h:106:
+#defineCONFIG_SYS_BAUDRATE_TABLE{4800, 9600, 19200, 38400, 57600,115200}^WARNING: line over 80 characters
#1176: FILE:include/configs/nokia_rx51.h:130:
+#defineCONFIG_CMD_EXT2/* EXT2 Support */WARNING: line over 80 characters
#1177: FILE:include/configs/nokia_rx51.h:131:
+#defineCONFIG_CMD_FAT/* FAT support */WARNING: line over 80 characters
#1179: FILE:include/configs/nokia_rx51.h:133:
+#defineCONFIG_CMD_I2C/* I2C serial bus support */WARNING: line over 80 characters
#1180: FILE:include/configs/nokia_rx51.h:134:
+#defineCONFIG_CMD_MMC/* MMC support */
Quoted 7 lines
WARNING: line over 80 characters
#1181: FILE:include/configs/nokia_rx51.h:135:
+#undefCONFIG_CMD_ONENAND/* NAND support */WARNING: line over 80 characters
#1183: FILE:include/configs/nokia_rx51.h:137:
+#defineCONFIG_CMD_CLR/* ANSI terminal clear screen
command */
Quoted 8 lines
WARNING: line over 80 characters
#1185: FILE:include/configs/nokia_rx51.h:139:
+#undefCONFIG_CMD_FLASH/* flinfo, erase, protect */WARNING: line over 80 characters
#1186: FILE:include/configs/nokia_rx51.h:140:
+#undefCONFIG_CMD_FPGA/* FPGA configuration Support
*/
Quoted 8 lines
WARNING: line over 80 characters
#1188: FILE:include/configs/nokia_rx51.h:142:
+#undefCONFIG_CMD_IMLS/* List all found images */WARNING: line over 80 characters
#1189: FILE:include/configs/nokia_rx51.h:143:
+#undefCONFIG_CMD_NET/* bootp, tftpboot, rarpboot
*/
Quoted 8 lines
WARNING: line over 80 characters
#1190: FILE:include/configs/nokia_rx51.h:144:
+#undefCONFIG_CMD_NFS/* NFS support */WARNING: line over 80 characters
#1216: FILE:include/configs/nokia_rx51.h:170:
+#defineCONFIG_CFB_CONSOLE_ANSI/* Enable ANSI escape codes
in
Quoted 1 line
framebuffer */
I think adding these comments are usefull - do you want to remove it?
Quoted 19 lines
WARNING: line over 80 characters
#1249: FILE:include/configs/nokia_rx51.h:203:(quoted diff) +1
-0+ "scriptload=${mmctype}load mmc ${mmcnum}:${mmcpart} ${loadaddr}${mmcfile}\0" \
WARNING: line over 80 characters
#1250: FILE:include/configs/nokia_rx51.h:204:(quoted diff) +1
-0+ "scriptboot=echo Running ${mmcfile} from mmc ${mmcnum}:${mmcpart} ...;" \WARNING: line over 80 characters
#1252: FILE:include/configs/nokia_rx51.h:206:(quoted diff) +1
-0+ "uimageload=${mmctype}load mmc ${mmcnum}:${mmcpart} ${loadaddr}${mmcfile}\0" \
WARNING: line over 80 characters
#1253: FILE:include/configs/nokia_rx51.h:207:(quoted diff) +1
-0+ "uimageboot=echo Booting ${mmcfile} from mmc ${mmcnum}:${mmcpart} ...;" \
Quoted 7 lines
WARNING: line over 80 characters
#1306: FILE:include/configs/nokia_rx51.h:260:
+#defineCONFIG_SYS_LONGHELP/* undef to save memory */WARNING: line over 80 characters
#1307: FILE:include/configs/nokia_rx51.h:261:
+#defineCONFIG_SYS_HUSH_PARSER/* use "hush" command parser
*/
Quoted 8 lines
WARNING: line over 80 characters
#1310: FILE:include/configs/nokia_rx51.h:264:
+#defineCONFIG_SYS_CBSIZE256 /* Console I/O Buffer Size */WARNING: line over 80 characters
#1312: FILE:include/configs/nokia_rx51.h:266:
+#defineCONFIG_SYS_PBSIZE(CONFIG_SYS_CBSIZE+
sizeof(CONFIG_SYS_PROMPT) +
Quoted 5 lines
16)
WARNING: line over 80 characters
#1313: FILE:include/configs/nokia_rx51.h:267:
+#defineCONFIG_SYS_MAXARGS16 /* max number of command args
*/
Quoted 4 lines
WARNING: line over 80 characters
#1317: FILE:include/configs/nokia_rx51.h:271:
+#defineCONFIG_SYS_MEMTEST_START(OMAP34XX_SDRC_CS0) /* memtest works on
*/
Quoted 4 lines
WARNING: line over 80 characters
#1318: FILE:include/configs/nokia_rx51.h:272:
+#defineCONFIG_SYS_MEMTEST_END(OMAP34XX_SDRC_CS0+0x01F00000) /* 31MB
*/
Quoted 4 lines
WARNING: line over 80 characters
#1320: FILE:include/configs/nokia_rx51.h:274:
+#defineCONFIG_SYS_LOAD_ADDR(OMAP34XX_SDRC_CS0) /* default load
address
Quoted 14 lines
*/
WARNING: line over 80 characters
#1328: FILE:include/configs/nokia_rx51.h:282:
+#defineCONFIG_SYS_PTV2 /* Divisor: 2^(PTV+1) => 8 */WARNING: line over 80 characters
#1336: FILE:include/configs/nokia_rx51.h:290:
+#defineCONFIG_STACKSIZE(128 << 10) /* regular stack 128 KiB */WARNING: line over 80 characters
#1338: FILE:include/configs/nokia_rx51.h:292:
+#defineCONFIG_STACKSIZE_IRQ(4 << 10) /* IRQ stack 4 KiB */
Quoted 7 lines
WARNING: line over 80 characters
#1339: FILE:include/configs/nokia_rx51.h:293:
+#defineCONFIG_STACKSIZE_FIQ(4 << 10) /* FIQ stack 4 KiB */WARNING: line over 80 characters
#1345: FILE:include/configs/nokia_rx51.h:299:
+#defineCONFIG_NR_DRAM_BANKS2 /* CS1 may or may not be
populated */
Quoted 505 lines
WARNING: line over 80 characters
#1361: FILE:include/configs/nokia_rx51.h:315:
+#defineCONFIG_SYS_INIT_SP_ADDR(CONFIG_SYS_INIT_RAM_ADDR+CONFIG_SYS_INIT_RAM_SIZE-GENERATED_GBL_DATA_SIZE)total: 12 errors, 124 warnings, 1173 lines checked
/home/wd/Mail/U-Boot/12789has style problems, please review.If any of these errors are false positives, please report them to the maintainer, see CHECKPATCH in
MAINTAINERS.
ERROR: "foo * bar" should be "foo *bar"
#178: FILE:common/cmd_bootmenu.c:32:
+static char *get_option(int n){ERROR: open brace '{' following function declarations go on the next line #178: FILE:
common/cmd_bootmenu.c:32:
+static char *get_option(int n){ERROR: space prohibited after that open parenthesis '(' #182: FILE:
common/cmd_bootmenu.c:36:(quoted diff) +1
-0+ if ( n < 0 || n > 99 )ERROR: space prohibited before that close parenthesis ')' #182: FILE:
common/cmd_bootmenu.c:36:(quoted diff) +1
-0+ if ( n < 0 || n > 99 )ERROR: "foo * bar" should be "foo *bar"
#191: FILE:common/cmd_bootmenu.c:45:
+static char *get_end_of_title(char * str){ERROR: open brace '{' following function declarations go on the next line #191: FILE:
common/cmd_bootmenu.c:45:
+static char *get_end_of_title(char * str){ERROR: space prohibited after that '!' (ctx:WxW) #193: FILE:
common/cmd_bootmenu.c:47:(quoted diff) +1
-0+ if ( ! str ) ^ERROR: space prohibited after that open parenthesis '(' #193: FILE:
common/cmd_bootmenu.c:47:(quoted diff) +1
-0+ if ( ! str )ERROR: space prohibited before that close parenthesis ')' #193: FILE:
common/cmd_bootmenu.c:47:(quoted diff) +1
-0+ if ( ! str )ERROR: "foo * bar" should be "foo *bar" #200: FILE:
common/cmd_bootmenu.c:54:
+static intprint_title(char * begin, char * end){ERROR: open brace '{' following function declarations go on the next line #200: FILE:
common/cmd_bootmenu.c:54:
+static intprint_title(char * begin, char * end){ERROR: space prohibited after that '!' (ctx:WxW) #202: FILE:
common/cmd_bootmenu.c:56:(quoted diff) +1
-0+ if ( ! begin || ! end || end < begin ) ^ERROR: space prohibited after that '!' (ctx:WxW) #202: FILE:
common/cmd_bootmenu.c:56:(quoted diff) +1
-0+ if ( ! begin || ! end || end < begin ) ^ERROR: space prohibited after that open parenthesis '(' #202: FILE:
common/cmd_bootmenu.c:56:(quoted diff) +1
-0+ if ( ! begin || ! end || end < begin )ERROR: space prohibited before that close parenthesis ')' #202: FILE:
common/cmd_bootmenu.c:56:(quoted diff) +1
-0+ if ( ! begin || ! end || end < begin )ERROR: space prohibited after that open parenthesis '(' #205: FILE:
common/cmd_bootmenu.c:59:(quoted diff) +1
-0+ while ( begin != end )ERROR: space prohibited before that close parenthesis ')' #205: FILE:
common/cmd_bootmenu.c:59:(quoted diff) +1
-0+ while ( begin != end )ERROR: open brace '{' following function declarations go on the next line #212: FILE:
common/cmd_bootmenu.c:66:
+static intprint_entry(int n, int reverse){ERROR: "foo * bar" should be "foo *bar"
#214: FILE:common/cmd_bootmenu.c:68:(quoted diff) +1
-0+ char * str = get_option(n);ERROR: "foo * bar" should be "foo *bar"
#215: FILE:common/cmd_bootmenu.c:69:(quoted diff) +1
-0+ char * end = get_end_of_title(str);ERROR: space prohibited after that '!' (ctx:WxW) #217: FILE:
common/cmd_bootmenu.c:71:(quoted diff) +1
-0+ if ( ! end ) ^ERROR: space prohibited after that open parenthesis '(' #217: FILE:
common/cmd_bootmenu.c:71:(quoted diff) +1
-0+ if ( ! end )ERROR: space prohibited before that close parenthesis ')' #217: FILE:
common/cmd_bootmenu.c:71:(quoted diff) +1
-0+ if ( ! end )ERROR: space prohibited after that open parenthesis '(' #222: FILE:
common/cmd_bootmenu.c:76:(quoted diff) +1
-0+ if ( reverse )ERROR: space prohibited before that close parenthesis ')' #222: FILE:
common/cmd_bootmenu.c:76:(quoted diff) +1
-0+ if ( reverse )ERROR: space prohibited after that open parenthesis '(' #229: FILE:
common/cmd_bootmenu.c:83:(quoted diff) +1
-0+ if ( reverse )ERROR: space prohibited before that close parenthesis ')' #229: FILE:
common/cmd_bootmenu.c:83:(quoted diff) +1
-0+ if ( reverse )ERROR: open brace '{' following function declarations go on the next line #236: FILE:
common/cmd_bootmenu.c:90:
+static intprint_menu(int active){ERROR: space prohibited after that open parenthesis '(' #248: FILE:
common/cmd_bootmenu.c:102:(quoted diff) +1
-0+ while ( 1 ) {ERROR: space prohibited before that close parenthesis ')' #248: FILE:
common/cmd_bootmenu.c:102:(quoted diff) +1
-0+ while ( 1 ) {ERROR: space prohibited after that open parenthesis '(' #252: FILE:
common/cmd_bootmenu.c:106:(quoted diff) +1
-0+ if ( ret == 1 )ERROR: space prohibited before that close parenthesis ')' #252: FILE:
common/cmd_bootmenu.c:106:(quoted diff) +1
-0+ if ( ret == 1 )ERROR: space prohibited after that open parenthesis '(' #261: FILE:
common/cmd_bootmenu.c:115:(quoted diff) +1
-0+ if ( n == active )ERROR: space prohibited before that close parenthesis ')' #261: FILE:
common/cmd_bootmenu.c:115:(quoted diff) +1
-0+ if ( n == active )ERROR: space prohibited after that open parenthesis '(' #267: FILE:
common/cmd_bootmenu.c:121:(quoted diff) +1
-0+ if ( n == active )ERROR: space prohibited before that close parenthesis ')' #267: FILE:
common/cmd_bootmenu.c:121:(quoted diff) +1
-0+ if ( n == active )ERROR: open brace '{' following function declarations go on the next line #282: FILE:
common/cmd_bootmenu.c:136:
+intdo_bootmenu(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]){ERROR: "foo * bar" should be "foo *bar"
#291: FILE:common/cmd_bootmenu.c:145:(quoted diff) +1
-0+ char * delay_str = NULL;ERROR: space prohibited after that open parenthesis '(' #293: FILE:
common/cmd_bootmenu.c:147:(quoted diff) +1
-0+ if ( argc >= 2 )ERROR: space prohibited before that close parenthesis ')' #293: FILE:
common/cmd_bootmenu.c:147:(quoted diff) +1
-0+ if ( argc >= 2 )ERROR: space prohibited after that '!' (ctx:WxW) #296: FILE:
common/cmd_bootmenu.c:150:(quoted diff) +1
-0+ if ( ! delay_str ) ^ERROR: space prohibited after that open parenthesis '(' #296: FILE:
common/cmd_bootmenu.c:150:(quoted diff) +1
-0+ if ( ! delay_str )ERROR: space prohibited before that close parenthesis ')' #296: FILE:
common/cmd_bootmenu.c:150:(quoted diff) +1
-0+ if ( ! delay_str )ERROR: space prohibited after that open parenthesis '(' #299: FILE:
common/cmd_bootmenu.c:153:(quoted diff) +1
-0+ if ( delay_str )ERROR: space prohibited before that close parenthesis ')' #299: FILE:
common/cmd_bootmenu.c:153:(quoted diff) +1
-0+ if ( delay_str )WARNING: consider using kstrto* in preference to
simple_strtol#300: FILE:common/cmd_bootmenu.c:154:(quoted diff) +1
-0+ delay = (int)simple_strtol(delay_str, NULL, 10);ERROR: space prohibited after that open parenthesis '(' #302: FILE:
common/cmd_bootmenu.c:156:(quoted diff) +1
-0+ if ( delay == 0 ) {ERROR: space prohibited before that close parenthesis ')' #302: FILE:
common/cmd_bootmenu.c:156:(quoted diff) +1
-0+ if ( delay == 0 ) {ERROR: space prohibited after that open parenthesis '(' #305: FILE:
common/cmd_bootmenu.c:159:(quoted diff) +1
-0+ if ( get_end_of_title(get_option(0)) )ERROR: space prohibited before that close parenthesis ')' #305: FILE:
common/cmd_bootmenu.c:159:(quoted diff) +1
-0+ if ( get_end_of_title(get_option(0)) )ERROR: space prohibited after that open parenthesis '(' #312: FILE:
common/cmd_bootmenu.c:166:(quoted diff) +1
-0+ if ( delay < 0 )ERROR: space prohibited before that close parenthesis ')' #312: FILE:
common/cmd_bootmenu.c:166:(quoted diff) +1
-0+ if ( delay < 0 )ERROR: space prohibited after that '!' (ctx:WxW) #315: FILE:
common/cmd_bootmenu.c:169:(quoted diff) +1
-0+ if ( ! instant ) { ^ERROR: space prohibited after that open parenthesis '(' #315: FILE:
common/cmd_bootmenu.c:169:(quoted diff) +1
-0+ if ( ! instant ) {ERROR: space prohibited before that close parenthesis ')' #315: FILE:
common/cmd_bootmenu.c:169:(quoted diff) +1
-0+ if ( ! instant ) {ERROR: space prohibited after that open parenthesis '(' #322: FILE:
common/cmd_bootmenu.c:176:(quoted diff) +1
-0+ while ( 1 ) {ERROR: space prohibited before that close parenthesis ')' #322: FILE:
common/cmd_bootmenu.c:176:(quoted diff) +1
-0+ while ( 1 ) {ERROR: space prohibited after that open parenthesis '(' #324: FILE:
common/cmd_bootmenu.c:178:(quoted diff) +1
-0+ if ( abort || delay > 0 )ERROR: space prohibited before that close parenthesis ')' #324: FILE:
common/cmd_bootmenu.c:178:(quoted diff) +1
-0+ if ( abort || delay > 0 )ERROR: space prohibited after that '!' (ctx:WxW) #327: FILE:
common/cmd_bootmenu.c:181:(quoted diff) +1
-0+ if ( ! abort ) { ^ERROR: space prohibited after that open parenthesis '(' #327: FILE:
common/cmd_bootmenu.c:181:(quoted diff) +1
-0+ if ( ! abort ) {ERROR: space prohibited before that close parenthesis ')' #327: FILE:
common/cmd_bootmenu.c:181:(quoted diff) +1
-0+ if ( ! abort ) {ERROR: space prohibited after that open parenthesis '(' #329: FILE:
common/cmd_bootmenu.c:183:(quoted diff) +1
-0+ if ( delay > 0 )ERROR: space prohibited before that close parenthesis ')' #329: FILE:
common/cmd_bootmenu.c:183:(quoted diff) +1
-0+ if ( delay > 0 )WARNING: line over 80 characters
#330: FILE:common/cmd_bootmenu.c:184:(quoted diff) +1
-0+ printf(" Hit any key to stop autoboot: %2d ", delay);ERROR: space prohibited after that open parenthesis '(' #332: FILE:
common/cmd_bootmenu.c:186:(quoted diff) +1
-0+ while ( delay > 0 ) {ERROR: space prohibited before that close parenthesis ')' #332: FILE:
common/cmd_bootmenu.c:186:(quoted diff) +1
-0+ while ( delay > 0 ) {ERROR: space prohibited after that open parenthesis '(' #336: FILE:
common/cmd_bootmenu.c:190:(quoted diff) +1
-0+ for ( i = 0; i < 100; ++i ) {ERROR: space prohibited before that close parenthesis ')' #336: FILE:
common/cmd_bootmenu.c:190:(quoted diff) +1
-0+ for ( i = 0; i < 100; ++i ) {ERROR: space prohibited after that open parenthesis '(' #338: FILE:
common/cmd_bootmenu.c:192:(quoted diff) +1
-0+ if ( tstc() ) {ERROR: space prohibited before that close parenthesis ')' #338: FILE:
common/cmd_bootmenu.c:192:(quoted diff) +1
-0+ if ( tstc() ) {ERROR: space prohibited after that open parenthesis '(' #343: FILE:
common/cmd_bootmenu.c:197:(quoted diff) +1
-0+ if ( key == '\e' ) {ERROR: space prohibited before that close parenthesis ')' #343: FILE:
common/cmd_bootmenu.c:197:(quoted diff) +1
-0+ if ( key == '\e' ) {ERROR: space prohibited after that open parenthesis '(' #346: FILE:
common/cmd_bootmenu.c:200:(quoted diff) +1
-0+ } else if ( key == '\r' )ERROR: space prohibited before that close parenthesis ')' #346: FILE:
common/cmd_bootmenu.c:200:(quoted diff) +1
-0+ } else if ( key == '\r' )ERROR: space prohibited after that open parenthesis '(' #360: FILE:
common/cmd_bootmenu.c:214:(quoted diff) +1
-0+ if ( abort )ERROR: space prohibited before that close parenthesis ')' #360: FILE:
common/cmd_bootmenu.c:214:(quoted diff) +1
-0+ if ( abort )ERROR: space prohibited after that open parenthesis '(' #368: FILE:
common/cmd_bootmenu.c:222:(quoted diff) +1
-0+ if ( delay <= 0 )ERROR: space prohibited before that close parenthesis ')' #368: FILE:
common/cmd_bootmenu.c:222:(quoted diff) +1
-0+ if ( delay <= 0 )ERROR: space prohibited after that '!' (ctx:WxW) #373: FILE:
common/cmd_bootmenu.c:227:(quoted diff) +1
-0+ while ( ! tstc() ) { ^ERROR: space prohibited after that open parenthesis '(' #373: FILE:
common/cmd_bootmenu.c:227:(quoted diff) +1
-0+ while ( ! tstc() ) {ERROR: space prohibited before that close parenthesis ')' #373: FILE:
common/cmd_bootmenu.c:227:(quoted diff) +1
-0+ while ( ! tstc() ) {ERROR: space prohibited after that open parenthesis '(' #382: FILE:
common/cmd_bootmenu.c:236:(quoted diff) +1
-0+ if ( esc == 0 ) {ERROR: space prohibited before that close parenthesis ')' #382: FILE:
common/cmd_bootmenu.c:236:(quoted diff) +1
-0+ if ( esc == 0 ) {ERROR: space prohibited after that open parenthesis '(' #384: FILE:
common/cmd_bootmenu.c:238:(quoted diff) +1
-0+ if ( key == '\e' ) {ERROR: space prohibited before that close parenthesis ')' #384: FILE:
common/cmd_bootmenu.c:238:(quoted diff) +1
-0+ if ( key == '\e' ) {ERROR: space prohibited after that open parenthesis '(' #389: FILE:
common/cmd_bootmenu.c:243:(quoted diff) +1
-0+ } else if ( esc == 1 ) {ERROR: space prohibited before that close parenthesis ')' #389: FILE:
common/cmd_bootmenu.c:243:(quoted diff) +1
-0+ } else if ( esc == 1 ) {ERROR: space prohibited after that open parenthesis '(' #391: FILE:
common/cmd_bootmenu.c:245:(quoted diff) +1
-0+ if ( key == '[' ) {ERROR: space prohibited before that close parenthesis ')' #391: FILE:
common/cmd_bootmenu.c:245:(quoted diff) +1
-0+ if ( key == '[' ) {ERROR: space prohibited after that open parenthesis '(' #397: FILE:
common/cmd_bootmenu.c:251:(quoted diff) +1
-0+ } else if ( esc == 2 || esc == 3 ) {ERROR: space prohibited before that close parenthesis ')' #397: FILE:
common/cmd_bootmenu.c:251:(quoted diff) +1
-0+ } else if ( esc == 2 || esc == 3 ) {ERROR: space prohibited after that open parenthesis '(' #399: FILE:
common/cmd_bootmenu.c:253:(quoted diff) +1
-0+ if ( esc == 2 && key == '1' ) {ERROR: space prohibited before that close parenthesis ')' #399: FILE:
common/cmd_bootmenu.c:253:(quoted diff) +1
-0+ if ( esc == 2 && key == '1' ) {ERROR: space prohibited after that open parenthesis '(' #405: FILE:
common/cmd_bootmenu.c:259:(quoted diff) +1
-0+ if ( key == 'A' )ERROR: space prohibited before that close parenthesis ')' #405: FILE:
common/cmd_bootmenu.c:259:(quoted diff) +1
-0+ if ( key == 'A' )ERROR: space prohibited after that open parenthesis '(' #407: FILE:
common/cmd_bootmenu.c:261:(quoted diff) +1
-0+ else if ( key == 'B' )ERROR: space prohibited before that close parenthesis ')' #407: FILE:
common/cmd_bootmenu.c:261:(quoted diff) +1
-0+ else if ( key == 'B' )ERROR: space prohibited after that open parenthesis '(' #414: FILE:
common/cmd_bootmenu.c:268:(quoted diff) +1
-0+ if ( key == '\r' )ERROR: space prohibited before that close parenthesis ')' #414: FILE:
common/cmd_bootmenu.c:268:(quoted diff) +1
-0+ if ( key == '\r' )ERROR: space prohibited after that open parenthesis '(' #419: FILE:
common/cmd_bootmenu.c:273:(quoted diff) +1
-0+ if ( key == 1 ) {ERROR: space prohibited before that close parenthesis ')' #419: FILE:
common/cmd_bootmenu.c:273:(quoted diff) +1
-0+ if ( key == 1 ) {ERROR: space prohibited after that open parenthesis '(' #421: FILE:
common/cmd_bootmenu.c:275:(quoted diff) +1
-0+ if ( active > 0 )ERROR: space prohibited before that close parenthesis ')' #421: FILE:
common/cmd_bootmenu.c:275:(quoted diff) +1
-0+ if ( active > 0 )ERROR: space prohibited after that open parenthesis '(' #424: FILE:
common/cmd_bootmenu.c:278:(quoted diff) +1
-0+ } else if ( key == 2 ) {ERROR: space prohibited before that close parenthesis ')' #424: FILE:
common/cmd_bootmenu.c:278:(quoted diff) +1
-0+ } else if ( key == 2 ) {ERROR: space prohibited after that open parenthesis '(' #426: FILE:
common/cmd_bootmenu.c:280:(quoted diff) +1
-0+ if ( active < count )ERROR: space prohibited before that close parenthesis ')' #426: FILE:
common/cmd_bootmenu.c:280:(quoted diff) +1
-0+ if ( active < count )ERROR: space prohibited after that open parenthesis '(' #429: FILE:
common/cmd_bootmenu.c:283:(quoted diff) +1
-0+ } else if ( key == 3 ) {ERROR: space prohibited before that close parenthesis ')' #429: FILE:
common/cmd_bootmenu.c:283:(quoted diff) +1
-0+ } else if ( key == 3 ) {ERROR: "foo * bar" should be "foo *bar"
#431: FILE:common/cmd_bootmenu.c:285:(quoted diff) +1
-0+ char * str;ERROR: "foo * bar" should be "foo *bar"
#432: FILE:common/cmd_bootmenu.c:286:(quoted diff) +1
-0+ char * end;ERROR: space prohibited after that '!' (ctx:WxW) #436: FILE:
common/cmd_bootmenu.c:290:(quoted diff) +1
-0+ if ( ! instant ) { ^ERROR: space prohibited after that open parenthesis '(' #436: FILE:
common/cmd_bootmenu.c:290:(quoted diff) +1
-0+ if ( ! instant ) {ERROR: space prohibited before that close parenthesis ')' #436: FILE:
common/cmd_bootmenu.c:290:(quoted diff) +1
-0+ if ( ! instant ) {ERROR: space prohibited after that open parenthesis '(' #446: FILE:
common/cmd_bootmenu.c:300:(quoted diff) +1
-0+ if ( active == count ) {ERROR: space prohibited before that close parenthesis ')' #446: FILE:
common/cmd_bootmenu.c:300:(quoted diff) +1
-0+ if ( active == count ) {ERROR: space prohibited after that '!' (ctx:WxW) #456: FILE:
common/cmd_bootmenu.c:310:(quoted diff) +1
-0+ if ( ! end ) { ^ERROR: space prohibited after that open parenthesis '(' #456: FILE:
common/cmd_bootmenu.c:310:(quoted diff) +1
-0+ if ( ! end ) {ERROR: space prohibited before that close parenthesis ')' #456: FILE:
common/cmd_bootmenu.c:310:(quoted diff) +1
-0+ if ( ! end ) {WARNING: line over 80 characters
#458: FILE:common/cmd_bootmenu.c:312:
Review
Quoted 1 line
(quoted diff) +1
-0+ printf("Invalid Boot Menu entry %d\nStarting U-Boot
console\n\n",
Quoted 17 lines
active);
ERROR: space prohibited after that '!' (ctx:WxW) #463: FILE:
common/cmd_bootmenu.c:317:(quoted diff) +1
-0+ if ( ! end[1] ) { ^ERROR: space prohibited after that open parenthesis '(' #463: FILE:
common/cmd_bootmenu.c:317:(quoted diff) +1
-0+ if ( ! end[1] ) {ERROR: space prohibited before that close parenthesis ')' #463: FILE:
common/cmd_bootmenu.c:317:(quoted diff) +1
-0+ if ( ! end[1] ) {WARNING: line over 80 characters
#479: FILE:common/cmd_bootmenu.c:333:
Review
Quoted 1 line
(quoted diff) +1
-0+ parse_string_outer(end+1, FLAG_PARSE_SEMICOLON |
FLAG_EXIT_FROM_LOOP);
Quoted 4 lines
total: 121 errors, 4 warnings, 369 lines checked
/home/wd/Mail/U-Boot/12790has style problems, please review.
I will look at this file and try to fix problems.
Quoted 22 lines
If any of these errors are false positives, please report them to the maintainer, see CHECKPATCH in
MAINTAINERS.
WARNING: line over 80 characters
#111: FILE:include/configs/nokia_rx51.h:137:
+#defineCONFIG_CMD_BOOTMENU/* ANSI terminal Boot Menu */WARNING: line over 80 characters
#140: FILE:include/configs/nokia_rx51.h:244:(quoted diff) +1
-0+ "setenv mmcnum 1; setenv mmcpart 1; setenv mmctype fat; setenv mmcfilebootmenu.scr;" \
total: 0 errors, 2 warnings, 48 lines checked
/home/wd/Mail/U-Boot/12791has style problems, please review.If any of these errors are false positives, please report them to the maintainer, see CHECKPATCH in
MAINTAINERS.Best regards,
Wolfgang Denk
Signature · 9 lines
Pali Roh?r pali.rohar at gmail.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 198 bytes Desc: This is a digitally signed message part. URL: <http://lists.denx.de/pipermail/u-boot/attachments/20111218/3d419837/attachment.pgp>
[U-Boot] U-Boot on Nokia RX-51 (aka N900)
Dear Pali =?ISO-8859-1?Q?Roh=E1r?=,
please do not full-quote. Quote only as much of the mail you are replying to as is needed to give enough context. It makes no sense to quoted hundrets of lines which you are not referring to in your reply.
Thanks.
Quoted 7 lines · In message <17199828.H8TsXDWnq5@pali-elitebook> you wrote:
Review
Quoted 4 lines
WARNING: space prohibited between function name and open parenthesis '(' #130: FILE:
arch/arm/lib/bootm.c:128:(quoted diff) +1
-0+ s = getenv ("atagaddr");see file
arch/arm/lib/bootm.c- it has this code styling. so this is not error unless you want to mix more code styling in one file.
If you find broken code, then please help fixing it.
Never try to use this as an excuse to add even more broken code.
Quoted 1 line
Quoted 1 line
WARNING: consider using kstrto* in preference to
simple_strtoul
...
Quoted 1 line
really? I was not able to find kstrtoul function
False positive.
Quoted 1 line
Quoted 1 line
WARNING: space prohibited between function name and open parenthesis '('
...
Quoted 1 line
Quoted 1 line
WARNING: please, no spaces at the start of a line
...
Quoted 1 line
same - see my first comment
See my comment. All these must be fixed.
Quoted 2 lines
see commit message - this patch is from linux upstream and uf u-boot has same styling this should be ok too.
Linux is not always as strict as we tend to be.
Also, if this code has been copied from Linux, then youi missed to properly reference it. See
http://www.denx.de/wiki/view/U-Boot/Patches#Attributing_Code_Copyrights_Sign
Quoted 5 lines
Review
Quoted 3 lines
WARNING: line over 80 characters
#117: FILE:common/main.c:1028:(quoted diff) +1
-0+ case '\e': /* ANSI escape char */again - same formating in file
common/main.c
Fix it!
Quoted 1 line
Quoted 1 line
WARNING: line over 80 characters
...
Quoted 1 line
If you want I remove above comments /* ... */
If these comments are considered useful, then they should be kept.
In any case, the line length must not be exceeded.
Quoted 5 lines
Quoted 3 lines
ERROR: do not initialise statics to 0 or NULL
#113: FILE:drivers/video/cfb_console.c:382:
+static intansi_colors_need_revert= 0;what is problem with initialising to 0?
It's redundant, we don't like it, and it triggers a checkpatch warning :-)
Best regards,
Wolfgang Denk
Signature · 5 lines
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: wd at denx.de
When it is incorrect, it is, at least *authoritatively* incorrect.
- Hitchiker's Guide To The Galaxy[U-Boot] U-Boot on Nokia RX-51 (aka N900)
In reply to Pali RohárQuoted 3 lines · On Saturday 17 December 2011 11:59:14 Pali Roh?r wrote:
I'm sending new patch series, which add Nokia RX-51 support to U-Boot. This patches are based on master commit
06e42c6e2ce269667daecd6229d0b7c813838203and now U-Boot working on Nokia RX-51.
please run all your patches through ./tools/checkpatch.pl. you've got a lot of common issues here.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20111218/80ab5878/attachment.pgp>
[U-Boot] U-Boot on Nokia RX-51 (aka N900)
Quoted 9 lines · On Sunday 18 December 2011 14:01:54 Mike Frysinger wrote:
Quoted 4 lines · On Saturday 17 December 2011 11:59:14 Pali Roh?r wrote:
I'm sending new patch series, which add Nokia RX-51 support to U-Boot. This patches are based on master commit
06e42c6e2ce269667daecd6229d0b7c813838203and now U-Boot working on Nokia RX-51.please run all your patches through
./tools/checkpatch.pl. you've got a lot of common issues here.
-mike
Ok, I will fix all problems detected by checkpatch.pl
Signature · 9 lines
Pali Roh?r pali.rohar at gmail.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 198 bytes Desc: This is a digitally signed message part. URL: <http://lists.denx.de/pipermail/u-boot/attachments/20111218/a1e62c7b/attachment.pgp>
PATCH v3 1/1 U-Boot on Nokia RX-51 (aka N900)
In reply to Pali RohárHello,
I'm sending third version of rx51 patches for u-boot. All patches was checked by checkpatch.pl and no error or warning was appeared. Last 2 patches (0014 and 0015) adding ANSI terminal bootmenu support for rx51 and can be reviewed separatly (patches 0001-0013 adding nokia rx51 board support and working without that last two).
Signature · 9 lines
Pali Roh?r pali.rohar at gmail.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 198 bytes Desc: This is a digitally signed message part. URL: <http://lists.denx.de/pipermail/u-boot/attachments/20111218/b9600029/attachment.pgp>
PATCH 1/15 arch/arm/cpu/armv7/omap3/lowlevel_init.S: save_boot_params
* Hide function save_boot_params if CONFIG_SPL_BUILD is not defined (function do nothing)
* Same behaviour as in file arch/arm/cpu/armv7/omap4/lowlevel_init.S
* This allow to implement board specified function save_boot_params in board code
--- arch/arm/cpu/armv7/omap3/lowlevel_init.S | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
arch/arm/cpu/armv7/omap3/lowlevel_init.S +2 -2
@@ -35,15 +35,15 @@ _TEXT_BASE: .word CONFIG_SYS_TEXT_BASE /* sdram load addr from config.mk */ +#ifdef CONFIG_SPL_BUILD .global save_boot_params save_boot_params: -#ifdef CONFIG_SPL_BUILD ldr r4, =omap3_boot_device ldr r5, [r0, #0x4] and r5, r5, #0xff str r5, [r4] -#endif bx lr +#endif .global omap3_gp_romcode_call omap3_gp_romcode_call:
Signature · 1 line
1.7.5.4
PATCH 2/15 arch/arm/lib/bootm.c: Optionally use existing atags
This patch adapts the bootm command so that it can use an existing atags command set up by a previous bootloader. If the environment variable "atagaddr" is unset, bootm behaves as normal. If "atagaddr" is set, bootm will use atags address from environment variable and also append new boot args (if specified in u-boot). For example, if a previous boot loader already set up the atags struct at 0x80000100:
setenv atagaddr 0x80000100; bootm 0x80008000
--- README | 2 ++ arch/arm/lib/bootm.c | 37 ++++++++++++++++++++++++++++++------- 2 files changed, 32 insertions(+), 7 deletions(-)
README +2 -0
@@ -3564,6 +3564,8 @@ Some configuration options can be set using Environment Variables. List of environment variables (most likely not complete): + atagaddr - bootm will use ATAGs struct from specified address (arm only) + baudrate - see CONFIG_BAUDRATE bootdelay - see CONFIG_BOOTDELAY
arch/arm/lib/bootm.c +30 -7
@@ -93,6 +93,14 @@ static void announce_and_cleanup(void)cleanup_before_linux (); } +#if defined(CONFIG_SETUP_MEMORY_TAGS ) || \ +defined(CONFIG_CMDLINE_TAG ) || \ +defined(CONFIG_INITRD_TAG ) || \ +defined(CONFIG_SERIAL_TAG ) || \ +defined(CONFIG_REVISION_TAG ) +#define CONFIG_SETUP_ANY_TAG +#endif +int do_bootm_linux (int flag,int argc,char *argv[],bootm_headers_t *images) {bd_t *bd = gd->bd;
@@ -125,12 +133,20 @@ int do_bootm_linux(int flag, int argc, char *argv[], bootm_headers_t *images)debug ("## Transferring control to Linux (at address %08lx) ...\n" , (ulong ) kernel_entry); -#if defined (CONFIG_SETUP_MEMORY_TAGS ) || \ - defined (CONFIG_CMDLINE_TAG ) || \ - defined (CONFIG_INITRD_TAG ) || \ - defined (CONFIG_SERIAL_TAG ) || \ - defined (CONFIG_REVISION_TAG ) -setup_start_tag (bd); + s =getenv ("atagaddr" ); +if (s) { + bd->bi_boot_params =simple_strtoul (s,NULL ,16 ); +printf ("Using existing atags at %#x\n" , bd->bi_boot_params); + + params = (struct tag *) bd->bi_boot_params; +while (params->hdr.size >0 ) + params =tag_next (params); + }else { +#ifdef CONFIG_SETUP_ANY_TAG +setup_start_tag (bd); +#endif + } +#ifdef CONFIG_SERIAL_TAG setup_serial_tag (¶ms);#endif
@@ -147,8 +163,15 @@ int do_bootm_linux(int flag, int argc, char *argv[], bootm_headers_t *images)if (images->rd_start && images->rd_end)setup_initrd_tag (bd, images->rd_start, images->rd_end);#endif -setup_end_tag (bd); + +if (s) { +if (params->hdr.size >0 ) +setup_end_tag (bd); + }else { +#ifdef CONFIG_SETUP_ANY_TAG +setup_end_tag (bd);#endif + }announce_and_cleanup ();
Signature · 1 line
1.7.5.4
PATCH 3/15 include/twl4030.h: Add power bus message definitions
In reply to Pali Rohár* Code copied from linux kernel 3.0.0 from file include/linux/i2c/twl.h
--- include/twl4030.h | 98 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 98 insertions(+), 0 deletions(-)
include/twl4030.h +98 -0
@@ -151,6 +151,103 @@#define TWL4030_PM_MASTER_SW_EVENTS_DEVSLP (1 << 1)#define TWL4030_PM_MASTER_SW_EVENTS_DEVOFF (1 << 0) +/* Power bus message definitions */ + +/* The TWL4030/5030 splits its power-management resources (the various +* regulators, clock and reset lines) into 3 processor groups - P1, P2 and +* P3. These groups can then be configured to transition between sleep, wait-on +* and active states by sending messages to the power bus. See Section 5.4.2 +* Power Resources of TWL4030 TRM +*/ + +/* Processor groups */ +#define DEV_GRP_NULL 0x0 +#define DEV_GRP_P1 0x1/* P1: all OMAP devices */ +#define DEV_GRP_P2 0x2/* P2: all Modem devices */ +#define DEV_GRP_P3 0x4/* P3: all peripheral devices */ + +/* Resource groups */ +#define RES_GRP_RES 0x0/* Reserved */ +#define RES_GRP_PP 0x1/* Power providers */ +#define RES_GRP_RC 0x2/* Reset and control */ +#define RES_GRP_PP_RC 0x3 +#define RES_GRP_PR 0x4/* Power references */ +#define RES_GRP_PP_PR 0x5 +#define RES_GRP_RC_PR 0x6 +#define RES_GRP_ALL 0x7/* All resource groups */ + +#define RES_TYPE2_R0 0x0 + +#define RES_TYPE_ALL 0x7 + +/* Resource states */ +#define RES_STATE_WRST 0xF +#define RES_STATE_ACTIVE 0xE +#define RES_STATE_SLEEP 0x8 +#define RES_STATE_OFF 0x0 + +/* Power resources */ + +/* Power providers */ +#define RES_VAUX1 1 +#define RES_VAUX2 2 +#define RES_VAUX3 3 +#define RES_VAUX4 4 +#define RES_VMMC1 5 +#define RES_VMMC2 6 +#define RES_VPLL1 7 +#define RES_VPLL2 8 +#define RES_VSIM 9 +#define RES_VDAC 10 +#define RES_VINTANA1 11 +#define RES_VINTANA2 12 +#define RES_VINTDIG 13 +#define RES_VIO 14 +#define RES_VDD1 15 +#define RES_VDD2 16 +#define RES_VUSB_1V5 17 +#define RES_VUSB_1V8 18 +#define RES_VUSB_3V1 19 +#define RES_VUSBCP 20 +#define RES_REGEN 21 +/* Reset and control */ +#define RES_NRES_PWRON 22 +#define RES_CLKEN 23 +#define RES_SYSEN 24 +#define RES_HFCLKOUT 25 +#define RES_32KCLKOUT 26 +#define RES_RESET 27 +/* Power Reference */ +#define RES_Main_Ref 28 + +#define TOTAL_RESOURCES 28 +/* +* Power Bus Message Format ... these can be sent individually by Linux, +* but are usually part of downloaded scripts that are run when various +* power events are triggered. +* +* Broadcast Message (16 Bits): +* DEV_GRP[15:13] MT[12] RES_GRP[11:9] RES_TYPE2[8:7] RES_TYPE[6:4] +* RES_STATE[3:0] +* +* Singular Message (16 Bits): +* DEV_GRP[15:13] MT[12] RES_ID[11:4] RES_STATE[3:0] +*/ + +#define MSG_BROADCAST (devgrp, grp, type, type2, state) \ + ((devgrp) << 13 | 1 << 12 | (grp) << 9 | (type2) << 7 \ + | (type) << 4 | (state)) + +#define MSG_SINGULAR (devgrp, id, state) \ + ((devgrp) << 13 | 0 << 12 | (id) << 4 | (state)) + +#define MSG_BROADCAST_ALL (devgrp, state) \ + ((devgrp) << 5 | (state)) + +#define MSG_BROADCAST_REF MSG_BROADCAST_ALL +#define MSG_BROADCAST_PROV MSG_BROADCAST_ALL +#define MSG_BROADCAST__CLK_RST MSG_BROADCAST_ALL +/* Power Managment Receiver */ #define TWL4030_PM_RECEIVER_SC_CONFIG 0x5B#define TWL4030_PM_RECEIVER_SC_DETECT1 0x5C
@@ -311,6 +408,7 @@#define TWL4030_PM_RECEIVER_VDAC_VSEL_18 0x03#define TWL4030_PM_RECEIVER_VMMC1_VSEL_30 0x02#define TWL4030_PM_RECEIVER_VMMC1_VSEL_32 0x03 +#define TWL4030_PM_RECEIVER_VSIM_VSEL_18 0x03/* Device Selection in PM Receiver Module */ #define TWL4030_PM_RECEIVER_DEV_GRP_P1 0x20
Signature · 1 line
1.7.5.4
PATCH 4/15 include/common.h: Add some ANSI escape codes definitions
In reply to Pali Rohár--- include/common.h | 20 ++++++++++++++++++++ 1 files changed, 20 insertions(+), 0 deletions(-)
include/common.h +20 -0
@@ -760,6 +760,26 @@ void clear_ctrlc (void); /* clear the Control-C condition */int disable_ctrlc (int );/* 1 to disable, 0 to enable Control-C detect */ /* +* ANSI terminal +*/ + +#define ANSI_CURSOR_UP "\e[%dA" +#define ANSI_CURSOR_DOWN "\e[%dB" +#define ANSI_CURSOR_FORWARD "\e[%dC" +#define ANSI_CURSOR_BACK "\e[%dD" +#define ANSI_CURSOR_NEXTLINE "\e[%dE" +#define ANSI_CURSOR_PREVIOUSLINE "\e[%dF" +#define ANSI_CURSOR_COLUMN "\e[%dG" +#define ANSI_CURSOR_POSITION "\e[%d;%dH" +#define ANSI_CURSOR_SHOW "\e[?25h" +#define ANSI_CURSOR_HIDE "\e[?25l" +#define ANSI_CLEAR_CONSOLE "\e[2J" +#define ANSI_CLEAR_LINE_TO_END "\e[0K" +#define ANSI_CLEAR_LINE "\e[2K" +#define ANSI_COLOR_RESET "\e[0m" +#define ANSI_COLOR_REVERSE "\e[7m" + +/* * STDIO based functions (can always be used) */ /* serial stuff */
Signature · 1 line
1.7.5.4
PATCH 5/15 common/main.c: Fix function readline
In reply to Pali Rohár* Ignore ANSI escape codes for moving cursor, which are generated by keyboard
--- common/main.c | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 51 insertions(+), 0 deletions(-)
common/main.c +51 -0
@@ -958,6 +958,7 @@ int readline_into_buffer (const char *const prompt, char * buffer)int n =0 ;/* buffer index */ int plen =0 ;/* prompt length */ int col;/* output column cnt */ +int esc =0 ;/* ansi escape char */ char c;/* print prompt */
@@ -1024,7 +1025,57 @@ int readline_into_buffer (const char *const prompt, char * buffer) p=delete_char (p_buf, p, &col, &n, plen);continue ; +case '\e' :/* ANSI escape char */ + esc =1 ; +continue ; +default : + +/* +* Check for ANSI escape chars +*/ +if (esc ==0 && c =='\e' ) { + esc =1 ; +continue ; + }else if (esc ==1 ) { +if (c =='[' ) { + esc =2 ; +continue ; + } +if (n <CONFIG_SYS_CBSIZE -2 ) { + ++n; + *p++ ='\e' ; +putc ('\e' ); + } + esc =0 ; + }else if (esc ==2 || esc ==3 ) { +if (esc ==2 && c =='1' ) { + esc =3 ; +continue ; + } +/* Ignore ANSI escape sequences */ +/* generated by keyboard */ +/* \e [ 1 A-D and \e [ A-D */ +if (c >='A' && c <='D' ) { + esc =0 ; +continue ; + } +if (esc ==2 && n <CONFIG_SYS_CBSIZE -3 ) { + n +=2 ; + *p++ ='\e' ; + *p++ ='[' ; +puts ("\e[" ); + }else if (esc ==3 && + n <CONFIG_SYS_CBSIZE -4 ) { + n +=3 ; + *p++ ='\e' ; + *p++ ='[' ; + *p++ ='1' ; +puts ("\e[1" ); + } + esc =0 ; + } +/* * Must be a normal character then */
Signature · 1 line
1.7.5.4
PATCH 5/15 common/main.c: Fix function readline
Quoted 2 lines · On Sunday 18 December 2011 16:34:01 Pali Roh?r wrote:
* Ignore ANSI escape codes for moving cursor, which are generated by
keyboard
this probably should be behind an appropriate CONFIG knob. i don't think this is relevant to serial users (which are the majority of boards).
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20120106/d01c74d9/attachment.pgp>
PATCH 5/15 common/main.c: Fix function readline
Quoted 8 lines · On Friday 06 January 2012 15:15:29 Mike Frysinger wrote:
Quoted 3 lines · On Sunday 18 December 2011 16:34:01 Pali Roh?r wrote:
* Ignore ANSI escape codes for moving cursor, which are generated by
keyboard
this probably should be behind an appropriate CONFIG knob. i don't think this is relevant to serial users (which are the majority of boards). -mike
I think this is also relevant to serial console too. I tried serial console (over USB) with Nokia N900 on computer (ANSI terminal) and if I pressed cursor key (UP/DOWN/LEFT/RIGHT) it moved cursor. But in readline function buffer was stored ANSI sequence. So when I pressed ENTER, u-boot tried to execute that buffer and showed me error. But it showed error message something like unknown command <ansi_seq>. ansi_seq was recognized in ansi terminal on computer and it garbaged output. (for example if asn_seq was move up, error message continued on previous line...)
This patch ignore ansi codes which can be generated by curosor keys, so there will not be that bad error messages...
Signature · 9 lines
Pali Roh?r pali.rohar at gmail.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 198 bytes Desc: This is a digitally signed message part. URL: <http://lists.denx.de/pipermail/u-boot/attachments/20120107/d40af957/attachment.pgp>
PATCH 5/15 common/main.c: Fix function readline
Quoted 18 lines · On Saturday 07 January 2012 03:51:16 Pali Roh?r wrote:
Quoted 7 lines · On Friday 06 January 2012 15:15:29 Mike Frysinger wrote:
Quoted 3 lines · On Sunday 18 December 2011 16:34:01 Pali Roh?r wrote:
* Ignore ANSI escape codes for moving cursor, which are generated by
keyboard
this probably should be behind an appropriate CONFIG knob. i don't think this is relevant to serial users (which are the majority of boards).
I think this is also relevant to serial console too. I tried serial console (over USB) with Nokia N900 on computer (ANSI terminal) and if I pressed cursor key (UP/DOWN/LEFT/RIGHT) it moved cursor. But in readline function buffer was stored ANSI sequence. So when I pressed ENTER, u-boot tried to execute that buffer and showed me error. But it showed error message something like unknown command <
ansi_seq>.ansi_seqwas recognized in ansi terminal on computer and it garbaged output. (for example ifasn_seqwas move up, error message continued on previous line...)
Quoted 2 lines
This patch ignore ansi codes which can be generated by curosor keys, so there will not be that bad error messages...
do you have CONFIG_CMDLINE_EDITING enabled ? arrow keys work just fine when that's enabled, and if it isn't, then i think it's expected behavior that pressing the arrow keys would generate "junk" that u-boot wouldn't interpret. -mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20120226/fd20c381/attachment.pgp>
PATCH 5/15 common/main.c: Fix function readline
Quoted 21 lines · On Sunday 26 February 2012 23:33:01 Mike Frysinger wrote:
Quoted 20 lines · On Saturday 07 January 2012 03:51:16 Pali Roh?r wrote:
Quoted 8 lines · On Friday 06 January 2012 15:15:29 Mike Frysinger wrote:
Quoted 3 lines · On Sunday 18 December 2011 16:34:01 Pali Roh?r wrote:
* Ignore ANSI escape codes for moving cursor, which are generated by
keyboard
this probably should be behind an appropriate CONFIG knob. i don't think
this is relevant to serial users (which are the majority of boards).I think this is also relevant to serial console too. I tried serial console
(over USB) with Nokia N900 on computer (ANSI terminal) and if I pressed cursor key (UP/DOWN/LEFT/RIGHT) it moved cursor. But in readline function buffer was stored ANSI sequence. So when I pressed ENTER, u-boot tried to execute that buffer and showed me error. But it showed error message something like unknown command <ansi_seq>.ansi_seqwas recognized in ansi terminal on computer and it garbaged output. (for example ifasn_seqwas move up, error message continued on previous line...)
Quoted 7 lines
Quoted 2 lines
This patch ignore ansi codes which can be generated by curosor keys, so there will not be that bad error messages...
do you have
CONFIG_CMDLINE_EDITINGenabled ? arrow keys work just fine when that's enabled, and if it isn't, then i think it's expected behavior that pressing the arrow keys would generate "junk" that u-boot wouldn't interpret. -mike
I had CONFIG_CMDLINE_EDITING disabled - I did not know this option. Anyway, when I enabled it arrow keys does not worked with cfb video driver and rx51 platform code.
I will try to fix that problem and I then will delete this patch.
Signature · 9 lines
Pali Roh?r pali.rohar at gmail.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 198 bytes Desc: This is a digitally signed message part. URL: <http://lists.denx.de/pipermail/u-boot/attachments/20120227/26b6a1d8/attachment.pgp>
PATCH 5/15 common/main.c: Fix function readline
Quoted 32 lines · On Monday 27 February 2012 13:40:07 Pali Roh?r wrote:
Quoted 23 lines · On Sunday 26 February 2012 23:33:01 Mike Frysinger wrote:
Quoted 22 lines · On Saturday 07 January 2012 03:51:16 Pali Roh?r wrote:
Quoted 9 lines · On Friday 06 January 2012 15:15:29 Mike Frysinger wrote:
Quoted 4 lines · On Sunday 18 December 2011 16:34:01 Pali Roh?r wrote:
* Ignore ANSI escape codes for moving cursor, which are generated by
keyboard
this probably should be behind an appropriate CONFIG knob. i don't think
this is relevant to serial users (which are the majority of boards).I think this is also relevant to serial console too. I tried serial console
(over USB) with Nokia N900 on computer (ANSI terminal) and if I pressed cursor key (UP/DOWN/LEFT/RIGHT) it moved cursor. But in readline function buffer was stored ANSI sequence. So when I pressed ENTER, u-boot tried to execute that buffer and showed me error. But it showed error message something like unknown command <ansi_seq>.ansi_seqwas recognized in ansi terminal on computer and it garbaged output. (for example ifasn_seqwas move up, error message continued on previous line...)Quoted 7 lines
Quoted 2 lines
This patch ignore ansi codes which can be generated by curosor keys, so there will not be that bad error messages...
do you have
CONFIG_CMDLINE_EDITINGenabled ? arrow keys work just fine when that's enabled, and if it isn't, then i think it's expected behavior that pressing the arrow keys would generate "junk" that u-boot wouldn't interpret.
Quoted 5 lines
I had
CONFIG_CMDLINE_EDITINGdisabled - I did not know this option. Anyway, when I enabled it arrow keys does not worked with cfb video driver and rx51 platform code.I will try to fix that problem and I then will delete this patch.
sounds good. not sure if this something we could really document in a way that'd help people :/.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20120227/974d02ea/attachment.pgp>
PATCH 6/15 drivers/video/cfb_console.c: Fix function console_scrollup
In reply to Pali Rohár* Use correct buffer size, do not damage screen output
--- drivers/video/cfb_console.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/video/cfb_console.c +1 -1
@@ -701,7 +701,7 @@ static void console_scrollup(void) );#else memcpyl (CONSOLE_ROW_FIRST ,CONSOLE_ROW_SECOND , -CONSOLE_SCROLL_SIZE >>2 ); +CONSOLE_SCROLL_SIZE );#endif /* clear the last one */
Signature · 1 line
1.7.5.4
PATCH 7/15 drivers/video/cfb_console.c: Add function console_clear and console_clear_line
In reply to Pali Rohár * console_clear - clear full console framebuffer output
* console_clear_line - clear part of specified line (or full)
--- drivers/video/cfb_console.c | 64 +++++++++++++++++++++++++++++++++++-------- 1 files changed, 52 insertions(+), 12 deletions(-)
drivers/video/cfb_console.c +52 -12
@@ -683,6 +683,57 @@ static void memcpyl(int *d, int *s, int c) }#endif +static void console_clear (void ) +{ +#ifdef VIDEO_HW_RECTFILL +video_hw_rectfill (VIDEO_PIXEL_SIZE ,/* bytes per pixel */ +0 ,/* dest pos x */ + video_logo_height,/* dest pos y */ +VIDEO_VISIBLE_COLS ,/* frame width */ +VIDEO_VISIBLE_ROWS ,/* frame height */ + bgx/* fill color */ + ); +#else +memsetl (CONSOLE_ROW_FIRST ,CONSOLE_SIZE , bgx); +#endif +} + +static void console_clear_line (int line,int begin,int end) +{ +#ifdef VIDEO_HW_RECTFILL +video_hw_rectfill (VIDEO_PIXEL_SIZE ,/* bytes per pixel */ +/* FIXME: correct? */ +VIDEO_FONT_WIDTH * begin,/* dest pos x */ +/* FIXME: correct? */ + video_logo_height + +CONSOLE_ROW_SIZE * line,/* dest pos y */ +/* FIXME: correct? */ +VIDEO_FONT_WIDTH * (end - begin),/* frame width */ +VIDEO_FONT_HEIGHT ,/* frame height */ + bgx/* fill color */ + ); +#else +int i; +if (begin ==0 && end ==CONSOLE_COLS ) +memsetl (CONSOLE_ROW_FIRST + +CONSOLE_ROW_SIZE * line,/* offset of row */ +CONSOLE_ROW_SIZE >>2 ,/* length of row */ + bgx/* fill color */ + ); +else +for (i =0 ; i <VIDEO_FONT_HEIGHT ; ++i) +memsetl (CONSOLE_ROW_FIRST + +CONSOLE_ROW_SIZE * line +/* offset of row */ +VIDEO_FONT_WIDTH * +VIDEO_PIXEL_SIZE * begin +/* offset of col */ + i *VIDEO_LINE_LEN ,/* col offset of i line */ + (VIDEO_FONT_WIDTH *VIDEO_PIXEL_SIZE * + (end - begin +1 )) >>2 ,/* length to end */ + bgx/* fill color */ + ); +#endif +} +static void console_scrollup (void ) {/* copy up rows ignoring the first one */
@@ -705,18 +756,7 @@ static void console_scrollup(void)#endif /* clear the last one */ -#ifdef VIDEO_HW_RECTFILL -video_hw_rectfill (VIDEO_PIXEL_SIZE ,/* bytes per pixel */ -0 ,/* dest pos x */ -VIDEO_VISIBLE_ROWS - -VIDEO_FONT_HEIGHT ,/* dest pos y */ -VIDEO_VISIBLE_COLS ,/* frame width */ -VIDEO_FONT_HEIGHT ,/* frame height */ -CONSOLE_BG_COL /* fill color */ - ); -#else -memsetl (CONSOLE_ROW_LAST ,CONSOLE_ROW_SIZE >>2 ,CONSOLE_BG_COL ); -#endif +console_clear_line (CONSOLE_ROWS -1 ,0 ,CONSOLE_COLS ); }static void console_back (void )
Signature · 1 line
1.7.5.4
PATCH 8/15 drivers/video/cfb_console.c: Add functions for moving with cursor
In reply to Pali Rohár * console_cursor_fix - fix cursor position (check for out of screen)
* console_cursor_up, console_cursor_down, console_cursor_left, console_cursor_right, console_cursor_set_position for change cursor position
* console_newline - added param to specify count of creating new lines
* console_previewsline - opposite of console_newline
--- drivers/video/cfb_console.c | 64 +++++++++++++++++++++++++++++++++++++++---- 1 files changed, 58 insertions(+), 6 deletions(-)
drivers/video/cfb_console.c +58 -6
@@ -773,9 +773,54 @@ static void console_back(void)CURSOR_SET ; } -static void console_newline (void ) +static void console_cursor_fix (void ) { - console_row++; +if (console_row <0 ) + console_row =0 ; +if (console_row >=CONSOLE_ROWS ) + console_row =CONSOLE_ROWS -1 ; +if (console_col <0 ) + console_col =0 ; +if (console_col >=CONSOLE_COLS ) + console_col =CONSOLE_COLS -1 ; +} + +static void console_cursor_up (int n) +{ + console_row -= n; +console_cursor_fix (); +} + +static void console_cursor_down (int n) +{ + console_row += n; +console_cursor_fix (); +} + +static void console_cursor_left (int n) +{ + console_col -= n; +console_cursor_fix (); +} + +static void console_cursor_right (int n) +{ + console_col += n; +console_cursor_fix (); +} + +static void console_cursor_set_position (int row,int col) +{ +if (console_row !=-1 ) + console_row = row; +if (console_col !=-1 ) + console_col = col; +console_cursor_fix (); +} + +static void console_newline (int n) +{ + console_row += n; console_col =0 ;/* Check if we need to scroll the terminal */
@@ -784,10 +829,17 @@ static void console_newline(void)console_scrollup ();/* Decrement row number */ - console_row--; + console_row =CONSOLE_ROWS -1 ; } } +static void console_previewsline (int n) +{ +/* FIXME: also scroll terminal ? */ + console_row -= n; +console_cursor_fix (); +} +static void console_cr (void ) { console_col =0 ;
@@ -806,7 +858,7 @@ void video_putc(const char c)case '\n' :/* next line */ if (console_col || (!console_col && nl)) -console_newline (); +console_newline (1 ); nl =1 ;break ;
@@ -815,7 +867,7 @@ void video_putc(const char c) console_col &= ~0x0007 ;if (console_col >=CONSOLE_COLS ) -console_newline (); +console_newline (1 );break ;case 8 :/* backspace */
@@ -829,7 +881,7 @@ void video_putc(const char c)/* check for newline */ if (console_col >=CONSOLE_COLS ) { -console_newline (); +console_newline (1 ); nl =0 ; } }
Signature · 1 line
1.7.5.4
PATCH 9/15 drivers/video/cfb_console.c: Add support for some ANSI terminal escape codes
In reply to Pali Rohár * This patch add support for move cursor and reverse colors via ANSI espace codes in cfb_console driver
* ANSI escape codes can be enabled/disabled via CONFIG_CFB_CONSOLE_ANSI
--- drivers/video/cfb_console.c | 216 ++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 215 insertions(+), 1 deletions(-)
drivers/video/cfb_console.c +215 -1
@@ -377,6 +377,10 @@ static int console_row; /* cursor row */static u32 eorx, fgx, bgx;/* color pats */ +static char ansi_buf[10 ] = {0 , }; +static int ansi_buf_size; +static int ansi_colors_need_revert; +static const int video_font_draw_table8[] = {0x00000000 ,0x000000ff ,0x0000ff00 ,0x0000ffff ,0x00ff0000 ,0x00ff00ff ,0x00ffff00 ,0x00ffffff ,
@@ -602,6 +606,14 @@ static void video_putchar(int xx, int yy, unsigned char c)video_drawchars (xx, yy + video_logo_height, &c,1 ); } +static void console_swap_colors (void ) +{ + eorx = fgx; + fgx = bgx; + bgx = eorx; + eorx = fgx ^ bgx; +} +#if defined(CONFIG_CONSOLE_CURSOR ) || defined(CONFIG_VIDEO_SW_CURSOR )static void video_set_cursor (void ) {
@@ -845,7 +857,7 @@ static void console_cr(void) console_col =0 ; } -void video_putc (const char c) +static void parse_putc (const char c) {static int nl =1 ;
@@ -888,6 +900,208 @@ void video_putc(const char c)CURSOR_SET ; } +void video_putc (const char c) +{ +#ifdef CONFIG_CFB_CONSOLE_ANSI +int i; + +if (c ==27 ) { +for (i =0 ; i < ansi_buf_size; ++i) +parse_putc (ansi_buf[i]); + ansi_buf[0 ] =27 ; + ansi_buf_size =1 ; +return ; + } + +if (ansi_buf_size >0 ) { +/* +0 - ESC +1 - [ +2 - num1 +3 - .. +4 - ; +5 - num2 +6 - .. +7 - cchar +*/ +int next =0 ; + +int flush =0 ; +int fail =0 ; + +int num1 =0 ; +int num2 =0 ; +int cchar =0 ; + + ansi_buf[ansi_buf_size++] = c; + +if (ansi_buf_size >=sizeof (ansi_buf)) + fail =1 ; + +for (i =0 ; i < ansi_buf_size; ++i) { +if (fail) +break ; + +switch (next) { +case 0 : +if (ansi_buf[i] ==27 ) + next =1 ; +else + fail =1 ; +break ; + +case 1 : +if (ansi_buf[i] =='[' ) + next =2 ; +else + fail =1 ; +break ; + +case 2 : +if (ansi_buf[i] >='0' && ansi_buf[i] <='9' ) { + num1 = ansi_buf[i]-'0' ; + next =3 ; + }else { + --i; + num1 =1 ; + next =4 ; + } +break ; + +case 3 : +if (ansi_buf[i] >='0' && ansi_buf[i] <='9' ) { + num1 *=10 ; + num1 += ansi_buf[i]-'0' ; + }else { + --i; + next =4 ; + } +break ; + +case 4 : +if (ansi_buf[i] !=';' ) { + --i; + next =7 ; + }else + next =5 ; +break ; + +case 5 : +if (ansi_buf[i] >='0' && ansi_buf[i] <='9' ) { + num2 = ansi_buf[i]-'0' ; + next =6 ; + }else + fail =1 ; +break ; + +case 6 : +if (ansi_buf[i] >='0' && ansi_buf[i] <='9' ) { + num2 *=10 ; + num2 += ansi_buf[i]-'0' ; + }else { + --i; + next =7 ; + } +break ; + +case 7 : +if ((ansi_buf[i] >='A' && ansi_buf[i] <='H' ) + || ansi_buf[i] =='J' + || ansi_buf[i] =='K' + || ansi_buf[i] =='m' ) { + cchar = ansi_buf[i]; + flush =1 ; + }else + fail =1 ; +break ; + } + } + +if (fail) { +for (i =0 ; i < ansi_buf_size; ++i) +parse_putc (ansi_buf[i]); + ansi_buf_size =0 ; +return ; + } + +if (flush) { +CURSOR_OFF ; + ansi_buf_size =0 ; +switch (cchar) { +case 'A' : +/* move cursor num1 rows up */ +console_cursor_up (num1); +break ; +case 'B' : +/* move cursor num1 rows down */ +console_cursor_down (num1); +break ; +case 'C' : +/* move cursor num1 columns forward */ +console_cursor_right (num1); +break ; +case 'D' : +/* move cursor num1 columns back */ +console_cursor_left (num1); +break ; +case 'E' : +/* move cursor num1 rows up at begin of row */ +console_previewsline (num1); +break ; +case 'F' : +/* move cursor num1 rows down@begin of row */ +console_newline (num1); +break ; +case 'G' : +/* move cursor to column num1 */ +console_cursor_set_position (-1 , num1-1 ); +break ; +case 'H' : +/* move cursor to row num1, column num2 */ +console_cursor_set_position (num1-1 , num2-1 ); +break ; +case 'J' : +/* clear console and move cursor to 0, 0 */ +console_clear (); +console_cursor_set_position (0 ,0 ); +break ; +case 'K' : +/* clear line */ +if (num1 ==0 ) +console_clear_line (console_row, + console_col, +CONSOLE_COLS -1 ); +else if (num1 ==1 ) +console_clear_line (console_row, +0 , console_col); +else +console_clear_line (console_row, +0 ,CONSOLE_COLS -1 ); +break ; +case 'm' : +if (num1 ==0 ) {/* reset swapped colors */ +if (ansi_colors_need_revert) { +console_swap_colors (); + ansi_colors_need_revert =0 ; + } + }else if (num1 ==7 ) {/* once swap colors */ +if (!ansi_colors_need_revert) { +console_swap_colors (); + ansi_colors_need_revert =1 ; + } + } +break ; + } +CURSOR_SET ; + } + }else { +parse_putc (c); + } +#else +parse_putc (c); +#endif +} +void video_puts (const char *s) {int count =strlen (s);
Signature · 1 line
1.7.5.4
PATCH 10/15 New command clear: Clear the ANSI terminal
In reply to Pali Rohár * Command can be enabled by CONFIG_CMD_CLEAR
--- common/Makefile | 1 + common/cmd_clear.c | 42 ++++++++++++++++++++++++++++++++++++++++++ include/config_cmd_all.h | 1 + 3 files changed, 44 insertions(+), 0 deletions(-) create mode 100644 common/cmd_clear.c
common/Makefile +1 -0
@@ -69,6 +69,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_CACHE) += cmd_cache.o +COBJS-$(CONFIG_CMD_CLEAR) += cmd_clear.o COBJS-$(CONFIG_CMD_CONSOLE) += cmd_console.o COBJS-$(CONFIG_CMD_CPLBINFO) += cmd_cplbinfo.o COBJS-$(CONFIG_DATAFLASH_MMC_SELECT) += cmd_dataflash_mmc_mux.o
common/cmd_clear.c new file +42 -0
42 lines not on this page · raw message
include/config_cmd_all.h +1 -0
@@ -23,6 +23,7 @@#define CONFIG_CMD_BSP /* Board Specific functions */ #define CONFIG_CMD_CACHE /* icache, dcache */ #define CONFIG_CMD_CDP /* Cisco Discovery Protocol */ +#define CONFIG_CMD_CLEAR /* ANSI clear screen command */ #define CONFIG_CMD_CONSOLE /* coninfo */ #define CONFIG_CMD_DATE /* support for RTC, date/time...*/ #define CONFIG_CMD_DHCP /* DHCP Support */
Signature · 1 line
1.7.5.4
PATCH 11/15 New config variable CONFIG_MENUCMD
In reply to Pali Rohár * If not defined CONFIG_MENUCMD do nothing
* If CONFIG_MENUKEY is 0 and was pressed any key run env "menu_cmd"
* If pressed key was CONFIG_MENUKEY run env "menu_cmd"
* If CONFIG_MENUKEY is not defined run env "menu_cmd" always
* CONFIG_MENUKEY working if defined CONFIG_MENUCMD and CONFIG_BOOTDELAY >= 0
--- common/main.c | 34 +++++++++++++++++++++++----------- 1 files changed, 23 insertions(+), 11 deletions(-)
common/main.c +23 -11
@@ -82,6 +82,20 @@ int do_mdm_init = 0;extern void mdm_init (void );/* defined in board.c */ #endif +#if defined(CONFIG_MENUKEY ) && !defined(CONFIG_MENUCMD ) && \ +(!defined(CONFIG_BOOTDELAY ) ||CONFIG_BOOTDELAY <0 ) +#error CONFIG_MENUKEY defined, but not CONFIG_MENUCMD or CONFIG_BOOTDELAY >= 0 +#error define CONFIG_MENUCMD and CONFIG_BOOTDELAY too +#endif + +#ifdef CONFIG_MENUCMD +# ifdef CONFIG_MENUKEY +static int menucmd; +# else +static int menucmd =1 ; +# endif +#endif +/*************************************************************************** * Watch for 'delay' seconds for autoboot stop or autoboot delay string. * returns: 0 - no key string, allow autoboot 1 - got key string, abort
@@ -201,10 +215,6 @@ int abortboot(int bootdelay)# else /* !defined(CONFIG_AUTOBOOT_KEYED) */ -#ifdef CONFIG_MENUKEY -static int menukey =0 ; -#endif -#ifndef CONFIG_MENU static inline#endif
@@ -241,8 +251,10 @@ int abortboot(int bootdelay)if (tstc ()) {/* we got a key press */ abort =1 ;/* don't auto boot */ bootdelay =0 ;/* no more delay */ -# ifdef CONFIG_MENUKEY - menukey =getc (); +# if defined(CONFIG_MENUCMD ) && defined(CONFIG_MENUKEY ) +if (CONFIG_MENUKEY ==0 || +CONFIG_MENUKEY ==getc ()) + menucmd =1 ;# else (void )getc ();/* consume input */ # endif
@@ -292,6 +304,7 @@ int run_command2(const char *cmd, int flag)void main_loop (void ) { +char *s;#ifndef CONFIG_SYS_HUSH_PARSER static char lastcommand[CONFIG_SYS_CBSIZE ] = {0 , };int len;
@@ -300,7 +313,6 @@ void main_loop (void)#endif #if defined(CONFIG_BOOTDELAY ) && (CONFIG_BOOTDELAY >=0 ) -char *s;int bootdelay;#endif #ifdef CONFIG_PREBOOT
@@ -405,15 +417,15 @@ void main_loop (void)disable_ctrlc (prev);/* restore Control C checking */ # endif } +#endif /* CONFIG_BOOTDELAY */ -# ifdef CONFIG_MENUKEY -if (menukey ==CONFIG_MENUKEY ) { +#ifdef CONFIG_MENUCMD +if (menucmd ==1 ) { s =getenv ("menucmd" );if (s)run_command2 (s,0 ); } -#endif /* CONFIG_MENUKEY */ -#endif /* CONFIG_BOOTDELAY */ +#endif /* * Main Loop for Monitor Command Processing
Signature · 1 line
1.7.5.4
PATCH 12/15 New config variable CONFIG_PREMONITOR
In reply to Pali Rohár* if defined run env "premonitor" before Main Loop for Monitor Processing
--- common/env_common.c | 3 +++ common/main.c | 4 ++++ 2 files changed, 7 insertions(+), 0 deletions(-)
common/env_common.c +3 -0
@@ -92,6 +92,9 @@ const uchar default_environment[] = {#ifdef CONFIG_PREBOOT "preboot=" CONFIG_PREBOOT "\0"#endif +#ifdef CONFIG_PREMONITOR + "premonitor=" CONFIG_PREMONITOR "\0" +#endif #ifdef CONFIG_ROOTPATH "rootpath=" CONFIG_ROOTPATH "\0"#endif
common/main.c +4 -0
@@ -427,6 +427,10 @@ void main_loop (void) }#endif + s =getenv ("premonitor" ); +if (s) +run_command2 (s,0 ); +/* * Main Loop for Monitor Command Processing */
Signature · 1 line
1.7.5.4
PATCH 13/15 New board support: Nokia RX-51 aka N900
In reply to Pali RohárThis board definition results in a u-boot.bin which can be chainloaded from NOLO in qemu or on a real N900. It does very little hardware config because NOLO has already configured the board. Only needed is enabling internal eMMC memory via twl4030 regulator which is not enabled by NOLO.
NOLO is expecting a kernel image and will treat any image it finds in onenand as such. This u-boot is intended to be flashed to the N900 like a kernel. In order to transparently boot the original kernel, it will be appended to u-boot.bin at 0x40000. NOLO will load the entire image into memory and execute u-boot, which saves the ATAGs set by NOLO. Then the bootscripts will attempt to load uImage or boot.scr from a fat or ext2 filesystem in external SD card or internal eMMC memory. If this fails or keyboard is closed the appended kernel image will be booted using the stored ATAGs (see boot order).
There is support for hardware watchdog. It is started by NOLO so u-boot must kick watchdog to prevent reboot device (but not very often, max every 2 seconds). There is also support for framebuffer display output with ANSI espace codes and the N900 HW keyboard input. USB tty works but is disabled because it prevents the current Maemo kernel from booting.
Based on previous work by: Alistair Buxton <[email protected]>
Default boot order:
* 0. if keyboard is closed boot automatically NOLO kernel image
* 1. try boot from external SD card
* 2. try boot from internal eMMC memory
* 3. try boot from attached NOLO kernel image
Boot from SD or eMMC in this order:
* find boot.scr on first fat partition
* find uImage on first fat parition
* same order for 2. - 4. fat partition
* find boot.scr on first ext2 partition
* find uImage on first ext2 parition
* same order for 2. - 4. ext2 partition
Available additional commands/variables:
* run sercon - Use serial port for control
* run usbcon - Use usbtty for control
* run vgacon - Use framebuffer and HW keyboard for control (default)
* run emmcboot - Boot from external SD card (see boot order)
* run immcboot - Boot from internal eMMC memory (see boot order)
* run noloboot - Boot NOLO kernel image (attached to U-Boot binary)
* run scriptload - Load boot script: mmc ${mmcnum} (0 - external, 1 - internal), partition number ${mmcpart} (1 - 4), parition type ${mmctype} (fat, ext2), file name ${mmcfile}
* run scriptboot - Run loaded boot script (see scriptload)
* run uimageload - Load kernel image: mmc ${mmcnum} (0 - external, 1 - internal), partition number ${mmcpart} (1 - 4), parition type ${mmctype} (fat, ext2), file name ${mmcfile}
* run uimageboot - Boot kernel image (see uimageload)
--- board/nokia/rx51/Makefile | 44 +++++ board/nokia/rx51/rx51.c | 433 ++++++++++++++++++++++++++++++++++++++++++ board/nokia/rx51/rx51.h | 375 ++++++++++++++++++++++++++++++++++++ boards.cfg | 1 + include/configs/nokia_rx51.h | 320 +++++++++++++++++++++++++++++++ 5 files changed, 1173 insertions(+), 0 deletions(-) create mode 100644 board/nokia/rx51/Makefile create mode 100644 board/nokia/rx51/rx51.c create mode 100644 board/nokia/rx51/rx51.h create mode 100644 include/configs/nokia_rx51.h
board/nokia/rx51/Makefile new file +44 -0
@@ -0,0 +1,44 @@ +# +# (C) Copyright 2000, 2001, 2002 +# Wolfgang Denk, DENX Software Engineering, wd at 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 +# + +include $(TOPDIR)/config.mk + +LIB = $(obj)lib$(BOARD).o + +COBJS-y := $(BOARD).o + +COBJS := $(sort $(COBJS-y)) +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 + +#########################################################################
board/nokia/rx51/rx51.c new file +433 -0
433 lines not on this page · raw message
board/nokia/rx51/rx51.h new file +375 -0
375 lines not on this page · raw message
boards.cfg +1 -0
@@ -210,6 +210,7 @@ omap3_evm_quick_mmc arm armv7 evm ti omap3_evm_quick_nand arm armv7 evm ti omap3 omap3_sdp3430 arm armv7 sdp3430 ti omap3 devkit8000 arm armv7 devkit8000 timll omap3 +nokia_rx51 arm armv7 rx51 nokia omap3 omap4_panda arm armv7 panda ti omap4 omap4_sdp4430 arm armv7 sdp4430 ti omap4 omap5_evm arm armv7 omap5_evm ti omap5
include/configs/nokia_rx51.h new file +320 -0
320 lines not on this page · raw message
Signature · 1 line
1.7.5.4
PATCH 13/15 New board support: Nokia RX-51 aka N900
Quoted 4 lines · Pali Roh?r
This board definition results in a u-boot.bin which can be chainloaded from NOLO in qemu or on a real N900. It does very little hardware config because NOLO has already configured the board. Only needed is enabling internal eMMC memory via twl4030 regulator which is not enabled by NOLO.
[snip]
board/nokia/rx51/rx51.c
Quoted 7 lines
board/nokia/rx51/rx51.c new file +7
-0+/* +* Routine: save_boot_params (called after reset from start.S) +* Description: Save atag address and attached kernel address. +* ? ? ? ? ? ? ?Move u-boot to address CONFIG_SYS_TEXT_BASE +*/ +asm( +"startaddr:\n" ? ? ? ? /* address where should be u-boot after relocation */
Please put this into its own .S file so it's more readable, thanks.
[snip]
include/configs/nokia_rx51.h
Quoted 5 lines
include/configs/nokia_rx51.h new file +5
-0+/* +* High Level Configuration Options +*/ + +#define CONFIG_ARMV7 ? ? ? ? ? ? ? ? ?/* This is an ARM V7 CPU core */
This isn't used.
Quoted 1 line
+#define
CONFIG_L2_OFF? ? ? ? ? ? ? ? ?/* kernel won't boot if l2 enabled */
This isn't correct for disabling L2 now and doesn't do anything. So L2 is probably enabled :)
[snip]
include/configs/nokia_rx51.h line 113
Quoted 2 lines
include/configs/nokia_rx51.h new file +2
-0+/* DDR - I use Micron DDR */ +#define CONFIG_OMAP3_MICRON_DDR
No you don't :) This can go away.
[snip]
include/configs/nokia_rx51.h line 296
Quoted 4 lines
include/configs/nokia_rx51.h new file +4
-0+#ifdef CONFIG_USE_IRQ +#define CONFIG_STACKSIZE_IRQ ? ? ? ? ? (4 << 10) ? ? ?/* IRQ stack 4 KiB */ +#define CONFIG_STACKSIZE_FIQ ? ? ? ? ? (4 << 10) ? ? ?/* FIQ stack 4 KiB */ +#endif
We just removed all of these from other config files.
include/configs/nokia_rx51.h
Quoted 9 lines
include/configs/nokia_rx51.h new file +9
-0+/*----------------------------------------------------------------------- +* Physical Memory Map +*/ +#define CONFIG_NR_DRAM_BANKS ? ? ? ? ? 2/* CS1 may or may not be populated */ +#define PHYS_SDRAM_1 ? ? ? ? ? ? ? ? ? OMAP34XX_SDRC_CS0 +#define PHYS_SDRAM_2 ? ? ? ? ? ? ? ? ? OMAP34XX_SDRC_CS1 + +/* SDRAM Bank Allocation method */ +#define SDRC_R_B_C ? ? ? ? ? ? ? ? ? ? 1
And I'm not sure if any of these are really needed now.
Thanks.
Signature · 1 line
Tom
PATCH 13/15 New board support: Nokia RX-51 aka N900
Quoted 8 lines · On Tuesday 03 January 2012 09:05:17 Tom Rini wrote:
Quoted 4 lines · Pali Roh?r
This board definition results in a u-boot.bin which can be chainloaded from NOLO in qemu or on a real N900. It does very little hardware config because NOLO has already configured the board. Only needed is enabling internal eMMC memory via twl4030 regulator which is not enabled by NOLO.
[snip]
Quoted 10 lines
Quoted 8 lines
board/nokia/rx51/rx51.c new file +7
-0+/* +* Routine: save_boot_params (called after reset from start.S) +* Description: Save atag address and attached kernel address. +* Move u-boot to address CONFIG_SYS_TEXT_BASE +*/ +asm( +"startaddr:\n" /* address where should be u-boot after relocation */
Please put this into its own .S file so it's more readable, thanks.
Ok. I will put it into board/nokia/rx51/rx51.S
Quoted 10 lines
[snip]
include/configs/nokia_rx51.h line 42
Quoted 5 lines
include/configs/nokia_rx51.h new file +5
-0+/* +* High Level Configuration Options +*/ + +#define CONFIG_ARMV7 /* This is an ARM V7 CPU core */ This isn't used.
Quoted 4 lines
Quoted 2 lines
+#define
CONFIG_L2_OFF/* kernel won't boot if l2 enabled
*/This isn't correct for disabling L2 now and doesn't do anything. So L2 is probably enabled :)
and #define CONFIG_SYS_L2CACHE_OFF is correct?
Quoted 8 lines
[snip]
include/configs/nokia_rx51.h line 113
Quoted 2 lines
include/configs/nokia_rx51.h new file +2
-0+/* DDR - I use Micron DDR */ +#define CONFIG_OMAP3_MICRON_DDR No you don't :) This can go away.
ok, deleted.
Quoted 9 lines
[snip]
Quoted 4 lines
(quoted diff) +2
-0+#ifdef CONFIG_USE_IRQ +#define CONFIG_STACKSIZE_IRQ (4 << 10) /* IRQ stack 4 KiB*/ +#define
CONFIG_STACKSIZE_FIQ(4 << 10) /* FIQ stack 4
KiB */ +#endifWe just removed all of these from other config files.
deleted too.
Quoted 12 lines
include/configs/nokia_rx51.h line 306
Quoted 9 lines
include/configs/nokia_rx51.h new file +4
-0+/*----------------------------------------------------------------------- +* Physical Memory Map +*/ +#define CONFIG_NR_DRAM_BANKS 2/* CS1 may or may not be populated */ +#define
PHYS_SDRAM_1OMAP34XX_SDRC_CS0include/configs/nokia_rx51.h new file +4
-0+#define PHYS_SDRAM_2 OMAP34XX_SDRC_CS1 + +/* SDRAM Bank Allocation method */ +#define SDRC_R_B_C 1And I'm not sure if any of these are really needed now.
When I deleted this code, I cannot compile U-Boot. Here is error message:include/asm/u-boot.h:48:17: error: ?CONFIG_NR_DRAM_BANKS? undeclared here (not in a function)
So this code is needed.
Quoted 1 line
Thanks.
Signature · 9 lines
Pali Roh?r pali.rohar at gmail.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 198 bytes Desc: This is a digitally signed message part. URL: <http://lists.denx.de/pipermail/u-boot/attachments/20120110/56576840/attachment.pgp>
PATCH 13/15 New board support: Nokia RX-51 aka N900
Quoted 6 lines · Pali Roh?r
Quoted 5 lines · On Tuesday 03 January 2012 09:05:17 Tom Rini wrote:
Quoted 4 lines · Pali Roh?r
This board definition results in a u-boot.bin which can be chainloaded from NOLO in qemu or on a real N900. It does very little hardware config because NOLO has already configured the board. Only needed is enabling internal eMMC memory via twl4030 regulator which is not enabled by NOLO.
[snip]
Quoted 10 lines
Quoted 10 lines
[snip]
include/configs/nokia_rx51.h
Quoted 5 lines
include/configs/nokia_rx51.h new file +5
-0+/* +* High Level Configuration Options +*/ + +#define CONFIG_ARMV7 ? ? ? ? ? ? ? ? ?/* This is an ARM V7 CPU core */ This isn't used.
Quoted 6 lines
Quoted 4 lines
Quoted 2 lines
+#define
CONFIG_L2_OFF? ? ? ? ? ? ? ? ?/* kernel won't boot if l2 enabled */This isn't correct for disabling L2 now and doesn't do anything. ?So L2 is probably enabled :)
and #define
CONFIG_SYS_L2CACHE_OFFis correct?
Yes.
[snip]
Quoted 13 lines
Quoted 12 lines
include/configs/nokia_rx51.h
Quoted 9 lines
include/configs/nokia_rx51.h new file +4
-0+/*----------------------------------------------------------------------- +* Physical Memory Map +*/ +#define CONFIG_NR_DRAM_BANKS ? ? ? ? ? 2/* CS1 may or may not be populated */ +#define
PHYS_SDRAM_1? ? ? ? ? ? ? ? ?OMAP34XX_SDRC_CS0include/configs/nokia_rx51.h new file +4
-0+#define PHYS_SDRAM_2 ? ? ? ? ? ? ? ? ? OMAP34XX_SDRC_CS1 + +/* SDRAM Bank Allocation method */ +#define SDRC_R_B_C ? ? ? ? ? ? ? ? ? ? 1And I'm not sure if any of these are really needed now.
Quoted 3 lines
When I deleted this code, I cannot compile U-Boot. Here is error message:
include/asm/u-boot.h:48:17: error: ?CONFIG_NR_DRAM_BANKS? undeclared here (not in a function)
I just meant the SDRC_R_B_C part, sorry.
Signature · 1 line
Tom
PATCH 14/15 New command bootmenu: ANSI terminal Boot Menu support
In reply to Pali Rohár * Configuration is done via env variables bootmenu_delay and bootmenu_<num>:
bootmenu_delay=<delay>
bootmenu_<num>="<title>=<commands>"
(title and commands are separated by first char '=')
<delay> is delay in seconds of autobooting first entry
<num> is boot menu entry, starting from zero
<title> is text shown in boot screen
<commands> are commands which will be executed when menu entry is selected
* First argument of bootmenu command override bootmenu_delay env
* If env bootmenu_delay or bootmenu arg is not specified, delay is 10 seconds
* If delay is 0, no entry will be shown on screen and first will be called
* If delay is less then 0, no autoboot delay will be used
* Boot Menu will stop finding next menu entry if last was not defined
* Boot Menu always add menu entry "U-Boot console" at end of all entries
* Example using:
setenv bootmenu_0 Boot 1. kernel=bootm 0x82000000 # Set first menu entry
setenv bootmenu_1 Boot 2. kernel=bootm 0x83000000 # Set second menu entry
setenv bootmenu_2 Reset board=reset # Set third menu entry
setenv bootmenu_3 U-Boot boot order=boot # Set fourth menu entry setenv bootmenu_4 # Empty string is end of all bootmenu entries
bootmenu 20 # Run bootmenu with autoboot delay 20s
--- common/Makefile | 1 + common/cmd_bootmenu.c | 366 ++++++++++++++++++++++++++++++++++++++++++++++ include/config_cmd_all.h | 1 + 3 files changed, 368 insertions(+), 0 deletions(-) create mode 100644 common/cmd_bootmenu.c
common/Makefile +1 -0
@@ -67,6 +67,7 @@ COBJS-$(CONFIG_CMD_SOURCE) += cmd_source.o COBJS-$(CONFIG_CMD_BDI) += cmd_bdinfo.o COBJS-$(CONFIG_CMD_BEDBUG) += bedbug.o cmd_bedbug.o COBJS-$(CONFIG_CMD_BMP) += cmd_bmp.o +COBJS-$(CONFIG_CMD_BOOTMENU) += cmd_bootmenu.o COBJS-$(CONFIG_CMD_BOOTLDR) += cmd_bootldr.o COBJS-$(CONFIG_CMD_CACHE) += cmd_cache.o COBJS-$(CONFIG_CMD_CLEAR) += cmd_clear.o
common/cmd_bootmenu.c new file +366 -0
366 lines not on this page · raw message
include/config_cmd_all.h +1 -0
@@ -20,6 +20,7 @@#define CONFIG_CMD_BEDBUG /* Include BedBug Debugger */ #define CONFIG_CMD_BMP /* BMP support */ #define CONFIG_CMD_BOOTD /* bootd */ +#define CONFIG_CMD_BOOTMENU /* ANSI terminal Boot Menu */ #define CONFIG_CMD_BSP /* Board Specific functions */ #define CONFIG_CMD_CACHE /* icache, dcache */ #define CONFIG_CMD_CDP /* Cisco Discovery Protocol */
Signature · 1 line
1.7.5.4
PATCH 15/15 RX-51: Add support for bootmenu
In reply to Pali Rohár * default bootmenu entries:
NOLO kernel, internal eMMC memory, external SD card, u-boot boot order
* when keyboard slide is closed always boot NOLO kernel
* when keyborad slide is open in CONFIG_PREBOOT try load bootmenu.scr from first FAT partition of internal eMMC memory (also known as MyDocs) which (should) overwrite default bootmenu entries
--- include/configs/nokia_rx51.h | 22 ++++++++++++++++++---- 1 files changed, 18 insertions(+), 4 deletions(-)
include/configs/nokia_rx51.h +18 -4
@@ -134,6 +134,7 @@#define CONFIG_CMD_MMC /* MMC support */ #undef CONFIG_CMD_ONENAND/* NAND support */ +#define CONFIG_CMD_BOOTMENU /* ANSI terminal Boot Menu */ #define CONFIG_CMD_CLEAR /* ANSI terminal clear screen command */ #undef CONFIG_CMD_FLASH/* flinfo, erase, protect */
@@ -185,8 +186,6 @@ int rx51_kp_getc(void);#endif /* Environment information */ -#define CONFIG_BOOTDELAY 3 -#define CONFIG_EXTRA_ENV_SETTINGS \ "usbtty=cdc_acm\0" \ "stdin=vga\0" \
@@ -232,10 +231,22 @@ int rx51_kp_getc(void);"fi;" \"fi\0" \"immcboot=setenv mmcnum 1; run trymmcboot\0" \ - "emmcboot=setenv mmcnum 0; run trymmcboot\0" +"emmcboot=setenv mmcnum 0; run trymmcboot\0" \ +"menucmd=bootmenu\0" \ +"bootmenu_0=Internal flash=run noloboot\0" \ +"bootmenu_1=Internal eMMC=run immcboot\0" \ +"bootmenu_2=External SD card=run emmcboot\0" \ +"bootmenu_3=U-Boot boot order=boot\0" \ + "bootmenu_delay=3\0"#define CONFIG_PREBOOT \ - "if test $slide_sw != open; then run noloboot; fi;" + "if test $slide_sw = open; then " \ + "setenv mmcnum 1; setenv mmcpart 1; setenv mmctype fat;" \ + "setenv mmcfile bootmenu.scr;" \ + "run trymmcscript;" \ + "else " \ + "setenv bootmenu_delay 0;" \ + "fi"#define CONFIG_PREMONITOR \ "echo Extra commands:;" \
@@ -253,7 +264,10 @@ int rx51_kp_getc(void);"run noloboot;" \ "echo" +#define CONFIG_MENUCMD +#define CONFIG_AUTO_COMPLETE +/* * Miscellaneous configurable options */
Signature · 1 line
1.7.5.4
PATCH 15/15 RX-51: Add support for bootmenu
Quoted 10 lines · Pali Roh?r
?* default bootmenu entries:
? NOLO kernel, internal eMMC memory, external SD card, u-boot boot order?* when keyboard slide is closed always boot NOLO kernel
?* when keyborad slide is open in
CONFIG_PREBOOTtry load bootmenu.scr from ? first FAT partition of internal eMMC memory (also known as MyDocs) which ? (should) overwrite default bootmenu entriesSigned-off-by Pali Roh?r <[email protected]>
Signature · 1 line
Tom
PATCH v3 1/1 U-Boot on Nokia RX-51 (aka N900)
In reply to Pali RohárDear Pali =?ISO-8859-1?Q?Roh=E1r?=,
Quoted 6 lines · In message <1778406.ezGto4lKnu@pali-elitebook> you wrote:
I'm sending third version of rx51 patches for u-boot. All patches was checked by checkpatch.pl and no error or warning was appeared. Last 2 patches (0014 and 0015) adding ANSI terminal bootmenu support for rx51 and can be reviewed separatly (patches 0001-0013 adding nokia rx51 board support and working without that last two).
It seems you did not bother to read
http://www.denx.de/wiki/view/U-Boot/Patches#Sending_updated_patch_versions
I do not have the time to try to find out what you might have changed compared top your previous submission, and others are in the same situation.
Why did you not provide any change logs?
Best regards,
Wolfgang Denk
Signature · 5 lines
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: wd at denx.de To live is always desirable. -- Eleen the Capellan, "Friday's Child", stardate 3498.9
PATCH v3 1/1 U-Boot on Nokia RX-51 (aka N900)
Quoted 16 lines · On Monday 19 December 2011 00:57:27 Wolfgang Denk wrote:
Dear Pali =?ISO-8859-1?Q?Roh=E1r?=,
Quoted 5 lines · In message <1778406.ezGto4lKnu@pali-elitebook> you wrote:
I'm sending third version of rx51 patches for u-boot. All patches was checked by checkpatch.pl and no error or warning was appeared. Last 2 patches (0014 and 0015) adding ANSI terminal bootmenu support for rx51 and can be reviewed separatly (patches 0001-0013 adding nokia rx51 board support and working without that last two).
It seems you did not bother to read
http://www.denx.de/wiki/view/U-Boot/Patches#Sending_updated_patch_versionsI do not have the time to try to find out what you might have changed compared top your previous submission, and others are in the same situation.
Quoted 7 lines
Why did you not provide any change logs?
Best regards,
Wolfgang Denk
Here is changelog v2:v3
* fixed all problems detected by checkpatch.pl
* wrapped long commit messages
* in arch/arm/lib/bootm.c added local define CONFIG_SETUP_ANY_TAG
* Patch "cfb_console.c: Add function console_swap_colors" squashed into "cfb_console.c: Add support for ANSI terminal"
* renamed command clr to clear; use puts instead printf; move cursor to pos1,1
* removed check #ifdef CONFIG_PREMONITOR in main.c
* rx51 board code: removed Makefile targets: clean and distclean
* ansi bootmenu command: use puts instead printf
Signature · 9 lines
Pali Roh?r pali.rohar at gmail.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 198 bytes Desc: This is a digitally signed message part. URL: <http://lists.denx.de/pipermail/u-boot/attachments/20111219/186faa6e/attachment.pgp>
PATCH v3 1/1 U-Boot on Nokia RX-51 (aka N900)
Hi Pali,
Quoted 27 lines · Pali Roh?r
Quoted 16 lines · On Monday 19 December 2011 00:57:27 Wolfgang Denk wrote:
Dear Pali =?ISO-8859-1?Q?Roh=E1r?=,
Quoted 5 lines · In message <1778406.ezGto4lKnu@pali-elitebook> you wrote:
I'm sending third version of rx51 patches for u-boot. All patches was checked by checkpatch.pl and no error or warning was appeared. Last 2 patches (0014 and 0015) adding ANSI terminal bootmenu support for rx51 and can be reviewed separatly (patches 0001-0013 adding nokia rx51 board support and working without that last two).
It seems you did not bother to read
http://www.denx.de/wiki/view/U-Boot/Patches#Sending_updated_patch_versionsI do not have the time to try to find out what you might have changed compared top your previous submission, and others are in the same situation.
Quoted 7 lines
Why did you not provide any change logs?
Best regards,
Wolfgang Denk
Here is changelog v2:v3
Quoted 9 lines
* fixed all problems detected by checkpatch.pl
* wrapped long commit messages
* inarch/arm/lib/bootm.cadded local defineCONFIG_SETUP_ANY_TAG
* Patch "cfb_console.c: Add functionconsole_swap_colors" squashed into "cfb_console.c: Add support for ANSI terminal"
* renamed command clr to clear; use puts instead printf; move cursor to pos1,1
* removed check #ifdefCONFIG_PREMONITORinmain.c
* rx51 board code: removedMakefiletargets: clean and distclean
* ansi bootmenu command: use puts instead printf
So which patches have changed? What changes apply to which patch?
Before posting any more updates, please read:
http://www.denx.de/wiki/view/U-Boot/Patches
_completely_
In particular:
- Set the in-reply-to email header of the new version of _each_ _individual_ patch the the message-id: of the previous version of that _individual_ patch
- Add v1/v2/v3 to the subject line of the updated version of _each_ _individual_ patch (i.e. [PATCH v2 06/15] ......) - You do not need to post an new version of any patches which have no changes (you can if you want to keep the version numbers the same across the whole series, but make sure you put 'no changes' in the changelog)
- Include the changelog for all previous version of _each_ _individual_ patch on the new version of _each_ _individual_ patch - DO NOT put the changelog in patch 0
- Use git format-patch and git send-email - git format-patch creates a ready-to-send email - All you need to do is add the 'in-reply-to' email header and chagelog and then do a git-send-email
We are fairly tolerant of honest mistakes (thankfully, because I've made my fair share) but we tend to draw the line at mistakes that could have been avoided with a little prior reading (particularly if said reading was explicitly pointed out)
I suggest you create a 'v4' patchset after reading up on exactly how to submit revised patches
Regards,
Graeme