at91: at91_register_uart use number instead of IDs

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
tny-a926x: fix MOB-TNY-MD2 Motherboard support

The MD2 add:
 - uart 2
 - ethernet
 - usb
 - spi
 - i2c

so fix just add uart and ethernet

update defconfig
always enable the motherboard and drop the SHA256 support (to fix in the
256KiB).

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
common: memory: fix off-by-one in tlsf_create

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
usb: fix driver name

use the usb_driver name

otherwise we will have a NULL driver entry in devinfo

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
menu: fix double action when "\n\r" or "\r\n" is received

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
menu: fix non command management support

the auto select is always available

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
menu: fix support for "\n", "\n\r" and "\r"

If "\n\r" or "\r\n" is ignore one.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
menu: fix menu alloc init

The auto_select is supposed to be set to -1.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Merge tag 'j-master-fixes' of git://git.jcrosoft.org/barebox

Master Fixes

usb driver name (driver_d)

Menu fixes
bootm: fix initrd handling

bootm_initrd tests for data->initrd, but this never becomes true because
the setting of data->initrd is inside a if(bootm_initrd()). Fix this. Also,
do not support the initrd options when initrd is disabled.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
hush: bail out of scripts on syntax error

On a systax error we have to bail out of the shell instead of
setting inp->p to NULL and crash barebox with a NULL pointer
deref. This only happened in scripts.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>

This fixes the problem I had (i.e. a boot loop caused by a stray fi in
/env/bin/init).

Reported-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Tested-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
uimage/file_to_sdram: fix resource allocation

file_to_sdram is used to load an initrd. The resource size is
then used to pass the initrd size to Linux. This means that
the resource size must exactly match the initrd size. Currently
this is not the case since we request the sdram region in chunks
of 8 Kbytes. Fix this by adjusting the resource size when the file
is loaded.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Release v2012.05.0

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Merge branch 'next'

Conflicts:
	common/hush.c

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
complete: fix duplicate env eval list

this can be reproductable by this sequence

barebox:/ <TAB>
.                  ?                  [                  addpart
bootm              cat                cd                 clear
cp                 cpuinfo            crc32              delpart
devinfo            dhcp               echo               edit
erase              ethact             exit               export
false              getopt             go                 help
host               loadb              loadenv            loady
login              ls                 md                 md5sum
memcmp             memcpy             meminfo            memset
menu               mkdir              mount              mtest
mw                 nfs                passwd             ping
printenv           protect            pwd                readline
reset              rm                 rmdir              saveenv
sedit              sh                 sha1sum            sha256sum
sleep              source             test               tftp
time               timeout            true               umount
uncompress         unprotect          version            net.nameserver=
net.domainname=    cs0.baudrate=      cs0.active=        cs1.active=
cs1.ip=            cs1.port=
barebox:/ $<TAB>
$net.nameserver     $net.domainname     $cs0.baudrate
$cs0.active         $cs1.active         $cs1.ip
$cs1.port           $net.nameserver     $net.domainname
$cs0.baudrate       $cs0.active         $cs1.active
$cs1.ip             $cs1.port
barebox:/ $

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
README: fix some typos

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
i2c: Fix barebox crash when 'count' is not set for i2c_read command

Running i2c_read without the 'count' setting causes an error and reboots.

barebox@Phytec phyCORE-i.MX27:/ i2c_read -b 1 -a 0x4a -r 0x00
ERROR: out of memory
no stack data available

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
fix typo addreee -> address

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
i2c: Added switch for allowing usage 16bit register addresses

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
MIPS: add common header file for DEBUG_LL via NS16550

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>