platform/kernel/u-boot.git
11 years agoahci: Adjust SATA timeouts for hard disk (spinup delay & command timeout)
Walter Murphy [Mon, 29 Oct 2012 05:24:00 +0000 (05:24 +0000)]
ahci: Adjust SATA timeouts for hard disk (spinup delay & command timeout)

Note: These are timeout values and not delay values, so the event being
timed out will complete whenever it is actually ready, with a
measurement granularity of 1 millisecond, up till the timeout value.
Therefore, there is no effect on SSD booting.

The values were determined by instrumenting the code and measuring the
actual time taken by several different models of HDD for each of the
parameters and then adding 50% more for the spinup value and just
doubling the command timeout value.

Signed-off-by: Walter Murphy <wmurphy@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agoahci: flush / invalidate dcache around SATA commands
Taylor Hutt [Mon, 29 Oct 2012 05:23:59 +0000 (05:23 +0000)]
ahci: flush / invalidate dcache around SATA commands

Exynos5 automatically performs DMA when the SATA controller executes
commands.  This adds the necessary dcache-to-memory flush &
invalidation calls to allow the DMA to properly function.

Signed-off-by: Taylor Hutt <thutt@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agoahci: Use virt_to_phys() to denote physical addresses for DMA
Taylor Hutt [Mon, 29 Oct 2012 05:23:58 +0000 (05:23 +0000)]
ahci: Use virt_to_phys() to denote physical addresses for DMA

Update the assignment of various physical memory buffers used by the
SATA controller to explicitly be denoted as physical addresses.

The memory is identity-mapped, so these function calls are a nop, but
they provide good semantic documentation for any maintainers.

The return value of virt_to_phys() is 'unsigned long'.  On machines
where sizeof(unsigned long) != sizeof(pointer), a cast through
(uintptr_t) is needed to appease the compiler due to the potential of
losing the upper 32 bits of the address.

In compilation this scenario, a physical address could be 64-bits, yet
the C pointer environment only allows 32-bit addresses; the constraint
is that pointers cannot address more than 4Gb of memory and if
virt_to_phys() ever returns an out-of-range value for the physical
address, there are issues with emmory mapping which must be solved.
However, since the memory is identify mappeed, there is no problem
introducing the cast: the original pointer will reside in 32-bits, so
the physical address will also be within in 32-bits.

Signed-off-by: Taylor Hutt <thutt@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agoahci: Support 64-bit LBA option when reading capacity
Gabe Black [Mon, 29 Oct 2012 05:23:57 +0000 (05:23 +0000)]
ahci: Support 64-bit LBA option when reading capacity

Capacity needs to allow for a 64-bit value.

Signed-off-by: Gabe Black <gabeblack@google.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agoahci: Fix 'Invaild' typo
Taylor Hutt [Mon, 29 Oct 2012 05:23:56 +0000 (05:23 +0000)]
ahci: Fix 'Invaild' typo

This fixes a spelling error in a message which can be output to the
console.

Signed-off-by: Taylor Hutt <thutt@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agoahci: Use sizeof(fis) instead of hardcoding '20'
Taylor Hutt [Mon, 29 Oct 2012 05:23:55 +0000 (05:23 +0000)]
ahci: Use sizeof(fis) instead of hardcoding '20'

This cleanup replaces the hardcoded use of '20', which represents the
number of bytes in the FIS, with sizeof(fis).

Signed-off-by: Taylor Hutt <thutt@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agoahci: Make the AHCI code find the capacity of disks > 128 GB properly
Gabe Black [Mon, 29 Oct 2012 05:23:54 +0000 (05:23 +0000)]
ahci: Make the AHCI code find the capacity of disks > 128 GB properly

In the structure returned by the ATA identify device command, there are two
fields which describe the device capacity. One is a 32 bit data type which
reports the number of sectors as a 28 bit LBA, and the other is a 64 bit data
type which is for a 48 bit LBA. If the device doesn't support 48 bit LBAs,
the small value is the only value with the correct size. If it supports more,
if the number of sectors is small enough to fit into 28 bits, both fields
reflect the correct value. If it's too large, the smaller field has 28 bits of
1s, 0xfffffff, and the other field has the correct value.

The AHCI driver is implemented by attaching to the generic SCSI code and
translating on the fly between SCSI binary data structures and AHCI data
structures. It responds to requests to execute specific SCSI commands by
executing the equivalent AHCI commands and then crafting a response which
matches what a SCSI disk would send.

The AHCI driver now considers both fields and chooses the correct one when
implementing both the SCSI READ CAPACITY (10) and READ CAPACITY (16) commands.

Signed-off-by: Gabe Black <gabeblack@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agoahci: support scsi writing in AHCI driver
Hung-Te Lin [Mon, 29 Oct 2012 05:23:53 +0000 (05:23 +0000)]
ahci: support scsi writing in AHCI driver

The "scsi write" command requires support from underlying driver.
This CL enables SCSI_WRITE10 in AHCI driver.

Tested in U-Boot console, try to i/o with sector #64:
scsi read 1000 40 1
md.b 1000 200 # check if things are not 0xcc
mw.b 1000 cc 200 # try to fill with 0xcc
scsi write 1000 40 1
mw.b 1000 0 200 # fill with zero
md.b 1000 200 # should be all 0
scsi read 1000 40 1
md.b 1000 200 # should be all 0xcc

Signed-off-by: Hung-Te Lin <hungte@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agoahci: Make sending the SETFEATURES_XFER command optional
Gabe Black [Mon, 29 Oct 2012 05:23:52 +0000 (05:23 +0000)]
ahci: Make sending the SETFEATURES_XFER command optional

This command doesn't really do anything when talking to a SATA device, and
sending it confuses some of them. This change makes sending the command
optional, and defaults to not. The situations where it should be sent are not
the common case.

With the standard SSD in the machine, here are some times with the option
turned off:
1. 8277
2. 8273
3. 8050

And turned on:
1. 8303
2. 8155
3. 8276

Sending that command seems to have no meaningful effect on performance.

This fixes problems with an SSD marked Toshiba NV6424, Taiwan 11159AE P
and TC58NVG5D2FTA10.

Signed-off-by: Gabe Black <gabeblack@chromium.org>
Signed-off-by: Taylor Hutt <thutt@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agoahci: cosmetics and cleanup
Stefan Reinauer [Mon, 29 Oct 2012 05:23:51 +0000 (05:23 +0000)]
ahci: cosmetics and cleanup

- print the correct speed
- print all the AHCI capability flags
(information taken from Linux kernel driver)
- clean up some comments

For example, this might show the following string:
AHCI 0001.0300 32 slots 6 ports 6 Gbps 0x3 impl SATA mode

Signed-off-by: Stefan Reinauer <reinauer@chromium.org>
Commit-Ready: Stefan Reinauer <reinauer@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
Tested-by: Stefan Reinauer <reinauer@chromium.org>
11 years agoahci: Improve AHCI debugging
Stefan Reinauer [Mon, 29 Oct 2012 05:23:50 +0000 (05:23 +0000)]
ahci: Improve AHCI debugging

