kernel/u-boot.git
12 years agomkenvimage: More error handling
David Wagner [Fri, 13 Jan 2012 13:27:36 +0000 (13:27 +0000)]
mkenvimage: More error handling

Verbosly fail if the target environment size or the padding byte are badly
formated.

Verbosly fail if something bad happens when reading from standard input.

Signed-off-by: David Wagner <david.wagner@free-electrons.com>
Acked-by: Mike Frysinger <vapier@gentoo.org>
12 years agomkenvimage: Correct an include and add a missing one
David Wagner [Fri, 13 Jan 2012 13:27:35 +0000 (13:27 +0000)]
mkenvimage: Correct an include and add a missing one

compiler.h needs to be included from U-Boot's headers.
Also, group U-Boot-specific includes together

stdlib.h was missing.

Signed-off-by: David Wagner <david.wagner@free-electrons.com>
Acked-by: Mike Frysinger <vapier@gentoo.org>
12 years agomkenvimage: correct and clarify comments and error messages
David Wagner [Fri, 13 Jan 2012 13:27:34 +0000 (13:27 +0000)]
mkenvimage: correct and clarify comments and error messages

Also, don't split error messages over several lines as per a coding style
exception making them easier to grep.

Signed-off-by: David Wagner <david.wagner@free-electrons.com>
Acked-by: Mike Frysinger <vapier@gentoo.org>
12 years agoMAKEALL: display SPL size if present
Scott Wood [Mon, 20 Feb 2012 12:56:25 +0000 (12:56 +0000)]
MAKEALL: display SPL size if present

This makes it easier to detect changes in the SPL portion,
as can currently be done for the main U-Boot image.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Acked-by: Tom Rini <trini@ti.com>
12 years agoARMV7/Vexpress: add missing get_ticks() and get_tbclk()
Liming Wang [Wed, 22 Feb 2012 04:56:31 +0000 (04:56 +0000)]
ARMV7/Vexpress: add missing get_ticks() and get_tbclk()

commit f31a911fe (arm, post: add missing post_time_ms for arm)
enables get_ticks and get_tbclk for all arm based boards,
arm/vexpress also needs these functions to work.

Signed-off-by: Liming Wang <walimisdev@gmail.com>
Acked-by: Matt.Waddel@linaro.org
12 years agomkenvimage: fix usage message
Wolfgang Denk [Thu, 1 Mar 2012 21:19:40 +0000 (21:19 +0000)]
mkenvimage: fix usage message

Don't use argv[0] for usage() because it may or may not be clobbered
by the previous call to basename().  Use "prg" instead as it is done
in the rest of the code.

Signed-off-by: Wolfgang Denk <wd@denx.de>
Acked-by: Mike Frysinger <vapier@gentoo.org>
12 years agocmd_fat: add FAT write command
Donggeun Kim [Thu, 22 Mar 2012 04:38:56 +0000 (04:38 +0000)]
cmd_fat: add FAT write command

Once CONFIG_FAT_WRITE is defined, users can invoke 'fatwrite' command
that saves data in RAM as a FAT file.

This patch was originally part of

http://article.gmane.org/gmane.comp.boot-loaders.u-boot/121847

Signed-off-by: Donggeun Kim <dg77.kim@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Maximilian Schwerin <mvs@tigris.de>
Signed-off-by: Anatolij Gustschin <agust@denx.de>
12 years agofs/fat/fat_write.c: Fix GCC 4.6 warnings
Anatolij Gustschin [Sat, 24 Mar 2012 22:40:56 +0000 (23:40 +0100)]
fs/fat/fat_write.c: Fix GCC 4.6 warnings

Fix:
fat_write.c: In function 'find_directory_entry':
fat_write.c:826:8: warning: variable 'prevcksum' set but not used
[-Wunused-but-set-variable]
fat_write.c: In function 'do_fat_write':
fat_write.c:933:6: warning: variable 'root_cluster' set but not used
[-Wunused-but-set-variable]
fat_write.c:925:12: warning: variable 'slotptr' set but not used
[-Wunused-but-set-variable]

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Cc: Donggeun Kim <dg77.kim@samsung.com>
Acked-by: Maximilian Schwerin <mvs@tigris.de>
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
12 years agoFAT write: Fix compile errors
Donggeun Kim [Thu, 22 Mar 2012 04:38:55 +0000 (04:38 +0000)]
FAT write: Fix compile errors

This patch removes compile errors introduced by
commit 9813b750f32c0056f0a35813b9a9ec0f68b664af
'fs/fat: Fix FAT detection to support non-DOS partition tables'

fat_write.c: In function 'disk_write':
fat_write.c:54: error: 'part_offset' undeclared (first use in this function)
fat_write.c:54: error: (Each undeclared identifier is reported only once
fat_write.c:54: error: for each function it appears in.)
fat_write.c: In function 'do_fat_write':
fat_write.c:950: error: 'part_size' undeclared (first use in this function)

These errors only appear when this code is enabled by
defining CONFIG_FAT_WRITE option.

This patch was originally part of

http://article.gmane.org/gmane.comp.boot-loaders.u-boot/121847

Signed-off-by: Donggeun Kim <dg77.kim@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Maximilian Schwerin <mvs@tigris.de>
Fixed patch author and added all needed SoB from the original patch
and also submitter's SoB. Extended commit log.
Signed-off-by: Anatolij Gustschin <agust@denx.de>
12 years agoMerge branch 'master' of git://git.denx.de/u-boot-cfi-flash
Wolfgang Denk [Fri, 23 Mar 2012 20:59:16 +0000 (21:59 +0100)]
Merge branch 'master' of git://git.denx.de/u-boot-cfi-flash

