diff options
author | Tom Rini <trini@ti.com> | 2013-02-18 09:57:06 -0500 |
---|---|---|
committer | Tom Rini <trini@ti.com> | 2013-02-18 09:57:06 -0500 |
commit | 1671ba7c0d5dd59c84cb3ae5dc586242d65cbf5f (patch) | |
tree | 65493c2c97adc37be6a60fc0a2fb81d214257fb1 | |
parent | ea6bd08b7717bf0d3f69ad9f016bf3b03b3eaf16 (diff) | |
parent | 411190cb16b63e39345a608b68b3d1be5168117a (diff) | |
download | talos-obmc-uboot-1671ba7c0d5dd59c84cb3ae5dc586242d65cbf5f.tar.gz talos-obmc-uboot-1671ba7c0d5dd59c84cb3ae5dc586242d65cbf5f.zip |
Merge branch 'master' of git://git.denx.de/u-boot-mpc83xx
-rw-r--r-- | board/keymile/common/common.c | 13 | ||||
-rw-r--r-- | board/keymile/common/ivm.c | 48 | ||||
-rw-r--r-- | board/keymile/km82xx/km82xx.c | 8 | ||||
-rw-r--r-- | board/keymile/km83xx/km83xx.c | 103 | ||||
-rw-r--r-- | board/keymile/scripts/develop-common.txt | 5 | ||||
-rw-r--r-- | board/keymile/scripts/ramfs-common.txt | 5 | ||||
-rw-r--r-- | boards.cfg | 7 | ||||
-rw-r--r-- | drivers/mtd/nand/kmeter1_nand.c | 4 | ||||
-rw-r--r-- | include/configs/km/keymile-common.h | 12 | ||||
-rw-r--r-- | include/configs/km/km8309-common.h | 4 | ||||
-rw-r--r-- | include/configs/km/km8321-common.h | 2 | ||||
-rw-r--r-- | include/configs/km/km83xx-common.h | 9 | ||||
-rw-r--r-- | include/configs/km8360.h | 2 | ||||
-rw-r--r-- | include/configs/suvd3.h | 37 | ||||
-rw-r--r-- | include/configs/tuxx1.h | 46 |
15 files changed, 226 insertions, 79 deletions
diff --git a/board/keymile/common/common.c b/board/keymile/common/common.c index 6f407b78f2..ef93ed3f66 100644 --- a/board/keymile/common/common.c +++ b/board/keymile/common/common.c @@ -38,9 +38,7 @@ #include "post.h" #endif #include "common.h" -#if defined(CONFIG_HARD_I2C) || defined(CONFIG_SOFT_I2C) #include <i2c.h> -#endif #if !defined(CONFIG_MPC83xx) static void i2c_write_start_seq(void); @@ -185,17 +183,6 @@ void i2c_init_board(void) } #endif - -#if !defined(MACH_TYPE_KM_KIRKWOOD) -int ethernet_present(void) -{ - struct km_bec_fpga *base = - (struct km_bec_fpga *)CONFIG_SYS_KMBEC_FPGA_BASE; - - return in_8(&base->bprth) & PIGGY_PRESENT; -} -#endif - int board_eth_init(bd_t *bis) { if (ethernet_present()) diff --git a/board/keymile/common/ivm.c b/board/keymile/common/ivm.c index eaa924f0e6..22d525602a 100644 --- a/board/keymile/common/ivm.c +++ b/board/keymile/common/ivm.c @@ -201,6 +201,22 @@ static int ivm_check_crc(unsigned char *buf, int block) return 0; } +static int calculate_mac_offset(unsigned char *valbuf, unsigned char *buf, + int offset) +{ + unsigned long val = (buf[4] << 16) + (buf[5] << 8) + buf[6]; + + if (offset == 0) + return 0; + + val += offset; + buf[4] = (val >> 16) & 0xff; + buf[5] = (val >> 8) & 0xff; + buf[6] = val & 0xff; + sprintf((char *)valbuf, "%pM", buf + 1); + return 0; +} + static int ivm_analyze_block2(unsigned char *buf, int len) { unsigned char valbuf[CONFIG_SYS_IVM_EEPROM_PAGE_LEN]; @@ -210,24 +226,20 @@ static int ivm_analyze_block2(unsigned char *buf, int len) sprintf((char *)valbuf, "%pM", buf + 1); ivm_set_value("IVM_MacAddress", (char *)valbuf); /* if an offset is defined, add it */ -#if defined(CONFIG_PIGGY_MAC_ADRESS_OFFSET) - if (CONFIG_PIGGY_MAC_ADRESS_OFFSET > 0) { - unsigned long val = (buf[4] << 16) + (buf[5] << 8) + buf[6]; - - val += CONFIG_PIGGY_MAC_ADRESS_OFFSET; - buf[4] = (val >> 16) & 0xff; - buf[5] = (val >> 8) & 0xff; - buf[6] = val & 0xff; - sprintf((char *)valbuf, "%pM", buf + 1); - } -#endif + calculate_mac_offset(buf, valbuf, CONFIG_PIGGY_MAC_ADRESS_OFFSET); #ifdef MACH_TYPE_KM_KIRKWOOD setenv((char *)"ethaddr", (char *)valbuf); #else if (getenv("ethaddr") == NULL) setenv((char *)"ethaddr", (char *)valbuf); #endif - +#ifdef CONFIG_KMVECT1 +/* KMVECT1 has two ethernet interfaces */ + if (getenv("eth1addr") == NULL) { + calculate_mac_offset(buf, valbuf, 1); + setenv((char *)"eth1addr", (char *)valbuf); + } +#endif /* IVM_MacCount */ count = (buf[10] << 24) + (buf[11] << 16) + @@ -312,27 +324,15 @@ int ivm_read_eeprom(void) #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); -#else buf = (unsigned char *) getenv("EEprom_ivm"); if (buf != NULL) dev = i2c_mux_ident_muxstring(buf); -#endif if (dev == NULL) { printf("Error couldnt add Bus for IVM\n"); return -1; } i2c_set_bus_num(dev->busid); #endif - - buf = (unsigned char *) getenv("EEprom_ivm_addr"); - if (buf != NULL) { - ret = strict_strtoul((char *)buf, 16, &dev_addr); - if (ret != 0) - return -3; - } - /* add deblocking here */ i2c_make_abort(); diff --git a/board/keymile/km82xx/km82xx.c b/board/keymile/km82xx/km82xx.c index 67b69f6cb3..defc885db7 100644 --- a/board/keymile/km82xx/km82xx.c +++ b/board/keymile/km82xx/km82xx.c @@ -385,6 +385,14 @@ void handle_mgcoge3un_reset(void) } #endif +int ethernet_present(void) +{ + struct km_bec_fpga *base = + (struct km_bec_fpga *)CONFIG_SYS_KMBEC_FPGA_BASE; + + return in_8(&base->bprth) & PIGGY_PRESENT; +} + /* * Early board initalization. */ diff --git a/board/keymile/km83xx/km83xx.c b/board/keymile/km83xx/km83xx.c index 83a8753e5a..faaa39bc20 100644 --- a/board/keymile/km83xx/km83xx.c +++ b/board/keymile/km83xx/km83xx.c @@ -98,17 +98,13 @@ const qe_iop_conf_t qe_iop_conf_tab[] = { static int board_init_i2c_busses(void) { I2C_MUX_DEVICE *dev = NULL; - uchar *buf; + uchar *dtt_bus = (uchar *)"pca9547:70:a"; /* Set up the Bus for the DTTs */ - buf = (unsigned char *) getenv("dtt_bus"); - if (buf != NULL) - dev = i2c_mux_ident_muxstring(buf); - if (dev == NULL) { + dev = i2c_mux_ident_muxstring(dtt_bus); + if (dev == NULL) printf("Error couldn't add Bus for DTT\n"); - printf("please setup dtt_bus to where your\n"); - printf("DTT is found.\n"); - } + return 0; } @@ -133,6 +129,28 @@ const uint upma_table[] = { }; #endif +static int piggy_present(void) +{ + struct km_bec_fpga __iomem *base = + (struct km_bec_fpga __iomem *)CONFIG_SYS_KMBEC_FPGA_BASE; + + return in_8(&base->bprth) & PIGGY_PRESENT; +} + +#if defined(CONFIG_KMVECT1) +int ethernet_present(void) +{ + /* ethernet port connected to simple switch without piggy */ + return 1; +} +#else +int ethernet_present(void) +{ + return piggy_present(); +} +#endif + + int board_early_init_r(void) { struct km_bec_fpga *base = @@ -193,8 +211,75 @@ int misc_init_r(void) return 0; } +#if defined(CONFIG_KMVECT1) +#include <mv88e6352.h> +/* Marvell MV88E6122 switch configuration */ +static struct mv88e_sw_reg extsw_conf[] = { + /* port 1, FRONT_MDI, autoneg */ + { PORT(1), PORT_PHY, NO_SPEED_FOR }, + { PORT(1), PORT_CTRL, FORWARDING | EGRS_FLD_ALL }, + { PHY(1), PHY_1000_CTRL, NO_ADV }, + { PHY(1), PHY_SPEC_CTRL, AUTO_MDIX_EN }, + { PHY(1), PHY_CTRL, PHY_100_MBPS | AUTONEG_EN | AUTONEG_RST | + FULL_DUPLEX }, + /* port 2, unused */ + { PORT(2), PORT_CTRL, PORT_DIS }, + { PHY(2), PHY_CTRL, PHY_PWR_DOWN }, + { PHY(2), PHY_SPEC_CTRL, SPEC_PWR_DOWN }, + /* port 3, BP_MII (CPU), PHY mode, 100BASE */ + { PORT(3), PORT_CTRL, FORWARDING | EGRS_FLD_ALL }, + /* port 4, ESTAR to slot 11, SerDes, 1000BASE-X */ + { PORT(4), PORT_STATUS, NO_PHY_DETECT }, + { PORT(4), PORT_PHY, SPEED_1000_FOR }, + { PORT(4), PORT_CTRL, FORWARDING | EGRS_FLD_ALL }, + /* port 5, ESTAR to slot 13, SerDes, 1000BASE-X */ + { PORT(5), PORT_STATUS, NO_PHY_DETECT }, + { PORT(5), PORT_PHY, SPEED_1000_FOR }, + { PORT(5), PORT_CTRL, FORWARDING | EGRS_FLD_ALL }, + /* + * Errata Fix: 1.9V Output from Internal 1.8V Regulator, + * acc . MV-S300889-00D.pdf , clause 4.5 + */ + { PORT(5), 0x1A, 0xADB1 }, + /* port 6, unused, this port has no phy */ + { PORT(6), PORT_CTRL, PORT_DIS }, +}; +#endif + int last_stage_init(void) { +#if defined(CONFIG_KMVECT1) + struct km_bec_fpga __iomem *base = + (struct km_bec_fpga __iomem *)CONFIG_SYS_KMBEC_FPGA_BASE; + u8 tmp_reg; + + /* Release mv88e6122 from reset */ + tmp_reg = in_8(&base->res1[0]) | 0x10; /* DIRECT3 register */ + out_8(&base->res1[0], tmp_reg); /* GP28 as output */ + tmp_reg = in_8(&base->gprt3) | 0x10; /* GP28 to high */ + out_8(&base->gprt3, tmp_reg); + + /* configure MV88E6122 switch */ + char *name = "UEC2"; + + if (miiphy_set_current_dev(name)) + return 0; + + mv88e_sw_program(name, CONFIG_KM_MVEXTSW_ADDR, extsw_conf, + ARRAY_SIZE(extsw_conf)); + + mv88e_sw_reset(name, CONFIG_KM_MVEXTSW_ADDR); + + if (piggy_present()) { + setenv("ethact", "UEC2"); + setenv("netdev", "eth1"); + puts("using PIGGY for network boot\n"); + } else { + setenv("netdev", "eth0"); + puts("using frontport for network boot\n"); + } +#endif + #if defined(CONFIG_KMCOGE5NE) struct bfticu_iomap *base = (struct bfticu_iomap *)CONFIG_SYS_BFTIC3_BASE; @@ -280,7 +365,7 @@ int checkboard(void) { puts("Board: Keymile " CONFIG_KM_BOARD_NAME); - if (ethernet_present()) + if (piggy_present()) puts(" with PIGGY."); puts("\n"); return 0; diff --git a/board/keymile/scripts/develop-common.txt b/board/keymile/scripts/develop-common.txt index aa3d659527..a6bb1b1d4a 100644 --- a/board/keymile/scripts/develop-common.txt +++ b/board/keymile/scripts/develop-common.txt @@ -1,8 +1,9 @@ altbootcmd=run ${subbootcmds} bootcmd=run ${subbootcmds} -configure=km_setboardid && saveenv && reset +configure=run set_uimage; km_setboardid && saveenv && reset subbootcmds=tftpfdt tftpkernel nfsargs add_default boot nfsargs=setenv bootargs root=/dev/nfs rw nfsroot=${serverip}:${toolchain}/${arch} -tftpkernel=tftpboot ${load_addr_r} ${hostname}/uImage +tftpkernel=tftpboot ${load_addr_r} ${hostname}/${uimage} toolchain=/opt/eldk rootfssize=0 +set_uimage=printenv uimage || setenv uimage uImage diff --git a/board/keymile/scripts/ramfs-common.txt b/board/keymile/scripts/ramfs-common.txt index c1b45ab029..8a8d287558 100644 --- a/board/keymile/scripts/ramfs-common.txt +++ b/board/keymile/scripts/ramfs-common.txt @@ -4,8 +4,9 @@ altbootcmd=run ${subbootcmds} bootcmd=run ${subbootcmds} subbootcmds=tftpfdt tftpkernel setrootfsaddr tftpramfs flashargs add_default addpanic addramfs boot nfsargs=setenv bootargs root=/dev/nfs rw nfsroot=${serverip}:${rootpath} -configure=km_setboardid && saveenv && reset +configure=run set_uimage; km_setboardid && saveenv && reset rootfsfile=${hostname}/rootfsImage setrootfsaddr=setexpr value ${pnvramaddr} - ${rootfssize} && setenv rootfsaddr 0x${value} -tftpkernel=tftpboot ${load_addr_r} ${hostname}/uImage +tftpkernel=tftpboot ${load_addr_r} ${hostname}/${uimage} tftpramfs=tftpboot ${rootfsaddr} ${hostname}/rootfsImage +set_uimage=printenv uimage || setenv uimage uImage diff --git a/boards.cfg b/boards.cfg index b1319aace0..7f772a0840 100644 --- a/boards.cfg +++ b/boards.cfg @@ -705,9 +705,10 @@ SIMPC8313_SP powerpc mpc83xx simpc8313 sheldon TQM834x powerpc mpc83xx tqm834x tqc suvd3 powerpc mpc83xx km83xx keymile - suvd3:SUVD3 kmvect1 powerpc mpc83xx km83xx keymile - suvd3:KMVECT1 -tuge1 powerpc mpc83xx km83xx keymile - tuxx1:KM_DISABLE_APP2,TUGE1 -tuxx1 powerpc mpc83xx km83xx keymile -kmsupx5 powerpc mpc83xx km83xx keymile - tuxx1:KM_DISABLE_APP2,KMSUPX5 +tuge1 powerpc mpc83xx km83xx keymile - tuxx1:TUGE1 +tuxx1 powerpc mpc83xx km83xx keymile - tuxx1:TUXX1 +kmopti2 powerpc mpc83xx km83xx keymile - tuxx1:KMOPTI2 +kmsupx5 powerpc mpc83xx km83xx keymile - tuxx1:KMSUPX5 sbc8548 powerpc mpc85xx sbc8548 - - sbc8548 sbc8548_PCI_33 powerpc mpc85xx sbc8548 - - sbc8548:PCI,33 sbc8548_PCI_33_PCIE powerpc mpc85xx sbc8548 - - sbc8548:PCI,33,PCIE diff --git a/drivers/mtd/nand/kmeter1_nand.c b/drivers/mtd/nand/kmeter1_nand.c index e8e5b7b85e..f044597237 100644 --- a/drivers/mtd/nand/kmeter1_nand.c +++ b/drivers/mtd/nand/kmeter1_nand.c @@ -119,7 +119,11 @@ static int kpn_nand_dev_ready(struct mtd_info *mtd) int board_nand_init(struct nand_chip *nand) { +#if defined(CONFIG_NAND_ECC_BCH) + nand->ecc.mode = NAND_ECC_SOFT_BCH; +#else nand->ecc.mode = NAND_ECC_SOFT; +#endif /* Reference hardware control function */ nand->cmd_ctrl = kpn_nand_hwcontrol; diff --git a/include/configs/km/keymile-common.h b/include/configs/km/keymile-common.h index f64748e349..796f33080d 100644 --- a/include/configs/km/keymile-common.h +++ b/include/configs/km/keymile-common.h @@ -148,6 +148,14 @@ "ubi part " CONFIG_KM_UBI_PARTITION_NAME_APP "; fi\0" #endif /* CONFIG_KM_UBI_PARTITION_NAME_APP */ +#ifdef CONFIG_NAND_ECC_BCH +#define CONFIG_KM_UIMAGE_NAME "ecc_bch_uImage\0" +#define CONFIG_KM_ECC_MODE " eccmode=bch" +#else +#define CONFIG_KM_UIMAGE_NAME "uImage\0" +#define CONFIG_KM_ECC_MODE +#endif + /* * boottargets * - set 'subbootcmds' @@ -184,6 +192,7 @@ ":${hostname}:${netdev}:off3" \ " console=" CONFIG_KM_CONSOLE_TTY ",${baudrate}" \ " mem=${kernelmem} init=${init}" \ + CONFIG_KM_ECC_MODE \ " phram.phram=phvar,${varaddr}," __stringify(CONFIG_KM_PHRAM)\ " " CONFIG_KM_UBI_LINUX_MTD " " \ CONFIG_KM_DEF_BOOT_ARGS_CPU \ @@ -210,9 +219,10 @@ */ #define CONFIG_KM_DEF_ENV_FLASH_BOOT \ "cramfsaddr=" __stringify(CONFIG_KM_CRAMFS_ADDR) "\0" \ - "cramfsloadkernel=cramfsload ${load_addr_r} uImage\0" \ + "cramfsloadkernel=cramfsload ${load_addr_r} ${uimage}\0" \ "ubicopy=ubi read "__stringify(CONFIG_KM_CRAMFS_ADDR) \ " bootfs${boot_bank}\0" \ + "uimage=" CONFIG_KM_UIMAGE_NAME \ CONFIG_KM_DEV_ENV_FLASH_BOOT_UBI /* diff --git a/include/configs/km/km8309-common.h b/include/configs/km/km8309-common.h index b36e892cbe..7f9cffa3b7 100644 --- a/include/configs/km/km8309-common.h +++ b/include/configs/km/km8309-common.h @@ -22,7 +22,7 @@ #define CONFIG_MPC830x 1 /* MPC830x family */ #define CONFIG_MPC8309 1 /* MPC8309 CPU specific */ -#define CONFIG_KM_DEF_ARCH "arch=ppc_8xx\0" +#define CONFIG_KM_DEF_ARCH "arch=ppc_82xx\0" #define CONFIG_CMD_DIAG 1 /* include common defines/options for all 83xx Keymile boards */ @@ -33,8 +33,6 @@ /* at end of uboot partition, before env */ #define CONFIG_SYS_QE_FMAN_FW_ADDR 0xF00B0000 -#define CONFIG_MISC_INIT_R - /* * System IO Config */ diff --git a/include/configs/km/km8321-common.h b/include/configs/km/km8321-common.h index 8ad6fc3a33..abb908162a 100644 --- a/include/configs/km/km8321-common.h +++ b/include/configs/km/km8321-common.h @@ -38,8 +38,6 @@ /* include common defines/options for all 83xx Keymile boards */ #include "km83xx-common.h" -#define CONFIG_MISC_INIT_R - /* * System IO Config */ diff --git a/include/configs/km/km83xx-common.h b/include/configs/km/km83xx-common.h index a9823d6ef9..eb0e5b6f32 100644 --- a/include/configs/km/km83xx-common.h +++ b/include/configs/km/km83xx-common.h @@ -165,19 +165,15 @@ #define CONFIG_UEC_ETH #define CONFIG_ETHPRIME "UEC0" +#if !defined(CONFIG_MPC8309) #define CONFIG_UEC_ETH1 /* GETH1 */ #define UEC_VERBOSE_DEBUG 1 +#endif #ifdef CONFIG_UEC_ETH1 -#if defined(CONFIG_MPC8309) -#define CONFIG_SYS_UEC1_UCC_NUM 2 /* UCC3 */ -#define CONFIG_SYS_UEC1_RX_CLK QE_CLK_NONE /* not used in RMII Mode */ -#define CONFIG_SYS_UEC1_TX_CLK QE_CLK12 -#else #define CONFIG_SYS_UEC1_UCC_NUM 3 /* UCC4 */ #define CONFIG_SYS_UEC1_RX_CLK QE_CLK_NONE /* not used in RMII Mode */ #define CONFIG_SYS_UEC1_TX_CLK QE_CLK17 -#endif #define CONFIG_SYS_UEC1_ETH_TYPE FAST_ETH #define CONFIG_SYS_UEC1_PHY_ADDR 0 #define CONFIG_SYS_UEC1_INTERFACE_TYPE PHY_INTERFACE_MODE_RMII @@ -316,7 +312,6 @@ #define CONFIG_EXTRA_ENV_SETTINGS \ CONFIG_KM_DEF_ENV \ CONFIG_KM_DEF_ARCH \ - "dtt_bus=pca9547:70:a\0" \ "EEprom_ivm=pca9547:70:9\0" \ "newenv=" \ "prot off 0xF00C0000 +0x40000 && " \ diff --git a/include/configs/km8360.h b/include/configs/km8360.h index 7631ab6a65..5b191bcdcd 100644 --- a/include/configs/km8360.h +++ b/include/configs/km8360.h @@ -25,6 +25,8 @@ #define CONFIG_KM_BOARD_NAME "kmcoge5ne" #define CONFIG_KM_DEF_NETDEV "netdev=eth1\0" #define CONFIG_CMD_NAND +#define CONFIG_NAND_ECC_BCH +#define CONFIG_BCH #define CONFIG_NAND_KMETER1 #define CONFIG_SYS_MAX_NAND_DEVICE 1 #define NAND_MAX_CHIPS 1 diff --git a/include/configs/suvd3.h b/include/configs/suvd3.h index c50832c1e0..bbf9da545b 100644 --- a/include/configs/suvd3.h +++ b/include/configs/suvd3.h @@ -110,4 +110,41 @@ BATL_CACHEINHIBIT | BATL_GUARDEDSTORAGE) #define CONFIG_SYS_DBAT6U CONFIG_SYS_IBAT6U +/* + * QE UEC ethernet configuration + */ +#if defined(CONFIG_KMVECT1) +#define CONFIG_MV88E6352_SWITCH +#define CONFIG_KM_MVEXTSW_ADDR 0x10 + +/* ethernet port connected to simple switch 88e6122 (UEC0) */ +#define CONFIG_UEC_ETH1 +#define CONFIG_SYS_UEC1_UCC_NUM 0 /* UCC1 */ +#define CONFIG_SYS_UEC1_RX_CLK QE_CLK9 +#define CONFIG_SYS_UEC1_TX_CLK QE_CLK10 + +#define CONFIG_FIXED_PHY 0xFFFFFFFF +#define CONFIG_SYS_FIXED_PHY_ADDR 0x1E /* unused address */ +#define CONFIG_SYS_FIXED_PHY_PORT(devnum, speed, duplex) \ + {devnum, speed, duplex} +#define CONFIG_SYS_FIXED_PHY_PORTS \ + CONFIG_SYS_FIXED_PHY_PORT("UEC0", SPEED_100, DUPLEX_FULL) + +#define CONFIG_SYS_UEC1_ETH_TYPE FAST_ETH +#define CONFIG_SYS_UEC1_PHY_ADDR CONFIG_SYS_FIXED_PHY_ADDR +#define CONFIG_SYS_UEC1_INTERFACE_TYPE PHY_INTERFACE_MODE_MII +#define CONFIG_SYS_UEC1_INTERFACE_SPEED 100 + +/* ethernet port connected to piggy (UEC2) */ +#define CONFIG_HAS_ETH1 +#define CONFIG_UEC_ETH2 +#define CONFIG_SYS_UEC2_UCC_NUM 2 /* UCC3 */ +#define CONFIG_SYS_UEC2_RX_CLK QE_CLK_NONE /* not used in RMII Mode */ +#define CONFIG_SYS_UEC2_TX_CLK QE_CLK12 +#define CONFIG_SYS_UEC2_ETH_TYPE FAST_ETH +#define CONFIG_SYS_UEC2_PHY_ADDR 0 +#define CONFIG_SYS_UEC2_INTERFACE_TYPE PHY_INTERFACE_MODE_RMII +#define CONFIG_SYS_UEC2_INTERFACE_SPEED 100 +#endif /* CONFIG_KMVECT1 */ + #endif /* __CONFIG_H */ diff --git a/include/configs/tuxx1.h b/include/configs/tuxx1.h index 90d2e61147..6caf23a478 100644 --- a/include/configs/tuxx1.h +++ b/include/configs/tuxx1.h @@ -11,7 +11,7 @@ * (C) Copyright 2008 * Heiko Schocher, DENX Software Engineering, hs@denx.de. * - * (C) Copyright 2010-2012 + * (C) Copyright 2010-2013 * Lukas Roggli, KEYMILE Ltd, lukas.roggli@keymile.com * Holger Brunck, Keymile GmbH, holger.bruncl@keymile.com * @@ -27,16 +27,20 @@ /* * High Level Configuration Options */ -#ifdef CONFIG_KMSUPX5 +#if defined(CONFIG_KMSUPX5) #define CONFIG_KM_BOARD_NAME "kmsupx5" #define CONFIG_HOSTNAME kmsupx5 -#elif defined CONFIG_TUGE1 +#elif defined(CONFIG_TUGE1) #define CONFIG_KM_BOARD_NAME "tuge1" #define CONFIG_HOSTNAME tuge1 -#else -#define CONFIG_TUXXX /* TUXX1 board (tuxa1/tuda1) specific */ +#elif defined(CONFIG_TUXX1) /* TUXX1 board (tuxa1/tuda1) specific */ #define CONFIG_KM_BOARD_NAME "tuxx1" #define CONFIG_HOSTNAME tuxx1 +#elif defined(CONFIG_KMOPTI2) +#define CONFIG_KM_BOARD_NAME "kmopti2" +#define CONFIG_HOSTNAME kmopti2 +#else +#error ("Board not supported") #endif #define CONFIG_SYS_TEXT_BASE 0xF0000000 @@ -46,18 +50,18 @@ #define CONFIG_SYS_APP1_BASE 0xA0000000 /* PAXG */ #define CONFIG_SYS_APP1_SIZE 256 /* Megabytes */ -#ifndef CONFIG_KM_DISABLE_APP2 +#if defined(CONFIG_TUXX1) || defined(CONFIG_KMOPTI2) #define CONFIG_SYS_APP2_BASE 0xB0000000 /* PINC3 */ #define CONFIG_SYS_APP2_SIZE 256 /* Megabytes */ #endif /* * Init Local Bus Memory Controller: - * - * Bank Bus Machine PortSz Size Device on TUDA1 TUXA1 TUGE1 KMSUPX4 - * ---- --- ------- ------ ----- --------------------------------------- - * 2 Local GPCM 8 bit 256MB PAXG LPXF PAXI LPXF - * 3 Local GPCM 8 bit 256MB PINC3 PINC2 unused unused + * Device on + * Bank Bus Machine PortSz Size TUDA1 TUXA1 TUGE1 KMSUPX4 KMOPTI2 + * ---- --- ------- ------ ----- --------------------------------------- + * 2 Local GPCM 8 bit 256MB PAXG LPXF PAXI LPXF PAXE + * 3 Local GPCM 8 bit 256MB PINC3 PINC2 unused unused OPI2(16 bit) * */ @@ -81,7 +85,7 @@ OR_GPCM_TRLX_SET | \ OR_GPCM_EHTR_CLEAR | \ OR_GPCM_EAD) -#ifndef CONFIG_KM_DISABLE_APP2 +#if defined(CONFIG_TUXX1) /* * Configuration for C3 on the local bus */ @@ -107,6 +111,22 @@ MxMR_WLFx_2X) #endif +#if defined(CONFIG_KMOPTI2) +/* + * Configuration for C3 on the local bus + */ +#define CONFIG_SYS_LBLAWBAR3_PRELIM CONFIG_SYS_APP2_BASE +#define CONFIG_SYS_LBLAWAR3_PRELIM (LBLAWAR_EN | LBLAWAR_256MB) +#define CONFIG_SYS_BR3_PRELIM (CONFIG_SYS_APP2_BASE | \ + BR_PS_16 | \ + BR_MS_GPCM | \ + BR_V) +#define CONFIG_SYS_OR3_PRELIM (MEG_TO_AM(CONFIG_SYS_APP2_SIZE) | \ + OR_GPCM_SCY_4 | \ + OR_GPCM_TRLX_CLEAR | \ + OR_GPCM_EHTR_CLEAR) +#endif + /* * MMU Setup */ @@ -125,7 +145,7 @@ BATL_GUARDEDSTORAGE) #define CONFIG_SYS_DBAT5U CONFIG_SYS_IBAT5U -#ifdef CONFIG_KM_DISABLE_APP2 +#if defined(CONFIG_TUGE1) || defined(CONFIG_KMSUPX5) #define CONFIG_SYS_IBAT6L (0) #define CONFIG_SYS_IBAT6U (0) #define CONFIG_SYS_DBAT6L CONFIG_SYS_IBAT6L |