- remove unused ssleep macro
- add some useful debugging information

Signed-off-by: Stefan Reinauer <reinauer@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agoahci: Optimise AHCI controller reset and start-up
Stefan Reinauer [Mon, 29 Oct 2012 05:23:49 +0000 (05:23 +0000)]
ahci: Optimise AHCI controller reset and start-up

The existing code waits a whole second for the AHCI controller to reset.
Instead, let's poll the status register to see if the reset has
succeeded and return earlier if possible. This brings down the time for
AHCI probing from 1s to 20ms.

Signed-off-by: Stefan Reinauer <reinauer@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agoscsi: Add function and env var to report number of scsi drives
Stefan Reinauer [Mon, 29 Oct 2012 05:23:48 +0000 (05:23 +0000)]
scsi: Add function and env var to report number of scsi drives

Add a new function to find out the number of available SCSI disks. Also
set the 'scsidevs' environment variable after each scan.

Signed-off-by: Stefan Reinauer <reinauer@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agoSupport setenv_ulong() and setenv_addr() for powerpc
Simon Glass [Mon, 29 Oct 2012 05:23:47 +0000 (05:23 +0000)]
Support setenv_ulong() and setenv_addr() for powerpc

This includes were outside an #ifdef CONFIG_PPC, but there is not reason
to exclude powerpc from using them.

Move the declaration outside the #ifdef.

Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agoscsi: Add scsi_write to SCSI driver
Hung-Te Lin [Mon, 29 Oct 2012 05:23:46 +0000 (05:23 +0000)]
scsi: Add scsi_write to SCSI driver

Implement write functionality in the scsi layer. A ''scsi write'
command is also added to console for testing.

Signed-off-by: Hung-Te Lin <hungte@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agoscsi: Provide support for a list of AHCI controllers.
Vadim Bendebury [Mon, 29 Oct 2012 05:23:45 +0000 (05:23 +0000)]
scsi: Provide support for a list of AHCI controllers.

Many AHCI controllers are identical, the main (and often the
only) difference being the PCI Vendor ID/Device ID combination
reported by the device.

This change allows the config file to define a list of PCI vendor
ID/device ID pairs. The driver would scan the list and initialize
the first device it finds.

No actual multiple device list is introduced yet, this change
just add the framework.

Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Signed-off-by: Taylor Hutt <thutt@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agoahci: Support splitting of read transactions into multiple chunks
Vadim Bendebury [Mon, 29 Oct 2012 05:23:44 +0000 (05:23 +0000)]
ahci: Support splitting of read transactions into multiple chunks

With an Intel AHCI controller, the driver does not operate properly
if the requested amount of blocks to read exceeds 255.

It is probably possible to specify 0 as the block count and the driver
will read 256 blocks, but it was decided to limit the number of blocks
read at once to 128 (it should be a power of 2 for the optimal
performance of solid state drives).

Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agoZFS: Fix compile warning in fs/zfs/zfs.c (GCC 4.6.4 from ELDK 5.2.1)
Stefan Roese [Fri, 26 Oct 2012 04:24:01 +0000 (04:24 +0000)]
ZFS: Fix compile warning in fs/zfs/zfs.c (GCC 4.6.4 from ELDK 5.2.1)

This patch fixes the following compile warning:
zfs.c:2006:1: warning: 'zfs_label' defined but not used [-Wunused-function]
zfs.c:2029:1: warning: 'zfs_uuid' defined but not used [-Wunused-function]

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Jorgen Lundman <lundman@lundman.net>
11 years agoZFS: Fix compile warning in cmd_zfs.c (GCC 4.6.4 from ELDK 5.2.1)
Stefan Roese [Fri, 26 Oct 2012 04:24:00 +0000 (04:24 +0000)]
ZFS: Fix compile warning in cmd_zfs.c (GCC 4.6.4 from ELDK 5.2.1)

This patch fixes the following compile warnings:

cmd_zfs.c:177:1: warning: initialization from incompatible pointer type [enabled by default]
cmd_zfs.c:177:1: warning: (near initialization for '_u_boot_list_cmd_zfsls.cmd') [enabled by default]
cmd_zfs.c:182:1: warning: initialization from incompatible pointer type [enabled by default]
cmd_zfs.c:182:1: warning: (near initialization for '_u_boot_list_cmd_zfsload.cmd') [enabled by default]

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Jorgen Lundman <lundman@lundman.net>
11 years agoam335x_evm: Add CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG support
Tom Rini [Wed, 24 Oct 2012 07:28:17 +0000 (07:28 +0000)]
am335x_evm: Add CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG support

We add CONFIG_ENV_VARS_UBOOT_CONFIG,
CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG and CONFIG_BOARD_LATE_INIT to set
the variables and then fdtfile and findfdt to make us of this.  It is
now possible to do 'run findfdt' to have fdtfile be set to the value of
the dtb file to load for the board we are running on.

Signed-off-by: Tom Rini <trini@ti.com>
11 years agoAdd board_name to CONFIG_ENV_VARS_UBOOT_CONFIG
Stephen Warren [Wed, 31 Oct 2012 11:17:28 +0000 (11:17 +0000)]
Add board_name to CONFIG_ENV_VARS_UBOOT_CONFIG

CONFIG_ENV_VARS_UBOOT_CONFIG creates environment variables indicating
which configuration U-Boot was built for. Some U-Boot binaries run on
multiple boards, and hence this information may not uniquley describe
the HW that U-Boot is actually running on. Another patch introduces
environment variable board_name to represent that. In order to avoid
scripts having to check $board_name, use it if set, and then fall back
to using $board, make CONFIG_ENV_VARS_UBOOT_CONFIG also set a default
value for board_name, so that variable is always available.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
11 years agoREADME: Document CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG
Tom Rini [Wed, 24 Oct 2012 07:28:16 +0000 (07:28 +0000)]
README: Document CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG

This option is intended to be set by boards which will set the
board_name and board_rev environment variables.  These are to be used
when the U-Boot binary can support more than one board type at run-time
and the user needs an easy way (for example for scripting to determine
what device tree to load) to determine what board they are on.

Signed-off-by: Tom Rini <trini@ti.com>
11 years agogit-mailrc: Change x86 maintainer to Simon
Simon Glass [Wed, 31 Oct 2012 12:41:49 +0000 (12:41 +0000)]
git-mailrc: Change x86 maintainer to Simon

Grame is still listed since he has agreed to continue with some review.
Also add an alias to shorten things.

Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agolib/vsprintf.c: don't special-case pointers to address null
Wolfgang Denk [Tue, 30 Oct 2012 09:19:52 +0000 (09:19 +0000)]
lib/vsprintf.c: don't special-case pointers to address null