* 'master' of git://git.denx.de/u-boot-cfi-flash:
  cfi: fix the incomplete erased status check in buffer write

12 years agoMerge branch 'master' of git://git.denx.de/u-boot-nds32
Wolfgang Denk [Fri, 23 Mar 2012 20:57:50 +0000 (21:57 +0100)]
Merge branch 'master' of git://git.denx.de/u-boot-nds32

* 'master' of git://git.denx.de/u-boot-nds32:
  nds32/n1213: correct vector table in start.S
  nds32: fix ptrace and interrupt register overflow

12 years agoRevert "Add board_pre_console_putc to deal with early console output"
Simon Glass [Tue, 20 Mar 2012 04:59:14 +0000 (21:59 -0700)]
Revert "Add board_pre_console_putc to deal with early console output"

This reverts commit 295d3942b806552503243f5cfb36aec6f1b5a9bf.

It turns that this really doesn't work very nicely. Instead we should
have a pre-console panic function so that we know that further execution
is impossible and we don't need to worry about trampling on UARTs, etc.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Wolfgang Denk <wd@denx.de>
12 years agocfi: fix the incomplete erased status check in buffer write
Tao Hou [Thu, 15 Mar 2012 15:33:58 +0000 (23:33 +0800)]
cfi: fix the incomplete erased status check in buffer write

Without the fix, flash_write_cfibuffer will terminate the erased
status check once an all-0xFF word has been found instead of
continuing the erased status check utill the first non-0xFF word.

Signed-off-by: Tao Hou <hotforest@gmail.com>
Cc: Stefan Roese <sr@denx.de>
Signed-off-by: Stefan Roese <sr@denx.de>
12 years agoETX094: adjust linker script due to grown code size
Wolfgang Denk [Mon, 19 Mar 2012 08:32:12 +0000 (09:32 +0100)]
ETX094: adjust linker script due to grown code size

Recent bootstage commits made the code grow, which caused linker
errors.  Adjust the linker script to fix that.

Signed-off-by: Wolfgang Denk <wd@denx.de>
12 years agonds32/n1213: correct vector table in start.S
Macpaul Lin [Sun, 11 Mar 2012 08:53:23 +0000 (16:53 +0800)]
nds32/n1213: correct vector table in start.S

Correct definition of vector table in start.S

Signed-off-by: Macpaul Lin <macpaul@gmail.com>
12 years agonds32: fix ptrace and interrupt register overflow
Macpaul Lin [Sun, 11 Mar 2012 08:30:18 +0000 (16:30 +0800)]
nds32: fix ptrace and interrupt register overflow

Fix ptrace and interrupt register overflow warning.
Add missing P0 and P1 (r26 and r27) into register lists.
These register are usually used in OS.

Signed-off-by: Macpaul Lin <macpaul@gmail.com>
12 years agoArmada100: gplugD: Add FAT & EXT2 command support
Ajay Bhargav [Mon, 13 Feb 2012 03:30:38 +0000 (03:30 +0000)]
Armada100: gplugD: Add FAT & EXT2 command support

This patch adds FAT and ext2 command support for marvell gplugD

Signed-off-by: Ajay Bhargav <ajay.bhargav@einfochips.com>
12 years agoArmada100: gplugD: Add USB command support
Ajay Bhargav [Mon, 13 Feb 2012 03:27:44 +0000 (03:27 +0000)]
Armada100: gplugD: Add USB command support

This patch adds support for USB commands and USB storage device for
Marvell gplugD

Signed-off-by: Ajay Bhargav <ajay.bhargav@einfochips.com>
12 years agoUSB: Armada100: EHCI Driver for Armada100 SOCs
Ajay Bhargav [Mon, 13 Feb 2012 03:27:43 +0000 (03:27 +0000)]
USB: Armada100: EHCI Driver for Armada100 SOCs

This patch adds support for USB EHCI driver for Armada100 SOCs.

Signed-off-by: Ajay Bhargav <ajay.bhargav@einfochips.com>
12 years agoUSB: Armada100: Add UTMI PHY interface driver
Ajay Bhargav [Mon, 13 Feb 2012 03:27:42 +0000 (03:27 +0000)]
USB: Armada100: Add UTMI PHY interface driver

This patch adds USB host controller's UTMI PHY interface driver for
Armada100 SOCs.

Signed-off-by: Ajay Bhargav <ajay.bhargav@einfochips.com>
12 years agogit-mailrc: change usb maintainer to Marek
Mike Frysinger [Mon, 5 Mar 2012 15:15:25 +0000 (15:15 +0000)]
git-mailrc: change usb maintainer to Marek

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
12 years agousb:udc:samsung:fix Remove the req_config flag
Łukasz Majewski [Mon, 12 Mar 2012 22:08:06 +0000 (22:08 +0000)]
usb:udc:samsung:fix Remove the req_config flag

The dev->req_config flag was indicating that the forwarded
request needs to perform the usb gadget delayed status.
This is however not needed anymore, so it can be removed.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Marek Vasut <marex@denx.de>
12 years agoUSB:gadget:designware Fix memory nonalignment issue
Shiraz Hashim [Tue, 6 Mar 2012 23:39:41 +0000 (23:39 +0000)]
USB:gadget:designware Fix memory nonalignment issue

While receiving packets from FIFO sometimes the buffer provided was
nonaligned. Fix this by taking a temporary aligned buffer and then
copying the content to nonaligned buffer.

Signed-off-by: Shiraz Hashim <shiraz.hashim@st.com>
Signed-off-by: Amit Virdi <amit.virdi@st.com>
12 years agoUSB:gadget:designware Make locally used functions static
Amit Virdi [Tue, 6 Mar 2012 23:39:40 +0000 (23:39 +0000)]
USB:gadget:designware Make locally used functions static

