ml507: Fix Xilinx uartlite driver hang

The default configuration for ml507 will generate a hang() in the
Xilinx uartlite driver.

userial_ports[] in drivers/serial/serial_xuartlite.c does not get
initialized properly. CONFIG_SERIAL_BASE is unused.
XILINX_UARTLITE_BASEADDR is used instead.

Signed-off-by: Rommel Custodio <sessyargc+uboot@gmail.com>
GPIO: pca953x: fix spelling in help

Signed-off-by: Laurence Withers <lwithers@guralp.com>
GPIO: pca953x: fix error reporting

Use the standard CMD_RET_* constants to clearly report errors from the
pca953x command. In addition, print error messages when I2C communication
fails.

Signed-off-by: Laurence Withers <lwithers@guralp.com>
ide: Correct IDE_BUS(dev) macro

The IDE_BUS(dev) macro was previously doing dev >> 1.  This however is a
mis-match of the usage in common/cmd_ide.c and would cause boards with
multiple ports / devices to not correctly detect all devices.  For more
details please see:
http://lists.denx.de/pipermail/u-boot/2012-April/122525.html

[Tom Rini: Reword commit message only]

Tested-by: Luka Perkov <uboot@lukaperkov.net>
Signed-off-by: Simon Baatz <gmbnomis@gmail.com>
Signed-off-by: Tom Rini <trini@ti.com>
arm: rmobile: bugfix: wrong register saving in lowlevel_init

lowlevel_init() of rmobile badly assumed that ip register holds return address.
The commit "63ee53a7 armv7 cpu_init_crit: Simplify code" breaks this assumption.
This patch removes this bad assumption and simplify code.

Signed-off-by: Tetsuyuki Kobayashi <koba@kmckk.co.jp>
FAT: check for partition 0 not 1 for whole-disk fs

The recent switch to use get_device_and_partition() from do_fat_ls()
broke the ability to access a FAT filesystem directly on a whole device;
FAT only works within a partition on a device.

This change makes e.g. "fatls mmc 0:0" work; explicitly requesting
partition ID 0 is something that get_device_and_partition() fully
supports. However, fat_register_device() expects partition ID 1 to be
used in the full-disk case; partition ID 1 was previously implicitly
specified when the user didn't actually specify a partition ID. Update
fat_register_device() to expect the correct ID.

This change does imply that if a user explicitly executes "fatls mmc 0:1"
then this will fail, and may be a change in behaviour.

Note that this still prevents "fatls mmc 0:auto" from working. The next
patch will fix that.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
disk: part_dos: don't claim whole-disk FAT filesystems

Logically, a disk that contains a raw FAT filesystem does not in fact
have a partition table. However, test_part_dos() was claiming that such
disks did in fact have a DOS-style partition table. This caused
get_device_and_partition() not to return a whole-disk disk_partition_t,
since part_type != PART_TYPE_UNKNOWN.

part_dos.c's print_partition_extended() detected the raw FAT filesystem
condition and printed a fake partition table that encompassed the whole
disk.

However, part_dos.c's get_partition_info_extended() did not return any
valid partitions in this case. This combination caused
get_device_and_partition() not to find any valid partitions, and hence
to return an error.

Fix test_part_dos() not to claim that raw FAT filesystems are DOS
partition tables. In turn, this causes get_device_and_partition() to
return a whole-disk disk_partition_t, and hence the following commands
work:

fatls mmc 0 /
fatls mmc 0:auto /

An alternative would be to modify print_partition_extended() to detect
raw FAT filesystems, just like print_partition_extended() does, and to
return a fake partition in this case. However, this seems logically
incorrect, and also duplicates code, since get_device_and_partition()
falls back to returning a whole-disk partition when there is no partition
table on the device.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
yaffs2: Fix GCC 4.6 compile warnings