The %p format of printf() would print a pointer to address null as
"(null)".  This makes sense in a real OS where a NULL pointer must
never be dereferenced, but this is a bootloader, and there are cases
where accessing the data at address null makes perfect sense.

Remove the special case in lib/vsprintf.c using "#if 0" with a comment
to make clear this was an intentional change and to stop re-adding
this code.

Signed-off-by: Wolfgang Denk <wd@denx.de>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
11 years agocmd_fdt.c: Use %p when printing pointers
Tom Rini [Mon, 29 Oct 2012 14:53:18 +0000 (14:53 +0000)]
cmd_fdt.c: Use %p when printing pointers

When putting pointers into a format string use %p to ensure that they
are printed correctly regardless of bitsize.  This fixes warnings on
sandbox on 64bit systems.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Cc: Gerald Van Baren <vanbaren@cideas.com>
Signed-off-by: Tom Rini <trini@ti.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
11 years agofs: handle CONFIG_NEEDS_MANUAL_RELOC
Stephen Warren [Tue, 30 Oct 2012 07:50:47 +0000 (07:50 +0000)]
fs: handle CONFIG_NEEDS_MANUAL_RELOC

Without this, fstypes[].probe points at the wrong place, so calling the
function results in undefined behaviour.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Tested-by: Andreas Bießmann <andreas.devel@googlemail.com>
11 years agoam335x: add initial AM335x IDK board support
Matthias Fuchs [Fri, 2 Nov 2012 03:35:59 +0000 (03:35 +0000)]
am335x: add initial AM335x IDK board support

This patch extends the am335x_evm board for the AM335x IDK.

The IDK board uses MII for the ethernet phy (same as
Beaglebone board) and MMC0 for storage (but without
card detect line).

The IDK uses UART3 for console. So u-boot must be build
with CONFIG_SERIAL4 and CONFIG_CONS_INDEX=4 or for
the am335x_evm_uart3 board configuration as introduced
by Andrew Bradfords recent patch series "am33xx: Enable
UART {1,2,3,4,5}...". When using the IDK with console on UART0,
those patches are not required. In this case the board
slightly needs to be modified.

Signed-off-by: Matthias Fuchs <matthias.fuchs@esd.eu>
11 years agoavr32: allow multi block mmc access for all boards
Andreas Bießmann [Wed, 17 Oct 2012 00:00:48 +0000 (00:00 +0000)]
avr32: allow multi block mmc access for all boards

Commit 1db7377a70a8d931c32648e717695133120d5456 fixes the gen_atmel_mci driver
to be able to use multi block access for avr32. Therefore remove the setting
which forces single block access.

This also adds a huge performace gain for mmc access:
---8<---
Loading file "/boot/uImage" from mmc device 0:1
1830666 bytes read in 1293 ms (1.3 MiB/s)
--->8---

vs.

---8<---
Loading file "/boot/uImage" from mmc device 0:1
1830666 bytes read in 237 ms (7.4 MiB/s)
--->8---

Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
Cc: haavard.skinnemoen@atmel.com
Cc: hans-christian.egtvedt@atmel.com
Cc: mpfj@mimc.co.uk
Cc: alex.raimondi@miromico.ch
Cc: julien.may@miromico.ch
Cc: egtvedt@samfundet.no
Cc: havard@skinnemoen.net
11 years agoomap3: Rework board.c for !CONFIG_SYS_L2CACHE_OFF
Tom Rini [Wed, 31 Oct 2012 05:23:28 +0000 (22:23 -0700)]
omap3: Rework board.c for !CONFIG_SYS_L2CACHE_OFF

When CONFIG_SYS_L2CACHE_OFF is defined we end up with a few warnings
currently.  Re-order functions so that we don't have that anymore.

Signed-off-by: Tom Rini <trini@ti.com>
11 years agoam335x: add mux config for DDR3 version of beaglebone
Koen Kooi [Tue, 23 Oct 2012 01:56:40 +0000 (01:56 +0000)]
am335x: add mux config for DDR3 version of beaglebone

This fixes the following boothang in SPL:

Unknown board, cannot configure pinmux.### ERROR ### Please RESET the board ###

Future commits will add pinmuxes for more on-board peripherals.

Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
11 years agoeco5pk: Add new board and default config
Raphael Assenat [Mon, 22 Oct 2012 05:23:46 +0000 (05:23 +0000)]
eco5pk: Add new board and default config

Signed-off-by: Raphael Assenat <raph@8d.com>
[trini: Squash boards.cfg / MAINTAINERS change into main patch]
Signed-off-by: Tom Rini <trini@ti.com>
11 years agoNew board support: Nokia RX-51 aka N900
Pali Rohár [Mon, 29 Oct 2012 07:54:01 +0000 (07:54 +0000)]
New board support: Nokia RX-51 aka N900

Based on previous work by: Alistair Buxton <a.j.buxton@gmail.com>

Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
Cc: Ивайло Димитров <freemangordon@abv.bg>
11 years agocfb_console: Add support for some ANSI terminal escape codes
Pali Rohár [Fri, 19 Oct 2012 13:30:09 +0000 (13:30 +0000)]
cfb_console: Add support for some ANSI terminal escape codes

Add optional support for some ANSI escape sequences to the
cfb_console driver. Define CONFIG_CFB_CONSOLE_ANSI to enable
cursor moving, color reverting and clearing the cfb console
via ANSI escape codes.

Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
Signed-off-by: Anatolij Gustschin <agust@denx.de>
11 years agoAdd power bus message definitions in twl4030.h
Pali Rohár [Fri, 19 Oct 2012 02:00:06 +0000 (02:00 +0000)]
Add power bus message definitions in twl4030.h

* Code copied from linux kernel 3.0.0 from file include/linux/i2c/twl.h
* commit 6523b148b44be38d89c2ee9865d34da30d9f5f1c

Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
11 years agoarm bootm: Allow to pass board specified atags
Pali Rohár [Fri, 19 Oct 2012 02:00:04 +0000 (02:00 +0000)]
arm bootm: Allow to pass board specified atags

Board can implement function setup_board_tags which is used for adding atags

Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
11 years agoMAKEALL: Add -s to '${MAKE} tidy' section
Tom Rini [Thu, 25 Oct 2012 08:53:14 +0000 (08:53 +0000)]
MAKEALL: Add -s to '${MAKE} tidy' section

When BUILD_NBUILDS is > 1 we run the tidy command.  With the addition of
DocBook this now includes a -C doc/DocBook and a 'entering/leaving' pair
of messages happen.  Since we don't want to see what's being cleaned
here, we can just invoke make -s like we do when building.

Signed-off-by: Tom Rini <trini@ti.com>
11 years agoext4: Fix printf() format string error
Simon Glass [Tue, 23 Oct 2012 13:49:25 +0000 (13:49 +0000)]
ext4: Fix printf() format string error

Fix the following error in the ext4 command:

cmd_ext4.c:110:3: error: format '%lu' expects argument of type
'long unsigned int', but argument 4 has type 'int' [-Werror=format]

Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agoFPGA: Cyclon II: Correctly reset the FPGA before configuration
Stephan Gatzka [Mon, 22 Oct 2012 23:11:41 +0000 (23:11 +0000)]
FPGA: Cyclon II: Correctly reset the FPGA before configuration

Deassert the CONFIG pin before asserting it again. This assures that the
FPGA will be resetted and therefore configuration will be correctly
enabled.

This is also already done on other FPGA's, e.g. Stratix.

Signed-off-by: Stephan Gatzka <stephan.gatzka@hbm.com>
Signed-off-by: Stefan Roese <sr@denx.de>
11 years agofs: add filesystem switch libary, implement ls and fsload commands
Stephen Warren [Mon, 22 Oct 2012 06:43:51 +0000 (06:43 +0000)]
fs: add filesystem switch libary, implement ls and fsload commands

Implement "ls" and "fsload" commands that act like {fat,ext2}{ls,load},
and transparently handle either file-system. This scheme could easily be
extended to other filesystem types; I only didn't do it for zfs because
I don't have any filesystems of that type to test with.

Replace the implementation of {fat,ext[24]}{ls,load} with this new code
too.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
11 years agofs: separate CONFIG_FS_{FAT, EXT4} from CONFIG_CMD_{FAT, EXT*}
Stephen Warren [Mon, 22 Oct 2012 06:43:50 +0000 (06:43 +0000)]
fs: separate CONFIG_FS_{FAT, EXT4} from CONFIG_CMD_{FAT, EXT*}

This makes the FAT and ext4 filesystem implementations build if
CONFIG_FS_{FAT,EXT4} are defined, rather than basing the build on
whether CONFIG_CMD_{FAT,EXT*} are defined. This will allow the
filesystems to be built separately from the filesystem-specific commands
that use them. This paves the way for the creation of filesystem-generic
commands that used the filesystems, without requiring the filesystem-
specific commands.

Minor documentation changes are made for this change.

The new config options are automatically selected by the old config
options to retain backwards-compatibility.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
11 years agofs: delete unused Makefile
Stephen Warren [Mon, 22 Oct 2012 06:43:49 +0000 (06:43 +0000)]
fs: delete unused Makefile

fs/Makefile is unused. The top-level Makefile sets LIBS-y += fs/xxx and
hence causes make to directly descend two directory levels into each
individual filesystem, and it never descends into fs/ itself.

So, delete this useless file.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Acked-by: Simon Glass <sjg@chromium.org>
11 years agoarm720t: add back common.h include
Allen Martin [Mon, 29 Oct 2012 10:47:43 +0000 (10:47 +0000)]
arm720t: add back common.h include

Add back common.h header that was removed in previous patch so that
CONFIG_TEGRA can be evaluated correctly.

Signed-off-by: Allen Martin <amartin@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
11 years agoserial: remove calls to serial_assign()
Allen Martin [Thu, 25 Oct 2012 13:30:14 +0000 (13:30 +0000)]
serial: remove calls to serial_assign()

Remove calls to serial_assign() that are failing now that it returns a
proper error code.  This calls were not actually doing anything
because they passed the name of a stdio_dev when a serial_device name
is exptectd.

Signed-off-by: Allen Martin <amartin@nvidia.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Acked-by: Marek Vasut <marex@denx.de>
Acked-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
Tested-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
11 years agoARM: tegra: combine duplicate Makefile rules
Stephen Warren [Tue, 16 Oct 2012 11:50:07 +0000 (11:50 +0000)]
ARM: tegra: combine duplicate Makefile rules

The rules to generate u-boot-{no,}dtb-tegra.bin were almost identical.
Combine them into a single paremeterized rule. This will allow the next
patch to edit a single rule, rather than being cut/paste twice.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
11 years agotegra20: initialize variable to avoid compiler warning
Allen Martin [Fri, 19 Oct 2012 21:18:03 +0000 (21:18 +0000)]
tegra20: initialize variable to avoid compiler warning

Initialize this variable to avoid a compiler warning about possible
use of uninitialized variable with gcc 4.4.6.

Signed-off-by: Allen Martin <amartin@nvidia.com>
Acked-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
11 years agotegra: move to common SPL framework
Allen Martin [Fri, 19 Oct 2012 21:08:23 +0000 (21:08 +0000)]
tegra: move to common SPL framework

Change tegra SPL to use common SPL framework.  Any tegra specific
initialization is now done in spl_board_init() instead of
board_init_f()/board_init_r().  Only one SPL boot target is supported
on tegra, which is boot to RAM image.  jump_to_image_no_args() must be
overridden on tegra so the host CPU can be initialized.

Signed-off-by: Allen Martin <amartin@nvidia.com>
Acked-by: Stephen Warren <swarren@nvidia.com>
Tested-by: Stephen Warren <swarren@nvidia.com>
Tested-by: Lucas Stach <dev@lynxeye.de>
Acked-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
11 years agoSPL: make jump_to_image_no_args a weak symbol
Allen Martin [Fri, 19 Oct 2012 21:08:22 +0000 (21:08 +0000)]
SPL: make jump_to_image_no_args a weak symbol

Change jump_to_image_no_args() to a weak symbol to allow override by
SoC specific code.  This is required by tegra because the SPL runs on
a different CPU from the image it is loading, so tegra specific
initialization is required to start the host CPU.  Pass in spl_image
as a parameter for the same reason.

Signed-off-by: Allen Martin <amartin@nvidia.com>
Acked-by: Tom Rini <trini@ti.com>
Acked-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
11 years agoARM: tegra: don't request GPIO from Seaboard's SPL
Stephen Warren [Mon, 22 Oct 2012 06:19:36 +0000 (06:19 +0000)]
ARM: tegra: don't request GPIO from Seaboard's SPL

Seaboard has a GPIO that switches an external mux between Tegra's debug
UART and SPI flash. This is initialized from the SPL so that SPL debug
output can be seen. Simplify the code that does this, and don't actually
request the GPIO in the SPL; just program it. This saves ~4.5K from the
size of the SPL, mostly BSS due to the large gpio_names[] table that is
no longer required. This makes Seaboard's SPL fit within the current max
size.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Simon Glass <sjg@chromium.org>
Acked-by: Allen Martin <amartin@nvidia.com>
Tested-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
11 years agoARM: tegra: select between Seaboard/Ventana at compile time
Stephen Warren [Mon, 22 Oct 2012 06:19:35 +0000 (06:19 +0000)]
ARM: tegra: select between Seaboard/Ventana at compile time