Signed-off-by: Amit Virdi <amit.virdi@st.com>
12 years agoUSB:gadget:designware Support high speed
Vipin KUMAR [Tue, 6 Mar 2012 23:39:39 +0000 (23:39 +0000)]
USB:gadget:designware Support high speed

This patch adds the support for usb device high speed for designware peripheral.

Signed-off-by: Vipin Kumar <vipin.kumar@st.com>
Signed-off-by: Amit Virdi <amit.virdi@st.com>
12 years agoUSB:gadget:designware Device controller bugfixes
Vipin KUMAR [Tue, 6 Mar 2012 23:39:38 +0000 (23:39 +0000)]
USB:gadget:designware Device controller bugfixes

This patch fixes a few bugs in USB device controller driver.
The fixes are as follows
1. Adding error condition checks eg. NULL return
2. Endpoint other than endpoint 0 (control endpoint) are initialized
only if usb state machine reaches STATE_ADDRESSED or above
3. Zero length packet handling corrected
4. Dead code removed
5. Bulk out endpoint returns after servicing 1 interrupt and returns
back to service if more interrupts are pending

Signed-off-by: Vipin Kumar <vipin.kumar@st.com>
Signed-off-by: Amit Virdi <amit.virdi@st.com>
Acked-by: Marek Vasut <marex@denx.de>
12 years agoUSB:gadget:designware USB device controller (UDC) implementation
Vipin KUMAR [Tue, 6 Mar 2012 23:39:37 +0000 (23:39 +0000)]
USB:gadget:designware USB device controller (UDC) implementation

The earlier usb device controller driver was specific to spear platforms. This
patch implements the usb device controller driver as a generic controller which
can be reused by other platforms using this peripheral.

Signed-off-by: Vipin Kumar <vipin.kumar@st.com>
Signed-off-by: Amit Virdi <amit.virdi@st.com>
Acked-by: Marek Vasut <marex@denx.de>
12 years agousb: replace wait_ms() with mdelay()
Mike Frysinger [Mon, 5 Mar 2012 13:47:00 +0000 (13:47 +0000)]
usb: replace wait_ms() with mdelay()

Common code has a mdelay() func, so use that instead of the usb-specific
wait_ms() func.  This also fixes the build errors:

ohci-hcd.c: In function 'submit_common_msg':
/usr/local/src/u-boot/blackfin/include/usb.h:202:44: sorry, unimplemented: inlining failed in call to 'wait_ms': function body not available
ohci-hcd.c:1519:9: sorry, unimplemented: called from here
/usr/local/src/u-boot/blackfin/include/usb.h:202:44: sorry, unimplemented: inlining failed in call to 'wait_ms': function body not available
ohci-hcd.c:1816:10: sorry, unimplemented: called from here
/usr/local/src/u-boot/blackfin/include/usb.h:202:44: sorry, unimplemented: inlining failed in call to 'wait_ms': function body not available
ohci-hcd.c:1827:10: sorry, unimplemented: called from here
/usr/local/src/u-boot/blackfin/include/usb.h:202:44: sorry, unimplemented: inlining failed in call to 'wait_ms': function body not available
ohci-hcd.c:1844:10: sorry, unimplemented: called from here
/usr/local/src/u-boot/blackfin/include/usb.h:202:44: sorry, unimplemented: inlining failed in call to 'wait_ms': function body not available
ohci-hcd.c:1563:11: sorry, unimplemented: called from here
/usr/local/src/u-boot/blackfin/include/usb.h:202:44: sorry, unimplemented: inlining failed in call to 'wait_ms': function body not available
ohci-hcd.c:1583:9: sorry, unimplemented: called from here
make[1]: *** [ohci-hcd.o] Error 1

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Acked-by: Marek Vasut <marex@denx.de>
12 years agousb: musb: fix printf warning
Mike Frysinger [Fri, 3 Feb 2012 03:03:04 +0000 (03:03 +0000)]
usb: musb: fix printf warning

musb_hcd.c: In function 'musb_submit_rh_msg':
musb_hcd.c:827:2: warning: format '%d' expects type 'int',
but argument 3 has type 'long unsigned int'

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
12 years agobootstage: arm: Add bootstage calls in board and bootm
Simon Glass [Mon, 13 Feb 2012 13:51:21 +0000 (13:51 +0000)]
bootstage: arm: Add bootstage calls in board and bootm

Add calls to bootstage before and after relocation, and just
before jumping to the OS.

The idea here is you can call bootstage_report() to get a report.
Additionally, if you define CONFIG_BOOTSTAGE_REPORT then a report is
printed automatically by U-Boot just before jumping to the kernel.

Signed-off-by: Simon Glass <sjg@chromium.org>
12 years agobootstage: Plumb in bootstage calls for basic operations
Simon Glass [Sat, 10 Dec 2011 11:08:06 +0000 (11:08 +0000)]
bootstage: Plumb in bootstage calls for basic operations

This inserts bootstage calls into tftp, usb start and bootm. We
could go further, but this is a reasonable start to illustrate
the concept.

Signed-off-by: Simon Glass <sjg@chromium.org>
12 years agobootstage: Implement core microsecond boot time measurement
Simon Glass [Mon, 13 Feb 2012 13:51:19 +0000 (13:51 +0000)]
bootstage: Implement core microsecond boot time measurement

This defines the basics of a new boot time measurement feature. This allows
logging of very accurate time measurements as the boot proceeds, by using
an available microsecond counter.

To enable the feature, define CONFIG_BOOTSTAGE in your board config file.
Also available is CONFIG_BOOTSTAGE_REPORT which will cause a report to be
printed just before handing off to the OS.

Most IDs are not named at this stage. For that I would first like to
renumber them all.

Timer summary in microseconds:
       Mark    Elapsed  Stage
          0          0  reset
    205,000    205,000  board_init_f
  6,053,000  5,848,000  bootm_start
  6,053,000          0  id=1
  6,058,000      5,000  id=101
  6,058,000          0  id=100
  6,061,000      3,000  id=103
  6,064,000      3,000  id=104
  6,093,000     29,000  id=107
  6,093,000          0  id=106
  6,093,000          0  id=105
  6,093,000          0  id=108
  7,089,000    996,000  id=7
  7,089,000          0  id=15
  7,089,000          0  id=8
  7,097,000      8,000  start_kernel

Signed-off-by: Simon Glass <sjg@chromium.org>
12 years agobootstage: Replace show_boot_progress/error() with bootstage_...()
Simon Glass [Mon, 13 Feb 2012 13:51:18 +0000 (13:51 +0000)]
bootstage: Replace show_boot_progress/error() with bootstage_...()

These calls should not be made directly any more, since bootstage
will call the show_boot_...() functions as needed.

Signed-off-by: Simon Glass <sjg@chromium.org>
12 years agobootstage: Define an optional microsecond timer
Simon Glass [Sat, 10 Dec 2011 11:08:03 +0000 (11:08 +0000)]
bootstage: Define an optional microsecond timer

Define timer_get_boot_us() which returns the number of microseconds
since boot. If undefined then we use get_timer() * 1000.

We can fit this in a 32-bit register which keeps everyone happy on
the efficiency side. It will wrap around after about an hour. If we
are still looking at it after an hour then we had better not be
timing the boot.

Signed-off-by: Simon Glass <sjg@chromium.org>
12 years agobootstage: Convert FIT progress numbers to enums
Simon Glass [Sat, 10 Dec 2011 11:08:02 +0000 (11:08 +0000)]
bootstage: Convert FIT progress numbers to enums

This changes over all the FIT image progress numbers to use enums
from bootstage.h.

Signed-off-by: Simon Glass <sjg@chromium.org>
12 years agobootstage: Convert net progress numbers to enums
Simon Glass [Sat, 14 Jan 2012 15:24:52 +0000 (15:24 +0000)]
bootstage: Convert net progress numbers to enums

This changes over the network-related progress numbers to use enums
from bootstage.h.

Signed-off-by: Simon Glass <sjg@chromium.org>
12 years agobootstage: Convert NAND progress numbers to enums
Simon Glass [Sat, 10 Dec 2011 11:08:00 +0000 (11:08 +0000)]
bootstage: Convert NAND progress numbers to enums

This changes over the NAND progress numbers to use enums from
bootstage.h.

Signed-off-by: Simon Glass <sjg@chromium.org>
12 years agobootstage: Convert IDE progress numbers to enums
Simon Glass [Sat, 10 Dec 2011 11:07:59 +0000 (11:07 +0000)]
bootstage: Convert IDE progress numbers to enums

This changes over the IDE progress numbers to use enums from bootstage.h.

Signed-off-by: Simon Glass <sjg@chromium.org>
12 years agobootstage: Convert progress numbers 20-41 to enums
Simon Glass [Sat, 10 Dec 2011 11:07:58 +0000 (11:07 +0000)]
bootstage: Convert progress numbers 20-41 to enums

Signed-off-by: Simon Glass <sjg@chromium.org>
12 years agobootstage: Convert progress numbers 10-19 to enums
Simon Glass [Sat, 10 Dec 2011 11:07:57 +0000 (11:07 +0000)]
bootstage: Convert progress numbers 10-19 to enums

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Mike Frysinger <vapier@gentoo.org>
12 years agobootstage: Convert progress numbers 1-9 into enums
Simon Glass [Sat, 14 Jan 2012 15:24:47 +0000 (15:24 +0000)]
bootstage: Convert progress numbers 1-9 into enums

Signed-off-by: Simon Glass <sjg@chromium.org>
12 years agobootstage: Use show_boot_error() for -ve progress numbers
Simon Glass [Sat, 10 Dec 2011 11:07:55 +0000 (11:07 +0000)]
bootstage: Use show_boot_error() for -ve progress numbers

Rather than the caller negating our progress numbers to indicate an
error has occurred, which seems hacky, add a function to indicate this.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Mike Frysinger <vapier@gentoo.org>
12 years agobootstage: Make use of BOOTSTAGE_ID_RUN_OS in show_boot_progress()
Simon Glass [Sat, 10 Dec 2011 11:07:54 +0000 (11:07 +0000)]
bootstage: Make use of BOOTSTAGE_ID_RUN_OS in show_boot_progress()

This changes the number 15 as used in boot_stage_progress() to use the
new name provided for it. This is a separate patch because it touches
so many files.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Mike Frysinger <vapier@gentoo.org>
12 years agobootstage: Create an initial header for boot progress integers
Simon Glass [Sat, 14 Jan 2012 15:24:44 +0000 (15:24 +0000)]
bootstage: Create an initial header for boot progress integers

At present boot_stage_progress() is called with various magic numbers. The
new bootstage.h header will be used to turn these into symbolic names
throughout the code.

The intent is not that these numbers are passed to Linux. In fact by using
an enum to track them we should eventually be able to remove the explict
numbers and just have the stages count up from 0.

Signed-off-by: Simon Glass <sjg@chromium.org>
12 years agobootvx: Clear and disable data cache, and call vxWorks with parameter.
Reinhard Arlt [Fri, 18 Nov 2011 09:06:52 +0000 (09:06 +0000)]
bootvx: Clear and disable data cache, and call vxWorks with parameter.

