All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] add support for Toradex Colibri PXA300 module
Date: Sat, 6 Dec 2008 18:11:04 +0100	[thread overview]
Message-ID: <20081206171104.GE2977@game.jcrosoft.org> (raw)
In-Reply-To: <20081129174251.GA26448@buzzloop.caiaq.de>

On 18:42 Sat 29 Nov     , Daniel Mack wrote:
> Hi,
> 
> this patch adds support for Toradex' "Colibri PXA300" module. I had to
> modify the AX88796 driver a bit to make it work, but that goes in a
> different patch.
> 
some general comment
please becarefull on the 80 chars limit
please check all the whitespace
please replace all hardcoded value with macro
> Also, the board code does not support NAND yet. I'll implement the code
> from Oliver Ford soon.
> 
> Signed-off-by: Daniel Mack <daniel@caiaq.de>
> 
> 
> diff --git a/MAKEALL b/MAKEALL
> index dbed268..868205f 100755
> --- a/MAKEALL
> +++ b/MAKEALL
> @@ -554,6 +554,7 @@ LIST_at91="		\
>  
>  LIST_pxa="		\
>  	cerf250		\
> +	colibri_pxa300	\
>  	cradle		\
>  	csb226		\
>  	delta		\
> diff --git a/Makefile b/Makefile
> index befb608..ee94d17 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -2804,6 +2804,9 @@ actux4_config	:	unconfig
>  cerf250_config :	unconfig
>  	@$(MKCONFIG) $(@:_config=) arm pxa cerf250
>  
> +colibri_pxa300_config:	unconfig
> +	@$(MKCONFIG) $(@:_config=) arm pxa colibri_pxa300
> +
>  cradle_config	:	unconfig
>  	@$(MKCONFIG) $(@:_config=) arm pxa cradle
>  
 +DECLARE_GLOBAL_DATA_PTR;
> +
> +/*
> + * Miscelaneous platform dependent initialisations
> + */
> +
> +int board_init (void)
> +{
> +	/* arch number for linux kernel */
> +	gd->bd->bi_arch_number = MACH_TYPE_COLIBRI300;
> +
> +	/* adress of boot parameters */
> +	gd->bd->bi_boot_params = 0xa0000100;
> +
> +	return 0;
> +}
> +
> +int board_late_init(void)
> +{
> +	setenv("stdout", "serial");
> +	setenv("stderr", "serial");
why do want to force it?
> +	return 0;
> +}
> +
> +int dram_init (void)
> +{
> +	gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
> +	gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE;
> +	gd->bd->bi_dram[1].start = PHYS_SDRAM_2;
> +	gd->bd->bi_dram[1].size = PHYS_SDRAM_2_SIZE;
> +	gd->bd->bi_dram[2].start = PHYS_SDRAM_3;
> +	gd->bd->bi_dram[2].size = PHYS_SDRAM_3_SIZE;
> +	gd->bd->bi_dram[3].start = PHYS_SDRAM_4;
> +	gd->bd->bi_dram[3].size = PHYS_SDRAM_4_SIZE;
> +	return 0;
is there anyway to detect it?
> +}
> diff --git a/board/colibri_pxa300/config.mk b/board/colibri_pxa300/config.mk
> new file mode 100644
> index 0000000..350ff3d
> --- /dev/null
> +++ b/board/colibri_pxa300/config.mk
> @@ -0,0 +1,2 @@
> +TEXT_BASE = 0x81000000
> +
> diff --git a/board/colibri_pxa300/lowlevel_init.S b/board/colibri_pxa300/lowlevel_init.S
> new file mode 100644
> index 0000000..23155ab
> --- /dev/null
> +++ b/board/colibri_pxa300/lowlevel_init.S
> @@ -0,0 +1,97 @@
> +/*
> + * 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 <config.h>
> +#include <version.h>
> +#include <asm/arch/pxa-regs.h>
> +
for all please replace hardcode value with MACRO
> +/* There is no memory init here since U-Boot was booted from DRAM
> +   already. You need to implement a first-stage bootloader to setup
> +   the RAM controller and load contents from NAND if needed. */
please use this style of comment
/*
 *
 */
> +
> +.globl lowlevel_init
> +lowlevel_init:
> +
> +	/*  Configure GPIO pins for UART1 / altFn 1 */
           ^
white please remove
an so on
> +
> +/*
> + * select serial console configuration
> + */
> +#define CONFIG_FFUART	       1
> +
> +/* allow to overwrite serial and ethaddr */
> +#define CONFIG_ENV_OVERWRITE
> +#define CONFIG_BAUDRATE		115200
> +
> +/*
> + * BOOTP options
> + */
> +#define CONFIG_BOOTP_BOOTFILESIZE
> +#define CONFIG_BOOTP_BOOTPATH
> +#define CONFIG_BOOTP_GATEWAY
> +#define CONFIG_BOOTP_HOSTNAME
> +
> +/*
> + * Command line configuration.
> + */
> +#include <config_cmd_default.h>
> +
> +#define CONFIG_CMD_NET
> +#define CONFIG_CMD_PING
> +#define CONFIG_CMD_ENV
> +#undef CONFIG_CMD_IMLS
> +
> +#define CONFIG_BOOTDELAY	-1
> +#define CONFIG_NETMASK		255.255.255.0
> +#define CONFIG_IPADDR		192.168.1.52
> +#define CONFIG_SERVERIP		192.168.1.51
please remove network config
> +#define CONFIG_BOOTCOMMAND	"bootm 80000"
> +#define CONFIG_BOOTARGS		"console=ttyS0,115200"
> +#define CONFIG_TIMESTAMP
> +#define CONFIG_EXTRA_ENV_SETTINGS "ethaddr=08:00:3e:26:0a:5b"
> +
Best Regards,
J.

  reply	other threads:[~2008-12-06 17:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-29 17:42 [U-Boot] [PATCH] add support for Toradex Colibri PXA300 module Daniel Mack
2008-12-06 17:11 ` Jean-Christophe PLAGNIOL-VILLARD [this message]
2008-12-06 17:45   ` Daniel Mack

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=20081206171104.GE2977@game.jcrosoft.org \
    --to=plagnioj@jcrosoft.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.