Seaboard and Ventana are very similar boards, and so share the seaboard.c
board file. The one difference needed so far is detected at run-time by
calling machine_is_ventana(). This bloats the Ventana build with code
that is never used. Switch to detecting Ventana at compile time to remove
bloat. This shaves ~5K off the SPL size on Ventana, and makes the SPL fit
within the max size.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
11 years agoARM: tegra: derive CONFIG_SPL_MAX_SIZE instead of hard-coding it
Stephen Warren [Mon, 22 Oct 2012 06:19:34 +0000 (06:19 +0000)]
ARM: tegra: derive CONFIG_SPL_MAX_SIZE instead of hard-coding it

For Tegra, the SPL and main U-Boot are concatenated together to form a
single memory image. Hence, the maximum SPL size is the different in
TEXT_BASE for SPL and main U-Boot. Instead of manually calculating
SPL_MAX_SIZE based on those two TEXT_BASE, which can lead to errors if
one TEXT_BASE is changed without updating SPL_MAX_SIZE, simply perform
the calculation automatically.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Simon Glass <sjg@chromium.org>
Acked-by: Allen Martin <amartin@nvidia.com>
Tested-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
11 years agoARM: enhance u-boot.lds to detect over-sized SPL
Stephen Warren [Mon, 22 Oct 2012 06:19:33 +0000 (06:19 +0000)]
ARM: enhance u-boot.lds to detect over-sized SPL

Add an ASSERT() to u-boot.lds to detect an SPL that doesn't fit within
SPL_TEXT_BASE..SPL_MAX_SIZE.

Different .lds files implement this check in two possible ways:
1) An ASSERT() like this
2) Defining a MEMORY region of size SPL_MAX_SIZE, and re-directing all
   linker output into that region. Since u-boot.lds is used for both
   SPL and main U-Boot, this would entail only sometimes defining a
   MEMORY region, and only sometimes performing that redirection, and
   hence option (1) was deemed much simpler, and hence implemented.

Note that this causes build failures at least for NVIDIA Tegra Seaboard
and Ventana. However, these are legitimate; the SPL doesn't fit within
the required space, and this does cause runtime issues.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Simon Glass <sjg@chromium.org>
Acked-by: Allen Martin <amartin@nvidia.com>
Acked-by: Tom Rini <trini@ti.com>
Tested-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
11 years agotegra: nand: make ONFI detection work
Lucas Stach [Sun, 7 Oct 2012 11:29:38 +0000 (11:29 +0000)]
tegra: nand: make ONFI detection work

Add the missing bits to the Tegra NAND driver to make ONFI detection work
properly.

Also add it to the Tegra default config, as it seems to be a reasonable thing
to have it available on all boards that use any kind of NAND.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Acked-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
11 years agoARM: tegra: Whistler: remove unused USB alias
Stephen Warren [Fri, 12 Oct 2012 09:45:50 +0000 (09:45 +0000)]
ARM: tegra: Whistler: remove unused USB alias

Port USB1 on Whistler is intended as a device port for USB recovery.
Whistler's DT currently contains an alias for this USB port, even though
Whistler's config doesn't enable multiple USB controllers, so the alias
is unused. Remove the unused alias for consistency for now. Similar,
explicitly disable the port in the device tree too.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
11 years agoARM: tegra: Seaboard: enable multiple USB ports
Stephen Warren [Fri, 12 Oct 2012 09:45:49 +0000 (09:45 +0000)]
ARM: tegra: Seaboard: enable multiple USB ports

The device tree already contains the required configuration for both the
USB1 and USB3 ports. Enable the required configuration options to enable
both these ports, which in turn allows the USB1 port to be used.

Note that on a true Seaboard, this port is typically used as a device
port hosting Tegra's USB recovery protocol. However, on the Springbank
derivative, this port is the only external USB port, so we enable it as
a host port so that USB peripherals may be used. Enabling this port in
U-Boot as a host port doesn't prevent the port from reverting to a
device port when the CPU is reset into recovery mode.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
11 years agoARM: tegra: Harmony: enable ULPI USB port
Stephen Warren [Fri, 12 Oct 2012 09:45:48 +0000 (09:45 +0000)]
ARM: tegra: Harmony: enable ULPI USB port

The ULPI port is routed onto pins on the mini PCI Express connector. A
standard breakout board may be used to access the port.

* Add required DT entries to configure the ULPI port.
* Setup up the ULPI pinmux in the board code.
* Enable multiple USB controller and ULPI support in the board config.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
11 years agoARM: tegra: use standard variables to define load addresses
Stephen Warren [Tue, 2 Oct 2012 09:26:51 +0000 (09:26 +0000)]
ARM: tegra: use standard variables to define load addresses

Currently, Tegra's default environment uses non-standard variables to define
where boot scripts should load the kernel, FDT, and initrd. This change both
changes the variable names to match those described in U-Boot's README, and
shuffles their values around a little so that the values make a little more
sense; see comments in the patch for rationale behind the values chosen.

Note that this patch does remove the old non-standard variable "fdt_load" from
the default environment, so this patch requires people to change their boot
scripts.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
11 years agoARM: tegra: define CONFIG_SYS_BOOTMAPSZ
Stephen Warren [Thu, 20 Sep 2012 09:29:03 +0000 (09:29 +0000)]
ARM: tegra: define CONFIG_SYS_BOOTMAPSZ

This define indicates the size of the memory region where it is safe
to place data passed to the Linux kernel (ATAGs, DTB, initrd). The
value needs to be:

a) Less than or equal to RAM size.
b) Small enough that the area is not within the kernel's highmem region,
   since the kernel cannot access ATAGs/DTB/initrd from highmem.
c) Large enough to hold the kernel+DTB+initrd.

256M seems large enough for (c) in most circumstances, and small enough
to satisfy (a) and (b) across any possible Tegra board. Note that the
user can override this value via environment variable "bootm_mapsize"
if needed.

The advantage of defining BOOTMAPSZ is that we no longer need to define
variable fdt_high in the default environment. Previously, we defined
this to prevent the DTB from being relocated to the very end of RAM,
which on most Tegra systems is within highmem, and hence which would
cause boot failures. A user can still define this variable themselves
if they want the FDT to be either left in-place wherever loaded, or
copied to some other specific location. Similarly, there should no
longer be a strict requirement for the user to define initrd_high if
using an initrd.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
11 years agotegra: add Colibri T20 board support
Lucas Stach [Sun, 7 Oct 2012 11:36:06 +0000 (11:36 +0000)]
tegra: add Colibri T20 board support

This adds board support for the Toradex Colibri T20 module.

Working functions:
- SD card boot
- USB boot
- Network
- NAND environment

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Tom Warren <twarren@nvidia.com>
11 years agotegra: move common features to a common makefile
Marc Dietrich [Wed, 3 Oct 2012 04:26:28 +0000 (04:26 +0000)]
tegra: move common features to a common makefile

For Non-Nvidia boards to include newly added features (like emc clock
scaling) it would be necessary to add each feature to their own board
Makefile. This is because currently the top Makefile automaticly includes
these features only for Nvidia boards.

This patch adds a simple Makefile include so all new features become
available for non-Nvidia board vendors.