This patch clear and disable the data cache for vxWorks.

The entry point sysInit(int) intended by Windriver to be called from
the vxWorks bootrom, a very small vxWorks system.
The routine is called by the go() handler in the bootrom, that clears
the cache from start of image to end of usable memory.

The PowerPC implementations only invalidates and disable the cache,
the ARM implementations also flush it.

U-Boot will be on the safe side, if it disables the data cache before
calling vxWorks sysInit(int).

Signed-off-by: Reinhard Arlt <reinhard.arlt@esd.eu>
12 years agonet/miiphy/serial: drop duplicate "NAMESIZE" define
Mike Frysinger [Thu, 10 Nov 2011 14:11:04 +0000 (14:11 +0000)]
net/miiphy/serial: drop duplicate "NAMESIZE" define

A few subsystems are using the same define "NAMESIZE".  This has been
working so far because they define it to the same number.  However, I
want to change the size of eth_device's NAMESIZE, so rather than tweak
the define names, simply drop references to it.  Almost no one does,
and the handful that do can easily be changed to a sizeof().

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
12 years agoCPCI750: Add CPCI-HD/2 support
Reinhard Arlt [Thu, 10 Nov 2011 08:51:57 +0000 (08:51 +0000)]
CPCI750: Add CPCI-HD/2 support

This patch adds support for the esd CPCI-HD/2 board to u-boot for CPCI-CPU/750.
As the primary devices on the CPCI-HD/2 board are connected to device 1 and 3,
the device must be swapped.

Signed-off-by: Reinhard Arlt <reinhard.arlt@esd.eu>
12 years agoMerge branch 'master' of git://git.denx.de/u-boot-avr32
Wolfgang Denk [Sat, 17 Mar 2012 20:50:59 +0000 (21:50 +0100)]
Merge branch 'master' of git://git.denx.de/u-boot-avr32

* 'master' of git://git.denx.de/u-boot-avr32:
  atmel_mci.h: remove outdated register macros
  doc/git-mailrc: add <me> to avr32 alias
  ATMEL: remove old atmel_mci driver
  ATMEL: use generic mmc framework

12 years agoMerge branch 'sandbox' of git://git.denx.de/u-boot-blackfin
Wolfgang Denk [Sat, 17 Mar 2012 20:46:33 +0000 (21:46 +0100)]
Merge branch 'sandbox' of git://git.denx.de/u-boot-blackfin

* 'sandbox' of git://git.denx.de/u-boot-blackfin:
  sandbox: mark os_exit as noreturn
  sandbox: add getopt support
  sandbox: allow processing before main loop
  sandbox: add concept of sandbox state
  sandbox: disable fortification
  sandbox: u-boot.lds: tweak style
  sandbox: add get_{tbclk,ticks}
  sandbox: enable GPIO driver
  sandbox: gpio: add basic driver for simulating GPIOs
  sandbox: add flags for open() call
  sandbox: config: enable fdt and snprintf() options
  sandbox: fdt: add support for CONFIG_OF_CONTROL
  sandbox: add lseek helper
  sandbox: add ifdef protection to os.h
  sandbox: add required header to os.c
  sandbox: sort header files in os.c

12 years agoMerge branch 'master' of git://git.denx.de/u-boot-sh
Wolfgang Denk [Sat, 17 Mar 2012 20:44:35 +0000 (21:44 +0100)]
Merge branch 'master' of git://git.denx.de/u-boot-sh

* 'master' of git://git.denx.de/u-boot-sh:
  sh: timer: Remove unnecessary variable 'ticks'
  sh: Fix sh7264 clock speed and related serial setting
  net: sh_eth: Remove unnecessary return
  net: sh_eth: Collect up EDMR_INIT_CNT to TIMEOUT_CNT
  net: sh_eth: Remove SH_ETH_PHY_DELAY
  sh: ecovec: Add support PHY of SMSC
  sh: sh_eth: Add support SH7724

12 years agomxsboot: fix tool name in usage message
Otavio Salvador [Sat, 17 Mar 2012 09:16:50 +0000 (09:16 +0000)]
mxsboot: fix tool name in usage message

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
12 years agoatmel_mci.h: remove outdated register macros
Andreas Bießmann [Tue, 13 Mar 2012 11:43:51 +0000 (12:43 +0100)]
atmel_mci.h: remove outdated register macros

New gen_atmel_mci driver does not use the outated register access macros. Since
the old atmel_mci driver is deleted these macros are no longer necessary.

Signed-off-by: Andreas Bießmann <biessmann@corscience.de>
12 years agodoc/git-mailrc: add <me> to avr32 alias
Andreas Bießmann [Sat, 10 Mar 2012 12:31:35 +0000 (13:31 +0100)]
doc/git-mailrc: add <me> to avr32 alias

Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
12 years agoATMEL: remove old atmel_mci driver
Sven Schnelle [Fri, 21 Oct 2011 12:49:26 +0000 (14:49 +0200)]
ATMEL: remove old atmel_mci driver

All boards are using the gen_atmel_mci driver now, so no need
to carry the old driver around.

Signed-off-by: Sven Schnelle <svens@stackframe.org>
Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
12 years agoATMEL: use generic mmc framework
Sven Schnelle [Fri, 21 Oct 2011 12:49:25 +0000 (14:49 +0200)]
ATMEL: use generic mmc framework

gen_atmel_mci works on AVR32 as well, so no need to use the legacy
mmc driver. This also has the nice side effect of being able to use
SDHC cards an those boards.

