8xx: add support for new keymile kmsupx4 board.
PATCH 28/31 8xx: add support for new keymile kmsupx4 board.
This patch adds support for the kmsupx4 board from Keymile, based on a Freescale MPC852T CPU
- serial console on SMC1
- 32 MB SDRAM
- 32 MB NOR Flash
- Ethernet over SCC3
- I2C Bitbang
Signed-off-by Heiko Schocher <[email protected]>
--- Makefile | 9 +++++- board/keymile/common/common.c | 6 +++- board/keymile/km8xx/km8xx.c | 7 ++++- cpu/mpc8xx/cpu_init.c | 2 + cpu/mpc8xx/start.S | 3 +- drivers/i2c/soft_i2c.c | 3 ++ include/commproc.h | 2 +- include/configs/keymile-common.h | 2 +- include/configs/km8xx.h | 54 ++++++++++++++++++++++++++++++------- lib_ppc/board.c | 3 +- 10 files changed, 73 insertions(+), 18 deletions(-)
Makefile +8 -1
@@ -921,6 +921,13 @@ IVMS8_config: unconfig } @$(MKCONFIG) -a IVMS8 ppc mpc8xx ivm +kmsupx4_config: unconfig + @mkdir -p $(obj)include + @{ echo "#define CONFIG_KMSUPX4" >>$(obj)include/config.h ; \ + $(XECHO) "kmsupx board configuration" ; \ + } + @$(MKCONFIG) -a km8xx ppc mpc8xx km8xx keymile + KUP4K_config : unconfig @$(MKCONFIG) $(@:_config=) ppc mpc8xx kup4k kup
@@ -940,7 +947,7 @@ MBX860T_config: unconfig mgsuvd_config: unconfig @mkdir -p $(obj)include @{ echo "#define CONFIG_MGSUVD" >>$(obj)include/config.h ; \ - $(XECHO) "mgsuvd configuration" ; \ + $(XECHO) "mgsuvd board configuration" ; \ } @$(MKCONFIG) -a km8xx ppc mpc8xx km8xx keymile
board/keymile/common/common.c +5 -1
@@ -297,11 +297,14 @@ int ivm_analyze_eeprom (unsigned char *buf, int len)int ivm_read_eeprom (void ) { +#if defined(CONFIG_I2C_MUX )I2C_MUX_DEVICE *dev =NULL ; +#endif uchar i2c_buffer[CONFIG_SYS_IVM_EEPROM_MAX_LEN ];uchar *buf;unsigned dev_addr =CONFIG_SYS_IVM_EEPROM_ADR ; +#if defined(CONFIG_I2C_MUX )/* First init the Bus, select the Bus */ #if defined(CONFIG_SYS_I2C_IVM_BUS ) dev =i2c_mux_ident_muxstring ((uchar *)CONFIG_SYS_I2C_IVM_BUS );
@@ -315,6 +318,7 @@ int ivm_read_eeprom (void) return -1; }i2c_set_bus_num (dev->busid); +#endif buf = (unsigned char *)getenv ("EEprom_ivm_addr" );if (buf !=NULL )
@@ -393,7 +397,7 @@ static void setports (int gpio)#endif #endif -#if defined(CONFIG_MGSUVD ) +#if defined(CONFIG_MGSUVD ) || defined(CONFIG_KMSUPX4 )static void set_sda (int state) {I2C_SDA (state);
board/keymile/km8xx/km8xx.c +6 -1
@@ -61,7 +61,12 @@ const uint sdram_table[] =int checkboard (void ) { -puts ("Board: Keymile mgsuvd" ); +puts ("Board: Keymile " ); +#if defined(CONFIG_KMSUPX4 ) +puts ("kmsupx4" ); +#else +puts ("mgsuvd" ); +#endif if (ethernet_present ())puts (" with PIGGY." );puts ("\n" );
cpu/mpc8xx/cpu_init.c +2 -0
@@ -119,11 +119,13 @@ void cpu_init_f (volatile immap_t * immr)* Memory Controller: */ +#if !defined(CONFIG_KMSUPX4 )/* perform BR0 reset that MPC850 Rev. A can't guarantee */ reg = memctl->memc_br0; reg &=BR_PS_MSK ;/* Clear everything except Port Size bits */ reg |=BR_V ;/* then add just the "Bank Valid" bit */ memctl->memc_br0 = reg; +#endif /* Map banks 0 (and maybe 1) to the FLASH banks 0 (and 1) at * preliminary addresses - these have to be modified later
cpu/mpc8xx/start.S +2 -1
@@ -142,7 +142,8 @@ boot_warm: lis r3, IDC_DISABLE at h /* Disable data cache */ mtspr DC_CST, r3 -#if !(defined(CONFIG_IP860) || defined(CONFIG_PCU_E) || defined (CONFIG_FLAGADM)) +#if !(defined(CONFIG_IP860) || defined(CONFIG_PCU_E) || \ + defined (CONFIG_FLAGADM) || defined(CONFIG_KMSUPX4)) /* On IP860 and PCU E, * we cannot enable IC yet */
drivers/i2c/soft_i2c.c +3 -0
@@ -43,6 +43,9 @@#ifdef CONFIG_MPC866 /* only valid for MPC866 */ #include <asm/io.h> #endif +#ifdef CONFIG_MPC852T /* only valid for MPC852T */ +#include <asm/io.h> +#endif #include <i2c.h> /* #define DEBUG_I2C */
include/commproc.h +1 -1
@@ -1126,7 +1126,7 @@ typedef struct scc_enet {/* The MGSUVD Service Module uses SCC3 for Ethernet */ -#ifdef CONFIG_MGSUVD +#if defined(CONFIG_MGSUVD ) || defined(CONFIG_KMSUPX4 )#define PROFF_ENET PROFF_SCC3/* Ethernet on SCC3 */ #define CPM_CR_ENET CPM_CR_CH_SCC3#define SCC_ENET 2
include/configs/keymile-common.h +1 -1
@@ -105,7 +105,7 @@#define CONFIG_I2C_MUX 1/* EEprom support */ -#if defined(CONFIG_MGCOGE ) || defined(CONFIG_MGSUVD ) +#if defined(CONFIG_MGCOGE ) || defined(CONFIG_MGSUVD ) || defined(CONFIG_KMSUPX4 )#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1#else #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 2
include/configs/km8xx.h +43 -11
127 lines not on this page · raw message
lib_ppc/board.c +2 -1
@@ -753,7 +753,8 @@ void board_init_r (gd_t *id, ulong dest_addr)WATCHDOG_RESET ();#if defined(CONFIG_IP860 ) || defined(CONFIG_PCU_E ) || \ - defined (CONFIG_FLAGADM ) || defined(CONFIG_MPC83XX ) + defined (CONFIG_FLAGADM ) || defined(CONFIG_MPC83XX ) || \ + defined(CONFIG_KMSUPX4 )icache_enable ();/* it's time to enable the instruction cache */ #endif
Signature · 5 lines
1.6.0.6 -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
PATCH 28/31 8xx: add support for new keymile kmsupx4 board.
Quoted 13 lines · On Wed, 28 Jan 2009 10:40:50 +0100 Heiko Schocher <[email protected]> wrote:
Signed-off-by Heiko Schocher <[email protected]>--- Makefile | 9 +++++- board/keymile/common/common.c | 6 +++- board/keymile/km8xx/km8xx.c | 7 ++++- cpu/mpc8xx/cpu_init.c | 2 + cpu/mpc8xx/start.S | 3 +- drivers/i2c/soft_i2c.c | 3 ++ include/commproc.h | 2 +- include/configs/keymile-common.h | 2 +- include/configs/km8xx.h | 54 ++++++++++++++++++++++++++++++------- lib_ppc/board.c | 3 +- 10 files changed, 73 insertions(+), 18 deletions(-)
you're missing MAINTAINERS, MAKEALL, doc/README file bits.
Kim
PATCH 28/31 8xx: add support for new keymile kmsupx4 board.
Hello Kim,
Quoted 17 lines · Kim Phillips
Quoted 13 lines · On Wed, 28 Jan 2009 10:40:50 +0100 Heiko Schocher <[email protected]> wrote:
Signed-off-by Heiko Schocher <[email protected]>--- Makefile | 9 +++++- board/keymile/common/common.c | 6 +++- board/keymile/km8xx/km8xx.c | 7 ++++- cpu/mpc8xx/cpu_init.c | 2 + cpu/mpc8xx/start.S | 3 +- drivers/i2c/soft_i2c.c | 3 ++ include/commproc.h | 2 +- include/configs/keymile-common.h | 2 +- include/configs/km8xx.h | 54 ++++++++++++++++++++++++++++++------- lib_ppc/board.c | 3 +- 10 files changed, 73 insertions(+), 18 deletions(-)
Quoted 1 line
you're missing
MAINTAINERS, MAKEALL, doc/README file bits.
ok, I add this.
thanks
Heiko
Signature · 2 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany