public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Wolfgang Denk <wd@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] Help: U-Boot on Nokia RX-51 (aka N900)
Date: Thu, 01 Sep 2011 13:53:42 +0200	[thread overview]
Message-ID: <20110901115342.157BD166C886@gemini.denx.de> (raw)
In-Reply-To: <34603899.3xsChgV26D@pali-elitebook>

Dear Pali =?ISO-8859-1?Q?Roh=E1r?=,

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

> From: Alistair Buxton <a.j.buxton@gmail.com>
> 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.


> From: Alistair Buxton <a.j.buxton@gmail.com>
> 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.

...
> From: Alistair Buxton <a.j.buxton@gmail.com>
> Date: Mon, 6 Sep 2010 03:01:34 +0100
> Subject: [PATCH 03/15] Nokia RX-51 aka N900 support
>
> 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.

As mentioned before, this is normal in a SPL context.

> --- /dev/null
> +++ b/board/nokia/rx51/config.mk

Please get rid of board specific config.mk files.

> +TEXT_BASE 0x80e80000

This is wrong and needs to be fixed anyway.


> +int board_init(void)
> +{
> +	DECLARE_GLOBAL_DATA_PTR;

This cannot work..  The compiler miscompiles this. This declaration
MUST be done at file scope.

> +		/* 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 */
> +		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.

...
> diff --git a/include/configs/nokia_rx51.h b/include/configs/nokia_rx51.h
> new file mode 100644
> index 0000000..45b942a
> --- /dev/null
> +++ b/include/configs/nokia_rx51.h
...

> +#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.

...
> From c5c232a3669bed778c438db0280ea78273d17e25 Mon Sep 17 00:00:00 2001
> From: Matan Ziv-Av <matan@svgalib.org>
> 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(-)
>
> diff --git a/board/nokia/rx51/rx51.c b/board/nokia/rx51/rx51.c
> index 3149a79..347d08a 100644
> --- a/board/nokia/rx51/rx51.c
> +++ b/board/nokia/rx51/rx51.c
> @@ -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.

> From: Matan Ziv-Av <matan@svgalib.org>
> 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.

> ---
>  board/nokia/rx51/rx51.h |   20 ++++++++++----------
>  1 files changed, 10 insertions(+), 10 deletions(-)

> From: Matan Ziv-Av <matan@svgalib.org>
> 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.


> From: ?UTF-8?q?Pali Roh??r?<pali.rohar@gmail.com>
> 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.

> From: ?UTF-8?q?Pali Roh??r?<pali.rohar@gmail.com>
> 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_bit and __clear_bit to access twl4030 i2c bus only once at same time

Mind line length.  Please fix globally.


> +	__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>).

> @@ -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).

> From: ?UTF-8?q?Pali Roh??r?<pali.rohar@gmail.com>
> 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.


> From: ?UTF-8?q?Pali Roh??r?<pali.rohar@gmail.com>
> 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.

...
> From: ?UTF-8?q?Pali Roh??r?<pali.rohar@gmail.com>
> 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.

> +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.

...
> +				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.


> From: =?UTF-8?q?Pali=20Roh=C3=A1r?= <pali.rohar@gmail.com>
> 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_delay and bootmenu_<num>:

Please check if you can rather use Jason Hobbs' "Add generic, reusable
menu code" patch series.

...
> From: ?UTF-8?q?Pali Roh??r?<pali.rohar@gmail.com>
> Date: Wed, 31 Aug 2011 14:12:06 +0200
> Subject: [PATCH 14/15] New config variable CONFIG_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

-- 
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

  parent reply	other threads:[~2011-09-01 11:53 UTC|newest]