Signed-off-by: Sven Schnelle <svens@stackframe.org>
Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
12 years agosandbox: mark os_exit as noreturn
Mike Frysinger [Sun, 26 Feb 2012 22:46:30 +0000 (17:46 -0500)]
sandbox: mark os_exit as noreturn

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
12 years agosandbox: add getopt support
Simon Glass [Wed, 15 Feb 2012 23:51:16 +0000 (15:51 -0800)]
sandbox: add getopt support

This adds simple command-line parsing to sandbox. The idea is that it
sets up the state with options provided, and this state can then be
queried later, as needed.

New flags are declared with the SB_CMDLINE_OPT_SHORT helper macro,
pointers are automatically gathered up in a special section, and
then the core code takes care of gathering them up and processing
at runtime.  This way there is no central place where we have to
store a list of flags with ifdefs.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
12 years agosandbox: allow processing before main loop
Simon Glass [Sun, 26 Feb 2012 22:38:50 +0000 (17:38 -0500)]
sandbox: allow processing before main loop

In order to pass command line arguments to sandbox we need to be able
to act on them. So take control back at the end of board_init_r() from
where we can call the main loop or do something else.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
12 years agosandbox: add concept of sandbox state
Simon Glass [Wed, 15 Feb 2012 23:51:15 +0000 (15:51 -0800)]
sandbox: add concept of sandbox state

The state exists through the life of U-Boot. It can be adjusted by command
line options and perhaps later through a config file.  It is available to
U-Boot through state_...() calls (within sandbox code).

The primary purpose of this is to contain the "hardware" state.  It should
only be used by sandbox internal code.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
12 years agosandbox: disable fortification
Mike Frysinger [Sun, 26 Feb 2012 21:00:26 +0000 (16:00 -0500)]
sandbox: disable fortification

Since we provide all our own library calls, the fortification from
glibc just gets in our way (which some distros enable by default).

Acked-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
12 years agosandbox: u-boot.lds: tweak style
Mike Frysinger [Sun, 26 Feb 2012 19:13:31 +0000 (14:13 -0500)]
sandbox: u-boot.lds: tweak style

We use tabs for indentation, not spaces.

Acked-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
12 years agosandbox: add get_{tbclk,ticks}
Mike Frysinger [Tue, 21 Feb 2012 05:21:17 +0000 (00:21 -0500)]
sandbox: add get_{tbclk,ticks}

Fixes building after recent readline updates with timeouts.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
12 years agosandbox: enable GPIO driver
Simon Glass [Wed, 15 Feb 2012 23:51:14 +0000 (15:51 -0800)]
sandbox: enable GPIO driver

Enable the new GPIO driver for sandbox.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
12 years agosandbox: gpio: add basic driver for simulating GPIOs
Simon Glass [Wed, 15 Feb 2012 23:51:13 +0000 (15:51 -0800)]
sandbox: gpio: add basic driver for simulating GPIOs

This provides a way of simulating GPIOs by setting values which are seen
by the normal gpio_get/set_value() calls.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
12 years agosandbox: add flags for open() call
Simon Glass [Tue, 21 Feb 2012 04:56:58 +0000 (23:56 -0500)]
sandbox: add flags for open() call

This provides a way for callers to create files for writing. The flags
are translated at runtime, for the ones we support.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
12 years agosandbox: config: enable fdt and snprintf() options
Simon Glass [Wed, 15 Feb 2012 23:51:12 +0000 (15:51 -0800)]
sandbox: config: enable fdt and snprintf() options

Enable fdt code and safe snprintf() options for sandbox.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
12 years agosandbox: fdt: add support for CONFIG_OF_CONTROL
Simon Glass [Wed, 15 Feb 2012 23:51:11 +0000 (15:51 -0800)]
sandbox: fdt: add support for CONFIG_OF_CONTROL

This adds support for a controlling fdt, mirroring the ARM implementation.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
12 years agosandbox: add lseek helper
Mike Frysinger [Tue, 25 Oct 2011 11:02:58 +0000 (13:02 +0200)]
sandbox: add lseek helper

Follow up patches want to be able to seek fd's.

Acked-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
12 years agosandbox: add ifdef protection to os.h
Mike Frysinger [Fri, 20 Jan 2012 03:57:29 +0000 (22:57 -0500)]
sandbox: add ifdef protection to os.h

Acked-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
12 years agosandbox: add required header to os.c
Simon Glass [Tue, 10 Jan 2012 23:54:06 +0000 (15:54 -0800)]
sandbox: add required header to os.c

We should include the sys/time.h header to avoid warnings.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
12 years agosandbox: sort header files in os.c
Simon Glass [Tue, 10 Jan 2012 23:54:05 +0000 (15:54 -0800)]
sandbox: sort header files in os.c

Tidy this up as the list is long and likely to get longer.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
12 years agoRevert "post/Makefile: Only build FP post tests if enabled via CONFIG_SYS_POST_FPU"
Wolfgang Denk [Mon, 12 Mar 2012 14:00:23 +0000 (15:00 +0100)]
Revert "post/Makefile: Only build FP post tests if enabled via CONFIG_SYS_POST_FPU"

This reverts commit 3e16abe0e468c568b30acb7d8583e3dbed6f177b.

The logic of this patch is broken - testing for CONFIG_SYS_POST_FPU in
the Makefile cannot work, as this is only a bit that may (or may not)
be set in the CONFIG_POST variable.

The patch cases build errors on a number of boards, so we revert it.

Signed-off-by: Wolfgang Denk <wd@denx.de>
12 years agosh: timer: Remove unnecessary variable 'ticks'
Nobuhiro Iwamatsu [Thu, 1 Mar 2012 04:29:38 +0000 (13:29 +0900)]
sh: timer: Remove unnecessary variable 'ticks'

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Reported-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
12 years agosh: Fix sh7264 clock speed and related serial setting
Phil Edworthy [Mon, 13 Feb 2012 02:03:50 +0000 (02:03 +0000)]
sh: Fix sh7264 clock speed and related serial setting

