]> git.sur5r.net Git - u-boot/log
u-boot
11 years agousb: ehci: Support interrupt transfers via periodic list
Patrick Georgi [Wed, 6 Mar 2013 14:08:31 +0000 (14:08 +0000)]
usb: ehci: Support interrupt transfers via periodic list

Interrupt transfers aren't meant to be used from the async list
(the EHCI spec indicates trouble with low/full-speed intr on async).

Build a periodic list instead, and provide an API to make use of it.
Then, use that API from the existing interrupt transfer API.

This provides support for USB keyboards using EHCI.

Use timeouts to ensure we cannot get stuck in the keyboard scanning
if something wrong happens (USB device unplugged or fatal I/O error)

Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
Signed-off-by: Julius Werner <jwerner@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agousb: ehci: exynos: Enable non-dt path
Vivek Gautam [Wed, 6 Mar 2013 08:48:33 +0000 (14:18 +0530)]
usb: ehci: exynos: Enable non-dt path

Enabling the non-dt path for the driver so that
we don't get any build errors for non-dt configuration.

Signed-off-by: Vivek Gautam <gautam.vivek@samsung.com>
Acked-by: Simon Glass <sjg@chromium.org>
11 years agousb: ehci: exynos: Fix multiple FDT decode
Vivek Gautam [Wed, 6 Mar 2013 08:48:32 +0000 (14:18 +0530)]
usb: ehci: exynos: Fix multiple FDT decode

With current FDT support driver tries to parse device node
twice in ehci_hcd_init() and ehci_hcd_stop(), which shouldn't
happen ideally.
Making provision to store data in a global structure and thereby
passing its pointer when needed.

Signed-off-by: Vivek Gautam <gautam.vivek@samsung.com>
11 years agoarm:trats: Use new ums command
Lukasz Majewski [Tue, 5 Mar 2013 11:10:18 +0000 (12:10 +0100)]
arm:trats: Use new ums command

This patch enables new "ums" command on Trats board

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Piotr Wilczek <p.wilczek@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
CC: Minkyu Kang <mk7.kang@samsung.com>
11 years agousb:gadget: USB Mass Storage Gadget support
Lukasz Majewski [Tue, 5 Mar 2013 11:10:17 +0000 (12:10 +0100)]
usb:gadget: USB Mass Storage Gadget support

This patch adds the USB Mass Storage Gadget to u-boot
New command called "ums" is implemented to provide access
to on-device embedded persistent memory.

USB Mass Storage is supposed to work on top of the USB
Gadget framework

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Piotr Wilczek <p.wilczek@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
CC: Marek Vasut <marek.vasut@gmail.com>
11 years agousb:composite: USB Mass Storage - f_mass_storage.c from Linux kernel
Piotr Wilczek [Tue, 5 Mar 2013 11:10:16 +0000 (12:10 +0100)]
usb:composite: USB Mass Storage - f_mass_storage.c from Linux kernel

The f_mass_storage.c source file from v2.6.36 Linux kernel.

commit 8876f5e7d3b2a320777dd4f6f5301d474c97a06c
Author: Michal Nazarewicz <m.nazarewicz@samsung.com>
Date:   Mon Jun 21 13:57:09 2010 +0200

USB: gadget: f_mass_storage: added eject callback

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Piotr Wilczek <p.wilczek@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
CC: Marek Vasut <marek.vasut@gmail.com>
11 years agousb:composite: USB Mass Storage - storage_common.c from Linux kernel
Lukasz Majewski [Tue, 5 Mar 2013 11:10:15 +0000 (12:10 +0100)]
usb:composite: USB Mass Storage - storage_common.c from Linux kernel

The storage_common.c source file from v2.6.36 Linux kernel.

commit d26a6aa08b9f12b44fb1ee65625e7480d3d5bb81
Author: Michal Nazarewicz <m.nazarewicz@samsung.com>
Date:   Mon Nov 9 14:15:23 2009 +0100

USB: g_mass_storage: code cleaned up and comments updated

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
CC: Marek Vasut <marek.vasut@gmail.com>
11 years agousb:composite:fix Provide function data when addressing device with only one interface
Lukasz Majewski [Fri, 1 Mar 2013 14:30:18 +0000 (15:30 +0100)]
usb:composite:fix Provide function data when addressing device with only one interface

This commit fixes problems with some non-standard requests send with
device address instead of interface address (bmRequestType.Receipent field).

This happens with dfu-util (debian version: 0.5), which address non standard
requests (like w_value=0x21 and bRequest=GET_DESCRIPTOR) to device.
Without this fix, the above request is STALLED, and hence causes dfu-util
to assume some standard configuration (packet size = 1024B instead of 4096B)
In turn it displays following errors:
Error obtaining DFU functional descriptor
Warning: Assuming DFU version 1.0
Warning: Transfer size can not be detected
...
Warning: Trying default transfer size 1024

This fix allows passing non-standard request to function setup code, where
it shall be handled.

Tested at:  Trats (exynos4210)
Tested with:DFU and UMS gadgets

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
11 years agousbtty: adapt buffers for large packet support
Shiraz Hashim [Mon, 17 Dec 2012 08:49:37 +0000 (14:19 +0530)]
usbtty: adapt buffers for large packet support

Increase buffer sizes at driver and tty level to accommodate kermit
large packet support.

Signed-off-by: Shiraz Hashim <shiraz.hashim@st.com>
11 years agousb/host/ehci: Add support for EHCI on spear
Vipin Kumar [Mon, 17 Dec 2012 08:48:55 +0000 (14:18 +0530)]
usb/host/ehci: Add support for EHCI on spear

Add EHCI support for spear boards

Signed-off-by: Armando Visconti <armando.visconti@st.com>
Signed-off-by: Vipin Kumar <vipin.kumar@st.com>
11 years agousb: Fix bug when both DFU & ETHER are defined
Pantelis Antoniou [Mon, 3 Dec 2012 00:10:28 +0000 (00:10 +0000)]
usb: Fix bug when both DFU & ETHER are defined

When both CONFIG_USB_GADGET & CONFIG_USB_ETHER are defined
the makefile links objects twice.

This patch uses a Makefile specific idiom of
'if defined(CONFIG_USB_GADGET) || defined(CONFIG_USB_ETHER)'
to handle the case.

Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
11 years agodfu: Add a partition type target
Pantelis Antoniou [Fri, 30 Nov 2012 08:01:11 +0000 (08:01 +0000)]
dfu: Add a partition type target

Dealing with raw block numbers with the dfu is very annoying.
Introduce a partition method.

Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
11 years agodfu: Properly zero out timeout value
Pantelis Antoniou [Fri, 30 Nov 2012 08:01:10 +0000 (08:01 +0000)]
dfu: Properly zero out timeout value

Zero out timeout value; letting it filled with undefined values
ends up with the dfu host hanging.

Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
11 years agodfu: Fix crash when wrong number of arguments given
Pantelis Antoniou [Fri, 30 Nov 2012 08:01:08 +0000 (08:01 +0000)]
dfu: Fix crash when wrong number of arguments given

Fix obvious crash when not enough arguments are given to the dfu
command.

Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
11 years agodfu: Only perform DFU board_usb_init() for TRATS
Pantelis Antoniou [Fri, 30 Nov 2012 08:01:07 +0000 (08:01 +0000)]
dfu: Only perform DFU board_usb_init() for TRATS

USB initialization shouldn't happen for all the boards.

Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
11 years agousb: ehci: Add 64-bit controller support
Vincent Palatin [Thu, 13 Dec 2012 01:55:22 +0000 (17:55 -0800)]
usb: ehci: Add 64-bit controller support

On EHCI controller with 64-bit address space support, we must initialize
properly the high word for the PCI bus master accesses.

Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agousb: ehci: generic PCI support
Vincent Palatin [Fri, 14 Dec 2012 06:58:27 +0000 (22:58 -0800)]
usb: ehci: generic PCI support

Instead of hardcoding the PCI IDs on the USB controller, use the PCI
class to detect them.

Ensure the busmaster bit is properly set in the PCI configuration.

Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agoUse 'unsigned int' for global_data's baudrate
Simon Glass [Tue, 5 Mar 2013 14:40:05 +0000 (14:40 +0000)]
Use 'unsigned int' for global_data's baudrate

We decided to used unsigned int here, rather than unsigned long. But
for the generic global_data it is still unsigned long. So change it
over.

Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agosparc: Fix build warnings in serial.c
Simon Glass [Tue, 5 Mar 2013 14:40:04 +0000 (14:40 +0000)]
sparc: Fix build warnings in serial.c

These macros are already defined in io.h so should not be declared in
serial.c.

serial.c:38:0: warning: "READ_BYTE" redefined
/home/sjg/c/src/third_party/u-boot/files/include/asm/io.h:36:0: note: this is the location of the previous definition
serial.c:39:0: warning: "READ_HWORD" redefined
/home/sjg/c/src/third_party/u-boot/files/include/asm/io.h:37:0: note: this is the location of the previous definition
serial.c:40:0: warning: "READ_WORD" redefined
/home/sjg/c/src/third_party/u-boot/files/include/asm/io.h:38:0: note: this is the location of the previous definition
serial.c:41:0: warning: "READ_DWORD" redefined
/home/sjg/c/src/third_party/u-boot/files/include/asm/io.h:39:0: note: this is the location of the previous definition

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agosparc: Fix out-of-tree building
Simon Glass [Tue, 5 Mar 2013 14:40:03 +0000 (14:40 +0000)]
sparc: Fix out-of-tree building

It isn't clear why the sparc cpu Makefile has its own compile line, but
it does not work correctly with an out-of-tree build. Removing it fixes
this problem. Perhaps it does not introduce others.

Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agoserial: ns16550: Remove unwanted cast
Simon Glass [Tue, 5 Mar 2013 14:40:02 +0000 (14:40 +0000)]
serial: ns16550: Remove unwanted cast

This cast does not seem correct, since we should be writing to a pointer,
not a ulong.

This fixes the following warning on nds32:

-ns16550.c:49: warning: passing argument 2 of 'writeb' makes pointer from integer without a cast

Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agoavr32: Fix cast warning in board.c
Simon Glass [Tue, 5 Mar 2013 14:40:01 +0000 (14:40 +0000)]
avr32: Fix cast warning in board.c

The frame buffer pointer in global_data is not a pointer, so we should
remove these casts.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Andreas Bießmann <andreas.devel@googlemail.com>
11 years agoblackfin: Remove noreturn attribute from cpu_init_f()
Simon Glass [Tue, 5 Mar 2013 14:40:00 +0000 (14:40 +0000)]
blackfin: Remove noreturn attribute from cpu_init_f()

Now that board_init_f() is not marked as noreturn, we need to do the same
to blackfin's cpu_init_f() function.

Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agoblackfin: Fix up board_type global data
Simon Glass [Tue, 5 Mar 2013 14:39:59 +0000 (14:39 +0000)]
blackfin: Fix up board_type global data

This should be in arch_global_data but was dropped in the change-over.

Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agoexynos5: Enable generic board for Exynos5 device tree boards
Simon Glass [Tue, 5 Mar 2013 14:39:58 +0000 (14:39 +0000)]
exynos5: Enable generic board for Exynos5 device tree boards

Enable CONFIG_SYS_GENERIC_BOARD for all Exynos5 boards that use
CONFIG_OF_CONTROL.

Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agox86: Enable generic board
Simon Glass [Tue, 5 Mar 2013 14:39:57 +0000 (14:39 +0000)]
x86: Enable generic board

This will be used exclusively on x86, so enable it for the whole
architecture.

Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agotegra: Enable generic board for Tegra
Simon Glass [Tue, 5 Mar 2013 14:39:56 +0000 (14:39 +0000)]
tegra: Enable generic board for Tegra

Bravely enable CONFIG_SYS_GENERIC_BOARD for all Tegra boards.

Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agox86: Enable generic board support
Simon Glass [Mon, 11 Mar 2013 07:40:13 +0000 (07:40 +0000)]
x86: Enable generic board support

This enables generic board support so that x86 boards can define
CONFIG_SYS_GENERIC_BOARD.

Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agox86: Use sections header to obtain link symbols
Simon Glass [Tue, 5 Mar 2013 14:39:54 +0000 (14:39 +0000)]
x86: Use sections header to obtain link symbols

These are defined in asm-generic/sections.h, so remove them from
architecture-specific files.

Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agox86: Adjust board_r.c for x86
Simon Glass [Tue, 5 Mar 2013 14:39:53 +0000 (14:39 +0000)]
x86: Adjust board_r.c for x86

For x86 the global_data is managed entirely by the start.S code so we do
not need to touch it. However, we do have some more initcalls to add.

Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agox86: Adjust board_f.c for x86
Simon Glass [Tue, 5 Mar 2013 14:39:52 +0000 (14:39 +0000)]
x86: Adjust board_f.c for x86

For x86, things have adjusted somewhat since this series was originally
written. It has its own way of running through initcalls which is actually
nicer than others archs.

Unfortunately this does introduce exceptions. We will soon require use of
generic board on x86, but until then we need to fit in with what is there,
and treat x86 as a special case.

Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agoppc: Enable generic board support
Simon Glass [Mon, 11 Mar 2013 06:50:01 +0000 (06:50 +0000)]
ppc: Enable generic board support

This enables generic board support so that ppc boards can define
CONFIG_SYS_GENERIC_BOARD.

Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agoAdjust board_r.c for ppc
Simon Glass [Thu, 14 Mar 2013 07:20:12 +0000 (07:20 +0000)]
Adjust board_r.c for ppc

This adds ppc features to the generic post-relocation board init.

Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agoAdjust board_f.c for ppc
Simon Glass [Mon, 11 Mar 2013 14:30:42 +0000 (14:30 +0000)]
Adjust board_f.c for ppc

This adds ppc features to the generic pre-relocation board init.

This is a separate commit so that these features are clearly shown.

Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agoAdd CONFIG_SYS_SYM_OFFSETS to support offset symbols
Simon Glass [Mon, 11 Mar 2013 07:06:48 +0000 (07:06 +0000)]
Add CONFIG_SYS_SYM_OFFSETS to support offset symbols

Link symbols as created by the link script can either be absolute or
relative to the text start. This option switches between the two options
so that we can support both.

As we convert architectures over to generic board, we can see if this
option is actually needed, or whether it is possible to unify this feature
also.

Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agoarm: Enable generic board support
Simon Glass [Mon, 11 Mar 2013 06:49:57 +0000 (06:49 +0000)]
arm: Enable generic board support

This enables generic board support so that ARM boards can define
CONFIG_SYS_GENERIC_BOARD.

Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agoarm: Remove use of board_early_init_r/last_stage_init()
Simon Glass [Tue, 5 Mar 2013 14:39:46 +0000 (14:39 +0000)]
arm: Remove use of board_early_init_r/last_stage_init()

These boards define CONFIG_LAST_STAGE_INIT and CONFIG_BOARD_EARLY_INIT_R
but these options are not available on ARM. Move them into the powerpc
common file instead.

This change affects: km_kirkwood_pci, mgcoge3un, kmnusa, kmcoge5un,
km_kirkwood and portl2.

Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agoAdd spl load feature
Simon Glass [Tue, 5 Mar 2013 14:39:45 +0000 (14:39 +0000)]
Add spl load feature

This adds secondary program loader support to the generic board.

Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agoIntroduce generic post-relocation board_r.c
Simon Glass [Mon, 11 Mar 2013 14:30:37 +0000 (14:30 +0000)]
Introduce generic post-relocation board_r.c

This file handles common post-relocation init for boards which use
the generic framework.

Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agoIntroduce generic pre-relocation board_f.c
Simon Glass [Mon, 11 Mar 2013 06:49:53 +0000 (06:49 +0000)]
Introduce generic pre-relocation board_f.c

This file handles common pre-relocation init for boards which use
the generic framework.

It starts up the console, DRAM, performs relocation and then jumps
to post-relocation init.

Signed-off-by: Simon Glass <sjg@chromium.org>
Tested-by: Wolfgang Denk <wd@denx.de>
Acked-by: Wolfgang Denk <wd@denx.de>
11 years agoDeclare watchdog functions in watchdog.h
Simon Glass [Tue, 5 Mar 2013 14:39:42 +0000 (14:39 +0000)]
Declare watchdog functions in watchdog.h

These functions are only available for powerpc and are not declared in a
header file. We want to use the rest function in two places (board_f and
board_r), so declare the functions in watchdog.h.

Signed-off-by: Simon Glass <sjg@chromium.org>
11 years ago__HAVE_ARCH_GENERIC_BOARD controls availabilty of generic board
Simon Glass [Fri, 8 Mar 2013 13:45:27 +0000 (13:45 +0000)]
__HAVE_ARCH_GENERIC_BOARD controls availabilty of generic board

We are introducing a new unified board setup. Add a check to make sure that
board config files do not define CONFIG_SYS_GENERIC_BOARD unless their
architecture defines __HAVE_ARCH_GENERIC_BOARD

__HAVE_ARCH_GENERIC_BOARD will currently not be the default setting, but
we can switch this later when most architecture support generic board.

Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agoIntroduce a basic initcall implementation
Simon Glass [Tue, 5 Mar 2013 14:39:40 +0000 (14:39 +0000)]
Introduce a basic initcall implementation

This library supports calling a list of functions one after the
other.

It is intended that we move to a more powerful initcall implementation
as proposed by Graeme Russ <graeme.russ@gmail.com>. For now, this allows
us to do the basics.

Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agoChange stub example to use asm-generic/sections.h
Simon Glass [Tue, 5 Mar 2013 14:39:39 +0000 (14:39 +0000)]
Change stub example to use asm-generic/sections.h

We can use the declarations of __bss_start and _end from this header
instead of declaring them locally.

Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agoarm: Use sections header to obtain link symbols
Simon Glass [Tue, 5 Mar 2013 14:39:38 +0000 (14:39 +0000)]
arm: Use sections header to obtain link symbols

Include this header to get access to link symbols, which are otherwise
removed.

Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agoIntroduce generic link section.h symbol files
Simon Glass [Tue, 5 Mar 2013 14:39:37 +0000 (14:39 +0000)]
Introduce generic link section.h symbol files

We create a separate header file for link symbols defined by the link
scripts. It is helpful to have these all in one place and try to
make them common across architectures. Since Linux already has a similar
file, we bring this in even though many of the symbols there are not
relevant to us.

Each architecture has its own asm/sections.h where symbols specifc to
that architecture can be added. For now everything except AVR32 just
includes the generic header.

One change is needed in arch/avr32/lib/board.c to make this conversion
work.

Reviewed-by: Tom Rini <trini@ti.com> (version 5)
Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agoReplace __bss_end__ with __bss_end
Simon Glass [Thu, 14 Mar 2013 06:54:53 +0000 (06:54 +0000)]
Replace __bss_end__ with __bss_end

Note this is a tree-wide change affecting multiple architectures.

At present we use __bss_start, but mostly __bss_end__. This seems
inconsistent and in a number of places __bss_end is used instead.

Change to use __bss_end for the BSS end symbol throughout U-Boot. This
makes it possible to use the asm-generic/sections.h file on all
archs.

Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agoIntroduce generic u-boot.h file
Simon Glass [Tue, 5 Mar 2013 14:39:35 +0000 (14:39 +0000)]
Introduce generic u-boot.h file

This file holds the board info structure. We need this to be generic
for the unified board series, so create a structure which contains
the basic fields required by the main architectures.

Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agoI2C: S3C24X0: Bug fixes in i2c_transfer
Rajeshwari Shinde [Tue, 19 Feb 2013 02:19:45 +0000 (02:19 +0000)]
I2C: S3C24X0: Bug fixes in i2c_transfer

This patch corrects the following issues

1) Write the correct M/T Stop value to I2CSTAT after i2c write.
   According to the spec, after finish the data transmission, we should
   write a M/T Stop (I2C_MODE_MT | I2C_TXRX_ENA) to I2CSTAT instead of
   a M/R Stop (I2C_MODE_MR | I2C_TXRX_ENA).
2) Not split the write to I2CSTAT into 2 steps in i2c read.
   According to the spec, we should write the combined M/R Start value to
   I2CSTAT after setting the slave address to I2CDS
3) Fix the mistake of making an equality check to an assignment.
   In the case of I2C write with the zero-length address, while tranfering the
   data, it should be an equality check (==) instead of an assignment (=).

Signed-off-by: Tom Wai-Hong Tam <waihong@chromium.org>
Signed-off-by: Rajeshwari Shinde <rajeshwari.s@samsung.com>
11 years agoI2C: S3C24X0: Remove the dead code
Rajeshwari Shinde [Mon, 18 Feb 2013 19:58:11 +0000 (19:58 +0000)]
I2C: S3C24X0: Remove the dead code

This revomes the code under #if 0 in the s3c24x0_i2c driver.

Signed-off-by: Alim Akhtar <alim.akhtar@samsung.com>
Signed-off-by: Rajeshwari Shinde <rajeshwari.s@samsung.com>
Acked-by: Simon Glass <sjg@chromium.org>
11 years agocmd_mem.c: Fix warning when CONFIG_CMD_MEMTEST is not set
Tom Rini [Tue, 12 Mar 2013 14:07:19 +0000 (10:07 -0400)]
cmd_mem.c: Fix warning when CONFIG_CMD_MEMTEST is not set

mem_test_quick and mem_test_alt functions are only called by
do_mem_mtest, so move them under the #ifdef

Signed-off-by: Tom Rini <trini@ti.com>
11 years agoCONFIG_BOOTDELAY default should not affect runtime
Joe Hershberger [Fri, 8 Feb 2013 10:28:00 +0000 (10:28 +0000)]
CONFIG_BOOTDELAY default should not affect runtime

Because the code that handles bootdelay is compiled in conditionally
based on the default value, you are restricted in the default,
regardless of what you want the runtime options to be.

Change the source to always check if any default is given so that other
values can be selected and used at runtime.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
11 years agocommon/main: move set_working_fdt_addr to enable usage of $fdtaddr
Barak Wasserstrom [Wed, 27 Feb 2013 08:48:41 +0000 (08:48 +0000)]
common/main: move set_working_fdt_addr to enable usage of $fdtaddr

When using $fdtaddr in $bootcmd and $bootcmd is automatically called,
$fdtaddr is yet not defined.

Signed-off-by: Barak Wasserstrom <wbarak@gmail.com>
11 years agoenv: fix "env ask" command
Wolfgang Denk [Wed, 20 Feb 2013 04:53:16 +0000 (04:53 +0000)]
env: fix "env ask" command

The "env ask" traditionally uses a somewhat awkward syntax:

env ask name [message ...] [size]

So far, when a mesage was given, you always also had to enter a size.
If you forgot to do that, the command would terminate without any
indication of the problem.

To avoid incompatible changes of the interface, we now check the last
argument if it can be converted into a decimal number.  If this is the
case, we assume it is a size; otherwise we treat it as part of the
message.

Also, add a space after the message fore easier reading,
and clean up help mesage.

Signed-off-by: Wolfgang Denk <wd@denx.de>
11 years agocmd_fat.c: Note in fatread help about alignment requirements
Tom Rini [Thu, 21 Feb 2013 06:55:40 +0000 (06:55 +0000)]
cmd_fat.c: Note in fatread help about alignment requirements

When using the partial read feature of fatwrite the buffer we read into
can become unaligned not just due to initial location but the size of
our partial reads as well.  Make this clear in the help text.

Signed-off-by: Tom Rini <trini@ti.com>
11 years agoenv: Allow accessing non-mtd devices
Lubomir Rintel [Sun, 10 Feb 2013 01:02:36 +0000 (01:02 +0000)]
env: Allow accessing non-mtd devices

In certain cases, memory device is present as flat file or block device (via
mmc or mtdblock layer). Do not attempt MTD operations against it.

Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
11 years agocmd_df.c: Delete this clearly unused source file.
Robert P. J. Day [Mon, 4 Feb 2013 13:57:15 +0000 (13:57 +0000)]
cmd_df.c: Delete this clearly unused source file.

Nothing appears to use or compile cmd_df.c anymore.

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
11 years agocmd_mtdparts.c: Correct "reseting" to "resetting" in error msgs
Robert P. J. Day [Mon, 4 Feb 2013 13:51:10 +0000 (13:51 +0000)]
cmd_mtdparts.c: Correct "reseting" to "resetting" in error msgs

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
11 years agoAllow u-boot to be silent without forcing Linux to be
Joe Hershberger [Wed, 27 Feb 2013 10:20:59 +0000 (10:20 +0000)]
Allow u-boot to be silent without forcing Linux to be

That's a bit presumptuous of you, u-boot!

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
11 years agoFix a couple typoes in tools/env/README
Robert P. J. Day [Wed, 27 Feb 2013 11:28:45 +0000 (11:28 +0000)]
Fix a couple typoes in tools/env/README

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
11 years agotools: update checkpatch to latest upstream version
Kim Phillips [Thu, 28 Feb 2013 12:53:52 +0000 (12:53 +0000)]
tools: update checkpatch to latest upstream version

i.e., from the linux kernel's commit
be987d9f80354e2e919926349282facd74992f90

Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
11 years agotools: enable more checkpatch tests by default
Kim Phillips [Thu, 28 Feb 2013 12:53:53 +0000 (12:53 +0000)]
tools: enable more checkpatch tests by default

without this, patches don't get checked for proper alignment,
and e.g., for spaces after a cast and/or before a semicolon.

Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
11 years agocmd_part: don't print cmd name twice in help
Stephen Warren [Thu, 28 Feb 2013 15:05:34 +0000 (15:05 +0000)]
cmd_part: don't print cmd name twice in help

The core implementation of "help" already prints the command name before
the help text of a specific command. Remove it from part's own help text
to avoid it being printed twice:

Tegra114 (Dalmore) # help part
part - disk partition related commands

Usage:
part part uuid <interface> <dev>:<part>
    - print partition UUID
...

Signed-off-by: Stephen Warren <swarren@nvidia.com>
11 years agoMAKEALL: fix kill_children for BSD hosts
Andreas Bießmann [Thu, 7 Feb 2013 22:35:57 +0000 (22:35 +0000)]
MAKEALL: fix kill_children for BSD hosts

ps on BSD hosts (like OS X) do not provide the --no-headers switch nor
understand the AIX format descriptions. Unfortunately there seems no solution to
get the PIDs of children in a platfrom independent manner.
Therefore detect the OS and decide upon that which way to go.

This patch makes the MAKEALL script cleanly stoppable on bare OS X when using
the parallel builds of targets.