Fix:
yaffs_guts.c: In function 'yaffs_check_chunk_erased':
yaffs_guts.c:324:6: warning: variable 'result' set but not used
[-Wunused-but-set-variable]
yaffs_guts.c: In function 'yaffs_verify_chunk_written':
yaffs_guts.c:352:6: warning: variable 'result' set but not used
[-Wunused-but-set-variable]
yaffs_guts.c: In function 'yaffs_grab_chunk_cache':
yaffs_guts.c:1488:6: warning: variable 'pushout' set but not used
[-Wunused-but-set-variable]
yaffs_guts.c: In function 'yaffs_check_obj_details_loaded':
yaffs_guts.c:3180:6: warning: variable 'alloc_failed' set but not used
[-Wunused-but-set-variable]
yaffs_guts.c:3179:6: warning: variable 'result' set but not used
[-Wunused-but-set-variable]
yaffs_guts.c: In function 'yaffs_update_oh':
yaffs_guts.c:3288:6: warning: variable 'result' set but not used
[-Wunused-but-set-variable]
yaffs_guts.c: In function 'yaffs_get_obj_name':
yaffs_guts.c:4447:7: warning: variable 'result' set but not used
[-Wunused-but-set-variable]
yaffs_summary.c: In function 'yaffs_summary_read':
yaffs_summary.c:194:6: warning: variable 'sum_tags_bytes' set but not
used [-Wunused-but-set-variable]
yaffs_verify.c: In function 'yaffs_verify_file':
yaffs_verify.c:227:6: warning: variable 'actual_depth' set but not used
[-Wunused-but-set-variable]
yaffs_yaffs1.c: In function 'yaffs1_scan':
yaffs_yaffs1.c:26:6: warning: variable 'result' set but not used
[-Wunused-but-set-variable]
yaffs_yaffs2.c: In function 'yaffs2_scan_chunk':
yaffs_yaffs2.c:949:6: warning: variable 'result' set but not used
[-Wunused-but-set-variable]
yaffs_yaffs2.c: In function 'yaffs2_scan_backwards':
yaffs_yaffs2.c:1352:6: warning: variable 'deleted' set but not used
[-Wunused-but-set-variable]

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Cc: Charles Manning <cdhmanning@gmail.com>
Tested-by: Albert ARIBAUD <albert.u.boot@aribaud.net>
arm: armv7: omap3: Fix restore sequence in lowlevel_init

The restore sequence in lowlevel_init was in the wrong order,
causing lr to lose its original value and be set equal to ip
instead. Also, its use of the stack clashes with that of
s_init, so move the s_init call after the restore and turn
it  into a tail-optimized branch.

Signed-off-by: Albert ARIBAUD <albert.u.boot@aribaud.net>
Tested-by: Jeroen Hofstee <jeroen@myspectrum.nl>
Prepare v2012.10-rc3

Signed-off-by: Tom Rini <trini@ti.com>
m28: Properly configure the SPI flash chipselect

The SPI flash is not properly detected by plain "sf probe" due to
it being located on different bus and different chipselect. Fix
this problem.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Tom Rini <trini@ti.com>
Prepare v2012.10

Signed-off-by: Tom Rini <trini@ti.com>
mx6q: Factor out common DDR3 init code

Factor out common DDR3 initialization code, allowing easier maintainance of such
scripts.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
mx6: Add basic support for mx6qsabresd board.

mx6qsabresd is a board based on mx6q SoC with the following features:
- 1GB of DDR3
- 1 USB OTG port
- 1 HDMI output port
- SPI NOR
- LVDS panel
- Gigabit Ethernet
- Camera Connector
- eMMC and SD card slot
- Audio

Add very basic support for it.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
mx6qsabresd: Add Ethernet support

mx6qsabresd has a AR8031 Gigabit PHY.

Add support for it.

Also increase CONFIG_SYS_MALLOC_LEN so that FEC buffer allocation does not fail.

Tested on 1Gbp and 100Mbps networks.

Suggested-by: Kim Phillips <kim.phillips@freescale.com>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Kim Phillips <kim.phillips@freescale.com>
mx6qsabresd: Add 8-bit USDHC support

USDHC3 has 8 pins wired in mx6qsabresd. Configure the extra pins.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
configs: mx6: Add a common config file

Add a common mx6 config file that can be shared between some mx6 boards.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
mx6q: Add basic support for mx6qsabreauto

mx6qsabreauto is a board based on mx6q SoC with the following features:
- 2GB of DDR3
- 2 USB ports
- 1 HDMI output port
- SPI NOR
- 2 LVDS LCD ports
- Gigabit Ethernet
- Camera
- eMMC and SD card slot
- Multichannel Audio
- CAN
- SATA
- NAND
- PCIE
- Video Input

Add very basic support for it.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
mx25: add CPU revision 1.2

tested on a MCIMX257CJM4A which now reports :
CPU:   Freescale i.MX25 rev1.2 at 399 MHz

Signed-off-by: Eric Bénard <eric@eukrea.com>
Acked-by: Otavio Salvador <otavio@ossystems.com.br>
imx: Use MXC_I2C_CLK in imx i2c driver

i2c didn't work on imx25 due to missing MXC_IPG_PERCLK. Now using
MXC_I2C_CLK on all imx systems using i2c.

Signed-off-by: Matthias Weisser <weisserm@arcor.de>
Acked-by: Stefano Babic <sbabic@denx.de>