The generalised calculation of the serial bit rate reg also applies
to sh7264, it was just the clock speed that was set incorrectly.

Signed-off-by: Phil Edworthy <phil.edworthy@renesas.com>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
12 years agonet: sh_eth: Remove unnecessary return
Nobuhiro Iwamatsu [Wed, 11 Jan 2012 01:32:54 +0000 (10:32 +0900)]
net: sh_eth: Remove unnecessary return

Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
12 years agonet: sh_eth: Collect up EDMR_INIT_CNT to TIMEOUT_CNT
Nobuhiro Iwamatsu [Wed, 11 Jan 2012 01:23:51 +0000 (10:23 +0900)]
net: sh_eth: Collect up EDMR_INIT_CNT to TIMEOUT_CNT

EDMR_INIT_CNT holds the check count of initialization.
Since there were more same values (1000), this collected as TIMEOUT_CNT.

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
12 years agonet: sh_eth: Remove SH_ETH_PHY_DELAY
Nobuhiro Iwamatsu [Wed, 11 Jan 2012 01:12:08 +0000 (10:12 +0900)]
net: sh_eth: Remove SH_ETH_PHY_DELAY

SH_ETH_PHY_DELAY is not used.

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
12 years agosh: ecovec: Add support PHY of SMSC
Nobuhiro Iwamatsu [Thu, 1 Dec 2011 18:48:38 +0000 (18:48 +0000)]
sh: ecovec: Add support PHY of SMSC

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
12 years agosh: sh_eth: Add support SH7724
Nobuhiro Iwamatsu [Mon, 14 Nov 2011 07:56:59 +0000 (16:56 +0900)]
sh: sh_eth: Add support SH7724

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
12 years agoimage: Support FDTs already loaded at their load address
Stephen Warren [Tue, 1 Nov 2011 06:28:21 +0000 (06:28 +0000)]
image: Support FDTs already loaded at their load address

boot_get_fdt() expects a uImage-wrapped FDT to be loaded to a staging
location, and then memmove()s it to the load address specified in the
header. This change enhances boot_get_fdt() to detect when the image has
already been loaded to the correct address, and skip this memmove(). The
detection algorithm was written to match the equivalent for the kernel;
see bootm_load_os()'s IH_COMP_NONE case.

v2: New patch

Signed-off-by: Stephen Warren <swarren@nvidia.com>
12 years agocmd_cache: use cache/invalidate functions available in common.h
Stefan Kristiansson [Mon, 31 Oct 2011 18:21:12 +0000 (18:21 +0000)]
cmd_cache: use cache/invalidate functions available in common.h

flush_dcache()/flush_icache() aren't defined in common.h,
flush_dcache_all()/invalidate_icache_all() however are.

Let the icache and dcache commands use those instead.

Signed-off-by: Stefan Kristiansson <stefan.kristiansson@saunalahti.fi>
Acked-by: Mike Frysinger <vapier@gentoo.org>
12 years agotools: checkstack.pl from Linux added to tools
Tom Rini [Thu, 2 Feb 2012 14:07:05 +0000 (14:07 +0000)]
tools: checkstack.pl from Linux added to tools

Added from Linux - commit 62aa2b537c6f5957afd98e29f96897419ed5ebab

Signed-off-by: Tom Rini <trini@ti.com>
12 years agoMakefile: Remove mmc_spl related enteries
Chander Kashyap [Mon, 7 Nov 2011 18:43:14 +0000 (18:43 +0000)]
Makefile: Remove mmc_spl related enteries

As mmc_spl now follows SPL infrastructure, removed unwanted
entries in Makefile for mmc_spl related compilation.

Signed-off-by: Chander Kashyap <chander.kashyap@linaro.org>
12 years agoMerge branch 'master' of git://git.denx.de/u-boot-x86
Wolfgang Denk [Tue, 6 Mar 2012 20:28:45 +0000 (21:28 +0100)]
Merge branch 'master' of git://git.denx.de/u-boot-x86

* 'master' of git://git.denx.de/u-boot-x86:
  sc520: fix build warning about unused temp var

12 years agoPPC: Drop mv6446x_eth_initialize() from net/eth.c
Marek Vasut [Fri, 2 Mar 2012 22:39:32 +0000 (22:39 +0000)]
PPC: Drop mv6446x_eth_initialize() from net/eth.c

This function was defined as an extern in net/eth.c, drop that and use
standard means of calling it.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Stefan Roese <sr@denx.de>
12 years agoPPC: Drop mv6436x_eth_initialize() from net/eth.c
Marek Vasut [Fri, 2 Mar 2012 22:39:31 +0000 (22:39 +0000)]
PPC: Drop mv6436x_eth_initialize() from net/eth.c

This function was defined as an extern in net/eth.c, drop that and use
standard means of calling it.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Reinhard Arlt <reinhard.arlt@esd-electronics.com>
12 years agoConvert cmd_usage() calls in common to use a return value
Simon Glass [Sat, 10 Dec 2011 08:44:01 +0000 (08:44 +0000)]
Convert cmd_usage() calls in common to use a return value

Change all files in common/ to use CMD_RET_USAGE instead of calling
cmd_usage() directly. I'm not completely sure about this patch since
the code since impact is small (100 byte or so on ARM) and it might
need splitting into smaller patches. But for now here it is.