Cc: Stephen Warren <swarren@wwwdotorg.org>
Cc: Tom Warren <twarren@nvidia.com>
Cc: Thierry Reding <thierry.reding@avionic-design.de>
Cc: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Marc Dietrich <marvin24@gmx.de>
Acked-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Thierry Reding <thierry.reding@avionic-design.de>
Signed-off-by: Tom Warren <twarren@nvidia.com>
11 years agoMerge branch 'master' of git://git.denx.de/u-boot-coldfire
Tom Rini [Mon, 29 Oct 2012 15:02:11 +0000 (08:02 -0700)]
Merge branch 'master' of git://git.denx.de/u-boot-coldfire

11 years agoColdFire: Remove save env in NAND support for M54418TWR board.
Jason Jin [Thu, 25 Oct 2012 07:27:37 +0000 (15:27 +0800)]
ColdFire: Remove save env in NAND support for M54418TWR board.

This patch remove the env saving in NAND as so far the
NAND driver is not ported to the M54418TWR platform.

Signed-off-by: Jason Jin <Jason.jin@freescale.com>
11 years agoColdFire: Update the lds file for M54418TWR board.
Jason Jin [Thu, 25 Oct 2012 06:51:42 +0000 (14:51 +0800)]
ColdFire: Update the lds file for M54418TWR board.

The M54418TWR lds file  need to update since commit:

8b493a52367623f36e628e4ab2cf8ee082b655e0

common: Discard the __u_boot_cmd section

The command declaration now uses the new LG-array method to generate
list of commands. Thus the __u_boot_cmd section is now superseded and
redundant and therefore can be removed. Also, remove externed symbols
associated with this section from include/command.h .

Signed-off-by: Jason Jin <Jason.jin@freescale.com>
11 years agoESTEEM192E: adjust linker script to grown code size
Wolfgang Denk [Wed, 24 Oct 2012 02:36:17 +0000 (02:36 +0000)]
ESTEEM192E: adjust linker script to grown code size

Once more, some of the previous changes caused the code to grow, which
causes errors like

u-boot.lds:74 cannot move location counter backwards (from 40008384 to 40008000)

when building with some older tool chains (like ELDK 4.2).
Adjust the linker script to make fit again.

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Conn Clark <clark@esteem.com>
11 years agoTQM8xx: adjust linker script to grown code size
Wolfgang Denk [Wed, 24 Oct 2012 02:36:16 +0000 (02:36 +0000)]
TQM8xx: adjust linker script to grown code size

Once more, some of the previous changes caused the code to grow, which
causes errors like

u-boot.lds:80 cannot move location counter backwards (from 400082a4 to 40008000)

when building with some older tool chains (like ELDK 4.2).
Adjust the linker script to make fit again.

Signed-off-by: Wolfgang Denk <wd@denx.de>
11 years agoPPC: remove dead boards (AMX860, c2mon, ETX094, IAD210, LANTEC, SCM)
Wolfgang Denk [Wed, 24 Oct 2012 02:36:15 +0000 (02:36 +0000)]
PPC: remove dead boards (AMX860, c2mon, ETX094, IAD210, LANTEC, SCM)

These boards have long reached EOL, and there has been no indication
of any active users of such hardware for years.  Get rid of the dead
weight.

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Wolfgang Grandegger <wg@denx.de>
11 years agoMerge remote-tracking branch 'u-boot-imx/master'
Albert ARIBAUD [Sat, 27 Oct 2012 09:43:17 +0000 (11:43 +0200)]
Merge remote-tracking branch 'u-boot-imx/master'

11 years agoMerge branch 'master' of git://git.denx.de/u-boot-arm
Tom Rini [Fri, 26 Oct 2012 22:44:31 +0000 (15:44 -0700)]
Merge branch 'master' of git://git.denx.de/u-boot-arm

11 years agoARM: fix u-boot.lds for -ffunction-sections/-fdata-sections
Stephen Warren [Mon, 22 Oct 2012 06:19:32 +0000 (06:19 +0000)]
ARM: fix u-boot.lds for -ffunction-sections/-fdata-sections

When -ffunction-sections or -fdata-section are used, symbols are placed
into sections such as .data.eserial1_device and .bss.serial_current.
Update the linker script to explicitly include these. Without this
change (at least with my gcc-4.5.3 built using crosstool-ng), I see that
the sections do end up being included, but __bss_end__ gets set to the
same value as __bss_start.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Allen Martin <amartin@nvidia.com>
Acked-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
11 years agoarm: ks8695: use defined constants for UART
Yann Vernier [Fri, 5 Oct 2012 02:09:48 +0000 (02:09 +0000)]
arm: ks8695: use defined constants for UART

CONFIG_BAUDRATE and KS8695_UART_LINEC_WLEN8 used for UART registers

11 years agoOrigen: Add default clock settings for multimedia IPs
Annamalai Lakshmanan [Thu, 30 Aug 2012 20:33:58 +0000 (20:33 +0000)]
Origen: Add default clock settings for multimedia IPs

Added clock settings for MFC, FIMC, FB and G3D. They are clocked to
maximum respective frequencies as per datasheet.

Signed-off-by: Annamalai Lakshmanan <annamalai.lakshmanan@linaro.org>
Signed-off-by: Giridhar Maruthy <giridhar.maruthy@linaro.org>
Signed-off-by: Inderpal Singh <inderpal.singh@linaro.org>
Signed-off-by: Tushar Behera <tushar.behera@linaro.org>
11 years agoarm: arm925t: remove SX1 board
Albert ARIBAUD [Thu, 18 Oct 2012 10:15:45 +0000 (10:15 +0000)]
arm: arm925t: remove SX1 board

SX1 does not build properly by itself, is not built
as part of MAKEALL arm or MAKEALL -a arm, and is only
present in Makefile, not boards.cfg. As it also has no
entry in MAINTAINERS, it is orphan and non-functional.
Remove it.

Signed-off-by: Albert ARIBAUD <albert.u.boot@aribaud.net>
11 years agoarm720: Remove CONFIG_ARM7_REVD
Marek Vasut [Wed, 3 Oct 2012 08:54:13 +0000 (08:54 +0000)]
arm720: Remove CONFIG_ARM7_REVD

This is a dead code, remove it.

Signed-off-by: Marek Vasut <marex@denx.de>
11 years agoarm720: Further clean up the arm720t directory
Marek Vasut [Wed, 3 Oct 2012 08:54:12 +0000 (08:54 +0000)]
arm720: Further clean up the arm720t directory

Clean up away old macros and such, so the file doesn't start piling
up cruft.

Signed-off-by: Marek Vasut <marex@denx.de>
clean

11 years agostdio: Remove the CLPS7111 serial driver
Marek Vasut [Wed, 3 Oct 2012 08:54:11 +0000 (08:54 +0000)]
stdio: Remove the CLPS7111 serial driver

This driver is no longer used, remove it.

Signed-off-by: Marek Vasut <marex@denx.de>
11 years agoarm: Remove support for NETARM
Marek Vasut [Wed, 3 Oct 2012 08:54:10 +0000 (08:54 +0000)]
arm: Remove support for NETARM

This stuff has been rotting in the tree for a while now. Remove it.

Signed-off-by: Marek Vasut <marex@denx.de>
11 years agoarm: Remove support for s3c4510
Marek Vasut [Wed, 3 Oct 2012 08:54:09 +0000 (08:54 +0000)]
arm: Remove support for s3c4510

This stuff has been rotting in the tree for a year now. Remove it.

Signed-off-by: Marek Vasut <marex@denx.de>
11 years agoarm: Remove support for lpc2292
Marek Vasut [Wed, 3 Oct 2012 08:54:08 +0000 (08:54 +0000)]
arm: Remove support for lpc2292

This stuff has been rotting in the tree for a year now. Remove it.

Signed-off-by: Marek Vasut <marex@denx.de>
11 years agoserial: remove calls to serial_assign()
Allen Martin [Thu, 25 Oct 2012 13:30:14 +0000 (13:30 +0000)]
serial: remove calls to serial_assign()

Remove calls to serial_assign() that are failing now that it returns a
proper error code.  This calls were not actually doing anything
because they passed the name of a stdio_dev when a serial_device name
is exptectd.

Signed-off-by: Allen Martin <amartin@nvidia.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Acked-by: Marek Vasut <marex@denx.de>
Acked-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
Tested-by: Stephen Warren <swarren@nvidia.com>
11 years agoMX5: fix warning in clock.c
Stefano Babic [Wed, 24 Oct 2012 08:06:28 +0000 (10:06 +0200)]
MX5: fix warning in clock.c

Patch fix warnings compiling with ELDK-4.2:

clock.c: In function 'get_standard_pll_sel_clk':
clock.c:341: warning: 'freq' may be used uninitialized in this function

Reported-by : Marek Vasut <marex@denx.de>
Signed-off-by: Stefano Babic <sbabic@denx.de>
11 years agoMerge remote-tracking branch 'u-boot-atmel/master'
Albert ARIBAUD [Fri, 26 Oct 2012 05:54:25 +0000 (07:54 +0200)]
Merge remote-tracking branch 'u-boot-atmel/master'

11 years agoMerge remote-tracking branch 'u-boot-ti/master'
Albert ARIBAUD [Fri, 26 Oct 2012 05:00:28 +0000 (07:00 +0200)]
Merge remote-tracking branch 'u-boot-ti/master'

11 years agoam335x_evm: Enable use of UART{1,2,3,4,5}
Andrew Bradford [Thu, 25 Oct 2012 12:21:32 +0000 (08:21 -0400)]
am335x_evm: Enable use of UART{1,2,3,4,5}

Add targets of am335x_evm_uart{1,2,3,4,5} to have serial input/output on
UART{1,2,3,4,5} for use with the Beaglebone RS232 cape, am335x_evm
daughterboard, and other custom configurations.

Modify target for am335x_evm to include SERIAL1 and CONS_INDEX=1
options in order to clarify UART selection requirements.

Signed-off-by: Andrew Bradford <andrew@bradfordembedded.com>
11 years agoserial: ns16550: Enable COM5 and COM6
Andrew Bradford [Thu, 25 Oct 2012 12:21:31 +0000 (08:21 -0400)]
serial: ns16550: Enable COM5 and COM6

Increase the possible number of ns16550 serial devices from 4 to 6.

Signed-off-by: Andrew Bradford <andrew@bradfordembedded.com>
11 years agoam33xx: Enable UART{1,2,3,4,5} pin-mux
Andrew Bradford [Thu, 25 Oct 2012 12:21:30 +0000 (08:21 -0400)]
am33xx: Enable UART{1,2,3,4,5} pin-mux

If configured to use UART{1,2,3,4,5} such as on the Beaglebone RS232
cape or on the am335x_evm daughterboard, enable the proper pin-muxing.

Signed-off-by: Andrew Bradford <andrew@bradfordembedded.com>
11 years agoam33xx: Enable UART{1,2,3,4,5} clocks
Andrew Bradford [Thu, 25 Oct 2012 12:21:29 +0000 (08:21 -0400)]
am33xx: Enable UART{1,2,3,4,5} clocks

If configured to use UART{1,2,3,4,5} such as on the Beaglebone RS232
cape or the am335x_evm daughterboard, enable the required clocks for
the UART in use.

Signed-off-by: Andrew Bradford <andrew@bradfordembedded.com>
11 years agoFAT: implement fat_set_blk_dev(), convert cmd_fat.c
Stephen Warren [Wed, 17 Oct 2012 06:44:59 +0000 (06:44 +0000)]
FAT: implement fat_set_blk_dev(), convert cmd_fat.c

This makes the FAT filesystem API more consistent with other block-based
filesystems. If in the future standard multi-filesystem commands such as
"ls" or "load" are implemented, having FAT work the same way as other
filesystems will be necessary.

Convert cmd_fat.c to the new API, so the code looks more like other files
implementing the same commands for other filesystems.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
11 years agoFAT: initialize all fields in cur_part_info, simplify init
Stephen Warren [Wed, 17 Oct 2012 06:44:58 +0000 (06:44 +0000)]
FAT: initialize all fields in cur_part_info, simplify init

cur_part_info.{name,type} are strings. So, we don't need to memset()
the entire thing, just put the NULL-termination in the first byte.

Add missing initialization of the bootable and uuid fields.

None of these fields are actually used by fat.c. However, since it
stores the entire disk_partition_t, we should make sure that all fields
are valid.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
11 years agoFAT: remove cur_part_nr
Stephen Warren [Wed, 17 Oct 2012 06:44:57 +0000 (06:44 +0000)]
FAT: remove cur_part_nr

A future patch will implement the more standard filesystem API
fat_set_blk_dev(). This API has no way to know which partition number
the partition represents. Equally, future DM rework will make the
concept of partition number harder to pass around.

So, simply remove cur_part_nr from fat.c; its only use is in a
diagnostic printf, and the context where it's printed should make it
obvious which partition is referred to anyway (since the partition ID
would come from the user command-line that caused it).

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
11 years agodrivers/serial/serial_ns16550.c: sparse fixes
Kim Phillips [Tue, 16 Oct 2012 14:28:48 +0000 (14:28 +0000)]
drivers/serial/serial_ns16550.c: sparse fixes

