[U-Boot] [PATCH] mpq101: initial support for Mercury Computer Systems MPQ101 board
Wolfgang Denk
wd at denx.de
Mon Dec 27 13:12:22 CET 2010
Dear Alex Dubov,
In message <25288.34605.qm at 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 at 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.
More information about the U-Boot
mailing list