Signed-off-by: Simon Glass <sjg@chromium.org>
12 years agoAdd cmd_process() to process commands in one place
Simon Glass [Tue, 14 Feb 2012 19:59:25 +0000 (19:59 +0000)]
Add cmd_process() to process commands in one place

We currently have the same code in hush.c and main.c. This brings the
code into one place.

As an added feature, if the command function returns CMD_RET_USAGE then
cmd_process() will print a usage message for the command before
returning the standard failure code of 1.

ARM code size increases about 32 bytes with this clean-up.

Signed-off-by: Simon Glass <sjg@chromium.org>
12 years agoRemove interleave of non-U-Boot code in hush
Simon Glass [Tue, 6 Dec 2011 19:47:53 +0000 (19:47 +0000)]
Remove interleave of non-U-Boot code in hush

There is a nasty interleave of #ifdefs in hush.c where the two code
paths have different indents. Remove this ickiness.

Signed-off-by: Simon Glass <sjg@chromium.org>
12 years agoCreate a single cmd_call() function to handle command execution
Simon Glass [Tue, 14 Feb 2012 19:59:23 +0000 (19:59 +0000)]
Create a single cmd_call() function to handle command execution

We should aim for a single point of entry to the commands, whichever
parser is used.

Signed-off-by: Simon Glass <sjg@chromium.org>
12 years agoDon't include standard parser if hush is used
Simon Glass [Tue, 14 Feb 2012 19:59:22 +0000 (19:59 +0000)]
Don't include standard parser if hush is used

This saves about 1KB of code space on ARM with CONFIG_SYS_HUSH_PARSER
defined.

Signed-off-by: Simon Glass <sjg@chromium.org>
12 years agoStop using builtin_run_command()
Simon Glass [Tue, 14 Feb 2012 19:59:21 +0000 (19:59 +0000)]
Stop using builtin_run_command()

Boards can select either the 'built-in' parser or the hush parser. We
should not call builtin_run_command() if we are using the hush parser.
We use run_command() instead, since it knows how to call the correct
parser.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Mike Frysinger <vapier@gentoo.org>
12 years agoRename run_command2() to run_command()
Simon Glass [Tue, 14 Feb 2012 19:59:20 +0000 (19:59 +0000)]
Rename run_command2() to run_command()

This is a more sensible name, so rename it.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Mike Frysinger <vapier@gentoo.org>
12 years agoRename run_command() to builtin_run_command()
Simon Glass [Tue, 14 Feb 2012 19:59:19 +0000 (19:59 +0000)]
Rename run_command() to builtin_run_command()

The current run_command() is only one of the parsing options - the other
is hush. We should not call run_command() when the hush parser is being
used. So we rename this function to better explain its purpose.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Mike Frysinger <vapier@gentoo.org>
12 years agoRemove CMD_PXE's static on run_command()
Simon Glass [Tue, 14 Feb 2012 19:59:18 +0000 (19:59 +0000)]
Remove CMD_PXE's static on run_command()

It really isn't clear why this is here and there is no comment, so
drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Mike Frysinger <vapier@gentoo.org>
12 years agosc520: fix build warning about unused temp var
Mike Frysinger [Mon, 5 Mar 2012 11:55:32 +0000 (11:55 +0000)]
sc520: fix build warning about unused temp var

Building the eNET_SRAM board fails for me:
sc520_timer.c: In function 'sc520_udelay':
sc520_timer.c:81:7: error: variable 'temp' set but not used
[-Werror=unused-but-set-variable]
cc1: all warnings being treated as errors
make[1]: *** [sc520_timer.o] Error 1

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
12 years agoRemove execute permissions from source files
Thomas Weber [Mon, 13 Feb 2012 18:21:54 +0000 (19:21 +0100)]
Remove execute permissions from source files

Signed-off-by: Thomas Weber <weber@corscience.de>
12 years agointegrator: remove fragile delay loop from PCI code
Linus Walleij [Sat, 3 Mar 2012 20:21:13 +0000 (21:21 +0100)]
integrator: remove fragile delay loop from PCI code

The reference implementation of the PCI initialization code almost
everywhere contain this fragile loop of "a few usecs", and its
use of volatile variables to delay a number of bus cycles is indeed
uncertain.

Reading the manual "Integrator/AP Users Guide", page 5-15 it is
clearly stated:

"Wait until 230ms after the end of the reset period before
accessing V360EPC internal registers. The V360EPC supports the
use of a serial configuration PROM and the software must wait for
the device to detect the absence of this PROM before accessing any
registers. The required delay is a function of the PCI Clock, but
at the lower frequency (25MHz) is 230ms".

So let's simply wait 230ms per the spec.

This solves the compilation error that looked like this:
pci.c: In function ‘pci_init_board’:
pci.c:286:18: warning: variable ‘j’ set but not used

Reported-by: Wolfgang Denk <wd@denx.de>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
12 years agopci: move pciauto_config_init() to pci.h
Linus Walleij [Sat, 3 Mar 2012 10:05:08 +0000 (10:05 +0000)]
pci: move pciauto_config_init() to pci.h

Fixing build regressions for the Integrator I get find that a few
boards try to work around the missing declaration of
pciauto_config_init() by declaring it in the local scope. This
does not make sense when the sibling functions are in <pci.h>
so move the function to the header, ridding the build error
in the Integrator and getting rid of the local declarations
here and there.

Reported-by: Wolfgang Denk <wd@denx.de>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
12 years agoppc: Change memsz variable to signed char
Simon Glass [Thu, 5 Jan 2012 17:54:57 +0000 (17:54 +0000)]
ppc: Change memsz variable to signed char

This seems to be unsigned char for no good reason. Tidy this up and
remove the casts.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Mike Frysinger <vapier@gentoo.org>