serial_ns16550.c:222:1: warning: symbol 'eserial1_init' was not declared. Should it be static?
serial_ns16550.c:222:1: warning: symbol 'eserial1_setbrg' was not declared. Should it be static?
serial_ns16550.c:222:1: warning: symbol 'eserial1_getc' was not declared. Should it be static?
serial_ns16550.c:222:1: warning: symbol 'eserial1_tstc' was not declared. Should it be static?
serial_ns16550.c:222:1: warning: symbol 'eserial1_putc' was not declared. Should it be static?
serial_ns16550.c:222:1: warning: symbol 'eserial1_puts' was not declared. Should it be static?
serial_ns16550.c:225:1: warning: symbol 'eserial2_init' was not declared. Should it be static?
serial_ns16550.c:225:1: warning: symbol 'eserial2_setbrg' was not declared. Should it be static?
serial_ns16550.c:225:1: warning: symbol 'eserial2_getc' was not declared. Should it be static?
serial_ns16550.c:225:1: warning: symbol 'eserial2_tstc' was not declared. Should it be static?
serial_ns16550.c:225:1: warning: symbol 'eserial2_putc' was not declared. Should it be static?
serial_ns16550.c:225:1: warning: symbol 'eserial2_puts' was not declared. Should it be static?
serial_ns16550.c:228:1: warning: symbol 'eserial3_init' was not declared. Should it be static?
serial_ns16550.c:228:1: warning: symbol 'eserial3_setbrg' was not declared. Should it be static?
serial_ns16550.c:228:1: warning: symbol 'eserial3_getc' was not declared. Should it be static?
serial_ns16550.c:228:1: warning: symbol 'eserial3_tstc' was not declared. Should it be static?
serial_ns16550.c:228:1: warning: symbol 'eserial3_putc' was not declared. Should it be static?
serial_ns16550.c:228:1: warning: symbol 'eserial3_puts' was not declared. Should it be static?
serial_ns16550.c:231:1: warning: symbol 'eserial4_init' was not declared. Should it be static?
serial_ns16550.c:231:1: warning: symbol 'eserial4_setbrg' was not declared. Should it be static?
serial_ns16550.c:231:1: warning: symbol 'eserial4_getc' was not declared. Should it be static?
serial_ns16550.c:231:1: warning: symbol 'eserial4_tstc' was not declared. Should it be static?
serial_ns16550.c:231:1: warning: symbol 'eserial4_putc' was not declared. Should it be static?
serial_ns16550.c:231:1: warning: symbol 'eserial4_puts' was not declared. Should it be static?

Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
11 years agodrivers/i2c/fsl_i2c.c: sparse fix
Kim Phillips [Tue, 16 Oct 2012 14:28:43 +0000 (14:28 +0000)]
drivers/i2c/fsl_i2c.c: sparse fix

fsl_i2c.c:217:14: warning: symbol 'get_i2c_clock' was not declared. Should it be static?

Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
Acked-by: Heiko Schocher <hs@denx.de>
11 years agoam33xx/ddr_defs.h: rename DDR2/DDR3 defines to their actual part numbers
Peter Korsgaard [Thu, 18 Oct 2012 01:21:13 +0000 (01:21 +0000)]
am33xx/ddr_defs.h: rename DDR2/DDR3 defines to their actual part numbers

So other parts can be added.

Signed-off-by: Peter Korsgaard <peter.korsgaard@barco.com>
11 years agoam33xx: support board specific ddr settings
Peter Korsgaard [Thu, 18 Oct 2012 01:21:12 +0000 (01:21 +0000)]
am33xx: support board specific ddr settings

Move the hardcoded ddr2/ddr3 settings for the ti boards to board code,
so other boards can use different types/timings.

Signed-off-by: Peter Korsgaard <peter.korsgaard@barco.com>
[trini: Make apply with rtc32k_enable() in the file]
Signed-off-by: Tom Rini <trini@ti.com>
11 years agoam33xx: move generic parts of pinmux handling out from board/ti/am335x
Peter Korsgaard [Thu, 18 Oct 2012 01:21:11 +0000 (01:21 +0000)]
am33xx: move generic parts of pinmux handling out from board/ti/am335x

So they are available for other boards.

Signed-off-by: Peter Korsgaard <peter.korsgaard@barco.com>
11 years agoam33xx/board: use cpu_mmc_init() for default mmc initialization
Peter Korsgaard [Thu, 18 Oct 2012 01:21:10 +0000 (01:21 +0000)]
am33xx/board: use cpu_mmc_init() for default mmc initialization

So platforms can override it with board_mmc_init() if needed.

Signed-off-by: Peter Korsgaard <peter.korsgaard@barco.com>
11 years agoam33xx: move ti i2c baseboard header handling to board/ti/am335x/
Peter Korsgaard [Thu, 18 Oct 2012 01:21:09 +0000 (01:21 +0000)]
am33xx: move ti i2c baseboard header handling to board/ti/am335x/

The i2c header is specific to ti(-derived) boards, and not generic for all
am335x boards.

Signed-off-by: Peter Korsgaard <peter.korsgaard@barco.com>
[trini: Make re-apply with rtc32k_enable() applied]
Signed-off-by: Tom Rini <trini@ti.com>
11 years agoam33xx/board.c: make wdtimer/uart_base static
Peter Korsgaard [Thu, 18 Oct 2012 01:21:08 +0000 (01:21 +0000)]
am33xx/board.c: make wdtimer/uart_base static

Only used here (and uart_base only for SPL).

Signed-off-by: Peter Korsgaard <peter.korsgaard@barco.com>
11 years agoam33xx: Add SPI SPL as an option
Tom Rini [Tue, 16 Oct 2012 13:06:07 +0000 (13:06 +0000)]
am33xx: Add SPI SPL as an option

Add the required config.mk logic for this SoC as well as the BOOT_DEVICE
define.  Finally, enable the options on the am335x_evm.

Signed-off-by: Tom Rini <trini@ti.com>
11 years agoomapimage: Add support for byteswapped SPI images
Tom Rini [Tue, 16 Oct 2012 13:06:06 +0000 (13:06 +0000)]
omapimage: Add support for byteswapped SPI images

Add MLO.byteswap as a target to spl/Makefile and un-guard the first MLO
rule so we don't have to duplicate it.

Signed-off-by: Tom Rini <trini@ti.com>
11 years agoomap3_spi: introduce CONFIG_OMAP3_SPI_D0_D1_SWAPPED
Peter Korsgaard [Wed, 17 Oct 2012 09:20:46 +0000 (09:20 +0000)]
omap3_spi: introduce CONFIG_OMAP3_SPI_D0_D1_SWAPPED

D0/D1 Swapped or not is a board property, not anything specific to
the am33xx SoC, so add a custom define for it.

At the same time correct the bit handling for the swapped mode
(DPE0 should be cleared and SI/DPE1 set).

Signed-off-by: Peter Korsgaard <peter.korsgaard@barco.com>
11 years agoOMAP3: add video support to the mcx board
Stefano Babic [Sat, 20 Oct 2012 23:56:07 +0000 (23:56 +0000)]
OMAP3: add video support to the mcx board

Add video support to the board with the display
focaltech etm070003dh6.

Signed-off-by: Stefano Babic <sbabic@denx.de>