Additionally this patch removes double call to grep by a single call to sed for
GNU style child PID detection.

Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
Cc: Joe Hershberger <joe.hershberger@ni.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
11 years agomvsata_ide.c: Correction of typo in comments
Gray Remlin [Wed, 6 Feb 2013 10:59:38 +0000 (10:59 +0000)]
mvsata_ide.c: Correction of typo in comments

Signed-off-by: Gray Remlin <gryrmln@gmail.com>
11 years agoppc: Remove PCIPPC2 and PCIPPC6 boards
Stefan Roese [Thu, 7 Feb 2013 01:48:30 +0000 (01:48 +0000)]
ppc: Remove PCIPPC2 and PCIPPC6 boards

These boards seem to be unmaintained for quite some time. So lets
remove support for them completely. This also cleans up some
common drivers/files.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Guillaume Alexandre <guillaume.alexandre@gespac.ch>
Acked-by: Wolfgang Denk <wd@denx.de>
11 years agodisplay_options:print_buffer: align ASCII print
Andreas Bießmann [Thu, 7 Feb 2013 04:58:19 +0000 (04:58 +0000)]
display_options:print_buffer: align ASCII print

This patch adds whitespace to the printed hex numbers to have an aligned ASCII
printout at the end of the line.

This changes for example the md output from:

---8<---
OMAP3 Tricorder # md.l $loadaddr 5
8200000030200109 20a4028c 90010000 08a00000    .. 0... ........
8200001001010000    ....
--->8---

to

---8<---
OMAP3 Tricorder # md.l $loadaddr 5
8200000030200109 20a4028c 90010000 08a00000    .. 0... ........
8200001001010000                               ....
--->8---

The cost of this is about 72 byte .text increase (tested with at91 build).

Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
11 years agoFeature Removal: disable "mtest" command by default
Wolfgang Denk [Fri, 8 Mar 2013 10:51:32 +0000 (10:51 +0000)]
Feature Removal: disable "mtest" command by default

The "mtest" command is of little practical use (if any), and
experience has shown that a large number of board configurations
define useless or even dangerous start and end addresses.  If not even
the board maintainers are able to figure out which memory range can be
reliably tested, how can we expect such from the end users?  As this
problem comes up repeatedly, we rather do not enable this command by
default, so only people who know what they are doing will be
confronted with it.

