All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wolfgang Denk <wd@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] mpq101: initial support for Mercury Computer Systems MPQ101 board
Date: Mon, 27 Dec 2010 13:12:22 +0100	[thread overview]
Message-ID: <20101227121222.D1324152438@gemini.denx.de> (raw)
In-Reply-To: <25288.34605.qm@web37607.mail.mud.yahoo.com>

Dear Alex Dubov,

In message <25288.34605.qm@web37607.mail.mud.yahoo.com> you wrote:
> Mpq101 is a RapidIO development board in AMC form factor, featuring MPC8548
> processor, 512MB of hardwired DDR2 RAM and 128MB of hardwired NAND flash
> memory. USB controller is available, but not presently enabled.
> 
> Additional board information is available at:
> http://www.mc.com/products/boards/ensemble_mpq101_rapidio_powerquicc_iii.aspx
> 
> Signed-off-by: Alex Dubov <oakad@yahoo.com>
> ---
>  board/mercury/mpq101/Makefile  |   53 ++++++
>  board/mercury/mpq101/config.mk |    7 +
>  board/mercury/mpq101/law.c     |   54 ++++++
>  board/mercury/mpq101/mpq101.c  |  167 ++++++++++++++++++
>  board/mercury/mpq101/tlb.c     |   82 +++++++++
>  boards.cfg                     |    1 +
>  include/configs/mpq101.h       |  381 ++++++++++++++++++++++++++++++++++++++++

Entry to MAINTAINERS missing.


> diff --git a/board/mercury/mpq101/config.mk b/board/mercury/mpq101/config.mk
> new file mode 100644
> index 0000000..1870680
> --- /dev/null
> +++ b/board/mercury/mpq101/config.mk
> @@ -0,0 +1,7 @@
> +#
> +# mpq101 board
> +#
> +
> +# Make room for environment at the beginning of flash sector
> +CONFIG_SYS_TEXT_BASE = 0xfffc0800
> +LDFLAGS += --section-start=.ppcenv=$(CONFIG_ENV_ADDR)

Please mode defines to board config file and get rid of config.mk

> +phys_size_t
> +initdram (int board_type)
> +{
...
> +	dram_size = setup_ddr_tlbs(1ull << (CONFIG_SYS_SDRAM_SIZE_LOG - 20));
> +
> +	puts("    DDR: ");
> +
> +	return dram_size << 20;

You should use get_ram_size().

> +local_bus_init(void)
> +{
> +	volatile ccsr_gur_t *gur = (void *)(CONFIG_SYS_MPC85xx_GUTS_ADDR);
> +	volatile fsl_lbc_t *lbc = LBC_BASE_ADDR;
> +
> +	uint clkdiv;
> +	uint lbc_hz;
> +	sys_info_t sysinfo;
> +
> +	get_sys_info(&sysinfo);
> +	clkdiv = (lbc->lcrr & LCRR_CLKDIV) * 2;
> +	lbc_hz = sysinfo.freqSystemBus / 1000000 / clkdiv;
> +
> +	gur->lbiuiplldcr1 = 0x00078080;
> +	if (clkdiv == 16) {
> +		gur->lbiuiplldcr0 = 0x7c0f1bf0;
> +	} else if (clkdiv == 8) {
> +		gur->lbiuiplldcr0 = 0x6c0f1bf0;
> +	} else if (clkdiv == 4) {
> +		gur->lbiuiplldcr0 = 0x5c0f1bf0;
> +	}
> +
> +	lbc->lcrr |= 0x00030000;
> +	asm("sync;isync;msync");
> +
> +	lbc->ltesr = 0xffffffff;        /* Clear LBC error interrupts */
> +	lbc->lteir = 0xffffffff;        /* Enable LBC error interrupts */

NAK.  Please use proper I/O accessors.

...
> +#define CONFIG_SYS_LOAD_ADDR   0x2000000       /* default load address */
...
> +#define CONFIG_LOADADDR  1000000 /*default location for tftp and bootm*/

You probably want to make this consistent.

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
You can only live once, but if you do it right, once is enough.

  reply	other threads:[~2010-12-27 12:12 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-27  6:22 [U-Boot] [PATCH] mpq101: initial support for Mercury Computer Systems MPQ101 board Alex Dubov
2010-12-27 12:12 ` Wolfgang Denk [this message]
2010-12-28  4:42   ` Alex Dubov
2011-01-10 22:43     ` Wolfgang Denk
2011-01-11  3:14       ` Alex Dubov
2011-01-11  5:43         ` Wolfgang Denk
2011-01-11  7:32           ` Alex Dubov
2011-01-17 22:38             ` Wolfgang Denk
2011-01-18  4:32               ` Kumar Gala
2010-12-28  5:53   ` Alex Dubov
2011-01-10 22:49     ` Wolfgang Denk
2011-01-07  7:16   ` [U-Boot] [PATCH v3] " Alex Dubov
2011-01-10 22:56     ` Wolfgang Denk
2011-01-11  2:44       ` Alex Dubov
2011-01-11  7:43         ` Wolfgang Denk
2011-01-13  2:42           ` Alex Dubov
2011-01-14  9:10       ` [U-Boot] [PATCH v4] " Alex Dubov
2011-01-14 11:49         ` Kumar Gala
2011-01-17  3:07           ` Alex Dubov
2011-01-17  7:26           ` [U-Boot] [PATCH v5] " Alex Dubov
2011-01-18  5:15             ` Kumar Gala
2011-01-18  8:03               ` [U-Boot] [PATCH v6] " Alex Dubov
2011-01-18  9:42                 ` Kumar Gala
2011-01-19  9:50                   ` Alex Dubov
2011-01-20  5:02                   ` [U-Boot] [PATCH v7] " Alex Dubov
2011-01-20  7:50                     ` Kumar Gala
2011-01-24  5:59                       ` [U-Boot] [PATCH v8] " Alex Dubov
2011-01-27  5:45                         ` Kumar Gala
2011-01-27  8:41                           ` Alex Dubov
2011-01-20  8:46                     ` [U-Boot] [PATCH v7] " Wolfgang Denk
2011-01-22  7:27                       ` Alex Dubov
2011-01-14 11:51         ` [U-Boot] [PATCH v4] " Kumar Gala

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=20101227121222.D1324152438@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 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.