APM821xx: Add bluestone board support
PATCH v4 2/2 APM821xx: Add bluestone board support
From: Tirumala Marri <[email protected]>
Add support code for bluestone board wth APM821XX processor based. This patch includes early board init, misc init, configure EBC, initializes UIC, MAKEALL, board.cfg and MAINTAINERS file.
---
V3:
* Missing TLB entry for CONFIG_SYS_BOOT_BASE_ADDR.
* Move CONFIG_SYS_EBC_PB0AP etc to EBC area in the config file.
* remove unused CONFIG_RTL8211CL_PHY.
* Replace hard coded valued for CONFIG_SYS_EBC_CFG with macro definitions.
* Change APM82XXX to APM821XX
* board.cfg add the entry in sorted.
* use puts() if there is no formating needed.
V4:
* Rebasing with Stefan Roese tree
--- MAINTAINERS | 4 + MAKEALL | 1 + board/amcc/bluestone/Makefile | 52 +++++++++++ board/amcc/bluestone/bluestone.c | 111 ++++++++++++++++++++++++ board/amcc/bluestone/config.mk | 40 +++++++++ board/amcc/bluestone/init.S | 59 +++++++++++++ boards.cfg | 1 + include/configs/bluestone.h | 176 ++++++++++++++++++++++++++++++++++++++ 8 files changed, 444 insertions(+), 0 deletions(-)
MAINTAINERS +4 -0
@@ -500,6 +500,10 @@ Detlev Zundel <[email protected]> inka4x0 MPC5200 +Tirumala Marri <[email protected]> + + bluestone APM821XX + ------------------------------------------------------------------------- Unknown / orphaned boards:
MAKEALL +1 -0
@@ -143,6 +143,7 @@ LIST_4xx="$(boards_by_cpu ppc4xx) acadia_nand \ arches \ bamboo_nand \ + bluestone \ canyonlands \ canyonlands_nand \ CPCI405 \
board/amcc/bluestone/Makefile new file +52 -0
52 lines not on this page · raw message
board/amcc/bluestone/bluestone.c new file +111 -0
111 lines not on this page · raw message
board/amcc/bluestone/config.mk new file +40 -0
@@ -0,0 +1,40 @@ +# +# Copyright (c) 2010, Applied Micro Circuits Corporation +# Author: Tirumala R Marri <[email protected]> +# +# 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 +# +# Applied Micro APM821XX Evaluation board. +# + +sinclude $(OBJTREE)/board/$(BOARDDIR)/config.tmp + +ifndef TEXT_BASE +TEXT_BASE = 0xFFFA0000 +endif + +PLATFORM_CPPFLAGS += -DCONFIG_440=1 + +ifeq ($(debug),1) +PLATFORM_CPPFLAGS += -DDEBUG +endif + +ifeq ($(dbcr),1) +PLATFORM_CPPFLAGS += -DCONFIG_SYS_INIT_DBCR=0x8cff0000 +endif
board/amcc/bluestone/init.S new file +59 -0
59 lines not on this page · raw message
boards.cfg +1 -0
@@ -184,6 +184,7 @@ t3corp powerpc ppc4xx zeus powerpc ppc4xx acadia powerpc ppc4xx - amcc bamboo powerpc ppc4xx - amcc +bluestone powerpc ppc4xx - amcc bubinga powerpc ppc4xx - amcc ebony powerpc ppc4xx - amcc katmai powerpc ppc4xx - amcc
include/configs/bluestone.h new file +176 -0
176 lines not on this page · raw message
Signature · 1 line
1.6.1.rc3
PATCH v4 2/2 APM821xx: Add bluestone board support
Hi Marri,
Quoted 5 lines · On Saturday 25 September 2010 04:04:20 tmarri at apm.com wrote:
From: Tirumala Marri <[email protected]>
Add support code for bluestone board wth APM821XX processor based. This patch includes early board init, misc init, configure EBC, initializes UIC, MAKEALL, board.cfg and
MAINTAINERSfile.
Thanks. Please see below for some more comments.
<snip>
MAKEALL LIST_4xx="$(boards_by_cpu ppc4xx) · line 146
Quoted 9 lines
MAKEALL +1
-0@@ -143,6 +143,7 @@ LIST_4xx="$(boards_by_cpu ppc4xx) acadia_nand \ arches \ bamboo_nand \ + bluestone \
This change is not needed any more. It's auto generated now. Please remove this change to MAKEALL.
<snip>
Quoted 43 lines
MAKEALL +42
-0+++ b/include/configs/bluestone.h@@ -0,0 +1,176 @@ +/* + * bluestone.h - configuration for Blouestone (APM821XX) + * + * Copyright (c) 2010, Applied Micro Circuits Corporation + * Author: Tirumala R Marri <[email protected]> + * + * 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 + */ + +#ifndef __CONFIG_H +#define __CONFIG_H + +/* + * High Level Configuration Options + */ +#define CONFIG_APM821XX 1 /* APM821XX series */ +#define CONFIG_HOSTNAME bluestone + +#define CONFIG_4xx 1 /* ... PPC4xx family */ +#define CONFIG_440 1 +/* + * Include common defines/options for all AMCC eval boards + */ +#include "amcc-common.h" +#define CONFIG_SYS_CLK_FREQ 50000000 + +#define CONFIG_BOARD_TYPES 1 /* support board types */ +#define CONFIG_BOARD_EARLY_INIT_F 1 /* Call board_early_init_f */
MAKEALL line 51
Quoted 10 lines
MAKEALL +10
-0+#define CONFIG_MISC_INIT_R 1 /* Call misc_init_r */ + +/* + * Base addresses -- Note these are effective addresses where the + * actual resources get mapped (not physical addresses) + */ +/* EBC stuff */ +/* later mapped to this addr */ +#define CONFIG_SYS_FLASH_BASE 0xFFF00000 +#define CONFIG_SYS_FLASH_SIZE (4 << 20) /* 1MB usable
*/
MAKEALL line 58
Quoted 7 lines
MAKEALL +7
-0+ +/* EBC Boot Space: 0xFF000000 */ +#define CONFIG_SYS_BOOT_BASE_ADDR 0xFF000000 +#define CONFIG_SYS_OCM_BASE 0xE3000000 /* OCM: 32k */ +#define CONFIG_SYS_SRAM_BASE 0xE8000000 /* SRAM: 256k */ +#define CONFIG_SYS_PERIPHERAL_BASE 0xEF600000 /* internal peripherals */ +#define CONFIG_SYS_AHB_BASE 0xE2000000 /* internal AHB
peripherals*/
Quoted 9 lines
MAKEALL +9
-0+ +#define CONFIG_SYS_SRAM_SIZE (256 << 10) +/* + * Initial RAM & stack pointer (placed in OCM) + */ +#define CONFIG_SYS_INIT_RAM_ADDR CONFIG_SYS_OCM_BASE /* OCM */ +#define CONFIG_SYS_INIT_RAM_END (4 << 10) +#define CONFIG_SYS_GBL_DATA_SIZE 256 /* num bytes initial data */ +#define CONFIG_SYS_GBL_DATA_OFFSET \
MAKEALL line 77
Quoted 10 lines
MAKEALL +10
-0+ (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE) +#define CONFIG_SYS_INIT_SP_OFFSET CONFIG_SYS_GBL_DATA_OFFSET + +/* + * Environment + */ +/* + * Define here the location of the environment variables (FLASH). + */ +#define CONFIG_ENV_IS_IN_FLASH 1 /* use FLASH for environment
vars */
MAKEALL line 78
Quoted 1 line
MAKEALL +1
-0+#define CONFIG_SYS_NOR_CS 0 /* NOR chip connected to CSx */
CONFIG_SYS_NOR_CS is not referenced anywhere. Please remove.
Quoted 12 lines
MAKEALL +12
-0+/* + * FLASH related + */ +#define CONFIG_SYS_FLASH_CFI /* The flash is CFI compatible */ +#define CONFIG_FLASH_CFI_DRIVER /* Use common CFI driver */ +#define CONFIG_SYS_FLASH_CFI_WIDTH FLASH_CFI_8BIT +#define CONFIG_SYS_FLASH_BANKS_LIST {CONFIG_SYS_FLASH_BASE} +/* max number of memory banks */ +#define CONFIG_SYS_MAX_FLASH_BANKS 1 +/* max number of sectors on one chip */ +#define CONFIG_SYS_MAX_FLASH_SECT 80 +/* Timeout for Flash Erase (in ms) */
MAKEALL line 100
Quoted 10 lines
MAKEALL +10
-0+#define CONFIG_SYS_FLASH_ERASE_TOUT 120000 +/* Timeout for Flash Write (in ms) */ +#define CONFIG_SYS_FLASH_WRITE_TOUT 500 +/* use buffered writes (20x faster) */ +#define CONFIG_SYS_FLASH_USE_BUFFER_WRITE 1 +/* print 'E' for empty sector on flinfo */ +#define CONFIG_SYS_FLASH_EMPTY_INFO +#ifdef CONFIG_ENV_IS_IN_FLASH +#define CONFIG_ENV_SECT_SIZE 0x10000 /* size of one complete sector */ +#define CONFIG_ENV_ADDR (CONFIG_SYS_MONITOR_BASE -
CONFIG_ENV_SECT_SIZE)
MAKEALL line 101
Quoted 1 line
MAKEALL +1
-0+#define CONFIG_ENV_SIZE 0x4000 /* Total Size of Environment
Sector */
MAKEALL line 103
Quoted 2 lines
MAKEALL +2
-0+/* Address and size of Redundant Environment Sector */ +#define CONFIG_ENV_ADDR_REDUND (CONFIG_ENV_ADDR -
CONFIG_ENV_SECT_SIZE)
Quoted 9 lines
MAKEALL +7
-0+#define CONFIG_ENV_SIZE_REDUND (CONFIG_ENV_SIZE) +#endif /* CONFIG_ENV_IS_IN_FLASH */ + +/* SDRAM */ +#define CONFIG_SPD_EEPROM 1 /* Use SPD EEPROM for setup */ +#define SPD_EEPROM_ADDRESS {0x53, 0x51} /* SPD i2c spd addresses */ +#define CONFIG_PPC4xx_DDR_AUTOCALIBRATION /* IBM DDR autocalibration*/ +#define
CONFIG_AUTOCALIB"silent\0" /* default is non-verbose
*/ +#defineCONFIG_DDR_ECC1 /* with ECC support
*/
MAKEALL
Quoted 10 lines
MAKEALL +10
-0+ +/* + * I2C + */ +#define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed */ +#define CONFIG_SYS_I2C_MULTI_EEPROMS +#define CONFIG_SYS_I2C_EEPROM_ADDR (0xa8 >> 1) +#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1 +#define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 3 +#define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS 5 /* Data sheet
*/
Quoted 7 lines
MAKEALL +7
-0+ +/* I2C bootstrap EEPROM */ +#define CONFIG_4xx_CONFIG_I2C_EEPROM_ADDR 0x52 +#define CONFIG_4xx_CONFIG_I2C_EEPROM_OFFSET 0 +#define CONFIG_4xx_CONFIG_BLOCKSIZE 16 + +/*
MAKEALL
Quoted 10 lines
MAKEALL +10
-0+ * Ethernet + */ +#define CONFIG_IBM_EMAC4_V4 1 +#define CONFIG_EMAC_PHY_MODE EMAC_PHY_MODE_NONE_RGMII +#define CONFIG_HAS_ETH0 +/* PHY address, See schematics */ +#define CONFIG_PHY_ADDR 0x1f +/* reset phy upon startup */ +#define CONFIG_PHY_RESET 1 +#define CONFIG_PHY_RESET_R
I mentioned this a few times before. CONFIG_PHY_RESET_R is not referenced anywhere. Please remove it.
Please fix and resubmit.
Cheers,
Stefan
--
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