Thread overview: 111+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-01  8:42 [U-Boot] Help: U-Boot on Nokia RX-51 (aka N900) Pali Rohár
2011-09-01  8:46 ` Marek Vasut
2011-09-01  9:06   ` Pali Rohár
2011-09-01  9:39     ` Marek Vasut
2011-09-01  9:02 ` Stefano Babic
2011-09-01  9:09   ` Pali Rohár
2011-09-01  9:24     ` Stefano Babic
2011-09-01 10:49       ` Pali Rohár
2011-09-01 11:04         ` Marek Vasut
2011-09-01 11:34           ` [U-Boot] [PATCH 01/15] Make bootm optionally use pre-existing atags for Linux kernel boot Pali Rohár
2011-09-01 11:34             ` [U-Boot] [PATCH 02/15] Store existing atags at startup if chainloading Pali Rohár
2011-09-01 11:34             ` [U-Boot] [PATCH 03/15] Nokia RX-51 aka N900 support Pali Rohár
2011-09-01 13:57               ` Mike Frysinger
2011-10-09  0:20                 ` Pali Rohár
2011-10-09 15:59                   ` Mike Frysinger
2011-10-12 15:10                     ` Pali Rohár
2011-09-01 11:34             ` [U-Boot] [PATCH 04/15] Only delay boot if keyboard open Pali Rohár
2011-09-01 13:58               ` Mike Frysinger
2011-10-08 23:29                 ` Pali Rohár
2011-10-09 16:00                   ` Mike Frysinger
2011-09-01 11:34             ` [U-Boot] [PATCH 05/15] Change Wireless LAN mode from M4 to M0 Pali Rohár
2011-09-01 11:34             ` [U-Boot] [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' Pali Rohár
2011-09-01 11:34             ` [U-Boot] [PATCH 07/15] RX-51: Fixed compilation on top of master (changes from Beagle Board) Pali Rohár
2011-09-01 11:34             ` [U-Boot] [PATCH 08/15] RX-51: Add support for resetting twl4030 watchdog Pali Rohár
2011-09-01 11:34             ` [U-Boot] [PATCH 09/15] RX-51: Fix keymap Pali Rohár
2011-09-01 11:34             ` [U-Boot] [PATCH 10/15] include/common.h: Add some macros for ANSI escape codes Pali Rohár
2011-09-01 11:34             ` [U-Boot] [PATCH 11/15] drivers/video/cfb_console.c: Added support " Pali Rohár
2011-09-01 11:34             ` [U-Boot] [PATCH 12/15] New command bootmenu: ANSI terminal Boot Menu support Pali Rohár
2011-09-01 13:59               ` Mike Frysinger
2011-10-08 23:31                 ` Pali Rohár
2011-09-01 11:34             ` [U-Boot] [PATCH 13/15] New config variable CONFIG_MENU Pali Rohár
2011-09-01 11:34             ` [U-Boot] [PATCH 14/15] New config variable CONFIG_PREMONITOR Pali Rohár
2011-09-01 11:34             ` [U-Boot] [PATCH 15/15] RX-51: Add support for bootmenu Pali Rohár
2011-09-01 13:52             ` [U-Boot] [PATCH 01/15] Make bootm optionally use pre-existing atags for Linux kernel boot Mike Frysinger
2011-10-08 23:37               ` Pali Rohár
2011-09-01 11:53         ` Wolfgang Denk [this message]
2011-10-09  0:24           ` [U-Boot] Help: U-Boot on Nokia RX-51 (aka N900) Pali Rohár
2011-09-01 17:11 ` Pali Rohár
2011-12-17 16:59 ` [U-Boot] " Pali Rohár
2011-12-17 17:03   ` [U-Boot] [PATCH 01/16] arch/arm/cpu/armv7/omap3/lowlevel_init.S: save_boot_params Pali Rohár
2011-12-17 17:03     ` [U-Boot] [PATCH 02/16] arch/arm/lib/bootm.c: Optionally use existing atags Pali Rohár
2011-12-18 18:54       ` Mike Frysinger
2011-12-18 20:12         ` Pali Rohár
2011-12-17 17:03     ` [U-Boot] [PATCH 03/16] include/twl4030.h: Add power bus message definitions Pali Rohár
2011-12-17 17:03     ` [U-Boot] [PATCH 04/16] include/common.h: Add some ANSI escape codes definitions Pali Rohár
2011-12-17 17:03     ` [U-Boot] [PATCH 05/16] common/main.c: Fix function readline Pali Rohár
2011-12-18 18:58       ` Mike Frysinger
2011-12-18 20:12         ` Pali Rohár
2011-12-17 17:03     ` [U-Boot] [PATCH 06/16] drivers/video/cfb_console.c: Fix function console_scrollup Pali Rohár
2011-12-17 17:03     ` [U-Boot] [PATCH 07/16] drivers/video/cfb_console.c: Add function console_swap_colors Pali Rohár
2011-12-18 18:57       ` Mike Frysinger
2011-12-18 19:00         ` Pali Rohár
2011-12-18 20:06           ` Mike Frysinger
2011-12-17 17:03     ` [U-Boot] [PATCH 08/16] drivers/video/cfb_console.c: Add function console_clear and console_clear_line Pali Rohár
2011-12-18 19:00       ` Mike Frysinger
2011-12-17 17:03     ` [U-Boot] [PATCH 09/16] drivers/video/cfb_console.c: Add functions for moving with cursor Pali Rohár
2011-12-18 19:00       ` Mike Frysinger
2011-12-17 17:03     ` [U-Boot] [PATCH 10/16] drivers/video/cfb_console.c: Add support for some ANSI terminal escape codes Pali Rohár
2011-12-18 19:01       ` Mike Frysinger
2011-12-17 17:03     ` [U-Boot] [PATCH 11/16] New command clr: Clear the ANSI terminal Pali Rohár
2011-12-18 18:56       ` Mike Frysinger
2011-12-18 19:20         ` Pali Rohár
2011-12-18 20:07           ` Mike Frysinger
2011-12-17 17:03     ` [U-Boot] [PATCH 12/16] New config variable CONFIG_MENUCMD Pali Rohár
2011-12-17 17:03     ` [U-Boot] [PATCH 13/16] New config variable CONFIG_PREMONITOR Pali Rohár
2011-12-18 19:05       ` Mike Frysinger
2011-12-18 19:37         ` Pali Rohár
2011-12-18 20:08           ` Mike Frysinger
2011-12-18 20:14             ` Pali Rohár
2011-12-17 17:03     ` [U-Boot] [PATCH 14/16] New board support: Nokia RX-51 aka N900 Pali Rohár
2011-12-18 19:06       ` Mike Frysinger
2011-12-17 17:03     ` [U-Boot] [PATCH 15/16] New command bootmenu: ANSI terminal Boot Menu support Pali Rohár
2011-12-18 19:07       ` Mike Frysinger
2011-12-18 19:12         ` Pali Rohár
2011-12-18 20:07           ` Mike Frysinger
2011-12-18 20:16             ` Pali Rohár
2012-01-06  6:59               ` Mike Frysinger
2011-12-17 17:03     ` [U-Boot] [PATCH 16/16] RX-51: Add support for bootmenu Pali Rohár
2011-12-17 19:25   ` [U-Boot] U-Boot on Nokia RX-51 (aka N900) Wolfgang Denk
2011-12-18 10:13     ` Pali Rohár
2011-12-18 12:42       ` Wolfgang Denk
2011-12-18 19:01   ` Mike Frysinger
2011-12-18 20:10     ` Pali Rohár
2011-12-18 21:33   ` [U-Boot] [PATCH v3] " Pali Rohár
2011-12-18 21:33     ` [U-Boot] [PATCH 01/15] arch/arm/cpu/armv7/omap3/lowlevel_init.S: save_boot_params Pali Rohár
2011-12-18 21:33       ` [U-Boot] [PATCH 02/15] arch/arm/lib/bootm.c: Optionally use existing atags Pali Rohár
2011-12-18 21:33       ` [U-Boot] [PATCH 03/15] include/twl4030.h: Add power bus message definitions Pali Rohár
2011-12-18 21:34       ` [U-Boot] [PATCH 04/15] include/common.h: Add some ANSI escape codes definitions Pali Rohár
2011-12-18 21:34       ` [U-Boot] [PATCH 05/15] common/main.c: Fix function readline Pali Rohár
2012-01-06 20:15         ` Mike Frysinger
2012-01-07  8:51           ` Pali Rohár
2012-02-27  4:33             ` Mike Frysinger
2012-02-27 18:40               ` Pali Rohár
2012-02-27 20:20                 ` Mike Frysinger
2011-12-18 21:34       ` [U-Boot] [PATCH 06/15] drivers/video/cfb_console.c: Fix function console_scrollup Pali Rohár
2011-12-18 21:34       ` [U-Boot] [PATCH 07/15] drivers/video/cfb_console.c: Add function console_clear and console_clear_line Pali Rohár
2011-12-18 21:34       ` [U-Boot] [PATCH 08/15] drivers/video/cfb_console.c: Add functions for moving with cursor Pali Rohár
2011-12-18 21:34       ` [U-Boot] [PATCH 09/15] drivers/video/cfb_console.c: Add support for some ANSI terminal escape codes Pali Rohár
2011-12-18 21:34       ` [U-Boot] [PATCH 10/15] New command clear: Clear the ANSI terminal Pali Rohár
2011-12-18 21:34       ` [U-Boot] [PATCH 11/15] New config variable CONFIG_MENUCMD Pali Rohár
2011-12-18 21:34       ` [U-Boot] [PATCH 12/15] New config variable CONFIG_PREMONITOR Pali Rohár
2011-12-18 21:34       ` [U-Boot] [PATCH 13/15] New board support: Nokia RX-51 aka N900 Pali Rohár
2012-01-03 16:05         ` Tom Rini
2012-01-10 13:14           ` Pali Rohár
2012-01-10 14:53             ` Tom Rini
2011-12-18 21:34       ` [U-Boot] [PATCH 14/15] New command bootmenu: ANSI terminal Boot Menu support Pali Rohár
2011-12-18 21:34       ` [U-Boot] [PATCH 15/15] RX-51: Add support for bootmenu Pali Rohár
2012-01-03 16:06         ` Tom Rini
2011-12-18 23:57     ` [U-Boot] [PATCH v3] U-Boot on Nokia RX-51 (aka N900) Wolfgang Denk
2011-12-19  7:17       ` Pali Rohár
2011-12-19  8:43         ` Graeme Russ

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110901115342.157BD166C886@gemini.denx.de \
    --to=wd@denx.de \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox