keymile board update
cover keymile board update
The following patchset updates the support for the keymile boards.
- heavy rework of the headerfiles, common board code
- add support for 4 new mpc83xx based boards
- add support for 1 82xx based board
- add support for 2 new kirkwood based boards
- fix i2c deblocking for this boards
Patch overview:
Heiko Schocher (15):
keymile: rework headerfiles for keymile boards
mpc832x: add support for the mpc8321 based suvd3 board
mpc832x: add support for mpc8321 based tuxa1 board
mpc832x: add support for mpc8321 based tuda1 board
arm: add support for kirkwood based mgcoge2un board
arm: add support of Kirkwood based board SUEN8
ppc: add support for ppc based board mgcoge2ne powerpc, 83xx: add kmsupx5 board support
km-arm: i2c support for suenx based boards
km_arm: change some register values for SDRAM initialization ppc, 8321: cleanup tuxa1, tuda1 and suvd3 support keymile, common; fix i2c deblocking support
arm, keymile: updates for the arm based boards from keymile keymile boards: add CONFIG_PIGGY_MAC_ADRESS_OFFSET keymile, common: add setting of some environment variables
Holger Brunck (2):
ppc, arm: rework and enhance keymile-common.h keymile-common.h: remove IO mux stuff
Huber, Andreas (1):
ppc, mgcoge, mgcoge2ne: add DIP switch detection
Thomas Herzmann (1):
keymile boards: support of boardId / hwkey lists
Thomas Reufer (1):
keymile, 8321 boards: move common definitions to km8321-common.h
MAINTAINERS | 7 +
arch/powerpc/cpu/mpc83xx/fdt.c | 3 +-
arch/powerpc/lib/bootcount.c | 2 +-
board/keymile/common/common.c | 179 ++++++--
board/keymile/common/common.h | 5 +
board/keymile/{kmeter1 => km83xx}/Makefile | 0
.../keymile/{kmeter1/kmeter1.c => km83xx/km83xx.c} | 101 ++++-
board/keymile/km_arm/km_arm.c | 70 +++-
board/keymile/km_arm/kwbimage.cfg | 32 +-
board/keymile/mgcoge/mgcoge.c | 34 ++-
boards.cfg | 9 +-
include/configs/keymile-common.h | 465 ++++++++++++++------
include/configs/km-powerpc.h | 92 ++++
include/configs/km82xx-common.h | 321 ++++++++++++++
include/configs/km8321-common.h | 140 ++++++
include/configs/km83xx-common.h | 325 ++++++++++++++
include/configs/km_arm.h | 97 ++++-
include/configs/kmeter1.h | 344 ++-------------
include/configs/kmsupx5.h | 89 ++++
include/configs/mgcoge.h | 296 +------------
include/configs/mgcoge2ne.h | 63 +++
include/configs/mgcoge2un.h | 62 +++
include/configs/suen3.h | 45 +--
include/configs/suen8.h | 61 +++
include/configs/suvd3.h | 104 +++++
include/configs/tuda1.h | 141 ++++++
include/configs/tuxa1.h | 124 ++++++
post/lib_powerpc/fpu/Makefile | 33 --
28 files changed, 2313 insertions(+), 931 deletions(-)
rename board/keymile/{kmeter1 => km83xx}/Makefile (100%)
rename board/keymile/{kmeter1/kmeter1.c => km83xx/km83xx.c} (64%)
create mode 100644 include/configs/km-powerpc.h
create mode 100644 include/configs/km82xx-common.h
create mode 100644 include/configs/km8321-common.h
create mode 100644 include/configs/km83xx-common.h
create mode 100644 include/configs/kmsupx5.h
create mode 100644 include/configs/mgcoge2ne.h
create mode 100644 include/configs/mgcoge2un.h
create mode 100644 include/configs/suen8.h
create mode 100644 include/configs/suvd3.h
create mode 100644 include/configs/tuda1.h
create mode 100644 include/configs/tuxa1.h
delete mode 100644 post/lib_powerpc/fpu/MakefilePATCH 1/20 keymile: rework headerfiles for keymile boards
- This patch reworks all headerfiles for keymile boards (coge, supx4, eter1, suen3).
Furthermore, a refactoring on the whole environment variables has been acomplished.
- Environment variables:
- grouped into logical blocks (#defines) based on the functionality/purpose
- short description for most of the variables
- as much as possible is moved into the common headerfiles
- keymile powerpc specific config settings are moved to km-powerpc.h
- Keep the kernel command line clean from KM 'specialities'. The boardId and hwKey is no longer needed as kernel arguments. They are stored in the U-Boot environment and read out from userspace later with the help of fw_printenv or equivalent tools.
- km8xx: default environment partitioning corrected
- km_arm: MACH_TYPE changed to MACH_TYPE_KM_KIRKWOOD
--- board/keymile/common/common.c | 4 +- board/keymile/km_arm/km_arm.c | 2 +- include/configs/keymile-common.h | 275 ++++++++++++++++++++++---------------- include/configs/km-powerpc.h | 92 +++++++++++++ include/configs/km_arm.h | 30 ++++- include/configs/kmeter1.h | 40 +++--- include/configs/mgcoge.h | 38 +++--- 7 files changed, 316 insertions(+), 165 deletions(-) create mode 100644 include/configs/km-powerpc.h
board/keymile/common/common.c +2 -2
@@ -500,7 +500,7 @@ void i2c_init_board(void)out_8 (&dev->cr, (I2C_CR_MEN ));#else -#if defined(CONFIG_HARD_I2C ) && !defined(CONFIG_MACH_SUEN3 ) +#if defined(CONFIG_HARD_I2C ) && !defined(MACH_TYPE_KM_KIRKWOOD )volatile immap_t *immap = (immap_t *)CONFIG_SYS_IMMR ;volatile i2c8260_t *i2c = (i2c8260_t *)&immap->im_i2c;
@@ -578,7 +578,7 @@ int fdt_get_node_and_value (void *blob, }#endif -#if !defined(CONFIG_MACH_SUEN3 ) +#if !defined(MACH_TYPE_KM_KIRKWOOD )int ethernet_present (void ) {return (in_8 ((u8 *)CONFIG_SYS_PIGGY_BASE +CONFIG_SYS_SLOT_ID_OFF ) &0x80 );
board/keymile/km_arm/km_arm.c +1 -1
@@ -180,7 +180,7 @@ int board_init(void)/* * arch number of board */ - gd->bd->bi_arch_number =MACH_TYPE_SUEN3 ; + gd->bd->bi_arch_number =MACH_TYPE_KM_KIRKWOOD ;/* address of boot parameters */ gd->bd->bi_boot_params =kw_sdram_bar (0 ) +0x100 ;
include/configs/keymile-common.h +157 -118
353 lines not on this page · raw message
include/configs/km-powerpc.h new file +92 -0
92 lines not on this page · raw message
include/configs/km_arm.h +27 -3
@@ -6,6 +6,9 @@* (C) Copyright 2009 * Stefan Roese, DENX Software Engineering, sr at denx.de. * +* (C) Copyright 2010 +* Heiko Schocher, DENX Software Engineering, hs at denx.de. +* * See file CREDITS for list of people who contributed to this * project. *
@@ -38,12 +41,33 @@#define CONFIG_FEROCEON_88FR131 /* CPU Core subversion */ #define CONFIG_KIRKWOOD /* SOC Family Name */ #define CONFIG_KW88F6281 /* SOC Name */ -#define CONFIG_MACH_SUEN3 /* Machine type */ +#define CONFIG_MACH_KM_KIRKWOOD /* Machine type */ /* include common defines/options for all Keymile boards */ #include "keymile-common.h" -#undef CONFIG_CMD_DTT -#undef CONFIG_BOOTCOUNT_LIMIT + +#define CONFIG_ENV_SIZE (128 << 10)/* NAND chip block size */ +#define CONFIG_SYS_MEMTEST_START 0x00400000/* 4M */ +#define CONFIG_SYS_MEMTEST_END 0x007fffff/*(_8M -1) */ +#define CONFIG_SYS_LOAD_ADDR 0x00800000/* default load adr- 8M */ + +/* pseudo-non volatile RAM [hex] */ +#define CONFIG_KM_PNVRAM 0x80000 +/* physical RAM MTD size [hex] */ +#define CONFIG_KM_PHRAM 0x17F000 + +#define CONFIG_KM_CRAMFS_ADDR 0x2400000 +#define CONFIG_KM_KERNEL_ADDR 0x2000000/* 4096KBytes */ + +#define CONFIG_KM_DEF_ENV_CPU \ + "addmtdparts=setenv bootargs ${bootargs} ${mtdparts}\0" \ + "boot=bootm ${actual_kernel_addr} - -\0" \ + "cramfsloadfdt=echo \\\\c\0" \ + "tftpfdt=echo \\\\c\0" \ + CONFIG_KM_DEF_ENV_UPDATE \ + "" + +#define CONFIG_MD5 /* get_random_hex on krikwood needs MD5 support */ #define CONFIG_SKIP_LOWLEVEL_INIT /* disable board lowlevel_init */
include/configs/kmeter1.h +18 -22
@@ -8,7 +8,7 @@* Copyright (C) 2007 MontaVista Software, Inc. * Anton Vorontsov <[email protected]> * -* (C) Copyright 2008 +* (C) Copyright 2008-2010 * Heiko Schocher, DENX Software Engineering, hs at denx.de. * * This program is free software; you can redistribute it and/or
@@ -31,16 +31,20 @@#define CONFIG_HOSTNAME kmeter1#define CONFIG_SYS_TEXT_BASE 0xF0000000 +#define CONFIG_KM_DEF_NETDEV \ + "netdev=eth2\0" \/* include common defines/options for all Keymile boards */ #include "keymile-common.h" - -#define CONFIG_KM_UBI_PARTITION_NAME "ubi0" +#include "km-powerpc.h" #define MTDIDS_DEFAULT "nor0=boot" -#define MTDPARTS_DEFAULT \ - "mtdparts=boot:768k(u-boot),128k(env),128k(envred)," \ - "-(" CONFIG_KM_UBI_PARTITION_NAME ")" +#define MTDPARTS_DEFAULT "mtdparts=" \ + "boot:" \ + "768k(u-boot)," \ + "128k(env)," \ + "128k(envred)," \ + "-(" CONFIG_KM_UBI_PARTITION_NAME ")"#define CONFIG_MISC_INIT_R 1/*
@@ -172,7 +176,7 @@#undef CONFIG_SYS_RAMBOOT#endif -#define CONFIG_SYS_MONITOR_LEN (384 * 1024)/* Reserve 384 kB for Mon */ +#define CONFIG_SYS_MONITOR_LEN (768 * 1024)/* Reserve 768 kB for Mon */ /* * Initial RAM Base Address Setup
@@ -443,7 +447,7 @@#define BOOTFLASH_START F0000000 -#define CONFIG_PRAM 512/* protected RAM [KBytes] */ +#define CONFIG_KM_CONSOLE_TTY "ttyS0"/* * Environment Configuration
@@ -455,22 +459,14 @@#define CONFIG_EXTRA_ENV_SETTINGS \ CONFIG_KM_DEF_ENV \ + "dtt_bus=pca9547:70:a\0" \ + "EEprom_ivm=pca9547:70:9\0" \ + "newenv=" \ + "prot off 0xF00C0000 +0x40000 && " \ + "era 0xF00C0000 +0x40000\0" \ "rootpath=/opt/eldk/ppc_82xx\0" \ - "addcon=setenv bootargs ${bootargs} console=ttyS0,${baudrate}\0"\ - "ramdisk_file=/tftpboot/kmeter1/uRamdisk\0" \ - "loadram=tftp ${ramdisk_addr_r} ${ramdisk_file}\0" \ - "loadfdt=tftp ${fdt_addr_r} ${fdt_file}\0" \ - "loadkernel=tftp ${kernel_addr_r} ${bootfile}\0" \ "unlock=yes\0" \ - "fdt_addr=F0080000\0" \ - "kernel_addr=F00a0000\0" \ - "ramdisk_addr=F03a0000\0" \ - "ramdisk_addr_r=F10000\0" \ - "EEprom_ivm=pca9547:70:9\0" \ - "dtt_bus=pca9547:70:a\0" \ - "mtdids=nor0=app \0" \ - "mtdparts=" MK_STR(MTDPARTS_DEFAULT) "\0" \ - "" + ""#if defined(CONFIG_UEC_ETH )#define CONFIG_HAS_ETH0
include/configs/mgcoge.h +19 -19
@@ -1,5 +1,5 @@/* -* (C) Copyright 2007 +* (C) Copyright 2007-2010 * Heiko Schocher, DENX Software Engineering, hs at denx.de. * * See file CREDITS for list of people who contributed to this
@@ -40,6 +40,7 @@/* include common defines/options for all Keymile boards */ #include "keymile-common.h" +#include "km-powerpc.h" /* * Select serial console configuration
@@ -81,31 +82,30 @@#define CONFIG_8260_CLKIN 66000000/* in Hz */ #endif -#define BOOTFLASH_START FE000000 -#define CONFIG_PRAM 512/* protected RAM [KBytes] */ +#define BOOTFLASH_START 0xFE000000 -#define MTDIDS_DEFAULT "nor0=boot,nor1=app" -#define MTDPARTS_DEFAULT \ - "mtdparts=boot:384k(u-boot),128k(env),128k(envred),3456k(free);" \ - "app:3m(esw0),10m(rootfs0),3m(esw1),10m(rootfs1),1m(var),5m(cfg)" +#define CONFIG_KM_CONSOLE_TTY "ttyCPM0" + +#define MTDIDS_DEFAULT "nor3=app" +#define MTDPARTS_DEFAULT "mtdparts=" \ + "app:" \ + "768k(u-boot)," \ + "128k(env)," \ + "128k(envred)," \ + "3072k(free)," \ + "-(" CONFIG_KM_UBI_PARTITION_NAME ")" -#ifndef CONFIG_KM_DEF_ENV /* if not set by keymile-common.h */ -#define CONFIG_KM_DEF_ENV "km-common=empty\0" -#endif /* * Default environment settings */ -#define CONFIG_EXTRA_ENV_SETTINGS \ +#define CONFIG_EXTRA_ENV_SETTINGS \ CONFIG_KM_DEF_ENV \ - "rootpath=/opt/eldk/ppc_82xx\0" \ - "addcon=setenv bootargs ${bootargs} " \ - "console=ttyCPM0,${baudrate}\0" \ - "mtdids=nor0=boot,nor1=app \0" \ - "partition=nor1,5 \0" \ - "new_env=prot off FE060000 FE09FFFF; era FE060000 FE09FFFF \0" \ "EEprom_ivm=pca9544a:70:4 \0" \ - "mtdparts=" MK_STR(MTDPARTS_DEFAULT) "\0" \ "unlock=yes\0" \ + "newenv=" \ + "prot off 0xFE0C0000 +0x40000 && " \ + "era 0xFE0C0000 +0x40000\0" \ + "rootpath=/opt/eldk/ppc_82xx\0" \ ""#define CONFIG_SYS_SDRAM_BASE 0x00000000
@@ -130,7 +130,7 @@#define CONFIG_SYS_RAMBOOT #endif -#define CONFIG_SYS_MONITOR_LEN (384 << 10)/* Reserve 384KB for Monitor */ +#define CONFIG_SYS_MONITOR_LEN (768 << 10)/* Reserve 768KB for Monitor */ #define CONFIG_ENV_IS_IN_FLASH
Signature · 1 line
1.7.4
PATCH 1/20 keymile: rework headerfiles for keymile boards
Dear Heiko Schocher,
Quoted 4 lines · In message <[email protected]> you wrote:
- This patch reworks all headerfiles for keymile boards (coge, supx4, eter1, suen3).
Furthermore, a refactoring on the whole environment variables has been acomplished.
Two independent changes => Please submit as two separate patches.
...
Quoted 1 line
+#define
CONFIG_HUSH_INIT_VAR1
...
Quoted 1 line
+#define
CONFIG_I2C_MULTI_BUS1
...
Quoted 1 line
+#define
CONFIG_I2C_MUX1
Defines like these that select functions only should not be assigned any numeric (or other value). Please omit thse. Please fix globally.
Quoted 1 line
+#define
CONFIG_KM_DEF_ENV_CONSTANTS\
...
include/configs/keymile-common.h line 284
Quoted 2 lines
include/configs/keymile-common.h +2
-0+"default=" \ +"setenv default \'run newenv; reset\' && " \
These backslashes are redundant at best. Why not drop them?
...
include/configs/keymile-common.h line 312
Quoted 1 line
include/configs/keymile-common.h +1
-0+ "u-boot=" xstr(CONFIG_HOSTNAME) "/u-boot.bin \0" \
Are you sure you really want that trailing blank? [Please check globally.]
...
Quoted 1 line
+#define
CONFIG_SYS_MONITOR_LEN(768 << 10) /* Reserve 768KB for Monitor */
Line too long. Please fix globally.
Best regards,
Wolfgang Denk
Signature · 6 lines
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: [email protected] I object to intellect without discipline; I object to power without constructive purpose. -- Spock, "The Squire of Gothos", stardate 2124.5
PATCH 1/20 keymile: rework headerfiles for keymile boards
Hello Wolfgang,
Quoted 7 lines · Wolfgang Denk
Quoted 4 lines · In message <[email protected]> you wrote:
- This patch reworks all headerfiles for keymile boards (coge, supx4, eter1, suen3).
Furthermore, a refactoring on the whole environment variables has been acomplished.Two independent changes => Please submit as two separate patches.
Ok, I try to split this in two patches.
Quoted 9 lines
...
Quoted 1 line
+#define
CONFIG_HUSH_INIT_VAR1...
Quoted 1 line
+#define
CONFIG_I2C_MULTI_BUS1...
Quoted 1 line
+#define
CONFIG_I2C_MUX1Defines like these that select functions only should not be assigned any numeric (or other value). Please omit thse. Please fix globally.
Ok.
Quoted 6 lines
Quoted 1 line
+#define
CONFIG_KM_DEF_ENV_CONSTANTS\...
include/configs/keymile-common.h line 284
Quoted 2 lines
include/configs/keymile-common.h +2
-0+"default=" \ +"setenv default \'run newenv; reset\' && " \These backslashes are redundant at best. Why not drop them?
Ok, drop it.
Quoted 5 lines
...
include/configs/keymile-common.h line 312
Quoted 1 line
include/configs/keymile-common.h +1
-0+ "u-boot=" xstr(CONFIG_HOSTNAME) "/u-boot.bin \0" \Are you sure you really want that trailing blank? [Please check globally.]
Good cathc, check this.
Quoted 4 lines
...
Quoted 1 line
+#define
CONFIG_SYS_MONITOR_LEN(768 << 10) /* Reserve 768KB for Monitor */Line too long. Please fix globally.
Ok.
bye,
Heiko
Signature · 2 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
PATCH 2/20 mpc832x: add support for the mpc8321 based suvd3 board
In reply to Heiko Schocher- serial console on UART1
- Ethernet RMII over UCC4
- PHY SMSC LAN8700
- 64MB Flash
- 128 MB DDR2 RAM
- I2C
- bootcount
This board is similiar to the kmeter1 (8360) board, so common config options are extracted into the include/configs/km83xx-common.h file.
--- MAINTAINERS | 1 + arch/powerpc/cpu/mpc83xx/fdt.c | 3 +- arch/powerpc/lib/bootcount.c | 2 +- board/keymile/common/common.c | 9 +- board/keymile/km83xx/Makefile | 53 +++++++ board/keymile/km83xx/km83xx.c | 271 ++++++++++++++++++++++++++++++++ board/keymile/kmeter1/Makefile | 53 ------- board/keymile/kmeter1/kmeter1.c | 217 -------------------------- boards.cfg | 3 +- include/configs/km83xx-common.h | 325 ++++++++++++++++++++++++++++++++++++++ include/configs/kmeter1.h | 326 +++------------------------------------ include/configs/suvd3.h | 217 ++++++++++++++++++++++++++ post/lib_powerpc/fpu/Makefile | 33 ---- 13 files changed, 896 insertions(+), 617 deletions(-) create mode 100644 board/keymile/km83xx/Makefile create mode 100644 board/keymile/km83xx/km83xx.c delete mode 100644 board/keymile/kmeter1/Makefile delete mode 100644 board/keymile/kmeter1/kmeter1.c create mode 100644 include/configs/km83xx-common.h create mode 100644 include/configs/suvd3.h delete mode 100644 post/lib_powerpc/fpu/Makefile
MAINTAINERS +1 -0
@@ -433,6 +433,7 @@ Heiko Schocher <[email protected]> municse MPC5200 sc3 PPC405GP suen3 ARM926EJS (Kirkwood SoC) + suvd3 MPC8321 uc101 MPC5200 ve8313 MPC8313
arch/powerpc/cpu/mpc83xx/fdt.c +2 -1
@@ -32,7 +32,8 @@ extern void ft_qe_setup(void *blob);DECLARE_GLOBAL_DATA_PTR ; -#if defined(CONFIG_BOOTCOUNT_LIMIT ) && defined(CONFIG_MPC8360 ) +#if defined(CONFIG_BOOTCOUNT_LIMIT ) && \ + (defined(CONFIG_MPC8360 ) || defined(CONFIG_MPC832x))#include <asm/immap_qe.h> void fdt_fixup_muram (void *blob)
arch/powerpc/lib/bootcount.c +1 -1
@@ -51,7 +51,7 @@#define CONFIG_SYS_BOOTCOUNT_ADDR (CONFIG_SYS_IMMR + CPM_BOOTCOUNT_ADDR)#endif /* defined(CONFIG_MPC8260) */ -#if defined(CONFIG_MPC8360 ) +#if defined(CONFIG_MPC8360 ) || defined(CONFIG_MPC832x)#include <asm/immap_qe.h> #define CONFIG_SYS_BOOTCOUNT_ADDR (CONFIG_SYS_IMMR + 0x110000 + \
board/keymile/common/common.c +5 -4
@@ -29,6 +29,7 @@#include <malloc.h> #include <hush.h> #include <net.h> +#include <netdev.h> #include <asm/io.h> #if defined(CONFIG_OF_BOARD_SETUP ) && defined(CONFIG_OF_LIBFDT )
@@ -424,7 +425,7 @@ static int get_scl (void) }#endif -#if !defined(CONFIG_KMETER1 ) +#if !defined(CONFIG_MPC83xx)static void writeStartSeq (void ) {set_sda (1 );
@@ -483,7 +484,7 @@ static int i2c_make_abort (void)*/ void i2c_init_board (void ) { -#if defined(CONFIG_KMETER1 ) +#if defined(CONFIG_MPC83xx)struct fsl_i2c *dev; dev = (struct fsl_i2c *) (CONFIG_SYS_IMMR +CONFIG_SYS_I2C_OFFSET );uchar dummy;
@@ -591,7 +592,7 @@ int board_eth_init (bd_t *bis) (void )keymile_hdlc_enet_initialize (bis);#endif if (ethernet_present ()) { -return -1 ; +return cpu_eth_init (bis); } -return 0 ; +return -1 ; }
board/keymile/km83xx/Makefile new file +53 -0
53 lines not on this page · raw message
board/keymile/km83xx/km83xx.c new file +271 -0
271 lines not on this page · raw message
board/keymile/kmeter1/Makefile deleted +0 -53
53 lines not on this page · raw message
board/keymile/kmeter1/kmeter1.c deleted +0 -217
217 lines not on this page · raw message
boards.cfg +2 -1
@@ -470,10 +470,11 @@ MPC8360ERDK_66 powerpc mpc83xx mpc8360erdk freesca MPC837XEMDS powerpc mpc83xx mpc837xemds freescale - MPC837XEMDS MPC837XEMDS_HOST powerpc mpc83xx mpc837xemds freescale - MPC837XEMDS:PCI MPC837XERDB powerpc mpc83xx mpc837xerdb freescale -kmeter1 powerpc mpc83xx kmeter1 keymile +kmeter1 powerpc mpc83xx km83xx keymile MVBLM7 powerpc mpc83xx mvblm7 matrix_vision SIMPC8313_LP powerpc mpc83xx simpc8313 sheldon - SIMPC8313:NAND_LP SIMPC8313_SP powerpc mpc83xx simpc8313 sheldon - SIMPC8313:NAND_SP +suvd3 powerpc mpc83xx km83xx keymile TQM834x powerpc mpc83xx tqm834x tqc sbc8540 powerpc mpc85xx sbc8560 - - SBC8540 sbc8540_33 powerpc mpc85xx sbc8560 - - SBC8540
include/configs/km83xx-common.h new file +325 -0
325 lines not on this page · raw message
include/configs/kmeter1.h +19 -307
392 lines not on this page · raw message
include/configs/suvd3.h new file +217 -0
217 lines not on this page · raw message
post/lib_powerpc/fpu/Makefile deleted +0 -33
@@ -1,33 +0,0 @@ -# -# (C) Copyright 2007 -# Wolfgang Denk, DENX Software Engineering, [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 -# -include $(TOPDIR)/config.mk - -LIB = libpost$(ARCH)fpu.o - -COBJS-$(CONFIG_HAS_POST) += fpu.o 20001122-1.o 20010114-2.o 20010226-1.o 980619-1.o -COBJS-$(CONFIG_HAS_POST) += acc1.o compare-fp-1.o mul-subnormal-single-1.o - -include $(TOPDIR)/post/rules.mk - -CFLAGS := $(shell echo $(CFLAGS) | sed s/-msoft-float//) -CFLAGS += -mhard-float -fkeep-inline-functions
Signature · 1 line
1.7.4
PATCH 2/20 mpc832x: add support for the mpc8321 based suvd3 board
Dear Heiko Schocher,
Quoted 11 lines · In message <[email protected]> you wrote:
- serial console on UART1
- Ethernet RMII over UCC4
- PHY SMSC LAN8700
- 64MB Flash
- 128 MB DDR2 RAM
- I2C
- bootcountThis board is similiar to the kmeter1 (8360) board, so common config options are extracted into the
include/configs/km83xx-common.hfile.
...
arch/powerpc/cpu/mpc83xx/fdt.c extern void ft_qe_setup(void *blob); · line 37
Quoted 4 lines
arch/powerpc/cpu/mpc83xx/fdt.c +2
-1-#if defined(CONFIG_BOOTCOUNT_LIMIT ) && defined(CONFIG_MPC8360 ) +#if defined(CONFIG_BOOTCOUNT_LIMIT ) && \ + (defined(CONFIG_MPC8360 ) || defined(CONFIG_MPC832x))#include <asm/immap_qe.h>
Please keep lists sorted: 832x < 8360. Please fix globally.
board/keymile/km83xx/km83xx.c line 232
Quoted 12 lines
board/keymile/km83xx/km83xx.c new file +12
-0+phys_size_t initdram (int board_type) +{ +#if defined(CONFIG_DDR_ECC ) && !defined(CONFIG_ECC_INIT_VIA_DDRCONTROLLER ) +extern void ddr_enable_ecc (unsigned int dram_size); +#endif +volatile immap_t *im = (immap_t *)CONFIG_SYS_IMMR ; +u32 msize =0 ; + +if ((im->sysconf.immrbar &IMMRBAR_BASE_ADDR ) != (u32 )im) +return -1 ; + +/* DDR SDRAM - Main SODIMM */
Is this comment correct?
board/keymile/km83xx/km83xx.c line 234
Quoted 2 lines
board/keymile/km83xx/km83xx.c new file +2
-0+ im->sysconf.ddrlaw[0 ].bar =CONFIG_SYS_DDR_BASE &LAWBAR_BAR ; + msize =fixed_sdram ();
Can we not use get_ram_size() ?
Quoted 1 line
+extern int
ivm_read_eeprom(void);
Protoypes belong to header files.
Um... seems you did not run checkpatch?
I see this:
[PATCH 01/20] keymile: rework headerfiles for keymile boards
total: 0 errors, 16 warnings, 659 lines checked
[PATCH 02/20] mpc832x: add support for the mpc8321 based suvd3 board
total: 17 errors, 63 warnings, 1326 lines checked
[PATCH 03/20] mpc832x: add support for mpc8321 based tuxa1 board
total: 16 errors, 2 warnings, 250 lines checked
[PATCH 04/20] mpc832x: add support for mpc8321 based tuda1 board
total: 0 errors, 4 warnings, 265 lines checked
...
[PATCH 06/20] arm: add support of Kirkwood based board SUEN8
total: 0 errors, 1 warnings, 73 lines checked
[PATCH 07/20] ppc: add support for ppc based board mgcoge2ne
total: 11 errors, 14 warnings, 733 lines checked
...
[PATCH 09/20] powerpc, 83xx: add kmsupx5 board support
total: 3 errors, 3 warnings, 103 lines checked
[PATCH 10/20] km-arm: i2c support for suenx based boards
total: 1 errors, 0 warnings, 70 lines checked
...
[PATCH 12/20] ppc, 8321: cleanup tuxa1, tuda1 and suvd3 support
total: 1 errors, 5 warnings, 570 lines checked
[PATCH 13/20] keymile, common; fix i2c deblocking support
total: 0 errors, 21 warnings, 161 lines checked
[PATCH 14/20] arm, keymile: updates for the arm based boards from keymile
total: 0 errors, 2 warnings, 142 lines checked
[PATCH 15/20] keymile boards: add CONFIG_PIGGY_MAC_ADRESS_OFFSET
total: 1 errors, 1 warnings, 38 lines checked
[PATCH 16/20] keymile, common: add setting of some environment variables
total: 0 errors, 7 warnings, 145 lines checked
[PATCH 17/20] ppc, arm: rework and enhance keymile-common.h
total: 0 errors, 3 warnings, 253 lines checked
...
[PATCH 19/20] keymile-common.h: remove IO mux stuff
total: 3 errors, 5 warnings, 27 lines checked
Please check and fix where needed. I stop reviewing here.
Best regards,
Wolfgang Denk
Signature · 4 lines
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 I'd rather be led to hell than managed to heaven.
PATCH 2/20 mpc832x: add support for the mpc8321 based suvd3 board
Hello Wolfgang,
Quoted 15 lines · Wolfgang Denk
Dear Heiko Schocher,
Quoted 11 lines · In message <[email protected]> you wrote:
- serial console on UART1
- Ethernet RMII over UCC4
- PHY SMSC LAN8700
- 64MB Flash
- 128 MB DDR2 RAM
- I2C
- bootcountThis board is similiar to the kmeter1 (8360) board, so common config options are extracted into the
include/configs/km83xx-common.hfile.
Quoted 7 lines
...
arch/powerpc/cpu/mpc83xx/fdt.c extern void ft_qe_setup(void *blob); · line 37
Quoted 4 lines
arch/powerpc/cpu/mpc83xx/fdt.c +2
-1-#if defined(CONFIG_BOOTCOUNT_LIMIT ) && defined(CONFIG_MPC8360 ) +#if defined(CONFIG_BOOTCOUNT_LIMIT ) && \ + (defined(CONFIG_MPC8360 ) || defined(CONFIG_MPC832x))#include <asm/immap_qe.h> Please keep lists sorted: 832x < 8360. Please fix globally.
Ok.
Quoted 6 lines
Quoted 6 lines
board/keymile/km83xx/km83xx.c new file +6
-0+phys_size_t initdram (int board_type) +{ +#if defined(CONFIG_DDR_ECC ) && !defined(CONFIG_ECC_INIT_VIA_DDRCONTROLLER ) +extern void ddr_enable_ecc (unsigned int dram_size); +#endif +volatile immap_t *im = (immap_t *)CONFIG_SYS_IMMR ;
Quoted 8 lines
board/keymile/km83xx/km83xx.c line 232
Quoted 6 lines
board/keymile/km83xx/km83xx.c new file +6
-0+u32 msize =0 ; + +if ((im->sysconf.immrbar &IMMRBAR_BASE_ADDR ) != (u32 )im) +return -1 ; + +/* DDR SDRAM - Main SODIMM */ Is this comment correct?
No, remove it.
Quoted 4 lines
board/keymile/km83xx/km83xx.c line 234
Quoted 2 lines
board/keymile/km83xx/km83xx.c new file +2
-0+ im->sysconf.ddrlaw[0 ].bar =CONFIG_SYS_DDR_BASE &LAWBAR_BAR ; + msize =fixed_sdram ();Can we not use
get_ram_size()?
fixed_sdram calls this.
Quoted 3 lines
Quoted 1 line
+extern int
ivm_read_eeprom(void);Protoypes belong to header files.
Yep, this extern is not needed, as the header file is included, remove it.
Quoted 1 line
Um... seems you did not run checkpatch?
:-(
Argh, you are right ...
Quoted 4 lines
I see this:
[PATCH 01/20] keymile: rework headerfiles for keymile boards
total: 0 errors, 16 warnings, 659 lines checked
Hmm... I see other statistics:
[hs at pollux u-boot]$ ./../linux-2.6-denx/scripts/checkpatch.pl 20110308/0001-keymile-rework-headerfiles-for-keymile-boards.patch
WARNING: line over 80 characters
#636: FILE: include/configs/kmeter1.h:179:
+#define CONFIG_SYS_MONITOR_LEN (768 * 1024) /* Reserve 768 kB for Mon */
WARNING: line over 80 characters
#750: FILE: include/configs/mgcoge.h:133:
+#define CONFIG_SYS_MONITOR_LEN (768 << 10) /* Reserve 768KB for Monitor */
total: 0 errors, 2 warnings, 659 lines checked
20110313/0001-keymile-rework-headerfiles-for-keymile-boards.patch has style problems, please review. If any of these errors are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
[hs@pollux u-boot]$
Only 2 warnings ... which checkpatch.pl do you use?
Quoted 34 lines
[PATCH 02/20] mpc832x: add support for the mpc8321 based suvd3 board
total: 17 errors, 63 warnings, 1326 lines checked
[PATCH 03/20] mpc832x: add support for mpc8321 based tuxa1 board
total: 16 errors, 2 warnings, 250 lines checked
[PATCH 04/20] mpc832x: add support for mpc8321 based tuda1 board
total: 0 errors, 4 warnings, 265 lines checked
...
[PATCH 06/20] arm: add support of Kirkwood based board SUEN8
total: 0 errors, 1 warnings, 73 lines checked
[PATCH 07/20] ppc: add support for ppc based board mgcoge2ne
total: 11 errors, 14 warnings, 733 lines checked
...
[PATCH 09/20] powerpc, 83xx: add kmsupx5 board support
total: 3 errors, 3 warnings, 103 lines checked
[PATCH 10/20] km-arm: i2c support for suenx based boards
total: 1 errors, 0 warnings, 70 lines checked
...
[PATCH 12/20] ppc, 8321: cleanup tuxa1, tuda1 and suvd3 support
total: 1 errors, 5 warnings, 570 lines checked
[PATCH 13/20] keymile, common; fix i2c deblocking support
total: 0 errors, 21 warnings, 161 lines checked
[PATCH 14/20] arm, keymile: updates for the arm based boards from keymile
total: 0 errors, 2 warnings, 142 lines checked
[PATCH 15/20] keymile boards: addCONFIG_PIGGY_MAC_ADRESS_OFFSET
total: 1 errors, 1 warnings, 38 lines checked
[PATCH 16/20] keymile, common: add setting of some environment variables
total: 0 errors, 7 warnings, 145 lines checked
[PATCH 17/20] ppc, arm: rework and enhancekeymile-common.h
total: 0 errors, 3 warnings, 253 lines checked
...
[PATCH 19/20]keymile-common.h: remove IO mux stuff
total: 3 errors, 5 warnings, 27 lines checked
Quoted 1 line
Please check and fix where needed. I stop reviewing here.
Ok, I recheck this, thanks!
bye,
Heiko
Signature · 2 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
PATCH 2/20 mpc832x: add support for the mpc8321 based suvd3 board
Dear Heiko,
Quoted 7 lines · In message <[email protected]> you wrote:
Quoted 5 lines
board/keymile/km83xx/km83xx.c line 234
Quoted 3 lines
board/keymile/km83xx/km83xx.c new file +2
-0+ im->sysconf.ddrlaw[0 ].bar =CONFIG_SYS_DDR_BASE &LAWBAR_BAR ; + msize =fixed_sdram ();Can we not use
get_ram_size()?
fixed_sdramcalls this.
I see, thanks.
Quoted 6 lines
Quoted 4 lines
I see this:
[PATCH 01/20] keymile: rework headerfiles for keymile boards
total: 0 errors, 16 warnings, 659 lines checkedHmm... I see other statistics:
I'm using
-> checkpatch.pl --version Usage: checkpatch.pl [OPTION]... [FILE]... Version: 0.31
Quoted 1 line
[hs at pollux u-boot]$
./../linux-2.6-denx/scripts/checkpatch.pl20110308/0001-keymile-rework-headerfiles-for-keymile-boards.patch
This should be the same version, assuming your repository is up to date.
Quoted 8 lines
WARNING: line over 80 characters
#636: FILE:include/configs/kmeter1.h:179:
+#defineCONFIG_SYS_MONITOR_LEN(768 * 1024) /* Reserve 768 kB for Mon */WARNING: line over 80 characters
#750: FILE:include/configs/mgcoge.h:133:
+#defineCONFIG_SYS_MONITOR_LEN(768 << 10) /* Reserve 768KB for Monitor */
Quoted 8 lines
total: 0 errors, 2 warnings, 659 lines checked
20110313/0001-keymile-rework-headerfiles-for-keymile-boards.patchhas style problems, please review. If any of these errors are false positives report them to the maintainer, see
CHECKPATCH inMAINTAINERS.
[hs at pollux u-boot]$Only 2 warnings ... which checkpatch.pl do you use?
You must be doing something wrong.
On pollux, as you:
-> /home/git/linux-2.6-denx/scripts/checkpatch.pl --no-tree /tmp/patch
WARNING: please, no space before tabs
#221: FILE: include/configs/keymile-common.h:117:
+#define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS ^I3$
...
WARNING: please, no space before tabs
#791: FILE: include/configs/mgcoge.h:107:
+^I^I"era 0xFE0C0000 +0x40000\0" ^I^I^I^I\$
WARNING: line over 80 characters
#801: FILE: include/configs/mgcoge.h:133:
+#define CONFIG_SYS_MONITOR_LEN (768 << 10) /* Reserve 768KB for Monitor */
total: 0 errors, 16 warnings, 659 lines checked
Best regards,
Wolfgang Denk
Signature · 5 lines
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: [email protected] I'm a soldier, not a diplomat. I can only tell the truth. -- Kirk, "Errand of Mercy", stardate 3198.9
PATCH 3/20 mpc832x: add support for mpc8321 based tuxa1 board
In reply to Heiko SchocherThis board is similar to suvd3 board. So most initialisation topics are taken from suvd3 (UART1, Ethernet, piggy PHY, flash, ram) only the application specific chip selects differ.
--- MAINTAINERS | 1 + boards.cfg | 1 + include/configs/tuxa1.h | 236 +++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 238 insertions(+), 0 deletions(-) create mode 100644 include/configs/tuxa1.h
MAINTAINERS +1 -0
@@ -434,6 +434,7 @@ Heiko Schocher <[email protected]> sc3 PPC405GP suen3 ARM926EJS (Kirkwood SoC) suvd3 MPC8321 + tuxa1 MPC8321 uc101 MPC5200 ve8313 MPC8313
boards.cfg +1 -0
@@ -476,6 +476,7 @@ SIMPC8313_LP powerpc mpc83xx simpc8313 sheldon SIMPC8313_SP powerpc mpc83xx simpc8313 sheldon - SIMPC8313:NAND_SP suvd3 powerpc mpc83xx km83xx keymile TQM834x powerpc mpc83xx tqm834x tqc +tuxa1 powerpc mpc83xx km83xx keymile sbc8540 powerpc mpc85xx sbc8560 - - SBC8540 sbc8540_33 powerpc mpc85xx sbc8560 - - SBC8540 sbc8540_66 powerpc mpc85xx sbc8560 - - SBC8540
include/configs/tuxa1.h new file +236 -0
236 lines not on this page · raw message
Signature · 1 line
1.7.4
PATCH 4/20 mpc832x: add support for mpc8321 based tuda1 board
In reply to Heiko SchocherThis board is similar to suvd3 board. So most initialisation topics are taken from suvd3 (UART1, Ethernet, piggy PHY, flash, ram) only the application specific chip selects differ.
--- MAINTAINERS | 1 + boards.cfg | 1 + include/configs/tuda1.h | 251 +++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 253 insertions(+), 0 deletions(-) create mode 100644 include/configs/tuda1.h
MAINTAINERS +1 -0
@@ -434,6 +434,7 @@ Heiko Schocher <[email protected]> sc3 PPC405GP suen3 ARM926EJS (Kirkwood SoC) suvd3 MPC8321 + tuda1 MPC8321 tuxa1 MPC8321 uc101 MPC5200 ve8313 MPC8313
boards.cfg +1 -0
@@ -476,6 +476,7 @@ SIMPC8313_LP powerpc mpc83xx simpc8313 sheldon SIMPC8313_SP powerpc mpc83xx simpc8313 sheldon - SIMPC8313:NAND_SP suvd3 powerpc mpc83xx km83xx keymile TQM834x powerpc mpc83xx tqm834x tqc +tuda1 powerpc mpc83xx km83xx keymile tuxa1 powerpc mpc83xx km83xx keymile sbc8540 powerpc mpc85xx sbc8560 - - SBC8540 sbc8540_33 powerpc mpc85xx sbc8560 - - SBC8540
include/configs/tuda1.h new file +251 -0
251 lines not on this page · raw message
Signature · 1 line
1.7.4
PATCH 5/20 arm: add support for kirkwood based mgcoge2un board
In reply to Heiko SchocherThis board is similar to keymile suen3.
--- MAINTAINERS | 1 + boards.cfg | 1 + include/configs/km_arm.h | 41 +++++++++++++++++++++++++++++ include/configs/mgcoge2un.h | 60 +++++++++++++++++++++++++++++++++++++++++++ include/configs/suen3.h | 41 ----------------------------- 5 files changed, 103 insertions(+), 41 deletions(-) create mode 100644 include/configs/mgcoge2un.h
MAINTAINERS +1 -0
@@ -428,6 +428,7 @@ Heiko Schocher <[email protected]> jupiter MPC5200 kmeter1 MPC8360 mgcoge MPC8247 + mgcoge2un ARM926EJS (Kirkwood SoC) mucmc52 MPC5200 muas3001 MPC8270 municse MPC5200
boards.cfg +1 -0
@@ -94,6 +94,7 @@ davinci_schmoogie arm arm926ejs schmoogie davinci davinci_sffsdr arm arm926ejs sffsdr davinci davinci davinci_sonata arm arm926ejs sonata davinci davinci suen3 arm arm926ejs km_arm keymile kirkwood +mgcoge2un arm arm926ejs km_arm keymile kirkwood guruplug arm arm926ejs - Marvell kirkwood mv88f6281gtw_ge arm arm926ejs - Marvell kirkwood openrd_base arm arm926ejs - Marvell kirkwood
include/configs/km_arm.h +41 -0
47 lines not on this page · raw message
include/configs/mgcoge2un.h new file +60 -0
60 lines not on this page · raw message
include/configs/suen3.h +0 -41
47 lines not on this page · raw message
Signature · 1 line
1.7.4
PATCH 6/20 arm: add support of Kirkwood based board SUEN8
In reply to Heiko SchocherThe Kirwood based SUEN8 board from Keymile is at this stage the same than the suen3 board. This patch adds the board support for the suen8.
--- MAINTAINERS | 1 + boards.cfg | 1 + include/configs/suen8.h | 59 +++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 61 insertions(+), 0 deletions(-) create mode 100644 include/configs/suen8.h
MAINTAINERS +1 -0
@@ -434,6 +434,7 @@ Heiko Schocher <[email protected]> municse MPC5200 sc3 PPC405GP suen3 ARM926EJS (Kirkwood SoC) + suen8 ARM926EJS (Kirkwood SoC) suvd3 MPC8321 tuda1 MPC8321 tuxa1 MPC8321
boards.cfg +1 -0
@@ -94,6 +94,7 @@ davinci_schmoogie arm arm926ejs schmoogie davinci davinci_sffsdr arm arm926ejs sffsdr davinci davinci davinci_sonata arm arm926ejs sonata davinci davinci suen3 arm arm926ejs km_arm keymile kirkwood +suen8 arm arm926ejs km_arm keymile kirkwood mgcoge2un arm arm926ejs km_arm keymile kirkwood guruplug arm arm926ejs - Marvell kirkwood mv88f6281gtw_ge arm arm926ejs - Marvell kirkwood
include/configs/suen8.h new file +59 -0
59 lines not on this page · raw message
Signature · 1 line
1.7.4
PATCH 7/20 ppc: add support for ppc based board mgcoge2ne
In reply to Heiko SchocherThe mgcoge2 board from keymile deploys two different porcessors. An ARM based Kirkwood for the "unit" part of the SW and a PPC for the "ne" part of the SW. Therefore in Linux and U-Boot the names for the board are mgcoge2un and mgcoge2ne. This patch adds the mgcoge2ne part of the board. The ppc part of mgboge2 is quite similar to mgcoge, therefore a generic header km82xx-common.h was introduced to collect all similiarities. Currently the only difference is that mgcoge2ne has a 64 MB numonyx NOR flash with a single die. The mgcoge has a dual die flash 2*32MB from spansion.
--- MAINTAINERS | 1 + board/keymile/common/common.c | 4 +- board/keymile/mgcoge/mgcoge.c | 4 + boards.cfg | 1 + include/configs/km82xx-common.h | 321 +++++++++++++++++++++++++++++++++++++++ include/configs/mgcoge.h | 292 +----------------------------------- include/configs/mgcoge2ne.h | 63 ++++++++ 7 files changed, 395 insertions(+), 291 deletions(-) create mode 100644 include/configs/km82xx-common.h create mode 100644 include/configs/mgcoge2ne.h
MAINTAINERS +1 -0
@@ -428,6 +428,7 @@ Heiko Schocher <[email protected]> jupiter MPC5200 kmeter1 MPC8360 mgcoge MPC8247 + mgcoge2ne MPC8247 mgcoge2un ARM926EJS (Kirkwood SoC) mucmc52 MPC5200 muas3001 MPC8270
board/keymile/common/common.c +2 -2
@@ -22,7 +22,7 @@*/ #include <common.h> -#if defined(CONFIG_MGCOGE ) +#if defined(CONFIG_MGCOGE ) || defined(CONFIG_MGCOGE2NE )#include <mpc8260.h> #endif #include <ioports.h>
@@ -337,7 +337,7 @@ int ivm_read_eeprom (void)#define DELAY_ABORT_SEQ 62#define DELAY_HALF_PERIOD (500 / (CONFIG_SYS_I2C_SPEED / 1000)) -#if defined(CONFIG_MGCOGE ) +#if defined(CONFIG_MGCOGE ) || defined(CONFIG_MGCOGE2NE )#define SDA_MASK 0x00010000#define SCL_MASK 0x00020000static void set_pin (int state,unsigned long mask)
board/keymile/mgcoge/mgcoge.c +4 -0
@@ -286,7 +286,11 @@ phys_size_t initdram (int board_type)int checkboard (void ) { +#if defined(CONFIG_MGCOGE )puts ("Board: Keymile mgcoge" ); +#else +puts ("Board: Keymile mgcoge2ne" ); +#endif if (ethernet_present ())puts (" with PIGGY." );puts ("\n" );
boards.cfg +1 -0
@@ -424,6 +424,7 @@ PQ2FADS-ZU_66MHz_lowboot powerpc mpc8260 mpc8260ads freesca PQ2FADS-ZU_lowboot powerpc mpc8260 mpc8260ads freescale - MPC8260ADS:ADSTYPE=CONFIG_SYS_PQ2FADS,SYS_TEXT_BASE=0xFF800000 VoVPN-GW_66MHz powerpc mpc8260 vovpn-gw funkwerk - VoVPN-GW:CLKIN_66MHz mgcoge powerpc mpc8260 - keymile +mgcoge2ne powerpc mpc8260 mgcoge keymile SCM powerpc mpc8260 - siemens TQM8255_AA powerpc mpc8260 tqm8260 tqc - TQM8260:MPC8255,300MHz TQM8260_AA powerpc mpc8260 tqm8260 tqc - TQM8260:MPC8260,200MHz
include/configs/km82xx-common.h new file +321 -0
321 lines not on this page · raw message
include/configs/mgcoge.h +3 -289
308 lines not on this page · raw message
include/configs/mgcoge2ne.h new file +63 -0
63 lines not on this page · raw message
Signature · 1 line
1.7.4
PATCH 8/20 keymile, 8321 boards: move common definitions to km8321-common.h
In reply to Heiko SchocherFrom: Thomas Reufer <[email protected]>
First step for a cleanup of all header files for km8321 boards.
--- include/configs/km8321-common.h | 143 +++++++++++++++++++++++++++++++++++++++ 1 files changed, 143 insertions(+), 0 deletions(-) create mode 100644 include/configs/km8321-common.h
include/configs/km8321-common.h new file +143 -0
@@ -0,0 +1,143 @@ +/* +* Copyright (C) 2006 Freescale Semiconductor, Inc. +* Dave Liu <[email protected]> +* +* Copyright (C) 2007 Logic Product Development, Inc. +* Peter Barada <[email protected]> +* +* Copyright (C) 2007 MontaVista Software, Inc. +* Anton Vorontsov <[email protected]> +* +* (C) Copyright 2008 +* Heiko Schocher, DENX Software Engineering, hs at denx.de. +* +* (C) Copyright 2010 +* Lukas Roggli, KEYMILE Ltd, lukas.roggli at keymile.com +* +* (C) Copyright 2010 +* Thomas Reufer, KEYMILE Ltd, thomas.reufer at keymile.com +* +* 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. +*/ + +#ifndef __CONFIG_KM8321_COMMON_H +#define __CONFIG_KM8321_COMMON_H + +/* +* High Level Configuration Options +*/ +#define CONFIG_E300 1/* E300 family */ +#define CONFIG_QE 1/* Has QE */ +#define CONFIG_MPC83xx 1/* MPC83xx family */ +#define CONFIG_MPC832x 1/* MPC832x CPU specific */ +#define CONFIG_KM8321 1/* Keymile PBEC8321 board specific */ + +#define CONFIG_KM_DEF_NETDEV \ + "netdev=eth0\0" + +#define CONFIG_KM_DEF_ROOTPATH \ + "rootpath=/opt/eldk/ppc_8xx\0" + +/* include common defines/options for all 83xx Keymile boards */ +#include "km83xx-common.h" + +#define CONFIG_MISC_INIT_R 1 + +/* +* System IO Config +*/ +#define CONFIG_SYS_SICRH 0x00000006 +#define CONFIG_SYS_SICRL SICRL_IRQ_CKS + +/* +* Hardware Reset Configuration Word +*/ +#define CONFIG_SYS_HRCW_LOW (\ + HRCWL_LCL_BUS_TO_SCB_CLK_1X1 | \ + HRCWL_DDR_TO_SCB_CLK_2X1 | \ + HRCWL_CSB_TO_CLKIN_2X1 | \ + HRCWL_CORE_TO_CSB_2_5X1 | \ + HRCWL_CE_PLL_VCO_DIV_2 | \ + HRCWL_CE_TO_PLL_1X3) + +#define CONFIG_SYS_HRCW_HIGH (\ + HRCWH_PCI_AGENT | \ + HRCWH_PCI_ARBITER_DISABLE | \ + HRCWH_CORE_ENABLE | \ + HRCWH_FROM_0X00000100 | \ + HRCWH_BOOTSEQ_DISABLE | \ + HRCWH_SW_WATCHDOG_DISABLE | \ + HRCWH_ROM_LOC_LOCAL_16BIT | \ + HRCWH_BIG_ENDIAN | \ + HRCWH_LALE_NORMAL) + +#define CONFIG_SYS_DDR_CS0_BNDS 0x0000007f +#define CONFIG_SYS_DDR_SDRAM_CFG (SDRAM_CFG_SDRAM_TYPE_DDR2 | \ + SDRAM_CFG_32_BE | \ + SDRAM_CFG_SREN) + +#define CONFIG_SYS_DDR_SDRAM_CFG2 0x00401000 +#define CONFIG_SYS_DDR_CLK_CNTL (DDR_SDRAM_CLK_CNTL_CLK_ADJUST_05) +#define CONFIG_SYS_DDR_INTERVAL ((0x064 << SDRAM_INTERVAL_BSTOPRE_SHIFT) | \ + (0x200 << SDRAM_INTERVAL_REFINT_SHIFT)) + +#define CONFIG_SYS_DDR_CS0_CONFIG (CSCONFIG_EN | CSCONFIG_AP | \ + CSCONFIG_ODT_WR_CFG | \ + CSCONFIG_ROW_BIT_13 | \ + CSCONFIG_COL_BIT_10) + +#define CONFIG_SYS_DDR_MODE 0x47860252 +#define CONFIG_SYS_DDR_MODE2 0x8080c000 + +#define CONFIG_SYS_DDR_TIMING_0 ((2 << TIMING_CFG0_MRS_CYC_SHIFT) | \ + (8 << TIMING_CFG0_ODT_PD_EXIT_SHIFT) | \ + (2 << TIMING_CFG0_PRE_PD_EXIT_SHIFT) | \ + (2 << TIMING_CFG0_ACT_PD_EXIT_SHIFT) | \ + (0 << TIMING_CFG0_WWT_SHIFT) | \ + (0 << TIMING_CFG0_RRT_SHIFT) | \ + (0 << TIMING_CFG0_WRT_SHIFT) | \ + (0 << TIMING_CFG0_RWT_SHIFT)) + +#define CONFIG_SYS_DDR_TIMING_1 ((TIMING_CFG1_CASLAT_50) | \ + (2 << TIMING_CFG1_WRTORD_SHIFT) | \ + (2 << TIMING_CFG1_ACTTOACT_SHIFT) | \ + (2 << TIMING_CFG1_WRREC_SHIFT) | \ + (6 << TIMING_CFG1_REFREC_SHIFT) | \ + (2 << TIMING_CFG1_ACTTORW_SHIFT) | \ + (6 << TIMING_CFG1_ACTTOPRE_SHIFT) | \ + (2 << TIMING_CFG1_PRETOACT_SHIFT)) + +#define CONFIG_SYS_DDR_TIMING_2 ((8 << TIMING_CFG2_FOUR_ACT_SHIFT) | \ + (3 << TIMING_CFG2_CKE_PLS_SHIFT) | \ + (2 << TIMING_CFG2_WR_DATA_DELAY_SHIFT) | \ + (2 << TIMING_CFG2_RD_TO_PRE_SHIFT) | \ + (4 << TIMING_CFG2_WR_LAT_DELAY_SHIFT) | \ + (0 << TIMING_CFG2_ADD_LAT_SHIFT) | \ + (5 << TIMING_CFG2_CPO_SHIFT)) + +#define CONFIG_SYS_DDR_TIMING_3 0x00000000 + +#define CONFIG_SYS_PIGGY_BASE 0xE8000000 +#define CONFIG_SYS_PIGGY_SIZE 128 + +/* EEprom support */ +#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1 + +/* +* Local Bus Configuration & Clock Setup +*/ +#define CONFIG_SYS_LCRR (LCRR_DBYP | LCRR_EADC_1 | LCRR_CLKDIV_2) +#define CONFIG_SYS_LBC_LBCR 0x00000000 + +/* +* MMU Setup +*/ +#define CONFIG_SYS_IBAT7L (0) +#define CONFIG_SYS_IBAT7U (0) +#define CONFIG_SYS_DBAT7L CONFIG_SYS_IBAT7L +#define CONFIG_SYS_DBAT7U CONFIG_SYS_IBAT7U + +#endif /* __CONFIG_KM8321_COMMON_H */
Signature · 1 line
1.7.4
PATCH 9/20 powerpc, 83xx: add kmsupx5 board support
In reply to Heiko SchocherThe Keymile SUPx5 board series is based on a PBEC8321 but contains an additional PBUS FPGA (LPXF) on local bus CS2.
--- MAINTAINERS | 1 + boards.cfg | 1 + include/configs/kmsupx5.h | 89 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 91 insertions(+), 0 deletions(-) create mode 100644 include/configs/kmsupx5.h
MAINTAINERS +1 -0
@@ -427,6 +427,7 @@ Heiko Schocher <[email protected]> ids8247 MPC8247 jupiter MPC5200 kmeter1 MPC8360 + kmsupx5 MPC8321 mgcoge MPC8247 mgcoge2ne MPC8247 mgcoge2un ARM926EJS (Kirkwood SoC)
boards.cfg +1 -0
@@ -477,6 +477,7 @@ kmeter1 powerpc mpc83xx km83xx keymile MVBLM7 powerpc mpc83xx mvblm7 matrix_vision SIMPC8313_LP powerpc mpc83xx simpc8313 sheldon - SIMPC8313:NAND_LP SIMPC8313_SP powerpc mpc83xx simpc8313 sheldon - SIMPC8313:NAND_SP +kmsupx5 powerpc mpc83xx km83xx keymile suvd3 powerpc mpc83xx km83xx keymile TQM834x powerpc mpc83xx tqm834x tqc tuda1 powerpc mpc83xx km83xx keymile
include/configs/kmsupx5.h new file +89 -0
89 lines not on this page · raw message
Signature · 1 line
1.7.4
PATCH 10/20 km-arm: i2c support for suenx based boards
In reply to Heiko SchocherThis patch renames the suen3 defines and functions to suenx which is more generic and more precise, because these values and functions where used by all suenX boards and not only sune3.
--- board/keymile/km_arm/km_arm.c | 20 ++++++++++---------- include/configs/km_arm.h | 18 +++++++++--------- 2 files changed, 19 insertions(+), 19 deletions(-)
board/keymile/km_arm/km_arm.c +10 -10
@@ -96,7 +96,7 @@ u32 kwmpp_config[] = {MPP41_GPIO ,/* Piggy3 LED[4] */ MPP42_GPIO ,/* Piggy3 LED[5] */ MPP43_GPIO ,/* Piggy3 LED[6] */ -MPP44_GPIO ,/* Piggy3 LED[7] */ +MPP44_GPIO ,/* Piggy3 LED[7], BIST_EN_L */ MPP45_GPIO ,/* Piggy3 LED[8] */ MPP46_GPIO ,/* Reserved */ MPP47_GPIO, /* Reserved */
@@ -162,14 +162,14 @@ int board_early_init_f(void)#if defined(CONFIG_SOFT_I2C )/* init the GPIO for I2C Bitbang driver */ -kw_gpio_set_valid (SUEN3_SDA_PIN ,1 ); -kw_gpio_set_valid (SUEN3_SCL_PIN ,1 ); -kw_gpio_direction_output (SUEN3_SDA_PIN ,0 ); -kw_gpio_direction_output (SUEN3_SCL_PIN ,0 ); +kw_gpio_set_valid (SUENx_SDA_PIN,1 ); +kw_gpio_set_valid (SUENx_SCL_PIN,1 ); +kw_gpio_direction_output (SUENx_SDA_PIN,0 ); +kw_gpio_direction_output (SUENx_SCL_PIN,0 );#endif #if defined(CONFIG_SYS_EEPROM_WREN ) -kw_gpio_set_valid (SUEN3_ENV_WP ,38 ); -kw_gpio_direction_output (SUEN3_ENV_WP ,1 ); +kw_gpio_set_valid (SUENx_ENV_WP,38 ); +kw_gpio_direction_output (SUENx_ENV_WP,1 );#endif return 0 ;
@@ -322,15 +322,15 @@ int get_sda (void)int get_scl (void ) { -return (kw_gpio_get_value (SUEN3_SCL_PIN ) ?1 :0 ); +return (kw_gpio_get_value (SUENx_SCL_PIN) ?1 :0 ); }#endif #if defined(CONFIG_SYS_EEPROM_WREN )int eeprom_write_enable (unsigned dev_addr,int state) { -kw_gpio_set_value (SUEN3_ENV_WP , !state); +kw_gpio_set_value (SUENx_ENV_WP, !state); -return !kw_gpio_get_value (SUEN3_ENV_WP ); +return !kw_gpio_get_value (SUENx_ENV_WP); }#endif
include/configs/km_arm.h +9 -9
@@ -176,15 +176,15 @@ void set_sda (int state);void set_scl (int state);int get_sda (void );int get_scl (void ); -#define SUEN3_SDA_PIN 8 -#define SUEN3_SCL_PIN 9 -#define SUEN3_ENV_WP 38 - -#define I2C_ACTIVE __set_direction(SUEN3_SDA_PIN, 0) -#define I2C_TRISTATE __set_direction(SUEN3_SDA_PIN, 1) -#define I2C_READ (kw_gpio_get_value(SUEN3_SDA_PIN) ? 1 : 0) -#define I2C_SDA (bit) kw_gpio_set_value(SUEN3_SDA_PIN, bit); -#define I2C_SCL (bit) kw_gpio_set_value(SUEN3_SCL_PIN, bit); +#define SUENx_SDA_PIN 8 +#define SUENx_SCL_PIN 9 +#define SUENx_ENV_WP 38 + +#define I2C_ACTIVE __set_direction(SUENx_SDA_PIN, 0) +#define I2C_TRISTATE __set_direction(SUENx_SDA_PIN, 1) +#define I2C_READ (kw_gpio_get_value(SUENx_SDA_PIN) ? 1 : 0) +#define I2C_SDA (bit) kw_gpio_set_value(SUENx_SDA_PIN, bit); +#define I2C_SCL (bit) kw_gpio_set_value(SUENx_SCL_PIN, bit);#endif #define I2C_DELAY udelay(3)/* 1/4 I2C clock duration */
Signature · 1 line
1.7.4
PATCH 11/20 km_arm: change some register values for SDRAM initialization
In reply to Heiko SchocherThese new values were given by Clive Stubbings from Xentech. According to him they should be used on all bobcat designs.
The changes are the following:
- enables UART0 and UART1 pins in MPP
- define some L2 cache settings
- changes a SDRAM timing to better fit the hardware
- removed three writes that were the same as the reset values
--- board/keymile/km_arm/kwbimage.cfg | 32 ++++++++++++++++++-------------- 1 files changed, 18 insertions(+), 14 deletions(-)
board/keymile/km_arm/kwbimage.cfg +18 -14
@@ -27,16 +27,18 @@ # Boot Media configurations BOOT_FROM spi # Boot from SPI flash -DATA 0xFFD10000 0x01111111 # MPP Control 0 Register -# bit 3-0: MPPSel0 1, NF_IO[2] -# bit 7-4: MPPSel1 1, NF_IO[3] -# bit 12-8: MPPSel2 1, NF_IO[4] -# bit 15-12: MPPSel3 1, NF_IO[5] +DATA 0xFFD10000 0x01112222 # MPP Control 0 Register +# bit 3-0: MPPSel0 2, NF_IO[2] +# bit 7-4: MPPSel1 2, NF_IO[3] +# bit 12-8: MPPSel2 2, NF_IO[4] +# bit 15-12: MPPSel3 2, NF_IO[5] # bit 19-16: MPPSel4 1, NF_IO[6] # bit 23-20: MPPSel5 1, NF_IO[7] # bit 27-24: MPPSel6 1, SYSRST_O # bit 31-28: MPPSel7 0, GPO[7] +DATA 0xFFD10004 0x03303300 + DATA 0xFFD10008 0x00001100 # MPP Control 2 Register # bit 3-0: MPPSel16 0, GPIO[16] # bit 7-4: MPPSel17 0, GPIO[17]
@@ -48,8 +50,8 @@ DATA 0xFFD10008 0x00001100 # MPP Control 2 Register # bit 31-28: MPPSel23 0, GPIO[23] DATA 0xFFD100E0 0x1B1B1B1B # IO Configuration 0 Register -DATA 0xFFD20134 0xBBBBBBBB # L2 RAM Timing 0 Register -DATA 0xFFD20138 0x00BBBBBB # L2 RAM Timing 1 Register +DATA 0xFFD20134 0x66666666 # L2 RAM Timing 0 Register +DATA 0xFFD20138 0x66666666 # L2 RAM Timing 1 Register DATA 0xFFD20154 0x00000200 # CPU RAM Management Control3 Register DATA 0xFFD2014C 0x00001C00 # CPU RAM Management Control1 Register DATA 0xFFD20148 0x00000001 # CPU RAM Management Control0 Register
@@ -63,7 +65,7 @@ DATA 0xFFD01400 0x43000400 # SDRAM Configuration Register # bit29-26: zero # bit31-30: 01 -DATA 0xFFD01404 0x36343000 # DDR Controller Control Low +DATA 0xFFD01404 0x39543000 # DDR Controller Control Low # bit 3-0: 0 reserved # bit 4: 0=addr/cmd in smame cycle # bit 5: 0=clk is driven during self refresh, we don't care for APX
@@ -75,7 +77,7 @@ DATA 0xFFD01404 0x36343000 # DDR Controller Control Low # bit30-28: 3 required # bit31: 0=no additional STARTBURST delay -DATA 0xFFD01408 0x2302544B # DDR Timing (Low) (active cycles value +1) +DATA 0xFFD01408 0x34136552 # DDR Timing (Low) (active cycles value +1) # bit3-0: TRAS lsbs # bit7-4: TRCD # bit11- 8: TRP
@@ -86,7 +88,7 @@ DATA 0xFFD01408 0x2302544B # DDR Timing (Low) (active cycles value +1) # bit27-24: TRRD # bit31-28: TRTP -DATA 0xFFD0140C 0x00000032 # DDR Timing (High) +DATA 0xFFD0140C 0x00000033 # DDR Timing (High) # bit6-0: TRFC # bit8-7: TR2R # bit10-9: TR2W
@@ -116,8 +118,8 @@ DATA 0xFFD01418 0x00000000 # DDR Operation # bit3-0: 0x0, DDR cmd # bit31-4: 0 required -DATA 0xFFD0141C 0x00000642 # DDR Mode -DATA 0xFFD01420 0x00000040 # DDR Extended Mode +DATA 0xFFD0141C 0x00000652 # DDR Mode +DATA 0xFFD01420 0x00000044 # DDR Extended Mode # bit0: 0, DDR DLL enabled # bit1: 0, DDR drive strenght normal # bit2: 1, DDR ODT control lsd disabled
@@ -140,6 +142,8 @@ DATA 0xFFD01424 0x0000F07F # DDR Controller Control High # bit11 : 0 , 1/4 clock cycle skew disabled for write mesh # bit15-12: 1111 required # bit31-16: 0 required +DATA 0xFFD01428 0x00074510 +DATA 0xFFD0147c 0x00007451 DATA 0xFFD01500 0x00000000 # CS[0]n Base address to 0x0 DATA 0xFFD01504 0x07FFFFF1 # CS[0]n Size
@@ -153,7 +157,7 @@ DATA 0xFFD0150C 0x00000000 # CS[1]n Size, window disabled DATA 0xFFD01514 0x00000000 # CS[2]n Size, window disabled DATA 0xFFD0151C 0x00000000 # CS[3]n Size, window disabled -DATA 0xFFD01494 0x00000000 # DDR ODT Control (Low) +DATA 0xFFD01494 0x00010001 # DDR ODT Control (Low) # bit3-0: 0, ODT0Rd, MODT[0] asserted during read from DRAM CS0 # bit19-16:0, ODT0Wr, MODT[0] asserted during write to DRAM CS0
@@ -162,7 +166,7 @@ DATA 0xFFD01498 0x00000000 # DDR ODT Control (High) # bit3-2: 00, ODT1 controlled by register # bit31-4: zero, required -DATA 0xFFD0149C 0x0000E90F # CPU ODT Control +DATA 0xFFD0149C 0x0000FC11 # CPU ODT Control # bit3-0: F, ODT0Rd, Internal ODT asserted during read from DRAM bank0 # bit7-4: 0, ODT0Wr, Internal ODT asserted during write to DRAM bank0 # bit9-8: 1, ODTEn, never active
Signature · 1 line
1.7.4
PATCH 12/20 ppc, 8321: cleanup tuxa1, tuda1 and suvd3 support
In reply to Heiko SchocherFor the kmsupx5 a new header file was introduced km8321-common.h. Now the common stuff from tuxa1, tuda1 and suvd3 was removed and the new header file included.
The defines CONFIG_SYS_PIGGY_BASE and CONFIG_SYS_PIGGY_SIZE are confusing. Because they actually describe the KMBEC FPGA values. The KMBEC FPGA can be PRIO on kmeter1 or upio on mgcoge. Therefore all the defines were renamed.
remove unneeded variable CONFIG_KM_DEF_NETDEV, as it is already declared in keymile-common.h
--- board/keymile/common/common.c | 2 +- board/keymile/km83xx/km83xx.c | 4 +- board/keymile/mgcoge/mgcoge.c | 4 +- include/configs/keymile-common.h | 2 +- include/configs/km82xx-common.h | 12 ++-- include/configs/km8321-common.h | 7 +-- include/configs/km83xx-common.h | 18 +++--- include/configs/kmeter1.h | 8 ++- include/configs/suvd3.h | 117 +------------------------------------- include/configs/tuda1.h | 114 +------------------------------------ include/configs/tuxa1.h | 116 +------------------------------------- 11 files changed, 34 insertions(+), 370 deletions(-)
board/keymile/common/common.c +1 -1
@@ -582,7 +582,7 @@ int fdt_get_node_and_value (void *blob,#if !defined(MACH_TYPE_KM_KIRKWOOD )int ethernet_present (void ) { -return (in_8 ((u8 *)CONFIG_SYS_PIGGY_BASE +CONFIG_SYS_SLOT_ID_OFF ) &0x80 ); +return (in_8 ((u8 *)CONFIG_SYS_KMBEC_FPGA_BASE +CONFIG_SYS_SLOT_ID_OFF ) &0x80 ); }#endif
board/keymile/km83xx/km83xx.c +2 -2
@@ -158,9 +158,9 @@ int board_early_init_r (void)break ; }/* enable the PHY on the PIGGY */ -setbits (8 , (void *)(CONFIG_SYS_PIGGY_BASE +0x10003 ),0x01 ); +setbits (8 , (void *)(CONFIG_SYS_KMBEC_FPGA_BASE +0x10003 ),0x01 );/* enable the Unit LED (green) */ -setbits (8 , (void *)(CONFIG_SYS_PIGGY_BASE +0x00002 ),0x01 ); +setbits (8 , (void *)(CONFIG_SYS_KMBEC_FPGA_BASE +0x00002 ),0x01 );#if defined(CONFIG_SUVD3 )/* configure UPMA for APP1 */
board/keymile/mgcoge/mgcoge.c +2 -2
@@ -304,9 +304,9 @@ int board_early_init_r (void) {/* setup the UPIOx */ /* General Unit Reset disabled, Flash Bank enabled, UnitLed on */ -out_8 ((u8 *)(CONFIG_SYS_PIGGY_BASE +0x02 ),0xc2 ); +out_8 ((u8 *)(CONFIG_SYS_KMBEC_FPGA_BASE +0x02 ),0xc2 );/* SCC4 enable, halfduplex, FCC1 powerdown */ -out_8 ((u8 *)(CONFIG_SYS_PIGGY_BASE +0x03 ),0x15 ); +out_8 ((u8 *)(CONFIG_SYS_KMBEC_FPGA_BASE +0x03 ),0x15 );return 0 ; }
include/configs/keymile-common.h +1 -1
@@ -102,7 +102,7 @@* driver to set the MAC. */ #define CONFIG_CHECK_ETHERNET_PRESENT 1 -#define CONFIG_SYS_SLOT_ID_BASE CONFIG_SYS_PIGGY_BASE +#define CONFIG_SYS_SLOT_ID_BASE CONFIG_SYS_KMBEC_FPGA_BASE#define CONFIG_SYS_SLOT_ID_OFF (0x07)/* register offset */ #define CONFIG_SYS_SLOT_ID_MASK (0x3f)/* mask for slot ID bits */
include/configs/km82xx-common.h +6 -6
@@ -274,19 +274,19 @@ PSDMR_WRC_1C |\ PSDMR_CL_2) -/* GPIO/PIGGY on CS3 initialization values +/* UPIO FPGA (GPIO/PIGGY) on CS3 initialization values */ -#define CONFIG_SYS_PIGGY_BASE 0x30000000 -#define CONFIG_SYS_PIGGY_SIZE 128 +#define CONFIG_SYS_KMBEC_FPGA_BASE 0x30000000 +#define CONFIG_SYS_KMBEC_FPGA_SIZE 128 -#define CONFIG_SYS_BR3_PRELIM ((CONFIG_SYS_PIGGY_BASE & BRx_BA_MSK) |\ +#define CONFIG_SYS_BR3_PRELIM ((CONFIG_SYS_KMBEC_FPGA_BASE & BRx_BA_MSK) |\ BRx_PS_8 | BRx_MS_GPCM_P | BRx_V) -#define CONFIG_SYS_OR3_PRELIM (MEG_TO_AM(CONFIG_SYS_PIGGY_SIZE) |\ +#define CONFIG_SYS_OR3_PRELIM (MEG_TO_AM(CONFIG_SYS_KMBEC_FPGA_SIZE) |\ ORxG_CSNT | ORxG_ACS_DIV2 |\ ORxG_SCY_3_CLK | ORxG_TRLX ) -/* Board FPGA on CS4 initialization values +/* BFTICU board FPGA on CS4 initialization values */ #define CONFIG_SYS_FPGA_BASE 0x40000000#define CONFIG_SYS_FPGA_SIZE 1/*1KB*/
include/configs/km8321-common.h +2 -5
@@ -35,9 +35,6 @@#define CONFIG_MPC832x 1/* MPC832x CPU specific */ #define CONFIG_KM8321 1/* Keymile PBEC8321 board specific */ -#define CONFIG_KM_DEF_NETDEV \ - "netdev=eth0\0" -#define CONFIG_KM_DEF_ROOTPATH \ "rootpath=/opt/eldk/ppc_8xx\0"
@@ -120,8 +117,8 @@#define CONFIG_SYS_DDR_TIMING_3 0x00000000 -#define CONFIG_SYS_PIGGY_BASE 0xE8000000 -#define CONFIG_SYS_PIGGY_SIZE 128 +#define CONFIG_SYS_KMBEC_FPGA_BASE 0xE8000000 +#define CONFIG_SYS_KMBEC_FPGA_SIZE 128/* EEprom support */ #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1
include/configs/km83xx-common.h +9 -9
@@ -120,13 +120,13 @@/* * PRIO1/PIGGY on the local bus CS1 */ -#define CONFIG_SYS_LBLAWBAR1_PRELIM CONFIG_SYS_PIGGY_BASE +#define CONFIG_SYS_LBLAWBAR1_PRELIM CONFIG_SYS_KMBEC_FPGA_BASE/* Window base at flash base */ #define CONFIG_SYS_LBLAWAR1_PRELIM 0x8000001A/* 128MB window size */ -#define CONFIG_SYS_BR1_PRELIM (CONFIG_SYS_PIGGY_BASE | \ +#define CONFIG_SYS_BR1_PRELIM (CONFIG_SYS_KMBEC_FPGA_BASE | \ (1 << BR_PS_SHIFT) | /* 8 bit port size */ \BR_V ) -#define CONFIG_SYS_OR1_PRELIM (MEG_TO_AM(CONFIG_SYS_PIGGY_SIZE) | \ +#define CONFIG_SYS_OR1_PRELIM (MEG_TO_AM(CONFIG_SYS_KMBEC_FPGA_SIZE) | /* 128MB */ \OR_GPCM_CSNT | OR_GPCM_ACS_DIV2 | \ OR_GPCM_SCY_2 | \ OR_GPCM_TRLX | OR_GPCM_EAD)
@@ -213,7 +213,7 @@#if defined(CONFIG_CMD_NAND )#define CONFIG_NAND_KMETER1 #define CONFIG_SYS_MAX_NAND_DEVICE 1 -#define CONFIG_SYS_NAND_BASE CONFIG_SYS_PIGGY_BASE +#define CONFIG_SYS_NAND_BASE CONFIG_SYS_KMBEC_FPGA_BASE#endif #if defined(CONFIG_PCI )
@@ -258,11 +258,11 @@#define CONFIG_SYS_DBAT1U CONFIG_SYS_IBAT1U/* PRIO1, PIGGY: icache cacheable, but dcache-inhibit and guarded */ -#define CONFIG_SYS_IBAT2L (CONFIG_SYS_PIGGY_BASE | BATL_PP_10 | \ - BATL_MEMCOHERENCE) -#define CONFIG_SYS_IBAT2U (CONFIG_SYS_PIGGY_BASE | BATU_BL_128M | \ - BATU_VS | BATU_VP) -#define CONFIG_SYS_DBAT2L (CONFIG_SYS_PIGGY_BASE | BATL_PP_10 | \ +#define CONFIG_SYS_IBAT2L (CONFIG_SYS_KMBEC_FPGA_BASE | BATL_PP_10 | \ + BATL_MEMCOHERENCE) +#define CONFIG_SYS_IBAT2U (CONFIG_SYS_KMBEC_FPGA_BASE | BATU_BL_128M | \ + BATU_VS | BATU_VP) +#define CONFIG_SYS_DBAT2L (CONFIG_SYS_KMBEC_FPGA_BASE | BATL_PP_10 | \ BATL_CACHEINHIBIT | BATL_GUARDEDSTORAGE)#define CONFIG_SYS_DBAT2U CONFIG_SYS_IBAT2U
include/configs/kmeter1.h +5 -3
@@ -110,9 +110,11 @@#define CONFIG_SYS_DDR_TIMING_3 0x00000000 -#define CONFIG_SYS_PIGGY_BASE 0xE8000000 -#define CONFIG_SYS_PIGGY_SIZE 128 -#define CONFIG_SYS_PAXE_BASE 0xA0000000 +/* PRIO FPGA */ +#define CONFIG_SYS_KMBEC_FPGA_BASE 0xE8000000 +#define CONFIG_SYS_KMBEC_FPGA_SIZE 128 +/* PAXE FPGA */ +#define CONFIG_SYS_PAXE_BASE 0xA0000000#define CONFIG_SYS_PAXE_SIZE 512/* EEprom support */
include/configs/suvd3.h +2 -115
146 lines not on this page · raw message
include/configs/tuda1.h +2 -112
143 lines not on this page · raw message
include/configs/tuxa1.h +2 -114
145 lines not on this page · raw message
Signature · 1 line
1.7.4
PATCH 13/20 keymile, common; fix i2c deblocking support
In reply to Heiko SchocherThis patch fix the i2c deblocking facility with the i2c HW-Controller. The required delays for byte reading, the enhanced criteria for stop the dummy read and required 5 start/stop sequences are added.
Add i2c deblocking before ivm eeprom read.
Improve i2c deblocking sequence by respecting stop hold time.
Cleaned function for deblocking. Have now one function i2c_make_abort() available for bitbang, mpc82xx and mpc83xx harware controller.
--- board/keymile/common/common.c | 109 ++++++++++++++++++++++++++++++----------- 1 files changed, 80 insertions(+), 29 deletions(-)
board/keymile/common/common.c +80 -29
@@ -41,6 +41,7 @@#include <i2c.h> extern int i2c_soft_read_pin (void ); +extern int i2c_make_abort (void );int ivm_calc_crc (unsigned char *buf,int len) {
@@ -325,6 +326,9 @@ int ivm_read_eeprom (void)if (buf !=NULL ) dev_addr =simple_strtoul ((char *)buf,NULL ,16 ); +/* add deblocking here */ +i2c_make_abort (); +if (i2c_read (dev_addr,0 ,1 , i2c_buffer,CONFIG_SYS_IVM_EEPROM_MAX_LEN ) !=0 ) {printf ("Error reading EEprom\n" );return -2 ;
@@ -334,7 +338,7 @@ int ivm_read_eeprom (void) }#if defined(CONFIG_SYS_I2C_INIT_BOARD ) -#define DELAY_ABORT_SEQ 62 +#define DELAY_ABORT_SEQ 62/* @200kHz 9 clocks = 44us, 62us is ok */ #define DELAY_HALF_PERIOD (500 / (CONFIG_SYS_I2C_SPEED / 1000))#if defined(CONFIG_MGCOGE ) || defined(CONFIG_MGCOGE2NE )
@@ -445,8 +449,21 @@ static void writeStartSeq (void)This I2C Deblocking mechanism was developed by Keymile in association with Anatech and Atmel in 1998. */ -static int i2c_make_abort (void ) +int i2c_make_abort (void ) { + +#if defined(CONFIG_HARD_I2C ) && !defined(CONFIG_MACH_SUEN3 ) +volatile immap_t *immap = (immap_t *)CONFIG_SYS_IMMR ; +volatile i2c8260_t *i2c = (i2c8260_t *)&immap->im_i2c; + +/* disable I2C controller first, otherwhise it thinks we want to */ +/* talk to the slave port... */ + i2c->i2c_i2mod &= ~0x01 ; + +/* Set the PortPins to GPIO */ +setports (1 ); +#endif +int scl_state =0 ;int sda_state =0 ;int i =0 ;
@@ -473,54 +490,88 @@ static int i2c_make_abort (void)writeStartSeq (); } } + +/* respect stop setup time */ +udelay (DELAY_ABORT_SEQ ); +set_scl (1 ); +udelay (DELAY_ABORT_SEQ ); +set_sda (1 );get_sda (); + +#if defined(CONFIG_HARD_I2C ) +/* Set the PortPins back to use for I2C */ +setports (0 ); +#endif return ret; }#endif -/** -* i2c_init_board - reset i2c bus. When the board is powercycled during a -* bus transfer it might hang; for details see doc/I2C_Edge_Conditions. -*/ -void i2c_init_board (void ) -{#if defined(CONFIG_MPC83xx) +static void writeStartSeq (void ) +{ +struct fsl_i2c *dev; + dev = (struct fsl_i2c *) (CONFIG_SYS_IMMR +CONFIG_SYS_I2C_OFFSET ); +udelay (DELAY_ABORT_SEQ ); +out_8 (&dev->cr, (I2C_CR_MEN |I2C_CR_MSTA )); +udelay (DELAY_ABORT_SEQ ); +out_8 (&dev->cr, (I2C_CR_MEN )); +} + +int i2c_make_abort (void ) +{struct fsl_i2c *dev; dev = (struct fsl_i2c *) (CONFIG_SYS_IMMR +CONFIG_SYS_I2C_OFFSET );uchar dummy; +uchar last; +int nbr_read =0 ; +int i =0 ; +int ret =0 ; +/* wait after each operation to finsh with a delay */ out_8 (&dev->cr, (I2C_CR_MSTA )); +udelay (DELAY_ABORT_SEQ );out_8 (&dev->cr, (I2C_CR_MEN |I2C_CR_MSTA )); +udelay (DELAY_ABORT_SEQ ); dummy =in_8 (&dev->dr); - dummy =in_8 (&dev->dr); -if (dummy !=0xff ) { - dummy =in_8 (&dev->dr); +udelay (DELAY_ABORT_SEQ ); + last =in_8 (&dev->dr); + nbr_read++; + +/* do read until the last bit is 1, but stop if the full eeprom is read */ +while (((last &0x01 ) !=0x01 ) && (nbr_read <CONFIG_SYS_IVM_EEPROM_MAX_LEN )) { +udelay (DELAY_ABORT_SEQ ); + last =in_8 (&dev->dr); + nbr_read++; } +if ((last &0x01 ) !=0x01 ) + ret =-2 ; +if ((last !=0xff ) || (nbr_read >1 )) +printf ("[INFO] i2c abort after %d bytes (0x%02x)\n" , nbr_read, last); +udelay (DELAY_ABORT_SEQ );out_8 (&dev->cr, (I2C_CR_MEN )); -out_8 (&dev->cr,0x00 ); -out_8 (&dev->cr, (I2C_CR_MEN )); +udelay (DELAY_ABORT_SEQ ); +/* clear status reg */ +out_8 (&dev->sr,0 ); -#else -#if defined(CONFIG_HARD_I2C ) && !defined(MACH_TYPE_KM_KIRKWOOD ) -volatile immap_t *immap = (immap_t *)CONFIG_SYS_IMMR ; -volatile i2c8260_t *i2c = (i2c8260_t *)&immap->im_i2c; - -/* disable I2C controller first, otherwhise it thinks we want to */ -/* talk to the slave port... */ - i2c->i2c_i2mod &= ~0x01 ; +for (i =0 ; i <5 ; i++) { +writeStartSeq (); + } +if (ret !=0 ) { +printf ("[ERROR] i2c abort failed after %d bytes (0x%02x)\n" , nbr_read, last); + } +return ret; +} -/* Set the PortPins to GPIO */ -setports (1 );#endif +/** +* i2c_init_board - reset i2c bus. When the board is powercycled during a +* bus transfer it might hang; for details see doc/I2C_Edge_Conditions. +*/ +void i2c_init_board (void ) +{/* Now run the AbortSequence() */ i2c_make_abort (); - -#if defined(CONFIG_HARD_I2C ) -/* Set the PortPins back to use for I2C */ -setports (0 ); -#endif -#endif }#endif #endif
Signature · 1 line
1.7.4
PATCH 14/20 arm, keymile: updates for the arm based boards from keymile
In reply to Heiko Schocherdefine KM_IVM_BUS and KM_ENV_BUS macros
KM_IVM_BUS is used to define the EEprom_ivm environment variable. These macros allow the reuse of these I2C addresses in other code locations.
remove unneeded code
On first HW versions the BOCO FPGA was behind a MUX device. These HW versions are not supported anymore. And therefore this code can be removed.
added LED initialization for SUEN3
The bootstat LED required to be initialized so to have a green colour after start-up.
define CONFIG_SYS_TEXT_BASE
This is needed by the relocation code and is not the same for our ARM BEC and thus needs to be defined.
remove memsize variable
An environment variable for memsize is not needed. this can be get via the board info struct.
remove unneeded double access to bi_dram[i].size field
--- board/keymile/km_arm/km_arm.c | 37 +++++++++++++++++++++++++++++-------- include/configs/km_arm.h | 1 + include/configs/mgcoge2un.h | 6 ++++-- include/configs/suen3.h | 6 ++++-- include/configs/suen8.h | 6 ++++-- 5 files changed, 42 insertions(+), 14 deletions(-)
board/keymile/km_arm/km_arm.c +29 -8
@@ -41,9 +41,6 @@DECLARE_GLOBAL_DATA_PTR ; -static int io_dev; -extern I2C_MUX_DEVICE *i2c_mux_ident_muxstring (uchar *buf); -/* Multi-Purpose Pins Functionality configuration */ u32 kwmpp_config[] = {MPP0_NF_IO2 ,
@@ -120,15 +117,37 @@ int ethernet_present(void)return ret; } +int initialize_unit_leds (void ) +{ +/* init the unit LEDs */ +/* per default they all are */ +/* ok apart from bootstat */ +/* LED connected through BOCO */ +/* BOCO lies at the address 0x10 */ +/* LEDs are in the block CTRL_H (addr 0x02) */ +/* BOOTSTAT LED is the first 0x01 */ +#define BOCO 0x10 +#define CTRL_H 0x02 +#define APPLEDMASK 0x01 +uchar buf; + +if (i2c_read (BOCO ,CTRL_H ,1 , &buf,1 ) !=0 ) { +printf ("%s: Error reading Boco\n" , __FUNCTION__); +return -1 ; + } + buf |=APPLEDMASK ; +if (i2c_write (BOCO ,CTRL_H ,1 , &buf,1 ) !=0 ) { +printf ("%s: Error writing Boco\n" , __FUNCTION__); +return -1 ; + } +return 0 ; +} +int misc_init_r (void ) { -I2C_MUX_DEVICE *i2cdev;char *str;int mach_type; -/* add I2C Bus for I/O Expander */ - i2cdev =i2c_mux_ident_muxstring ((uchar *)"pca9554a:70:a" ); - io_dev = i2cdev->busid;puts ("Piggy:" );if (ethernet_present () ==0 )puts (" not" );
@@ -140,6 +159,9 @@ int misc_init_r(void)printf ("Overwriting MACH_TYPE with %d!!!\n" , mach_type); gd->bd->bi_arch_number = mach_type; } + +initialize_unit_leds (); +return 0 ; }
@@ -246,7 +268,6 @@ void dram_init_banksize(void)for (i =0 ; i <CONFIG_NR_DRAM_BANKS ; i++) { gd->bd->bi_dram[i].start =kw_sdram_bar (i); - gd->bd->bi_dram[i].size =kw_sdram_bs (i); gd->bd->bi_dram[i].size =get_ram_size ((long *)kw_sdram_bar (i),kw_sdram_bs (i)); }
include/configs/km_arm.h +1 -0
@@ -46,6 +46,7 @@/* include common defines/options for all Keymile boards */ #include "keymile-common.h" +#define CONFIG_SYS_TEXT_BASE 0x04000000/* code address after reloc */ #define CONFIG_ENV_SIZE (128 << 10)/* NAND chip block size */ #define CONFIG_SYS_MEMTEST_START 0x00400000/* 4M */ #define CONFIG_SYS_MEMTEST_END 0x007fffff/*(_8M -1) */
include/configs/mgcoge2un.h +4 -2
@@ -41,12 +41,14 @@#define CONFIG_HOSTNAME mgcoge2un +#define KM_IVM_BUS "pca9547:70:9"/* I2C2 (Mux-Port 1)*/ +#define KM_ENV_BUS "pca9547:70:d"/* I2C2 (Mux-Port 5)*/ +/* * Default environment variables */ #define CONFIG_EXTRA_ENV_SETTINGS \ CONFIG_KM_DEF_ENV \ - "memsize=0x8000000\0" \ "newenv=setenv addr 0x100000 && " \ "i2c dev 1; mw.b ${addr} 0 4 && " \ "eeprom write " xstr(CONFIG_SYS_DEF_EEPROM_ADDR) \
@@ -54,7 +56,7 @@ "eeprom write " xstr(CONFIG_SYS_DEF_EEPROM_ADDR) \ " ${addr} " xstr(CONFIG_ENV_OFFSET_REDUND) " 4\0" \"rootpath=/opt/eldk/arm\0" \ -"EEprom_ivm=pca9547:70:9\0" \ +"EEprom_ivm=" KM_IVM_BUS "\0" \ ""#endif /* _CONFIG_MGCOGE2UN_H */
include/configs/suen3.h +4 -2
@@ -43,12 +43,14 @@#define CONFIG_HOSTNAME suen3 +#define KM_IVM_BUS "pca9544a:70:9"/* I2C2 (Mux-Port 1)*/ +#define KM_ENV_BUS "pca9544a:70:d"/* I2C2 (Mux-Port 5)*/ +/* * Default environment variables */ #define CONFIG_EXTRA_ENV_SETTINGS \ CONFIG_KM_DEF_ENV \ - "memsize=0x8000000\0" \ "newenv=setenv addr 0x100000 && " \ "i2c dev 1; mw.b ${addr} 0 4 && " \ "eeprom write " xstr(CONFIG_SYS_DEF_EEPROM_ADDR) \
@@ -56,7 +58,7 @@ "eeprom write " xstr(CONFIG_SYS_DEF_EEPROM_ADDR) \ " ${addr} " xstr(CONFIG_ENV_OFFSET_REDUND) " 4\0" \"rootpath=/opt/eldk/arm\0" \ -"EEprom_ivm=pca9544a:70:9\0" \ +"EEprom_ivm=" KM_IVM_BUS "\0" \ ""#endif /* _CONFIG_SUEN3_H */
include/configs/suen8.h +4 -2
@@ -40,12 +40,14 @@#define CONFIG_HOSTNAME suen8 +#define KM_IVM_BUS "pca9544a:70:9"/* I2C2 (Mux-Port 1)*/ +#define KM_ENV_BUS "pca9544a:70:d"/* I2C2 (Mux-Port 5)*/ +/* * Default environment variables */ #define CONFIG_EXTRA_ENV_SETTINGS \ CONFIG_KM_DEF_ENV \ - "memsize=0x8000000\0" \ "newenv=setenv addr 0x100000 && " \ "i2c dev 1; mw.b ${addr} 0 4 && " \ "eeprom write " xstr(CONFIG_SYS_DEF_EEPROM_ADDR) \
@@ -53,7 +55,7 @@ "eeprom write " xstr(CONFIG_SYS_DEF_EEPROM_ADDR) \ " ${addr} " xstr(CONFIG_ENV_OFFSET_REDUND) " 4\0" \"rootpath=/opt/eldk/arm\0" \ -"EEprom_ivm=pca9544a:70:9\0" \ +"EEprom_ivm=" KM_IVM_BUS "\0" \ ""#endif /* _CONFIG_SUEN8_H */
Signature · 1 line
1.7.4
PATCH 15/20 keymile boards: add CONFIG_PIGGY_MAC_ADRESS_OFFSET
In reply to Heiko SchocherNormaly the PIGGY_MAC_ADRESS can be read directly from the IVM on keymile boards. On mgcoge3 it differs. Because there are two piggy boards deployed the second MAC adress must be calculated with the IVM mac adress and an offset. This patch allows to set such a offset in the board config.
--- board/keymile/common/common.c | 20 ++++++++++++++++++++ board/keymile/common/common.h | 4 ++++ 2 files changed, 24 insertions(+), 0 deletions(-)
board/keymile/common/common.c +20 -0
@@ -228,8 +228,28 @@ static int ivm_analyze_block2 (unsigned char *buf, int len) buf[5 ], buf[6]);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,"%02X:%02X:%02X:%02X:%02X:%02X" , + buf[1 ], + buf[2 ], + buf[3 ], + buf[4 ], + buf[5 ], + buf[6 ]); + } +#endif if (getenv ("ethaddr" ) ==NULL )setenv ((char *)"ethaddr" , (char *)valbuf); +/* IVM_MacCount */ count = (buf[10 ] <<24 ) + (buf[11] << 16) +
board/keymile/common/common.h +4 -0
@@ -11,6 +11,10 @@#ifndef __KEYMILE_COMMON_H#define __KEYMILE_COMMON_H +#if !defined(CONFIG_PIGGY_MAC_ADRESS_OFFSET ) +#define CONFIG_PIGGY_MAC_ADRESS_OFFSET 0 +#endif +int ethernet_present (void );int ivm_read_eeprom (void );
Signature · 1 line
1.7.4
PATCH 16/20 keymile, common: add setting of some environment variables
In reply to Heiko SchocherThis patch adds last_stage_init to all keymile boards. And in the last stage init some environment variables for u-boot were set. Currently these are pnvramaddr, pram and var address.
--- board/keymile/common/common.c | 35 +++++++++++++++++++++++++++++++++++ board/keymile/common/common.h | 1 + board/keymile/km83xx/km83xx.c | 13 +++++++++++++ board/keymile/km_arm/km_arm.c | 11 +++++++++++ board/keymile/mgcoge/mgcoge.c | 13 +++++++++++++ include/configs/keymile-common.h | 3 +++ include/configs/km_arm.h | 5 +++++ 7 files changed, 81 insertions(+), 0 deletions(-)
board/keymile/common/common.c +35 -0
@@ -42,6 +42,7 @@extern int i2c_soft_read_pin (void );extern int i2c_make_abort (void ); +extern unsigned int arch_ram_size (void );int ivm_calc_crc (unsigned char *buf,int len) {
@@ -73,6 +74,40 @@ int ivm_calc_crc (unsigned char *buf, int len)return crc; } +/* Set Keymile specific environment variables +* Currently only some memory layout variables are calculated here +* ... ------------------------------------------------ +* ... |@rootfsaddr |@pnvramaddr |@varaddr |@reserved |@END_OF_RAM +* ... |<------------------- pram ------------------->| +* ... ------------------------------------------------ +* @END_OF_RAM: denotes the RAM size +* @pnvramaddr: Startadress of pseudo non volatile RAM in hex +* @pram : preserved ram size in k +* @varaddr : startadress for /var mounted into RAM +*/ +int set_km_env (void ) +{ +uchar buf[32 ]; +unsigned int pnvramaddr; +unsigned int pram; +unsigned int varaddr; + + pnvramaddr =arch_ram_size () -CONFIG_KM_RESERVED_PRAM -CONFIG_KM_PHRAM + -CONFIG_KM_PNVRAM ; +sprintf ((char *)buf,"0x%x" , pnvramaddr); +setenv ("pnvramaddr" , (char *)buf); + + pram = (CONFIG_KM_RESERVED_PRAM +CONFIG_KM_PHRAM +CONFIG_KM_PNVRAM ) / +0x400 ; +sprintf ((char *)buf,"0x%x" , pram); +setenv ("pram" , (char *)buf); + + varaddr =arch_ram_size () -CONFIG_KM_RESERVED_PRAM -CONFIG_KM_PHRAM ; +sprintf ((char *)buf,"0x%x" , varaddr); +setenv ("varaddr" , (char *)buf); +return 0 ; +} +static int ivm_set_value (char *name,char *value) {char tempbuf[256 ];
board/keymile/common/common.h +1 -0
@@ -22,6 +22,7 @@ int ivm_read_eeprom (void);int keymile_hdlc_enet_initialize (bd_t *bis);#endif +int set_km_env (void ); int fdt_set_node_and_value (void *blob, char *nodename, char *regname,
board/keymile/km83xx/km83xx.c +13 -0
@@ -30,6 +30,8 @@#include "../common/common.h" +DECLARE_GLOBAL_DATA_PTR ; +extern void disable_addr_trans (void );extern void enable_addr_trans (void );const qe_iop_conf_t qe_iop_conf_tab[] = {
@@ -177,6 +179,17 @@ int misc_init_r (void)return 0 ; } +unsigned int arch_ram_size (void ) +{ +return gd->bd->bi_memsize; +} + +int last_stage_init (void ) +{ +set_km_env (); +return 0 ; +} +int fixed_sdram (void ) {volatile immap_t *im = (immap_t *)CONFIG_SYS_IMMR ;
board/keymile/km_arm/km_arm.c +11 -0
@@ -210,6 +210,12 @@ int board_init(void)return 0 ; } +int last_stage_init (void ) +{ +set_km_env (); +return 0 ; +} +#if defined(CONFIG_CMD_SF )int do_spi_toggle (cmd_tbl_t *cmdtp,int flag,int argc,char *const argv[]) {
@@ -273,6 +279,11 @@ void dram_init_banksize(void) } } +unsigned int arch_ram_size (void ) +{ +return gd->ram_size; +} +/* Configure and enable MV88E1118 PHY */ void reset_phy (void ) {
board/keymile/mgcoge/mgcoge.c +13 -0
@@ -37,6 +37,8 @@#include "../common/common.h" +DECLARE_GLOBAL_DATA_PTR ; +/* * I/O Port configuration table *
@@ -310,6 +312,17 @@ int board_early_init_r (void)return 0 ; } +unsigned int arch_ram_size (void ) +{ +return gd->bd->bi_memsize; +} + +int last_stage_init (void ) +{ +set_km_env (); +return 0 ; +} +int hush_init_var (void ) {ivm_read_eeprom ();
include/configs/keymile-common.h +3 -0
@@ -26,6 +26,9 @@/* Do boardspecific init for all boards */ #define CONFIG_BOARD_EARLY_INIT_R 1 +#define CONFIG_LAST_STAGE_INIT + +#define CONFIG_BOOTCOUNT_LIMIT /* * By default kwbimage.cfg from board specific folder is used
include/configs/km_arm.h +5 -0
@@ -251,4 +251,9 @@ int get_scl (void);#define CONFIG_SYS_INIT_SP_ADDR 0xC8012000/* Do early setups now in board_init_f() */ #define CONFIG_BOARD_EARLY_INIT_F + +/* resereved pram area at the end of memroy [hex] */ +/* 8Mbytes for switch + 4Kbytes for bootcount */ +#define CONFIG_KM_RESERVED_PRAM 0x801000 +#endif /* _CONFIG_KM_ARM_H */
Signature · 1 line
1.7.4
PATCH 17/20 ppc, arm: rework and enhance keymile-common.h
In reply to Heiko SchocherFrom: Holger Brunck <[email protected]>
Add:
- introduce "bootrunner" environment variable
This allows to execute consecutive different commands specified in the list "subbootcmd". If one command fails the command serie will stop.
- introduce environment variable "develop", "ramfs" and "release" Each variable is one way to boot our linux. "develop" is for development purpose and boots the SW via NFS. "release" is for booting the linux image from flash, "ramfs" allows to load an SW image via tftp into ram and executes from there
- introduce "addmem" variable, this command adds the used memory for linux to the bootargs
- introduce "addvar" variable, this command adress for the /var directory to the kernel command line
- introduce "setramfspram" and "setrootfsaddr" these calculation were done if "ramfs" was used (only for debugging)
- introduce "tftpramfs" used for "ramfs" to load the image into RAM (only for debugging)
Remove unneeded stuff:
- CONFIG_IO_MUXING is obsolete for keymile boards
- CONFIG_KM_DEF_ENV_PRIVATE is also obsolete
- define CONFIG_SYS_TEXT_BASE in board configs only
--- include/configs/keymile-common.h | 163 +++++++++++++++++++++++++++++++------ include/configs/km_arm.h | 2 + 2 files changed, 138 insertions(+), 27 deletions(-)
include/configs/keymile-common.h +136 -27
@@ -40,13 +40,6 @@#endif /* CONFIG_SYS_KWD_CONFIG */ /* -* CONFIG_SYS_TEXT_BASE can be defined in board specific header file, if needed -*/ -#ifndef CONFIG_SYS_TEXT_BASE -#define CONFIG_SYS_TEXT_BASE 0x00400000 -#endif /* CONFIG_SYS_TEXT_BASE */ - -/* * Command line configuration. */ #include <config_cmd_default.h>
@@ -144,28 +137,16 @@#define CONFIG_MTD_DEVICE #define CONFIG_MTD_CONCAT -/* define this to use the keymile's io muxing feature */ -/*#define CONFIG_IO_MUXING */ - -#ifdef CONFIG_IO_MUXING -#define CONFIG_KM_DEF_ENV_IOMUX \ - "nc=setenv ethact HDLC \0" \ - "nce=setenv ethact SCC \0" \ - "stderr=serial,nc \0" \ - "stdin=serial,nc \0" \ - "stdout=serial,nc \0" \ - "tftpsrcp=69 \0" \ - "tftpdstp=69 \0" -#else #define CONFIG_KM_DEF_ENV_IOMUX \ "stderr=serial \0" \ "stdin=serial \0" \ "stdout=serial \0" -#endif -#ifndef CONFIG_KM_DEF_ENV_PRIVATE -#define CONFIG_KM_DEF_ENV_PRIVATE \ - "kmprivate=empty\0" +/* common powerpc specific env settings */ +#ifndef CONFIG_KM_DEF_ENV_BOOTPARAMS +#define CONFIG_KM_DEF_ENV_BOOTPARAMS \ + "bootparams=empty\0" \ + "initial_boot_bank=0\0"#endif #ifndef CONFIG_KM_DEF_NETDEV
@@ -184,17 +165,116 @@#define str (s) #s/* +* bootrunner +* - run all commands in 'subbootcmds' +* - on error, stop running the remaing commands +*/ +#define CONFIG_KM_DEF_ENV_BOOTRUNNER \ + "bootrunner=" \ + "break=0; " \ + "for subbootcmd in ${subbootcmds}; do " \ + "if test ${break} -eq 0; then; " \ + "echo \"[INFO] running \\c\"; " \ + "print ${subbootcmd}; " \ + "run ${subbootcmd} || break=1; " \ + "if test ${break} -eq 1; then; " \ + "echo \"[ERR] failed \\c\"; " \ + "print ${subbootcmd}; " \ + "fi; " \ + "fi; " \ + "done\0" \ + "" + +/* +* boottargets +* - set 'subbootcmds' for the bootrunner +* - set 'bootcmd' and 'altbootcmd' +* available targets: +* - 'release': for a standalone system kernel/rootfs from flash +* - 'develop': for development kernel(tftp)/rootfs(NFS) +* - 'ramfs': rootfilesystem in RAM kernel(tftp)/rootfs(RAM) +* +* - 'commonargs': bootargs common to all targets +*/ +#define CONFIG_KM_DEF_ENV_BOOTTARGETS \ + "commonargs=" \ + "addip " \ + "addtty " \ + "addmem " \ + "addinit " \ + "addvar " \ + "addmtdparts " \ + "addbootcount " \ + "\0" \ + "develop=" \ + "setenv subbootcmds \"" \ + "tftpfdt tftpkernel " \ + "nfsargs ${commonargs} " \ + "printbootargs boot " \ + "\" && " \ + "setenv bootcmd \'" \ + "run bootrunner" \ + "\' && " \ + "setenv altbootcmd \'" \ + "run bootcmd" \ + "\' && " \ + "run setboardid && " \ + "saveenv && " \ + "reset\0" \ + "ramfs=" \ + "setenv actual_bank -1 && " \ + "setenv subbootcmds \"" \ + "tftpfdt tftpkernel " \ + "setrootfsaddr tftpramfs " \ + "flashargs ${commonargs} " \ + "addpanic addramfs " \ + "printbootargs boot " \ + "\" && " \ + "setenv bootcmd \'" \ + "run bootrunner" \ + "\' && " \ + "setenv altbootcmd \'" \ + "run bootcmd" \ + "\' && " \ + "run setboardid && " \ + "run setramfspram && " \ + "saveenv && " \ + "reset\0" \ + "release=" \ + "setenv actual_bank ${initial_boot_bank} && " \ + "setenv subbootcmds \"" \ + "checkboardid " \ + "ubiattach ubicopy " \ + "cramfsloadfdt cramfsloadkernel " \ + "flashargs ${commonargs} " \ + "addpanic " \ + "printbootargs boot " \ + "\" && " \ + "setenv bootcmd \'" \ + "run bootrunner; reset" \ + "\' && " \ + "setenv altbootcmd \'" \ + "run actual0 bootcmd; reset" \ + "\' && " \ + "saveenv && " \ + "reset\0" \ + "" + +/* * bootargs * - modify 'bootargs' * * - 'addip': add ip configuration +* - 'addmem': limit kernel memory mem= * - 'addpanic': add kernel panic options * - 'addramfs': add phram device for the rootfilesysten in ram * - 'addtty': add console=... +* - 'addvar': add phram device for /var * - 'nfsargs': default arguments for nfs boot * - 'flashargs': defaults arguments for flash base boot * * processor specific settings +* - 'addbootcount': add boot counter * - 'addmtdparts': add mtd partition information */ #define CONFIG_KM_DEF_ENV_BOOTARGS \
@@ -204,6 +284,8 @@"setenv bootargs ${bootargs} " \"ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}" \":${hostname}:${netdev}:off\0" \ +"addmem=" \ +"setenv bootargs ${bootargs} mem=0x${pnvramaddr}\0" \"addpanic=" \"setenv bootargs ${bootargs} " \"panic=1 panic_on_oops=1\0" \
@@ -214,6 +296,9 @@"addtty=" \"setenv bootargs ${bootargs}" \" console=" CONFIG_KM_CONSOLE_TTY ",${baudrate}\0" \ +"addvar=" \ +"setenv bootargs ${bootargs} phram.phram=phvar," \ + "${varaddr},0x" xstr(CONFIG_KM_PHRAM) "\0" \"nfsargs=" \"setenv bootargs " \"ubi.mtd=" CONFIG_KM_UBI_LINUX_MTD_NAME " " \
@@ -226,6 +311,14 @@"rootfstype=squashfs ro\0" \"" +/* +* compute_addr +* - compute addresses and sizes +* - addresses are calculated form the end of memory 'memsize' +* +* - 'setramfspram': compute PRAM size for ramfs target +* - 'setrootfsaddr': compute rootfilesystem address for phram +*/ #define CONFIG_KM_DEF_ENV_COMPUTE_ADDR \"setboardid=" \"if test \"x${boardId}\" = \"x\"; then; " \
@@ -233,7 +326,15 @@"setenv hwKey ${IVM_HWKey}; " \"else; " \"echo \\\\c; " \ -"fi\0" +"fi\0" \ +"setramfspram=" \ +"setexpr value ${rootfssize} / 0x400 && " \ +"setexpr value 0x${value} + ${pram} && " \ +"setenv pram 0x${value}\0" \ +"setrootfsaddr=" \ +"setexpr value ${pnvramaddr} - ${rootfssize} && " \ +"setenv rootfsaddr 0x${value}\0" \ +"" /* * flash_boot
@@ -264,6 +365,7 @@* - commands for booting over the network * * - 'tftpkernel': load a kernel with tftp into ram +* - 'tftpramfs': load rootfs with tftp into ram * * processor specific settings * - 'tftpfdt': load fdt with tftp into ram
@@ -271,7 +373,11 @@#define CONFIG_KM_DEF_ENV_NET_BOOT \ "tftpkernel=" \ "tftpboot ${kernel_addr_r} ${kernel_file} && " \ - "setenv actual_kernel_addr ${kernel_addr_r} \0" + "setenv actual_kernel_addr ${kernel_addr_r} \0" \ + "tftpramfs=" \ + "tftpboot ${rootfsaddr} \"\\\"${rootfsfile}\\\"\" && " \ + "setenv loadaddr\0" \ + ""/* * constants
@@ -294,14 +400,17 @@#ifndef CONFIG_KM_DEF_ENV #define CONFIG_KM_DEF_ENV \ + CONFIG_KM_DEF_ENV_BOOTPARAMS \ CONFIG_KM_DEF_ENV_IOMUX \ - CONFIG_KM_DEF_ENV_PRIVATE \ CONFIG_KM_DEF_NETDEV \ CONFIG_KM_DEF_ENV_CPU \ + CONFIG_KM_DEF_ENV_BOOTRUNNER \ + CONFIG_KM_DEF_ENV_BOOTTARGETS \ CONFIG_KM_DEF_ENV_BOOTARGS \ CONFIG_KM_DEF_ENV_COMPUTE_ADDR \ CONFIG_KM_DEF_ENV_FLASH_BOOT \ CONFIG_KM_DEF_ENV_NET_BOOT \ + CONFIG_KM_DEF_ENV_CONSTANTS \ "altbootcmd=run bootcmd\0" \ "bootcmd=run default\0" \ "bootlimit=2\0" \
include/configs/km_arm.h +2 -0
@@ -255,5 +255,7 @@ int get_scl (void);/* resereved pram area at the end of memroy [hex] */ /* 8Mbytes for switch + 4Kbytes for bootcount */ #define CONFIG_KM_RESERVED_PRAM 0x801000 +/* address for the bootcount (taken from end of RAM) */ +#define BOOTCOUNT_ADDR (CONFIG_KM_RESERVED_PRAM)#endif /* _CONFIG_KM_ARM_H */
Signature · 1 line
1.7.4
PATCH 18/20 keymile boards: support of boardId / hwkey lists
In reply to Heiko SchocherFrom: Thomas Herzmann <[email protected]>
In order to support boardId / hwkey lists, the u-boot default environment has been updated: Added a script checkboardidlist which checks the list of boardId / hwkey if the boadrId / hwkey of the IVM is included in that list. This feature is used if you got different HW variants but you only want to create one boot package. E.g. supx5 board series.
--- include/configs/keymile-common.h | 29 ++++++++++++++++++++++++++++- 1 files changed, 28 insertions(+), 1 deletions(-)
include/configs/keymile-common.h +28 -1
@@ -243,6 +243,7 @@"release=" \"setenv actual_bank ${initial_boot_bank} && " \"setenv subbootcmds \"" \ +"checkboardidlist " \"checkboardid " \"ubiattach ubicopy " \"cramfsloadfdt cramfsloadkernel " \
@@ -392,8 +393,34 @@"default=" \"setenv default \'run newenv; reset\' && " \"run release && saveenv; reset\0" \ +"checkboardidlist=" \ +"if test \"x${boardIdListHex}\" != \"x\"; then " \ +"IVMbidhwk=${IVM_BoardId}_${IVM_HWKey}; " \ +"found=0; " \ +"for bidhwk in \"${boardIdListHex}\"; do " \ +"echo trying $bidhwk ...; " \ +"if test \"x$bidhwk\" = \"x$IVMbidhwk\"; then " \ +"found=1; " \ +"echo match found for $bidhwk; " \ +"if test \"x$bidhwk\" != \"x${boardId}_${hwKey}\";then " \ +"setenv boardid ${IVM_BoardId}; " \ +"setenv boardId ${IVM_BoardId}; " \ +"setenv hwkey ${IVM_HWKey}; " \ +"setenv hwKey ${IVM_HWKey}; " \ +"echo \"boardId set to ${boardId}\"; " \ +"echo \"hwKey set to ${hwKey}\"; " \ +"saveenv; " \ +"fi; " \ +"fi; " \ +"done; " \ +"else " \ +"echo \"boardIdListHex not set, not checked\"; " \ +"found=1; " \ +"fi; " \ +"test \"$found\" = 1 \0" \"checkboardid=" \ -"test \"x${boardId}\" = \"x${IVM_BoardId}\"\0" \ +"test \"x${boardId}\" = \"x${IVM_BoardId}\" && " \ +"test \"x${hwKey}\" = \"x${IVM_HWKey}\"\0" \"printbootargs=print bootargs\0" \ "rootfsfile=" xstr(CONFIG_HOSTNAME) "/rootfsImage\0" \""
Signature · 1 line
1.7.4
PATCH 19/20 keymile-common.h: remove IO mux stuff
In reply to Heiko SchocherFrom: Holger Brunck <[email protected]>
--- include/configs/keymile-common.h | 9 +++------ 1 files changed, 3 insertions(+), 6 deletions(-)
include/configs/keymile-common.h +3 -6
@@ -137,11 +137,6 @@#define CONFIG_MTD_DEVICE #define CONFIG_MTD_CONCAT -#define CONFIG_KM_DEF_ENV_IOMUX \ - "stderr=serial \0" \ - "stdin=serial \0" \ - "stdout=serial \0" -/* common powerpc specific env settings */ #ifndef CONFIG_KM_DEF_ENV_BOOTPARAMS #define CONFIG_KM_DEF_ENV_BOOTPARAMS \
@@ -428,7 +423,6 @@#ifndef CONFIG_KM_DEF_ENV #define CONFIG_KM_DEF_ENV \ CONFIG_KM_DEF_ENV_BOOTPARAMS \ - CONFIG_KM_DEF_ENV_IOMUX \ CONFIG_KM_DEF_NETDEV \ CONFIG_KM_DEF_ENV_CPU \ CONFIG_KM_DEF_ENV_BOOTRUNNER \
@@ -448,6 +442,9 @@"load=tftpboot ${u-boot_addr_r} ${u-boot}\0" \"mtdids=" MTDIDS_DEFAULT "\0" \"mtdparts=" MTDPARTS_DEFAULT "\0" \ +"stderr=serial \0" \ +"stdin=serial \0" \ +"stdout=serial \0" \ "u-boot=" xstr(CONFIG_HOSTNAME) "/u-boot.bin \0" \ "u-boot_addr_r=" xstr(CONFIG_KM_KERNEL_ADDR) "\0" \""
Signature · 1 line
1.7.4
PATCH 20/20 ppc, mgcoge, mgcoge2ne: add DIP switch detection
In reply to Heiko SchocherFrom: Huber, Andreas <[email protected]>
This reads the DIP switch register in the BFTICU (0x40000089). If 'Full reset' or 'DB erase' is selected, 'actual_bank' is set to 0. This loads the Bootloader application who does the erase stuff.
--- board/keymile/mgcoge/mgcoge.c | 13 +++++++++++++ 1 files changed, 13 insertions(+), 0 deletions(-)
board/keymile/mgcoge/mgcoge.c +13 -0
@@ -317,8 +317,21 @@ unsigned int arch_ram_size(void)return gd->bd->bi_memsize; } +#define DIPSWITCH_OFFSET 0x89 +#define DIPSWITCH_MASK 0x0f +int last_stage_init (void ) { +u8 dip_switch; +/* Dip switch */ + dip_switch =readb (CONFIG_SYS_FPGA_BASE +DIPSWITCH_OFFSET ); + dip_switch &=DIPSWITCH_MASK ; +/* dip switch 'full reset' or 'db erase' */ +if (dip_switch &0x1 || dip_switch &0x2 ) { +/* start bootloader */ +puts ("DIP: Enabled\n" ); +setenv ("actual_bank" ,"0" ); + }set_km_env ();return 0 ; }
Signature · 1 line
1.7.4
v2 cover keymile board update
In reply to Heiko SchocherThe following patchset updates the support for the keymile boards.
- heavy rework of the headerfiles, common board code
- add support for 4 new mpc83xx based boards
- add support for 1 82xx based board
- add support for 2 new kirkwood based boards
- fix i2c deblocking for this boards
Heiko Schocher (14):
mpc832x: add support for the mpc8321 based suvd3 board
mpc832x: add support for mpc8321 based tuxa1 board
mpc832x: add support for mpc8321 based tuda1 board
arm: add support for kirkwood based mgcoge2un board
arm: add support of Kirkwood based board SUEN8
ppc: add support for ppc based board mgcoge2ne powerpc, 83xx: add kmsupx5 board support
km-arm: i2c support for suenx based boards
km_arm: change some register values for SDRAM initialization ppc, 8321: cleanup tuxa1, tuda1 and suvd3 support keymile, common; fix i2c deblocking support
arm, keymile: updates for the arm based boards from keymile keymile boards: add CONFIG_PIGGY_MAC_ADRESS_OFFSET keymile, common: add setting of some environment variables
Holger Brunck (5):
arm, keymile: rename MACH_SUEN3 to MACH_KM_KIRKWOOD ppc, arm: adapt keymile header
arm, ppc: rework environment variables for keymile boards ppc, arm: rework and enhance keymile-common.h keymile-common.h: remove IO mux stuff
Thomas Herzmann (1):
keymile boards: support of boardId / hwkey lists
Thomas Reufer (1):
keymile, 8321 boards: move common definitions to km8321-common.h
MAINTAINERS | 7 +
arch/powerpc/cpu/mpc83xx/fdt.c | 3 +-
arch/powerpc/lib/bootcount.c | 2 +-
board/keymile/common/common.c | 220 +++++++---
board/keymile/common/common.h | 11 +-
board/keymile/{kmeter1 => km83xx}/Makefile | 0
.../keymile/{kmeter1/kmeter1.c => km83xx/km83xx.c} | 162 +++++--
board/keymile/km_arm/km_arm.c | 72 +++-
board/keymile/km_arm/kwbimage.cfg | 32 +-
board/keymile/mgcoge/mgcoge.c | 27 +-
boards.cfg | 9 +-
include/configs/keymile-common.h | 475 +++++++++++++------
include/configs/km-powerpc.h | 92 ++++
include/configs/km82xx-common.h | 318 +++++++++++++
include/configs/km8321-common.h | 138 ++++++
include/configs/km83xx-common.h | 325 +++++++++++++
include/configs/km_arm.h | 100 ++++-
include/configs/kmeter1.h | 353 ++-------------
include/configs/kmsupx5.h | 91 ++++
include/configs/mgcoge.h | 302 +------------
include/configs/mgcoge2ne.h | 66 +++
include/configs/mgcoge2un.h | 65 +++
include/configs/suen3.h | 45 +--
include/configs/suen8.h | 65 +++
include/configs/suvd3.h | 104 +++++
include/configs/tuda1.h | 141 ++++++
include/configs/tuxa1.h | 124 +++++
27 files changed, 2378 insertions(+), 971 deletions(-)
rename board/keymile/{kmeter1 => km83xx}/Makefile (100%)
rename board/keymile/{kmeter1/kmeter1.c => km83xx/km83xx.c} (52%)
create mode 100644 include/configs/km-powerpc.h
create mode 100644 include/configs/km82xx-common.h
create mode 100644 include/configs/km8321-common.h
create mode 100644 include/configs/km83xx-common.h
create mode 100644 include/configs/kmsupx5.h
create mode 100644 include/configs/mgcoge2ne.h
create mode 100644 include/configs/mgcoge2un.h
create mode 100644 include/configs/suen8.h
create mode 100644 include/configs/suvd3.h
create mode 100644 include/configs/tuda1.h
create mode 100644 include/configs/tuxa1.hSignature · 1 line
1.7.4
PATCH v2 1/21 arm, keymile: rename MACH_SUEN3 to MACH_KM_KIRKWOOD
From: Holger Brunck <[email protected]>
The MACH_TYPE SUEN3 is now to specific for keymile boards, because other boards similar to suen3 will follow. So the MACH_SUEN3 was renamed to MACH_KM_KIRKWOOD.
---
Changes for v2:
- new patch in v2, first patch of v1 serie was split up
board/keymile/common/common.c | 4 ++-- board/keymile/km_arm/km_arm.c | 2 +- include/configs/km_arm.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-)
board/keymile/common/common.c +2 -2
@@ -500,7 +500,7 @@ void i2c_init_board(void)out_8 (&dev->cr, (I2C_CR_MEN ));#else -#if defined(CONFIG_HARD_I2C ) && !defined(CONFIG_MACH_SUEN3 ) +#if defined(CONFIG_HARD_I2C ) && !defined(MACH_TYPE_KM_KIRKWOOD )volatile immap_t *immap = (immap_t *)CONFIG_SYS_IMMR ;volatile i2c8260_t *i2c = (i2c8260_t *)&immap->im_i2c;
@@ -578,7 +578,7 @@ int fdt_get_node_and_value (void *blob, }#endif -#if !defined(CONFIG_MACH_SUEN3 ) +#if !defined(MACH_TYPE_KM_KIRKWOOD )int ethernet_present (void ) {return (in_8 ((u8 *)CONFIG_SYS_PIGGY_BASE +CONFIG_SYS_SLOT_ID_OFF ) &0x80 );
board/keymile/km_arm/km_arm.c +1 -1
@@ -180,7 +180,7 @@ int board_init(void)/* * arch number of board */ - gd->bd->bi_arch_number =MACH_TYPE_SUEN3 ; + gd->bd->bi_arch_number =MACH_TYPE_KM_KIRKWOOD ;/* address of boot parameters */ gd->bd->bi_boot_params =kw_sdram_bar (0 ) +0x100 ;
include/configs/km_arm.h +1 -1
@@ -38,7 +38,7 @@#define CONFIG_FEROCEON_88FR131 /* CPU Core subversion */ #define CONFIG_KIRKWOOD /* SOC Family Name */ #define CONFIG_KW88F6281 /* SOC Name */ -#define CONFIG_MACH_SUEN3 /* Machine type */ +#define CONFIG_MACH_KM_KIRKWOOD /* Machine type */ /* include common defines/options for all Keymile boards */ #include "keymile-common.h"
Signature · 1 line
1.7.4
PATCH v2 2/21 ppc, arm: adapt keymile header
In reply to Heiko SchocherFrom: Holger Brunck <[email protected]>
- adapt copyright string
- remove numeric values for defines which only select functions
- change bootdelay to 2 seconds
- set max number of command args to 32
- set I/O buffer size to 512
- remove CONFIG_E300 and CONFIG_MPC83xx, as the added through PLATFORM_CPPFLAGS
---
Changes for v2:
- new patch in v2, first patch in v1 was split up
- fix checkpatch.pl errors and warnings
include/configs/keymile-common.h | 49 +++++++++++++++++--------------------- include/configs/km_arm.h | 6 ++++- include/configs/kmeter1.h | 24 +++++++++--------- include/configs/mgcoge.h | 37 ++++++++++++++-------------- 4 files changed, 57 insertions(+), 59 deletions(-)
include/configs/keymile-common.h +22 -27
@@ -1,5 +1,5 @@/* -* (C) Copyright 2008 +* (C) Copyright 2008-2011 * Heiko Schocher, DENX Software Engineering, hs at denx.de. * * See file CREDITS for list of people who contributed to this
@@ -25,9 +25,7 @@#define __CONFIG_KEYMILE_H/* Do boardspecific init for all boards */ -#define CONFIG_BOARD_EARLY_INIT_R 1 - -#define CONFIG_BOOTCOUNT_LIMIT +#define CONFIG_BOARD_EARLY_INIT_R /* * By default kwbimage.cfg from board specific folder is used
@@ -56,16 +54,15 @@#define CONFIG_CMD_IMMAP #define CONFIG_CMD_MII #define CONFIG_CMD_PING -#define CONFIG_CMD_DTT #define CONFIG_CMD_EEPROM #define CONFIG_CMD_I2C #define CONFIG_CMD_JFFS2 -#define CONFIG_JFFS2_CMDLINE #define CONFIG_CMD_MTDPARTS +#define CONFIG_CMD_SETEXPR #undef CONFIG_WATCHDOG/* disable platform specific watchdog */ -#define CONFIG_BOOTDELAY 5/* autoboot after 5 seconds */ +#define CONFIG_BOOTDELAY 2/* autoboot after 2 seconds */ #undef CONFIG_BOOTARGS/* the boot command will set bootargs */ /*
@@ -78,15 +75,15 @@#if defined(CONFIG_CMD_KGDB )#define CONFIG_SYS_CBSIZE 1024/* Console I/O Buffer Size */ #else -#define CONFIG_SYS_CBSIZE 256/* Console I/O Buffer Size */ +#define CONFIG_SYS_CBSIZE 512/* Console I/O Buffer Size */ #endif -#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16)/* Print Buffer Size */ -#define CONFIG_SYS_MAXARGS 16/* max number of command args */ -#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE/* Boot Argument Buffer Size */ -#define CONFIG_CMDLINE_EDITING 1/* add command line history */ +#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT) + 16) +#define CONFIG_SYS_MAXARGS 32/* max number of command args */ +#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE +#define CONFIG_CMDLINE_EDITING /* add command line history */ #define CONFIG_AUTO_COMPLETE /* add autocompletion support */ -#define CONFIG_HUSH_INIT_VAR 1 +#define CONFIG_HUSH_INIT_VAR #define CONFIG_SYS_ALT_MEMTEST /* memory test, takes time */ #define CONFIG_SYS_MEMTEST_START 0x00100000/* memtest works on */
@@ -96,11 +93,11 @@#define CONFIG_SYS_HZ 1000/* decrementer freq: 1 ms ticks */ -#define CONFIG_BAUDRATE 115200 +#define CONFIG_BAUDRATE 115200#define CONFIG_SYS_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200, 230400 } -#define CONFIG_LOADS_ECHO 1/* echo on for serial download */ -#define CONFIG_SYS_LOADS_BAUD_CHANGE 1/* allow baudrate change */ +#define CONFIG_LOADS_ECHO /* echo on for serial download */ +#define CONFIG_SYS_LOADS_BAUD_CHANGE /* allow baudrate change */ #define CONFIG_SYS_BOARD_DRAM_INIT /* Used board specific dram_init */ /*
@@ -108,28 +105,28 @@* to modify in a centralized location. This is used in the HDLC * driver to set the MAC. */ -#define CONFIG_CHECK_ETHERNET_PRESENT 1 +#define CONFIG_CHECK_ETHERNET_PRESENT #define CONFIG_SYS_SLOT_ID_BASE CONFIG_SYS_PIGGY_BASE#define CONFIG_SYS_SLOT_ID_OFF (0x07)/* register offset */ #define CONFIG_SYS_SLOT_ID_MASK (0x3f)/* mask for slot ID bits */ -#define CONFIG_I2C_MULTI_BUS 1 +#define CONFIG_I2C_MULTI_BUS #define CONFIG_SYS_MAX_I2C_BUS 1 -#define CONFIG_SYS_I2C_INIT_BOARD 1 -#define CONFIG_I2C_MUX 1 +#define CONFIG_SYS_I2C_INIT_BOARD +#define CONFIG_I2C_MUX /* EEprom support */ -#define CONFIG_SYS_I2C_MULTI_EEPROMS 1 +#define CONFIG_SYS_I2C_MULTI_EEPROMS #define CONFIG_SYS_EEPROM_PAGE_WRITE_ENABLE -#define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 3 -#define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS 10 +#define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 3 +#define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS 10/* Support the IVM EEprom */ #define CONFIG_SYS_IVM_EEPROM_ADR 0x50#define CONFIG_SYS_IVM_EEPROM_MAX_LEN 0x400#define CONFIG_SYS_IVM_EEPROM_PAGE_LEN 0x100 -#define CONFIG_SYS_FLASH_PROTECTION 1 +#define CONFIG_SYS_FLASH_PROTECTION /* * BOOTP options
@@ -139,9 +136,7 @@#define CONFIG_BOOTP_GATEWAY #define CONFIG_BOOTP_HOSTNAME -#define CONFIG_ENV_SIZE 0x04000/* Size of Environment */ - -#define CONFIG_SYS_MALLOC_LEN (4 * 1024 * 1024) +#define CONFIG_SYS_MALLOC_LEN (4 * 1024 * 1024)/* UBI Support for all Keymile boards */ #define CONFIG_CMD_UBI
include/configs/km_arm.h +5 -1
@@ -6,6 +6,9 @@* (C) Copyright 2009 * Stefan Roese, DENX Software Engineering, sr at denx.de. * +* (C) Copyright 2010-2011 +* Heiko Schocher, DENX Software Engineering, hs at denx.de. +* * See file CREDITS for list of people who contributed to this * project. *
@@ -25,7 +28,8 @@* MA 02110-1301 USA */ -/* for linking errors see http://lists.denx.de/pipermail/u-boot/2009-July/057350.html */ +/* for linking errors see +* http://lists.denx.de/pipermail/u-boot/2009-July/057350.html */ #ifndef _CONFIG_KM_ARM_H#define _CONFIG_KM_ARM_H
include/configs/kmeter1.h +12 -12
@@ -8,7 +8,7 @@* Copyright (C) 2007 MontaVista Software, Inc. * Anton Vorontsov <[email protected]> * -* (C) Copyright 2008 +* (C) Copyright 2008-2011 * Heiko Schocher, DENX Software Engineering, hs at denx.de. * * This program is free software; you can redistribute it and/or
@@ -23,11 +23,9 @@/* * High Level Configuration Options */ -#define CONFIG_E300 1/* E300 family */ -#define CONFIG_QE 1/* Has QE */ -#define CONFIG_MPC83xx 1/* MPC83xx family */ -#define CONFIG_MPC8360 1/* MPC8360 CPU specific */ -#define CONFIG_KMETER1 1/* KMETER1 board specific */ +#define CONFIG_QE /* Has QE */ +#define CONFIG_MPC8360 /* MPC8360 CPU specific */ +#define CONFIG_KMETER1 /* KMETER1 board specific */ #define CONFIG_HOSTNAME kmeter1#define CONFIG_SYS_TEXT_BASE 0xF0000000
@@ -42,7 +40,7 @@"mtdparts=boot:768k(u-boot),128k(env),128k(envred)," \"-(" CONFIG_KM_UBI_PARTITION_NAME ")" -#define CONFIG_MISC_INIT_R 1 +#define CONFIG_MISC_INIT_R/* * System Clock Setup */
@@ -115,7 +113,8 @@#define CONFIG_SYS_DDR_CS0_BNDS 0x0000007f#define CONFIG_SYS_DDR_CS0_CONFIG (CSCONFIG_EN | CSCONFIG_AP | \ CSCONFIG_ROW_BIT_13 | \ - CSCONFIG_COL_BIT_10 | CSCONFIG_ODT_WR_ACS) + CSCONFIG_COL_BIT_10 | \ + CSCONFIG_ODT_WR_ACS)#define CONFIG_SYS_DDR_SDRAM_CFG (SDRAM_CFG_SDRAM_TYPE_DDR2 | \ SDRAM_CFG_SREN)
@@ -172,7 +171,7 @@#undef CONFIG_SYS_RAMBOOT#endif -#define CONFIG_SYS_MONITOR_LEN (384 * 1024)/* Reserve 384 kB for Mon */ +#define CONFIG_SYS_MONITOR_LEN (768 * 1024)/* * Initial RAM Base Address Setup
@@ -180,7 +179,8 @@#define CONFIG_SYS_INIT_RAM_LOCK 1#define CONFIG_SYS_INIT_RAM_ADDR 0xE6000000/* Initial RAM address */ #define CONFIG_SYS_INIT_RAM_SIZE 0x1000/* Size of used area in RAM */ -#define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE) +#define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_INIT_RAM_SIZE - \ + GENERATED_GBL_DATA_SIZE)/* * Local Bus Configuration & Clock Setup
@@ -335,7 +335,7 @@/* I2C SYSMON (LM75, AD7414 is almost compatible) */ #define CONFIG_DTT_LM75 1/* ON Semi's LM75 */ -#define CONFIG_DTT_SENSORS {0, 1, 2, 3}/* Sensor addresses */ +#define CONFIG_DTT_SENSORS {0, 1, 2, 3}/* Sensor addresses */ #define CONFIG_SYS_DTT_MAX_TEMP 70#define CONFIG_SYS_DTT_LOW_TEMP -30#define CONFIG_SYS_DTT_HYSTERESIS 3
@@ -375,7 +375,7 @@* MMU Setup */ -#define CONFIG_HIGH_BATS 1/* High BATs supported */ +#define CONFIG_HIGH_BATS /* High BATs supported */ /* DDR: cache cacheable */ #define CONFIG_SYS_IBAT0L (CONFIG_SYS_SDRAM_BASE | BATL_PP_10 | \
include/configs/mgcoge.h +18 -19
@@ -1,5 +1,5 @@/* -* (C) Copyright 2007 +* (C) Copyright 2007-2011 * Heiko Schocher, DENX Software Engineering, hs at denx.de. * * See file CREDITS for list of people who contributed to this
@@ -29,9 +29,8 @@* (easy to change) */ -#define CONFIG_MPC8247 1 -#define CONFIG_MPC8272_FAMILY 1 -#define CONFIG_MGCOGE 1 +#define CONFIG_MPC8247 +#define CONFIG_MGCOGE #define CONFIG_HOSTNAME mgcoge#define CONFIG_SYS_TEXT_BASE 0xFE000000
@@ -81,8 +80,7 @@#define CONFIG_8260_CLKIN 66000000/* in Hz */ #endif -#define BOOTFLASH_START FE000000 -#define CONFIG_PRAM 512/* protected RAM [KBytes] */ +#define BOOTFLASH_START 0xFE000000#define MTDIDS_DEFAULT "nor0=boot,nor1=app"#define MTDPARTS_DEFAULT \
@@ -130,7 +128,7 @@#define CONFIG_SYS_RAMBOOT #endif -#define CONFIG_SYS_MONITOR_LEN (384 << 10)/* Reserve 384KB for Monitor */ +#define CONFIG_SYS_MONITOR_LEN (768 << 10)#define CONFIG_ENV_IS_IN_FLASH
@@ -140,15 +138,15 @@#define CONFIG_ENV_OFFSET CONFIG_SYS_MONITOR_LEN/* Address and size of Redundant Environment Sector */ -#define CONFIG_ENV_OFFSET_REDUND (CONFIG_ENV_OFFSET + CONFIG_ENV_SECT_SIZE) -#define CONFIG_ENV_SIZE_REDUND (CONFIG_ENV_SIZE) +#define CONFIG_ENV_OFFSET_REDUND (CONFIG_ENV_OFFSET + CONFIG_ENV_SECT_SIZE) +#define CONFIG_ENV_SIZE_REDUND (CONFIG_ENV_SIZE)#endif /* CONFIG_ENV_IS_IN_FLASH */ -#define CONFIG_ENV_BUFFER_PRINT 1 +#define CONFIG_ENV_BUFFER_PRINT /* enable I2C and select the hardware/software driver */ #undef CONFIG_HARD_I2C/* I2C with hardware support */ -#define CONFIG_SOFT_I2C 1/* I2C bit-banged */ -#define CONFIG_SYS_I2C_SPEED 50000/* I2C speed and slave address */ +#define CONFIG_SOFT_I2C /* I2C bit-banged */ +#define CONFIG_SYS_I2C_SPEED 50000/* I2C speed and slave addr */ #define CONFIG_SYS_I2C_SLAVE 0x7F/*
@@ -166,7 +164,7 @@#define I2C_DELAY udelay(5)/* 1/4 I2C clock duration */ /* I2C SYSMON (LM75, AD7414 is almost compatible) */ -#define CONFIG_DTT_LM75 1/* ON Semi's LM75 */ +#define CONFIG_DTT_LM75 /* ON Semi's LM75 */ #define CONFIG_DTT_SENSORS {0}/* Sensor addresses */ #define CONFIG_SYS_DTT_MAX_TEMP 70#define CONFIG_SYS_DTT_LOW_TEMP -30
@@ -178,8 +176,9 @@#define CONFIG_SYS_IMMR 0xF0000000#define CONFIG_SYS_INIT_RAM_ADDR CONFIG_SYS_IMMR -#define CONFIG_SYS_INIT_RAM_SIZE 0x2000/* Size of used area in DPRAM */ -#define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE) +#define CONFIG_SYS_INIT_RAM_SIZE 0x2000/* Size of used area in DPRAM */ +#define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_INIT_RAM_SIZE - \ + GENERATED_GBL_DATA_SIZE)#define CONFIG_SYS_INIT_SP_OFFSET CONFIG_SYS_GBL_DATA_OFFSET/* Hard reset configuration word */
@@ -194,7 +193,7 @@#define CONFIG_SYS_HRCW_SLAVE6 0#define CONFIG_SYS_HRCW_SLAVE7 0 -#define CONFIG_SYS_BOOTMAPSZ (8 << 20)/* Initial Memory map for Linux */ +#define CONFIG_SYS_BOOTMAPSZ (8 << 20)/* Initial mem map for Linux */ #define CONFIG_SYS_CACHELINE_SIZE 32/* For MPC8260 CPUs */ #if defined(CONFIG_CMD_KGDB )
@@ -341,9 +340,9 @@#define CONFIG_SYS_RESET_ADDRESS 0xFDFFFFFC/* "bad" address */ /* pass open firmware flat tree */ -#define CONFIG_FIT 1 -#define CONFIG_OF_LIBFDT 1 -#define CONFIG_OF_BOARD_SETUP 1 +#define CONFIG_FIT +#define CONFIG_OF_LIBFDT +#define CONFIG_OF_BOARD_SETUP #define OF_TBCLK (bd->bi_busfreq / 4)#define OF_STDOUT_PATH "/soc/cpm/serial at 11a90"
Signature · 1 line
1.7.4
PATCH v2 3/21 arm, ppc: rework environment variables for keymile boards
In reply to Heiko SchocherFrom: Holger Brunck <[email protected]>
This patch reworks all headerfiles for keymile boards. Furthermore the environment variables are refactored.
Changes:
- introduce km-powerpc.h file and extract ppc specific parts to it
- move ARM specific options and vaiables to km_arm.h
- sort the environment variables to logical groups
- enhance the description of the environment variables
- remove KM specific HW key and board id from kernel command line
---
Changes for v2:
- new patch in v2, first patch in v1 was split up
- fix checkpatch.pl errors and warnings
include/configs/keymile-common.h | 234 ++++++++++++++++++++++--------------- include/configs/km-powerpc.h | 92 +++++++++++++++ include/configs/km_arm.h | 25 ++++- include/configs/kmeter1.h | 36 +++---- include/configs/mgcoge.h | 31 +++--- 5 files changed, 286 insertions(+), 132 deletions(-) create mode 100644 include/configs/km-powerpc.h
include/configs/keymile-common.h +139 -95
@@ -86,10 +86,6 @@#define CONFIG_HUSH_INIT_VAR #define CONFIG_SYS_ALT_MEMTEST /* memory test, takes time */ -#define CONFIG_SYS_MEMTEST_START 0x00100000/* memtest works on */ -#define CONFIG_SYS_MEMTEST_END 0x00f00000/* 1 ... 15 MB in DRAM */ - -#define CONFIG_SYS_LOAD_ADDR 0x100000/* default load address */ #define CONFIG_SYS_HZ 1000/* decrementer freq: 1 ms ticks */
@@ -142,7 +138,6 @@#define CONFIG_CMD_UBI #define CONFIG_RBTREE #define CONFIG_MTD_PARTITIONS -#define CONFIG_FLASH_CFI_MTD #define CONFIG_MTD_DEVICE #define CONFIG_MTD_CONCAT
@@ -170,103 +165,152 @@ "kmprivate=empty\0"#endif +#ifndef CONFIG_KM_DEF_NETDEV +#define CONFIG_KM_DEF_NETDEV \ + "netdev=eth0\0" +#endif + +#ifndef CONFIG_KM_UBI_PARTITION_NAME +#define CONFIG_KM_UBI_PARTITION_NAME "ubi0" +#endif +#ifndef CONFIG_KM_UBI_LINUX_MTD_NAME +#define CONFIG_KM_UBI_LINUX_MTD_NAME "ubi0" +#endif +#define xstr (s) str(s)#define str (s) #s +/* +* bootargs +* - modify 'bootargs' +* +* - 'addip': add ip configuration +* - 'addpanic': add kernel panic options +* - 'addramfs': add phram device for the rootfilesysten in ram +* - 'addtty': add console=... +* - 'nfsargs': default arguments for nfs boot +* - 'flashargs': defaults arguments for flash base boot +* +* processor specific settings +* - 'addmtdparts': add mtd partition information +*/ +#define CONFIG_KM_DEF_ENV_BOOTARGS \ + "addinit=" \ + "setenv bootargs ${bootargs} init=${init}\0" \ + "addip=" \ + "setenv bootargs ${bootargs} " \ + "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}" \ + ":${hostname}:${netdev}:off\0" \ + "addpanic=" \ + "setenv bootargs ${bootargs} " \ + "panic=1 panic_on_oops=1\0" \ + "addramfs=" \ + "setenv bootargs \"" \ + "${bootargs} phram.phram=" \ + "rootfs${actual_bank},${rootfsaddr},${rootfssize}\"\0" \ + "addtty=" \ + "setenv bootargs ${bootargs}" \ + " console=" CONFIG_KM_CONSOLE_TTY ",${baudrate}\0" \ + "nfsargs=" \ + "setenv bootargs " \ + "ubi.mtd=" CONFIG_KM_UBI_LINUX_MTD_NAME " " \ + "root=/dev/nfs rw " \ + "nfsroot=${serverip}:${rootpath}\0" \ + "flashargs=" \ + "setenv bootargs " \ + "ubi.mtd=" CONFIG_KM_UBI_LINUX_MTD_NAME " " \ + "root=mtdblock:rootfs${actual_bank} " \ + "rootfstype=squashfs ro\0" \ + "" + +#define CONFIG_KM_DEF_ENV_COMPUTE_ADDR \ + "setboardid=" \ + "if test \"x${boardId}\" = \"x\"; then; " \ + "setenv boardId ${IVM_BoardId} && " \ + "setenv hwKey ${IVM_HWKey}; " \ + "else; " \ + "echo \\\\c; " \ + "fi\0" + +/* +* flash_boot +* - commands for booting from flash +* +* - 'cramfsaddr': address to the cramfs (in ram) +* - 'cramfsloadkernel': copy kernel from a cramfs to ram +* - 'ubiattach': attach ubi partition +* - 'ubicopy': copy ubi volume to ram +* - volume names: bootfs0, bootfs1, bootfs2, ... +* - 'ubiparition': mtd parition name for ubi +* +* processor specific settings +* - 'cramfsloadfdt': copy fdt from a cramfs to ram +*/ +#define CONFIG_KM_DEF_ENV_FLASH_BOOT \ + "cramfsaddr="xstr(CONFIG_KM_CRAMFS_ADDR) "\0" \ + "cramfsloadkernel=" \ + "cramfsload ${kernel_addr_r} uImage && " \ + "setenv actual_kernel_addr ${kernel_addr_r}\0" \ + "ubiattach=ubi part ${ubipartition}\0" \ + "ubicopy=ubi read ${cramfsaddr} bootfs${actual_bank}\0" \ + "ubipartition=" CONFIG_KM_UBI_PARTITION_NAME "\0" \ + "" + +/* +* net_boot +* - commands for booting over the network +* +* - 'tftpkernel': load a kernel with tftp into ram +* +* processor specific settings +* - 'tftpfdt': load fdt with tftp into ram +*/ +#define CONFIG_KM_DEF_ENV_NET_BOOT \ + "tftpkernel=" \ + "tftpboot ${kernel_addr_r} ${kernel_file} && " \ + "setenv actual_kernel_addr ${kernel_addr_r} \0" + +/* +* constants +* - KM specific constants and commands +* +* - 'default': setup default environment +*/ +#define CONFIG_KM_DEF_ENV_CONSTANTS \ + "actual=setenv actual_bank ${initial_boot_bank}\0" \ + "actual0=setenv actual_bank 0\0" \ + "actual_bank=${initial_boot_bank}\0" \ + "default=" \ + "setenv default 'run newenv; reset' && " \ + "run release && saveenv; reset\0" \ + "checkboardid=" \ + "test \"x${boardId}\" = \"x${IVM_BoardId}\"\0" \ + "printbootargs=print bootargs\0" \ + "rootfsfile="xstr(CONFIG_HOSTNAME) "/rootfsImage\0" \ + "" +#ifndef CONFIG_KM_DEF_ENV #define CONFIG_KM_DEF_ENV \ - "netdev=eth0\0" \ - "u-boot_addr_r=100000\0" \ - "kernel_addr_r=200000\0" \ - "fdt_addr_r=600000\0" \ - "ram_ws=800000 \0" \ - "script_ws=780000 \0" \ - "fdt_file=" xstr(CONFIG_HOSTNAME) "/" \ - xstr(CONFIG_HOSTNAME) ".dtb\0" \ - "u-boot=" xstr(CONFIG_HOSTNAME) "/u-boot.bin \0" \ - "kernel_file=" xstr(CONFIG_HOSTNAME) "/uImage \0" \ - "load=tftp ${u-boot_addr_r} ${u-boot}\0" \ - "update=protect off " xstr(BOOTFLASH_START) " +${filesize};" \ - "erase " xstr(BOOTFLASH_START) " +${filesize};" \ - "cp.b ${u-boot_addr_r} " xstr(BOOTFLASH_START) \ - " ${filesize};" \ - "protect on " xstr(BOOTFLASH_START) " +${filesize}\0" \ - "load_fdt=tftp ${fdt_addr_r} ${fdt_file}; " \ - "setenv actual_fdt_addr ${fdt_addr_r} \0" \ - "load_kernel=tftp ${kernel_addr_r} ${kernel_file}; " \ - "setenv actual_kernel_addr ${kernel_addr_r} \0" \ - "ramargs=setenv bootargs root=/dev/ram rw\0" \ - "nfsargs=setenv bootargs root=/dev/nfs rw " \ - "nfsroot=${serverip}:${rootpath}\0" \ - "mtdargs=setenv bootargs root=${actual_rootfs} rw " \ - "rootfstype=jffs2 \0" \ - "altmtdargs=setenv bootargs root=${backup_rootfs} rw " \ - "rootfstype=jffs2 \0" \ - "addmtd=setenv bootargs ${bootargs} ${mtdparts}\0" \ - "addip=setenv bootargs ${bootargs} " \ - "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}" \ - ":${hostname}:${netdev}:off panic=1\0" \ - "addboardid=setenv bootargs ${bootargs} " \ - "hwKey=${IVM_HWKey} boardId=0x${IVM_BoardId} \0" \ - "addpram=setenv bootargs ${bootargs} " \ - "mem=${mem} pram=${pram}\0" \ - "pram=" xstr(CONFIG_PRAM) "k\0" \ - "net_nfs=tftp ${kernel_addr_r} ${kernel_file}; " \ - "tftp ${fdt_addr_r} ${fdt_file}; " \ - "run nfsargs addip addcon addboardid addpram;" \ - "bootm ${kernel_addr_r} - ${fdt_addr_r}\0" \ - "net_self=tftp ${kernel_addr_r} ${kernel_file}; " \ - "tftp ${fdt_addr_r} ${fdt_file}; " \ - "tftp ${ramdisk_addr} ${ramdisk_file}; " \ - "run ramargs addip addboardid addpram; " \ - "bootm ${kernel_addr_r} ${ramdisk_addr} ${fdt_addr_r}\0"\ - "flash_nfs=run nfsargs addip addcon;" \ - "bootm ${kernel_addr} - ${fdt_addr}\0" \ - "flash_self=run ramargs addip addcon addboardid addpram;" \ - "bootm ${kernel_addr} ${ramdisk_addr} ${fdt_addr}\0" \ - "bootcmd=run mtdargs addip addcon addboardid addpram; " \ - "bootm ${actual_kernel_addr} - ${actual_fdt_addr} \0" \ - "altbootcmd=run altmtdargs addip addcon addboardid addpram; " \ - "bootm ${backup_kernel_addr} - ${backup_fdt_addr} \0" \ - "actual0=setenv actual_bank 0; setenv actual_kernel_addr " \ - "${bank0_kernel_addr}; " \ - "setenv actual_fdt_addr ${bank0_fdt_addr}; " \ - "setenv actual_rootfs ${bank0_rootfs} \0" \ - "actual1=setenv actual_bank 1; setenv actual_kernel_addr " \ - "${bank1_kernel_addr}; " \ - "setenv actual_fdt_addr ${bank1_fdt_addr}; " \ - "setenv actual_rootfs ${bank1_rootfs} \0" \ - "backup0=setenv backup_bank 0; setenv backup_kernel_addr " \ - "${bank0_kernel_addr}; " \ - "setenv backup_fdt_addr ${bank0_fdt_addr}; " \ - "setenv backup_rootfs ${bank0_rootfs} \0" \ - "backup1=setenv backup_bank 1; setenv backup_kernel_addr " \ - "${bank1_kernel_addr}; " \ - "setenv backup_fdt_addr ${bank1_fdt_addr}; " \ - "setenv backup_rootfs ${bank1_rootfs} \0" \ - "setbank0=run actual0 backup1 \0" \ - "setbank1=run actual1 backup0 \0" \ - "release=setenv bootcmd " \ - "\'run mtdargs addip addcon addboardid addpram;" \ - "bootm ${actual_kernel_addr} - ${actual_fdt_addr} \'; " \ - "saveenv \0" \ - "develop=setenv bootcmd " \ - "\'run nfsargs addip addcon addboardid addpram;" \ - "bootm ${actual_kernel_addr} - ${actual_fdt_addr} \'; " \ - "saveenv \0" \ - "developall=setenv bootcmd " \ - "\'run load_fdt load_kernel nfsargs " \ - "addip addcon addboardid addpram; " \ - "bootm ${actual_kernel_addr} - ${actual_fdt_addr} \'; " \ - "saveenv \0" \ - "set_new_esw_script=setenv new_esw_script " \ - "new_esw_0x${IVM_BoardId}_0x${IVM_HWKey}.scr \0" \ - "new_esw=run set_new_esw_script; " \ - "tftp ${script_ws} ${new_esw_script}; " \ - "iminfo ${script_ws}; source ${script_ws} \0" \ - "bootlimit=0 \0" \ CONFIG_KM_DEF_ENV_IOMUX \ CONFIG_KM_DEF_ENV_PRIVATE \ + CONFIG_KM_DEF_NETDEV \ + CONFIG_KM_DEF_ENV_CPU \ + CONFIG_KM_DEF_ENV_BOOTARGS \ + CONFIG_KM_DEF_ENV_COMPUTE_ADDR \ + CONFIG_KM_DEF_ENV_FLASH_BOOT \ + CONFIG_KM_DEF_ENV_NET_BOOT \ + "altbootcmd=run bootcmd\0" \ + "bootcmd=run default\0" \ + "bootlimit=2\0" \ + "init=/sbin/init-overlay.sh\0" \ + "kernel_addr_r="xstr(CONFIG_KM_KERNEL_ADDR) "\0" \ + "kernel_file="xstr(CONFIG_HOSTNAME) "/uImage\0" \ + "kernel_name=uImage\0" \ + "load=tftpboot ${u-boot_addr_r} ${u-boot}\0" \ + "mtdids=" MTDIDS_DEFAULT "\0" \ + "mtdparts=" MTDPARTS_DEFAULT "\0" \ + "u-boot="xstr(CONFIG_HOSTNAME) "/u-boot.bin\0" \ + "u-boot_addr_r="xstr(CONFIG_KM_KERNEL_ADDR) "\0" \ ""#endif /* CONFIG_KM_DEF_ENV */
include/configs/km-powerpc.h new file +92 -0
92 lines not on this page · raw message
include/configs/km_arm.h +23 -2
@@ -46,8 +46,29 @@/* include common defines/options for all Keymile boards */ #include "keymile-common.h" -#undef CONFIG_CMD_DTT -#undef CONFIG_BOOTCOUNT_LIMIT + +#define CONFIG_ENV_SIZE (128 << 10)/* NAND chip block size */ +#define CONFIG_SYS_MEMTEST_START 0x00400000/* 4M */ +#define CONFIG_SYS_MEMTEST_END 0x007fffff/*(_8M -1) */ +#define CONFIG_SYS_LOAD_ADDR 0x00800000/* default load adr- 8M */ + +/* pseudo-non volatile RAM [hex] */ +#define CONFIG_KM_PNVRAM 0x80000 +/* physical RAM MTD size [hex] */ +#define CONFIG_KM_PHRAM 0x17F000 + +#define CONFIG_KM_CRAMFS_ADDR 0x2400000 +#define CONFIG_KM_KERNEL_ADDR 0x2000000/* 4096KBytes */ + +#define CONFIG_KM_DEF_ENV_CPU \ + "addmtdparts=setenv bootargs ${bootargs} ${mtdparts}\0" \ + "boot=bootm ${actual_kernel_addr} - -\0" \ + "cramfsloadfdt=echo \\\\c\0" \ + "tftpfdt=echo \\\\c\0" \ + CONFIG_KM_DEF_ENV_UPDATE \ + "" + +#define CONFIG_MD5 /* get_random_hex on krikwood needs MD5 support */ #define CONFIG_SKIP_LOWLEVEL_INIT /* disable board lowlevel_init */
include/configs/kmeter1.h +16 -20
@@ -29,16 +29,20 @@#define CONFIG_HOSTNAME kmeter1#define CONFIG_SYS_TEXT_BASE 0xF0000000 +#define CONFIG_KM_DEF_NETDEV \ + "netdev=eth2\0" \/* include common defines/options for all Keymile boards */ #include "keymile-common.h" - -#define CONFIG_KM_UBI_PARTITION_NAME "ubi0" +#include "km-powerpc.h" #define MTDIDS_DEFAULT "nor0=boot" -#define MTDPARTS_DEFAULT \ - "mtdparts=boot:768k(u-boot),128k(env),128k(envred)," \ - "-(" CONFIG_KM_UBI_PARTITION_NAME ")" +#define MTDPARTS_DEFAULT "mtdparts=" \ + "boot:" \ + "768k(u-boot)," \ + "128k(env)," \ + "128k(envred)," \ + "-(" CONFIG_KM_UBI_PARTITION_NAME ")"#define CONFIG_MISC_INIT_R /*
@@ -443,7 +447,7 @@#define BOOTFLASH_START F0000000 -#define CONFIG_PRAM 512/* protected RAM [KBytes] */ +#define CONFIG_KM_CONSOLE_TTY "ttyS0"/* * Environment Configuration
@@ -455,22 +459,14 @@#define CONFIG_EXTRA_ENV_SETTINGS \ CONFIG_KM_DEF_ENV \ + "dtt_bus=pca9547:70:a\0" \ + "EEprom_ivm=pca9547:70:9\0" \ + "newenv=" \ + "prot off 0xF00C0000 +0x40000 && " \ + "era 0xF00C0000 +0x40000\0" \ "rootpath=/opt/eldk/ppc_82xx\0" \ - "addcon=setenv bootargs ${bootargs} console=ttyS0,${baudrate}\0"\ - "ramdisk_file=/tftpboot/kmeter1/uRamdisk\0" \ - "loadram=tftp ${ramdisk_addr_r} ${ramdisk_file}\0" \ - "loadfdt=tftp ${fdt_addr_r} ${fdt_file}\0" \ - "loadkernel=tftp ${kernel_addr_r} ${bootfile}\0" \ "unlock=yes\0" \ - "fdt_addr=F0080000\0" \ - "kernel_addr=F00a0000\0" \ - "ramdisk_addr=F03a0000\0" \ - "ramdisk_addr_r=F10000\0" \ - "EEprom_ivm=pca9547:70:9\0" \ - "dtt_bus=pca9547:70:a\0" \ - "mtdids=nor0=app \0" \ - "mtdparts=" MK_STR(MTDPARTS_DEFAULT) "\0" \ - "" + ""#if defined(CONFIG_UEC_ETH )#define CONFIG_HAS_ETH0
include/configs/mgcoge.h +16 -15
@@ -39,6 +39,7 @@/* include common defines/options for all Keymile boards */ #include "keymile-common.h" +#include "km-powerpc.h" /* * Select serial console configuration
@@ -82,28 +83,28 @@#define BOOTFLASH_START 0xFE000000 -#define MTDIDS_DEFAULT "nor0=boot,nor1=app" -#define MTDPARTS_DEFAULT \ - "mtdparts=boot:384k(u-boot),128k(env),128k(envred),3456k(free);" \ - "app:3m(esw0),10m(rootfs0),3m(esw1),10m(rootfs1),1m(var),5m(cfg)" +#define CONFIG_KM_CONSOLE_TTY "ttyCPM0" + +#define MTDIDS_DEFAULT "nor3=app" +#define MTDPARTS_DEFAULT "mtdparts=" \ + "app:" \ + "768k(u-boot)," \ + "128k(env)," \ + "128k(envred)," \ + "3072k(free)," \ + "-(" CONFIG_KM_UBI_PARTITION_NAME ")" -#ifndef CONFIG_KM_DEF_ENV /* if not set by keymile-common.h */ -#define CONFIG_KM_DEF_ENV "km-common=empty\0" -#endif /* * Default environment settings */ -#define CONFIG_EXTRA_ENV_SETTINGS \ +#define CONFIG_EXTRA_ENV_SETTINGS \ CONFIG_KM_DEF_ENV \ - "rootpath=/opt/eldk/ppc_82xx\0" \ - "addcon=setenv bootargs ${bootargs} " \ - "console=ttyCPM0,${baudrate}\0" \ - "mtdids=nor0=boot,nor1=app \0" \ - "partition=nor1,5 \0" \ - "new_env=prot off FE060000 FE09FFFF; era FE060000 FE09FFFF \0" \ "EEprom_ivm=pca9544a:70:4 \0" \ - "mtdparts=" MK_STR(MTDPARTS_DEFAULT) "\0" \ "unlock=yes\0" \ + "newenv=" \ + "prot off 0xFE0C0000 +0x40000 && " \ + "era 0xFE0C0000 +0x40000\0" \ + "rootpath=/opt/eldk/ppc_82xx\0" \ ""#define CONFIG_SYS_SDRAM_BASE 0x00000000
Signature · 1 line
1.7.4
PATCH v2 4/21 mpc832x: add support for the mpc8321 based suvd3 board
In reply to Heiko Schocher- serial console on UART1
- Ethernet RMII over UCC4
- PHY SMSC LAN8700
- 64MB Flash
- 128 MB DDR2 RAM
- I2C
- bootcount
This board is similiar to the kmeter1 (8360) board, so common config options are extracted into the include/configs/km83xx-common.h file.
---
Changes for v2:
- fix checkpatch.pl errors and warnings
MAINTAINERS | 1 +
arch/powerpc/cpu/mpc83xx/fdt.c | 3 +-
arch/powerpc/lib/bootcount.c | 2 +-
board/keymile/common/common.c | 9 +-
board/keymile/{kmeter1 => km83xx}/Makefile | 0
.../keymile/{kmeter1/kmeter1.c => km83xx/km83xx.c} | 149 ++++++---
boards.cfg | 3 +-
include/configs/km83xx-common.h | 324 +++++++++++++++++++
include/configs/kmeter1.h | 327 +------------------
include/configs/suvd3.h | 215 +++++++++++++
10 files changed, 669 insertions(+), 364 deletions(-)
rename board/keymile/{kmeter1 => km83xx}/Makefile (100%)
rename board/keymile/{kmeter1/kmeter1.c => km83xx/km83xx.c} (53%)
create mode 100644 include/configs/km83xx-common.h
create mode 100644 include/configs/suvd3.h
delete mode 100644 post/lib_powerpc/fpu/MakefileMAINTAINERS +1 -0
@@ -433,6 +433,7 @@ Heiko Schocher <[email protected]> municse MPC5200 sc3 PPC405GP suen3 ARM926EJS (Kirkwood SoC) + suvd3 MPC8321 uc101 MPC5200 ve8313 MPC8313
arch/powerpc/cpu/mpc83xx/fdt.c +2 -1
@@ -32,7 +32,8 @@ extern void ft_qe_setup(void *blob);DECLARE_GLOBAL_DATA_PTR ; -#if defined(CONFIG_BOOTCOUNT_LIMIT ) && defined(CONFIG_MPC8360 ) +#if defined(CONFIG_BOOTCOUNT_LIMIT ) && \ + (defined(CONFIG_MPC832x) || defined(CONFIG_MPC8360 ))#include <asm/immap_qe.h> void fdt_fixup_muram (void *blob)
arch/powerpc/lib/bootcount.c +1 -1
@@ -51,7 +51,7 @@#define CONFIG_SYS_BOOTCOUNT_ADDR (CONFIG_SYS_IMMR + CPM_BOOTCOUNT_ADDR)#endif /* defined(CONFIG_MPC8260) */ -#if defined(CONFIG_MPC8360 ) +#if defined(CONFIG_MPC832x) || defined(CONFIG_MPC8360 )#include <asm/immap_qe.h> #define CONFIG_SYS_BOOTCOUNT_ADDR (CONFIG_SYS_IMMR + 0x110000 + \
board/keymile/common/common.c +5 -4
@@ -29,6 +29,7 @@#include <malloc.h> #include <hush.h> #include <net.h> +#include <netdev.h> #include <asm/io.h> #if defined(CONFIG_OF_BOARD_SETUP ) && defined(CONFIG_OF_LIBFDT )
@@ -424,7 +425,7 @@ static int get_scl (void) }#endif -#if !defined(CONFIG_KMETER1 ) +#if !defined(CONFIG_MPC83xx)static void writeStartSeq (void ) {set_sda (1 );
@@ -483,7 +484,7 @@ static int i2c_make_abort (void)*/ void i2c_init_board (void ) { -#if defined(CONFIG_KMETER1 ) +#if defined(CONFIG_MPC83xx)struct fsl_i2c *dev; dev = (struct fsl_i2c *) (CONFIG_SYS_IMMR +CONFIG_SYS_I2C_OFFSET );uchar dummy;
@@ -591,7 +592,7 @@ int board_eth_init (bd_t *bis) (void )keymile_hdlc_enet_initialize (bis);#endif if (ethernet_present ()) { -return -1 ; +return cpu_eth_init (bis); } -return 0 ; +return -1 ; }
board/keymile/km83xx/Makefile renamed from board/keymile/kmeter1/Makefile +0 -0
board/keymile/km83xx/km83xx.c renamed from board/keymile/kmeter1/kmeter1.c +101 -48
250 lines not on this page · raw message
boards.cfg +2 -1
@@ -470,10 +470,11 @@ MPC8360ERDK_66 powerpc mpc83xx mpc8360erdk freesca MPC837XEMDS powerpc mpc83xx mpc837xemds freescale - MPC837XEMDS MPC837XEMDS_HOST powerpc mpc83xx mpc837xemds freescale - MPC837XEMDS:PCI MPC837XERDB powerpc mpc83xx mpc837xerdb freescale -kmeter1 powerpc mpc83xx kmeter1 keymile +kmeter1 powerpc mpc83xx km83xx keymile MVBLM7 powerpc mpc83xx mvblm7 matrix_vision SIMPC8313_LP powerpc mpc83xx simpc8313 sheldon - SIMPC8313:NAND_LP SIMPC8313_SP powerpc mpc83xx simpc8313 sheldon - SIMPC8313:NAND_SP +suvd3 powerpc mpc83xx km83xx keymile TQM834x powerpc mpc83xx tqm834x tqc sbc8540 powerpc mpc85xx sbc8560 - - SBC8540 sbc8540_33 powerpc mpc85xx sbc8560 - - SBC8540
include/configs/km83xx-common.h new file +324 -0
324 lines not on this page · raw message
include/configs/kmeter1.h +18 -309
393 lines not on this page · raw message
include/configs/suvd3.h new file +215 -0
215 lines not on this page · raw message
PATCH v2 5/21 mpc832x: add support for mpc8321 based tuxa1 board
In reply to Heiko SchocherThis board is similar to suvd3 board. So most initialisation topics are taken from suvd3 (UART1, Ethernet, piggy PHY, flash, ram) only the application specific chip selects differ.
---
Changes for v2:
- fix checkpatch.pl errors and warnings
MAINTAINERS | 1 + boards.cfg | 1 + include/configs/tuxa1.h | 234 +++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 236 insertions(+), 0 deletions(-) create mode 100644 include/configs/tuxa1.h
MAINTAINERS +1 -0
@@ -434,6 +434,7 @@ Heiko Schocher <[email protected]> sc3 PPC405GP suen3 ARM926EJS (Kirkwood SoC) suvd3 MPC8321 + tuxa1 MPC8321 uc101 MPC5200 ve8313 MPC8313
boards.cfg +1 -0
@@ -476,6 +476,7 @@ SIMPC8313_LP powerpc mpc83xx simpc8313 sheldon SIMPC8313_SP powerpc mpc83xx simpc8313 sheldon - SIMPC8313:NAND_SP suvd3 powerpc mpc83xx km83xx keymile TQM834x powerpc mpc83xx tqm834x tqc +tuxa1 powerpc mpc83xx km83xx keymile sbc8540 powerpc mpc85xx sbc8560 - - SBC8540 sbc8540_33 powerpc mpc85xx sbc8560 - - SBC8540 sbc8540_66 powerpc mpc85xx sbc8560 - - SBC8540
include/configs/tuxa1.h new file +234 -0
234 lines not on this page · raw message
Signature · 1 line
1.7.4
PATCH v2 6/21 mpc832x: add support for mpc8321 based tuda1 board
In reply to Heiko SchocherThis board is similar to suvd3 board. So most initialisation topics are taken from suvd3 (UART1, Ethernet, piggy PHY, flash, ram) only the application specific chip selects differ.
---
changes for v2:
- fix checkpatch.pl errors and warnings
MAINTAINERS | 1 + boards.cfg | 1 + include/configs/tuda1.h | 249 +++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 251 insertions(+), 0 deletions(-) create mode 100644 include/configs/tuda1.h
MAINTAINERS +1 -0
@@ -434,6 +434,7 @@ Heiko Schocher <[email protected]> sc3 PPC405GP suen3 ARM926EJS (Kirkwood SoC) suvd3 MPC8321 + tuda1 MPC8321 tuxa1 MPC8321 uc101 MPC5200 ve8313 MPC8313
boards.cfg +1 -0
@@ -476,6 +476,7 @@ SIMPC8313_LP powerpc mpc83xx simpc8313 sheldon SIMPC8313_SP powerpc mpc83xx simpc8313 sheldon - SIMPC8313:NAND_SP suvd3 powerpc mpc83xx km83xx keymile TQM834x powerpc mpc83xx tqm834x tqc +tuda1 powerpc mpc83xx km83xx keymile tuxa1 powerpc mpc83xx km83xx keymile sbc8540 powerpc mpc85xx sbc8560 - - SBC8540 sbc8540_33 powerpc mpc85xx sbc8560 - - SBC8540
include/configs/tuda1.h new file +249 -0
249 lines not on this page · raw message
Signature · 1 line
1.7.4
PATCH v2 7/21 arm: add support for kirkwood based mgcoge2un board
In reply to Heiko SchocherThis board is similar to keymile suen3.
---
Changes for v2:
- fix checkpatch.pl errors and warnings
MAINTAINERS | 1 + boards.cfg | 1 + include/configs/km_arm.h | 41 ++++++++++++++++++++++++++++ include/configs/mgcoge2un.h | 63 +++++++++++++++++++++++++++++++++++++++++++ include/configs/suen3.h | 41 ---------------------------- 5 files changed, 106 insertions(+), 41 deletions(-) create mode 100644 include/configs/mgcoge2un.h
MAINTAINERS +1 -0
@@ -428,6 +428,7 @@ Heiko Schocher <[email protected]> jupiter MPC5200 kmeter1 MPC8360 mgcoge MPC8247 + mgcoge2un ARM926EJS (Kirkwood SoC) mucmc52 MPC5200 muas3001 MPC8270 municse MPC5200
boards.cfg +1 -0
@@ -94,6 +94,7 @@ davinci_schmoogie arm arm926ejs schmoogie davinci davinci_sffsdr arm arm926ejs sffsdr davinci davinci davinci_sonata arm arm926ejs sonata davinci davinci suen3 arm arm926ejs km_arm keymile kirkwood +mgcoge2un arm arm926ejs km_arm keymile kirkwood guruplug arm arm926ejs - Marvell kirkwood mv88f6281gtw_ge arm arm926ejs - Marvell kirkwood openrd_base arm arm926ejs - Marvell kirkwood
include/configs/km_arm.h +41 -0
47 lines not on this page · raw message
include/configs/mgcoge2un.h new file +63 -0
63 lines not on this page · raw message
include/configs/suen3.h +0 -41
47 lines not on this page · raw message
Signature · 1 line
1.7.4
PATCH v2 8/21 arm: add support of Kirkwood based board SUEN8
In reply to Heiko SchocherThe Kirwood based SUEN8 board from Keymile is at this stage the same than the suen3 board. This patch adds the board support for the suen8.
---
Changes for v2:
- fix checkpatch.pl errors and warnings
MAINTAINERS | 1 + boards.cfg | 1 + include/configs/suen8.h | 63 +++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 65 insertions(+), 0 deletions(-) create mode 100644 include/configs/suen8.h
MAINTAINERS +1 -0
@@ -434,6 +434,7 @@ Heiko Schocher <[email protected]> municse MPC5200 sc3 PPC405GP suen3 ARM926EJS (Kirkwood SoC) + suen8 ARM926EJS (Kirkwood SoC) suvd3 MPC8321 tuda1 MPC8321 tuxa1 MPC8321
boards.cfg +1 -0
@@ -94,6 +94,7 @@ davinci_schmoogie arm arm926ejs schmoogie davinci davinci_sffsdr arm arm926ejs sffsdr davinci davinci davinci_sonata arm arm926ejs sonata davinci davinci suen3 arm arm926ejs km_arm keymile kirkwood +suen8 arm arm926ejs km_arm keymile kirkwood mgcoge2un arm arm926ejs km_arm keymile kirkwood guruplug arm arm926ejs - Marvell kirkwood mv88f6281gtw_ge arm arm926ejs - Marvell kirkwood
include/configs/suen8.h new file +63 -0
63 lines not on this page · raw message
Signature · 1 line
1.7.4
PATCH v2 9/21 ppc: add support for ppc based board mgcoge2ne
In reply to Heiko SchocherThe mgcoge2 board from keymile deploys two different porcessors. An ARM based Kirkwood for the "unit" part of the SW and a PPC for the "ne" part of the SW. Therefore in Linux and U-Boot the names for the board are mgcoge2un and mgcoge2ne. This patch adds the mgcoge2ne part of the board. The ppc part of mgboge2 is quite similar to mgcoge, therefore a generic header km82xx-common.h was introduced to collect all similiarities. Currently the only difference is that mgcoge2ne has a 64 MB numonyx NOR flash with a single die. The mgcoge has a dual die flash 2*32MB from spansion.
---
Changes for v2:
- fix checkpatch.pl errors and warnings
MAINTAINERS | 1 + board/keymile/common/common.c | 4 +- board/keymile/mgcoge/mgcoge.c | 10 +- boards.cfg | 1 + include/configs/km82xx-common.h | 318 +++++++++++++++++++++++++++++++++++++++ include/configs/mgcoge.h | 294 +----------------------------------- include/configs/mgcoge2ne.h | 66 ++++++++ 7 files changed, 398 insertions(+), 296 deletions(-) create mode 100644 include/configs/km82xx-common.h create mode 100644 include/configs/mgcoge2ne.h
MAINTAINERS +1 -0
@@ -428,6 +428,7 @@ Heiko Schocher <[email protected]> jupiter MPC5200 kmeter1 MPC8360 mgcoge MPC8247 + mgcoge2ne MPC8247 mgcoge2un ARM926EJS (Kirkwood SoC) mucmc52 MPC5200 muas3001 MPC8270
board/keymile/common/common.c +2 -2
@@ -22,7 +22,7 @@*/ #include <common.h> -#if defined(CONFIG_MGCOGE ) +#if defined(CONFIG_MGCOGE ) || defined(CONFIG_MGCOGE2NE )#include <mpc8260.h> #endif #include <ioports.h>
@@ -337,7 +337,7 @@ int ivm_read_eeprom (void)#define DELAY_ABORT_SEQ 62#define DELAY_HALF_PERIOD (500 / (CONFIG_SYS_I2C_SPEED / 1000)) -#if defined(CONFIG_MGCOGE ) +#if defined(CONFIG_MGCOGE ) || defined(CONFIG_MGCOGE2NE )#define SDA_MASK 0x00010000#define SCL_MASK 0x00020000static void set_pin (int state,unsigned long mask)
board/keymile/mgcoge/mgcoge.c +7 -3
@@ -286,10 +286,14 @@ phys_size_t initdram (int board_type)int checkboard (void ) { -puts ("Board: Keymile mgcoge" ); +#if defined(CONFIG_MGCOGE ) +puts ("Board: Keymile mgcoge" ); +#else +puts ("Board: Keymile mgcoge2ne" ); +#endif if (ethernet_present ()) -puts (" with PIGGY." ); -puts ("\n" ); +puts (" with PIGGY." ); +puts ("\n" );return 0 ; }
boards.cfg +1 -0
@@ -424,6 +424,7 @@ PQ2FADS-ZU_66MHz_lowboot powerpc mpc8260 mpc8260ads freesca PQ2FADS-ZU_lowboot powerpc mpc8260 mpc8260ads freescale - MPC8260ADS:ADSTYPE=CONFIG_SYS_PQ2FADS,SYS_TEXT_BASE=0xFF800000 VoVPN-GW_66MHz powerpc mpc8260 vovpn-gw funkwerk - VoVPN-GW:CLKIN_66MHz mgcoge powerpc mpc8260 - keymile +mgcoge2ne powerpc mpc8260 mgcoge keymile SCM powerpc mpc8260 - siemens TQM8255_AA powerpc mpc8260 tqm8260 tqc - TQM8260:MPC8255,300MHz TQM8260_AA powerpc mpc8260 tqm8260 tqc - TQM8260:MPC8260,200MHz
include/configs/km82xx-common.h new file +318 -0
318 lines not on this page · raw message
include/configs/mgcoge.h +3 -291
310 lines not on this page · raw message
include/configs/mgcoge2ne.h new file +66 -0
66 lines not on this page · raw message
Signature · 1 line
1.7.4
PATCH v2 10/21 keymile, 8321 boards: move common definitions to km8321-common.h
In reply to Heiko SchocherFrom: Thomas Reufer <[email protected]>
First step for a cleanup of all header files for km8321 boards.
---
Changes for v2:
- fix checkpatch.pl errors and warnings
include/configs/km8321-common.h | 141 +++++++++++++++++++++++++++++++++++++++ 1 files changed, 141 insertions(+), 0 deletions(-) create mode 100644 include/configs/km8321-common.h
include/configs/km8321-common.h new file +141 -0
@@ -0,0 +1,141 @@ +/* +* Copyright (C) 2006 Freescale Semiconductor, Inc. +* Dave Liu <[email protected]> +* +* Copyright (C) 2007 Logic Product Development, Inc. +* Peter Barada <[email protected]> +* +* Copyright (C) 2007 MontaVista Software, Inc. +* Anton Vorontsov <[email protected]> +* +* (C) Copyright 2008 +* Heiko Schocher, DENX Software Engineering, hs at denx.de. +* +* (C) Copyright 2010 +* Lukas Roggli, KEYMILE Ltd, lukas.roggli at keymile.com +* +* (C) Copyright 2010-2011 +* Thomas Reufer, KEYMILE Ltd, thomas.reufer at keymile.com +* +* 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. +*/ + +#ifndef __CONFIG_KM8321_COMMON_H +#define __CONFIG_KM8321_COMMON_H + +/* +* High Level Configuration Options +*/ +#define CONFIG_QE /* Has QE */ +#define CONFIG_MPC832x/* MPC832x CPU specific */ +#define CONFIG_KM8321 /* Keymile PBEC8321 board specific */ + +#define CONFIG_KM_DEF_NETDEV \ + "netdev=eth0\0" + +#define CONFIG_KM_DEF_ROOTPATH \ + "rootpath=/opt/eldk/ppc_8xx\0" + +/* include common defines/options for all 83xx Keymile boards */ +#include "km83xx-common.h" + +#define CONFIG_MISC_INIT_R + +/* +* System IO Config +*/ +#define CONFIG_SYS_SICRH 0x00000006 +#define CONFIG_SYS_SICRL SICRL_IRQ_CKS + +/* +* Hardware Reset Configuration Word +*/ +#define CONFIG_SYS_HRCW_LOW (\ + HRCWL_LCL_BUS_TO_SCB_CLK_1X1 | \ + HRCWL_DDR_TO_SCB_CLK_2X1 | \ + HRCWL_CSB_TO_CLKIN_2X1 | \ + HRCWL_CORE_TO_CSB_2_5X1 | \ + HRCWL_CE_PLL_VCO_DIV_2 | \ + HRCWL_CE_TO_PLL_1X3) + +#define CONFIG_SYS_HRCW_HIGH (\ + HRCWH_PCI_AGENT | \ + HRCWH_PCI_ARBITER_DISABLE | \ + HRCWH_CORE_ENABLE | \ + HRCWH_FROM_0X00000100 | \ + HRCWH_BOOTSEQ_DISABLE | \ + HRCWH_SW_WATCHDOG_DISABLE | \ + HRCWH_ROM_LOC_LOCAL_16BIT | \ + HRCWH_BIG_ENDIAN | \ + HRCWH_LALE_NORMAL) + +#define CONFIG_SYS_DDR_CS0_BNDS 0x0000007f +#define CONFIG_SYS_DDR_SDRAM_CFG (SDRAM_CFG_SDRAM_TYPE_DDR2 | \ + SDRAM_CFG_32_BE | \ + SDRAM_CFG_SREN) + +#define CONFIG_SYS_DDR_SDRAM_CFG2 0x00401000 +#define CONFIG_SYS_DDR_CLK_CNTL (DDR_SDRAM_CLK_CNTL_CLK_ADJUST_05) +#define CONFIG_SYS_DDR_INTERVAL ((0x064 << SDRAM_INTERVAL_BSTOPRE_SHIFT) | \ + (0x200 << SDRAM_INTERVAL_REFINT_SHIFT)) + +#define CONFIG_SYS_DDR_CS0_CONFIG (CSCONFIG_EN | CSCONFIG_AP | \ + CSCONFIG_ODT_WR_CFG | \ + CSCONFIG_ROW_BIT_13 | \ + CSCONFIG_COL_BIT_10) + +#define CONFIG_SYS_DDR_MODE 0x47860252 +#define CONFIG_SYS_DDR_MODE2 0x8080c000 + +#define CONFIG_SYS_DDR_TIMING_0 ((2 << TIMING_CFG0_MRS_CYC_SHIFT) | \ + (8 << TIMING_CFG0_ODT_PD_EXIT_SHIFT) | \ + (2 << TIMING_CFG0_PRE_PD_EXIT_SHIFT) | \ + (2 << TIMING_CFG0_ACT_PD_EXIT_SHIFT) | \ + (0 << TIMING_CFG0_WWT_SHIFT) | \ + (0 << TIMING_CFG0_RRT_SHIFT) | \ + (0 << TIMING_CFG0_WRT_SHIFT) | \ + (0 << TIMING_CFG0_RWT_SHIFT)) + +#define CONFIG_SYS_DDR_TIMING_1 ((TIMING_CFG1_CASLAT_50) | \ + (2 << TIMING_CFG1_WRTORD_SHIFT) | \ + (2 << TIMING_CFG1_ACTTOACT_SHIFT) | \ + (2 << TIMING_CFG1_WRREC_SHIFT) | \ + (6 << TIMING_CFG1_REFREC_SHIFT) | \ + (2 << TIMING_CFG1_ACTTORW_SHIFT) | \ + (6 << TIMING_CFG1_ACTTOPRE_SHIFT) | \ + (2 << TIMING_CFG1_PRETOACT_SHIFT)) + +#define CONFIG_SYS_DDR_TIMING_2 ((8 << TIMING_CFG2_FOUR_ACT_SHIFT) | \ + (3 << TIMING_CFG2_CKE_PLS_SHIFT) | \ + (2 << TIMING_CFG2_WR_DATA_DELAY_SHIFT) | \ + (2 << TIMING_CFG2_RD_TO_PRE_SHIFT) | \ + (4 << TIMING_CFG2_WR_LAT_DELAY_SHIFT) | \ + (0 << TIMING_CFG2_ADD_LAT_SHIFT) | \ + (5 << TIMING_CFG2_CPO_SHIFT)) + +#define CONFIG_SYS_DDR_TIMING_3 0x00000000 + +#define CONFIG_SYS_PIGGY_BASE 0xE8000000 +#define CONFIG_SYS_PIGGY_SIZE 128 + +/* EEprom support */ +#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1 + +/* +* Local Bus Configuration & Clock Setup +*/ +#define CONFIG_SYS_LCRR (LCRR_DBYP | LCRR_EADC_1 | LCRR_CLKDIV_2) +#define CONFIG_SYS_LBC_LBCR 0x00000000 + +/* +* MMU Setup +*/ +#define CONFIG_SYS_IBAT7L (0) +#define CONFIG_SYS_IBAT7U (0) +#define CONFIG_SYS_DBAT7L CONFIG_SYS_IBAT7L +#define CONFIG_SYS_DBAT7U CONFIG_SYS_IBAT7U + +#endif /* __CONFIG_KM8321_COMMON_H */
Signature · 1 line
1.7.4
PATCH v2 11/21 powerpc, 83xx: add kmsupx5 board support
In reply to Heiko SchocherThe Keymile SUPx5 board series is based on a PBEC8321 but contains an additional PBUS FPGA (LPXF) on local bus CS2.
---
Changes for v2:
- fix checkpatch.pl errors and warnings
MAINTAINERS | 1 + boards.cfg | 1 + include/configs/kmsupx5.h | 91 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 93 insertions(+), 0 deletions(-) create mode 100644 include/configs/kmsupx5.h
MAINTAINERS +1 -0
@@ -427,6 +427,7 @@ Heiko Schocher <[email protected]> ids8247 MPC8247 jupiter MPC5200 kmeter1 MPC8360 + kmsupx5 MPC8321 mgcoge MPC8247 mgcoge2ne MPC8247 mgcoge2un ARM926EJS (Kirkwood SoC)
boards.cfg +1 -0
@@ -477,6 +477,7 @@ kmeter1 powerpc mpc83xx km83xx keymile MVBLM7 powerpc mpc83xx mvblm7 matrix_vision SIMPC8313_LP powerpc mpc83xx simpc8313 sheldon - SIMPC8313:NAND_LP SIMPC8313_SP powerpc mpc83xx simpc8313 sheldon - SIMPC8313:NAND_SP +kmsupx5 powerpc mpc83xx km83xx keymile suvd3 powerpc mpc83xx km83xx keymile TQM834x powerpc mpc83xx tqm834x tqc tuda1 powerpc mpc83xx km83xx keymile
include/configs/kmsupx5.h new file +91 -0
91 lines not on this page · raw message
Signature · 1 line
1.7.4
PATCH v2 12/21 km-arm: i2c support for suenx based boards
In reply to Heiko SchocherThis patch renames the suen3 defines and functions to suenx which is more generic and more precise, because these values and functions where used by all suenX boards and not only sune3.
---
Changes for v2:
- fix checkpatch.pl errors and warnings
board/keymile/km_arm/km_arm.c | 20 ++++++++++---------- include/configs/km_arm.h | 18 +++++++++--------- 2 files changed, 19 insertions(+), 19 deletions(-)
board/keymile/km_arm/km_arm.c +10 -10
@@ -96,7 +96,7 @@ u32 kwmpp_config[] = {MPP41_GPIO ,/* Piggy3 LED[4] */ MPP42_GPIO ,/* Piggy3 LED[5] */ MPP43_GPIO ,/* Piggy3 LED[6] */ -MPP44_GPIO ,/* Piggy3 LED[7] */ +MPP44_GPIO ,/* Piggy3 LED[7], BIST_EN_L */ MPP45_GPIO ,/* Piggy3 LED[8] */ MPP46_GPIO ,/* Reserved */ MPP47_GPIO, /* Reserved */
@@ -162,14 +162,14 @@ int board_early_init_f(void)#if defined(CONFIG_SOFT_I2C )/* init the GPIO for I2C Bitbang driver */ -kw_gpio_set_valid (SUEN3_SDA_PIN ,1 ); -kw_gpio_set_valid (SUEN3_SCL_PIN ,1 ); -kw_gpio_direction_output (SUEN3_SDA_PIN ,0 ); -kw_gpio_direction_output (SUEN3_SCL_PIN ,0 ); +kw_gpio_set_valid (SUENx_SDA_PIN,1 ); +kw_gpio_set_valid (SUENx_SCL_PIN,1 ); +kw_gpio_direction_output (SUENx_SDA_PIN,0 ); +kw_gpio_direction_output (SUENx_SCL_PIN,0 );#endif #if defined(CONFIG_SYS_EEPROM_WREN ) -kw_gpio_set_valid (SUEN3_ENV_WP ,38 ); -kw_gpio_direction_output (SUEN3_ENV_WP ,1 ); +kw_gpio_set_valid (SUENx_ENV_WP,38 ); +kw_gpio_direction_output (SUENx_ENV_WP,1 );#endif return 0 ;
@@ -322,15 +322,15 @@ int get_sda (void)int get_scl (void ) { -return (kw_gpio_get_value (SUEN3_SCL_PIN ) ?1 :0 ); +return kw_gpio_get_value (SUENx_SCL_PIN) ?1 :0 ; }#endif #if defined(CONFIG_SYS_EEPROM_WREN )int eeprom_write_enable (unsigned dev_addr,int state) { -kw_gpio_set_value (SUEN3_ENV_WP , !state); +kw_gpio_set_value (SUENx_ENV_WP, !state); -return !kw_gpio_get_value (SUEN3_ENV_WP ); +return !kw_gpio_get_value (SUENx_ENV_WP); }#endif
include/configs/km_arm.h +9 -9
@@ -177,15 +177,15 @@ void set_sda (int state);void set_scl (int state);int get_sda (void );int get_scl (void ); -#define SUEN3_SDA_PIN 8 -#define SUEN3_SCL_PIN 9 -#define SUEN3_ENV_WP 38 - -#define I2C_ACTIVE __set_direction(SUEN3_SDA_PIN, 0) -#define I2C_TRISTATE __set_direction(SUEN3_SDA_PIN, 1) -#define I2C_READ (kw_gpio_get_value(SUEN3_SDA_PIN) ? 1 : 0) -#define I2C_SDA (bit) kw_gpio_set_value(SUEN3_SDA_PIN, bit); -#define I2C_SCL (bit) kw_gpio_set_value(SUEN3_SCL_PIN, bit); +#define SUENx_SDA_PIN 8 +#define SUENx_SCL_PIN 9 +#define SUENx_ENV_WP 38 + +#define I2C_ACTIVE __set_direction(SUENx_SDA_PIN, 0) +#define I2C_TRISTATE __set_direction(SUENx_SDA_PIN, 1) +#define I2C_READ (kw_gpio_get_value(SUENx_SDA_PIN) ? 1 : 0) +#define I2C_SDA (bit) kw_gpio_set_value(SUENx_SDA_PIN, bit); +#define I2C_SCL (bit) kw_gpio_set_value(SUENx_SCL_PIN, bit);#endif #define I2C_DELAY udelay(3)/* 1/4 I2C clock duration */
Signature · 1 line
1.7.4
PATCH v2 13/21 km_arm: change some register values for SDRAM initialization
In reply to Heiko SchocherThese new values were given by Clive Stubbings from Xentech. According to him they should be used on all bobcat designs.
The changes are the following:
- enables UART0 and UART1 pins in MPP
- define some L2 cache settings
- changes a SDRAM timing to better fit the hardware
- removed three writes that were the same as the reset values
---
Changes for v2:
- nothing
board/keymile/km_arm/kwbimage.cfg | 32 ++++++++++++++++++-------------- 1 files changed, 18 insertions(+), 14 deletions(-)
board/keymile/km_arm/kwbimage.cfg +18 -14
@@ -27,16 +27,18 @@ # Boot Media configurations BOOT_FROM spi # Boot from SPI flash -DATA 0xFFD10000 0x01111111 # MPP Control 0 Register -# bit 3-0: MPPSel0 1, NF_IO[2] -# bit 7-4: MPPSel1 1, NF_IO[3] -# bit 12-8: MPPSel2 1, NF_IO[4] -# bit 15-12: MPPSel3 1, NF_IO[5] +DATA 0xFFD10000 0x01112222 # MPP Control 0 Register +# bit 3-0: MPPSel0 2, NF_IO[2] +# bit 7-4: MPPSel1 2, NF_IO[3] +# bit 12-8: MPPSel2 2, NF_IO[4] +# bit 15-12: MPPSel3 2, NF_IO[5] # bit 19-16: MPPSel4 1, NF_IO[6] # bit 23-20: MPPSel5 1, NF_IO[7] # bit 27-24: MPPSel6 1, SYSRST_O # bit 31-28: MPPSel7 0, GPO[7] +DATA 0xFFD10004 0x03303300 + DATA 0xFFD10008 0x00001100 # MPP Control 2 Register # bit 3-0: MPPSel16 0, GPIO[16] # bit 7-4: MPPSel17 0, GPIO[17]
@@ -48,8 +50,8 @@ DATA 0xFFD10008 0x00001100 # MPP Control 2 Register # bit 31-28: MPPSel23 0, GPIO[23] DATA 0xFFD100E0 0x1B1B1B1B # IO Configuration 0 Register -DATA 0xFFD20134 0xBBBBBBBB # L2 RAM Timing 0 Register -DATA 0xFFD20138 0x00BBBBBB # L2 RAM Timing 1 Register +DATA 0xFFD20134 0x66666666 # L2 RAM Timing 0 Register +DATA 0xFFD20138 0x66666666 # L2 RAM Timing 1 Register DATA 0xFFD20154 0x00000200 # CPU RAM Management Control3 Register DATA 0xFFD2014C 0x00001C00 # CPU RAM Management Control1 Register DATA 0xFFD20148 0x00000001 # CPU RAM Management Control0 Register
@@ -63,7 +65,7 @@ DATA 0xFFD01400 0x43000400 # SDRAM Configuration Register # bit29-26: zero # bit31-30: 01 -DATA 0xFFD01404 0x36343000 # DDR Controller Control Low +DATA 0xFFD01404 0x39543000 # DDR Controller Control Low # bit 3-0: 0 reserved # bit 4: 0=addr/cmd in smame cycle # bit 5: 0=clk is driven during self refresh, we don't care for APX
@@ -75,7 +77,7 @@ DATA 0xFFD01404 0x36343000 # DDR Controller Control Low # bit30-28: 3 required # bit31: 0=no additional STARTBURST delay -DATA 0xFFD01408 0x2302544B # DDR Timing (Low) (active cycles value +1) +DATA 0xFFD01408 0x34136552 # DDR Timing (Low) (active cycles value +1) # bit3-0: TRAS lsbs # bit7-4: TRCD # bit11- 8: TRP
@@ -86,7 +88,7 @@ DATA 0xFFD01408 0x2302544B # DDR Timing (Low) (active cycles value +1) # bit27-24: TRRD # bit31-28: TRTP -DATA 0xFFD0140C 0x00000032 # DDR Timing (High) +DATA 0xFFD0140C 0x00000033 # DDR Timing (High) # bit6-0: TRFC # bit8-7: TR2R # bit10-9: TR2W
@@ -116,8 +118,8 @@ DATA 0xFFD01418 0x00000000 # DDR Operation # bit3-0: 0x0, DDR cmd # bit31-4: 0 required -DATA 0xFFD0141C 0x00000642 # DDR Mode -DATA 0xFFD01420 0x00000040 # DDR Extended Mode +DATA 0xFFD0141C 0x00000652 # DDR Mode +DATA 0xFFD01420 0x00000044 # DDR Extended Mode # bit0: 0, DDR DLL enabled # bit1: 0, DDR drive strenght normal # bit2: 1, DDR ODT control lsd disabled
@@ -140,6 +142,8 @@ DATA 0xFFD01424 0x0000F07F # DDR Controller Control High # bit11 : 0 , 1/4 clock cycle skew disabled for write mesh # bit15-12: 1111 required # bit31-16: 0 required +DATA 0xFFD01428 0x00074510 +DATA 0xFFD0147c 0x00007451 DATA 0xFFD01500 0x00000000 # CS[0]n Base address to 0x0 DATA 0xFFD01504 0x07FFFFF1 # CS[0]n Size
@@ -153,7 +157,7 @@ DATA 0xFFD0150C 0x00000000 # CS[1]n Size, window disabled DATA 0xFFD01514 0x00000000 # CS[2]n Size, window disabled DATA 0xFFD0151C 0x00000000 # CS[3]n Size, window disabled -DATA 0xFFD01494 0x00000000 # DDR ODT Control (Low) +DATA 0xFFD01494 0x00010001 # DDR ODT Control (Low) # bit3-0: 0, ODT0Rd, MODT[0] asserted during read from DRAM CS0 # bit19-16:0, ODT0Wr, MODT[0] asserted during write to DRAM CS0
@@ -162,7 +166,7 @@ DATA 0xFFD01498 0x00000000 # DDR ODT Control (High) # bit3-2: 00, ODT1 controlled by register # bit31-4: zero, required -DATA 0xFFD0149C 0x0000E90F # CPU ODT Control +DATA 0xFFD0149C 0x0000FC11 # CPU ODT Control # bit3-0: F, ODT0Rd, Internal ODT asserted during read from DRAM bank0 # bit7-4: 0, ODT0Wr, Internal ODT asserted during write to DRAM bank0 # bit9-8: 1, ODTEn, never active
Signature · 1 line
1.7.4
PATCH v2 14/21 ppc, 8321: cleanup tuxa1, tuda1 and suvd3 support
In reply to Heiko SchocherFor the kmsupx5 a new header file was introduced km8321-common.h. Now the common stuff from tuxa1, tuda1 and suvd3 was removed and the new header file included.
The defines CONFIG_SYS_PIGGY_BASE and CONFIG_SYS_PIGGY_SIZE are confusing. Because they actually describe the KMBEC FPGA values. The KMBEC FPGA can be PRIO on kmeter1 or upio on mgcoge. Therefore all the defines were renamed.
remove unneeded variable CONFIG_KM_DEF_NETDEV, as it is already declared in keymile-common.h
---
Changes for v2:
- fix checkpatch.pl errors and warnings
board/keymile/common/common.c | 3 +- board/keymile/km83xx/km83xx.c | 4 +- board/keymile/mgcoge/mgcoge.c | 4 +- include/configs/keymile-common.h | 2 +- include/configs/km82xx-common.h | 12 ++-- include/configs/km8321-common.h | 7 +-- include/configs/km83xx-common.h | 19 +++--- include/configs/kmeter1.h | 8 ++- include/configs/suvd3.h | 115 +------------------------------------- include/configs/tuda1.h | 112 +------------------------------------ include/configs/tuxa1.h | 114 +------------------------------------- 11 files changed, 36 insertions(+), 364 deletions(-)
board/keymile/common/common.c +2 -1
@@ -582,7 +582,8 @@ int fdt_get_node_and_value (void *blob,#if !defined(MACH_TYPE_KM_KIRKWOOD )int ethernet_present (void ) { -return (in_8 ((u8 *)CONFIG_SYS_PIGGY_BASE +CONFIG_SYS_SLOT_ID_OFF ) &0x80 ); +return in_8 ((u8 *)CONFIG_SYS_KMBEC_FPGA_BASE +CONFIG_SYS_SLOT_ID_OFF ) + &0x80 ; }#endif
board/keymile/km83xx/km83xx.c +2 -2
@@ -158,9 +158,9 @@ int board_early_init_r(void)break ; }/* enable the PHY on the PIGGY */ -setbits (8 , (void *)(CONFIG_SYS_PIGGY_BASE +0x10003 ),0x01 ); +setbits (8 , (void *)(CONFIG_SYS_KMBEC_FPGA_BASE +0x10003 ),0x01 );/* enable the Unit LED (green) */ -setbits (8 , (void *)(CONFIG_SYS_PIGGY_BASE +0x00002 ),0x01 ); +setbits (8 , (void *)(CONFIG_SYS_KMBEC_FPGA_BASE +0x00002 ),0x01 );#if defined(CONFIG_SUVD3 )/* configure UPMA for APP1 */
board/keymile/mgcoge/mgcoge.c +2 -2
@@ -304,9 +304,9 @@ int board_early_init_r (void) {/* setup the UPIOx */ /* General Unit Reset disabled, Flash Bank enabled, UnitLed on */ -out_8 ((u8 *)(CONFIG_SYS_PIGGY_BASE +0x02 ),0xc2 ); +out_8 ((u8 *)(CONFIG_SYS_KMBEC_FPGA_BASE +0x02 ),0xc2 );/* SCC4 enable, halfduplex, FCC1 powerdown */ -out_8 ((u8 *)(CONFIG_SYS_PIGGY_BASE +0x03 ),0x15 ); +out_8 ((u8 *)(CONFIG_SYS_KMBEC_FPGA_BASE +0x03 ),0x15 );return 0 ; }
include/configs/keymile-common.h +1 -1
@@ -102,7 +102,7 @@* driver to set the MAC. */ #define CONFIG_CHECK_ETHERNET_PRESENT -#define CONFIG_SYS_SLOT_ID_BASE CONFIG_SYS_PIGGY_BASE +#define CONFIG_SYS_SLOT_ID_BASE CONFIG_SYS_KMBEC_FPGA_BASE#define CONFIG_SYS_SLOT_ID_OFF (0x07)/* register offset */ #define CONFIG_SYS_SLOT_ID_MASK (0x3f)/* mask for slot ID bits */
include/configs/km82xx-common.h +6 -6
@@ -271,19 +271,19 @@ PSDMR_WRC_1C |\ PSDMR_CL_2) -/* GPIO/PIGGY on CS3 initialization values +/* UPIO FPGA (GPIO/PIGGY) on CS3 initialization values */ -#define CONFIG_SYS_PIGGY_BASE 0x30000000 -#define CONFIG_SYS_PIGGY_SIZE 128 +#define CONFIG_SYS_KMBEC_FPGA_BASE 0x30000000 +#define CONFIG_SYS_KMBEC_FPGA_SIZE 128 -#define CONFIG_SYS_BR3_PRELIM ((CONFIG_SYS_PIGGY_BASE & BRx_BA_MSK) |\ +#define CONFIG_SYS_BR3_PRELIM ((CONFIG_SYS_KMBEC_FPGA_BASE & BRx_BA_MSK) |\ BRx_PS_8 | BRx_MS_GPCM_P | BRx_V) -#define CONFIG_SYS_OR3_PRELIM (MEG_TO_AM(CONFIG_SYS_PIGGY_SIZE) |\ +#define CONFIG_SYS_OR3_PRELIM (MEG_TO_AM(CONFIG_SYS_KMBEC_FPGA_SIZE) |\ ORxG_CSNT | ORxG_ACS_DIV2 |\ ORxG_SCY_3_CLK | ORxG_TRLX) -/* Board FPGA on CS4 initialization values +/* BFTICU board FPGA on CS4 initialization values */ #define CONFIG_SYS_FPGA_BASE 0x40000000#define CONFIG_SYS_FPGA_SIZE 1/*1KB*/
include/configs/km8321-common.h +2 -5
@@ -33,9 +33,6 @@#define CONFIG_MPC832x/* MPC832x CPU specific */ #define CONFIG_KM8321 /* Keymile PBEC8321 board specific */ -#define CONFIG_KM_DEF_NETDEV \ - "netdev=eth0\0" -#define CONFIG_KM_DEF_ROOTPATH \ "rootpath=/opt/eldk/ppc_8xx\0"
@@ -118,8 +115,8 @@#define CONFIG_SYS_DDR_TIMING_3 0x00000000 -#define CONFIG_SYS_PIGGY_BASE 0xE8000000 -#define CONFIG_SYS_PIGGY_SIZE 128 +#define CONFIG_SYS_KMBEC_FPGA_BASE 0xE8000000 +#define CONFIG_SYS_KMBEC_FPGA_SIZE 128/* EEprom support */ #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1
include/configs/km83xx-common.h +10 -9
@@ -121,13 +121,14 @@/* * PRIO1/PIGGY on the local bus CS1 */ -#define CONFIG_SYS_LBLAWBAR1_PRELIM CONFIG_SYS_PIGGY_BASE +/* Window base at flash base */ +#define CONFIG_SYS_LBLAWBAR1_PRELIM CONFIG_SYS_KMBEC_FPGA_BASE#define CONFIG_SYS_LBLAWAR1_PRELIM 0x8000001A/* 128MB window size */ -#define CONFIG_SYS_BR1_PRELIM (CONFIG_SYS_PIGGY_BASE | \ +#define CONFIG_SYS_BR1_PRELIM (CONFIG_SYS_KMBEC_FPGA_BASE | \ (1 << BR_PS_SHIFT) | /* 8 bit port size */ \BR_V ) -#define CONFIG_SYS_OR1_PRELIM (MEG_TO_AM(CONFIG_SYS_PIGGY_SIZE) | \ +#define CONFIG_SYS_OR1_PRELIM (MEG_TO_AM(CONFIG_SYS_KMBEC_FPGA_SIZE) | \ OR_GPCM_CSNT | OR_GPCM_ACS_DIV2 | \ OR_GPCM_SCY_2 | \ OR_GPCM_TRLX | OR_GPCM_EAD)
@@ -212,7 +213,7 @@#if defined(CONFIG_CMD_NAND )#define CONFIG_NAND_KMETER1 #define CONFIG_SYS_MAX_NAND_DEVICE 1 -#define CONFIG_SYS_NAND_BASE CONFIG_SYS_PIGGY_BASE +#define CONFIG_SYS_NAND_BASE CONFIG_SYS_KMBEC_FPGA_BASE#endif #if defined(CONFIG_PCI )
@@ -257,11 +258,11 @@#define CONFIG_SYS_DBAT1U CONFIG_SYS_IBAT1U/* PRIO1, PIGGY: icache cacheable, but dcache-inhibit and guarded */ -#define CONFIG_SYS_IBAT2L (CONFIG_SYS_PIGGY_BASE | BATL_PP_10 | \ - BATL_MEMCOHERENCE) -#define CONFIG_SYS_IBAT2U (CONFIG_SYS_PIGGY_BASE | BATU_BL_128M | \ - BATU_VS | BATU_VP) -#define CONFIG_SYS_DBAT2L (CONFIG_SYS_PIGGY_BASE | BATL_PP_10 | \ +#define CONFIG_SYS_IBAT2L (CONFIG_SYS_KMBEC_FPGA_BASE | BATL_PP_10 | \ + BATL_MEMCOHERENCE) +#define CONFIG_SYS_IBAT2U (CONFIG_SYS_KMBEC_FPGA_BASE | BATU_BL_128M | \ + BATU_VS | BATU_VP) +#define CONFIG_SYS_DBAT2L (CONFIG_SYS_KMBEC_FPGA_BASE | BATL_PP_10 | \ BATL_CACHEINHIBIT | BATL_GUARDEDSTORAGE)#define CONFIG_SYS_DBAT2U CONFIG_SYS_IBAT2U
include/configs/kmeter1.h +5 -3
@@ -107,9 +107,11 @@#define CONFIG_SYS_DDR_TIMING_3 0x00000000 -#define CONFIG_SYS_PIGGY_BASE 0xE8000000 -#define CONFIG_SYS_PIGGY_SIZE 128 -#define CONFIG_SYS_PAXE_BASE 0xA0000000 +/* PRIO FPGA */ +#define CONFIG_SYS_KMBEC_FPGA_BASE 0xE8000000 +#define CONFIG_SYS_KMBEC_FPGA_SIZE 128 +/* PAXE FPGA */ +#define CONFIG_SYS_PAXE_BASE 0xA0000000#define CONFIG_SYS_PAXE_SIZE 512/* EEprom support */
include/configs/suvd3.h +2 -113
144 lines not on this page · raw message
include/configs/tuda1.h +2 -110
141 lines not on this page · raw message
include/configs/tuxa1.h +2 -112
143 lines not on this page · raw message
Signature · 1 line
1.7.4
PATCH v2 15/21 keymile, common; fix i2c deblocking support
In reply to Heiko SchocherThis patch fix the i2c deblocking facility with the i2c HW-Controller. The required delays for byte reading, the enhanced criteria for stop the dummy read and required 5 start/stop sequences are added.
Add i2c deblocking before ivm eeprom read.
Improve i2c deblocking sequence by respecting stop hold time.
Cleaned function for deblocking. Have now one function i2c_make_abort() available for bitbang, mpc82xx and mpc83xx harware controller.
---
Changes for v2:
- fix checkpatch.pl errors and warnings
board/keymile/common/common.c | 148 ++++++++++++++++++++++++++++------------- board/keymile/common/common.h | 6 +- 2 files changed, 105 insertions(+), 49 deletions(-)
board/keymile/common/common.c +101 -47
@@ -325,6 +325,9 @@ int ivm_read_eeprom (void)if (buf !=NULL ) dev_addr =simple_strtoul ((char *)buf,NULL ,16 ); +/* add deblocking here */ +i2c_make_abort (); +if (i2c_read (dev_addr,0 ,1 , i2c_buffer,CONFIG_SYS_IVM_EEPROM_MAX_LEN ) !=0 ) {printf ("Error reading EEprom\n" );return -2 ;
@@ -334,7 +337,7 @@ int ivm_read_eeprom (void) }#if defined(CONFIG_SYS_I2C_INIT_BOARD ) -#define DELAY_ABORT_SEQ 62 +#define DELAY_ABORT_SEQ 62/* @200kHz 9 clocks = 44us, 62us is ok */ #define DELAY_HALF_PERIOD (500 / (CONFIG_SYS_I2C_SPEED / 1000))#if defined(CONFIG_MGCOGE ) || defined(CONFIG_MGCOGE2NE )
@@ -426,16 +429,16 @@ static int get_scl (void)#endif #if !defined(CONFIG_MPC83xx) -static void writeStartSeq (void ) +void writeStartSeq (void ) { -set_sda (1 ); -udelay (DELAY_HALF_PERIOD ); -set_scl (1 ); -udelay (DELAY_HALF_PERIOD ); -set_sda (0 ); -udelay (DELAY_HALF_PERIOD ); -set_scl (0 ); -udelay (DELAY_HALF_PERIOD ); +set_sda (1 ); +udelay (DELAY_HALF_PERIOD ); +set_scl (1 ); +udelay (DELAY_HALF_PERIOD ); +set_sda (0 ); +udelay (DELAY_HALF_PERIOD ); +set_scl (0 ); +udelay (DELAY_HALF_PERIOD ); }/* I2C is a synchronous protocol and resets of the processor in the middle
@@ -445,14 +448,27 @@ static void writeStartSeq (void)This I2C Deblocking mechanism was developed by Keymile in association with Anatech and Atmel in 1998. */ -static int i2c_make_abort (void ) +int i2c_make_abort (void ) { + +#if defined(CONFIG_HARD_I2C ) && !defined(MACH_TYPE_KM_KIRKWOOD ) +volatile immap_t *immap = (immap_t *)CONFIG_SYS_IMMR ; +volatile i2c8260_t *i2c = (i2c8260_t *)&immap->im_i2c; + +/* disable I2C controller first, otherwhise it thinks we want to */ +/* talk to the slave port... */ + i2c->i2c_i2mod &= ~0x01 ; + +/* Set the PortPins to GPIO */ +setports (1 ); +#endif +int scl_state =0 ;int sda_state =0 ;int i =0 ;int ret =0 ; -if (!get_sda ()) { +if (!get_sda ()) { ret =-1 ;while (i <16 ) { i++;
@@ -469,58 +485,96 @@ static int i2c_make_abort (void) } }if (ret ==0 ) { -for (i =0 ; i <5 ; i++) { +for (i =0 ; i <5 ; i++)writeStartSeq (); - } } -get_sda (); + +/* respect stop setup time */ +udelay (DELAY_ABORT_SEQ ); +set_scl (1 ); +udelay (DELAY_ABORT_SEQ ); +set_sda (1 ); +get_sda (); + +#if defined(CONFIG_HARD_I2C ) +/* Set the PortPins back to use for I2C */ +setports (0 ); +#endif return ret; }#endif -/** -* i2c_init_board - reset i2c bus. When the board is powercycled during a -* bus transfer it might hang; for details see doc/I2C_Edge_Conditions. -*/ -void i2c_init_board (void ) -{#if defined(CONFIG_MPC83xx) +void writeStartSeq (void ) +{struct fsl_i2c *dev; dev = (struct fsl_i2c *) (CONFIG_SYS_IMMR +CONFIG_SYS_I2C_OFFSET ); -uchar dummy; +udelay (DELAY_ABORT_SEQ ); +out_8 (&dev->cr, (I2C_CR_MEN |I2C_CR_MSTA )); +udelay (DELAY_ABORT_SEQ ); +out_8 (&dev->cr, (I2C_CR_MEN )); +} -out_8 (&dev->cr, (I2C_CR_MSTA )); -out_8 (&dev->cr, (I2C_CR_MEN |I2C_CR_MSTA )); - dummy =in_8 (&dev->dr); +int i2c_make_abort (void ) +{ +struct fsl_i2c *dev; + dev = (struct fsl_i2c *) (CONFIG_SYS_IMMR +CONFIG_SYS_I2C_OFFSET ); +uchar dummy; +uchar last; +int nbr_read =0 ; +int i =0 ; +int ret =0 ; + +/* wait after each operation to finsh with a delay */ +out_8 (&dev->cr, (I2C_CR_MSTA )); +udelay (DELAY_ABORT_SEQ ); +out_8 (&dev->cr, (I2C_CR_MEN |I2C_CR_MSTA )); +udelay (DELAY_ABORT_SEQ ); dummy =in_8 (&dev->dr); -if (dummy !=0xff ) { - dummy =in_8 (&dev->dr); +udelay (DELAY_ABORT_SEQ ); + last =in_8 (&dev->dr); + nbr_read++; + +/* +* do read until the last bit is 1, but stop if the full eeprom is +* read. +*/ +while (((last &0x01 ) !=0x01 ) && + (nbr_read <CONFIG_SYS_IVM_EEPROM_MAX_LEN )) { +udelay (DELAY_ABORT_SEQ ); + last =in_8 (&dev->dr); + nbr_read++; } -out_8 (&dev->cr, (I2C_CR_MEN )); -out_8 (&dev->cr,0x00 ); -out_8 (&dev->cr, (I2C_CR_MEN )); - -#else -#if defined(CONFIG_HARD_I2C ) && !defined(MACH_TYPE_KM_KIRKWOOD ) -volatile immap_t *immap = (immap_t *)CONFIG_SYS_IMMR ; -volatile i2c8260_t *i2c = (i2c8260_t *)&immap->im_i2c; +if ((last &0x01 ) !=0x01 ) + ret =-2 ; +if ((last !=0xff ) || (nbr_read >1 )) +printf ("[INFO] i2c abort after %d bytes (0x%02x)\n" , + nbr_read, last); +udelay (DELAY_ABORT_SEQ ); +out_8 (&dev->cr, (I2C_CR_MEN )); +udelay (DELAY_ABORT_SEQ ); +/* clear status reg */ +out_8 (&dev->sr,0 ); + +for (i =0 ; i <5 ; i++) +writeStartSeq (); +if (ret !=0 ) +printf ("[ERROR] i2c abort failed after %d bytes (0x%02x)\n" , + nbr_read, last); -/* disable I2C controller first, otherwhise it thinks we want to */ -/* talk to the slave port... */ - i2c->i2c_i2mod &= ~0x01 ; +return ret; +} -/* Set the PortPins to GPIO */ -setports (1 );#endif +/** +* i2c_init_board - reset i2c bus. When the board is powercycled during a +* bus transfer it might hang; for details see doc/I2C_Edge_Conditions. +*/ +void i2c_init_board (void ) +{/* Now run the AbortSequence() */ -i2c_make_abort (); - -#if defined(CONFIG_HARD_I2C ) -/* Set the PortPins back to use for I2C */ -setports (0 ); -#endif -#endif +i2c_make_abort (); }#endif #endif
board/keymile/common/common.h +4 -2
@@ -11,8 +11,10 @@#ifndef __KEYMILE_COMMON_H#define __KEYMILE_COMMON_H -int ethernet_present (void ); -int ivm_read_eeprom (void ); +int ethernet_present (void ); +int ivm_read_eeprom (void ); +void writeStartSeq (void ); +int i2c_make_abort (void );#ifdef CONFIG_KEYMILE_HDLC_ENET int keymile_hdlc_enet_initialize (bd_t *bis);
Signature · 1 line
1.7.4
PATCH v2 16/21 arm, keymile: updates for the arm based boards from keymile
In reply to Heiko Schocherdefine KM_IVM_BUS and KM_ENV_BUS macros
KM_IVM_BUS is used to define the EEprom_ivm environment variable. These macros allow the reuse of these I2C addresses in other code locations.
remove unneeded code
On first HW versions the BOCO FPGA was behind a MUX device. These HW versions are not supported anymore. And therefore this code can be removed.
added LED initialization for SUEN3
The bootstat LED required to be initialized so to have a green colour after start-up.
define CONFIG_SYS_TEXT_BASE
This is needed by the relocation code and is not the same for our ARM BEC and thus needs to be defined.
remove memsize variable
An environment variable for memsize is not needed. this can be get via the board info struct.
remove unneeded double access to bi_dram[i].size field
---
Changes for v2:
- fix checkpatch.pl errors and warnings
board/keymile/km_arm/km_arm.c | 39 ++++++++++++++++++++++++++++++--------- include/configs/km_arm.h | 1 + include/configs/mgcoge2un.h | 6 ++++-- include/configs/suen3.h | 6 ++++-- include/configs/suen8.h | 6 ++++-- 5 files changed, 43 insertions(+), 15 deletions(-)
board/keymile/km_arm/km_arm.c +30 -9
@@ -41,9 +41,6 @@DECLARE_GLOBAL_DATA_PTR ; -static int io_dev; -extern I2C_MUX_DEVICE *i2c_mux_ident_muxstring (uchar *buf); -/* Multi-Purpose Pins Functionality configuration */ u32 kwmpp_config[] = {MPP0_NF_IO2 ,
@@ -111,7 +108,7 @@ int ethernet_present(void)int ret =0 ;if (i2c_read (0x10 ,2 ,1 , &buf,1 ) !=0 ) { -printf ("%s: Error reading Boco\n" , __FUNCTION__); +printf ("%s: Error reading Boco\n" , __func__);return -1 ; }if ((buf &0x40 ) ==0x40 ) {
@@ -120,15 +117,37 @@ int ethernet_present(void)return ret; } +int initialize_unit_leds (void ) +{ +/* init the unit LEDs */ +/* per default they all are */ +/* ok apart from bootstat */ +/* LED connected through BOCO */ +/* BOCO lies at the address 0x10 */ +/* LEDs are in the block CTRL_H (addr 0x02) */ +/* BOOTSTAT LED is the first 0x01 */ +#define BOCO 0x10 +#define CTRL_H 0x02 +#define APPLEDMASK 0x01 +uchar buf; + +if (i2c_read (BOCO ,CTRL_H ,1 , &buf,1 ) !=0 ) { +printf ("%s: Error reading Boco\n" , __func__); +return -1 ; + } + buf |=APPLEDMASK ; +if (i2c_write (BOCO ,CTRL_H ,1 , &buf,1 ) !=0 ) { +printf ("%s: Error writing Boco\n" , __func__); +return -1 ; + } +return 0 ; +} +int misc_init_r (void ) { -I2C_MUX_DEVICE *i2cdev;char *str;int mach_type; -/* add I2C Bus for I/O Expander */ - i2cdev =i2c_mux_ident_muxstring ((uchar *)"pca9554a:70:a" ); - io_dev = i2cdev->busid;puts ("Piggy:" );if (ethernet_present () ==0 )puts (" not" );
@@ -140,6 +159,9 @@ int misc_init_r(void)printf ("Overwriting MACH_TYPE with %d!!!\n" , mach_type); gd->bd->bi_arch_number = mach_type; } + +initialize_unit_leds (); +return 0 ; }
@@ -246,7 +268,6 @@ void dram_init_banksize(void)for (i =0 ; i <CONFIG_NR_DRAM_BANKS ; i++) { gd->bd->bi_dram[i].start =kw_sdram_bar (i); - gd->bd->bi_dram[i].size =kw_sdram_bs (i); gd->bd->bi_dram[i].size =get_ram_size ((long *)kw_sdram_bar (i),kw_sdram_bs (i)); }
include/configs/km_arm.h +1 -0
@@ -47,6 +47,7 @@/* include common defines/options for all Keymile boards */ #include "keymile-common.h" +#define CONFIG_SYS_TEXT_BASE 0x04000000/* code address after reloc */ #define CONFIG_ENV_SIZE (128 << 10)/* NAND chip block size */ #define CONFIG_SYS_MEMTEST_START 0x00400000/* 4M */ #define CONFIG_SYS_MEMTEST_END 0x007fffff/*(_8M -1) */
include/configs/mgcoge2un.h +4 -2
@@ -44,12 +44,14 @@#define CONFIG_HOSTNAME mgcoge2un +#define KM_IVM_BUS "pca9547:70:9"/* I2C2 (Mux-Port 1)*/ +#define KM_ENV_BUS "pca9547:70:d"/* I2C2 (Mux-Port 5)*/ +/* * Default environment variables */ #define CONFIG_EXTRA_ENV_SETTINGS \ CONFIG_KM_DEF_ENV \ - "memsize=0x8000000\0" \ "newenv=setenv addr 0x100000 && " \ "i2c dev 1; mw.b ${addr} 0 4 && " \ "eeprom write " xstr(CONFIG_SYS_DEF_EEPROM_ADDR) \
@@ -57,7 +59,7 @@ "eeprom write " xstr(CONFIG_SYS_DEF_EEPROM_ADDR) \ " ${addr} " xstr(CONFIG_ENV_OFFSET_REDUND) " 4\0" \"rootpath=/opt/eldk/arm\0" \ -"EEprom_ivm=pca9547:70:9\0" \ +"EEprom_ivm=" KM_IVM_BUS "\0" \ ""#endif /* _CONFIG_MGCOGE2UN_H */
include/configs/suen3.h +4 -2
@@ -43,12 +43,14 @@#define CONFIG_HOSTNAME suen3 +#define KM_IVM_BUS "pca9544a:70:9"/* I2C2 (Mux-Port 1)*/ +#define KM_ENV_BUS "pca9544a:70:d"/* I2C2 (Mux-Port 5)*/ +/* * Default environment variables */ #define CONFIG_EXTRA_ENV_SETTINGS \ CONFIG_KM_DEF_ENV \ - "memsize=0x8000000\0" \ "newenv=setenv addr 0x100000 && " \ "i2c dev 1; mw.b ${addr} 0 4 && " \ "eeprom write " xstr(CONFIG_SYS_DEF_EEPROM_ADDR) \
@@ -56,7 +58,7 @@ "eeprom write " xstr(CONFIG_SYS_DEF_EEPROM_ADDR) \ " ${addr} " xstr(CONFIG_ENV_OFFSET_REDUND) " 4\0" \"rootpath=/opt/eldk/arm\0" \ -"EEprom_ivm=pca9544a:70:9\0" \ +"EEprom_ivm=" KM_IVM_BUS "\0" \ ""#endif /* _CONFIG_SUEN3_H */
include/configs/suen8.h +4 -2
@@ -44,12 +44,14 @@#define CONFIG_HOSTNAME suen8 +#define KM_IVM_BUS "pca9544a:70:9"/* I2C2 (Mux-Port 1)*/ +#define KM_ENV_BUS "pca9544a:70:d"/* I2C2 (Mux-Port 5)*/ +/* * Default environment variables */ #define CONFIG_EXTRA_ENV_SETTINGS \ CONFIG_KM_DEF_ENV \ - "memsize=0x8000000\0" \ "newenv=setenv addr 0x100000 && " \ "i2c dev 1; mw.b ${addr} 0 4 && " \ "eeprom write " xstr(CONFIG_SYS_DEF_EEPROM_ADDR) \
@@ -57,7 +59,7 @@ "eeprom write " xstr(CONFIG_SYS_DEF_EEPROM_ADDR) \ " ${addr} " xstr(CONFIG_ENV_OFFSET_REDUND) " 4\0" \"rootpath=/opt/eldk/arm\0" \ -"EEprom_ivm=pca9544a:70:9\0" \ +"EEprom_ivm=" KM_IVM_BUS "\0" \ ""#endif /* _CONFIG_SUEN8_H */
Signature · 1 line
1.7.4
PATCH v2 17/21 keymile boards: add CONFIG_PIGGY_MAC_ADRESS_OFFSET
In reply to Heiko SchocherNormaly the PIGGY_MAC_ADRESS can be read directly from the IVM on keymile boards. On mgcoge3 it differs. Because there are two piggy boards deployed the second MAC adress must be calculated with the IVM mac adress and an offset. This patch allows to set such a offset in the board config.
---
Changes for v2:
- fix checkpatch.pl errors and warnings
board/keymile/common/common.c | 20 ++++++++++++++++++++ board/keymile/common/common.h | 3 +++ 2 files changed, 23 insertions(+), 0 deletions(-)
board/keymile/common/common.c +20 -0
@@ -227,8 +227,28 @@ static int ivm_analyze_block2 (unsigned char *buf, int len) buf[5 ], buf[6]);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,"%02X:%02X:%02X:%02X:%02X:%02X" , + buf[1 ], + buf[2 ], + buf[3 ], + buf[4 ], + buf[5 ], + buf[6 ]); + } +#endif if (getenv ("ethaddr" ) ==NULL )setenv ((char *)"ethaddr" , (char *)valbuf); +/* IVM_MacCount */ count = (buf[10 ] <<24 ) + (buf[11] << 16) +
board/keymile/common/common.h +3 -0
@@ -11,6 +11,9 @@#ifndef __KEYMILE_COMMON_H#define __KEYMILE_COMMON_H +#if !defined(CONFIG_PIGGY_MAC_ADRESS_OFFSET ) +#define CONFIG_PIGGY_MAC_ADRESS_OFFSET 0 +#endif int ethernet_present (void );int ivm_read_eeprom (void );void writeStartSeq (void );
Signature · 1 line
1.7.4
PATCH v2 18/21 keymile, common: add setting of some environment variables
In reply to Heiko SchocherThis patch adds last_stage_init to all keymile boards. And in the last stage init some environment variables for u-boot were set. Currently these are pnvramaddr, pram and var address.
---
Changes for v2:
- fix checkpatch.pl errors and warnings
board/keymile/common/common.c | 36 ++++++++++++++++++++++++++++++++++-- board/keymile/common/common.h | 2 ++ board/keymile/km83xx/km83xx.c | 13 +++++++++++++ board/keymile/km_arm/km_arm.c | 11 +++++++++++ board/keymile/mgcoge/mgcoge.c | 13 +++++++++++++ include/configs/keymile-common.h | 3 +++ include/configs/km_arm.h | 5 +++++ 7 files changed, 81 insertions(+), 2 deletions(-)
board/keymile/common/common.c +34 -2
@@ -40,8 +40,6 @@ #if defined(CONFIG_HARD_I2C) || defined(CONFIG_SOFT_I2C) #include <i2c.h> -extern int i2c_soft_read_pin (void); - int ivm_calc_crc (unsigned char *buf, int len) { const unsigned short crc_tab[16] = {
@@ -72,6 +70,40 @@ int ivm_calc_crc (unsigned char *buf, int len)return crc; } +/* Set Keymile specific environment variables +* Currently only some memory layout variables are calculated here +* ... ------------------------------------------------ +* ... |@rootfsaddr |@pnvramaddr |@varaddr |@reserved |@END_OF_RAM +* ... |<------------------- pram ------------------->| +* ... ------------------------------------------------ +* @END_OF_RAM: denotes the RAM size +* @pnvramaddr: Startadress of pseudo non volatile RAM in hex +* @pram : preserved ram size in k +* @varaddr : startadress for /var mounted into RAM +*/ +int set_km_env (void ) +{ +uchar buf[32 ]; +unsigned int pnvramaddr; +unsigned int pram; +unsigned int varaddr; + + pnvramaddr =arch_ram_size () -CONFIG_KM_RESERVED_PRAM -CONFIG_KM_PHRAM + -CONFIG_KM_PNVRAM ; +sprintf ((char *)buf,"0x%x" , pnvramaddr); +setenv ("pnvramaddr" , (char *)buf); + + pram = (CONFIG_KM_RESERVED_PRAM +CONFIG_KM_PHRAM +CONFIG_KM_PNVRAM ) / +0x400 ; +sprintf ((char *)buf,"0x%x" , pram); +setenv ("pram" , (char *)buf); + + varaddr =arch_ram_size () -CONFIG_KM_RESERVED_PRAM -CONFIG_KM_PHRAM ; +sprintf ((char *)buf,"0x%x" , varaddr); +setenv ("varaddr" , (char *)buf); +return 0 ; +} +static int ivm_set_value (char *name,char *value) {char tempbuf[256 ];
board/keymile/common/common.h +2 -0
@@ -18,11 +18,13 @@ int ethernet_present(void);int ivm_read_eeprom (void );void writeStartSeq (void );int i2c_make_abort (void ); +unsigned int arch_ram_size (void );#ifdef CONFIG_KEYMILE_HDLC_ENET int keymile_hdlc_enet_initialize (bd_t *bis);#endif +int set_km_env (void ); int fdt_set_node_and_value (void *blob, char *nodename, char *regname,
board/keymile/km83xx/km83xx.c +13 -0
@@ -30,6 +30,8 @@#include "../common/common.h" +DECLARE_GLOBAL_DATA_PTR ; +extern void disable_addr_trans (void );extern void enable_addr_trans (void );const qe_iop_conf_t qe_iop_conf_tab[] = {
@@ -178,6 +180,17 @@ int misc_init_r(void)return 0 ; } +unsigned int arch_ram_size (void ) +{ +return gd->bd->bi_memsize; +} + +int last_stage_init (void ) +{ +set_km_env (); +return 0 ; +} +int fixed_sdram (void ) {volatile immap_t *im = (immap_t *)CONFIG_SYS_IMMR ;
board/keymile/km_arm/km_arm.c +11 -0
@@ -210,6 +210,12 @@ int board_init(void)return 0 ; } +int last_stage_init (void ) +{ +set_km_env (); +return 0 ; +} +#if defined(CONFIG_CMD_SF )int do_spi_toggle (cmd_tbl_t *cmdtp,int flag,int argc,char *const argv[]) {
@@ -273,6 +279,11 @@ void dram_init_banksize(void) } } +unsigned int arch_ram_size (void ) +{ +return gd->ram_size; +} +/* Configure and enable MV88E1118 PHY */ void reset_phy (void ) {
board/keymile/mgcoge/mgcoge.c +13 -0
@@ -37,6 +37,8 @@#include "../common/common.h" +DECLARE_GLOBAL_DATA_PTR ; +/* * I/O Port configuration table *
@@ -310,6 +312,17 @@ int board_early_init_r (void)return 0 ; } +unsigned int arch_ram_size (void ) +{ +return gd->bd->bi_memsize; +} + +int last_stage_init (void ) +{ +set_km_env (); +return 0 ; +} +int hush_init_var (void ) {ivm_read_eeprom ();
include/configs/keymile-common.h +3 -0
@@ -26,6 +26,9 @@/* Do boardspecific init for all boards */ #define CONFIG_BOARD_EARLY_INIT_R +#define CONFIG_LAST_STAGE_INIT + +#define CONFIG_BOOTCOUNT_LIMIT /* * By default kwbimage.cfg from board specific folder is used
include/configs/km_arm.h +5 -0
@@ -252,4 +252,9 @@ int get_scl (void);#define CONFIG_SYS_INIT_SP_ADDR 0xC8012000/* Do early setups now in board_init_f() */ #define CONFIG_BOARD_EARLY_INIT_F + +/* resereved pram area at the end of memroy [hex] */ +/* 8Mbytes for switch + 4Kbytes for bootcount */ +#define CONFIG_KM_RESERVED_PRAM 0x801000 +#endif /* _CONFIG_KM_ARM_H */
Signature · 1 line
1.7.4
PATCH v2 19/21 ppc, arm: rework and enhance keymile-common.h
In reply to Heiko SchocherFrom: Holger Brunck <[email protected]>
Add:
- introduce "bootrunner" environment variable
This allows to execute consecutive different commands specified in the list "subbootcmd". If one command fails the command serie will stop.
- introduce environment variable "develop", "ramfs" and "release" Each variable is one way to boot our linux. "develop" is for development purpose and boots the SW via NFS. "release" is for booting the linux image from flash, "ramfs" allows to load an SW image via tftp into ram and executes from there
- introduce "addmem" variable, this command adds the used memory for linux to the bootargs
- introduce "addvar" variable, this command adress for the /var directory to the kernel command line
- introduce "setramfspram" and "setrootfsaddr" these calculation were done if "ramfs" was used (only for debugging)
- introduce "tftpramfs" used for "ramfs" to load the image into RAM (only for debugging)
Remove unneeded stuff:
- CONFIG_IO_MUXING is obsolete for keymile boards
- CONFIG_KM_DEF_ENV_PRIVATE is also obsolete
- define CONFIG_SYS_TEXT_BASE in board configs only
---
Changes for v2:
- fix checkpatch.pl errors and warnings
include/configs/keymile-common.h | 163 +++++++++++++++++++++++++++++++------ include/configs/km_arm.h | 2 + 2 files changed, 138 insertions(+), 27 deletions(-)
include/configs/keymile-common.h +136 -27
@@ -40,13 +40,6 @@#endif /* CONFIG_SYS_KWD_CONFIG */ /* -* CONFIG_SYS_TEXT_BASE can be defined in board specific header file, if needed -*/ -#ifndef CONFIG_SYS_TEXT_BASE -#define CONFIG_SYS_TEXT_BASE 0x00400000 -#endif /* CONFIG_SYS_TEXT_BASE */ - -/* * Command line configuration. */ #include <config_cmd_default.h>
@@ -144,28 +137,16 @@#define CONFIG_MTD_DEVICE #define CONFIG_MTD_CONCAT -/* define this to use the keymile's io muxing feature */ -/*#define CONFIG_IO_MUXING */ - -#ifdef CONFIG_IO_MUXING -#define CONFIG_KM_DEF_ENV_IOMUX \ - "nc=setenv ethact HDLC \0" \ - "nce=setenv ethact SCC \0" \ - "stderr=serial,nc \0" \ - "stdin=serial,nc \0" \ - "stdout=serial,nc \0" \ - "tftpsrcp=69 \0" \ - "tftpdstp=69 \0" -#else #define CONFIG_KM_DEF_ENV_IOMUX \ "stderr=serial \0" \ "stdin=serial \0" \ "stdout=serial \0" -#endif -#ifndef CONFIG_KM_DEF_ENV_PRIVATE -#define CONFIG_KM_DEF_ENV_PRIVATE \ - "kmprivate=empty\0" +/* common powerpc specific env settings */ +#ifndef CONFIG_KM_DEF_ENV_BOOTPARAMS +#define CONFIG_KM_DEF_ENV_BOOTPARAMS \ + "bootparams=empty\0" \ + "initial_boot_bank=0\0"#endif #ifndef CONFIG_KM_DEF_NETDEV
@@ -184,17 +165,116 @@#define str (s) #s/* +* bootrunner +* - run all commands in 'subbootcmds' +* - on error, stop running the remaing commands +*/ +#define CONFIG_KM_DEF_ENV_BOOTRUNNER \ + "bootrunner=" \ + "break=0; " \ + "for subbootcmd in ${subbootcmds}; do " \ + "if test ${break} -eq 0; then; " \ + "echo \"[INFO] running \\c\"; " \ + "print ${subbootcmd}; " \ + "run ${subbootcmd} || break=1; " \ + "if test ${break} -eq 1; then; " \ + "echo \"[ERR] failed \\c\"; " \ + "print ${subbootcmd}; " \ + "fi; " \ + "fi; " \ + "done\0" \ + "" + +/* +* boottargets +* - set 'subbootcmds' for the bootrunner +* - set 'bootcmd' and 'altbootcmd' +* available targets: +* - 'release': for a standalone system kernel/rootfs from flash +* - 'develop': for development kernel(tftp)/rootfs(NFS) +* - 'ramfs': rootfilesystem in RAM kernel(tftp)/rootfs(RAM) +* +* - 'commonargs': bootargs common to all targets +*/ +#define CONFIG_KM_DEF_ENV_BOOTTARGETS \ + "commonargs=" \ + "addip " \ + "addtty " \ + "addmem " \ + "addinit " \ + "addvar " \ + "addmtdparts " \ + "addbootcount " \ + "\0" \ + "develop=" \ + "setenv subbootcmds \"" \ + "tftpfdt tftpkernel " \ + "nfsargs ${commonargs} " \ + "printbootargs boot " \ + "\" && " \ + "setenv bootcmd \'" \ + "run bootrunner" \ + "\' && " \ + "setenv altbootcmd \'" \ + "run bootcmd" \ + "\' && " \ + "run setboardid && " \ + "saveenv && " \ + "reset\0" \ + "ramfs=" \ + "setenv actual_bank -1 && " \ + "setenv subbootcmds \"" \ + "tftpfdt tftpkernel " \ + "setrootfsaddr tftpramfs " \ + "flashargs ${commonargs} " \ + "addpanic addramfs " \ + "printbootargs boot " \ + "\" && " \ + "setenv bootcmd \'" \ + "run bootrunner" \ + "\' && " \ + "setenv altbootcmd \'" \ + "run bootcmd" \ + "\' && " \ + "run setboardid && " \ + "run setramfspram && " \ + "saveenv && " \ + "reset\0" \ + "release=" \ + "setenv actual_bank ${initial_boot_bank} && " \ + "setenv subbootcmds \"" \ + "checkboardid " \ + "ubiattach ubicopy " \ + "cramfsloadfdt cramfsloadkernel " \ + "flashargs ${commonargs} " \ + "addpanic " \ + "printbootargs boot " \ + "\" && " \ + "setenv bootcmd \'" \ + "run bootrunner; reset" \ + "\' && " \ + "setenv altbootcmd \'" \ + "run actual0 bootcmd; reset" \ + "\' && " \ + "saveenv && " \ + "reset\0" \ + "" + +/* * bootargs * - modify 'bootargs' * * - 'addip': add ip configuration +* - 'addmem': limit kernel memory mem= * - 'addpanic': add kernel panic options * - 'addramfs': add phram device for the rootfilesysten in ram * - 'addtty': add console=... +* - 'addvar': add phram device for /var * - 'nfsargs': default arguments for nfs boot * - 'flashargs': defaults arguments for flash base boot * * processor specific settings +* - 'addbootcount': add boot counter * - 'addmtdparts': add mtd partition information */ #define CONFIG_KM_DEF_ENV_BOOTARGS \
@@ -204,6 +284,8 @@"setenv bootargs ${bootargs} " \"ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}" \":${hostname}:${netdev}:off\0" \ +"addmem=" \ +"setenv bootargs ${bootargs} mem=0x${pnvramaddr}\0" \"addpanic=" \"setenv bootargs ${bootargs} " \"panic=1 panic_on_oops=1\0" \
@@ -214,6 +296,9 @@"addtty=" \"setenv bootargs ${bootargs}" \" console=" CONFIG_KM_CONSOLE_TTY ",${baudrate}\0" \ +"addvar=" \ +"setenv bootargs ${bootargs} phram.phram=phvar," \ + "${varaddr},0x" xstr(CONFIG_KM_PHRAM) "\0" \"nfsargs=" \"setenv bootargs " \"ubi.mtd=" CONFIG_KM_UBI_LINUX_MTD_NAME " " \
@@ -226,6 +311,14 @@"rootfstype=squashfs ro\0" \"" +/* +* compute_addr +* - compute addresses and sizes +* - addresses are calculated form the end of memory 'memsize' +* +* - 'setramfspram': compute PRAM size for ramfs target +* - 'setrootfsaddr': compute rootfilesystem address for phram +*/ #define CONFIG_KM_DEF_ENV_COMPUTE_ADDR \"setboardid=" \"if test \"x${boardId}\" = \"x\"; then; " \
@@ -233,7 +326,15 @@"setenv hwKey ${IVM_HWKey}; " \"else; " \"echo \\\\c; " \ -"fi\0" +"fi\0" \ +"setramfspram=" \ +"setexpr value ${rootfssize} / 0x400 && " \ +"setexpr value 0x${value} + ${pram} && " \ +"setenv pram 0x${value}\0" \ +"setrootfsaddr=" \ +"setexpr value ${pnvramaddr} - ${rootfssize} && " \ +"setenv rootfsaddr 0x${value}\0" \ +"" /* * flash_boot
@@ -264,6 +365,7 @@* - commands for booting over the network * * - 'tftpkernel': load a kernel with tftp into ram +* - 'tftpramfs': load rootfs with tftp into ram * * processor specific settings * - 'tftpfdt': load fdt with tftp into ram
@@ -271,7 +373,11 @@#define CONFIG_KM_DEF_ENV_NET_BOOT \ "tftpkernel=" \ "tftpboot ${kernel_addr_r} ${kernel_file} && " \ - "setenv actual_kernel_addr ${kernel_addr_r} \0" + "setenv actual_kernel_addr ${kernel_addr_r}\0" \ + "tftpramfs=" \ + "tftpboot ${rootfsaddr} \"\\\"${rootfsfile}\\\"\" && " \ + "setenv loadaddr\0" \ + ""/* * constants
@@ -294,14 +400,17 @@#ifndef CONFIG_KM_DEF_ENV #define CONFIG_KM_DEF_ENV \ + CONFIG_KM_DEF_ENV_BOOTPARAMS \ CONFIG_KM_DEF_ENV_IOMUX \ - CONFIG_KM_DEF_ENV_PRIVATE \ CONFIG_KM_DEF_NETDEV \ CONFIG_KM_DEF_ENV_CPU \ + CONFIG_KM_DEF_ENV_BOOTRUNNER \ + CONFIG_KM_DEF_ENV_BOOTTARGETS \ CONFIG_KM_DEF_ENV_BOOTARGS \ CONFIG_KM_DEF_ENV_COMPUTE_ADDR \ CONFIG_KM_DEF_ENV_FLASH_BOOT \ CONFIG_KM_DEF_ENV_NET_BOOT \ + CONFIG_KM_DEF_ENV_CONSTANTS \ "altbootcmd=run bootcmd\0" \ "bootcmd=run default\0" \ "bootlimit=2\0" \
include/configs/km_arm.h +2 -0
@@ -256,5 +256,7 @@ int get_scl (void);/* resereved pram area at the end of memroy [hex] */ /* 8Mbytes for switch + 4Kbytes for bootcount */ #define CONFIG_KM_RESERVED_PRAM 0x801000 +/* address for the bootcount (taken from end of RAM) */ +#define BOOTCOUNT_ADDR (CONFIG_KM_RESERVED_PRAM)#endif /* _CONFIG_KM_ARM_H */
Signature · 1 line
1.7.4
PATCH v2 20/21 keymile boards: support of boardId / hwkey lists
In reply to Heiko SchocherFrom: Thomas Herzmann <[email protected]>
In order to support boardId / hwkey lists, the u-boot default environment has been updated: Added a script checkboardidlist which checks the list of boardId / hwkey if the boadrId / hwkey of the IVM is included in that list. This feature is used if you got different HW variants but you only want to create one boot package. E.g. supx5 board series.
---
Changes for v2:
- nothing
include/configs/keymile-common.h | 29 ++++++++++++++++++++++++++++- 1 files changed, 28 insertions(+), 1 deletions(-)
include/configs/keymile-common.h +28 -1
@@ -243,6 +243,7 @@"release=" \"setenv actual_bank ${initial_boot_bank} && " \"setenv subbootcmds \"" \ +"checkboardidlist " \"checkboardid " \"ubiattach ubicopy " \"cramfsloadfdt cramfsloadkernel " \
@@ -392,8 +393,34 @@"default=" \"setenv default 'run newenv; reset' && " \"run release && saveenv; reset\0" \ +"checkboardidlist=" \ +"if test \"x${boardIdListHex}\" != \"x\"; then " \ +"IVMbidhwk=${IVM_BoardId}_${IVM_HWKey}; " \ +"found=0; " \ +"for bidhwk in \"${boardIdListHex}\"; do " \ +"echo trying $bidhwk ...; " \ +"if test \"x$bidhwk\" = \"x$IVMbidhwk\"; then " \ +"found=1; " \ +"echo match found for $bidhwk; " \ +"if test \"x$bidhwk\" != \"x${boardId}_${hwKey}\";then " \ +"setenv boardid ${IVM_BoardId}; " \ +"setenv boardId ${IVM_BoardId}; " \ +"setenv hwkey ${IVM_HWKey}; " \ +"setenv hwKey ${IVM_HWKey}; " \ +"echo \"boardId set to ${boardId}\"; " \ +"echo \"hwKey set to ${hwKey}\"; " \ +"saveenv; " \ +"fi; " \ +"fi; " \ +"done; " \ +"else " \ +"echo \"boardIdListHex not set, not checked\"; " \ +"found=1; " \ +"fi; " \ +"test \"$found\" = 1 \0" \"checkboardid=" \ -"test \"x${boardId}\" = \"x${IVM_BoardId}\"\0" \ +"test \"x${boardId}\" = \"x${IVM_BoardId}\" && " \ +"test \"x${hwKey}\" = \"x${IVM_HWKey}\"\0" \"printbootargs=print bootargs\0" \ "rootfsfile="xstr(CONFIG_HOSTNAME) "/rootfsImage\0" \""
Signature · 1 line
1.7.4
PATCH v2 21/21 keymile-common.h: remove IO mux stuff
In reply to Heiko SchocherFrom: Holger Brunck <[email protected]>
---
Changes for v2:
- fix checkpatch.pl errors and warnings
include/configs/keymile-common.h | 9 +++------ 1 files changed, 3 insertions(+), 6 deletions(-)
include/configs/keymile-common.h +3 -6
@@ -137,11 +137,6 @@#define CONFIG_MTD_DEVICE #define CONFIG_MTD_CONCAT -#define CONFIG_KM_DEF_ENV_IOMUX \ - "stderr=serial \0" \ - "stdin=serial \0" \ - "stdout=serial \0" -/* common powerpc specific env settings */ #ifndef CONFIG_KM_DEF_ENV_BOOTPARAMS #define CONFIG_KM_DEF_ENV_BOOTPARAMS \
@@ -428,7 +423,6 @@#ifndef CONFIG_KM_DEF_ENV #define CONFIG_KM_DEF_ENV \ CONFIG_KM_DEF_ENV_BOOTPARAMS \ - CONFIG_KM_DEF_ENV_IOMUX \ CONFIG_KM_DEF_NETDEV \ CONFIG_KM_DEF_ENV_CPU \ CONFIG_KM_DEF_ENV_BOOTRUNNER \
@@ -448,6 +442,9 @@"load=tftpboot ${u-boot_addr_r} ${u-boot}\0" \"mtdids=" MTDIDS_DEFAULT "\0" \"mtdparts=" MTDPARTS_DEFAULT "\0" \ +"stderr=serial\0" \ +"stdin=serial\0" \ +"stdout=serial\0" \ "u-boot="xstr(CONFIG_HOSTNAME) "/u-boot.bin\0" \ "u-boot_addr_r="xstr(CONFIG_KM_KERNEL_ADDR) "\0" \""
Signature · 1 line
1.7.4
v3 cover keymile board update
In reply to Heiko SchocherThe following patchset updates the support for the keymile boards.
- fix a lot of Codingstyle issues for this boards
- heavy rework of the headerfiles, common board code
- add support for 4 new mpc83xx based boards
- add support for 1 82xx based board
- add support for 2 new kirkwood based boards
- fix i2c deblocking for this boards
Heiko Schocher (16):
powerpc, mpc83xx: add missing functions to mpc83xx.h
keymile: Fix Coding style issues for keymile boards.
mpc832x: add support for the mpc8321 based suvd3 board
mpc832x: add support for mpc8321 based tuxa1 board
mpc832x: add support for mpc8321 based tuda1 board
arm: add support for kirkwood based mgcoge2un board
arm: add support of Kirkwood based board SUEN8
ppc: add support for ppc based board mgcoge2ne powerpc, 83xx: add kmsupx5 board support
km-arm: i2c support for suenx based boards
km_arm: change some register values for SDRAM initialization ppc, 8321: cleanup tuxa1, tuda1 and suvd3 support keymile, common; fix i2c deblocking support
arm, keymile: updates for the arm based boards from keymile keymile boards: add CONFIG_PIGGY_MAC_ADRESS_OFFSET keymile, common: add setting of some environment variables
Holger Brunck (5):
arm, keymile: rename MACH_SUEN3 to MACH_KM_KIRKWOOD ppc, arm: adapt keymile header
arm, ppc: rework environment variables for keymile boards ppc, arm: rework and enhance keymile-common.h keymile-common.h: remove IO mux stuff
Thomas Herzmann (1):
keymile boards: support of boardId / hwkey lists
Thomas Reufer (1):
keymile, 8321 boards: move common definitions to km8321-common.h
MAINTAINERS | 7 +
arch/powerpc/cpu/mpc83xx/fdt.c | 3 +-
arch/powerpc/lib/bootcount.c | 2 +-
board/keymile/common/common.c | 496 ++++++++++++++++------------
board/keymile/common/common.h | 44 +++-
board/keymile/{kmeter1 => km83xx}/Makefile | 0
board/keymile/km83xx/km83xx.c | 288 ++++++++++++++++
board/keymile/km_arm/km_arm.c | 91 ++++--
board/keymile/km_arm/kwbimage.cfg | 32 +-
board/keymile/kmeter1/kmeter1.c | 217 ------------
board/keymile/mgcoge/mgcoge.c | 93 +++---
boards.cfg | 9 +-
include/configs/keymile-common.h | 489 +++++++++++++++++++---------
include/configs/km-powerpc.h | 92 +++++
include/configs/km82xx-common.h | 336 +++++++++++++++++++
include/configs/km8321-common.h | 138 ++++++++
include/configs/km83xx-common.h | 325 ++++++++++++++++++
include/configs/km_arm.h | 104 +++++-
include/configs/kmeter1.h | 369 +++-------------------
include/configs/kmsupx5.h | 91 +++++
include/configs/mgcoge.h | 307 +-----------------
include/configs/mgcoge2ne.h | 64 ++++
include/configs/mgcoge2un.h | 65 ++++
include/configs/suen3.h | 45 +---
include/configs/suen8.h | 65 ++++
include/configs/suvd3.h | 104 ++++++
include/configs/tuda1.h | 141 ++++++++
include/configs/tuxa1.h | 124 +++++++
include/mpc83xx.h | 6 +
29 files changed, 2794 insertions(+), 1353 deletions(-)
rename board/keymile/{kmeter1 => km83xx}/Makefile (100%)
create mode 100644 board/keymile/km83xx/km83xx.c
delete mode 100644 board/keymile/kmeter1/kmeter1.c
create mode 100644 include/configs/km-powerpc.h
create mode 100644 include/configs/km82xx-common.h
create mode 100644 include/configs/km8321-common.h
create mode 100644 include/configs/km83xx-common.h
create mode 100644 include/configs/kmsupx5.h
create mode 100644 include/configs/mgcoge2ne.h
create mode 100644 include/configs/mgcoge2un.h
create mode 100644 include/configs/suen8.h
create mode 100644 include/configs/suvd3.h
create mode 100644 include/configs/tuda1.h
create mode 100644 include/configs/tuxa1.hSignature · 1 line
1.7.4
PATCH v3 1/23 powerpc, mpc83xx: add missing functions to mpc83xx.h
---
Changes for v3:
- new patch in v3, to avoid externs in keymile code
include/mpc83xx.h | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-)
include/mpc83xx.h +6 -0
@@ -1274,6 +1274,12 @@ struct pci_region;void mpc83xx_pci_init (int num_buses,struct pci_region **reg);void mpc83xx_pcislave_unlock (int bus);void mpc83xx_pcie_init (int num_buses,struct pci_region **reg); + +void disable_addr_trans (void ); +void enable_addr_trans (void ); +#if defined(CONFIG_DDR_ECC ) && !defined(CONFIG_ECC_INIT_VIA_DDRCONTROLLER ) +void ddr_enable_ecc (unsigned int dram_size); +#endif #endif #endif /* __MPC83XX_H__ */
Signature · 1 line
1.7.4
PATCH v3 1/23 powerpc, mpc83xx: add missing functions to mpc83xx.h
Quoted 7 lines · On Mon, 21 Mar 2011 08:01:57 +0100 Heiko Schocher <[email protected]> wrote:
Signed-off-by Heiko Schocher <[email protected]>cc Kim Phillips <[email protected]>cc Holger Brunck <[email protected]>cc Wolfgang Denk <[email protected]>cc Detlev Zundel <[email protected]>cc Valentin Longchamp <[email protected]>---
Hi Heiko, sorry for the late review, but I must admit it doesn't help the reviewer at all when later patches in a patchseries modify things added by earlier patches in the same patchseries!
Quoted 8 lines
include/mpc83xx.h | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-)include/mpc83xx.h +0
-0
include/mpc83xx.h struct pci_region; · line 1282
Quoted 9 lines
include/mpc83xx.h +6
-0@@ -1274,6 +1274,12 @@ struct pci_region;void mpc83xx_pci_init (int num_buses,struct pci_region **reg);void mpc83xx_pcislave_unlock (int bus);void mpc83xx_pcie_init (int num_buses,struct pci_region **reg); + +void disable_addr_trans (void ); +void enable_addr_trans (void ); +#if defined(CONFIG_DDR_ECC ) && !defined(CONFIG_ECC_INIT_VIA_DDRCONTROLLER ) +void ddr_enable_ecc (unsigned int dram_size); +#endif
I don't believe these prototypes belong in mpc83xx.h - they're really not 83xx-specific - e.g., 74xx and 85xx have identical names for functions that have the same...function.
Looking around I think the best place for them would be the 'start.S' section of include/common.h. Feel free to protect with 83xx ifdefs; others can add their platforms as necessary.
Thanks,
Kim
PATCH v3 1/23 powerpc, mpc83xx: add missing functions to mpc83xx.h
Hello Kim,
Quoted 11 lines · Kim Phillips
Quoted 7 lines · On Mon, 21 Mar 2011 08:01:57 +0100 Heiko Schocher <[email protected]> wrote:
Signed-off-by Heiko Schocher <[email protected]>cc Kim Phillips <[email protected]>cc Holger Brunck <[email protected]>cc Wolfgang Denk <[email protected]>cc Detlev Zundel <[email protected]>cc Valentin Longchamp <[email protected]>---
Quoted 3 lines
Hi Heiko, sorry for the late review, but I must admit it doesn't help the reviewer at all when later patches in a patchseries modify things added by earlier patches in the same patchseries!
Sorry for that, I know, it is a big patchset ...
Quoted 22 lines
Quoted 8 lines
include/mpc83xx.h | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-)include/mpc83xx.h +0
-0include/mpc83xx.h struct pci_region; · line 1282
Quoted 9 lines
include/mpc83xx.h +6
-0@@ -1274,6 +1274,12 @@ struct pci_region;void mpc83xx_pci_init (int num_buses,struct pci_region **reg);void mpc83xx_pcislave_unlock (int bus);void mpc83xx_pcie_init (int num_buses,struct pci_region **reg); + +void disable_addr_trans (void ); +void enable_addr_trans (void ); +#if defined(CONFIG_DDR_ECC ) && !defined(CONFIG_ECC_INIT_VIA_DDRCONTROLLER ) +void ddr_enable_ecc (unsigned int dram_size); +#endif I don't believe these prototypes belong in
mpc83xx.h- they're really not 83xx-specific - e.g., 74xx and 85xx have identical names for functions that have the same...function.
Quoted 3 lines
Looking around I think the best place for them would be the '
start.S' section ofinclude/common.h. Feel free to protect with 83xx ifdefs; others can add their platforms as necessary.
Hmm.. I thought of this too, but that will result in adding ifdefs. (and special this file has a lot of ifdefs, so I wanted to prevent
another ifdef mess...). But I can of course move it toinclude/common.h if thats the preferred place ... ?
bye,
Heiko
Signature · 2 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
PATCH v3 1/23 powerpc, mpc83xx: add missing functions to mpc83xx.h
Quoted 14 lines · On Thu, 31 Mar 2011 07:38:18 +0200 Heiko Schocher <[email protected]> wrote:
Hello Kim,
Quoted 11 lines · Kim Phillips
Quoted 7 lines · On Mon, 21 Mar 2011 08:01:57 +0100 Heiko Schocher <[email protected]> wrote:
Signed-off-by Heiko Schocher <[email protected]>cc Kim Phillips <[email protected]>cc Holger Brunck <[email protected]>cc Wolfgang Denk <[email protected]>cc Detlev Zundel <[email protected]>cc Valentin Longchamp <[email protected]>---
Quoted 5 lines
Quoted 3 lines
Hi Heiko, sorry for the late review, but I must admit it doesn't help the reviewer at all when later patches in a patchseries modify things added by earlier patches in the same patchseries!
Sorry for that, I know, it is a big patchset ...
it's just that it could have been shortened to all the refactoring parts first, then the adding of all the new boards.
Quoted 22 lines
Quoted 22 lines
Quoted 8 lines
include/mpc83xx.h | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-)include/mpc83xx.h +0
-0include/mpc83xx.h struct pci_region; · line 1282
Quoted 9 lines
include/mpc83xx.h +6
-0@@ -1274,6 +1274,12 @@ struct pci_region;void mpc83xx_pci_init (int num_buses,struct pci_region **reg);void mpc83xx_pcislave_unlock (int bus);void mpc83xx_pcie_init (int num_buses,struct pci_region **reg); + +void disable_addr_trans (void ); +void enable_addr_trans (void ); +#if defined(CONFIG_DDR_ECC ) && !defined(CONFIG_ECC_INIT_VIA_DDRCONTROLLER ) +void ddr_enable_ecc (unsigned int dram_size); +#endif I don't believe these prototypes belong in
mpc83xx.h- they're really not 83xx-specific - e.g., 74xx and 85xx have identical names for functions that have the same...function.
Quoted 5 lines
Quoted 3 lines
Looking around I think the best place for them would be the '
start.S' section ofinclude/common.h. Feel free to protect with 83xx ifdefs; others can add their platforms as necessary.Hmm.. I thought of this too, but that will result in adding ifdefs.
in common.h? there already is a ifdef 83xx in the start.S section of that file - at line 447
wrt ddr_enable_ecc, modern 85xx #include <asm/fsl_ddr_sdram.h>, but I'm not sure how well 83xx will receive that. If it doesn't, I wouldn't have a problem with taking the entire chunk as-is and putting it into the aforementioned 83xx-protected part of common.h.
Quoted 3 lines
(and special this file has a lot of ifdefs, so I wanted to prevent
another ifdef mess...). But I can of course move it toinclude/common.hif thats the preferred place ... ?
please.
Thanks,
Kim
PATCH v3 2/23 arm, keymile: rename MACH_SUEN3 to MACH_KM_KIRKWOOD
In reply to Heiko SchocherFrom: Holger Brunck <[email protected]>
The MACH_TYPE SUEN3 is now to specific for keymile boards, because other boards similar to suen3 will follow. So the MACH_SUEN3 was renamed to MACH_KM_KIRKWOOD.
---
Changes for v2:
- fix checkpatch.pl errors and warnings
Changes for v3:
- rebased only
board/keymile/common/common.c | 4 ++-- board/keymile/km_arm/km_arm.c | 2 +- include/configs/km_arm.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-)
board/keymile/common/common.c +2 -2
@@ -500,7 +500,7 @@ void i2c_init_board(void)out_8 (&dev->cr, (I2C_CR_MEN ));#else -#if defined(CONFIG_HARD_I2C ) && !defined(CONFIG_MACH_SUEN3 ) +#if defined(CONFIG_HARD_I2C ) && !defined(MACH_TYPE_KM_KIRKWOOD )volatile immap_t *immap = (immap_t *)CONFIG_SYS_IMMR ;volatile i2c8260_t *i2c = (i2c8260_t *)&immap->im_i2c;
@@ -578,7 +578,7 @@ int fdt_get_node_and_value (void *blob, }#endif -#if !defined(CONFIG_MACH_SUEN3 ) +#if !defined(MACH_TYPE_KM_KIRKWOOD )int ethernet_present (void ) {return (in_8 ((u8 *)CONFIG_SYS_PIGGY_BASE +CONFIG_SYS_SLOT_ID_OFF ) &0x80 );
board/keymile/km_arm/km_arm.c +1 -1
@@ -180,7 +180,7 @@ int board_init(void)/* * arch number of board */ - gd->bd->bi_arch_number =MACH_TYPE_SUEN3 ; + gd->bd->bi_arch_number =MACH_TYPE_KM_KIRKWOOD ;/* address of boot parameters */ gd->bd->bi_boot_params =kw_sdram_bar (0 ) +0x100 ;
include/configs/km_arm.h +1 -1
@@ -38,7 +38,7 @@#define CONFIG_FEROCEON_88FR131 /* CPU Core subversion */ #define CONFIG_KIRKWOOD /* SOC Family Name */ #define CONFIG_KW88F6281 /* SOC Name */ -#define CONFIG_MACH_SUEN3 /* Machine type */ +#define CONFIG_MACH_KM_KIRKWOOD /* Machine type */ /* include common defines/options for all Keymile boards */ #include "keymile-common.h"
Signature · 1 line
1.7.4
PATCH v3 3/23 keymile: Fix Coding style issues for keymile boards.
In reply to Heiko Schocher- use I/O accessors
-> For accessing the FPGA therefore a struct km_bec_fpga
is introduced.
- no longer externs needed
- to defines, that only select functions, don;t assign a numeric value
- Codingstyle changes to prevent checkpatch errors/warnings
---
Changes for v3:
- new in this patchset, to prevent a lot of
checkpatch errors/warnings
board/keymile/common/common.c | 347 ++++++++++++++++++-------------------- board/keymile/common/common.h | 39 ++++- board/keymile/km_arm/km_arm.c | 25 ++-- board/keymile/kmeter1/kmeter1.c | 122 +++++++------- board/keymile/mgcoge/mgcoge.c | 82 +++++----- include/configs/keymile-common.h | 62 ++++---- include/configs/km_arm.h | 8 +- include/configs/kmeter1.h | 104 +++++++----- include/configs/mgcoge.h | 107 +++++++----- 9 files changed, 475 insertions(+), 421 deletions(-)
board/keymile/common/common.c +164 -183
@@ -39,9 +39,7 @@ #if defined(CONFIG_HARD_I2C) || defined(CONFIG_SOFT_I2C) #include <i2c.h> -extern int i2c_soft_read_pin (void); - -int ivm_calc_crc (unsigned char *buf, int len) +int ivm_calc_crc(unsigned char *buf, int len) { const unsigned short crc_tab[16] = { 0x0000, 0xCC01, 0xD801, 0x1400,
@@ -71,20 +69,20 @@ int ivm_calc_crc (unsigned char *buf, int len)return crc; } -static int ivm_set_value (char *name,char *value) +static int ivm_set_value (char *name,char *value) {char tempbuf[256 ];if (value !=NULL ) { -sprintf (tempbuf,"%s=%s" , name, value); -return set_local_var (tempbuf,0 ); +sprintf (tempbuf,"%s=%s" , name, value); +return set_local_var (tempbuf,0 ); }else { -unset_local_var (name); +unset_local_var (name); }return 0 ; } -static int ivm_get_value (unsigned char *buf,int len,char *name,int off, +static int ivm_get_value (unsigned char *buf,int len,char *name,int off,int check) {unsigned short val;
@@ -92,21 +90,21 @@ static int ivm_get_value (unsigned char *buf, int len, char *name, int off,if ((buf[off +0 ] != buf[off +2 ]) && (buf[off +2 ] != buf[off +4 ])) { -printf ("%s Error corrupted %s\n" , __FUNCTION__, name); +printf ("%s Error corrupted %s\n" , __func__, name); val =-1 ; }else { val = buf[off +0 ] + (buf[off +1 ] <<8 );if ((val ==0 ) && (check ==1 )) val =-1 ; } -sprintf ((char *)valbuf,"%x" , val); -ivm_set_value (name, (char *)valbuf); +sprintf ((char *)valbuf,"%x" , val); +ivm_set_value (name, (char *)valbuf);return val; } -#define INVENTORYBLOCKSIZE 0x100 -#define INVENTORYDATAADDRESS 0x21 -#define INVENTORYDATASIZE (INVENTORYBLOCKSIZE - INVENTORYDATAADDRESS - 3) +#define INV_BLOCKSIZE 0x100 +#define INV_DATAADDRESS 0x21 +#define INVENTORYDATASIZE (INV_BLOCKSIZE - INV_DATAADDRESS - 3)#define IVM_POS_SHORT_TEXT 0#define IVM_POS_MANU_ID 1
@@ -121,19 +119,19 @@ static int ivm_get_value (unsigned char *buf, int len, char *name, int off,#define IVM_POS_HISTORY 10#define IVM_POS_SYMBOL_ONLY 11 -static char convert_char (char c) +static char convert_char (char c) {return (c <' ' || c >'~' ) ?'.' : c; } -static int ivm_findinventorystring (int type, +static int ivm_findinventorystring (int type,unsigned char *const string,unsigned long maxlen,unsigned char *buf) {int xcode =0 ;unsigned long cr =0 ; -unsigned long addr =INVENTORYDATAADDRESS ; +unsigned long addr =INV_DATAADDRESS ;unsigned long size =0 ;unsigned long nr = type;int stop =0 ;/* stop on semicolon */
@@ -157,8 +155,10 @@ static int ivm_findinventorystring (int type, addr++; } -/* the expected number of CR was found until the end of the IVM -* content --> fill string */ +/* +* the expected number of CR was found until the end of the IVM +* content --> fill string +*/ if (addr <INVENTORYDATASIZE ) {/* Copy the IVM string in the corresponding string */ for (; (buf[addr] != '\r') &&
@@ -170,64 +170,62 @@ static int ivm_findinventorystring (int type, convert_char (buf[addr])); } -/* copy phase is done: check if everything is ok. If not, +/* +* copy phase is done: check if everything is ok. If not, * the inventory data is most probably corrupted: tell -* the world there is a problem! */ +* the world there is a problem! +*/ if (addr ==INVENTORYDATASIZE ) { xcode =-1 ; -printf ("Error end of string not found\n" ); +printf ("Error end of string not found\n" ); }else if ((size >= (maxlen -1 )) && (buf[addr] !='\r' )) { xcode =-1 ; -printf ("string too long till next CR\n" ); +printf ("string too long till next CR\n" ); } }else { -/* some CR are missing... -* the inventory data is most probably corrupted */ +/* +* some CR are missing... +* the inventory data is most probably corrupted +*/ xcode =-1 ; -printf ("not enough cr found\n" ); +printf ("not enough cr found\n" ); }return xcode; }#define GET_STRING (name, which, len) \ - if (ivm_findinventorystring (which, valbuf, len, buf) == 0) { \ - ivm_set_value (name, (char *)valbuf); \ + if (ivm_findinventorystring(which, valbuf, len, buf) == 0) { \ + ivm_set_value(name, (char *)valbuf); \ } -static int ivm_check_crc (unsigned char *buf,int block) +static int ivm_check_crc (unsigned char *buf,int block) {unsigned long crc;unsigned long crceeprom; - crc =ivm_calc_crc (buf,CONFIG_SYS_IVM_EEPROM_PAGE_LEN -2 ); + crc =ivm_calc_crc (buf,CONFIG_SYS_IVM_EEPROM_PAGE_LEN -2 ); crceeprom = (buf[CONFIG_SYS_IVM_EEPROM_PAGE_LEN -1 ] + \ buf[CONFIG_SYS_IVM_EEPROM_PAGE_LEN -2 ] *256 );if (crc != crceeprom) {if (block ==0 ) -printf ("Error CRC Block: %d EEprom: calculated: \ +printf ("Error CRC Block: %d EEprom: calculated: \ %lx EEprom: %lx\n" , block, crc, crceeprom);return -1 ; }return 0 ; } -static int ivm_analyze_block2 (unsigned char *buf,int len) +static int ivm_analyze_block2 (unsigned char *buf,int len) {unsigned char valbuf[CONFIG_SYS_IVM_EEPROM_PAGE_LEN ];unsigned long count;/* IVM_MacAddress */ -sprintf ((char *)valbuf,"%02X:%02X:%02X:%02X:%02X:%02X" , - buf[1 ], - buf[2 ], - buf[3 ], - buf[4 ], - buf[5 ], - buf[6 ]); -ivm_set_value ("IVM_MacAddress" , (char *)valbuf); -if (getenv ("ethaddr" ) ==NULL ) -setenv ((char *)"ethaddr" , (char *)valbuf); +sprintf ((char *)valbuf,"%pM" , buf); +ivm_set_value ("IVM_MacAddress" , (char *)valbuf); +if (getenv ("ethaddr" ) ==NULL ) +setenv ((char *)"ethaddr" , (char *)valbuf);/* IVM_MacCount */ count = (buf[10 ] <<24 ) + (buf[11] << 16) +
@@ -235,48 +233,52 @@ static int ivm_analyze_block2 (unsigned char *buf, int len) buf[13 ];if (count ==0xffffffff ) count =1 ; -sprintf ((char *)valbuf,"%lx" , count); -ivm_set_value ("IVM_MacCount" , (char *)valbuf); +sprintf ((char *)valbuf,"%lx" , count); +ivm_set_value ("IVM_MacCount" , (char *)valbuf);return 0 ; } -int ivm_analyze_eeprom (unsigned char *buf,int len) +int ivm_analyze_eeprom (unsigned char *buf,int len) {unsigned short val;unsigned char valbuf[CONFIG_SYS_IVM_EEPROM_PAGE_LEN ];unsigned char *tmp; -if (ivm_check_crc (buf,0 ) !=0 ) +if (ivm_check_crc (buf,0 ) !=0 )return -1 ; -ivm_get_value (buf,CONFIG_SYS_IVM_EEPROM_PAGE_LEN ,"IVM_BoardId" ,0 ,1 ); - val =ivm_get_value (buf,CONFIG_SYS_IVM_EEPROM_PAGE_LEN ,"IVM_HWKey" ,6 ,1 ); +ivm_get_value (buf,CONFIG_SYS_IVM_EEPROM_PAGE_LEN , +"IVM_BoardId" ,0 ,1 ); + val =ivm_get_value (buf,CONFIG_SYS_IVM_EEPROM_PAGE_LEN , +"IVM_HWKey" ,6 ,1 );if (val !=0xffff ) { -sprintf ((char *)valbuf,"%x" , ((val /100 ) %10 )); -ivm_set_value ("IVM_HWVariant" , (char *)valbuf); -sprintf ((char *)valbuf,"%x" , (val %100 )); -ivm_set_value ("IVM_HWVersion" , (char *)valbuf); +sprintf ((char *)valbuf,"%x" , ((val /100 ) %10 )); +ivm_set_value ("IVM_HWVariant" , (char *)valbuf); +sprintf ((char *)valbuf,"%x" , (val %100 )); +ivm_set_value ("IVM_HWVersion" , (char *)valbuf); } -ivm_get_value (buf,CONFIG_SYS_IVM_EEPROM_PAGE_LEN ,"IVM_Functions" ,12 ,0 ); +ivm_get_value (buf,CONFIG_SYS_IVM_EEPROM_PAGE_LEN , +"IVM_Functions" ,12 ,0 ); GET_STRING("IVM_Symbol", IVM_POS_SYMBOL_ONLY, 8)GET_STRING ("IVM_DeviceName" ,IVM_POS_SHORT_TEXT ,64 ) tmp = (unsigned char *) getenv("IVM_DeviceName");if (tmp) { -int len =strlen ((char *)tmp); +int len =strlen ((char *)tmp);int i =0 ;while (i < len) {if (tmp[i] ==';' ) { -ivm_set_value ("IVM_ShortText" , (char *)&tmp[i +1 ]); +ivm_set_value ("IVM_ShortText" , + (char *)&tmp[i +1 ]);break ; } i++; }if (i >= len) -ivm_set_value ("IVM_ShortText" ,NULL ); +ivm_set_value ("IVM_ShortText" ,NULL ); }else { -ivm_set_value ("IVM_ShortText" ,NULL ); +ivm_set_value ("IVM_ShortText" ,NULL ); } GET_STRING("IVM_ManufacturerID", IVM_POS_MANU_ID, 32)GET_STRING ("IVM_ManufacturerSerialNumber" ,IVM_POS_MANU_SERIAL ,20 )
@@ -288,14 +290,15 @@ int ivm_analyze_eeprom (unsigned char *buf, int len) GET_STRING("IVM_CustomerID", IVM_POS_CUSTOMER_ID, 32) GET_STRING("IVM_CustomerProductID", IVM_POS_CUSTOMER_PROD_ID, 32) -if (ivm_check_crc (&buf[CONFIG_SYS_IVM_EEPROM_PAGE_LEN *2 ],2 ) !=0 ) +if (ivm_check_crc (&buf[CONFIG_SYS_IVM_EEPROM_PAGE_LEN *2 ],2 ) !=0 )return 0 ; -ivm_analyze_block2 (&buf[CONFIG_SYS_IVM_EEPROM_PAGE_LEN *2 ],CONFIG_SYS_IVM_EEPROM_PAGE_LEN ); +ivm_analyze_block2 (&buf[CONFIG_SYS_IVM_EEPROM_PAGE_LEN *2 ], +CONFIG_SYS_IVM_EEPROM_PAGE_LEN );return 0 ; } -int ivm_read_eeprom (void ) +int ivm_read_eeprom (void ) {#if defined(CONFIG_I2C_MUX )I2C_MUX_DEVICE *dev =NULL ;
@@ -303,33 +306,36 @@ int ivm_read_eeprom (void)uchar i2c_buffer[CONFIG_SYS_IVM_EEPROM_MAX_LEN ];uchar *buf;unsigned dev_addr =CONFIG_SYS_IVM_EEPROM_ADR ; +int ret;#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 ); + dev =i2c_mux_ident_muxstring ((uchar *)CONFIG_SYS_I2C_IVM_BUS );#else - buf = (unsigned char *)getenv ("EEprom_ivm" ); + buf = (unsigned char *)getenv ("EEprom_ivm" );if (buf !=NULL ) - dev =i2c_mux_ident_muxstring (buf); + dev =i2c_mux_ident_muxstring (buf);#endif if (dev ==NULL ) { -printf ("Error couldnt add Bus for IVM\n" ); +printf ("Error couldnt add Bus for IVM\n" );return -1 ; } -i2c_set_bus_num (dev->busid); +i2c_set_bus_num (dev->busid);#endif - buf = (unsigned char *)getenv ("EEprom_ivm_addr" ); + buf = (unsigned char *)getenv ("EEprom_ivm_addr" );if (buf !=NULL ) - dev_addr =simple_strtoul ((char *)buf,NULL ,16 ); + dev_addr =simple_strtoul ((char *)buf,NULL ,16 ); -if (i2c_read (dev_addr,0 ,1 , i2c_buffer,CONFIG_SYS_IVM_EEPROM_MAX_LEN ) !=0 ) { + ret =i2c_read (dev_addr,0 ,1 , i2c_buffer, +CONFIG_SYS_IVM_EEPROM_MAX_LEN ); +if (ret !=0 ) {printf ("Error reading EEprom\n" );return -2 ; } -return ivm_analyze_eeprom (i2c_buffer,CONFIG_SYS_IVM_EEPROM_MAX_LEN ); +return ivm_analyze_eeprom (i2c_buffer,CONFIG_SYS_IVM_EEPROM_MAX_LEN ); }#if defined(CONFIG_SYS_I2C_INIT_BOARD )
@@ -339,145 +345,117 @@ int ivm_read_eeprom (void)#if defined(CONFIG_MGCOGE )#define SDA_MASK 0x00010000#define SCL_MASK 0x00020000 -static void set_pin (int state,unsigned long mask) +static void set_pin (int state,unsigned long mask) { -volatile ioport_t *iop =ioport_addr ((immap_t *)CONFIG_SYS_IMMR ,3 ); +ioport_t *iop =ioport_addr ((immap_t *)CONFIG_SYS_IMMR ,3 );if (state) - iop->pdat |= (mask); +setbits_be32 (&iop->pdat, mask);else - iop->pdat &= ~(mask); +clrbits_be32 (&iop->pdat, mask); - iop->pdir |= (mask); +setbits_be32 (&iop->pdir, mask); } -static int get_pin (unsigned long mask) +static int get_pin (unsigned long mask) { -volatile ioport_t *iop =ioport_addr ((immap_t *)CONFIG_SYS_IMMR ,3 ); +ioport_t *iop =ioport_addr ((immap_t *)CONFIG_SYS_IMMR ,3 ); - iop->pdir &= ~(mask); -return (0 != (iop->pdat & (mask))); +clrbits_be32 (&iop->pdir, mask); +return 0 != (in_be32 (&iop->pdat) & mask); } -static void set_sda (int state) +static void set_sda (int state) { -set_pin (state,SDA_MASK ); +set_pin (state,SDA_MASK ); } -static void set_scl (int state) +static void set_scl (int state) { -set_pin (state,SCL_MASK ); +set_pin (state,SCL_MASK ); } -static int get_sda (void ) +static int get_sda (void ) { -return get_pin (SDA_MASK ); +return get_pin (SDA_MASK ); } -static int get_scl (void ) +static int get_scl (void ) { -return get_pin (SCL_MASK ); +return get_pin (SCL_MASK ); }#if defined(CONFIG_HARD_I2C ) -static void setports (int gpio) +static void setports (int gpio) { -volatile ioport_t *iop =ioport_addr ((immap_t *)CONFIG_SYS_IMMR ,3 ); +ioport_t *iop =ioport_addr ((immap_t *)CONFIG_SYS_IMMR ,3 );if (gpio) { - iop->ppar &= ~(SDA_MASK |SCL_MASK ); - iop->podr &= ~(SDA_MASK |SCL_MASK ); +clrbits_be32 (&iop->ppar, (SDA_MASK |SCL_MASK )); +clrbits_be32 (&iop->podr, (SDA_MASK |SCL_MASK )); }else { - iop->ppar |= (SDA_MASK |SCL_MASK ); - iop->pdir &= ~(SDA_MASK |SCL_MASK ); - iop->podr |= (SDA_MASK |SCL_MASK ); +setbits_be32 (&iop->ppar, (SDA_MASK |SCL_MASK )); +clrbits_be32 (&iop->pdir, (SDA_MASK |SCL_MASK )); +setbits_be32 (&iop->podr, (SDA_MASK |SCL_MASK )); } }#endif #endif -#if defined(CONFIG_KM8XX ) -static void set_sda (int state) -{ -I2C_SDA (state); -} - -static void set_scl (int state) -{ -I2C_SCL (state); -} - -static int get_sda (void ) -{ -return I2C_READ ; -} - -static int get_scl (void ) -{ -int val; - - *(unsigned short *)(I2C_BASE_DIR ) &= ~SCL_CONF ; -udelay (1 ); - val = *(unsigned char *)(I2C_BASE_PORT ); - -return ((val &SCL_BIT ) ==SCL_BIT ); -} -#endif -#if !defined(CONFIG_KMETER1 ) -static void writeStartSeq (void ) +static void writeStartSeq (void ) { -set_sda (1 ); -udelay (DELAY_HALF_PERIOD ); -set_scl (1 ); -udelay (DELAY_HALF_PERIOD ); -set_sda (0 ); -udelay (DELAY_HALF_PERIOD ); -set_scl (0 ); -udelay (DELAY_HALF_PERIOD ); +set_sda (1 ); +udelay (DELAY_HALF_PERIOD ); +set_scl (1 ); +udelay (DELAY_HALF_PERIOD ); +set_sda (0 ); +udelay (DELAY_HALF_PERIOD ); +set_scl (0 ); +udelay (DELAY_HALF_PERIOD ); } -/* I2C is a synchronous protocol and resets of the processor in the middle -of an access can block the I2C Bus until a powerdown of the full unit is -done. This function toggles the SCL until the SCL and SCA line are -released, but max. 16 times, after this a I2C start-sequence is sent. -This I2C Deblocking mechanism was developed by Keymile in association -with Anatech and Atmel in 1998. +/* +* I2C is a synchronous protocol and resets of the processor in the middle +* of an access can block the I2C Bus until a powerdown of the full unit is +* done. This function toggles the SCL until the SCL and SCA line are +* released, but max. 16 times, after this a I2C start-sequence is sent. +* This I2C Deblocking mechanism was developed by Keymile in association +* with Anatech and Atmel in 1998. */ -static int i2c_make_abort (void ) +static int i2c_make_abort (void ) {int scl_state =0 ;int sda_state =0 ;int i =0 ;int ret =0 ; -if (!get_sda ()) { +if (!get_sda ()) { ret =-1 ;while (i <16 ) { i++; -set_scl (0 ); -udelay (DELAY_ABORT_SEQ ); -set_scl (1 ); -udelay (DELAY_ABORT_SEQ ); - scl_state =get_scl (); - sda_state =get_sda (); +set_scl (0 ); +udelay (DELAY_ABORT_SEQ ); +set_scl (1 ); +udelay (DELAY_ABORT_SEQ ); + scl_state =get_scl (); + sda_state =get_sda ();if (scl_state && sda_state) { ret =0 ;break ; } } } -if (ret ==0 ) { -for (i =0 ; i <5 ; i++) { -writeStartSeq (); - } - } -get_sda (); +if (ret ==0 ) +for (i =0 ; i <5 ; i++) +writeStartSeq (); + +get_sda ();return ret; }#endif -/** +/* * i2c_init_board - reset i2c bus. When the board is powercycled during a * bus transfer it might hang; for details see doc/I2C_Edge_Conditions. */
@@ -488,36 +466,37 @@ void i2c_init_board(void) dev = (struct fsl_i2c *) (CONFIG_SYS_IMMR +CONFIG_SYS_I2C_OFFSET );uchar dummy; -out_8 (&dev->cr, (I2C_CR_MSTA )); -out_8 (&dev->cr, (I2C_CR_MEN |I2C_CR_MSTA )); +out_8 (&dev->cr, (I2C_CR_MSTA )); +out_8 (&dev->cr, (I2C_CR_MEN |I2C_CR_MSTA )); dummy =in_8 (&dev->dr); dummy =in_8 (&dev->dr);if (dummy !=0xff ) { dummy =in_8 (&dev->dr); } -out_8 (&dev->cr, (I2C_CR_MEN )); -out_8 (&dev->cr,0x00 ); -out_8 (&dev->cr, (I2C_CR_MEN )); - +out_8 (&dev->cr, (I2C_CR_MEN )); +out_8 (&dev->cr,0x00 ); +out_8 (&dev->cr, (I2C_CR_MEN ));#else #if defined(CONFIG_HARD_I2C ) && !defined(MACH_TYPE_KM_KIRKWOOD ) -volatile immap_t *immap = (immap_t *)CONFIG_SYS_IMMR ; -volatile i2c8260_t *i2c = (i2c8260_t *)&immap->im_i2c; +immap_t *immap = (immap_t *)CONFIG_SYS_IMMR ; +i2c8260_t *i2c = (i2c8260_t *)&immap->im_i2c; -/* disable I2C controller first, otherwhise it thinks we want to */ -/* talk to the slave port... */ - i2c->i2c_i2mod &= ~0x01 ; +/* +* disable I2C controller first, otherwhise it thinks we want to +* talk to the slave port... +*/ +clrbits_8 (&i2c->i2c_i2mod,0x01 );/* Set the PortPins to GPIO */ -setports (1 ); +setports (1 );#endif /* Now run the AbortSequence() */ -i2c_make_abort (); +i2c_make_abort ();#if defined(CONFIG_HARD_I2C )/* Set the PortPins back to use for I2C */ -setports (0 ); +setports (0 );#endif #endif }
@@ -525,7 +504,7 @@ void i2c_init_board(void)#endif #if defined(CONFIG_OF_BOARD_SETUP ) && defined(CONFIG_OF_LIBFDT ) -int fdt_set_node_and_value (void *blob, +int fdt_set_node_and_value(void *blob, char *nodename, char *regname, void *var,
@@ -534,21 +513,22 @@ int fdt_set_node_and_value (void *blob,int ret =0 ;int nodeoffset =0 ; - nodeoffset =fdt_path_offset (blob, nodename); + nodeoffset =fdt_path_offset (blob, nodename);if (nodeoffset >=0 ) { - ret =fdt_setprop (blob, nodeoffset, regname, var, + ret =fdt_setprop (blob, nodeoffset, regname, var, size);if (ret <0 )printf ("ft_blob_update(): cannot set %s/%s " "property err:%s\n" , nodename, regname, -fdt_strerror (ret)); +fdt_strerror (ret)); }else {printf ("ft_blob_update(): cannot find %s node " -"err:%s\n" , nodename,fdt_strerror (nodeoffset)); +"err:%s\n" , nodename,fdt_strerror (nodeoffset)); }return ret; } -int fdt_get_node_and_value (void *blob, + +int fdt_get_node_and_value (void *blob,char *nodename,char *propname,void **var)
@@ -556,42 +536,43 @@ int fdt_get_node_and_value (void *blob,int len;int nodeoffset =0 ; - nodeoffset =fdt_path_offset (blob, nodename); + nodeoffset =fdt_path_offset (blob, nodename);if (nodeoffset >=0 ) { - *var = (void *)fdt_getprop (blob, nodeoffset, propname, &len); + *var = (void *)fdt_getprop (blob, nodeoffset, propname, &len);if (len ==0 ) {/* no value */ -printf ("%s no value\n" , __FUNCTION__); +printf ("%s no value\n" , __func__);return -1 ; }else if (len >0 ) {return len; }else { -printf ("libfdt fdt_getprop(): %s\n" , +printf ("libfdt fdt_getprop(): %s\n" ,fdt_strerror (len));return -2 ; } }else { -printf ("%s: cannot find %s node err:%s\n" , __FUNCTION__, - nodename,fdt_strerror (nodeoffset)); +printf ("%s: cannot find %s node err:%s\n" , __func__, + nodename,fdt_strerror (nodeoffset));return -3 ; } }#endif #if !defined(MACH_TYPE_KM_KIRKWOOD ) -int ethernet_present (void ) +int ethernet_present (void ) { -return (in_8 ((u8 *)CONFIG_SYS_PIGGY_BASE +CONFIG_SYS_SLOT_ID_OFF ) &0x80 ); +struct km_bec_fpga *base = (struct km_bec_fpga *)CONFIG_SYS_PIGGY_BASE ; + +return in_8 (&base->bprth) &PIGGY_PRESENT ; }#endif -int board_eth_init (bd_t *bis) +int board_eth_init (bd_t *bis) {#ifdef CONFIG_KEYMILE_HDLC_ENET - (void )keymile_hdlc_enet_initialize (bis); + (void )keymile_hdlc_enet_initialize (bis);#endif -if (ethernet_present ()) { +if (ethernet_present ())return -1 ; - }return 0 ; }
board/keymile/common/common.h +34 -5
@@ -11,20 +11,49 @@#ifndef __KEYMILE_COMMON_H#define __KEYMILE_COMMON_H -int ethernet_present (void ); -int ivm_read_eeprom (void ); +#define WRG_RESET 0x80 +#define H_OPORTS_14 0x40 +#define WRG_LED 0x02 +#define WRL_BOOT 0x01 + +#define H_OPORTS_SCC4_ENA 0x10 +#define H_OPORTS_SCC4_FD_ENA 0x04 +#define H_OPORTS_FCC1_PW_DWN 0x01 + +#define PIGGY_PRESENT 0x80 + +struct km_bec_fpga { +unsigned char id; +unsigned char rev; +unsigned char oprth; +unsigned char oprtl; +unsigned char res1[3 ]; +unsigned char bprth; +unsigned char bprtl; +unsigned char res2[6 ]; +unsigned char prst; +unsigned char res3[0xfff0 ]; +unsigned char pgy_id; +unsigned char pgy_rev; +unsigned char pgy_out; +}; + +int ethernet_present (void ); +int ivm_read_eeprom (void );#ifdef CONFIG_KEYMILE_HDLC_ENET -int keymile_hdlc_enet_initialize (bd_t *bis); +int keymile_hdlc_enet_initialize (bd_t *bis);#endif -int fdt_set_node_and_value (void *blob, +int fdt_set_node_and_value (void *blob,char *nodename,char *regname,void *var,int size); -int fdt_get_node_and_value (void *blob, +int fdt_get_node_and_value (void *blob,char *nodename,char *propname,void **var); + +int i2c_soft_read_pin (void );#endif /* __KEYMILE_COMMON_H */
board/keymile/km_arm/km_arm.c +12 -13
@@ -42,7 +42,6 @@DECLARE_GLOBAL_DATA_PTR ;static int io_dev; -extern I2C_MUX_DEVICE *i2c_mux_ident_muxstring (uchar *buf);/* Multi-Purpose Pins Functionality configuration */ u32 kwmpp_config[] = {
@@ -111,12 +110,12 @@ int ethernet_present(void)int ret =0 ;if (i2c_read (0x10 ,2 ,1 , &buf,1 ) !=0 ) { -printf ("%s: Error reading Boco\n" , __FUNCTION__); +printf ("%s: Error reading Boco\n" , __func__);return -1 ; } -if ((buf &0x40 ) ==0x40 ) { +if ((buf &0x40 ) ==0x40 ) ret =1 ; - } +return ret; }
@@ -265,15 +264,15 @@ void reset_phy(void) }#if defined(CONFIG_HUSH_INIT_VAR ) -int hush_init_var (void ) +int hush_init_var (void ) { -ivm_read_eeprom (); +ivm_read_eeprom ();return 0 ; }#endif #if defined(CONFIG_BOOTCOUNT_LIMIT ) -void bootcount_store (ulong a) +void bootcount_store (ulong a) {volatile ulong *save_addr;volatile ulong size =0 ;
@@ -286,7 +285,7 @@ void bootcount_store (ulong a)writel (BOOTCOUNT_MAGIC , &save_addr[1 ]); } -ulong bootcount_load (void ) +ulong bootcount_load (void ) {volatile ulong *save_addr;volatile ulong size =0 ;
@@ -303,31 +302,31 @@ ulong bootcount_load (void)#endif #if defined(CONFIG_SOFT_I2C ) -void set_sda (int state) +void set_sda (int state) {I2C_ACTIVE ;I2C_SDA (state); } -void set_scl (int state) +void set_scl (int state) {I2C_SCL (state); } -int get_sda (void ) +int get_sda (void ) {I2C_TRISTATE ;return I2C_READ ; } -int get_scl (void ) +int get_scl (void ) {return (kw_gpio_get_value (SUEN3_SCL_PIN ) ?1 :0 ); }#endif #if defined(CONFIG_SYS_EEPROM_WREN ) -int eeprom_write_enable (unsigned dev_addr,int state) +int eeprom_write_enable (unsigned dev_addr,int state) {kw_gpio_set_value (SUEN3_ENV_WP , !state);
board/keymile/kmeter1/kmeter1.c +64 -58
226 lines not on this page · raw message
board/keymile/mgcoge/mgcoge.c +42 -40
153 lines not on this page · raw message
include/configs/keymile-common.h +31 -31
122 lines not on this page · raw message
include/configs/km_arm.h +7 -1
@@ -6,6 +6,9 @@* (C) Copyright 2009 * Stefan Roese, DENX Software Engineering, sr at denx.de. * +* (C) Copyright 2010-2011 +* Heiko Schocher, DENX Software Engineering, hs at denx.de. +* * See file CREDITS for list of people who contributed to this * project. *
@@ -25,7 +28,10 @@* MA 02110-1301 USA */ -/* for linking errors see http://lists.denx.de/pipermail/u-boot/2009-July/057350.html */ +/* +* for linking errors see +* http://lists.denx.de/pipermail/u-boot/2009-July/057350.html +*/ #ifndef _CONFIG_KM_ARM_H#define _CONFIG_KM_ARM_H
include/configs/kmeter1.h +58 -46
247 lines not on this page · raw message
include/configs/mgcoge.h +63 -44
243 lines not on this page · raw message
Signature · 1 line
1.7.4
PATCH v3 4/23 ppc, arm: adapt keymile header
In reply to Heiko SchocherFrom: Holger Brunck <[email protected]>
- adapt copyright string
- change bootdelay to 2 seconds
- set max number of command args to 32
- set I/O buffer size to 512
---
Changes for v2:
- new patch in v2, first patch in v1 was split up
- fix checkpatch.pl errors and warnings
Changes for v3:
- rebased only
include/configs/keymile-common.h | 13 ++++--------- include/configs/kmeter1.h | 4 ++-- include/configs/mgcoge.h | 7 +++---- 3 files changed, 9 insertions(+), 15 deletions(-)
include/configs/keymile-common.h +4 -9
@@ -27,8 +27,6 @@/* Do boardspecific init for all boards */ #define CONFIG_BOARD_EARLY_INIT_R -#define CONFIG_BOOTCOUNT_LIMIT -/* * By default kwbimage.cfg from board specific folder is used * If for some board, different configuration file need to be used,
@@ -56,16 +54,15 @@#define CONFIG_CMD_IMMAP #define CONFIG_CMD_MII #define CONFIG_CMD_PING -#define CONFIG_CMD_DTT #define CONFIG_CMD_EEPROM #define CONFIG_CMD_I2C #define CONFIG_CMD_JFFS2 -#define CONFIG_JFFS2_CMDLINE #define CONFIG_CMD_MTDPARTS +#define CONFIG_CMD_SETEXPR #undef CONFIG_WATCHDOG/* disable platform specific watchdog */ -#define CONFIG_BOOTDELAY 5/* autoboot after 5 seconds */ +#define CONFIG_BOOTDELAY 2/* autoboot after 2 seconds */ #undef CONFIG_BOOTARGS/* the boot command will set bootargs */ /*
@@ -78,10 +75,10 @@#if defined(CONFIG_CMD_KGDB )#define CONFIG_SYS_CBSIZE 1024/* Console I/O Buffer Size */ #else -#define CONFIG_SYS_CBSIZE 256/* Console I/O Buffer Size */ +#define CONFIG_SYS_CBSIZE 512/* Console I/O Buffer Size */ #endif #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16) -#define CONFIG_SYS_MAXARGS 16 +#define CONFIG_SYS_MAXARGS 32/* max number of command args */ #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE#define CONFIG_CMDLINE_EDITING #define CONFIG_AUTO_COMPLETE
@@ -139,8 +136,6 @@#define CONFIG_BOOTP_GATEWAY #define CONFIG_BOOTP_HOSTNAME -#define CONFIG_ENV_SIZE 0x04000/* Size of Environment */ -#define CONFIG_SYS_MALLOC_LEN (4 * 1024 * 1024)/* UBI Support for all Keymile boards */
include/configs/kmeter1.h +2 -2
@@ -8,7 +8,7 @@* Copyright (C) 2007 MontaVista Software, Inc. * Anton Vorontsov <[email protected]> * -* (C) Copyright 2008 +* (C) Copyright 2008-2011 * Heiko Schocher, DENX Software Engineering, hs at denx.de. * * This program is free software; you can redistribute it and/or
@@ -171,7 +171,7 @@#undef CONFIG_SYS_RAMBOOT#endif -#define CONFIG_SYS_MONITOR_LEN (384 * 1024)/* Reserve for Mon */ +#define CONFIG_SYS_MONITOR_LEN (768 * 1024)/* Reserve for Mon */ /* * Initial RAM Base Address Setup
include/configs/mgcoge.h +3 -4
@@ -1,5 +1,5 @@/* -* (C) Copyright 2007 +* (C) Copyright 2007-2011 * Heiko Schocher, DENX Software Engineering, hs at denx.de. * * See file CREDITS for list of people who contributed to this
@@ -78,8 +78,7 @@#define CONFIG_8260_CLKIN 66000000/* in Hz */ #endif -#define BOOTFLASH_START FE000000 -#define CONFIG_PRAM 512/* protected RAM [KBytes] */ +#define BOOTFLASH_START 0xFE000000#define MTDIDS_DEFAULT "nor0=boot,nor1=app"#define MTDPARTS_DEFAULT \
@@ -128,7 +127,7 @@#define CONFIG_SYS_RAMBOOT #endif -#define CONFIG_SYS_MONITOR_LEN (384 << 10) +#define CONFIG_SYS_MONITOR_LEN (768 << 10)#define CONFIG_ENV_IS_IN_FLASH
Signature · 1 line
1.7.4
PATCH v5 5/23 arm, ppc: rework environment variables for keymile boards
In reply to Heiko SchocherFrom: Holger Brunck <[email protected]>
This patch reworks all headerfiles for keymile boards. Furthermore the environment variables are refactored.
Changes:
- introduce km-powerpc.h file and extract ppc specific parts to it
- move ARM specific options and vaiables to km_arm.h
- sort the environment variables to logical groups
- enhance the description of the environment variables
- remove KM specific HW key and board id from kernel command line
---
Changes for v2:
- new patch in v2, first patch in v1 was split up
- fix checkpatch.pl errors and warnings
Changes for v3:
- rebased only
include/configs/keymile-common.h | 234 ++++++++++++++++++++++--------------- include/configs/km-powerpc.h | 92 +++++++++++++++ include/configs/km_arm.h | 25 ++++- include/configs/kmeter1.h | 36 +++---- include/configs/mgcoge.h | 31 +++--- 5 files changed, 286 insertions(+), 132 deletions(-) create mode 100644 include/configs/km-powerpc.h
include/configs/keymile-common.h +139 -95
@@ -86,10 +86,6 @@#define CONFIG_HUSH_INIT_VAR #define CONFIG_SYS_ALT_MEMTEST /* memory test, takes time */ -#define CONFIG_SYS_MEMTEST_START 0x00100000 -#define CONFIG_SYS_MEMTEST_END 0x00f00000/* 1 ... 15 MB in DRAM */ - -#define CONFIG_SYS_LOAD_ADDR 0x100000#define CONFIG_SYS_HZ 1000/* decr. freq: 1 ms ticks */
@@ -142,7 +138,6 @@#define CONFIG_CMD_UBI #define CONFIG_RBTREE #define CONFIG_MTD_PARTITIONS -#define CONFIG_FLASH_CFI_MTD #define CONFIG_MTD_DEVICE #define CONFIG_MTD_CONCAT
@@ -170,103 +165,152 @@ "kmprivate=empty\0"#endif +#ifndef CONFIG_KM_DEF_NETDEV +#define CONFIG_KM_DEF_NETDEV \ + "netdev=eth0\0" +#endif + +#ifndef CONFIG_KM_UBI_PARTITION_NAME +#define CONFIG_KM_UBI_PARTITION_NAME "ubi0" +#endif +#ifndef CONFIG_KM_UBI_LINUX_MTD_NAME +#define CONFIG_KM_UBI_LINUX_MTD_NAME "ubi0" +#endif +#define xstr (s) str(s)#define str (s) #s +/* +* bootargs +* - modify 'bootargs' +* +* - 'addip': add ip configuration +* - 'addpanic': add kernel panic options +* - 'addramfs': add phram device for the rootfilesysten in ram +* - 'addtty': add console=... +* - 'nfsargs': default arguments for nfs boot +* - 'flashargs': defaults arguments for flash base boot +* +* processor specific settings +* - 'addmtdparts': add mtd partition information +*/ +#define CONFIG_KM_DEF_ENV_BOOTARGS \ + "addinit=" \ + "setenv bootargs ${bootargs} init=${init}\0" \ + "addip=" \ + "setenv bootargs ${bootargs} " \ + "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}" \ + ":${hostname}:${netdev}:off\0" \ + "addpanic=" \ + "setenv bootargs ${bootargs} " \ + "panic=1 panic_on_oops=1\0" \ + "addramfs=" \ + "setenv bootargs \"" \ + "${bootargs} phram.phram=" \ + "rootfs${actual_bank},${rootfsaddr},${rootfssize}\"\0" \ + "addtty=" \ + "setenv bootargs ${bootargs}" \ + " console=" CONFIG_KM_CONSOLE_TTY ",${baudrate}\0" \ + "nfsargs=" \ + "setenv bootargs " \ + "ubi.mtd=" CONFIG_KM_UBI_LINUX_MTD_NAME " " \ + "root=/dev/nfs rw " \ + "nfsroot=${serverip}:${rootpath}\0" \ + "flashargs=" \ + "setenv bootargs " \ + "ubi.mtd=" CONFIG_KM_UBI_LINUX_MTD_NAME " " \ + "root=mtdblock:rootfs${actual_bank} " \ + "rootfstype=squashfs ro\0" \ + "" + +#define CONFIG_KM_DEF_ENV_COMPUTE_ADDR \ + "setboardid=" \ + "if test \"x${boardId}\" = \"x\"; then; " \ + "setenv boardId ${IVM_BoardId} && " \ + "setenv hwKey ${IVM_HWKey}; " \ + "else; " \ + "echo \\\\c; " \ + "fi\0" + +/* +* flash_boot +* - commands for booting from flash +* +* - 'cramfsaddr': address to the cramfs (in ram) +* - 'cramfsloadkernel': copy kernel from a cramfs to ram +* - 'ubiattach': attach ubi partition +* - 'ubicopy': copy ubi volume to ram +* - volume names: bootfs0, bootfs1, bootfs2, ... +* - 'ubiparition': mtd parition name for ubi +* +* processor specific settings +* - 'cramfsloadfdt': copy fdt from a cramfs to ram +*/ +#define CONFIG_KM_DEF_ENV_FLASH_BOOT \ + "cramfsaddr="xstr(CONFIG_KM_CRAMFS_ADDR) "\0" \ + "cramfsloadkernel=" \ + "cramfsload ${kernel_addr_r} uImage && " \ + "setenv actual_kernel_addr ${kernel_addr_r}\0" \ + "ubiattach=ubi part ${ubipartition}\0" \ + "ubicopy=ubi read ${cramfsaddr} bootfs${actual_bank}\0" \ + "ubipartition=" CONFIG_KM_UBI_PARTITION_NAME "\0" \ + "" + +/* +* net_boot +* - commands for booting over the network +* +* - 'tftpkernel': load a kernel with tftp into ram +* +* processor specific settings +* - 'tftpfdt': load fdt with tftp into ram +*/ +#define CONFIG_KM_DEF_ENV_NET_BOOT \ + "tftpkernel=" \ + "tftpboot ${kernel_addr_r} ${kernel_file} && " \ + "setenv actual_kernel_addr ${kernel_addr_r} \0" + +/* +* constants +* - KM specific constants and commands +* +* - 'default': setup default environment +*/ +#define CONFIG_KM_DEF_ENV_CONSTANTS \ + "actual=setenv actual_bank ${initial_boot_bank}\0" \ + "actual0=setenv actual_bank 0\0" \ + "actual_bank=${initial_boot_bank}\0" \ + "default=" \ + "setenv default 'run newenv; reset' && " \ + "run release && saveenv; reset\0" \ + "checkboardid=" \ + "test \"x${boardId}\" = \"x${IVM_BoardId}\"\0" \ + "printbootargs=print bootargs\0" \ + "rootfsfile="xstr(CONFIG_HOSTNAME) "/rootfsImage\0" \ + "" +#ifndef CONFIG_KM_DEF_ENV #define CONFIG_KM_DEF_ENV \ - "netdev=eth0\0" \ - "u-boot_addr_r=100000\0" \ - "kernel_addr_r=200000\0" \ - "fdt_addr_r=600000\0" \ - "ram_ws=800000 \0" \ - "script_ws=780000 \0" \ - "fdt_file=" xstr(CONFIG_HOSTNAME) "/" \ - xstr(CONFIG_HOSTNAME) ".dtb\0" \ - "u-boot=" xstr(CONFIG_HOSTNAME) "/u-boot.bin \0" \ - "kernel_file=" xstr(CONFIG_HOSTNAME) "/uImage \0" \ - "load=tftp ${u-boot_addr_r} ${u-boot}\0" \ - "update=protect off " xstr(BOOTFLASH_START) " +${filesize};" \ - "erase " xstr(BOOTFLASH_START) " +${filesize};" \ - "cp.b ${u-boot_addr_r} " xstr(BOOTFLASH_START) \ - " ${filesize};" \ - "protect on " xstr(BOOTFLASH_START) " +${filesize}\0" \ - "load_fdt=tftp ${fdt_addr_r} ${fdt_file}; " \ - "setenv actual_fdt_addr ${fdt_addr_r} \0" \ - "load_kernel=tftp ${kernel_addr_r} ${kernel_file}; " \ - "setenv actual_kernel_addr ${kernel_addr_r} \0" \ - "ramargs=setenv bootargs root=/dev/ram rw\0" \ - "nfsargs=setenv bootargs root=/dev/nfs rw " \ - "nfsroot=${serverip}:${rootpath}\0" \ - "mtdargs=setenv bootargs root=${actual_rootfs} rw " \ - "rootfstype=jffs2 \0" \ - "altmtdargs=setenv bootargs root=${backup_rootfs} rw " \ - "rootfstype=jffs2 \0" \ - "addmtd=setenv bootargs ${bootargs} ${mtdparts}\0" \ - "addip=setenv bootargs ${bootargs} " \ - "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}" \ - ":${hostname}:${netdev}:off panic=1\0" \ - "addboardid=setenv bootargs ${bootargs} " \ - "hwKey=${IVM_HWKey} boardId=0x${IVM_BoardId} \0" \ - "addpram=setenv bootargs ${bootargs} " \ - "mem=${mem} pram=${pram}\0" \ - "pram=" xstr(CONFIG_PRAM) "k\0" \ - "net_nfs=tftp ${kernel_addr_r} ${kernel_file}; " \ - "tftp ${fdt_addr_r} ${fdt_file}; " \ - "run nfsargs addip addcon addboardid addpram;" \ - "bootm ${kernel_addr_r} - ${fdt_addr_r}\0" \ - "net_self=tftp ${kernel_addr_r} ${kernel_file}; " \ - "tftp ${fdt_addr_r} ${fdt_file}; " \ - "tftp ${ramdisk_addr} ${ramdisk_file}; " \ - "run ramargs addip addboardid addpram; " \ - "bootm ${kernel_addr_r} ${ramdisk_addr} ${fdt_addr_r}\0"\ - "flash_nfs=run nfsargs addip addcon;" \ - "bootm ${kernel_addr} - ${fdt_addr}\0" \ - "flash_self=run ramargs addip addcon addboardid addpram;" \ - "bootm ${kernel_addr} ${ramdisk_addr} ${fdt_addr}\0" \ - "bootcmd=run mtdargs addip addcon addboardid addpram; " \ - "bootm ${actual_kernel_addr} - ${actual_fdt_addr} \0" \ - "altbootcmd=run altmtdargs addip addcon addboardid addpram; " \ - "bootm ${backup_kernel_addr} - ${backup_fdt_addr} \0" \ - "actual0=setenv actual_bank 0; setenv actual_kernel_addr " \ - "${bank0_kernel_addr}; " \ - "setenv actual_fdt_addr ${bank0_fdt_addr}; " \ - "setenv actual_rootfs ${bank0_rootfs} \0" \ - "actual1=setenv actual_bank 1; setenv actual_kernel_addr " \ - "${bank1_kernel_addr}; " \ - "setenv actual_fdt_addr ${bank1_fdt_addr}; " \ - "setenv actual_rootfs ${bank1_rootfs} \0" \ - "backup0=setenv backup_bank 0; setenv backup_kernel_addr " \ - "${bank0_kernel_addr}; " \ - "setenv backup_fdt_addr ${bank0_fdt_addr}; " \ - "setenv backup_rootfs ${bank0_rootfs} \0" \ - "backup1=setenv backup_bank 1; setenv backup_kernel_addr " \ - "${bank1_kernel_addr}; " \ - "setenv backup_fdt_addr ${bank1_fdt_addr}; " \ - "setenv backup_rootfs ${bank1_rootfs} \0" \ - "setbank0=run actual0 backup1 \0" \ - "setbank1=run actual1 backup0 \0" \ - "release=setenv bootcmd " \ - "\'run mtdargs addip addcon addboardid addpram;" \ - "bootm ${actual_kernel_addr} - ${actual_fdt_addr} \'; " \ - "saveenv \0" \ - "develop=setenv bootcmd " \ - "\'run nfsargs addip addcon addboardid addpram;" \ - "bootm ${actual_kernel_addr} - ${actual_fdt_addr} \'; " \ - "saveenv \0" \ - "developall=setenv bootcmd " \ - "\'run load_fdt load_kernel nfsargs " \ - "addip addcon addboardid addpram; " \ - "bootm ${actual_kernel_addr} - ${actual_fdt_addr} \'; " \ - "saveenv \0" \ - "set_new_esw_script=setenv new_esw_script " \ - "new_esw_0x${IVM_BoardId}_0x${IVM_HWKey}.scr \0" \ - "new_esw=run set_new_esw_script; " \ - "tftp ${script_ws} ${new_esw_script}; " \ - "iminfo ${script_ws}; source ${script_ws} \0" \ - "bootlimit=0 \0" \ CONFIG_KM_DEF_ENV_IOMUX \ CONFIG_KM_DEF_ENV_PRIVATE \ + CONFIG_KM_DEF_NETDEV \ + CONFIG_KM_DEF_ENV_CPU \ + CONFIG_KM_DEF_ENV_BOOTARGS \ + CONFIG_KM_DEF_ENV_COMPUTE_ADDR \ + CONFIG_KM_DEF_ENV_FLASH_BOOT \ + CONFIG_KM_DEF_ENV_NET_BOOT \ + "altbootcmd=run bootcmd\0" \ + "bootcmd=run default\0" \ + "bootlimit=2\0" \ + "init=/sbin/init-overlay.sh\0" \ + "kernel_addr_r="xstr(CONFIG_KM_KERNEL_ADDR) "\0" \ + "kernel_file="xstr(CONFIG_HOSTNAME) "/uImage\0" \ + "kernel_name=uImage\0" \ + "load=tftpboot ${u-boot_addr_r} ${u-boot}\0" \ + "mtdids=" MTDIDS_DEFAULT "\0" \ + "mtdparts=" MTDPARTS_DEFAULT "\0" \ + "u-boot="xstr(CONFIG_HOSTNAME) "/u-boot.bin\0" \ + "u-boot_addr_r="xstr(CONFIG_KM_KERNEL_ADDR) "\0" \ ""#endif /* CONFIG_KM_DEF_ENV */
include/configs/km-powerpc.h new file +92 -0
92 lines not on this page · raw message
include/configs/km_arm.h +23 -2
@@ -48,8 +48,29 @@/* include common defines/options for all Keymile boards */ #include "keymile-common.h" -#undef CONFIG_CMD_DTT -#undef CONFIG_BOOTCOUNT_LIMIT + +#define CONFIG_ENV_SIZE (128 << 10)/* NAND chip block size */ +#define CONFIG_SYS_MEMTEST_START 0x00400000/* 4M */ +#define CONFIG_SYS_MEMTEST_END 0x007fffff/*(_8M -1) */ +#define CONFIG_SYS_LOAD_ADDR 0x00800000/* default load adr- 8M */ + +/* pseudo-non volatile RAM [hex] */ +#define CONFIG_KM_PNVRAM 0x80000 +/* physical RAM MTD size [hex] */ +#define CONFIG_KM_PHRAM 0x17F000 + +#define CONFIG_KM_CRAMFS_ADDR 0x2400000 +#define CONFIG_KM_KERNEL_ADDR 0x2000000/* 4096KBytes */ + +#define CONFIG_KM_DEF_ENV_CPU \ + "addmtdparts=setenv bootargs ${bootargs} ${mtdparts}\0" \ + "boot=bootm ${actual_kernel_addr} - -\0" \ + "cramfsloadfdt=echo \\\\c\0" \ + "tftpfdt=echo \\\\c\0" \ + CONFIG_KM_DEF_ENV_UPDATE \ + "" + +#define CONFIG_MD5 /* get_random_hex on krikwood needs MD5 support */ #define CONFIG_SKIP_LOWLEVEL_INIT /* disable board lowlevel_init */
include/configs/kmeter1.h +16 -20
@@ -29,16 +29,20 @@#define CONFIG_HOSTNAME kmeter1#define CONFIG_SYS_TEXT_BASE 0xF0000000 +#define CONFIG_KM_DEF_NETDEV \ + "netdev=eth2\0" \/* include common defines/options for all Keymile boards */ #include "keymile-common.h" - -#define CONFIG_KM_UBI_PARTITION_NAME "ubi0" +#include "km-powerpc.h" #define MTDIDS_DEFAULT "nor0=boot" -#define MTDPARTS_DEFAULT \ - "mtdparts=boot:768k(u-boot),128k(env),128k(envred)," \ - "-(" CONFIG_KM_UBI_PARTITION_NAME ")" +#define MTDPARTS_DEFAULT "mtdparts=" \ + "boot:" \ + "768k(u-boot)," \ + "128k(env)," \ + "128k(envred)," \ + "-(" CONFIG_KM_UBI_PARTITION_NAME ")"#define CONFIG_MISC_INIT_R /*
@@ -455,7 +459,7 @@#define BOOTFLASH_START F0000000 -#define CONFIG_PRAM 512/* protected RAM [KBytes] */ +#define CONFIG_KM_CONSOLE_TTY "ttyS0"/* * Environment Configuration
@@ -467,22 +471,14 @@#define CONFIG_EXTRA_ENV_SETTINGS \ CONFIG_KM_DEF_ENV \ + "dtt_bus=pca9547:70:a\0" \ + "EEprom_ivm=pca9547:70:9\0" \ + "newenv=" \ + "prot off 0xF00C0000 +0x40000 && " \ + "era 0xF00C0000 +0x40000\0" \ "rootpath=/opt/eldk/ppc_82xx\0" \ - "addcon=setenv bootargs ${bootargs} console=ttyS0,${baudrate}\0"\ - "ramdisk_file=/tftpboot/kmeter1/uRamdisk\0" \ - "loadram=tftp ${ramdisk_addr_r} ${ramdisk_file}\0" \ - "loadfdt=tftp ${fdt_addr_r} ${fdt_file}\0" \ - "loadkernel=tftp ${kernel_addr_r} ${bootfile}\0" \ "unlock=yes\0" \ - "fdt_addr=F0080000\0" \ - "kernel_addr=F00a0000\0" \ - "ramdisk_addr=F03a0000\0" \ - "ramdisk_addr_r=F10000\0" \ - "EEprom_ivm=pca9547:70:9\0" \ - "dtt_bus=pca9547:70:a\0" \ - "mtdids=nor0=app \0" \ - "mtdparts=" MK_STR(MTDPARTS_DEFAULT) "\0" \ - "" + ""#if defined(CONFIG_UEC_ETH )#define CONFIG_HAS_ETH0
include/configs/mgcoge.h +16 -15
@@ -37,6 +37,7 @@/* include common defines/options for all Keymile boards */ #include "keymile-common.h" +#include "km-powerpc.h" /* * Select serial console configuration
@@ -80,28 +81,28 @@#define BOOTFLASH_START 0xFE000000 -#define MTDIDS_DEFAULT "nor0=boot,nor1=app" -#define MTDPARTS_DEFAULT \ - "mtdparts=boot:384k(u-boot),128k(env),128k(envred),3456k(free);" \ - "app:3m(esw0),10m(rootfs0),3m(esw1),10m(rootfs1),1m(var),5m(cfg)" +#define CONFIG_KM_CONSOLE_TTY "ttyCPM0" + +#define MTDIDS_DEFAULT "nor3=app" +#define MTDPARTS_DEFAULT "mtdparts=" \ + "app:" \ + "768k(u-boot)," \ + "128k(env)," \ + "128k(envred)," \ + "3072k(free)," \ + "-(" CONFIG_KM_UBI_PARTITION_NAME ")" -#ifndef CONFIG_KM_DEF_ENV /* if not set by keymile-common.h */ -#define CONFIG_KM_DEF_ENV "km-common=empty\0" -#endif /* * Default environment settings */ -#define CONFIG_EXTRA_ENV_SETTINGS \ +#define CONFIG_EXTRA_ENV_SETTINGS \ CONFIG_KM_DEF_ENV \ - "rootpath=/opt/eldk/ppc_82xx\0" \ - "addcon=setenv bootargs ${bootargs} " \ - "console=ttyCPM0,${baudrate}\0" \ - "mtdids=nor0=boot,nor1=app \0" \ - "partition=nor1,5 \0" \ - "new_env=prot off FE060000 FE09FFFF; era FE060000 FE09FFFF \0" \ "EEprom_ivm=pca9544a:70:4 \0" \ - "mtdparts=" MK_STR(MTDPARTS_DEFAULT) "\0" \ "unlock=yes\0" \ + "newenv=" \ + "prot off 0xFE0C0000 +0x40000 && " \ + "era 0xFE0C0000 +0x40000\0" \ + "rootpath=/opt/eldk/ppc_82xx\0" \ ""#define CONFIG_SYS_SDRAM_BASE 0x00000000
Signature · 1 line
1.7.4
PATCH v3 6/23 mpc832x: add support for the mpc8321 based suvd3 board
In reply to Heiko Schocher- serial console on UART1
- Ethernet RMII over UCC4
- PHY SMSC LAN8700
- 64MB Flash
- 128 MB DDR2 RAM
- I2C
- bootcount
This board is similiar to the kmeter1 (8360) board, so common config options are extracted into the include/configs/km83xx-common.h file.
---
Changes for v2:
- fix checkpatch.pl errors and warnings
Changes for v3:
- rebased only
MAINTAINERS | 1 +
arch/powerpc/cpu/mpc83xx/fdt.c | 3 +-
arch/powerpc/lib/bootcount.c | 2 +-
board/keymile/common/common.c | 10 +-
board/keymile/{kmeter1 => km83xx}/Makefile | 0
.../keymile/{kmeter1/kmeter1.c => km83xx/km83xx.c} | 94 +++++-
boards.cfg | 3 +-
include/configs/km83xx-common.h | 324 +++++++++++++++++++
include/configs/kmeter1.h | 333 +-------------------
include/configs/suvd3.h | 215 +++++++++++++
10 files changed, 642 insertions(+), 343 deletions(-)
rename board/keymile/{kmeter1 => km83xx}/Makefile (100%)
rename board/keymile/{kmeter1/kmeter1.c => km83xx/km83xx.c} (67%)
create mode 100644 include/configs/km83xx-common.h
create mode 100644 include/configs/suvd3.hMAINTAINERS +1 -0
@@ -433,6 +433,7 @@ Heiko Schocher <[email protected]> municse MPC5200 sc3 PPC405GP suen3 ARM926EJS (Kirkwood SoC) + suvd3 MPC8321 uc101 MPC5200 ve8313 MPC8313
arch/powerpc/cpu/mpc83xx/fdt.c +2 -1
@@ -32,7 +32,8 @@ extern void ft_qe_setup(void *blob);DECLARE_GLOBAL_DATA_PTR ; -#if defined(CONFIG_BOOTCOUNT_LIMIT ) && defined(CONFIG_MPC8360 ) +#if defined(CONFIG_BOOTCOUNT_LIMIT ) && \ + (defined(CONFIG_MPC832x) || defined(CONFIG_MPC8360 ))#include <asm/immap_qe.h> void fdt_fixup_muram (void *blob)
arch/powerpc/lib/bootcount.c +1 -1
@@ -51,7 +51,7 @@#define CONFIG_SYS_BOOTCOUNT_ADDR (CONFIG_SYS_IMMR + CPM_BOOTCOUNT_ADDR)#endif /* defined(CONFIG_MPC8260) */ -#if defined(CONFIG_MPC8360 ) +#if defined(CONFIG_MPC832x) || defined(CONFIG_MPC8360 )#include <asm/immap_qe.h> #define CONFIG_SYS_BOOTCOUNT_ADDR (CONFIG_SYS_IMMR + 0x110000 + \
board/keymile/common/common.c +6 -4
@@ -29,6 +29,7 @@#include <malloc.h> #include <hush.h> #include <net.h> +#include <netdev.h> #include <asm/io.h> #if defined(CONFIG_OF_BOARD_SETUP ) && defined(CONFIG_OF_LIBFDT )
@@ -402,7 +403,7 @@ static void setports(int gpio)#endif #endif -#if !defined(CONFIG_KMETER1 ) +#if !defined(CONFIG_MPC83xx)static void writeStartSeq (void ) {set_sda (1 );
@@ -461,7 +462,7 @@ static int i2c_make_abort(void)*/ void i2c_init_board (void ) { -#if defined(CONFIG_KMETER1 ) +#if defined(CONFIG_MPC83xx)struct fsl_i2c *dev; dev = (struct fsl_i2c *) (CONFIG_SYS_IMMR +CONFIG_SYS_I2C_OFFSET );uchar dummy;
@@ -573,6 +574,7 @@ int board_eth_init(bd_t *bis) (void )keymile_hdlc_enet_initialize (bis);#endif if (ethernet_present ()) -return -1 ; -return 0 ; +return cpu_eth_init (bis); + +return -1 ; }
board/keymile/km83xx/Makefile renamed from board/keymile/kmeter1/Makefile +0 -0
board/keymile/km83xx/km83xx.c renamed from board/keymile/kmeter1/kmeter1.c +76 -18
151 lines not on this page · raw message
boards.cfg +2 -1
@@ -470,10 +470,11 @@ MPC8360ERDK_66 powerpc mpc83xx mpc8360erdk freesca MPC837XEMDS powerpc mpc83xx mpc837xemds freescale - MPC837XEMDS MPC837XEMDS_HOST powerpc mpc83xx mpc837xemds freescale - MPC837XEMDS:PCI MPC837XERDB powerpc mpc83xx mpc837xerdb freescale -kmeter1 powerpc mpc83xx kmeter1 keymile +kmeter1 powerpc mpc83xx km83xx keymile MVBLM7 powerpc mpc83xx mvblm7 matrix_vision SIMPC8313_LP powerpc mpc83xx simpc8313 sheldon - SIMPC8313:NAND_LP SIMPC8313_SP powerpc mpc83xx simpc8313 sheldon - SIMPC8313:NAND_SP +suvd3 powerpc mpc83xx km83xx keymile TQM834x powerpc mpc83xx tqm834x tqc sbc8540 powerpc mpc85xx sbc8560 - - SBC8540 sbc8540_33 powerpc mpc85xx sbc8560 - - SBC8540
include/configs/km83xx-common.h new file +324 -0
324 lines not on this page · raw message
include/configs/kmeter1.h +15 -318
397 lines not on this page · raw message
include/configs/suvd3.h new file +215 -0
215 lines not on this page · raw message
Signature · 1 line
1.7.4
PATCH v3 6/23 mpc832x: add support for the mpc8321 based suvd3 board
arch/powerpc/cpu/mpc83xx/fdt.c extern void ft_qe_setup(void *blob); · line 36
Quoted 8 lines · On Mon, 21 Mar 2011 08:02:02 +0100 Heiko Schocher <[email protected]> wrote:
+++
b/arch/powerpc/cpu/mpc83xx/fdt.carch/powerpc/cpu/mpc83xx/fdt.c +2
-1@@ -32,7 +32,8 @@ extern void ft_qe_setup(void *blob);DECLARE_GLOBAL_DATA_PTR ; -#if defined(CONFIG_BOOTCOUNT_LIMIT ) && defined(CONFIG_MPC8360 ) +#if defined(CONFIG_BOOTCOUNT_LIMIT ) && \ + (defined(CONFIG_MPC832x) || defined(CONFIG_MPC8360 ))
please replace 832x and 8360 with just CONFIG_QE
arch/powerpc/lib/bootcount.c line 54
Quoted 7 lines
arch/powerpc/lib/bootcount.c +2
-1+++ b/arch/powerpc/lib/bootcount.c@@ -51,7 +51,7 @@#define CONFIG_SYS_BOOTCOUNT_ADDR (CONFIG_SYS_IMMR + CPM_BOOTCOUNT_ADDR)#endif /* defined(CONFIG_MPC8260) */ -#if defined(CONFIG_MPC8360 ) +#if defined(CONFIG_MPC832x) || defined(CONFIG_MPC8360 )
same here
include/configs/kmeter1.h line 43
Quoted 5 lines
include/configs/kmeter1.h +1
-3-#define CONFIG_83XX_CLKIN 66000000 -#define CONFIG_SYS_CLK_FREQ 66000000 -#define CONFIG_83XX_PCICLK 66000000 +#define CONFIG_SYS_SICRH 0x00000006
I realize this was a pre-existing condition, but please make this (SICRH_UC1EOBI | SICRH_UC2E1OBI) instead of 6.
Quoted 1 line
+#define
CONFIG_SYS_SICRL0x00000000
nit-pick, but fyi, one can save a raw write here by not defining it at all.
include/configs/kmeter1.h
Quoted 4 lines
/* PAXE: icache cacheable, but dcache-inhibit and guarded */
#defineCONFIG_SYS_IBAT5L(CONFIG_SYS_PAXE_BASE|BATL_PP_10| \include/configs/kmeter1.h +1
-1- BATL_MEMCOHERENCE) + BATL_MEMCOHERENCE)
B in BATL_ should be aligned to fall directly under the C in CONFIG_SYS_PAXE_BASE, like this:
#define CONFIG_SYS_IBAT5L (CONFIG_SYS_PAXE_BASE | BATL_PP_10 | \
BATL_MEMCOHERENCE)
include/configs/kmeter1.h
Quoted 3 lines
#define
CONFIG_SYS_IBAT5U(CONFIG_SYS_PAXE_BASE|BATU_BL_256M| \include/configs/kmeter1.h +1
-1- BATU_VS | BATU_VP) + BATU_VS | BATU_VP)
same here, just as the next one is already:
Quoted 2 lines
#define
CONFIG_SYS_DBAT5L(CONFIG_SYS_PAXE_BASE|BATL_PP_10| \
BATL_CACHEINHIBIT|BATL_GUARDEDSTORAGE)
<snip>
Quoted 1 line
include/configs/suvd3.h +0
-0
<snip>
Quoted 1 line
+#define
CONFIG_SYS_SICRH0x00000006
afaict, SICRH doesn't documentally exist on 832x, so omit this line. This comment also applies to the following patches in this series:
[PATCH v3 07/23] mpc832x: add support for mpc8321 based tuxa1 board [PATCH v3 08/23] mpc832x: add support for mpc8321 based tuda1 board [PATCH v3 12/23] keymile, 8321 boards: move common definitions to km8321-common.h
even though the 12/23 patch seems to be a refactoring of the definition added by the others...<sigh>.
The rest of the 83xx-touching patches in the series look good to me.
Kim
PATCH v3 6/23 mpc832x: add support for the mpc8321 based suvd3 board
Hello Kim,
Quoted 6 lines · Kim Phillips
Quoted 3 lines · On Mon, 21 Mar 2011 08:02:02 +0100 Heiko Schocher <[email protected]> wrote:
+++
b/arch/powerpc/cpu/mpc83xx/fdt.c(quoted diff) +0
-0@@ -32,7 +32,8 @@ extern void ft_qe_setup(void *blob);
Quoted 7 lines
arch/powerpc/cpu/mpc83xx/fdt.c extern void ft_qe_setup(void *blob); · line 36
Quoted 5 lines
arch/powerpc/cpu/mpc83xx/fdt.c +2
-1DECLARE_GLOBAL_DATA_PTR ; -#if defined(CONFIG_BOOTCOUNT_LIMIT ) && defined(CONFIG_MPC8360 ) +#if defined(CONFIG_BOOTCOUNT_LIMIT ) && \ + (defined(CONFIG_MPC832x) || defined(CONFIG_MPC8360 ))please replace 832x and 8360 with just
CONFIG_QE
Ok.
Quoted 9 lines
arch/powerpc/lib/bootcount.c line 54
Quoted 7 lines
arch/powerpc/lib/bootcount.c +2
-1+++ b/arch/powerpc/lib/bootcount.c@@ -51,7 +51,7 @@#define CONFIG_SYS_BOOTCOUNT_ADDR (CONFIG_SYS_IMMR + CPM_BOOTCOUNT_ADDR)#endif /* defined(CONFIG_MPC8260) */ -#if defined(CONFIG_MPC8360 ) +#if defined(CONFIG_MPC832x) || defined(CONFIG_MPC8360 )same here
Ok.
Quoted 8 lines
include/configs/kmeter1.h line 43
Quoted 5 lines
include/configs/kmeter1.h +1
-3-#define CONFIG_83XX_CLKIN 66000000 -#define CONFIG_SYS_CLK_FREQ 66000000 -#define CONFIG_83XX_PCICLK 66000000 +#define CONFIG_SYS_SICRH 0x00000006I realize this was a pre-existing condition, but please make this (
SICRH_UC1EOBI|SICRH_UC2E1OBI) instead of 6.
Ok.
Quoted 4 lines
Quoted 1 line
+#define
CONFIG_SYS_SICRL0x00000000nit-pick, but fyi, one can save a raw write here by not defining it at all.
removed.
Quoted 10 lines
include/configs/kmeter1.h
Quoted 4 lines
/* PAXE: icache cacheable, but dcache-inhibit and guarded */
#defineCONFIG_SYS_IBAT5L(CONFIG_SYS_PAXE_BASE|BATL_PP_10| \include/configs/kmeter1.h +1
-1- BATL_MEMCOHERENCE) + BATL_MEMCOHERENCE)B in
BATL_should be aligned to fall directly under the C inCONFIG_SYS_PAXE_BASE, like this:#define
CONFIG_SYS_IBAT5L(CONFIG_SYS_PAXE_BASE|BATL_PP_10| \
BATL_MEMCOHERENCE)
Ok.
Quoted 5 lines
include/configs/kmeter1.h
Quoted 3 lines
#define
CONFIG_SYS_IBAT5U(CONFIG_SYS_PAXE_BASE|BATU_BL_256M| \include/configs/kmeter1.h +1
-1- BATU_VS | BATU_VP) + BATU_VS | BATU_VP)same here, just as the next one is already:
Ok.
Quoted 11 lines
Quoted 3 lines
#define
CONFIG_SYS_DBAT5L(CONFIG_SYS_PAXE_BASE|BATL_PP_10| \
BATL_CACHEINHIBIT|BATL_GUARDEDSTORAGE)<snip>
Quoted 1 line
include/configs/suvd3.h +0
-0<snip>
Quoted 1 line
+#define
CONFIG_SYS_SICRH0x00000006afaict, SICRH doesn't documentally exist on 832x, so omit this line. This comment also applies to the following patches in this series:
Ok.
Quoted 8 lines
[PATCH v3 07/23] mpc832x: add support for mpc8321 based tuxa1 board [PATCH v3 08/23] mpc832x: add support for mpc8321 based tuda1 board [PATCH v3 12/23] keymile, 8321 boards: move common definitions to
km8321-common.heven though the 12/23 patch seems to be a refactoring of the definition added by the others...<sigh>.
The rest of the 83xx-touching patches in the series look good to me.
Thanks for reviewing.
bye
Heiko
Signature · 2 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
PATCH v3 7/23 mpc832x: add support for mpc8321 based tuxa1 board
In reply to Heiko SchocherThis board is similar to suvd3 board. So most initialisation topics are taken from suvd3 (UART1, Ethernet, piggy PHY, flash, ram) only the application specific chip selects differ.
---
Changes for v2:
- fix checkpatch.pl errors and warnings
Changes for v3:
- rebased only
MAINTAINERS | 1 + boards.cfg | 1 + include/configs/tuxa1.h | 234 +++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 236 insertions(+), 0 deletions(-) create mode 100644 include/configs/tuxa1.h
MAINTAINERS +1 -0
@@ -434,6 +434,7 @@ Heiko Schocher <[email protected]> sc3 PPC405GP suen3 ARM926EJS (Kirkwood SoC) suvd3 MPC8321 + tuxa1 MPC8321 uc101 MPC5200 ve8313 MPC8313
boards.cfg +1 -0
@@ -476,6 +476,7 @@ SIMPC8313_LP powerpc mpc83xx simpc8313 sheldon SIMPC8313_SP powerpc mpc83xx simpc8313 sheldon - SIMPC8313:NAND_SP suvd3 powerpc mpc83xx km83xx keymile TQM834x powerpc mpc83xx tqm834x tqc +tuxa1 powerpc mpc83xx km83xx keymile sbc8540 powerpc mpc85xx sbc8560 - - SBC8540 sbc8540_33 powerpc mpc85xx sbc8560 - - SBC8540 sbc8540_66 powerpc mpc85xx sbc8560 - - SBC8540
include/configs/tuxa1.h new file +234 -0
234 lines not on this page · raw message
Signature · 1 line
1.7.4
PATCH v3 8/23 mpc832x: add support for mpc8321 based tuda1 board
In reply to Heiko SchocherThis board is similar to suvd3 board. So most initialisation topics are taken from suvd3 (UART1, Ethernet, piggy PHY, flash, ram) only the application specific chip selects differ.
---
changes for v2:
- fix checkpatch.pl errors and warnings
Changes for v3:
- rebased only
MAINTAINERS | 1 + boards.cfg | 1 + include/configs/tuda1.h | 249 +++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 251 insertions(+), 0 deletions(-) create mode 100644 include/configs/tuda1.h
MAINTAINERS +1 -0
@@ -434,6 +434,7 @@ Heiko Schocher <[email protected]> sc3 PPC405GP suen3 ARM926EJS (Kirkwood SoC) suvd3 MPC8321 + tuda1 MPC8321 tuxa1 MPC8321 uc101 MPC5200 ve8313 MPC8313
boards.cfg +1 -0
@@ -476,6 +476,7 @@ SIMPC8313_LP powerpc mpc83xx simpc8313 sheldon SIMPC8313_SP powerpc mpc83xx simpc8313 sheldon - SIMPC8313:NAND_SP suvd3 powerpc mpc83xx km83xx keymile TQM834x powerpc mpc83xx tqm834x tqc +tuda1 powerpc mpc83xx km83xx keymile tuxa1 powerpc mpc83xx km83xx keymile sbc8540 powerpc mpc85xx sbc8560 - - SBC8540 sbc8540_33 powerpc mpc85xx sbc8560 - - SBC8540
include/configs/tuda1.h new file +249 -0
249 lines not on this page · raw message
Signature · 1 line
1.7.4
PATCH v3 9/23 arm: add support for kirkwood based mgcoge2un board
In reply to Heiko SchocherThis board is similar to keymile suen3.
---
Changes for v2:
- fix checkpatch.pl errors and warnings
Changes for v3:
- rebased only
MAINTAINERS | 1 + boards.cfg | 1 + include/configs/km_arm.h | 41 ++++++++++++++++++++++++++++ include/configs/mgcoge2un.h | 63 +++++++++++++++++++++++++++++++++++++++++++ include/configs/suen3.h | 41 ---------------------------- 5 files changed, 106 insertions(+), 41 deletions(-) create mode 100644 include/configs/mgcoge2un.h
MAINTAINERS +1 -0
@@ -428,6 +428,7 @@ Heiko Schocher <[email protected]> jupiter MPC5200 kmeter1 MPC8360 mgcoge MPC8247 + mgcoge2un ARM926EJS (Kirkwood SoC) mucmc52 MPC5200 muas3001 MPC8270 municse MPC5200
boards.cfg +1 -0
@@ -94,6 +94,7 @@ davinci_schmoogie arm arm926ejs schmoogie davinci davinci_sffsdr arm arm926ejs sffsdr davinci davinci davinci_sonata arm arm926ejs sonata davinci davinci suen3 arm arm926ejs km_arm keymile kirkwood +mgcoge2un arm arm926ejs km_arm keymile kirkwood guruplug arm arm926ejs - Marvell kirkwood mv88f6281gtw_ge arm arm926ejs - Marvell kirkwood openrd_base arm arm926ejs - Marvell kirkwood
include/configs/km_arm.h +41 -0
47 lines not on this page · raw message
include/configs/mgcoge2un.h new file +63 -0
63 lines not on this page · raw message
include/configs/suen3.h +0 -41
47 lines not on this page · raw message
Signature · 1 line
1.7.4
PATCH v3 10/23 arm: add support of Kirkwood based board SUEN8
In reply to Heiko SchocherThe Kirwood based SUEN8 board from Keymile is at this stage the same than the suen3 board. This patch adds the board support for the suen8.
---
Changes for v2:
- fix checkpatch.pl errors and warnings
Changes for v3:
- rebased only
MAINTAINERS | 1 + boards.cfg | 1 + include/configs/suen8.h | 63 +++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 65 insertions(+), 0 deletions(-) create mode 100644 include/configs/suen8.h
MAINTAINERS +1 -0
@@ -434,6 +434,7 @@ Heiko Schocher <[email protected]> municse MPC5200 sc3 PPC405GP suen3 ARM926EJS (Kirkwood SoC) + suen8 ARM926EJS (Kirkwood SoC) suvd3 MPC8321 tuda1 MPC8321 tuxa1 MPC8321
boards.cfg +1 -0
@@ -94,6 +94,7 @@ davinci_schmoogie arm arm926ejs schmoogie davinci davinci_sffsdr arm arm926ejs sffsdr davinci davinci davinci_sonata arm arm926ejs sonata davinci davinci suen3 arm arm926ejs km_arm keymile kirkwood +suen8 arm arm926ejs km_arm keymile kirkwood mgcoge2un arm arm926ejs km_arm keymile kirkwood guruplug arm arm926ejs - Marvell kirkwood mv88f6281gtw_ge arm arm926ejs - Marvell kirkwood
include/configs/suen8.h new file +63 -0
63 lines not on this page · raw message
Signature · 1 line
1.7.4
PATCH v3 11/23 ppc: add support for ppc based board mgcoge2ne
In reply to Heiko SchocherThe mgcoge2 board from keymile deploys two different processors. An ARM based Kirkwood for the "unit" part of the SW and a PPC for the "ne" part of the SW. Therefore in Linux and U-Boot the names for the board are mgcoge2un and mgcoge2ne. This patch adds the mgcoge2ne part of the board. The ppc part of mgboge2 is quite similar to mgcoge, therefore a generic header km82xx-common.h was introduced to collect all similiarities. Currently the only difference is that mgcoge2ne has a 64 MB numonyx NOR flash with a single die. The mgcoge has a dual die flash 2*32MB from spansion.
---
Changes for v2:
- fix checkpatch.pl errors and warnings
Changes for v3:
- rebased only
MAINTAINERS | 1 + board/keymile/common/common.c | 4 +- board/keymile/mgcoge/mgcoge.c | 4 + boards.cfg | 1 + include/configs/km82xx-common.h | 336 +++++++++++++++++++++++++++++++++++++++ include/configs/mgcoge.h | 312 +----------------------------------- include/configs/mgcoge2ne.h | 64 ++++++++ 7 files changed, 411 insertions(+), 311 deletions(-) create mode 100644 include/configs/km82xx-common.h create mode 100644 include/configs/mgcoge2ne.h
MAINTAINERS +1 -0
@@ -428,6 +428,7 @@ Heiko Schocher <[email protected]> jupiter MPC5200 kmeter1 MPC8360 mgcoge MPC8247 + mgcoge2ne MPC8247 mgcoge2un ARM926EJS (Kirkwood SoC) mucmc52 MPC5200 muas3001 MPC8270
board/keymile/common/common.c +2 -2
@@ -22,7 +22,7 @@*/ #include <common.h> -#if defined(CONFIG_MGCOGE ) +#if defined(CONFIG_MGCOGE ) || defined(CONFIG_MGCOGE2NE )#include <mpc8260.h> #endif #include <ioports.h>
@@ -343,7 +343,7 @@ int ivm_read_eeprom(void)#define DELAY_ABORT_SEQ 62#define DELAY_HALF_PERIOD (500 / (CONFIG_SYS_I2C_SPEED / 1000)) -#if defined(CONFIG_MGCOGE ) +#if defined(CONFIG_MGCOGE ) || defined(CONFIG_MGCOGE2NE )#define SDA_MASK 0x00010000#define SCL_MASK 0x00020000static void set_pin (int state,unsigned long mask)
board/keymile/mgcoge/mgcoge.c +4 -0
@@ -284,7 +284,11 @@ phys_size_t initdram(int board_type)int checkboard (void ) { +#if defined(CONFIG_MGCOGE )puts ("Board: Keymile mgcoge" ); +#else +puts ("Board: Keymile mgcoge2ne" ); +#endif if (ethernet_present ())puts (" with PIGGY." );puts ("\n" );
boards.cfg +1 -0
@@ -424,6 +424,7 @@ PQ2FADS-ZU_66MHz_lowboot powerpc mpc8260 mpc8260ads freesca PQ2FADS-ZU_lowboot powerpc mpc8260 mpc8260ads freescale - MPC8260ADS:ADSTYPE=CONFIG_SYS_PQ2FADS,SYS_TEXT_BASE=0xFF800000 VoVPN-GW_66MHz powerpc mpc8260 vovpn-gw funkwerk - VoVPN-GW:CLKIN_66MHz mgcoge powerpc mpc8260 - keymile +mgcoge2ne powerpc mpc8260 mgcoge keymile SCM powerpc mpc8260 - siemens TQM8255_AA powerpc mpc8260 tqm8260 tqc - TQM8260:MPC8255,300MHz TQM8260_AA powerpc mpc8260 tqm8260 tqc - TQM8260:MPC8260,200MHz
include/configs/km82xx-common.h new file +336 -0
336 lines not on this page · raw message
include/configs/mgcoge.h +3 -309
324 lines not on this page · raw message
include/configs/mgcoge2ne.h new file +64 -0
64 lines not on this page · raw message
Signature · 1 line
1.7.4
PATCH v3 12/23 keymile, 8321 boards: move common definitions to km8321-common.h
In reply to Heiko SchocherFrom: Thomas Reufer <[email protected]>
First step for a cleanup of all header files for km8321 boards.
---
Changes for v2:
- fix checkpatch.pl errors and warnings
Changes for v3:
- rebased only
include/configs/km8321-common.h | 141 +++++++++++++++++++++++++++++++++++++++ 1 files changed, 141 insertions(+), 0 deletions(-) create mode 100644 include/configs/km8321-common.h
include/configs/km8321-common.h new file +141 -0
@@ -0,0 +1,141 @@ +/* +* Copyright (C) 2006 Freescale Semiconductor, Inc. +* Dave Liu <[email protected]> +* +* Copyright (C) 2007 Logic Product Development, Inc. +* Peter Barada <[email protected]> +* +* Copyright (C) 2007 MontaVista Software, Inc. +* Anton Vorontsov <[email protected]> +* +* (C) Copyright 2008 +* Heiko Schocher, DENX Software Engineering, hs at denx.de. +* +* (C) Copyright 2010 +* Lukas Roggli, KEYMILE Ltd, lukas.roggli at keymile.com +* +* (C) Copyright 2010-2011 +* Thomas Reufer, KEYMILE Ltd, thomas.reufer at keymile.com +* +* 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. +*/ + +#ifndef __CONFIG_KM8321_COMMON_H +#define __CONFIG_KM8321_COMMON_H + +/* +* High Level Configuration Options +*/ +#define CONFIG_QE /* Has QE */ +#define CONFIG_MPC832x/* MPC832x CPU specific */ +#define CONFIG_KM8321 /* Keymile PBEC8321 board specific */ + +#define CONFIG_KM_DEF_NETDEV \ + "netdev=eth0\0" + +#define CONFIG_KM_DEF_ROOTPATH \ + "rootpath=/opt/eldk/ppc_8xx\0" + +/* include common defines/options for all 83xx Keymile boards */ +#include "km83xx-common.h" + +#define CONFIG_MISC_INIT_R + +/* +* System IO Config +*/ +#define CONFIG_SYS_SICRH 0x00000006 +#define CONFIG_SYS_SICRL SICRL_IRQ_CKS + +/* +* Hardware Reset Configuration Word +*/ +#define CONFIG_SYS_HRCW_LOW (\ + HRCWL_LCL_BUS_TO_SCB_CLK_1X1 | \ + HRCWL_DDR_TO_SCB_CLK_2X1 | \ + HRCWL_CSB_TO_CLKIN_2X1 | \ + HRCWL_CORE_TO_CSB_2_5X1 | \ + HRCWL_CE_PLL_VCO_DIV_2 | \ + HRCWL_CE_TO_PLL_1X3) + +#define CONFIG_SYS_HRCW_HIGH (\ + HRCWH_PCI_AGENT | \ + HRCWH_PCI_ARBITER_DISABLE | \ + HRCWH_CORE_ENABLE | \ + HRCWH_FROM_0X00000100 | \ + HRCWH_BOOTSEQ_DISABLE | \ + HRCWH_SW_WATCHDOG_DISABLE | \ + HRCWH_ROM_LOC_LOCAL_16BIT | \ + HRCWH_BIG_ENDIAN | \ + HRCWH_LALE_NORMAL) + +#define CONFIG_SYS_DDR_CS0_BNDS 0x0000007f +#define CONFIG_SYS_DDR_SDRAM_CFG (SDRAM_CFG_SDRAM_TYPE_DDR2 | \ + SDRAM_CFG_32_BE | \ + SDRAM_CFG_SREN) + +#define CONFIG_SYS_DDR_SDRAM_CFG2 0x00401000 +#define CONFIG_SYS_DDR_CLK_CNTL (DDR_SDRAM_CLK_CNTL_CLK_ADJUST_05) +#define CONFIG_SYS_DDR_INTERVAL ((0x064 << SDRAM_INTERVAL_BSTOPRE_SHIFT) | \ + (0x200 << SDRAM_INTERVAL_REFINT_SHIFT)) + +#define CONFIG_SYS_DDR_CS0_CONFIG (CSCONFIG_EN | CSCONFIG_AP | \ + CSCONFIG_ODT_WR_CFG | \ + CSCONFIG_ROW_BIT_13 | \ + CSCONFIG_COL_BIT_10) + +#define CONFIG_SYS_DDR_MODE 0x47860252 +#define CONFIG_SYS_DDR_MODE2 0x8080c000 + +#define CONFIG_SYS_DDR_TIMING_0 ((2 << TIMING_CFG0_MRS_CYC_SHIFT) | \ + (8 << TIMING_CFG0_ODT_PD_EXIT_SHIFT) | \ + (2 << TIMING_CFG0_PRE_PD_EXIT_SHIFT) | \ + (2 << TIMING_CFG0_ACT_PD_EXIT_SHIFT) | \ + (0 << TIMING_CFG0_WWT_SHIFT) | \ + (0 << TIMING_CFG0_RRT_SHIFT) | \ + (0 << TIMING_CFG0_WRT_SHIFT) | \ + (0 << TIMING_CFG0_RWT_SHIFT)) + +#define CONFIG_SYS_DDR_TIMING_1 ((TIMING_CFG1_CASLAT_50) | \ + (2 << TIMING_CFG1_WRTORD_SHIFT) | \ + (2 << TIMING_CFG1_ACTTOACT_SHIFT) | \ + (2 << TIMING_CFG1_WRREC_SHIFT) | \ + (6 << TIMING_CFG1_REFREC_SHIFT) | \ + (2 << TIMING_CFG1_ACTTORW_SHIFT) | \ + (6 << TIMING_CFG1_ACTTOPRE_SHIFT) | \ + (2 << TIMING_CFG1_PRETOACT_SHIFT)) + +#define CONFIG_SYS_DDR_TIMING_2 ((8 << TIMING_CFG2_FOUR_ACT_SHIFT) | \ + (3 << TIMING_CFG2_CKE_PLS_SHIFT) | \ + (2 << TIMING_CFG2_WR_DATA_DELAY_SHIFT) | \ + (2 << TIMING_CFG2_RD_TO_PRE_SHIFT) | \ + (4 << TIMING_CFG2_WR_LAT_DELAY_SHIFT) | \ + (0 << TIMING_CFG2_ADD_LAT_SHIFT) | \ + (5 << TIMING_CFG2_CPO_SHIFT)) + +#define CONFIG_SYS_DDR_TIMING_3 0x00000000 + +#define CONFIG_SYS_PIGGY_BASE 0xE8000000 +#define CONFIG_SYS_PIGGY_SIZE 128 + +/* EEprom support */ +#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1 + +/* +* Local Bus Configuration & Clock Setup +*/ +#define CONFIG_SYS_LCRR (LCRR_DBYP | LCRR_EADC_1 | LCRR_CLKDIV_2) +#define CONFIG_SYS_LBC_LBCR 0x00000000 + +/* +* MMU Setup +*/ +#define CONFIG_SYS_IBAT7L (0) +#define CONFIG_SYS_IBAT7U (0) +#define CONFIG_SYS_DBAT7L CONFIG_SYS_IBAT7L +#define CONFIG_SYS_DBAT7U CONFIG_SYS_IBAT7U + +#endif /* __CONFIG_KM8321_COMMON_H */
Signature · 1 line
1.7.4
PATCH v3 13/23 powerpc, 83xx: add kmsupx5 board support
In reply to Heiko SchocherThe Keymile SUPx5 board series is based on a PBEC8321 but contains an additional PBUS FPGA (LPXF) on local bus CS2.
---
Changes for v2:
- fix checkpatch.pl errors and warnings
Changes for v3:
- rebased only
MAINTAINERS | 1 + boards.cfg | 1 + include/configs/kmsupx5.h | 91 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 93 insertions(+), 0 deletions(-) create mode 100644 include/configs/kmsupx5.h
MAINTAINERS +1 -0
@@ -427,6 +427,7 @@ Heiko Schocher <[email protected]> ids8247 MPC8247 jupiter MPC5200 kmeter1 MPC8360 + kmsupx5 MPC8321 mgcoge MPC8247 mgcoge2ne MPC8247 mgcoge2un ARM926EJS (Kirkwood SoC)
boards.cfg +1 -0
@@ -477,6 +477,7 @@ kmeter1 powerpc mpc83xx km83xx keymile MVBLM7 powerpc mpc83xx mvblm7 matrix_vision SIMPC8313_LP powerpc mpc83xx simpc8313 sheldon - SIMPC8313:NAND_LP SIMPC8313_SP powerpc mpc83xx simpc8313 sheldon - SIMPC8313:NAND_SP +kmsupx5 powerpc mpc83xx km83xx keymile suvd3 powerpc mpc83xx km83xx keymile TQM834x powerpc mpc83xx tqm834x tqc tuda1 powerpc mpc83xx km83xx keymile
include/configs/kmsupx5.h new file +91 -0
91 lines not on this page · raw message
Signature · 1 line
1.7.4
PATCH v3 14/23 km-arm: i2c support for suenx based boards
In reply to Heiko SchocherThis patch renames the suen3 defines and functions to KM_KIRKWOOD which is more generic and more precise, because these values and functions where used by all suenX boards and not only suen3.
---
Changes for v2:
- fix checkpatch.pl errors and warnings
Changes for v3:
- rebased only
board/keymile/km_arm/km_arm.c | 20 ++++++++++---------- include/configs/km_arm.h | 18 +++++++++--------- 2 files changed, 19 insertions(+), 19 deletions(-)
board/keymile/km_arm/km_arm.c +10 -10
@@ -95,7 +95,7 @@ u32 kwmpp_config[] = {MPP41_GPIO ,/* Piggy3 LED[4] */ MPP42_GPIO ,/* Piggy3 LED[5] */ MPP43_GPIO ,/* Piggy3 LED[6] */ -MPP44_GPIO ,/* Piggy3 LED[7] */ +MPP44_GPIO ,/* Piggy3 LED[7], BIST_EN_L */ MPP45_GPIO ,/* Piggy3 LED[8] */ MPP46_GPIO ,/* Reserved */ MPP47_GPIO, /* Reserved */
@@ -161,14 +161,14 @@ int board_early_init_f(void)#if defined(CONFIG_SOFT_I2C )/* init the GPIO for I2C Bitbang driver */ -kw_gpio_set_valid (SUEN3_SDA_PIN ,1 ); -kw_gpio_set_valid (SUEN3_SCL_PIN ,1 ); -kw_gpio_direction_output (SUEN3_SDA_PIN ,0 ); -kw_gpio_direction_output (SUEN3_SCL_PIN ,0 ); +kw_gpio_set_valid (KM_KIRKWOOD_SDA_PIN ,1 ); +kw_gpio_set_valid (KM_KIRKWOOD_SCL_PIN ,1 ); +kw_gpio_direction_output (KM_KIRKWOOD_SDA_PIN ,0 ); +kw_gpio_direction_output (KM_KIRKWOOD_SCL_PIN ,0 );#endif #if defined(CONFIG_SYS_EEPROM_WREN ) -kw_gpio_set_valid (SUEN3_ENV_WP ,38 ); -kw_gpio_direction_output (SUEN3_ENV_WP ,1 ); +kw_gpio_set_valid (KM_KIRKWOOD_ENV_WP ,38 ); +kw_gpio_direction_output (KM_KIRKWOOD_ENV_WP ,1 );#endif return 0 ;
@@ -321,15 +321,15 @@ int get_sda(void)int get_scl (void ) { -return (kw_gpio_get_value (SUEN3_SCL_PIN ) ?1 :0 ); +return kw_gpio_get_value (KM_KIRKWOOD_SCL_PIN ) ?1 :0 ; }#endif #if defined(CONFIG_SYS_EEPROM_WREN )int eeprom_write_enable (unsigned dev_addr,int state) { -kw_gpio_set_value (SUEN3_ENV_WP , !state); +kw_gpio_set_value (KM_KIRKWOOD_ENV_WP , !state); -return !kw_gpio_get_value (SUEN3_ENV_WP ); +return !kw_gpio_get_value (KM_KIRKWOOD_ENV_WP ); }#endif
include/configs/km_arm.h +9 -9
@@ -179,15 +179,15 @@ void set_sda (int state);void set_scl (int state);int get_sda (void );int get_scl (void ); -#define SUEN3_SDA_PIN 8 -#define SUEN3_SCL_PIN 9 -#define SUEN3_ENV_WP 38 - -#define I2C_ACTIVE __set_direction(SUEN3_SDA_PIN, 0) -#define I2C_TRISTATE __set_direction(SUEN3_SDA_PIN, 1) -#define I2C_READ (kw_gpio_get_value(SUEN3_SDA_PIN) ? 1 : 0) -#define I2C_SDA (bit) kw_gpio_set_value(SUEN3_SDA_PIN, bit); -#define I2C_SCL (bit) kw_gpio_set_value(SUEN3_SCL_PIN, bit); +#define KM_KIRKWOOD_SDA_PIN 8 +#define KM_KIRKWOOD_SCL_PIN 9 +#define KM_KIRKWOOD_ENV_WP 38 + +#define I2C_ACTIVE __set_direction(KM_KIRKWOOD_SDA_PIN, 0) +#define I2C_TRISTATE __set_direction(KM_KIRKWOOD_SDA_PIN, 1) +#define I2C_READ (kw_gpio_get_value(KM_KIRKWOOD_SDA_PIN) ? 1 : 0) +#define I2C_SDA (bit) kw_gpio_set_value(KM_KIRKWOOD_SDA_PIN, bit) +#define I2C_SCL (bit) kw_gpio_set_value(KM_KIRKWOOD_SCL_PIN, bit)#endif #define I2C_DELAY udelay(3)/* 1/4 I2C clock duration */
Signature · 1 line
1.7.4
PATCH v3 15/23 km_arm: change some register values for SDRAM initialization
In reply to Heiko SchocherThese new values were given by Clive Stubbings from Xentech. According to him they should be used on all bobcat designs.
The changes are the following:
- enables UART0 and UART1 pins in MPP
- define some L2 cache settings
- changes a SDRAM timing to better fit the hardware
- removed three writes that were the same as the reset values
---
Changes for v2:
- nothing
Changes for v3:
- nothing
board/keymile/km_arm/kwbimage.cfg | 32 ++++++++++++++++++-------------- 1 files changed, 18 insertions(+), 14 deletions(-)
board/keymile/km_arm/kwbimage.cfg +18 -14
@@ -27,16 +27,18 @@ # Boot Media configurations BOOT_FROM spi # Boot from SPI flash -DATA 0xFFD10000 0x01111111 # MPP Control 0 Register -# bit 3-0: MPPSel0 1, NF_IO[2] -# bit 7-4: MPPSel1 1, NF_IO[3] -# bit 12-8: MPPSel2 1, NF_IO[4] -# bit 15-12: MPPSel3 1, NF_IO[5] +DATA 0xFFD10000 0x01112222 # MPP Control 0 Register +# bit 3-0: MPPSel0 2, NF_IO[2] +# bit 7-4: MPPSel1 2, NF_IO[3] +# bit 12-8: MPPSel2 2, NF_IO[4] +# bit 15-12: MPPSel3 2, NF_IO[5] # bit 19-16: MPPSel4 1, NF_IO[6] # bit 23-20: MPPSel5 1, NF_IO[7] # bit 27-24: MPPSel6 1, SYSRST_O # bit 31-28: MPPSel7 0, GPO[7] +DATA 0xFFD10004 0x03303300 + DATA 0xFFD10008 0x00001100 # MPP Control 2 Register # bit 3-0: MPPSel16 0, GPIO[16] # bit 7-4: MPPSel17 0, GPIO[17]
@@ -48,8 +50,8 @@ DATA 0xFFD10008 0x00001100 # MPP Control 2 Register # bit 31-28: MPPSel23 0, GPIO[23] DATA 0xFFD100E0 0x1B1B1B1B # IO Configuration 0 Register -DATA 0xFFD20134 0xBBBBBBBB # L2 RAM Timing 0 Register -DATA 0xFFD20138 0x00BBBBBB # L2 RAM Timing 1 Register +DATA 0xFFD20134 0x66666666 # L2 RAM Timing 0 Register +DATA 0xFFD20138 0x66666666 # L2 RAM Timing 1 Register DATA 0xFFD20154 0x00000200 # CPU RAM Management Control3 Register DATA 0xFFD2014C 0x00001C00 # CPU RAM Management Control1 Register DATA 0xFFD20148 0x00000001 # CPU RAM Management Control0 Register
@@ -63,7 +65,7 @@ DATA 0xFFD01400 0x43000400 # SDRAM Configuration Register # bit29-26: zero # bit31-30: 01 -DATA 0xFFD01404 0x36343000 # DDR Controller Control Low +DATA 0xFFD01404 0x39543000 # DDR Controller Control Low # bit 3-0: 0 reserved # bit 4: 0=addr/cmd in smame cycle # bit 5: 0=clk is driven during self refresh, we don't care for APX
@@ -75,7 +77,7 @@ DATA 0xFFD01404 0x36343000 # DDR Controller Control Low # bit30-28: 3 required # bit31: 0=no additional STARTBURST delay -DATA 0xFFD01408 0x2302544B # DDR Timing (Low) (active cycles value +1) +DATA 0xFFD01408 0x34136552 # DDR Timing (Low) (active cycles value +1) # bit3-0: TRAS lsbs # bit7-4: TRCD # bit11- 8: TRP
@@ -86,7 +88,7 @@ DATA 0xFFD01408 0x2302544B # DDR Timing (Low) (active cycles value +1) # bit27-24: TRRD # bit31-28: TRTP -DATA 0xFFD0140C 0x00000032 # DDR Timing (High) +DATA 0xFFD0140C 0x00000033 # DDR Timing (High) # bit6-0: TRFC # bit8-7: TR2R # bit10-9: TR2W
@@ -116,8 +118,8 @@ DATA 0xFFD01418 0x00000000 # DDR Operation # bit3-0: 0x0, DDR cmd # bit31-4: 0 required -DATA 0xFFD0141C 0x00000642 # DDR Mode -DATA 0xFFD01420 0x00000040 # DDR Extended Mode +DATA 0xFFD0141C 0x00000652 # DDR Mode +DATA 0xFFD01420 0x00000044 # DDR Extended Mode # bit0: 0, DDR DLL enabled # bit1: 0, DDR drive strenght normal # bit2: 1, DDR ODT control lsd disabled
@@ -140,6 +142,8 @@ DATA 0xFFD01424 0x0000F07F # DDR Controller Control High # bit11 : 0 , 1/4 clock cycle skew disabled for write mesh # bit15-12: 1111 required # bit31-16: 0 required +DATA 0xFFD01428 0x00074510 +DATA 0xFFD0147c 0x00007451 DATA 0xFFD01500 0x00000000 # CS[0]n Base address to 0x0 DATA 0xFFD01504 0x07FFFFF1 # CS[0]n Size
@@ -153,7 +157,7 @@ DATA 0xFFD0150C 0x00000000 # CS[1]n Size, window disabled DATA 0xFFD01514 0x00000000 # CS[2]n Size, window disabled DATA 0xFFD0151C 0x00000000 # CS[3]n Size, window disabled -DATA 0xFFD01494 0x00000000 # DDR ODT Control (Low) +DATA 0xFFD01494 0x00010001 # DDR ODT Control (Low) # bit3-0: 0, ODT0Rd, MODT[0] asserted during read from DRAM CS0 # bit19-16:0, ODT0Wr, MODT[0] asserted during write to DRAM CS0
@@ -162,7 +166,7 @@ DATA 0xFFD01498 0x00000000 # DDR ODT Control (High) # bit3-2: 00, ODT1 controlled by register # bit31-4: zero, required -DATA 0xFFD0149C 0x0000E90F # CPU ODT Control +DATA 0xFFD0149C 0x0000FC11 # CPU ODT Control # bit3-0: F, ODT0Rd, Internal ODT asserted during read from DRAM bank0 # bit7-4: 0, ODT0Wr, Internal ODT asserted during write to DRAM bank0 # bit9-8: 1, ODTEn, never active
Signature · 1 line
1.7.4
PATCH v3 16/23 ppc, 8321: cleanup tuxa1, tuda1 and suvd3 support
In reply to Heiko SchocherFor the kmsupx5 a new header file was introduced km8321-common.h. Now the common stuff from tuxa1, tuda1 and suvd3 was removed and the new header file included.
The defines CONFIG_SYS_PIGGY_BASE and CONFIG_SYS_PIGGY_SIZE are confusing. Because they actually describe the KMBEC FPGA values. The KMBEC FPGA can be PRIO on kmeter1 or upio on mgcoge. Therefore all the defines were renamed.
remove unneeded variable CONFIG_KM_DEF_NETDEV, as it is already declared in keymile-common.h
---
Changes for v2:
- fix checkpatch.pl errors and warnings
Changes for v3:
- rebased only
board/keymile/common/common.c | 3 +- board/keymile/km83xx/km83xx.c | 3 +- board/keymile/mgcoge/mgcoge.c | 3 +- include/configs/keymile-common.h | 2 +- include/configs/km82xx-common.h | 12 ++-- include/configs/km8321-common.h | 7 +-- include/configs/km83xx-common.h | 19 +++--- include/configs/kmeter1.h | 8 ++- include/configs/suvd3.h | 115 +------------------------------------- include/configs/tuda1.h | 112 +------------------------------------ include/configs/tuxa1.h | 114 +------------------------------------- 11 files changed, 36 insertions(+), 362 deletions(-)
board/keymile/common/common.c +2 -1
@@ -562,7 +562,8 @@ int fdt_get_node_and_value(void *blob,#if !defined(MACH_TYPE_KM_KIRKWOOD )int ethernet_present (void ) { -struct km_bec_fpga *base = (struct km_bec_fpga *)CONFIG_SYS_PIGGY_BASE ; +struct km_bec_fpga *base = + (struct km_bec_fpga *)CONFIG_SYS_KMBEC_FPGA_BASE ;return in_8 (&base->bprth) &PIGGY_PRESENT ; }
board/keymile/km83xx/km83xx.c +2 -1
@@ -134,7 +134,8 @@ const uint upma_table[] = {int board_early_init_r (void ) { -struct km_bec_fpga *base = (struct km_bec_fpga *)CONFIG_SYS_PIGGY_BASE ; +struct km_bec_fpga *base = + (struct km_bec_fpga *)CONFIG_SYS_KMBEC_FPGA_BASE ;#if defined(CONFIG_SUVD3 )immap_t *immap = (immap_t *)CONFIG_SYS_IMMR ;fsl_lbc_t *lbc = &immap->im_lbc;
board/keymile/mgcoge/mgcoge.c +2 -1
@@ -300,7 +300,8 @@ int checkboard(void)*/ int board_early_init_r (void ) { -struct km_bec_fpga *base = (struct km_bec_fpga *)CONFIG_SYS_PIGGY_BASE ; +struct km_bec_fpga *base = + (struct km_bec_fpga *)CONFIG_SYS_KMBEC_FPGA_BASE ;/* setup the UPIOx */ /* General Unit Reset disabled, Flash Bank enabled, UnitLed on */
include/configs/keymile-common.h +1 -1
@@ -102,7 +102,7 @@* driver to set the MAC. */ #define CONFIG_CHECK_ETHERNET_PRESENT -#define CONFIG_SYS_SLOT_ID_BASE CONFIG_SYS_PIGGY_BASE +#define CONFIG_SYS_SLOT_ID_BASE CONFIG_SYS_KMBEC_FPGA_BASE#define CONFIG_SYS_SLOT_ID_OFF (0x07)/* register offset */ #define CONFIG_SYS_SLOT_ID_MASK (0x3f)/* mask for slot ID bits */
include/configs/km82xx-common.h +6 -6
@@ -287,20 +287,20 @@ PSDMR_CL_2)/* -* GPIO/PIGGY on CS3 initialization values +* UPIO FPGA (GPIO/PIGGY) on CS3 initialization values */ -#define CONFIG_SYS_PIGGY_BASE 0x30000000 -#define CONFIG_SYS_PIGGY_SIZE 128 +#define CONFIG_SYS_KMBEC_FPGA_BASE 0x30000000 +#define CONFIG_SYS_KMBEC_FPGA_SIZE 128 -#define CONFIG_SYS_BR3_PRELIM ((CONFIG_SYS_PIGGY_BASE & BRx_BA_MSK) |\ +#define CONFIG_SYS_BR3_PRELIM ((CONFIG_SYS_KMBEC_FPGA_BASE & BRx_BA_MSK) |\ BRx_PS_8 | BRx_MS_GPCM_P | BRx_V) -#define CONFIG_SYS_OR3_PRELIM (MEG_TO_AM(CONFIG_SYS_PIGGY_SIZE) |\ +#define CONFIG_SYS_OR3_PRELIM (MEG_TO_AM(CONFIG_SYS_KMBEC_FPGA_SIZE) |\ ORxG_CSNT | ORxG_ACS_DIV2 |\ ORxG_SCY_3_CLK | ORxG_TRLX)/* -* Board FPGA on CS4 initialization values +* BFTICU board FPGA on CS4 initialization values */ #define CONFIG_SYS_FPGA_BASE 0x40000000#define CONFIG_SYS_FPGA_SIZE 1/*1KB*/
include/configs/km8321-common.h +2 -5
@@ -33,9 +33,6 @@#define CONFIG_MPC832x/* MPC832x CPU specific */ #define CONFIG_KM8321 /* Keymile PBEC8321 board specific */ -#define CONFIG_KM_DEF_NETDEV \ - "netdev=eth0\0" -#define CONFIG_KM_DEF_ROOTPATH \ "rootpath=/opt/eldk/ppc_8xx\0"
@@ -118,8 +115,8 @@#define CONFIG_SYS_DDR_TIMING_3 0x00000000 -#define CONFIG_SYS_PIGGY_BASE 0xE8000000 -#define CONFIG_SYS_PIGGY_SIZE 128 +#define CONFIG_SYS_KMBEC_FPGA_BASE 0xE8000000 +#define CONFIG_SYS_KMBEC_FPGA_SIZE 128/* EEprom support */ #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1
include/configs/km83xx-common.h +10 -9
@@ -121,13 +121,14 @@/* * PRIO1/PIGGY on the local bus CS1 */ -#define CONFIG_SYS_LBLAWBAR1_PRELIM CONFIG_SYS_PIGGY_BASE +/* Window base at flash base */ +#define CONFIG_SYS_LBLAWBAR1_PRELIM CONFIG_SYS_KMBEC_FPGA_BASE#define CONFIG_SYS_LBLAWAR1_PRELIM 0x8000001A/* 128MB window size */ -#define CONFIG_SYS_BR1_PRELIM (CONFIG_SYS_PIGGY_BASE | \ +#define CONFIG_SYS_BR1_PRELIM (CONFIG_SYS_KMBEC_FPGA_BASE | \ (1 << BR_PS_SHIFT) | /* 8 bit port size */ \BR_V ) -#define CONFIG_SYS_OR1_PRELIM (MEG_TO_AM(CONFIG_SYS_PIGGY_SIZE) | \ +#define CONFIG_SYS_OR1_PRELIM (MEG_TO_AM(CONFIG_SYS_KMBEC_FPGA_SIZE) | \ OR_GPCM_CSNT | OR_GPCM_ACS_DIV2 | \ OR_GPCM_SCY_2 | \ OR_GPCM_TRLX | OR_GPCM_EAD)
@@ -212,7 +213,7 @@#if defined(CONFIG_CMD_NAND )#define CONFIG_NAND_KMETER1 #define CONFIG_SYS_MAX_NAND_DEVICE 1 -#define CONFIG_SYS_NAND_BASE CONFIG_SYS_PIGGY_BASE +#define CONFIG_SYS_NAND_BASE CONFIG_SYS_KMBEC_FPGA_BASE#endif #if defined(CONFIG_PCI )
@@ -257,11 +258,11 @@#define CONFIG_SYS_DBAT1U CONFIG_SYS_IBAT1U/* PRIO1, PIGGY: icache cacheable, but dcache-inhibit and guarded */ -#define CONFIG_SYS_IBAT2L (CONFIG_SYS_PIGGY_BASE | BATL_PP_10 | \ - BATL_MEMCOHERENCE) -#define CONFIG_SYS_IBAT2U (CONFIG_SYS_PIGGY_BASE | BATU_BL_128M | \ - BATU_VS | BATU_VP) -#define CONFIG_SYS_DBAT2L (CONFIG_SYS_PIGGY_BASE | BATL_PP_10 | \ +#define CONFIG_SYS_IBAT2L (CONFIG_SYS_KMBEC_FPGA_BASE | BATL_PP_10 | \ + BATL_MEMCOHERENCE) +#define CONFIG_SYS_IBAT2U (CONFIG_SYS_KMBEC_FPGA_BASE | BATU_BL_128M | \ + BATU_VS | BATU_VP) +#define CONFIG_SYS_DBAT2L (CONFIG_SYS_KMBEC_FPGA_BASE | BATL_PP_10 | \ BATL_CACHEINHIBIT | BATL_GUARDEDSTORAGE)#define CONFIG_SYS_DBAT2U CONFIG_SYS_IBAT2U
include/configs/kmeter1.h +5 -3
@@ -107,9 +107,11 @@#define CONFIG_SYS_DDR_TIMING_3 0x00000000 -#define CONFIG_SYS_PIGGY_BASE 0xE8000000 -#define CONFIG_SYS_PIGGY_SIZE 128 -#define CONFIG_SYS_PAXE_BASE 0xA0000000 +/* PRIO FPGA */ +#define CONFIG_SYS_KMBEC_FPGA_BASE 0xE8000000 +#define CONFIG_SYS_KMBEC_FPGA_SIZE 128 +/* PAXE FPGA */ +#define CONFIG_SYS_PAXE_BASE 0xA0000000#define CONFIG_SYS_PAXE_SIZE 512/* EEprom support */
include/configs/suvd3.h +2 -113
144 lines not on this page · raw message
include/configs/tuda1.h +2 -110
141 lines not on this page · raw message
include/configs/tuxa1.h +2 -112
143 lines not on this page · raw message
Signature · 1 line
1.7.4
PATCH v3 17/23 keymile, common; fix i2c deblocking support
In reply to Heiko SchocherThis patch fix the i2c deblocking facility with the i2c HW-Controller. The required delays for byte reading, the enhanced criteria for stop the dummy read and required 5 start/stop sequences are added.
Add i2c deblocking before ivm eeprom read.
Improve i2c deblocking sequence by respecting stop hold time.
Cleaned function for deblocking. Have now one function i2c_make_abort() available for bitbang, mpc82xx and mpc83xx harware controller.
---
Changes for v2:
- fix checkpatch.pl errors and warnings
Changes for v3:
- rebased only
board/keymile/common/common.c | 121 ++++++++++++++++++++++++++++++----------- 1 files changed, 89 insertions(+), 32 deletions(-)
board/keymile/common/common.c +89 -32
@@ -40,6 +40,9 @@ #if defined(CONFIG_HARD_I2C) || defined(CONFIG_SOFT_I2C) #include <i2c.h> +static void i2c_write_start_seq(void); +static int i2c_make_abort(void); + int ivm_calc_crc(unsigned char *buf, int len) { const unsigned short crc_tab[16] = {
@@ -329,8 +332,11 @@ int ivm_read_eeprom(void)if (buf !=NULL ) dev_addr =simple_strtoul ((char *)buf,NULL ,16 ); +/* add deblocking here */ +i2c_make_abort (); + ret =i2c_read (dev_addr,0 ,1 , i2c_buffer, -CONFIG_SYS_IVM_EEPROM_MAX_LEN ); +CONFIG_SYS_IVM_EEPROM_MAX_LEN );if (ret !=0 ) {printf ("Error reading EEprom\n" );return -2 ;
@@ -340,7 +346,7 @@ int ivm_read_eeprom(void) }#if defined(CONFIG_SYS_I2C_INIT_BOARD ) -#define DELAY_ABORT_SEQ 62 +#define DELAY_ABORT_SEQ 62/* @200kHz 9 clocks = 44us, 62us is ok */ #define DELAY_HALF_PERIOD (500 / (CONFIG_SYS_I2C_SPEED / 1000))#if defined(CONFIG_MGCOGE ) || defined(CONFIG_MGCOGE2NE )
@@ -404,7 +410,7 @@ static void setports(int gpio)#endif #if !defined(CONFIG_MPC83xx) -static void writeStartSeq (void ) +static void i2c_write_start_seq (void ) {set_sda (1 );udelay (DELAY_HALF_PERIOD );
@@ -426,6 +432,21 @@ static void writeStartSeq(void)*/ static int i2c_make_abort (void ) { + +#if defined(CONFIG_HARD_I2C ) && !defined(MACH_TYPE_KM_KIRKWOOD ) +immap_t *immap = (immap_t *)CONFIG_SYS_IMMR ; +i2c8260_t *i2c = (i2c8260_t *)&immap->im_i2c; + +/* +* disable I2C controller first, otherwhise it thinks we want to +* talk to the slave port... +*/ +clrbits_8 (&i2c->i2c_i2mod,0x01 ); + +/* Set the PortPins to GPIO */ +setports (1 ); +#endif +int scl_state =0 ;int sda_state =0 ;int i =0 ;
@@ -449,57 +470,93 @@ static int i2c_make_abort(void) }if (ret ==0 )for (i =0 ; i <5 ; i++) -writeStartSeq (); +i2c_write_start_seq (); +/* respect stop setup time */ +udelay (DELAY_ABORT_SEQ ); +set_scl (1 ); +udelay (DELAY_ABORT_SEQ ); +set_sda (1 );get_sda (); + +#if defined(CONFIG_HARD_I2C ) +/* Set the PortPins back to use for I2C */ +setports (0 ); +#endif return ret; }#endif -/* -* i2c_init_board - reset i2c bus. When the board is powercycled during a -* bus transfer it might hang; for details see doc/I2C_Edge_Conditions. -*/ -void i2c_init_board (void ) -{#if defined(CONFIG_MPC83xx) +static void i2c_write_start_seq (void ) +{ +struct fsl_i2c *dev; + dev = (struct fsl_i2c *) (CONFIG_SYS_IMMR +CONFIG_SYS_I2C_OFFSET ); +udelay (DELAY_ABORT_SEQ ); +out_8 (&dev->cr, (I2C_CR_MEN |I2C_CR_MSTA )); +udelay (DELAY_ABORT_SEQ ); +out_8 (&dev->cr, (I2C_CR_MEN )); +} + +static int i2c_make_abort (void ) +{struct fsl_i2c *dev; dev = (struct fsl_i2c *) (CONFIG_SYS_IMMR +CONFIG_SYS_I2C_OFFSET );uchar dummy; +uchar last; +int nbr_read =0 ; +int i =0 ; +int ret =0 ; +/* wait after each operation to finsh with a delay */ out_8 (&dev->cr, (I2C_CR_MSTA )); +udelay (DELAY_ABORT_SEQ );out_8 (&dev->cr, (I2C_CR_MEN |I2C_CR_MSTA )); +udelay (DELAY_ABORT_SEQ ); dummy =in_8 (&dev->dr); - dummy =in_8 (&dev->dr); -if (dummy !=0xff ) { - dummy =in_8 (&dev->dr); - } -out_8 (&dev->cr, (I2C_CR_MEN )); -out_8 (&dev->cr,0x00 ); -out_8 (&dev->cr, (I2C_CR_MEN )); -#else -#if defined(CONFIG_HARD_I2C ) && !defined(MACH_TYPE_KM_KIRKWOOD ) -immap_t *immap = (immap_t *)CONFIG_SYS_IMMR ; -i2c8260_t *i2c = (i2c8260_t *)&immap->im_i2c; +udelay (DELAY_ABORT_SEQ ); + last =in_8 (&dev->dr); + nbr_read++;/* -* disable I2C controller first, otherwhise it thinks we want to -* talk to the slave port... +* do read until the last bit is 1, but stop if the full eeprom is +* read. */ -clrbits_8 (&i2c->i2c_i2mod,0x01 ); +while (((last &0x01 ) !=0x01 ) && + (nbr_read <CONFIG_SYS_IVM_EEPROM_MAX_LEN )) { +udelay (DELAY_ABORT_SEQ ); + last =in_8 (&dev->dr); + nbr_read++; + } +if ((last &0x01 ) !=0x01 ) + ret =-2 ; +if ((last !=0xff ) || (nbr_read >1 )) +printf ("[INFO] i2c abort after %d bytes (0x%02x)\n" , + nbr_read, last); +udelay (DELAY_ABORT_SEQ ); +out_8 (&dev->cr, (I2C_CR_MEN )); +udelay (DELAY_ABORT_SEQ ); +/* clear status reg */ +out_8 (&dev->sr,0 ); -/* Set the PortPins to GPIO */ -setports (1 ); +for (i =0 ; i <5 ; i++) +i2c_write_start_seq (); +if (ret !=0 ) +printf ("[ERROR] i2c abort failed after %d bytes (0x%02x)\n" , + nbr_read, last); + +return ret; +}#endif +/** +* i2c_init_board - reset i2c bus. When the board is powercycled during a +* bus transfer it might hang; for details see doc/I2C_Edge_Conditions. +*/ +void i2c_init_board (void ) +{/* Now run the AbortSequence() */ i2c_make_abort (); - -#if defined(CONFIG_HARD_I2C ) -/* Set the PortPins back to use for I2C */ -setports (0 ); -#endif -#endif }#endif #endif
Signature · 1 line
1.7.4
PATCH v3 18/23 arm, keymile: updates for the arm based boards from keymile
In reply to Heiko Schocherdefine KM_IVM_BUS and KM_ENV_BUS macros
KM_IVM_BUS is used to define the EEprom_ivm environment variable. These macros allow the reuse of these I2C addresses in other code locations.
remove unneeded code
On first HW versions the BOCO FPGA was behind a MUX device. These HW versions are not supported anymore. And therefore this code can be removed.
added LED initialization for SUEN3
The bootstat LED required to be initialized so to have a green colour after start-up.
define CONFIG_SYS_TEXT_BASE
This is needed by the relocation code and is not the same for our ARM BEC and thus needs to be defined.
remove memsize variable
An environment variable for memsize is not needed. this can be get via the board info struct.
remove unneeded double access to bi_dram[i].size field
---
Changes for v2:
- fix checkpatch.pl errors and warnings
Changes for v3:
- rebased only
board/keymile/km_arm/km_arm.c | 38 +++++++++++++++++++++++++++++++------- include/configs/km_arm.h | 1 + include/configs/mgcoge2un.h | 6 ++++-- include/configs/suen3.h | 6 ++++-- include/configs/suen8.h | 6 ++++-- 5 files changed, 44 insertions(+), 13 deletions(-)
board/keymile/km_arm/km_arm.c +31 -7
@@ -41,8 +41,6 @@DECLARE_GLOBAL_DATA_PTR ; -static int io_dev; -/* Multi-Purpose Pins Functionality configuration */ u32 kwmpp_config[] = {MPP0_NF_IO2 ,
@@ -119,15 +117,39 @@ int ethernet_present(void)return ret; } +int initialize_unit_leds (void ) +{ +/* +* init the unit LEDs +* per default they all are +* ok apart from bootstat +* LED connected through BOCO +* BOCO lies at the address 0x10 +* LEDs are in the block CTRL_H (addr 0x02) +* BOOTSTAT LED is the first 0x01 +*/ +#define BOCO 0x10 +#define CTRL_H 0x02 +#define APPLEDMASK 0x01 +uchar buf; + +if (i2c_read (BOCO ,CTRL_H ,1 , &buf,1 ) !=0 ) { +printf ("%s: Error reading Boco\n" , __func__); +return -1 ; + } + buf |=APPLEDMASK ; +if (i2c_write (BOCO ,CTRL_H ,1 , &buf,1 ) !=0 ) { +printf ("%s: Error writing Boco\n" , __func__); +return -1 ; + } +return 0 ; +} +int misc_init_r (void ) { -I2C_MUX_DEVICE *i2cdev;char *str;int mach_type; -/* add I2C Bus for I/O Expander */ - i2cdev =i2c_mux_ident_muxstring ((uchar *)"pca9554a:70:a" ); - io_dev = i2cdev->busid;puts ("Piggy:" );if (ethernet_present () ==0 )puts (" not" );
@@ -139,6 +161,9 @@ int misc_init_r(void)printf ("Overwriting MACH_TYPE with %d!!!\n" , mach_type); gd->bd->bi_arch_number = mach_type; } + +initialize_unit_leds (); +return 0 ; }
@@ -245,7 +270,6 @@ void dram_init_banksize(void)for (i =0 ; i <CONFIG_NR_DRAM_BANKS ; i++) { gd->bd->bi_dram[i].start =kw_sdram_bar (i); - gd->bd->bi_dram[i].size =kw_sdram_bs (i); gd->bd->bi_dram[i].size =get_ram_size ((long *)kw_sdram_bar (i),kw_sdram_bs (i)); }
include/configs/km_arm.h +1 -0
@@ -49,6 +49,7 @@/* include common defines/options for all Keymile boards */ #include "keymile-common.h" +#define CONFIG_SYS_TEXT_BASE 0x04000000/* code address after reloc */ #define CONFIG_ENV_SIZE (128 << 10)/* NAND chip block size */ #define CONFIG_SYS_MEMTEST_START 0x00400000/* 4M */ #define CONFIG_SYS_MEMTEST_END 0x007fffff/*(_8M -1) */
include/configs/mgcoge2un.h +4 -2
@@ -44,12 +44,14 @@#define CONFIG_HOSTNAME mgcoge2un +#define KM_IVM_BUS "pca9547:70:9"/* I2C2 (Mux-Port 1)*/ +#define KM_ENV_BUS "pca9547:70:d"/* I2C2 (Mux-Port 5)*/ +/* * Default environment variables */ #define CONFIG_EXTRA_ENV_SETTINGS \ CONFIG_KM_DEF_ENV \ - "memsize=0x8000000\0" \ "newenv=setenv addr 0x100000 && " \ "i2c dev 1; mw.b ${addr} 0 4 && " \ "eeprom write " xstr(CONFIG_SYS_DEF_EEPROM_ADDR) \
@@ -57,7 +59,7 @@ "eeprom write " xstr(CONFIG_SYS_DEF_EEPROM_ADDR) \ " ${addr} " xstr(CONFIG_ENV_OFFSET_REDUND) " 4\0" \"rootpath=/opt/eldk/arm\0" \ -"EEprom_ivm=pca9547:70:9\0" \ +"EEprom_ivm=" KM_IVM_BUS "\0" \ ""#endif /* _CONFIG_MGCOGE2UN_H */
include/configs/suen3.h +4 -2
@@ -43,12 +43,14 @@#define CONFIG_HOSTNAME suen3 +#define KM_IVM_BUS "pca9544a:70:9"/* I2C2 (Mux-Port 1)*/ +#define KM_ENV_BUS "pca9544a:70:d"/* I2C2 (Mux-Port 5)*/ +/* * Default environment variables */ #define CONFIG_EXTRA_ENV_SETTINGS \ CONFIG_KM_DEF_ENV \ - "memsize=0x8000000\0" \ "newenv=setenv addr 0x100000 && " \ "i2c dev 1; mw.b ${addr} 0 4 && " \ "eeprom write " xstr(CONFIG_SYS_DEF_EEPROM_ADDR) \
@@ -56,7 +58,7 @@ "eeprom write " xstr(CONFIG_SYS_DEF_EEPROM_ADDR) \ " ${addr} " xstr(CONFIG_ENV_OFFSET_REDUND) " 4\0" \"rootpath=/opt/eldk/arm\0" \ -"EEprom_ivm=pca9544a:70:9\0" \ +"EEprom_ivm=" KM_IVM_BUS "\0" \ ""#endif /* _CONFIG_SUEN3_H */
include/configs/suen8.h +4 -2
@@ -44,12 +44,14 @@#define CONFIG_HOSTNAME suen8 +#define KM_IVM_BUS "pca9544a:70:9"/* I2C2 (Mux-Port 1)*/ +#define KM_ENV_BUS "pca9544a:70:d"/* I2C2 (Mux-Port 5)*/ +/* * Default environment variables */ #define CONFIG_EXTRA_ENV_SETTINGS \ CONFIG_KM_DEF_ENV \ - "memsize=0x8000000\0" \ "newenv=setenv addr 0x100000 && " \ "i2c dev 1; mw.b ${addr} 0 4 && " \ "eeprom write " xstr(CONFIG_SYS_DEF_EEPROM_ADDR) \
@@ -57,7 +59,7 @@ "eeprom write " xstr(CONFIG_SYS_DEF_EEPROM_ADDR) \ " ${addr} " xstr(CONFIG_ENV_OFFSET_REDUND) " 4\0" \"rootpath=/opt/eldk/arm\0" \ -"EEprom_ivm=pca9544a:70:9\0" \ +"EEprom_ivm=" KM_IVM_BUS "\0" \ ""#endif /* _CONFIG_SUEN8_H */
Signature · 1 line
1.7.4
PATCH v3 19/23 keymile boards: add CONFIG_PIGGY_MAC_ADRESS_OFFSET
In reply to Heiko SchocherNormaly the PIGGY_MAC_ADRESS can be read directly from the IVM on keymile boards. On mgcoge3 it differs. Because there are two piggy boards deployed the second MAC adress must be calculated with the IVM mac adress and an offset. This patch allows to set such a offset in the board config.
---
Changes for v2:
- fix checkpatch.pl errors and warnings
changes for v3
- rebased
- use %pM in sprintf for mac address handling
as Wolfgang Denk suggested.
board/keymile/common/common.c | 13 +++++++++++++ board/keymile/common/common.h | 4 ++++ 2 files changed, 17 insertions(+), 0 deletions(-)
board/keymile/common/common.c +13 -0
@@ -228,8 +228,21 @@ static int ivm_analyze_block2(unsigned char *buf, int len)/* IVM_MacAddress */ sprintf ((char *)valbuf,"%pM" , buf);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); + } +#endif if (getenv ("ethaddr" ) ==NULL )setenv ((char *)"ethaddr" , (char *)valbuf); +/* IVM_MacCount */ count = (buf[10 ] <<24 ) + (buf[11] << 16) +
board/keymile/common/common.h +4 -0
@@ -38,6 +38,10 @@ struct km_bec_fpga {unsigned char pgy_out; }; +#if !defined(CONFIG_PIGGY_MAC_ADRESS_OFFSET ) +#define CONFIG_PIGGY_MAC_ADRESS_OFFSET 0 +#endif +int ethernet_present (void );int ivm_read_eeprom (void );
Signature · 1 line
1.7.4
PATCH v3 20/23 keymile, common: add setting of some environment variables
In reply to Heiko SchocherThis patch adds last_stage_init to all keymile boards. And in the last stage init some environment variables for u-boot were set. Currently these are pnvramaddr, pram and var address.
---
Changes for v2:
- fix checkpatch.pl errors and warnings
Changes for v3:
- rebased only
board/keymile/common/common.c | 38 +++++++++++++++++++++++++++++++++++++- board/keymile/common/common.h | 1 + board/keymile/km83xx/km83xx.c | 6 ++++++ board/keymile/km_arm/km_arm.c | 6 ++++++ board/keymile/mgcoge/mgcoge.c | 6 ++++++ include/configs/keymile-common.h | 3 +++ include/configs/km_arm.h | 7 +++++++ 7 files changed, 66 insertions(+), 1 deletions(-)
board/keymile/common/common.c +37 -1
@@ -42,6 +42,7 @@static void i2c_write_start_seq (void );static int i2c_make_abort (void ); +DECLARE_GLOBAL_DATA_PTR ;int ivm_calc_crc (unsigned char *buf,int len) {
@@ -73,7 +74,42 @@ int ivm_calc_crc(unsigned char *buf, int len)return crc; } -static int ivm_set_value (char *name,char *value) +/* +* Set Keymile specific environment variables +* Currently only some memory layout variables are calculated here +* ... ------------------------------------------------ +* ... |@rootfsaddr |@pnvramaddr |@varaddr |@reserved |@END_OF_RAM +* ... |<------------------- pram ------------------->| +* ... ------------------------------------------------ +* @END_OF_RAM: denotes the RAM size +* @pnvramaddr: Startadress of pseudo non volatile RAM in hex +* @pram : preserved ram size in k +* @varaddr : startadress for /var mounted into RAM +*/ +int set_km_env (void ) +{ +uchar buf[32 ]; +unsigned int pnvramaddr; +unsigned int pram; +unsigned int varaddr; + + pnvramaddr = gd->ram_size -CONFIG_KM_RESERVED_PRAM -CONFIG_KM_PHRAM + -CONFIG_KM_PNVRAM ; +sprintf ((char *)buf,"0x%x" , pnvramaddr); +setenv ("pnvramaddr" , (char *)buf); + + pram = (CONFIG_KM_RESERVED_PRAM +CONFIG_KM_PHRAM +CONFIG_KM_PNVRAM ) / +0x400 ; +sprintf ((char *)buf,"0x%x" , pram); +setenv ("pram" , (char *)buf); + + varaddr = gd->ram_size -CONFIG_KM_RESERVED_PRAM -CONFIG_KM_PHRAM ; +sprintf ((char *)buf,"0x%x" , varaddr); +setenv ("varaddr" , (char *)buf); +return 0 ; +} + +static int ivm_set_value (char *name,char *value) {char tempbuf[256 ];
board/keymile/common/common.h +1 -0
@@ -49,6 +49,7 @@ int ivm_read_eeprom(void);int keymile_hdlc_enet_initialize (bd_t *bis);#endif +int set_km_env (void ); int fdt_set_node_and_value(void *blob, char *nodename, char *regname,
board/keymile/km83xx/km83xx.c +6 -0
@@ -190,6 +190,12 @@ int misc_init_r(void)return 0 ; } +int last_stage_init (void ) +{ +set_km_env (); +return 0 ; +} +int fixed_sdram (void ) {immap_t *im = (immap_t *)CONFIG_SYS_IMMR ;
board/keymile/km_arm/km_arm.c +6 -0
@@ -212,6 +212,12 @@ int board_init(void)return 0 ; } +int last_stage_init (void ) +{ +set_km_env (); +return 0 ; +} +#if defined(CONFIG_CMD_SF )int do_spi_toggle (cmd_tbl_t *cmdtp,int flag,int argc,char *const argv[]) {
board/keymile/mgcoge/mgcoge.c +6 -0
@@ -313,6 +313,12 @@ int board_early_init_r(void)return 0 ; } +int last_stage_init (void ) +{ +set_km_env (); +return 0 ; +} +int hush_init_var (void ) {ivm_read_eeprom ();
include/configs/keymile-common.h +3 -0
@@ -26,6 +26,9 @@/* Do boardspecific init for all boards */ #define CONFIG_BOARD_EARLY_INIT_R +#define CONFIG_LAST_STAGE_INIT + +#define CONFIG_BOOTCOUNT_LIMIT /* * By default kwbimage.cfg from board specific folder is used
include/configs/km_arm.h +7 -0
@@ -254,4 +254,11 @@ int get_scl (void);#define CONFIG_SYS_INIT_SP_ADDR 0xC8012000/* Do early setups now in board_init_f() */ #define CONFIG_BOARD_EARLY_INIT_F + +/* +* resereved pram area at the end of memroy [hex] +* 8Mbytes for switch + 4Kbytes for bootcount +*/ +#define CONFIG_KM_RESERVED_PRAM 0x801000 +#endif /* _CONFIG_KM_ARM_H */
Signature · 1 line
1.7.4
PATCH v3 21/23 ppc, arm: rework and enhance keymile-common.h
In reply to Heiko SchocherFrom: Holger Brunck <[email protected]>
Add:
- introduce "bootrunner" environment variable
This allows to execute consecutive different commands specified in the list "subbootcmd". If one command fails the command serie will stop.
- introduce environment variable "develop", "ramfs" and "release" Each variable is one way to boot our linux. "develop" is for development purpose and boots the SW via NFS. "release" is for booting the linux image from flash, "ramfs" allows to load an SW image via tftp into ram and executes from there
- introduce "addmem" variable, this command adds the used memory for linux to the bootargs
- introduce "addvar" variable, this command adress for the /var directory to the kernel command line
- introduce "setramfspram" and "setrootfsaddr" these calculation were done if "ramfs" was used (only for debugging)
- introduce "tftpramfs" used for "ramfs" to load the image into RAM (only for debugging)
Remove unneeded stuff:
- CONFIG_IO_MUXING is obsolete for keymile boards
- CONFIG_KM_DEF_ENV_PRIVATE is also obsolete
- define CONFIG_SYS_TEXT_BASE in board configs only
---
Changes for v2:
- fix checkpatch.pl errors and warnings
Changes for v3:
- rebased only
include/configs/keymile-common.h | 163 +++++++++++++++++++++++++++++++------ include/configs/km_arm.h | 2 + 2 files changed, 138 insertions(+), 27 deletions(-)
include/configs/keymile-common.h +136 -27
@@ -40,13 +40,6 @@#endif /* CONFIG_SYS_KWD_CONFIG */ /* -* CONFIG_SYS_TEXT_BASE can be defined in board specific header file, if needed -*/ -#ifndef CONFIG_SYS_TEXT_BASE -#define CONFIG_SYS_TEXT_BASE 0x00400000 -#endif /* CONFIG_SYS_TEXT_BASE */ - -/* * Command line configuration. */ #include <config_cmd_default.h>
@@ -144,28 +137,16 @@#define CONFIG_MTD_DEVICE #define CONFIG_MTD_CONCAT -/* define this to use the keymile's io muxing feature */ -/*#define CONFIG_IO_MUXING */ - -#ifdef CONFIG_IO_MUXING -#define CONFIG_KM_DEF_ENV_IOMUX \ - "nc=setenv ethact HDLC \0" \ - "nce=setenv ethact SCC \0" \ - "stderr=serial,nc \0" \ - "stdin=serial,nc \0" \ - "stdout=serial,nc \0" \ - "tftpsrcp=69 \0" \ - "tftpdstp=69 \0" -#else #define CONFIG_KM_DEF_ENV_IOMUX \ "stderr=serial \0" \ "stdin=serial \0" \ "stdout=serial \0" -#endif -#ifndef CONFIG_KM_DEF_ENV_PRIVATE -#define CONFIG_KM_DEF_ENV_PRIVATE \ - "kmprivate=empty\0" +/* common powerpc specific env settings */ +#ifndef CONFIG_KM_DEF_ENV_BOOTPARAMS +#define CONFIG_KM_DEF_ENV_BOOTPARAMS \ + "bootparams=empty\0" \ + "initial_boot_bank=0\0"#endif #ifndef CONFIG_KM_DEF_NETDEV
@@ -184,17 +165,116 @@#define str (s) #s/* +* bootrunner +* - run all commands in 'subbootcmds' +* - on error, stop running the remaing commands +*/ +#define CONFIG_KM_DEF_ENV_BOOTRUNNER \ + "bootrunner=" \ + "break=0; " \ + "for subbootcmd in ${subbootcmds}; do " \ + "if test ${break} -eq 0; then; " \ + "echo \"[INFO] running \\c\"; " \ + "print ${subbootcmd}; " \ + "run ${subbootcmd} || break=1; " \ + "if test ${break} -eq 1; then; " \ + "echo \"[ERR] failed \\c\"; " \ + "print ${subbootcmd}; " \ + "fi; " \ + "fi; " \ + "done\0" \ + "" + +/* +* boottargets +* - set 'subbootcmds' for the bootrunner +* - set 'bootcmd' and 'altbootcmd' +* available targets: +* - 'release': for a standalone system kernel/rootfs from flash +* - 'develop': for development kernel(tftp)/rootfs(NFS) +* - 'ramfs': rootfilesystem in RAM kernel(tftp)/rootfs(RAM) +* +* - 'commonargs': bootargs common to all targets +*/ +#define CONFIG_KM_DEF_ENV_BOOTTARGETS \ + "commonargs=" \ + "addip " \ + "addtty " \ + "addmem " \ + "addinit " \ + "addvar " \ + "addmtdparts " \ + "addbootcount " \ + "\0" \ + "develop=" \ + "setenv subbootcmds \"" \ + "tftpfdt tftpkernel " \ + "nfsargs ${commonargs} " \ + "printbootargs boot " \ + "\" && " \ + "setenv bootcmd \'" \ + "run bootrunner" \ + "\' && " \ + "setenv altbootcmd \'" \ + "run bootcmd" \ + "\' && " \ + "run setboardid && " \ + "saveenv && " \ + "reset\0" \ + "ramfs=" \ + "setenv actual_bank -1 && " \ + "setenv subbootcmds \"" \ + "tftpfdt tftpkernel " \ + "setrootfsaddr tftpramfs " \ + "flashargs ${commonargs} " \ + "addpanic addramfs " \ + "printbootargs boot " \ + "\" && " \ + "setenv bootcmd \'" \ + "run bootrunner" \ + "\' && " \ + "setenv altbootcmd \'" \ + "run bootcmd" \ + "\' && " \ + "run setboardid && " \ + "run setramfspram && " \ + "saveenv && " \ + "reset\0" \ + "release=" \ + "setenv actual_bank ${initial_boot_bank} && " \ + "setenv subbootcmds \"" \ + "checkboardid " \ + "ubiattach ubicopy " \ + "cramfsloadfdt cramfsloadkernel " \ + "flashargs ${commonargs} " \ + "addpanic " \ + "printbootargs boot " \ + "\" && " \ + "setenv bootcmd \'" \ + "run bootrunner; reset" \ + "\' && " \ + "setenv altbootcmd \'" \ + "run actual0 bootcmd; reset" \ + "\' && " \ + "saveenv && " \ + "reset\0" \ + "" + +/* * bootargs * - modify 'bootargs' * * - 'addip': add ip configuration +* - 'addmem': limit kernel memory mem= * - 'addpanic': add kernel panic options * - 'addramfs': add phram device for the rootfilesysten in ram * - 'addtty': add console=... +* - 'addvar': add phram device for /var * - 'nfsargs': default arguments for nfs boot * - 'flashargs': defaults arguments for flash base boot * * processor specific settings +* - 'addbootcount': add boot counter * - 'addmtdparts': add mtd partition information */ #define CONFIG_KM_DEF_ENV_BOOTARGS \
@@ -204,6 +284,8 @@"setenv bootargs ${bootargs} " \"ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}" \":${hostname}:${netdev}:off\0" \ +"addmem=" \ +"setenv bootargs ${bootargs} mem=0x${pnvramaddr}\0" \"addpanic=" \"setenv bootargs ${bootargs} " \"panic=1 panic_on_oops=1\0" \
@@ -214,6 +296,9 @@"addtty=" \"setenv bootargs ${bootargs}" \" console=" CONFIG_KM_CONSOLE_TTY ",${baudrate}\0" \ +"addvar=" \ +"setenv bootargs ${bootargs} phram.phram=phvar," \ + "${varaddr},0x" xstr(CONFIG_KM_PHRAM) "\0" \"nfsargs=" \"setenv bootargs " \"ubi.mtd=" CONFIG_KM_UBI_LINUX_MTD_NAME " " \
@@ -226,6 +311,14 @@"rootfstype=squashfs ro\0" \"" +/* +* compute_addr +* - compute addresses and sizes +* - addresses are calculated form the end of memory 'memsize' +* +* - 'setramfspram': compute PRAM size for ramfs target +* - 'setrootfsaddr': compute rootfilesystem address for phram +*/ #define CONFIG_KM_DEF_ENV_COMPUTE_ADDR \"setboardid=" \"if test \"x${boardId}\" = \"x\"; then; " \
@@ -233,7 +326,15 @@"setenv hwKey ${IVM_HWKey}; " \"else; " \"echo \\\\c; " \ -"fi\0" +"fi\0" \ +"setramfspram=" \ +"setexpr value ${rootfssize} / 0x400 && " \ +"setexpr value 0x${value} + ${pram} && " \ +"setenv pram 0x${value}\0" \ +"setrootfsaddr=" \ +"setexpr value ${pnvramaddr} - ${rootfssize} && " \ +"setenv rootfsaddr 0x${value}\0" \ +"" /* * flash_boot
@@ -264,6 +365,7 @@* - commands for booting over the network * * - 'tftpkernel': load a kernel with tftp into ram +* - 'tftpramfs': load rootfs with tftp into ram * * processor specific settings * - 'tftpfdt': load fdt with tftp into ram
@@ -271,7 +373,11 @@#define CONFIG_KM_DEF_ENV_NET_BOOT \ "tftpkernel=" \ "tftpboot ${kernel_addr_r} ${kernel_file} && " \ - "setenv actual_kernel_addr ${kernel_addr_r} \0" + "setenv actual_kernel_addr ${kernel_addr_r}\0" \ + "tftpramfs=" \ + "tftpboot ${rootfsaddr} \"\\\"${rootfsfile}\\\"\" && " \ + "setenv loadaddr\0" \ + ""/* * constants
@@ -294,14 +400,17 @@#ifndef CONFIG_KM_DEF_ENV #define CONFIG_KM_DEF_ENV \ + CONFIG_KM_DEF_ENV_BOOTPARAMS \ CONFIG_KM_DEF_ENV_IOMUX \ - CONFIG_KM_DEF_ENV_PRIVATE \ CONFIG_KM_DEF_NETDEV \ CONFIG_KM_DEF_ENV_CPU \ + CONFIG_KM_DEF_ENV_BOOTRUNNER \ + CONFIG_KM_DEF_ENV_BOOTTARGETS \ CONFIG_KM_DEF_ENV_BOOTARGS \ CONFIG_KM_DEF_ENV_COMPUTE_ADDR \ CONFIG_KM_DEF_ENV_FLASH_BOOT \ CONFIG_KM_DEF_ENV_NET_BOOT \ + CONFIG_KM_DEF_ENV_CONSTANTS \ "altbootcmd=run bootcmd\0" \ "bootcmd=run default\0" \ "bootlimit=2\0" \
include/configs/km_arm.h +2 -0
@@ -260,5 +260,7 @@ int get_scl (void);* 8Mbytes for switch + 4Kbytes for bootcount */ #define CONFIG_KM_RESERVED_PRAM 0x801000 +/* address for the bootcount (taken from end of RAM) */ +#define BOOTCOUNT_ADDR (CONFIG_KM_RESERVED_PRAM)#endif /* _CONFIG_KM_ARM_H */
Signature · 1 line
1.7.4
PATCH v3 22/23 keymile boards: support of boardId / hwkey lists
In reply to Heiko SchocherFrom: Thomas Herzmann <[email protected]>
In order to support boardId / hwkey lists, the u-boot default environment has been updated: Added a script checkboardidlist which checks the list of boardId / hwkey if the boadrId / hwkey of the IVM is included in that list. This feature is used if you got different HW variants but you only want to create one boot package. E.g. supx5 board series.
---
Changes for v2:
- nothing
Changes for v3:
- rebased only
include/configs/keymile-common.h | 29 ++++++++++++++++++++++++++++- 1 files changed, 28 insertions(+), 1 deletions(-)
include/configs/keymile-common.h +28 -1
@@ -243,6 +243,7 @@"release=" \"setenv actual_bank ${initial_boot_bank} && " \"setenv subbootcmds \"" \ +"checkboardidlist " \"checkboardid " \"ubiattach ubicopy " \"cramfsloadfdt cramfsloadkernel " \
@@ -392,8 +393,34 @@"default=" \"setenv default 'run newenv; reset' && " \"run release && saveenv; reset\0" \ +"checkboardidlist=" \ +"if test \"x${boardIdListHex}\" != \"x\"; then " \ +"IVMbidhwk=${IVM_BoardId}_${IVM_HWKey}; " \ +"found=0; " \ +"for bidhwk in \"${boardIdListHex}\"; do " \ +"echo trying $bidhwk ...; " \ +"if test \"x$bidhwk\" = \"x$IVMbidhwk\"; then " \ +"found=1; " \ +"echo match found for $bidhwk; " \ +"if test \"x$bidhwk\" != \"x${boardId}_${hwKey}\";then " \ +"setenv boardid ${IVM_BoardId}; " \ +"setenv boardId ${IVM_BoardId}; " \ +"setenv hwkey ${IVM_HWKey}; " \ +"setenv hwKey ${IVM_HWKey}; " \ +"echo \"boardId set to ${boardId}\"; " \ +"echo \"hwKey set to ${hwKey}\"; " \ +"saveenv; " \ +"fi; " \ +"fi; " \ +"done; " \ +"else " \ +"echo \"boardIdListHex not set, not checked\"; " \ +"found=1; " \ +"fi; " \ +"test \"$found\" = 1 \0" \"checkboardid=" \ -"test \"x${boardId}\" = \"x${IVM_BoardId}\"\0" \ +"test \"x${boardId}\" = \"x${IVM_BoardId}\" && " \ +"test \"x${hwKey}\" = \"x${IVM_HWKey}\"\0" \"printbootargs=print bootargs\0" \ "rootfsfile="xstr(CONFIG_HOSTNAME) "/rootfsImage\0" \""
Signature · 1 line
1.7.4
PATCH v3 23/23 keymile-common.h: remove IO mux stuff
In reply to Heiko SchocherFrom: Holger Brunck <[email protected]>
---
Changes for v2:
- fix checkpatch.pl errors and warnings
Changes for v3:
- rebased only
include/configs/keymile-common.h | 9 +++------ 1 files changed, 3 insertions(+), 6 deletions(-)
include/configs/keymile-common.h +3 -6
@@ -137,11 +137,6 @@#define CONFIG_MTD_DEVICE #define CONFIG_MTD_CONCAT -#define CONFIG_KM_DEF_ENV_IOMUX \ - "stderr=serial \0" \ - "stdin=serial \0" \ - "stdout=serial \0" -/* common powerpc specific env settings */ #ifndef CONFIG_KM_DEF_ENV_BOOTPARAMS #define CONFIG_KM_DEF_ENV_BOOTPARAMS \
@@ -428,7 +423,6 @@#ifndef CONFIG_KM_DEF_ENV #define CONFIG_KM_DEF_ENV \ CONFIG_KM_DEF_ENV_BOOTPARAMS \ - CONFIG_KM_DEF_ENV_IOMUX \ CONFIG_KM_DEF_NETDEV \ CONFIG_KM_DEF_ENV_CPU \ CONFIG_KM_DEF_ENV_BOOTRUNNER \
@@ -448,6 +442,9 @@"load=tftpboot ${u-boot_addr_r} ${u-boot}\0" \"mtdids=" MTDIDS_DEFAULT "\0" \"mtdparts=" MTDPARTS_DEFAULT "\0" \ +"stderr=serial\0" \ +"stdin=serial\0" \ +"stdout=serial\0" \ "u-boot="xstr(CONFIG_HOSTNAME) "/u-boot.bin\0" \ "u-boot_addr_r="xstr(CONFIG_KM_KERNEL_ADDR) "\0" \""
Signature · 1 line
1.7.4
v3 cover keymile board update
In reply to Heiko SchocherQuoted 13 lines
-----Original Message-----
From: u-boot-bounces at lists.denx.de [mailto:u-boot-bounces at lists.denx.de] On Behalf Of Heiko Schocher
Sent: Monday, March 21, 2011 12:32 PM
To: u-boot at lists.denx.de
Cc: Heiko Schocher
Subject: [U-Boot] [PATCH v3 00/23] keymile board updateThe following patchset updates the support for the keymile boards.
Quoted 6 lines
- fix a lot of Codingstyle issues for this boards
- heavy rework of the headerfiles, common board code
- add support for 4 new mpc83xx based boards
- add support for 1 82xx based board
- add support for 2 new kirkwood based boards
- fix i2c deblocking for this boards
Hi Heiko
Ideally this patch series should go all together, right?
Since there are multiple SoC based support in the same patch series, who is suppose to pull this?
I suggest to have smaller patche series i.e. board wise.
Since there is heavy rework,
Also take a look at mv-common.h that we have created for armada100 and Kirkwood common boards configs. With this we had an abstraction where mostly files are only added to any new board support.
Regards..
Prafulla . .
Quoted 87 lines
Heiko Schocher (16):
powerpc, mpc83xx: add missing functions tompc83xx.h
keymile: Fix Coding style issues for keymile boards.
mpc832x: add support for the mpc8321 based suvd3 board
mpc832x: add support for mpc8321 based tuxa1 board
mpc832x: add support for mpc8321 based tuda1 board
arm: add support for kirkwood based mgcoge2un board
arm: add support of Kirkwood based board SUEN8
ppc: add support for ppc based board mgcoge2ne powerpc, 83xx: add kmsupx5 board support
km-arm: i2c support for suenx based boards
km_arm: change some register values for SDRAM initialization ppc, 8321: cleanup tuxa1, tuda1 and suvd3 support keymile, common; fix i2c deblocking support
arm, keymile: updates for the arm based boards from keymile keymile boards: addCONFIG_PIGGY_MAC_ADRESS_OFFSETkeymile, common: add setting of some environment variablesHolger Brunck (5):
arm, keymile: renameMACH_SUEN3toMACH_KM_KIRKWOODppc, arm: adapt keymile header
arm, ppc: rework environment variables for keymile boards ppc, arm: rework and enhancekeymile-common.hkeymile-common.h: remove IO mux stuffThomas Herzmann (1):
keymile boards: support of boardId / hwkey listsThomas Reufer (1):
keymile, 8321 boards: move common definitions tokm8321-common.hMAINTAINERS | 7 + arch/powerpc/cpu/mpc83xx/fdt.c | 3 +- arch/powerpc/lib/bootcount.c | 2 +- board/keymile/common/common.c | 496 ++++++++++++++++----- ------- board/keymile/common/common.h | 44 +++- board/keymile/{kmeter1 => km83xx}/Makefile | 0 board/keymile/km83xx/km83xx.c | 288 ++++++++++++++++ board/keymile/km_arm/km_arm.c | 91 ++++-- board/keymile/km_arm/kwbimage.cfg | 32 +- board/keymile/kmeter1/kmeter1.c | 217 ------------ board/keymile/mgcoge/mgcoge.c | 93 +++--- boards.cfg | 9 +- include/configs/keymile-common.h | 489 +++++++++++++++++++-- ------- include/configs/km-powerpc.h | 92 +++++ include/configs/km82xx-common.h | 336 +++++++++++++++++++ include/configs/km8321-common.h | 138 ++++++++ include/configs/km83xx-common.h | 325 ++++++++++++++++++ include/configs/km_arm.h | 104 +++++- include/configs/kmeter1.h | 369 +++------------------ - include/configs/kmsupx5.h | 91 +++++ include/configs/mgcoge.h | 307 +----------------- include/configs/mgcoge2ne.h | 64 ++++ include/configs/mgcoge2un.h | 65 ++++ include/configs/suen3.h | 45 +--- include/configs/suen8.h | 65 ++++ include/configs/suvd3.h | 104 ++++++ include/configs/tuda1.h | 141 ++++++++ include/configs/tuxa1.h | 124 +++++++ include/mpc83xx.h | 6 + 29 files changed, 2794 insertions(+), 1353 deletions(-) rename board/keymile/{kmeter1 => km83xx}/Makefile (100%) create mode 100644 board/keymile/km83xx/km83xx.c delete mode 100644 board/keymile/kmeter1/kmeter1.c create mode 100644 include/configs/km-powerpc.h create mode 100644 include/configs/km82xx-common.h create mode 100644 include/configs/km8321-common.h create mode 100644 include/configs/km83xx-common.h create mode 100644 include/configs/kmsupx5.h create mode 100644 include/configs/mgcoge2ne.h create mode 100644 include/configs/mgcoge2un.h create mode 100644 include/configs/suen8.h create mode 100644 include/configs/suvd3.h create mode 100644 include/configs/tuda1.h create mode 100644 include/configs/tuxa1.h--
1.7.4_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot
v3 cover keymile board update
Hello Prafulla,
Quoted 19 lines · Prafulla Wadaskar
Quoted 12 lines
-----Original Message-----
From: u-boot-bounces at lists.denx.de [mailto:u-boot-bounces at lists.denx.de] On Behalf Of Heiko Schocher
Sent: Monday, March 21, 2011 12:32 PM
To: u-boot at lists.denx.de
Cc: Heiko Schocher
Subject: [U-Boot] [PATCH v3 00/23] keymile board updateThe following patchset updates the support for the keymile boards.
Quoted 6 lines
- fix a lot of Codingstyle issues for this boards
- heavy rework of the headerfiles, common board code
- add support for 4 new mpc83xx based boards
- add support for 1 82xx based board
- add support for 2 new kirkwood based boards
- fix i2c deblocking for this boards
Quoted 2 lines
Hi Heiko
Ideally this patch series should go all together, right?
Yep.
Quoted 1 line
Since there are multiple SoC based support in the same patch series, who is suppose to pull this?
I think, that Wolfgang can pull this, if every custodian Acks the appropriate patches.
Quoted 1 line
I suggest to have smaller patche series i.e. board wise.
Yep, normally I aggree, but boards from this manufacturer use common headerfiles (we actually try to simplify), so this got such a big package ... sorry.
Quoted 2 lines
Since there is heavy rework,
Also take a look atmv-common.hthat we have created for armada100 and Kirkwood common boards configs. With this we had an abstraction where mostly files are only added to any new board support.
Ok, I look in it, maybe we can use them to simplify the config files for the kirkwood based boards.
Thanks!
bye,
Heiko
Signature · 2 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
v3 cover keymile board update
Hello Prafulla,
Quoted 9 lines · Heiko Schocher
Quoted 2 lines · Prafulla Wadaskar
Since there is heavy rework,
Also take a look atmv-common.hthat we have created for armada100 and Kirkwood common boards configs. With this we had an abstraction where mostly files are only added to any new board support.Ok, I look in it, maybe we can use them to simplify the config files for the kirkwood based boards.
thanks for the proposal. I had a look at mv-common.h and yes there are many config options which would be ok for us. But there are many which are not suited for us e.g.:CONFIG_SYS_MAXARGS (we got 32)CONFIG_CONS_INDEX (we have one board in the queue were the serial console is on UART1)CONFIG_SYS_PROMPT
others are in keymile-common.h because they are valid also for our powerpc boards e.g.:CONFIG_SYS_LONGHELPCONFIG_AUTO_COMPLETE
So I don't think that this header would help us to simplify our code.
Best regards
Holger Brunck
v3 cover keymile board update
Le 22/03/2011 09:30, Holger Brunck a ?crit :
Quoted 7 lines
thanks for the proposal. I had a look at
mv-common.hand yes there are many config options which would be ok for us. But there are many which are not suited for us e.g.:CONFIG_SYS_MAXARGS(we got 32)CONFIG_CONS_INDEX(we have one board in the queue were the serial console is on UART1)CONFIG_SYS_PROMPT
You can override these after you include the common file.
Amicalement,
Signature · 1 line
Albert.
v4 cover keymile board update
In reply to Heiko SchocherThe following patchset updates the support for the keymile boards.
- fix a lot of Codingstyle issues for this boards
- heavy rework of the headerfiles, common board code
- add support for 4 new mpc83xx based boards
- add support for 1 82xx based board
- add support for 2 new kirkwood based boards
- fix i2c deblocking for this boards
Heiko Schocher (16):
powerpc, mpc83xx: add missing functions to include/common.h
keymile: Fix Coding style issues for keymile boards.
mpc832x: add support for the mpc8321 based suvd3 board
mpc832x: add support for mpc8321 based tuxa1 board
mpc832x: add support for mpc8321 based tuda1 board
arm: add support for kirkwood based mgcoge2un board
arm: add support of Kirkwood based board SUEN8
ppc: add support for ppc based board mgcoge2ne powerpc, 83xx: add kmsupx5 board support
km-arm: i2c support for suenx based boards
km_arm: change some register values for SDRAM initialization ppc, 8321: cleanup tuxa1, tuda1 and suvd3 support keymile, common; fix i2c deblocking support
arm, keymile: updates for the arm based boards from keymile keymile boards: add CONFIG_PIGGY_MAC_ADRESS_OFFSET keymile, common: add setting of some environment variables
Holger Brunck (5):
arm, keymile: rename MACH_SUEN3 to MACH_KM_KIRKWOOD ppc, arm: adapt keymile header
arm, ppc: rework environment variables for keymile boards ppc, arm: rework and enhance keymile-common.h keymile-common.h: remove IO mux stuff
Thomas Herzmann (1):
keymile boards: support of boardId / hwkey lists
Thomas Reufer (1):
keymile, 8321 boards: move common definitions to km8321-common.h
MAINTAINERS | 7 +
arch/powerpc/cpu/mpc83xx/fdt.c | 3 +-
arch/powerpc/lib/bootcount.c | 2 +-
board/keymile/common/common.c | 496 ++++++++++++++++------------
board/keymile/common/common.h | 45 +++-
board/keymile/{kmeter1 => km83xx}/Makefile | 0
board/keymile/km83xx/km83xx.c | 288 ++++++++++++++++
board/keymile/km_arm/km_arm.c | 91 ++++--
board/keymile/km_arm/kwbimage.cfg | 32 +-
board/keymile/kmeter1/kmeter1.c | 217 ------------
board/keymile/mgcoge/mgcoge.c | 93 +++---
boards.cfg | 9 +-
include/common.h | 5 +
include/configs/keymile-common.h | 489 +++++++++++++++++++---------
include/configs/km-powerpc.h | 92 +++++
include/configs/km82xx-common.h | 336 +++++++++++++++++++
include/configs/km8321-common.h | 137 ++++++++
include/configs/km83xx-common.h | 325 ++++++++++++++++++
include/configs/km_arm.h | 104 +++++-
include/configs/kmeter1.h | 368 ++-------------------
include/configs/kmsupx5.h | 91 +++++
include/configs/mgcoge.h | 307 +-----------------
include/configs/mgcoge2ne.h | 64 ++++
include/configs/mgcoge2un.h | 65 ++++
include/configs/suen3.h | 45 +---
include/configs/suen8.h | 65 ++++
include/configs/suvd3.h | 104 ++++++
include/configs/tuda1.h | 141 ++++++++
include/configs/tuxa1.h | 124 +++++++
29 files changed, 2792 insertions(+), 1353 deletions(-)
rename board/keymile/{kmeter1 => km83xx}/Makefile (100%)
create mode 100644 board/keymile/km83xx/km83xx.c
delete mode 100644 board/keymile/kmeter1/kmeter1.c
create mode 100644 include/configs/km-powerpc.h
create mode 100644 include/configs/km82xx-common.h
create mode 100644 include/configs/km8321-common.h
create mode 100644 include/configs/km83xx-common.h
create mode 100644 include/configs/kmsupx5.h
create mode 100644 include/configs/mgcoge2ne.h
create mode 100644 include/configs/mgcoge2un.h
create mode 100644 include/configs/suen8.h
create mode 100644 include/configs/suvd3.h
create mode 100644 include/configs/tuda1.h
create mode 100644 include/configs/tuxa1.hSignature · 1 line
1.7.4
PATCH v4 1/23 powerpc, mpc83xx: add missing functions to include/common.h
add following functions to common.h, to prevent extern declarations:
void disable_addr_trans(void);
void enable_addr_trans(void);
void ddr_enable_ecc(unsigned int dram_size);
---
Changes for v3:
- new patch in v3, to avoid externs in keymile code
Changes for v4:
- add the functions in include/common.h not in include/mpc83xx.h as Kim Phillips suggested
include/common.h | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-)
include/common.h +5 -0
@@ -447,6 +447,11 @@ void out16(unsigned int, unsigned short value);#if defined (CONFIG_MPC83xx)void ppcDWload (unsigned int *addr,unsigned int *ret);void ppcDWstore (unsigned int *addr,unsigned int *value); +void disable_addr_trans (void ); +void enable_addr_trans (void ); +#if defined(CONFIG_DDR_ECC ) && !defined(CONFIG_ECC_INIT_VIA_DDRCONTROLLER ) +void ddr_enable_ecc (unsigned int dram_size); +#endif #endif /* $(CPU)/cpu.c */
Signature · 1 line
1.7.4
PATCH v4 1/23 powerpc, mpc83xx: add missing functions to include/common.h
Quoted 7 lines · On Fri, 1 Apr 2011 09:16:13 +0200 Heiko Schocher <[email protected]> wrote:
add following functions to
common.h, to prevent extern declarations:void
disable_addr_trans(void);
voidenable_addr_trans(void);
voidddr_enable_ecc(unsigned int dram_size);
Quoted 7 lines
Signed-off-by Heiko Schocher <[email protected]>cc Kim Phillips <[email protected]>cc Holger Brunck <[email protected]>cc Wolfgang Denk <[email protected]>cc Detlev Zundel <[email protected]>cc Valentin Longchamp <[email protected]>---
Kim
PATCH v4 1/23 powerpc, mpc83xx: add missing functions to include/common.h
Hi Kim,
Le 02/04/2011 00:31, Kim Phillips a ?crit :
Quoted 18 lines
Quoted 7 lines · On Fri, 1 Apr 2011 09:16:13 +0200 Heiko Schocher<[email protected]> wrote:
add following functions to
common.h, to prevent
extern declarations:void
disable_addr_trans(void);
voidenable_addr_trans(void);
voidddr_enable_ecc(unsigned int dram_size);Quoted 7 lines
Signed-off-by Heiko Schocher<[email protected]>cc Kim Phillips<[email protected]>cc Holger Brunck<[email protected]>cc Wolfgang Denk<[email protected]>cc Detlev Zundel<[email protected]>cc Valentin Longchamp<[email protected]>---
Quoted 1 line
Signed-off-by Kim Phillips<[email protected]>
Do you mean Acked-by?
Amicalement,
Signature · 1 line
Albert.
PATCH v4 1/23 powerpc, mpc83xx: add missing functions to include/common.h
Quoted 19 lines · On Sat, 2 Apr 2011 15:04:00 +0200 Albert ARIBAUD <[email protected]> wrote:
Le 02/04/2011 00:31, Kim Phillips a ?crit :
Quoted 18 lines
Quoted 14 lines · On Fri, 1 Apr 2011 09:16:13 +0200 Heiko Schocher<[email protected]> wrote:
add following functions to
common.h, to prevent
extern declarations:void
disable_addr_trans(void);
voidenable_addr_trans(void);
voidddr_enable_ecc(unsigned int dram_size);Signed-off-by Heiko Schocher<[email protected]>cc Kim Phillips<[email protected]>cc Holger Brunck<[email protected]>cc Wolfgang Denk<[email protected]>cc Detlev Zundel<[email protected]>cc Valentin Longchamp<[email protected]>---
Quoted 3 lines
Quoted 1 line
Signed-off-by Kim Phillips<[email protected]>Do you mean Acked-by?
sure.
Kim
PATCH v4 2/23 arm, keymile: rename MACH_SUEN3 to MACH_KM_KIRKWOOD
In reply to Heiko SchocherFrom: Holger Brunck <[email protected]>
The MACH_TYPE SUEN3 is now to specific for keymile boards, because other boards similar to suen3 will follow. So the MACH_SUEN3 was renamed to MACH_KM_KIRKWOOD.
---
Changes for v2:
- fix checkpatch.pl errors and warnings
Changes for v3:
- rebased only
board/keymile/common/common.c | 4 ++-- board/keymile/km_arm/km_arm.c | 2 +- include/configs/km_arm.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-)
board/keymile/common/common.c +2 -2
@@ -500,7 +500,7 @@ void i2c_init_board(void)out_8 (&dev->cr, (I2C_CR_MEN ));#else -#if defined(CONFIG_HARD_I2C ) && !defined(CONFIG_MACH_SUEN3 ) +#if defined(CONFIG_HARD_I2C ) && !defined(MACH_TYPE_KM_KIRKWOOD )volatile immap_t *immap = (immap_t *)CONFIG_SYS_IMMR ;volatile i2c8260_t *i2c = (i2c8260_t *)&immap->im_i2c;
@@ -578,7 +578,7 @@ int fdt_get_node_and_value (void *blob, }#endif -#if !defined(CONFIG_MACH_SUEN3 ) +#if !defined(MACH_TYPE_KM_KIRKWOOD )int ethernet_present (void ) {return (in_8 ((u8 *)CONFIG_SYS_PIGGY_BASE +CONFIG_SYS_SLOT_ID_OFF ) &0x80 );
board/keymile/km_arm/km_arm.c +1 -1
@@ -180,7 +180,7 @@ int board_init(void)/* * arch number of board */ - gd->bd->bi_arch_number =MACH_TYPE_SUEN3 ; + gd->bd->bi_arch_number =MACH_TYPE_KM_KIRKWOOD ;/* address of boot parameters */ gd->bd->bi_boot_params =kw_sdram_bar (0 ) +0x100 ;
include/configs/km_arm.h +1 -1
@@ -38,7 +38,7 @@#define CONFIG_FEROCEON_88FR131 /* CPU Core subversion */ #define CONFIG_KIRKWOOD /* SOC Family Name */ #define CONFIG_KW88F6281 /* SOC Name */ -#define CONFIG_MACH_SUEN3 /* Machine type */ +#define CONFIG_MACH_KM_KIRKWOOD /* Machine type */ /* include common defines/options for all Keymile boards */ #include "keymile-common.h"
Signature · 1 line
1.7.4
PATCH v4 3/23 keymile: Fix Coding style issues for keymile boards.
In reply to Heiko Schocher- use I/O accessors
-> For accessing the FPGA therefore a struct km_bec_fpga
is introduced.
- no longer externs needed
- to defines, that only select functions, don;t assign a numeric value
- Codingstyle changes to prevent checkpatch errors/warnings
---
Changes for v3:
- new in this patchset, to prevent a lot of
checkpatch errors/warnings
Changes for v4:
- correct struct km_bec_fpga
board/keymile/common/common.c | 347 ++++++++++++++++++-------------------- board/keymile/common/common.h | 40 ++++- board/keymile/km_arm/km_arm.c | 25 ++-- board/keymile/kmeter1/kmeter1.c | 122 +++++++------- board/keymile/mgcoge/mgcoge.c | 82 +++++----- include/configs/keymile-common.h | 62 ++++---- include/configs/km_arm.h | 8 +- include/configs/kmeter1.h | 104 +++++++----- include/configs/mgcoge.h | 107 +++++++----- 9 files changed, 476 insertions(+), 421 deletions(-)
board/keymile/common/common.c +164 -183
@@ -39,9 +39,7 @@ #if defined(CONFIG_HARD_I2C) || defined(CONFIG_SOFT_I2C) #include <i2c.h> -extern int i2c_soft_read_pin (void); - -int ivm_calc_crc (unsigned char *buf, int len) +int ivm_calc_crc(unsigned char *buf, int len) { const unsigned short crc_tab[16] = { 0x0000, 0xCC01, 0xD801, 0x1400,
@@ -71,20 +69,20 @@ int ivm_calc_crc (unsigned char *buf, int len)return crc; } -static int ivm_set_value (char *name,char *value) +static int ivm_set_value (char *name,char *value) {char tempbuf[256 ];if (value !=NULL ) { -sprintf (tempbuf,"%s=%s" , name, value); -return set_local_var (tempbuf,0 ); +sprintf (tempbuf,"%s=%s" , name, value); +return set_local_var (tempbuf,0 ); }else { -unset_local_var (name); +unset_local_var (name); }return 0 ; } -static int ivm_get_value (unsigned char *buf,int len,char *name,int off, +static int ivm_get_value (unsigned char *buf,int len,char *name,int off,int check) {unsigned short val;
@@ -92,21 +90,21 @@ static int ivm_get_value (unsigned char *buf, int len, char *name, int off,if ((buf[off +0 ] != buf[off +2 ]) && (buf[off +2 ] != buf[off +4 ])) { -printf ("%s Error corrupted %s\n" , __FUNCTION__, name); +printf ("%s Error corrupted %s\n" , __func__, name); val =-1 ; }else { val = buf[off +0 ] + (buf[off +1 ] <<8 );if ((val ==0 ) && (check ==1 )) val =-1 ; } -sprintf ((char *)valbuf,"%x" , val); -ivm_set_value (name, (char *)valbuf); +sprintf ((char *)valbuf,"%x" , val); +ivm_set_value (name, (char *)valbuf);return val; } -#define INVENTORYBLOCKSIZE 0x100 -#define INVENTORYDATAADDRESS 0x21 -#define INVENTORYDATASIZE (INVENTORYBLOCKSIZE - INVENTORYDATAADDRESS - 3) +#define INV_BLOCKSIZE 0x100 +#define INV_DATAADDRESS 0x21 +#define INVENTORYDATASIZE (INV_BLOCKSIZE - INV_DATAADDRESS - 3)#define IVM_POS_SHORT_TEXT 0#define IVM_POS_MANU_ID 1
@@ -121,19 +119,19 @@ static int ivm_get_value (unsigned char *buf, int len, char *name, int off,#define IVM_POS_HISTORY 10#define IVM_POS_SYMBOL_ONLY 11 -static char convert_char (char c) +static char convert_char (char c) {return (c <' ' || c >'~' ) ?'.' : c; } -static int ivm_findinventorystring (int type, +static int ivm_findinventorystring (int type,unsigned char *const string,unsigned long maxlen,unsigned char *buf) {int xcode =0 ;unsigned long cr =0 ; -unsigned long addr =INVENTORYDATAADDRESS ; +unsigned long addr =INV_DATAADDRESS ;unsigned long size =0 ;unsigned long nr = type;int stop =0 ;/* stop on semicolon */
@@ -157,8 +155,10 @@ static int ivm_findinventorystring (int type, addr++; } -/* the expected number of CR was found until the end of the IVM -* content --> fill string */ +/* +* the expected number of CR was found until the end of the IVM +* content --> fill string +*/ if (addr <INVENTORYDATASIZE ) {/* Copy the IVM string in the corresponding string */ for (; (buf[addr] != '\r') &&
@@ -170,64 +170,62 @@ static int ivm_findinventorystring (int type, convert_char (buf[addr])); } -/* copy phase is done: check if everything is ok. If not, +/* +* copy phase is done: check if everything is ok. If not, * the inventory data is most probably corrupted: tell -* the world there is a problem! */ +* the world there is a problem! +*/ if (addr ==INVENTORYDATASIZE ) { xcode =-1 ; -printf ("Error end of string not found\n" ); +printf ("Error end of string not found\n" ); }else if ((size >= (maxlen -1 )) && (buf[addr] !='\r' )) { xcode =-1 ; -printf ("string too long till next CR\n" ); +printf ("string too long till next CR\n" ); } }else { -/* some CR are missing... -* the inventory data is most probably corrupted */ +/* +* some CR are missing... +* the inventory data is most probably corrupted +*/ xcode =-1 ; -printf ("not enough cr found\n" ); +printf ("not enough cr found\n" ); }return xcode; }#define GET_STRING (name, which, len) \ - if (ivm_findinventorystring (which, valbuf, len, buf) == 0) { \ - ivm_set_value (name, (char *)valbuf); \ + if (ivm_findinventorystring(which, valbuf, len, buf) == 0) { \ + ivm_set_value(name, (char *)valbuf); \ } -static int ivm_check_crc (unsigned char *buf,int block) +static int ivm_check_crc (unsigned char *buf,int block) {unsigned long crc;unsigned long crceeprom; - crc =ivm_calc_crc (buf,CONFIG_SYS_IVM_EEPROM_PAGE_LEN -2 ); + crc =ivm_calc_crc (buf,CONFIG_SYS_IVM_EEPROM_PAGE_LEN -2 ); crceeprom = (buf[CONFIG_SYS_IVM_EEPROM_PAGE_LEN -1 ] + \ buf[CONFIG_SYS_IVM_EEPROM_PAGE_LEN -2 ] *256 );if (crc != crceeprom) {if (block ==0 ) -printf ("Error CRC Block: %d EEprom: calculated: \ +printf ("Error CRC Block: %d EEprom: calculated: \ %lx EEprom: %lx\n" , block, crc, crceeprom);return -1 ; }return 0 ; } -static int ivm_analyze_block2 (unsigned char *buf,int len) +static int ivm_analyze_block2 (unsigned char *buf,int len) {unsigned char valbuf[CONFIG_SYS_IVM_EEPROM_PAGE_LEN ];unsigned long count;/* IVM_MacAddress */ -sprintf ((char *)valbuf,"%02X:%02X:%02X:%02X:%02X:%02X" , - buf[1 ], - buf[2 ], - buf[3 ], - buf[4 ], - buf[5 ], - buf[6 ]); -ivm_set_value ("IVM_MacAddress" , (char *)valbuf); -if (getenv ("ethaddr" ) ==NULL ) -setenv ((char *)"ethaddr" , (char *)valbuf); +sprintf ((char *)valbuf,"%pM" , buf); +ivm_set_value ("IVM_MacAddress" , (char *)valbuf); +if (getenv ("ethaddr" ) ==NULL ) +setenv ((char *)"ethaddr" , (char *)valbuf);/* IVM_MacCount */ count = (buf[10 ] <<24 ) + (buf[11] << 16) +
@@ -235,48 +233,52 @@ static int ivm_analyze_block2 (unsigned char *buf, int len) buf[13 ];if (count ==0xffffffff ) count =1 ; -sprintf ((char *)valbuf,"%lx" , count); -ivm_set_value ("IVM_MacCount" , (char *)valbuf); +sprintf ((char *)valbuf,"%lx" , count); +ivm_set_value ("IVM_MacCount" , (char *)valbuf);return 0 ; } -int ivm_analyze_eeprom (unsigned char *buf,int len) +int ivm_analyze_eeprom (unsigned char *buf,int len) {unsigned short val;unsigned char valbuf[CONFIG_SYS_IVM_EEPROM_PAGE_LEN ];unsigned char *tmp; -if (ivm_check_crc (buf,0 ) !=0 ) +if (ivm_check_crc (buf,0 ) !=0 )return -1 ; -ivm_get_value (buf,CONFIG_SYS_IVM_EEPROM_PAGE_LEN ,"IVM_BoardId" ,0 ,1 ); - val =ivm_get_value (buf,CONFIG_SYS_IVM_EEPROM_PAGE_LEN ,"IVM_HWKey" ,6 ,1 ); +ivm_get_value (buf,CONFIG_SYS_IVM_EEPROM_PAGE_LEN , +"IVM_BoardId" ,0 ,1 ); + val =ivm_get_value (buf,CONFIG_SYS_IVM_EEPROM_PAGE_LEN , +"IVM_HWKey" ,6 ,1 );if (val !=0xffff ) { -sprintf ((char *)valbuf,"%x" , ((val /100 ) %10 )); -ivm_set_value ("IVM_HWVariant" , (char *)valbuf); -sprintf ((char *)valbuf,"%x" , (val %100 )); -ivm_set_value ("IVM_HWVersion" , (char *)valbuf); +sprintf ((char *)valbuf,"%x" , ((val /100 ) %10 )); +ivm_set_value ("IVM_HWVariant" , (char *)valbuf); +sprintf ((char *)valbuf,"%x" , (val %100 )); +ivm_set_value ("IVM_HWVersion" , (char *)valbuf); } -ivm_get_value (buf,CONFIG_SYS_IVM_EEPROM_PAGE_LEN ,"IVM_Functions" ,12 ,0 ); +ivm_get_value (buf,CONFIG_SYS_IVM_EEPROM_PAGE_LEN , +"IVM_Functions" ,12 ,0 ); GET_STRING("IVM_Symbol", IVM_POS_SYMBOL_ONLY, 8)GET_STRING ("IVM_DeviceName" ,IVM_POS_SHORT_TEXT ,64 ) tmp = (unsigned char *) getenv("IVM_DeviceName");if (tmp) { -int len =strlen ((char *)tmp); +int len =strlen ((char *)tmp);int i =0 ;while (i < len) {if (tmp[i] ==';' ) { -ivm_set_value ("IVM_ShortText" , (char *)&tmp[i +1 ]); +ivm_set_value ("IVM_ShortText" , + (char *)&tmp[i +1 ]);break ; } i++; }if (i >= len) -ivm_set_value ("IVM_ShortText" ,NULL ); +ivm_set_value ("IVM_ShortText" ,NULL ); }else { -ivm_set_value ("IVM_ShortText" ,NULL ); +ivm_set_value ("IVM_ShortText" ,NULL ); } GET_STRING("IVM_ManufacturerID", IVM_POS_MANU_ID, 32)GET_STRING ("IVM_ManufacturerSerialNumber" ,IVM_POS_MANU_SERIAL ,20 )
@@ -288,14 +290,15 @@ int ivm_analyze_eeprom (unsigned char *buf, int len) GET_STRING("IVM_CustomerID", IVM_POS_CUSTOMER_ID, 32) GET_STRING("IVM_CustomerProductID", IVM_POS_CUSTOMER_PROD_ID, 32) -if (ivm_check_crc (&buf[CONFIG_SYS_IVM_EEPROM_PAGE_LEN *2 ],2 ) !=0 ) +if (ivm_check_crc (&buf[CONFIG_SYS_IVM_EEPROM_PAGE_LEN *2 ],2 ) !=0 )return 0 ; -ivm_analyze_block2 (&buf[CONFIG_SYS_IVM_EEPROM_PAGE_LEN *2 ],CONFIG_SYS_IVM_EEPROM_PAGE_LEN ); +ivm_analyze_block2 (&buf[CONFIG_SYS_IVM_EEPROM_PAGE_LEN *2 ], +CONFIG_SYS_IVM_EEPROM_PAGE_LEN );return 0 ; } -int ivm_read_eeprom (void ) +int ivm_read_eeprom (void ) {#if defined(CONFIG_I2C_MUX )I2C_MUX_DEVICE *dev =NULL ;
@@ -303,33 +306,36 @@ int ivm_read_eeprom (void)uchar i2c_buffer[CONFIG_SYS_IVM_EEPROM_MAX_LEN ];uchar *buf;unsigned dev_addr =CONFIG_SYS_IVM_EEPROM_ADR ; +int ret;#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 ); + dev =i2c_mux_ident_muxstring ((uchar *)CONFIG_SYS_I2C_IVM_BUS );#else - buf = (unsigned char *)getenv ("EEprom_ivm" ); + buf = (unsigned char *)getenv ("EEprom_ivm" );if (buf !=NULL ) - dev =i2c_mux_ident_muxstring (buf); + dev =i2c_mux_ident_muxstring (buf);#endif if (dev ==NULL ) { -printf ("Error couldnt add Bus for IVM\n" ); +printf ("Error couldnt add Bus for IVM\n" );return -1 ; } -i2c_set_bus_num (dev->busid); +i2c_set_bus_num (dev->busid);#endif - buf = (unsigned char *)getenv ("EEprom_ivm_addr" ); + buf = (unsigned char *)getenv ("EEprom_ivm_addr" );if (buf !=NULL ) - dev_addr =simple_strtoul ((char *)buf,NULL ,16 ); + dev_addr =simple_strtoul ((char *)buf,NULL ,16 ); -if (i2c_read (dev_addr,0 ,1 , i2c_buffer,CONFIG_SYS_IVM_EEPROM_MAX_LEN ) !=0 ) { + ret =i2c_read (dev_addr,0 ,1 , i2c_buffer, +CONFIG_SYS_IVM_EEPROM_MAX_LEN ); +if (ret !=0 ) {printf ("Error reading EEprom\n" );return -2 ; } -return ivm_analyze_eeprom (i2c_buffer,CONFIG_SYS_IVM_EEPROM_MAX_LEN ); +return ivm_analyze_eeprom (i2c_buffer,CONFIG_SYS_IVM_EEPROM_MAX_LEN ); }#if defined(CONFIG_SYS_I2C_INIT_BOARD )
@@ -339,145 +345,117 @@ int ivm_read_eeprom (void)#if defined(CONFIG_MGCOGE )#define SDA_MASK 0x00010000#define SCL_MASK 0x00020000 -static void set_pin (int state,unsigned long mask) +static void set_pin (int state,unsigned long mask) { -volatile ioport_t *iop =ioport_addr ((immap_t *)CONFIG_SYS_IMMR ,3 ); +ioport_t *iop =ioport_addr ((immap_t *)CONFIG_SYS_IMMR ,3 );if (state) - iop->pdat |= (mask); +setbits_be32 (&iop->pdat, mask);else - iop->pdat &= ~(mask); +clrbits_be32 (&iop->pdat, mask); - iop->pdir |= (mask); +setbits_be32 (&iop->pdir, mask); } -static int get_pin (unsigned long mask) +static int get_pin (unsigned long mask) { -volatile ioport_t *iop =ioport_addr ((immap_t *)CONFIG_SYS_IMMR ,3 ); +ioport_t *iop =ioport_addr ((immap_t *)CONFIG_SYS_IMMR ,3 ); - iop->pdir &= ~(mask); -return (0 != (iop->pdat & (mask))); +clrbits_be32 (&iop->pdir, mask); +return 0 != (in_be32 (&iop->pdat) & mask); } -static void set_sda (int state) +static void set_sda (int state) { -set_pin (state,SDA_MASK ); +set_pin (state,SDA_MASK ); } -static void set_scl (int state) +static void set_scl (int state) { -set_pin (state,SCL_MASK ); +set_pin (state,SCL_MASK ); } -static int get_sda (void ) +static int get_sda (void ) { -return get_pin (SDA_MASK ); +return get_pin (SDA_MASK ); } -static int get_scl (void ) +static int get_scl (void ) { -return get_pin (SCL_MASK ); +return get_pin (SCL_MASK ); }#if defined(CONFIG_HARD_I2C ) -static void setports (int gpio) +static void setports (int gpio) { -volatile ioport_t *iop =ioport_addr ((immap_t *)CONFIG_SYS_IMMR ,3 ); +ioport_t *iop =ioport_addr ((immap_t *)CONFIG_SYS_IMMR ,3 );if (gpio) { - iop->ppar &= ~(SDA_MASK |SCL_MASK ); - iop->podr &= ~(SDA_MASK |SCL_MASK ); +clrbits_be32 (&iop->ppar, (SDA_MASK |SCL_MASK )); +clrbits_be32 (&iop->podr, (SDA_MASK |SCL_MASK )); }else { - iop->ppar |= (SDA_MASK |SCL_MASK ); - iop->pdir &= ~(SDA_MASK |SCL_MASK ); - iop->podr |= (SDA_MASK |SCL_MASK ); +setbits_be32 (&iop->ppar, (SDA_MASK |SCL_MASK )); +clrbits_be32 (&iop->pdir, (SDA_MASK |SCL_MASK )); +setbits_be32 (&iop->podr, (SDA_MASK |SCL_MASK )); } }#endif #endif -#if defined(CONFIG_KM8XX ) -static void set_sda (int state) -{ -I2C_SDA (state); -} - -static void set_scl (int state) -{ -I2C_SCL (state); -} - -static int get_sda (void ) -{ -return I2C_READ ; -} - -static int get_scl (void ) -{ -int val; - - *(unsigned short *)(I2C_BASE_DIR ) &= ~SCL_CONF ; -udelay (1 ); - val = *(unsigned char *)(I2C_BASE_PORT ); - -return ((val &SCL_BIT ) ==SCL_BIT ); -} -#endif -#if !defined(CONFIG_KMETER1 ) -static void writeStartSeq (void ) +static void writeStartSeq (void ) { -set_sda (1 ); -udelay (DELAY_HALF_PERIOD ); -set_scl (1 ); -udelay (DELAY_HALF_PERIOD ); -set_sda (0 ); -udelay (DELAY_HALF_PERIOD ); -set_scl (0 ); -udelay (DELAY_HALF_PERIOD ); +set_sda (1 ); +udelay (DELAY_HALF_PERIOD ); +set_scl (1 ); +udelay (DELAY_HALF_PERIOD ); +set_sda (0 ); +udelay (DELAY_HALF_PERIOD ); +set_scl (0 ); +udelay (DELAY_HALF_PERIOD ); } -/* I2C is a synchronous protocol and resets of the processor in the middle -of an access can block the I2C Bus until a powerdown of the full unit is -done. This function toggles the SCL until the SCL and SCA line are -released, but max. 16 times, after this a I2C start-sequence is sent. -This I2C Deblocking mechanism was developed by Keymile in association -with Anatech and Atmel in 1998. +/* +* I2C is a synchronous protocol and resets of the processor in the middle +* of an access can block the I2C Bus until a powerdown of the full unit is +* done. This function toggles the SCL until the SCL and SCA line are +* released, but max. 16 times, after this a I2C start-sequence is sent. +* This I2C Deblocking mechanism was developed by Keymile in association +* with Anatech and Atmel in 1998. */ -static int i2c_make_abort (void ) +static int i2c_make_abort (void ) {int scl_state =0 ;int sda_state =0 ;int i =0 ;int ret =0 ; -if (!get_sda ()) { +if (!get_sda ()) { ret =-1 ;while (i <16 ) { i++; -set_scl (0 ); -udelay (DELAY_ABORT_SEQ ); -set_scl (1 ); -udelay (DELAY_ABORT_SEQ ); - scl_state =get_scl (); - sda_state =get_sda (); +set_scl (0 ); +udelay (DELAY_ABORT_SEQ ); +set_scl (1 ); +udelay (DELAY_ABORT_SEQ ); + scl_state =get_scl (); + sda_state =get_sda ();if (scl_state && sda_state) { ret =0 ;break ; } } } -if (ret ==0 ) { -for (i =0 ; i <5 ; i++) { -writeStartSeq (); - } - } -get_sda (); +if (ret ==0 ) +for (i =0 ; i <5 ; i++) +writeStartSeq (); + +get_sda ();return ret; }#endif -/** +/* * i2c_init_board - reset i2c bus. When the board is powercycled during a * bus transfer it might hang; for details see doc/I2C_Edge_Conditions. */
@@ -488,36 +466,37 @@ void i2c_init_board(void) dev = (struct fsl_i2c *) (CONFIG_SYS_IMMR +CONFIG_SYS_I2C_OFFSET );uchar dummy; -out_8 (&dev->cr, (I2C_CR_MSTA )); -out_8 (&dev->cr, (I2C_CR_MEN |I2C_CR_MSTA )); +out_8 (&dev->cr, (I2C_CR_MSTA )); +out_8 (&dev->cr, (I2C_CR_MEN |I2C_CR_MSTA )); dummy =in_8 (&dev->dr); dummy =in_8 (&dev->dr);if (dummy !=0xff ) { dummy =in_8 (&dev->dr); } -out_8 (&dev->cr, (I2C_CR_MEN )); -out_8 (&dev->cr,0x00 ); -out_8 (&dev->cr, (I2C_CR_MEN )); - +out_8 (&dev->cr, (I2C_CR_MEN )); +out_8 (&dev->cr,0x00 ); +out_8 (&dev->cr, (I2C_CR_MEN ));#else #if defined(CONFIG_HARD_I2C ) && !defined(MACH_TYPE_KM_KIRKWOOD ) -volatile immap_t *immap = (immap_t *)CONFIG_SYS_IMMR ; -volatile i2c8260_t *i2c = (i2c8260_t *)&immap->im_i2c; +immap_t *immap = (immap_t *)CONFIG_SYS_IMMR ; +i2c8260_t *i2c = (i2c8260_t *)&immap->im_i2c; -/* disable I2C controller first, otherwhise it thinks we want to */ -/* talk to the slave port... */ - i2c->i2c_i2mod &= ~0x01 ; +/* +* disable I2C controller first, otherwhise it thinks we want to +* talk to the slave port... +*/ +clrbits_8 (&i2c->i2c_i2mod,0x01 );/* Set the PortPins to GPIO */ -setports (1 ); +setports (1 );#endif /* Now run the AbortSequence() */ -i2c_make_abort (); +i2c_make_abort ();#if defined(CONFIG_HARD_I2C )/* Set the PortPins back to use for I2C */ -setports (0 ); +setports (0 );#endif #endif }
@@ -525,7 +504,7 @@ void i2c_init_board(void)#endif #if defined(CONFIG_OF_BOARD_SETUP ) && defined(CONFIG_OF_LIBFDT ) -int fdt_set_node_and_value (void *blob, +int fdt_set_node_and_value(void *blob, char *nodename, char *regname, void *var,
@@ -534,21 +513,22 @@ int fdt_set_node_and_value (void *blob,int ret =0 ;int nodeoffset =0 ; - nodeoffset =fdt_path_offset (blob, nodename); + nodeoffset =fdt_path_offset (blob, nodename);if (nodeoffset >=0 ) { - ret =fdt_setprop (blob, nodeoffset, regname, var, + ret =fdt_setprop (blob, nodeoffset, regname, var, size);if (ret <0 )printf ("ft_blob_update(): cannot set %s/%s " "property err:%s\n" , nodename, regname, -fdt_strerror (ret)); +fdt_strerror (ret)); }else {printf ("ft_blob_update(): cannot find %s node " -"err:%s\n" , nodename,fdt_strerror (nodeoffset)); +"err:%s\n" , nodename,fdt_strerror (nodeoffset)); }return ret; } -int fdt_get_node_and_value (void *blob, + +int fdt_get_node_and_value (void *blob,char *nodename,char *propname,void **var)
@@ -556,42 +536,43 @@ int fdt_get_node_and_value (void *blob,int len;int nodeoffset =0 ; - nodeoffset =fdt_path_offset (blob, nodename); + nodeoffset =fdt_path_offset (blob, nodename);if (nodeoffset >=0 ) { - *var = (void *)fdt_getprop (blob, nodeoffset, propname, &len); + *var = (void *)fdt_getprop (blob, nodeoffset, propname, &len);if (len ==0 ) {/* no value */ -printf ("%s no value\n" , __FUNCTION__); +printf ("%s no value\n" , __func__);return -1 ; }else if (len >0 ) {return len; }else { -printf ("libfdt fdt_getprop(): %s\n" , +printf ("libfdt fdt_getprop(): %s\n" ,fdt_strerror (len));return -2 ; } }else { -printf ("%s: cannot find %s node err:%s\n" , __FUNCTION__, - nodename,fdt_strerror (nodeoffset)); +printf ("%s: cannot find %s node err:%s\n" , __func__, + nodename,fdt_strerror (nodeoffset));return -3 ; } }#endif #if !defined(MACH_TYPE_KM_KIRKWOOD ) -int ethernet_present (void ) +int ethernet_present (void ) { -return (in_8 ((u8 *)CONFIG_SYS_PIGGY_BASE +CONFIG_SYS_SLOT_ID_OFF ) &0x80 ); +struct km_bec_fpga *base = (struct km_bec_fpga *)CONFIG_SYS_PIGGY_BASE ; + +return in_8 (&base->bprth) &PIGGY_PRESENT ; }#endif -int board_eth_init (bd_t *bis) +int board_eth_init (bd_t *bis) {#ifdef CONFIG_KEYMILE_HDLC_ENET - (void )keymile_hdlc_enet_initialize (bis); + (void )keymile_hdlc_enet_initialize (bis);#endif -if (ethernet_present ()) { +if (ethernet_present ())return -1 ; - }return 0 ; }
board/keymile/common/common.h +35 -5
@@ -11,20 +11,50 @@#ifndef __KEYMILE_COMMON_H#define __KEYMILE_COMMON_H -int ethernet_present (void ); -int ivm_read_eeprom (void ); +#define WRG_RESET 0x80 +#define H_OPORTS_14 0x40 +#define WRG_LED 0x02 +#define WRL_BOOT 0x01 + +#define H_OPORTS_SCC4_ENA 0x10 +#define H_OPORTS_SCC4_FD_ENA 0x04 +#define H_OPORTS_FCC1_PW_DWN 0x01 + +#define PIGGY_PRESENT 0x80 + +struct km_bec_fpga { +unsigned char id; +unsigned char rev; +unsigned char oprth; +unsigned char oprtl; +unsigned char res1[3 ]; +unsigned char bprth; +unsigned char bprtl; +unsigned char res2[6 ]; +unsigned char prst; +unsigned char res3[0xfff0 ]; +unsigned char pgy_id; +unsigned char pgy_rev; +unsigned char pgy_outputs; +unsigned char pgy_eth; +}; + +int ethernet_present (void ); +int ivm_read_eeprom (void );#ifdef CONFIG_KEYMILE_HDLC_ENET -int keymile_hdlc_enet_initialize (bd_t *bis); +int keymile_hdlc_enet_initialize (bd_t *bis);#endif -int fdt_set_node_and_value (void *blob, +int fdt_set_node_and_value (void *blob,char *nodename,char *regname,void *var,int size); -int fdt_get_node_and_value (void *blob, +int fdt_get_node_and_value (void *blob,char *nodename,char *propname,void **var); + +int i2c_soft_read_pin (void );#endif /* __KEYMILE_COMMON_H */
board/keymile/km_arm/km_arm.c +12 -13
@@ -42,7 +42,6 @@DECLARE_GLOBAL_DATA_PTR ;static int io_dev; -extern I2C_MUX_DEVICE *i2c_mux_ident_muxstring (uchar *buf);/* Multi-Purpose Pins Functionality configuration */ u32 kwmpp_config[] = {
@@ -111,12 +110,12 @@ int ethernet_present(void)int ret =0 ;if (i2c_read (0x10 ,2 ,1 , &buf,1 ) !=0 ) { -printf ("%s: Error reading Boco\n" , __FUNCTION__); +printf ("%s: Error reading Boco\n" , __func__);return -1 ; } -if ((buf &0x40 ) ==0x40 ) { +if ((buf &0x40 ) ==0x40 ) ret =1 ; - } +return ret; }
@@ -265,15 +264,15 @@ void reset_phy(void) }#if defined(CONFIG_HUSH_INIT_VAR ) -int hush_init_var (void ) +int hush_init_var (void ) { -ivm_read_eeprom (); +ivm_read_eeprom ();return 0 ; }#endif #if defined(CONFIG_BOOTCOUNT_LIMIT ) -void bootcount_store (ulong a) +void bootcount_store (ulong a) {volatile ulong *save_addr;volatile ulong size =0 ;
@@ -286,7 +285,7 @@ void bootcount_store (ulong a)writel (BOOTCOUNT_MAGIC , &save_addr[1 ]); } -ulong bootcount_load (void ) +ulong bootcount_load (void ) {volatile ulong *save_addr;volatile ulong size =0 ;
@@ -303,31 +302,31 @@ ulong bootcount_load (void)#endif #if defined(CONFIG_SOFT_I2C ) -void set_sda (int state) +void set_sda (int state) {I2C_ACTIVE ;I2C_SDA (state); } -void set_scl (int state) +void set_scl (int state) {I2C_SCL (state); } -int get_sda (void ) +int get_sda (void ) {I2C_TRISTATE ;return I2C_READ ; } -int get_scl (void ) +int get_scl (void ) {return (kw_gpio_get_value (SUEN3_SCL_PIN ) ?1 :0 ); }#endif #if defined(CONFIG_SYS_EEPROM_WREN ) -int eeprom_write_enable (unsigned dev_addr,int state) +int eeprom_write_enable (unsigned dev_addr,int state) {kw_gpio_set_value (SUEN3_ENV_WP , !state);
board/keymile/kmeter1/kmeter1.c +64 -58
226 lines not on this page · raw message
board/keymile/mgcoge/mgcoge.c +42 -40
153 lines not on this page · raw message
include/configs/keymile-common.h +31 -31
122 lines not on this page · raw message
include/configs/km_arm.h +7 -1
@@ -6,6 +6,9 @@* (C) Copyright 2009 * Stefan Roese, DENX Software Engineering, sr at denx.de. * +* (C) Copyright 2010-2011 +* Heiko Schocher, DENX Software Engineering, hs at denx.de. +* * See file CREDITS for list of people who contributed to this * project. *
@@ -25,7 +28,10 @@* MA 02110-1301 USA */ -/* for linking errors see http://lists.denx.de/pipermail/u-boot/2009-July/057350.html */ +/* +* for linking errors see +* http://lists.denx.de/pipermail/u-boot/2009-July/057350.html +*/ #ifndef _CONFIG_KM_ARM_H#define _CONFIG_KM_ARM_H
include/configs/kmeter1.h +58 -46
247 lines not on this page · raw message
include/configs/mgcoge.h +63 -44
243 lines not on this page · raw message
Signature · 1 line
1.7.4
PATCH v4 3/23 keymile: Fix Coding style issues for keymile boards.
Quoted 8 lines · On Fri, 1 Apr 2011 09:16:15 +0200 Heiko Schocher <[email protected]> wrote:
- use I/O accessors
-> For accessing the FPGA therefore a structkm_bec_fpga
is introduced.
- no longer externs needed
- to defines, that only select functions, don;t assign a numeric value
- Codingstyle changes to prevent checkpatch errors/warnings
Quoted 8 lines
Signed-off-by Heiko Schocher <[email protected]>cc Kim Phillips <[email protected]>cc Holger Brunck <[email protected]>cc Wolfgang Denk <[email protected]>cc Detlev Zundel <[email protected]>cc Valentin Longchamp <[email protected]>cc Prafulla Wadaskar <[email protected]>---
Kim
PATCH v4 3/23 keymile: Fix Coding style issues for keymile boards.
Dear Kim Phillips,
Quoted 20 lines · In message <[email protected]> you wrote:
Quoted 8 lines · On Fri, 1 Apr 2011 09:16:15 +0200 Heiko Schocher <[email protected]> wrote:
- use I/O accessors
-> For accessing the FPGA therefore a structkm_bec_fpga
is introduced.
- no longer externs needed
- to defines, that only select functions, don;t assign a numeric value
- Codingstyle changes to prevent checkpatch errors/warningsQuoted 8 lines
Signed-off-by Heiko Schocher <[email protected]>cc Kim Phillips <[email protected]>cc Holger Brunck <[email protected]>cc Wolfgang Denk <[email protected]>cc Detlev Zundel <[email protected]>cc Valentin Longchamp <[email protected]>cc Prafulla Wadaskar <[email protected]>---
Quoted 1 line
Signed-off-by Kim Phillips <[email protected]>
Why do you send a "Signed-off-by" here?
Did you mean "Acked-by:" ?
Signed-off-by "certifies that you wrote it or otherwise have the right to pass it on as a open-source patch." However, you have not been anywhere in the queue of creating or forwarding these patches?
Best regards,
Wolfgang Denk
Signature · 5 lines
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 I express preference for a chronological sequence of events which precludes a violence. - Terry Pratchett, _The Dark Side of the Sun_
PATCH v4 3/23 keymile: Fix Coding style issues for keymile boards.
Quoted 25 lines · On Sat, 2 Apr 2011 00:51:48 +0200 Wolfgang Denk <[email protected]> wrote:
Dear Kim Phillips,
Quoted 20 lines · In message <[email protected]> you wrote:
Quoted 8 lines · On Fri, 1 Apr 2011 09:16:15 +0200 Heiko Schocher <[email protected]> wrote:
- use I/O accessors
-> For accessing the FPGA therefore a structkm_bec_fpga
is introduced.
- no longer externs needed
- to defines, that only select functions, don;t assign a numeric value
- Codingstyle changes to prevent checkpatch errors/warningsQuoted 8 lines
Signed-off-by Heiko Schocher <[email protected]>cc Kim Phillips <[email protected]>cc Holger Brunck <[email protected]>cc Wolfgang Denk <[email protected]>cc Detlev Zundel <[email protected]>cc Valentin Longchamp <[email protected]>cc Prafulla Wadaskar <[email protected]>---
Quoted 1 line
Signed-off-by Kim Phillips <[email protected]>
Quoted 7 lines
Why do you send a "Signed-off-by" here?
Did you mean "Acked-by:" ?
Signed-off-by "certifies that you wrote it or otherwise have the right to pass it on as a open-source patch." However, you have not been anywhere in the queue of creating or forwarding these patches?
as 83xx maintainer, I sign off on all patches committed to the mpc83xx tree, which are subsequently 'forwarded' to the main u-boot tree. This particular case is no different, except the 83xx patches here are too intertwined with other, non-83xx ones. So to facilitate the process, I sign them off on-list such that they can be applied as-is to the main u-boot tree.
hth,
Kim
PATCH v4 3/23 keymile: Fix Coding style issues for keymile boards.
Dear Kim Phillips,
Quoted 5 lines · In message <[email protected]> you wrote:
Quoted 5 lines
Quoted 2 lines
Signed-off-by Kim Phillips <[email protected]>Why do you send a "Signed-off-by" here?
Quoted 8 lines
Quoted 5 lines
Did you mean "Acked-by:" ?
Signed-off-by "certifies that you wrote it or otherwise have the right to pass it on as a open-source patch." However, you have not been anywhere in the queue of creating or forwarding these patches?
as 83xx maintainer, I sign off on all patches committed to the mpc83xx tree, which are subsequently 'forwarded' to the main u-boot tree. This
If the patches go through your tree, i. e. if you actually "handle" these patcehs in any way (by applying them to your tree, or pulling them into your tree, or similar), then a SoB is OK.
Quoted 4 lines
particular case is no different, except the 83xx patches here are too intertwined with other, non-83xx ones. So to facilitate the process, I sign them off on-list such that they can be applied as-is to the main u-boot tree.
This case _is_ different. You do not touch these patches at all. You do NOT pull them in your tree. You do not "pass on" these patches either.
Is it OK with you when I convert all your "Signed-off-by:" into "Acked-by:" for this patch series?
Best regards,
Wolfgang Denk
Signature · 4 lines
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 "I've seen it. It's rubbish." - Marvin the Paranoid Android
PATCH v4 3/23 keymile: Fix Coding style issues for keymile boards.
Quoted 23 lines · On Wed, 27 Apr 2011 13:39:22 +0200 Wolfgang Denk <[email protected]> wrote:
Quoted 4 lines · In message <[email protected]> you wrote:
Quoted 4 lines
Quoted 1 line
Signed-off-by Kim Phillips <[email protected]>Why do you send a "Signed-off-by" here?
Quoted 8 lines
Quoted 5 lines
Did you mean "Acked-by:" ?
Signed-off-by "certifies that you wrote it or otherwise have the right to pass it on as a open-source patch." However, you have not been anywhere in the queue of creating or forwarding these patches?
as 83xx maintainer, I sign off on all patches committed to the mpc83xx tree, which are subsequently 'forwarded' to the main u-boot tree. This
If the patches go through your tree, i. e. if you actually "handle" these patcehs in any way (by applying them to your tree, or pulling them into your tree, or similar), then a SoB is OK.
Quoted 4 lines
particular case is no different, except the 83xx patches here are too intertwined with other, non-83xx ones. So to facilitate the process, I sign them off on-list such that they can be applied as-is to the main u-boot tree.
Quoted 6 lines
This case _is_ different. You do not touch these patches at all. You do NOT pull them in your tree. You do not "pass on" these patches either.
Is it OK with you when I convert all your "Signed-off-by:" into "Acked-by:" for this patch series?
sure.
Kim
PATCH v4 4/23 ppc, arm: adapt keymile header
In reply to Heiko SchocherFrom: Holger Brunck <[email protected]>
- adapt copyright string
- change bootdelay to 2 seconds
- set max number of command args to 32
- set I/O buffer size to 512
---
Changes for v2:
- new patch in v2, first patch in v1 was split up
- fix checkpatch.pl errors and warnings
Changes for v3:
- rebased only
include/configs/keymile-common.h | 13 ++++--------- include/configs/kmeter1.h | 4 ++-- include/configs/mgcoge.h | 7 +++---- 3 files changed, 9 insertions(+), 15 deletions(-)
include/configs/keymile-common.h +4 -9
@@ -27,8 +27,6 @@/* Do boardspecific init for all boards */ #define CONFIG_BOARD_EARLY_INIT_R -#define CONFIG_BOOTCOUNT_LIMIT -/* * By default kwbimage.cfg from board specific folder is used * If for some board, different configuration file need to be used,
@@ -56,16 +54,15 @@#define CONFIG_CMD_IMMAP #define CONFIG_CMD_MII #define CONFIG_CMD_PING -#define CONFIG_CMD_DTT #define CONFIG_CMD_EEPROM #define CONFIG_CMD_I2C #define CONFIG_CMD_JFFS2 -#define CONFIG_JFFS2_CMDLINE #define CONFIG_CMD_MTDPARTS +#define CONFIG_CMD_SETEXPR #undef CONFIG_WATCHDOG/* disable platform specific watchdog */ -#define CONFIG_BOOTDELAY 5/* autoboot after 5 seconds */ +#define CONFIG_BOOTDELAY 2/* autoboot after 2 seconds */ #undef CONFIG_BOOTARGS/* the boot command will set bootargs */ /*
@@ -78,10 +75,10 @@#if defined(CONFIG_CMD_KGDB )#define CONFIG_SYS_CBSIZE 1024/* Console I/O Buffer Size */ #else -#define CONFIG_SYS_CBSIZE 256/* Console I/O Buffer Size */ +#define CONFIG_SYS_CBSIZE 512/* Console I/O Buffer Size */ #endif #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16) -#define CONFIG_SYS_MAXARGS 16 +#define CONFIG_SYS_MAXARGS 32/* max number of command args */ #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE#define CONFIG_CMDLINE_EDITING #define CONFIG_AUTO_COMPLETE
@@ -139,8 +136,6 @@#define CONFIG_BOOTP_GATEWAY #define CONFIG_BOOTP_HOSTNAME -#define CONFIG_ENV_SIZE 0x04000/* Size of Environment */ -#define CONFIG_SYS_MALLOC_LEN (4 * 1024 * 1024)/* UBI Support for all Keymile boards */
include/configs/kmeter1.h +2 -2
@@ -8,7 +8,7 @@* Copyright (C) 2007 MontaVista Software, Inc. * Anton Vorontsov <[email protected]> * -* (C) Copyright 2008 +* (C) Copyright 2008-2011 * Heiko Schocher, DENX Software Engineering, hs at denx.de. * * This program is free software; you can redistribute it and/or
@@ -171,7 +171,7 @@#undef CONFIG_SYS_RAMBOOT#endif -#define CONFIG_SYS_MONITOR_LEN (384 * 1024)/* Reserve for Mon */ +#define CONFIG_SYS_MONITOR_LEN (768 * 1024)/* Reserve for Mon */ /* * Initial RAM Base Address Setup
include/configs/mgcoge.h +3 -4
@@ -1,5 +1,5 @@/* -* (C) Copyright 2007 +* (C) Copyright 2007-2011 * Heiko Schocher, DENX Software Engineering, hs at denx.de. * * See file CREDITS for list of people who contributed to this
@@ -78,8 +78,7 @@#define CONFIG_8260_CLKIN 66000000/* in Hz */ #endif -#define BOOTFLASH_START FE000000 -#define CONFIG_PRAM 512/* protected RAM [KBytes] */ +#define BOOTFLASH_START 0xFE000000#define MTDIDS_DEFAULT "nor0=boot,nor1=app"#define MTDPARTS_DEFAULT \
@@ -128,7 +127,7 @@#define CONFIG_SYS_RAMBOOT #endif -#define CONFIG_SYS_MONITOR_LEN (384 << 10) +#define CONFIG_SYS_MONITOR_LEN (768 << 10)#define CONFIG_ENV_IS_IN_FLASH
Signature · 1 line
1.7.4
PATCH v4 4/23 ppc, arm: adapt keymile header
Quoted 7 lines · On Fri, 1 Apr 2011 09:16:16 +0200 Heiko Schocher <[email protected]> wrote:
From: Holger Brunck <[email protected]>
- adapt copyright string
- change bootdelay to 2 seconds
- set max number of command args to 32
- set I/O buffer size to 512
Quoted 6 lines
Signed-off-by Holger Brunck <[email protected]>Signed-off-by Heiko Schocher <[email protected]>cc Kim Phillips <[email protected]>cc Wolfgang Denk <[email protected]>cc Valentin Longchamp <[email protected]>---
Kim
PATCH v4 5/23 arm, ppc: rework environment variables for keymile boards
In reply to Heiko SchocherFrom: Holger Brunck <[email protected]>
This patch reworks all headerfiles for keymile boards. Furthermore the environment variables are refactored.
Changes:
- introduce km-powerpc.h file and extract ppc specific parts to it
- move ARM specific options and vaiables to km_arm.h
- sort the environment variables to logical groups
- enhance the description of the environment variables
- remove KM specific HW key and board id from kernel command line
---
Changes for v2:
- new patch in v2, first patch in v1 was split up
- fix checkpatch.pl errors and warnings
Changes for v3:
- rebased only
include/configs/keymile-common.h | 234 ++++++++++++++++++++++--------------- include/configs/km-powerpc.h | 92 +++++++++++++++ include/configs/km_arm.h | 25 ++++- include/configs/kmeter1.h | 36 +++---- include/configs/mgcoge.h | 31 +++--- 5 files changed, 286 insertions(+), 132 deletions(-) create mode 100644 include/configs/km-powerpc.h
include/configs/keymile-common.h +139 -95
@@ -86,10 +86,6 @@#define CONFIG_HUSH_INIT_VAR #define CONFIG_SYS_ALT_MEMTEST /* memory test, takes time */ -#define CONFIG_SYS_MEMTEST_START 0x00100000 -#define CONFIG_SYS_MEMTEST_END 0x00f00000/* 1 ... 15 MB in DRAM */ - -#define CONFIG_SYS_LOAD_ADDR 0x100000#define CONFIG_SYS_HZ 1000/* decr. freq: 1 ms ticks */
@@ -142,7 +138,6 @@#define CONFIG_CMD_UBI #define CONFIG_RBTREE #define CONFIG_MTD_PARTITIONS -#define CONFIG_FLASH_CFI_MTD #define CONFIG_MTD_DEVICE #define CONFIG_MTD_CONCAT
@@ -170,103 +165,152 @@ "kmprivate=empty\0"#endif +#ifndef CONFIG_KM_DEF_NETDEV +#define CONFIG_KM_DEF_NETDEV \ + "netdev=eth0\0" +#endif + +#ifndef CONFIG_KM_UBI_PARTITION_NAME +#define CONFIG_KM_UBI_PARTITION_NAME "ubi0" +#endif +#ifndef CONFIG_KM_UBI_LINUX_MTD_NAME +#define CONFIG_KM_UBI_LINUX_MTD_NAME "ubi0" +#endif +#define xstr (s) str(s)#define str (s) #s +/* +* bootargs +* - modify 'bootargs' +* +* - 'addip': add ip configuration +* - 'addpanic': add kernel panic options +* - 'addramfs': add phram device for the rootfilesysten in ram +* - 'addtty': add console=... +* - 'nfsargs': default arguments for nfs boot +* - 'flashargs': defaults arguments for flash base boot +* +* processor specific settings +* - 'addmtdparts': add mtd partition information +*/ +#define CONFIG_KM_DEF_ENV_BOOTARGS \ + "addinit=" \ + "setenv bootargs ${bootargs} init=${init}\0" \ + "addip=" \ + "setenv bootargs ${bootargs} " \ + "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}" \ + ":${hostname}:${netdev}:off\0" \ + "addpanic=" \ + "setenv bootargs ${bootargs} " \ + "panic=1 panic_on_oops=1\0" \ + "addramfs=" \ + "setenv bootargs \"" \ + "${bootargs} phram.phram=" \ + "rootfs${actual_bank},${rootfsaddr},${rootfssize}\"\0" \ + "addtty=" \ + "setenv bootargs ${bootargs}" \ + " console=" CONFIG_KM_CONSOLE_TTY ",${baudrate}\0" \ + "nfsargs=" \ + "setenv bootargs " \ + "ubi.mtd=" CONFIG_KM_UBI_LINUX_MTD_NAME " " \ + "root=/dev/nfs rw " \ + "nfsroot=${serverip}:${rootpath}\0" \ + "flashargs=" \ + "setenv bootargs " \ + "ubi.mtd=" CONFIG_KM_UBI_LINUX_MTD_NAME " " \ + "root=mtdblock:rootfs${actual_bank} " \ + "rootfstype=squashfs ro\0" \ + "" + +#define CONFIG_KM_DEF_ENV_COMPUTE_ADDR \ + "setboardid=" \ + "if test \"x${boardId}\" = \"x\"; then; " \ + "setenv boardId ${IVM_BoardId} && " \ + "setenv hwKey ${IVM_HWKey}; " \ + "else; " \ + "echo \\\\c; " \ + "fi\0" + +/* +* flash_boot +* - commands for booting from flash +* +* - 'cramfsaddr': address to the cramfs (in ram) +* - 'cramfsloadkernel': copy kernel from a cramfs to ram +* - 'ubiattach': attach ubi partition +* - 'ubicopy': copy ubi volume to ram +* - volume names: bootfs0, bootfs1, bootfs2, ... +* - 'ubiparition': mtd parition name for ubi +* +* processor specific settings +* - 'cramfsloadfdt': copy fdt from a cramfs to ram +*/ +#define CONFIG_KM_DEF_ENV_FLASH_BOOT \ + "cramfsaddr="xstr(CONFIG_KM_CRAMFS_ADDR) "\0" \ + "cramfsloadkernel=" \ + "cramfsload ${kernel_addr_r} uImage && " \ + "setenv actual_kernel_addr ${kernel_addr_r}\0" \ + "ubiattach=ubi part ${ubipartition}\0" \ + "ubicopy=ubi read ${cramfsaddr} bootfs${actual_bank}\0" \ + "ubipartition=" CONFIG_KM_UBI_PARTITION_NAME "\0" \ + "" + +/* +* net_boot +* - commands for booting over the network +* +* - 'tftpkernel': load a kernel with tftp into ram +* +* processor specific settings +* - 'tftpfdt': load fdt with tftp into ram +*/ +#define CONFIG_KM_DEF_ENV_NET_BOOT \ + "tftpkernel=" \ + "tftpboot ${kernel_addr_r} ${kernel_file} && " \ + "setenv actual_kernel_addr ${kernel_addr_r} \0" + +/* +* constants +* - KM specific constants and commands +* +* - 'default': setup default environment +*/ +#define CONFIG_KM_DEF_ENV_CONSTANTS \ + "actual=setenv actual_bank ${initial_boot_bank}\0" \ + "actual0=setenv actual_bank 0\0" \ + "actual_bank=${initial_boot_bank}\0" \ + "default=" \ + "setenv default 'run newenv; reset' && " \ + "run release && saveenv; reset\0" \ + "checkboardid=" \ + "test \"x${boardId}\" = \"x${IVM_BoardId}\"\0" \ + "printbootargs=print bootargs\0" \ + "rootfsfile="xstr(CONFIG_HOSTNAME) "/rootfsImage\0" \ + "" +#ifndef CONFIG_KM_DEF_ENV #define CONFIG_KM_DEF_ENV \ - "netdev=eth0\0" \ - "u-boot_addr_r=100000\0" \ - "kernel_addr_r=200000\0" \ - "fdt_addr_r=600000\0" \ - "ram_ws=800000 \0" \ - "script_ws=780000 \0" \ - "fdt_file=" xstr(CONFIG_HOSTNAME) "/" \ - xstr(CONFIG_HOSTNAME) ".dtb\0" \ - "u-boot=" xstr(CONFIG_HOSTNAME) "/u-boot.bin \0" \ - "kernel_file=" xstr(CONFIG_HOSTNAME) "/uImage \0" \ - "load=tftp ${u-boot_addr_r} ${u-boot}\0" \ - "update=protect off " xstr(BOOTFLASH_START) " +${filesize};" \ - "erase " xstr(BOOTFLASH_START) " +${filesize};" \ - "cp.b ${u-boot_addr_r} " xstr(BOOTFLASH_START) \ - " ${filesize};" \ - "protect on " xstr(BOOTFLASH_START) " +${filesize}\0" \ - "load_fdt=tftp ${fdt_addr_r} ${fdt_file}; " \ - "setenv actual_fdt_addr ${fdt_addr_r} \0" \ - "load_kernel=tftp ${kernel_addr_r} ${kernel_file}; " \ - "setenv actual_kernel_addr ${kernel_addr_r} \0" \ - "ramargs=setenv bootargs root=/dev/ram rw\0" \ - "nfsargs=setenv bootargs root=/dev/nfs rw " \ - "nfsroot=${serverip}:${rootpath}\0" \ - "mtdargs=setenv bootargs root=${actual_rootfs} rw " \ - "rootfstype=jffs2 \0" \ - "altmtdargs=setenv bootargs root=${backup_rootfs} rw " \ - "rootfstype=jffs2 \0" \ - "addmtd=setenv bootargs ${bootargs} ${mtdparts}\0" \ - "addip=setenv bootargs ${bootargs} " \ - "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}" \ - ":${hostname}:${netdev}:off panic=1\0" \ - "addboardid=setenv bootargs ${bootargs} " \ - "hwKey=${IVM_HWKey} boardId=0x${IVM_BoardId} \0" \ - "addpram=setenv bootargs ${bootargs} " \ - "mem=${mem} pram=${pram}\0" \ - "pram=" xstr(CONFIG_PRAM) "k\0" \ - "net_nfs=tftp ${kernel_addr_r} ${kernel_file}; " \ - "tftp ${fdt_addr_r} ${fdt_file}; " \ - "run nfsargs addip addcon addboardid addpram;" \ - "bootm ${kernel_addr_r} - ${fdt_addr_r}\0" \ - "net_self=tftp ${kernel_addr_r} ${kernel_file}; " \ - "tftp ${fdt_addr_r} ${fdt_file}; " \ - "tftp ${ramdisk_addr} ${ramdisk_file}; " \ - "run ramargs addip addboardid addpram; " \ - "bootm ${kernel_addr_r} ${ramdisk_addr} ${fdt_addr_r}\0"\ - "flash_nfs=run nfsargs addip addcon;" \ - "bootm ${kernel_addr} - ${fdt_addr}\0" \ - "flash_self=run ramargs addip addcon addboardid addpram;" \ - "bootm ${kernel_addr} ${ramdisk_addr} ${fdt_addr}\0" \ - "bootcmd=run mtdargs addip addcon addboardid addpram; " \ - "bootm ${actual_kernel_addr} - ${actual_fdt_addr} \0" \ - "altbootcmd=run altmtdargs addip addcon addboardid addpram; " \ - "bootm ${backup_kernel_addr} - ${backup_fdt_addr} \0" \ - "actual0=setenv actual_bank 0; setenv actual_kernel_addr " \ - "${bank0_kernel_addr}; " \ - "setenv actual_fdt_addr ${bank0_fdt_addr}; " \ - "setenv actual_rootfs ${bank0_rootfs} \0" \ - "actual1=setenv actual_bank 1; setenv actual_kernel_addr " \ - "${bank1_kernel_addr}; " \ - "setenv actual_fdt_addr ${bank1_fdt_addr}; " \ - "setenv actual_rootfs ${bank1_rootfs} \0" \ - "backup0=setenv backup_bank 0; setenv backup_kernel_addr " \ - "${bank0_kernel_addr}; " \ - "setenv backup_fdt_addr ${bank0_fdt_addr}; " \ - "setenv backup_rootfs ${bank0_rootfs} \0" \ - "backup1=setenv backup_bank 1; setenv backup_kernel_addr " \ - "${bank1_kernel_addr}; " \ - "setenv backup_fdt_addr ${bank1_fdt_addr}; " \ - "setenv backup_rootfs ${bank1_rootfs} \0" \ - "setbank0=run actual0 backup1 \0" \ - "setbank1=run actual1 backup0 \0" \ - "release=setenv bootcmd " \ - "\'run mtdargs addip addcon addboardid addpram;" \ - "bootm ${actual_kernel_addr} - ${actual_fdt_addr} \'; " \ - "saveenv \0" \ - "develop=setenv bootcmd " \ - "\'run nfsargs addip addcon addboardid addpram;" \ - "bootm ${actual_kernel_addr} - ${actual_fdt_addr} \'; " \ - "saveenv \0" \ - "developall=setenv bootcmd " \ - "\'run load_fdt load_kernel nfsargs " \ - "addip addcon addboardid addpram; " \ - "bootm ${actual_kernel_addr} - ${actual_fdt_addr} \'; " \ - "saveenv \0" \ - "set_new_esw_script=setenv new_esw_script " \ - "new_esw_0x${IVM_BoardId}_0x${IVM_HWKey}.scr \0" \ - "new_esw=run set_new_esw_script; " \ - "tftp ${script_ws} ${new_esw_script}; " \ - "iminfo ${script_ws}; source ${script_ws} \0" \ - "bootlimit=0 \0" \ CONFIG_KM_DEF_ENV_IOMUX \ CONFIG_KM_DEF_ENV_PRIVATE \ + CONFIG_KM_DEF_NETDEV \ + CONFIG_KM_DEF_ENV_CPU \ + CONFIG_KM_DEF_ENV_BOOTARGS \ + CONFIG_KM_DEF_ENV_COMPUTE_ADDR \ + CONFIG_KM_DEF_ENV_FLASH_BOOT \ + CONFIG_KM_DEF_ENV_NET_BOOT \ + "altbootcmd=run bootcmd\0" \ + "bootcmd=run default\0" \ + "bootlimit=2\0" \ + "init=/sbin/init-overlay.sh\0" \ + "kernel_addr_r="xstr(CONFIG_KM_KERNEL_ADDR) "\0" \ + "kernel_file="xstr(CONFIG_HOSTNAME) "/uImage\0" \ + "kernel_name=uImage\0" \ + "load=tftpboot ${u-boot_addr_r} ${u-boot}\0" \ + "mtdids=" MTDIDS_DEFAULT "\0" \ + "mtdparts=" MTDPARTS_DEFAULT "\0" \ + "u-boot="xstr(CONFIG_HOSTNAME) "/u-boot.bin\0" \ + "u-boot_addr_r="xstr(CONFIG_KM_KERNEL_ADDR) "\0" \ ""#endif /* CONFIG_KM_DEF_ENV */
include/configs/km-powerpc.h new file +92 -0
92 lines not on this page · raw message
include/configs/km_arm.h +23 -2
@@ -48,8 +48,29 @@/* include common defines/options for all Keymile boards */ #include "keymile-common.h" -#undef CONFIG_CMD_DTT -#undef CONFIG_BOOTCOUNT_LIMIT + +#define CONFIG_ENV_SIZE (128 << 10)/* NAND chip block size */ +#define CONFIG_SYS_MEMTEST_START 0x00400000/* 4M */ +#define CONFIG_SYS_MEMTEST_END 0x007fffff/*(_8M -1) */ +#define CONFIG_SYS_LOAD_ADDR 0x00800000/* default load adr- 8M */ + +/* pseudo-non volatile RAM [hex] */ +#define CONFIG_KM_PNVRAM 0x80000 +/* physical RAM MTD size [hex] */ +#define CONFIG_KM_PHRAM 0x17F000 + +#define CONFIG_KM_CRAMFS_ADDR 0x2400000 +#define CONFIG_KM_KERNEL_ADDR 0x2000000/* 4096KBytes */ + +#define CONFIG_KM_DEF_ENV_CPU \ + "addmtdparts=setenv bootargs ${bootargs} ${mtdparts}\0" \ + "boot=bootm ${actual_kernel_addr} - -\0" \ + "cramfsloadfdt=echo \\\\c\0" \ + "tftpfdt=echo \\\\c\0" \ + CONFIG_KM_DEF_ENV_UPDATE \ + "" + +#define CONFIG_MD5 /* get_random_hex on krikwood needs MD5 support */ #define CONFIG_SKIP_LOWLEVEL_INIT /* disable board lowlevel_init */
include/configs/kmeter1.h +16 -20
@@ -29,16 +29,20 @@#define CONFIG_HOSTNAME kmeter1#define CONFIG_SYS_TEXT_BASE 0xF0000000 +#define CONFIG_KM_DEF_NETDEV \ + "netdev=eth2\0" \/* include common defines/options for all Keymile boards */ #include "keymile-common.h" - -#define CONFIG_KM_UBI_PARTITION_NAME "ubi0" +#include "km-powerpc.h" #define MTDIDS_DEFAULT "nor0=boot" -#define MTDPARTS_DEFAULT \ - "mtdparts=boot:768k(u-boot),128k(env),128k(envred)," \ - "-(" CONFIG_KM_UBI_PARTITION_NAME ")" +#define MTDPARTS_DEFAULT "mtdparts=" \ + "boot:" \ + "768k(u-boot)," \ + "128k(env)," \ + "128k(envred)," \ + "-(" CONFIG_KM_UBI_PARTITION_NAME ")"#define CONFIG_MISC_INIT_R /*
@@ -455,7 +459,7 @@#define BOOTFLASH_START F0000000 -#define CONFIG_PRAM 512/* protected RAM [KBytes] */ +#define CONFIG_KM_CONSOLE_TTY "ttyS0"/* * Environment Configuration
@@ -467,22 +471,14 @@#define CONFIG_EXTRA_ENV_SETTINGS \ CONFIG_KM_DEF_ENV \ + "dtt_bus=pca9547:70:a\0" \ + "EEprom_ivm=pca9547:70:9\0" \ + "newenv=" \ + "prot off 0xF00C0000 +0x40000 && " \ + "era 0xF00C0000 +0x40000\0" \ "rootpath=/opt/eldk/ppc_82xx\0" \ - "addcon=setenv bootargs ${bootargs} console=ttyS0,${baudrate}\0"\ - "ramdisk_file=/tftpboot/kmeter1/uRamdisk\0" \ - "loadram=tftp ${ramdisk_addr_r} ${ramdisk_file}\0" \ - "loadfdt=tftp ${fdt_addr_r} ${fdt_file}\0" \ - "loadkernel=tftp ${kernel_addr_r} ${bootfile}\0" \ "unlock=yes\0" \ - "fdt_addr=F0080000\0" \ - "kernel_addr=F00a0000\0" \ - "ramdisk_addr=F03a0000\0" \ - "ramdisk_addr_r=F10000\0" \ - "EEprom_ivm=pca9547:70:9\0" \ - "dtt_bus=pca9547:70:a\0" \ - "mtdids=nor0=app \0" \ - "mtdparts=" MK_STR(MTDPARTS_DEFAULT) "\0" \ - "" + ""#if defined(CONFIG_UEC_ETH )#define CONFIG_HAS_ETH0
include/configs/mgcoge.h +16 -15
@@ -37,6 +37,7 @@/* include common defines/options for all Keymile boards */ #include "keymile-common.h" +#include "km-powerpc.h" /* * Select serial console configuration
@@ -80,28 +81,28 @@#define BOOTFLASH_START 0xFE000000 -#define MTDIDS_DEFAULT "nor0=boot,nor1=app" -#define MTDPARTS_DEFAULT \ - "mtdparts=boot:384k(u-boot),128k(env),128k(envred),3456k(free);" \ - "app:3m(esw0),10m(rootfs0),3m(esw1),10m(rootfs1),1m(var),5m(cfg)" +#define CONFIG_KM_CONSOLE_TTY "ttyCPM0" + +#define MTDIDS_DEFAULT "nor3=app" +#define MTDPARTS_DEFAULT "mtdparts=" \ + "app:" \ + "768k(u-boot)," \ + "128k(env)," \ + "128k(envred)," \ + "3072k(free)," \ + "-(" CONFIG_KM_UBI_PARTITION_NAME ")" -#ifndef CONFIG_KM_DEF_ENV /* if not set by keymile-common.h */ -#define CONFIG_KM_DEF_ENV "km-common=empty\0" -#endif /* * Default environment settings */ -#define CONFIG_EXTRA_ENV_SETTINGS \ +#define CONFIG_EXTRA_ENV_SETTINGS \ CONFIG_KM_DEF_ENV \ - "rootpath=/opt/eldk/ppc_82xx\0" \ - "addcon=setenv bootargs ${bootargs} " \ - "console=ttyCPM0,${baudrate}\0" \ - "mtdids=nor0=boot,nor1=app \0" \ - "partition=nor1,5 \0" \ - "new_env=prot off FE060000 FE09FFFF; era FE060000 FE09FFFF \0" \ "EEprom_ivm=pca9544a:70:4 \0" \ - "mtdparts=" MK_STR(MTDPARTS_DEFAULT) "\0" \ "unlock=yes\0" \ + "newenv=" \ + "prot off 0xFE0C0000 +0x40000 && " \ + "era 0xFE0C0000 +0x40000\0" \ + "rootpath=/opt/eldk/ppc_82xx\0" \ ""#define CONFIG_SYS_SDRAM_BASE 0x00000000
Signature · 1 line
1.7.4
PATCH v4 5/23 arm, ppc: rework environment variables for keymile boards
Quoted 12 lines · On Fri, 1 Apr 2011 09:16:17 +0200 Heiko Schocher <[email protected]> wrote:
From: Holger Brunck <[email protected]>
This patch reworks all headerfiles for keymile boards. Furthermore the environment variables are refactored.
Changes:
- introducekm-powerpc.hfile and extract ppc specific parts to it
- move ARM specific options and vaiables tokm_arm.h
- sort the environment variables to logical groups
- enhance the description of the environment variables
- remove KM specific HW key and board id from kernel command line
Quoted 6 lines
Signed-off-by Holger Brunck <[email protected]>Signed-off-by Heiko Schocher <[email protected]>cc Kim Phillips <[email protected]>cc Wolfgang Denk <[email protected]>cc Valentin Longchamp <[email protected]>---
Kim