As this changes the user interface, we allow for a grace period
before this change takes effect. For now, we make "mtest"
configurable through the CONFIG_CMD_MEMTEST variable, which is defined
in include/config_cmd_default.h;  we also add an entry to
doc/feature-removal-schedule.txt which announces the removal of this
default setting in two releases from now, i. e. with v2013.07.

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Tom Rini <trini@ti.com>
11 years agoMerge branch 'master' of git://git.denx.de/u-boot-mpc82xx
Tom Rini [Sun, 10 Mar 2013 13:47:50 +0000 (09:47 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-mpc82xx

11 years agopowerpc/82xx/km: removed unneeded ifdef
Holger Brunck [Fri, 18 Jan 2013 00:28:17 +0000 (00:28 +0000)]
powerpc/82xx/km: removed unneeded ifdef

All boards from this serie uses i2c. So we can drop these unneeded
defines.

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
11 years agopowerpc/82xx/km: make handle_mgcoge3un_reset static
Holger Brunck [Fri, 18 Jan 2013 00:28:16 +0000 (00:28 +0000)]
powerpc/82xx/km: make handle_mgcoge3un_reset static

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
11 years agompc512x: pdm360ng: drop not needed memory node fixup
Anatolij Gustschin [Fri, 8 Feb 2013 00:03:50 +0000 (00:03 +0000)]
mpc512x: pdm360ng: drop not needed memory node fixup

ft_cpu_setup() already does memory node fixup, no need
to do it again.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
11 years agompc512x: Adjust the DRAM init sequence to the datasheet spec
Anatolij Gustschin [Fri, 8 Feb 2013 00:03:49 +0000 (00:03 +0000)]
mpc512x: Adjust the DRAM init sequence to the datasheet spec

Do maintain a 200 usecs period of stable power and clock before
asserting the CKE signal and sending commands, have at least 200
DRAM clock cycles pass after initialization before data access.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
11 years agompc512x: add ifm ac14xx board
Anatolij Gustschin [Fri, 8 Feb 2013 00:03:48 +0000 (00:03 +0000)]
mpc512x: add ifm ac14xx board

Add new mpc5121e based ac14xx board and a new pinmux config
function for setting individual pinmux bit groups. This
function is used in ac14xx board code.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
11 years agompc512x: allow configuring board specific IPS divider
Anatolij Gustschin [Fri, 8 Feb 2013 00:03:47 +0000 (00:03 +0000)]
mpc512x: allow configuring board specific IPS divider

Boards may define own IPS divider in the config file if
the default IPS divider doesn't fit their needs.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
11 years agompc512x: optionally configure DIU, LPC and NFC deviders
Anatolij Gustschin [Fri, 8 Feb 2013 00:03:46 +0000 (00:03 +0000)]
mpc512x: optionally configure DIU, LPC and NFC deviders

If a board config file defines DIU, LPC and NFC deviders,
configure them in the SCFR1 register.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
11 years agompc512x: use common code for clock setting for all mpc512x boards
Anatolij Gustschin [Fri, 8 Feb 2013 00:03:45 +0000 (00:03 +0000)]
mpc512x: use common code for clock setting for all mpc512x boards

Only define enabled clocks in the config file and enable
the clocks in common code.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Cc: Reinhard Arlt <reinhard.arlt@esd-electronics.com>
Cc: Wolfgang Denk <wd@denx.de>
11 years agompc512x: use common code for CSx configuration
Anatolij Gustschin [Fri, 8 Feb 2013 00:03:44 +0000 (00:03 +0000)]
mpc512x: use common code for CSx configuration

Remove CSx configurations from board code and only define
required CSx macros in the board config file to configure
chip select windows and parameters.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Cc: Reinhard Arlt <reinhard.arlt@esd-electronics.com>
Cc: Wolfgang Denk <wd@denx.de>
11 years agompc512x: add common LAW and Chip Select configuration
Anatolij Gustschin [Fri, 8 Feb 2013 00:03:43 +0000 (00:03 +0000)]
mpc512x: add common LAW and Chip Select configuration

Currently each mpc512x board has its own LAW and CS config code,
we should avoid this code duplication. Allow all boards to use
common code by only defining LAW and CS config macros like
CONFIG_SYS_CSx_START, CONFIG_SYS_CSx_SIZE and CONFIG_SYS_CSx_CFG.

Also allow common configuration of additional CS parameters by
CONFIG_SYS_CS_ALETIMING, CONFIG_SYS_CS_BURST, CONFIG_SYS_CS_DEADCYCLE
and CONFIG_SYS_CS_HOLDCYCLE options.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
11 years agompc5200: a4m2k: Implement custom "dynamic" watchdog support
Stefan Roese [Thu, 7 Feb 2013 02:10:28 +0000 (02:10 +0000)]
mpc5200: a4m2k: Implement custom "dynamic" watchdog support

This patch adds a custom U-Boot command "wdogtoggle" which enables the
external hardware watchdog toggling via an GPIO pin on the a4m2k
board. After issuing this commands, the watchdog will be serviced
by U-Boot so that the user can use all U-Boot commands from the
prompt.

Signed-off-by: Stefan Roese <sr@denx.de>
11 years agompc5200: Add a4m2k board port
Stefan Roese [Thu, 7 Feb 2013 02:10:11 +0000 (02:10 +0000)]
mpc5200: Add a4m2k board port

This patch adds the a4m2k MPC5200B board port. Its a derivate of
the a3m071 board with only minor changes.

Additionally this patch includes some clean-up changes:
- Remove I2C support from a3m071 as its unused
- Fix/enhance default env variables
- Fix some comments
- Add newly introduced CONFIG_SPL_TARGET to automatically build
  "u-boot-img.bin"
- Fix dtb patching in READ desciption for SPL Linux booting:
  "fdt chosen" needs to get called to patch/create the chosen node.
- Add missing call to spl_board_init():
  Define CONFIG_SPL_BOARD_INIT so that spl_board_init() will get
  called in the SPL version.

Signed-off-by: Stefan Roese <sr@denx.de>
11 years agompc5200: spl_boot.c: Change init oder to first enable printf
Stefan Roese [Thu, 6 Dec 2012 03:41:57 +0000 (03:41 +0000)]
mpc5200: spl_boot.c: Change init oder to first enable printf

On MPC5200, the initial RAM (and gd) is located in the internal
SRAM. So we can actually call the preloader console init code
before calling initdram(). This makes serial output (printf)
available very early, even before SDRAM init, which has been
an U-Boot priciple from day 1.

Signed-off-by: Stefan Roese <sr@denx.de>
11 years agox86: Enable CONFIG_OF_CONTROL on coreboot
Simon Glass [Thu, 28 Feb 2013 19:26:18 +0000 (19:26 +0000)]
x86: Enable CONFIG_OF_CONTROL on coreboot

Make use of a device tree on coreboot boards, and set the default
to link.

Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agox86: Adjust link device tree include file
Simon Glass [Thu, 28 Feb 2013 19:26:17 +0000 (19:26 +0000)]
x86: Adjust link device tree include file

This is currently set to coreboot.dtsi, but we cannot support this on
old device tree compilers (dtc <= 1.3), so adjust to use ARCH_CPU_DTS
to let the Makefile preprocessor sort this out.

Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agox86: Add error checking to x86 relocation code
Simon Glass [Thu, 28 Feb 2013 19:26:16 +0000 (19:26 +0000)]
x86: Add error checking to x86 relocation code

This does not actually change normal behaviour, but adds a check that
should detect corruption of relocation data (e.g. by using BSS data
prior to relocation).

Also add additional debugging output when enabled.

During this investigation, two situations have been seen:
1. calculate_relocation_address():
uintptr_t size = (uintptr_t)&__bss_end - (uintptr_t)&__text_start;

turns into
     111166f: b8 83 c4 17 01        mov    $0x117c483,%eax

whih is beyond the end of bss:

0117b484 g       .bss 00000000 __bss_end

Somehow the __bss_end here is 255 bytes ahead.

2. do_elf_reloc_fixups():

uintptr_t size = (uintptr_t)&__bss_end - (uintptr_t)&__text_start;

Here the __text_start is 0 in the file:

 1111d9f: bb a0 e0 13 01        mov    $0x113e0a0,%ebx
1111da4: 81 ef 00 00 00 00     sub    $0x0,%edi

As it happens, both of these are in pre-relocation code.

For these reasons we silent check and ignore bad relocations.

Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agox86: Support relocation of FDT on start-up
Simon Glass [Thu, 28 Feb 2013 19:26:15 +0000 (19:26 +0000)]
x86: Support relocation of FDT on start-up

With CONFIG_OF_CONTROL we may have an FDT in the BSS region. Relocate
it up with the rest of U-Boot to keep the rest of memory free.

Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agox86: Rearrange the output input to remove BSS
Simon Glass [Thu, 28 Feb 2013 19:26:14 +0000 (19:26 +0000)]
x86: Rearrange the output input to remove BSS

At present BSS data is including in the image, which wastes binary space.
Remove it by rearranging the sections so that BSS is last.

Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agox86: Add an __end symbol to signal the end of the U-Boot binary
Simon Glass [Thu, 28 Feb 2013 19:26:13 +0000 (19:26 +0000)]
x86: Add an __end symbol to signal the end of the U-Boot binary

With this symbol we can easy append something (e.g. an FDT) to the U-Boot
binary and access it from within U-Boot.

Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agox86: Permit bootstage and timer data to be used prior to relocation
Simon Glass [Thu, 28 Feb 2013 19:26:12 +0000 (19:26 +0000)]
x86: Permit bootstage and timer data to be used prior to relocation

It is useful to be able to access the timer before U-Boot has relocated
so that we can fully support bootstage.

Add new global_data members to support this.

Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agox86: Add basic cache operations
Simon Glass [Thu, 28 Feb 2013 19:26:11 +0000 (19:26 +0000)]
x86: Add basic cache operations

At present most x86 cache operations are undefined. Add a basic
implementation for these.

Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agox86: Add function to get top of usable ram
Simon Glass [Thu, 28 Feb 2013 19:26:10 +0000 (19:26 +0000)]
x86: Add function to get top of usable ram

The memory layout calculations are done in calculate_relocation_address(),
and coreboot has its own version of this function. But in fact all we
really need is to set the top of usable RAM, and then the base version
will work as is.

So instead of allowing the whole calculate_relocation_address() function
to be replaced, create board_get_usable_ram_top() which can be used by
a board to specify the top of the area where U-Boot relocations to.

Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agoPrepare v2013.04-rc1 v2013.04-rc1
Tom Rini [Mon, 4 Mar 2013 21:29:17 +0000 (16:29 -0500)]
Prepare v2013.04-rc1

Signed-off-by: Tom Rini <trini@ti.com>
11 years agokerneldoc: Add Sonic Zhang to alias bfin in git-mailrc.
Sonic Zhang [Thu, 28 Feb 2013 20:21:13 +0000 (20:21 +0000)]
kerneldoc: Add Sonic Zhang to alias bfin in git-mailrc.

Signed-off-by: Sonic Zhang <sonic.adi@gmail.com>
11 years agobootm: fix conditional compilation for bootm ramdisk subcommand
Daniel Schwierzeck [Tue, 26 Feb 2013 04:54:19 +0000 (04:54 +0000)]
bootm: fix conditional compilation for bootm ramdisk subcommand

All code related to the bootm ramdisk subcommand is conditionally
enabled by CONFIG_SYS_BOOT_RAMDISK_HIGH except for the help message.
Replace the CONFIG_ARCH defines by CONFIG_SYS_BOOT_RAMDISK_HIGH
to fix this.

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
11 years agoenv: Avoid clobbering an edited variable on ctrl-c
Joe Hershberger [Fri, 8 Feb 2013 10:12:34 +0000 (10:12 +0000)]
env: Avoid clobbering an edited variable on ctrl-c

If readline says there was an error, don't write to the variable!

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
11 years agoubifs: Allow ubifsmount volume reference by number
Joe Hershberger [Thu, 1 Nov 2012 16:54:18 +0000 (16:54 +0000)]
ubifs: Allow ubifsmount volume reference by number

UBI can mount volumes by name or number  The current code forces you
to name the volume by prepending every name with "ubi:".

>From fs/ubifs/super.c
 * There are several ways to specify UBI volumes when mounting UBIFS:
 * o ubiX_Y    - UBI device number X, volume Y;
 * o ubiY      - UBI device number 0, volume Y;
 * o ubiX:NAME - mount UBI device X, volume with name NAME;
 * o ubi:NAME  - mount UBI device 0, volume with name NAME.

Now any name passed in any of the above forms are allowed.

Also update the configs that referenced ubifsmount.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
11 years agosandbox: config: Enable sandbox command
Simon Glass [Wed, 26 Dec 2012 09:53:38 +0000 (09:53 +0000)]
sandbox: config: Enable sandbox command

The 'sb' command allows loading files from the host, and listing
directories.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@ti.com>
11 years agosandbox: Enable ext4 and fat filesystems
Simon Glass [Wed, 26 Dec 2012 09:53:37 +0000 (09:53 +0000)]
sandbox: Enable ext4 and fat filesystems

These are useful for build-testing code, at least.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@ti.com>
11 years agosandbox: Add 'sb' command to access filesystem features
Simon Glass [Wed, 26 Dec 2012 09:53:36 +0000 (09:53 +0000)]
sandbox: Add 'sb' command to access filesystem features

The new 'sb' command is intended to deal with sandbox-specific features
that have no parallel in other archs. This commit adds two sub-commands
to list a directory and read a file from the host filesystem.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@ti.com>
11 years agosandbox: Add host filesystem
Simon Glass [Wed, 26 Dec 2012 09:53:35 +0000 (09:53 +0000)]
sandbox: Add host filesystem

This allows reading of files from the host filesystem in sandbox.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@ti.com>