uboot-mt623x/board/trab
Wolfgang Denk dfcd7f2160 Redundant Environment: protect full sector size
Several boards used different ways to specify the size of the
protected area when enabling flash write protection for the sectors
holding the environment variables: some used CONFIG_ENV_SIZE and
CONFIG_ENV_SIZE_REDUND, some used CONFIG_ENV_SECT_SIZE, and some even
a mix of both for the "normal" and the "redundant" areas.

Normally, this makes no difference at all. However, things are
different when you have to deal with boards that can come with
different types of flash chips, which may have different sector
sizes.

Here we may have to chose CONFIG_ENV_SECT_SIZE such that it fits the
biggest sector size, which may include several sectors on boards using
the smaller sector flash types. In such a case, using CONFIG_ENV_SIZE
or CONFIG_ENV_SIZE_REDUND to enable the protection may lead to the
case that only the first of these sectors get protected, while the
following ones aren't.

This is no real problem, but it can be confusing for the user -
especially on boards that use CONFIG_ENV_SECT_SIZE to protect the
"normal" areas, while using CONFIG_ENV_SIZE_REDUND for the
"redundant" area.

To avoid such inconsistencies, I changed all sucn boards that I found
to consistently use CONFIG_ENV_SECT_SIZE for protection. This should
not cause any functional changes to the code.

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Paul Ruhland
Cc: Pantelis Antoniou <panto@intracom.gr>
Cc: Stefan Roese <sr@denx.de>
Cc: Gary Jennejohn <garyj@denx.de>
Cc: Dave Ellis <DGE@sixnetio.com>
Acked-by: Stefan Roese <sr@denx.de>
2009-06-04 00:16:16 +02:00
..
Makefile trab: make trab_fkt standalone code independent of libgcc 2008-12-16 16:22:50 +01:00
Pt1000_temp_data.h * Patch by Martin Krause, 11 Sep 2003: 2003-09-11 23:06:34 +00:00
README.kbd Initial revision 2002-11-03 00:24:07 +00:00
auto_update.c Fix e-mail address of Gary Jennejohn. 2009-05-15 22:11:59 +02:00
cmd_trab.c Command usage cleanup 2009-01-28 08:49:52 +01:00
config.mk Fix e-mail address of Gary Jennejohn. 2009-05-15 22:11:59 +02:00
flash.c Redundant Environment: protect full sector size 2009-06-04 00:16:16 +02:00
lowlevel_init.S Fix e-mail address of Gary Jennejohn. 2009-05-15 22:11:59 +02:00
memory.c board/trab/memory.c: Fix compile problems. 2008-12-16 22:32:25 +01:00
rs485.c Fix e-mail address of Gary Jennejohn. 2009-05-15 22:11:59 +02:00
rs485.h Fix e-mail address of Gary Jennejohn. 2009-05-15 22:11:59 +02:00
trab.c Fix e-mail address of Gary Jennejohn. 2009-05-15 22:11:59 +02:00
trab_fkt.c trab: make trab_fkt standalone code independent of libgcc 2008-12-16 16:22:50 +01:00
tsc2000.c ARM: Use do_div() instead of division for "long long". 2008-09-09 02:14:41 +02:00
tsc2000.h Big white-space cleanup. 2008-05-21 00:14:08 +02:00
u-boot.lds Fix e-mail address of Gary Jennejohn. 2009-05-15 22:11:59 +02:00
vfd.c Replace __asm references with __asm__ 2009-04-28 01:02:04 +02:00

README.kbd

The TRAB keyboard implementation is similar to that for LWMON and
R360MPI boards. The only difference concerns key naming. There are 4
keys on TRAB: 1, 2, 3, 4.

1) The "kbd" command provides information about the current state of
   the keys. For example,

	TRAB # kbd
	Keys: 1 0 1 0

   means that keys 1 and 3 are pressed. The keyboard status is also
   stored in the "keybd" environment variable. In this example we get

	keybd=1010

2) The "preboot" variable is set according to current environment
   settings and keys pressed. This is an example:

	TRAB # setenv magic_keys XY
	TRAB # setenv key_magicX 12
	TRAB # setenv key_cmdX echo ## Keys 1 + 2 pressed ##\;echo
	TRAB # setenv key_magicY 13
	TRAB # setenv key_cmdY echo ## Keys 1 + 3 pressed ##\;echo

   Here "magic_keys=XY" means that the "key_magicX" and "key_magicY"
   variables will be checked for a match. Each variable "key_magic*"
   defines a set of keys. In the our example, if keys 1 and 3 are
   pressed during reset, then "key_magicY" matches, so the "preboot"
   variable will be set to the contents of "key_cmdY":

	preboot=echo ## Keys 1 + 3 pressed ##;echo

3) The TRAB board has optional modem support. When a certain key
   combination is pressed on the keyboard at power-on, the firmware
   performs the necessary initialization of the modem and allows for
   dial-in. The key combination is specified in the
   "include/configs/trab.h" file. For example:

	#define        CONFIG_MODEM_KEY_MAGIC  "23"

   means that modem will be initialized if and only if both keys 2, 3
   are pressed. Note that the format of this string is similar to the
   format of "key_magic*" environment variables described above.