platform/kernel/u-boot.git
14 years agoMove libfdt/ into lib/
Peter Tyser [Tue, 13 Apr 2010 03:28:06 +0000 (22:28 -0500)]
Move libfdt/ into lib/

Move the libfdt directory into the common lib/ directory to clean up the
top-level directory.

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
14 years agoRename lib_generic/ to lib/
Peter Tyser [Tue, 13 Apr 2010 03:28:05 +0000 (22:28 -0500)]
Rename lib_generic/ to lib/

Now that the other architecture-specific lib directories have been
moved out of the top-level directory there's not much reason to have the
'_generic' suffix on the common lib directory.

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
14 years agoMove lib_$ARCH directories to arch/$ARCH/lib
Peter Tyser [Tue, 13 Apr 2010 03:28:04 +0000 (22:28 -0500)]
Move lib_$ARCH directories to arch/$ARCH/lib

Also move lib_$ARCH/config.mk to arch/$ARCH/config.mk

This change is intended to clean up the top-level directory structure
and more closely mimic Linux's directory organization.

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
14 years agoChange directory-specific CFLAGS to use full path
Peter Tyser [Tue, 13 Apr 2010 03:28:03 +0000 (22:28 -0500)]
Change directory-specific CFLAGS to use full path

Previously, a specific file or directory could be compiled with custom
CFLAGS by adding a Makefile variable such as:
  CFLAGS_dlmalloc.o = <custom flags for common/dlmalloc.c>
or
  CFLAGS_lib = <custom flags for lib directory>

This method breaks down once multiple files or directories share the
same path.  Eg FLAGS_fileA = <custom flags> would incorrectly result in
both dir1/fileA.c and dir2/fileA.c being compiled with <custom flags>.

This change allows finer grained control which we need once we move
lib_$ARCH to arch/$ARCH/lib/ and lib_generic/ to lib/.  Without this
change all lib/ directories would share the same custom CFLAGS.

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
14 years agoCreate CPUDIR variable
Peter Tyser [Tue, 13 Apr 2010 03:28:02 +0000 (22:28 -0500)]
Create CPUDIR variable

The CPUDIR variable points to the location of a target's CPU directory.
Currently, it is set to cpu/$CPU.  However, using $CPUDIR will allow for
more flexibility in the future.  It lays the groundwork for reorganizing
U-Boot's directory structure to support a layout such as:

  arch/$ARCH/cpu/$CPU/* (architecture with multiple CPU types)
  arch/$ARCH/cpu/*      (architecture with one CPU type)

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
14 years agoMerge branch 'master' of git://git.denx.de/u-boot-blackfin
Wolfgang Denk [Sat, 10 Apr 2010 21:59:39 +0000 (23:59 +0200)]
Merge branch 'master' of git://git.denx.de/u-boot-blackfin

14 years agoFIX: watchdog timeout, while waiting for input
Jens Scharsig [Fri, 9 Apr 2010 17:02:38 +0000 (19:02 +0200)]
FIX: watchdog timeout, while waiting for input

* add WATCHDOG_RESET to !tstc() loops
* prevents watchdog timeout, while waiting for input,
  if CONFIG_BOOT_RETRY_TIME or CONFIG_SHOW_ACTIVITY defined

Signed-off-by: Jens Scharsig <js_at_ng@scharsoft.de>
14 years agoconfig_cmd_all.h: Sort entries alphabetically
Detlev Zundel [Thu, 8 Apr 2010 15:55:48 +0000 (17:55 +0200)]
config_cmd_all.h: Sort entries alphabetically

Signed-off-by: Detlev Zundel <dzu@denx.de>
14 years agoconfig_cmd_all.h: added missing CONFIG_CMD_UBI and CONFIG_CMD_UBIFS
Frans Meulenbroeks [Thu, 8 Apr 2010 15:55:47 +0000 (17:55 +0200)]
config_cmd_all.h: added missing CONFIG_CMD_UBI and CONFIG_CMD_UBIFS

Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
14 years agomalloc: sbrk() should return MORECORE_FAILURE instead of NULL on failure
karl.beldan@gmail.com [Tue, 6 Apr 2010 20:18:08 +0000 (22:18 +0200)]
malloc: sbrk() should return MORECORE_FAILURE instead of NULL on failure

Signed-off-by: Karl Beldan <karl.beldan@gmail.com>
14 years agomkimage: Fix strict-aliasing compiler warning
Peter Tyser [Mon, 5 Apr 2010 03:36:03 +0000 (22:36 -0500)]
mkimage: Fix strict-aliasing compiler warning

Version 4.2.4 of gcc produces the following warnings without this change:
  mkimage.c: In function ‘main’:
  mkimage.c:204: warning: dereferencing type-punned pointer will break strict-aliasing rules
  mkimage.c:222: warning: dereferencing type-punned pointer will break strict-aliasing rules

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
14 years agoAdd initial support for Matrix Vision mvSMR board based on MPC5200B.
Andre Schwarz [Thu, 1 Apr 2010 19:26:55 +0000 (21:26 +0200)]
Add initial support for Matrix Vision mvSMR board based on MPC5200B.

Signed-off-by: Andre Schwarz <andre.schwarz@matrix-vision.de>
14 years agocmd_bmp.c: add standard subcommand handling
Frans Meulenbroeks [Sat, 27 Mar 2010 10:16:10 +0000 (11:16 +0100)]
cmd_bmp.c: add standard subcommand handling

Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
Acked-by: Detlev Zundel <dzu@denx.de>
14 years agodrivers/mtd/spi/eeprom_m95xxx.c: add missing error checking
Albin Tonnerre [Sun, 14 Mar 2010 17:47:23 +0000 (18:47 +0100)]
drivers/mtd/spi/eeprom_m95xxx.c: add missing error checking

Signed-off-by: Albin Tonnerre <albin.tonnerre@free-electrons.com>
14 years agoMerge branch 'master' of git://git.denx.de/u-boot-ubi
Wolfgang Denk [Fri, 9 Apr 2010 19:49:42 +0000 (21:49 +0200)]
Merge branch 'master' of git://git.denx.de/u-boot-ubi

14 years agoMerge branch 'master' of git://git.denx.de/u-boot-usb
Wolfgang Denk [Fri, 9 Apr 2010 19:42:18 +0000 (21:42 +0200)]
Merge branch 'master' of git://git.denx.de/u-boot-usb

14 years agocmd_ubi: Fix uninitialized variable warning
Peter Tyser [Mon, 5 Apr 2010 03:40:50 +0000 (22:40 -0500)]
cmd_ubi: Fix uninitialized variable warning

gcc 3.4.6 previously reported the following error on many MIPS boards
which utilize UBI:
  cmd_ubi.c:193: warning: 'vol' might be used uninitialized in this function

The current code is structured such that 'vol' will never be used when
it is NULL anyway, but gcc isn't smart enough to figure this out.

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
Signed-off-by: Stefan Roese <sr@denx.de>
14 years agoUSB storage probe
Kim B. Heino [Fri, 12 Mar 2010 08:07:00 +0000 (10:07 +0200)]
USB storage probe

While debugging one ill behaving USB device I found two bugs in USB
storage probe.

usb_stor_get_info() returns -1 (error), 0 (skip) or 1 (ok). First part
of this patch fixes error case.

Second part fixes usb_inquiry()'s retry counter handling. Original code
had retry = -1 on error case, not retry = 0 as checked in the next line.

Signed-off-by: Kim B. Heino <Kim.Heino@bluegiga.com>
14 years agoUSB storage count
Kim B. Heino [Fri, 12 Mar 2010 13:46:56 +0000 (15:46 +0200)]
USB storage count

Here's another USB storage patch. Currently U-Boot handles storage
devices #0 - #4 as valid devices, even if there is none connected. This
patch fixes usb_stor_get_dev() to check detected device count instead
of MAX-define.

This is very important for ill behaving devices. usb_dev_desc[] can be
partially initialized if device probe fails.

After fixing get_dev() it was easy to fix "usb part" etc commands.
Previously it outputed "Unknown partition table" five times, now it's
"no USB devices available".

Signed-off-by: Kim B. Heino <Kim.Heino@bluegiga.com>
14 years agoEHCI: add NEC PCI ID
Sergei Shtylyov [Sat, 27 Feb 2010 18:34:41 +0000 (21:34 +0300)]
EHCI: add NEC PCI ID

Add NEC EHCI controller to the list of the supported devices.

Signed-off-by: Sergei Shtylyov <sshtylyov@mvista.com>
 drivers/usb/host/ehci-pci.c |    1 +
 1 file changed, 1 insertion(+)

14 years agoEHCI: fix port reset reporting
Sergei Shtylyov [Sat, 27 Feb 2010 18:33:21 +0000 (21:33 +0300)]
EHCI: fix port reset reporting

Commit b416191a14770c6bcc6fd67be7decf8159b2baee (Fix EHCI port reset.) didn't
move the code that checked for successful clearing of the port reset bit from
ehci_submit_root(), relying on wait_ms() call instead. The mentioned code also
erroneously reported port reset state when the reset was already completed.

Signed-off-by: Sergei Shtylyov <sshtylyov@mvista.com>
14 years agoEHCI: fix off-by-one error in ehci_submit_root()
Sergei Shtylyov [Sat, 27 Feb 2010 18:32:17 +0000 (21:32 +0300)]
EHCI: fix off-by-one error in ehci_submit_root()

USB devices on the 2nd port are not detected and I get the following message:

The request port(1) is not configured

That's with default CONFIG_SYS_USB_EHCI_MAX_ROOT_PORTS value of 2. 'req->index'
is 1-based, so the comparison in ehci_submit_root() can't be correct.

Signed-off-by: Sergei Shtylyov <sshtylyov@mvista.com>
14 years agoEHCI: fix root hub device descriptor
Sergei Shtylyov [Sat, 27 Feb 2010 18:29:42 +0000 (21:29 +0300)]
EHCI: fix root hub device descriptor

On little endian machines, EHCI root hub's USB revision is reported as 0.2 --
cpu_to_le16() was missed in the initializer for the 'bcdUSB' descriptor field.
The same should be done for the 'bcdDevice' field.

Signed-off-by: Sergei Shtylyov <sshtylyov@mvista.com>
14 years agovideo: ati_radeon_fb.c: fix warning while compiling with DEBUG
Anatolij Gustschin [Thu, 8 Apr 2010 13:50:55 +0000 (15:50 +0200)]
video: ati_radeon_fb.c: fix warning while compiling with DEBUG

Fixes this warning:

ati_radeon_fb.c: In function 'radeon_probe':
ati_radeon_fb.c:598: warning: format '%x' expects type 'unsigned int',
but argument 2 has type 'void *'

Signed-off-by: Anatolij Gustschin <agust@denx.de>
14 years agoati_radeon: Support PCI virtual not eq bus mapping.
Ed Swarthout [Wed, 31 Mar 2010 20:52:40 +0000 (15:52 -0500)]
ati_radeon: Support PCI virtual not eq bus mapping.

Use pci_bus_to_virt() to convert the bus address from the BARs to
virtual address' to eliminate the direct mapping requirement.

Rename variables to better match usage (_phys -> _bus or no-suffix)

This fixes the mpc8572ds CONFIG_PHYS_64BIT mode failure:
"videoboot: Video ROM failed to map!"

Tested on mpc8572ds with and without CONFIG_PHYS_64BIT.

Signed-off-by: Ed Swarthout <Ed.Swarthout@freescale.com>
14 years agoati_radeon: return with error when emulator fails
Ed Swarthout [Wed, 31 Mar 2010 14:54:28 +0000 (09:54 -0500)]
ati_radeon: return with error when emulator fails

Console was being switched to video even if emulator fails and
causing this hang:

               Scanning PCI bus 04
        04  00  1095  3132  0104  00
    PCIE3 on bus 03 - 04
Video: ATI Radeon video card (1002, 5b60) found @(2:0:0)
videoboot: Booting PCI video card bus 2, function 0, device 0
videoboot: Video ROM failed to map!
640x480x8 31kHz 59Hz
radeonfb: FIFO Timeout !

Signed-off-by: Ed Swarthout <Ed.Swarthout@freescale.com>
Tested-by: Anatolij Gustschin <agust@denx.de>
14 years agovideo: cfb_console.c: add support for RLE8 bitmaps
Anatolij Gustschin [Mon, 15 Mar 2010 13:50:25 +0000 (14:50 +0100)]
video: cfb_console.c: add support for RLE8 bitmaps

Allow displaying 8-bit RLE BMP images.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
14 years agoMerge branch 'master' of git://git.denx.de/u-boot-cfi-flash
Wolfgang Denk [Wed, 7 Apr 2010 22:26:03 +0000 (00:26 +0200)]
Merge branch 'master' of git://git.denx.de/u-boot-cfi-flash

14 years agoMerge branch 'master' of git://git.denx.de/u-boot-mpc85xx
Wolfgang Denk [Wed, 7 Apr 2010 22:23:11 +0000 (00:23 +0200)]
Merge branch 'master' of git://git.denx.de/u-boot-mpc85xx

14 years agoMerge branch 'master' of git://git.denx.de/u-boot-i2c
Wolfgang Denk [Wed, 7 Apr 2010 22:15:11 +0000 (00:15 +0200)]
Merge branch 'master' of git://git.denx.de/u-boot-i2c

14 years agoMerge branch 'master' of git://git.denx.de/u-boot-arm
Wolfgang Denk [Wed, 7 Apr 2010 22:06:31 +0000 (00:06 +0200)]
Merge branch 'master' of git://git.denx.de/u-boot-arm

14 years agocfi_flash: reset timer in flash status check
Thomas Chou [Thu, 1 Apr 2010 03:15:05 +0000 (11:15 +0800)]
cfi_flash: reset timer in flash status check

This patch adds reset_timer() before the flash status check
waiting loop.

Since the timer is basically running asynchronous to the cfi
code, it is possible to call get_timer(0), then only a few
_SYSCLK_ cycles later an interrupt is generated. This causes
timeout even though much less time has elapsed. So the timer
period registers should be reset before get_timer(0) is
called.

There is similar usage in nand_base.c.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Signed-off-by: Stefan Roese <sr@denx.de>
14 years agoppc/85xx: Use CONFIG_NS16550_MIN_FUNCTIONS to reduce NAND_SPL size
Kumar Gala [Wed, 7 Apr 2010 06:34:11 +0000 (01:34 -0500)]
ppc/85xx: Use CONFIG_NS16550_MIN_FUNCTIONS to reduce NAND_SPL size

The MPC8536DS_NAND SPL build was failing due to code size increase
introduced by commit:

commit 33f57bd553edf29dffef5a6c7d76e169c79a6049
Author: Kumar Gala <galak@kernel.crashing.org>
Date:   Fri Mar 26 15:14:43 2010 -0500

    85xx: Fix enabling of L1 cache parity on secondary cores

We built in some NS16550 functions that we dont need and can get
rid of them via CONFIG_NS16550_MIN_FUNCTIONS.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
14 years agop2020ds: add alternate boot bank support using the ngPIXIS FPGA
Timur Tabi [Thu, 1 Apr 2010 15:49:42 +0000 (10:49 -0500)]
p2020ds: add alternate boot bank support using the ngPIXIS FPGA

The Freescale P2020DS board uses a new type of PIXIS FPGA, called the ngPIXIS.
The ngPIXIS has one distinct new feature: the values of the on-board switches
can be selectively overridden with shadow registers.  This feature is used to
boot from a different NOR flash bank, instead of having a register dedicated
for this purpose.  Because the ngPIXIS is so different from the previous PIXIS,
a new file is introduced: ngpixis.c.

Also update the P2020DS checkboard() function to use the new macros defined
in the header file.

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
14 years agofsl: improve the PIXIS code and fix a few bugs
Timur Tabi [Wed, 31 Mar 2010 22:44:13 +0000 (17:44 -0500)]
fsl: improve the PIXIS code and fix a few bugs

Refactor and document the Freescale PIXIS code, used on most 85xx and 86xx
boards.  This makes the code easier to read and more flexible.

Delete pixis.h, because none of the exported functions were actually being
used by any other file.  Make all of the functions in pixis.c 'static'.
Remove "#include pixis.h" from every file that has it.

Remove some unnecessary #includes.

Make 'pixis_base' into a macro, so that we don't need to define it in every
function.

Add "while(1);" loops at the end of functions that reset the board, so that
execution doesn't continue while the reset is in progress.

Replace in_8/out_8 calls with clrbits_8, setbits_8, or clrsetbits_8, where
appropriate.

Replace ulong/uint with their spelled-out equivalents.  Remove unnecessary
typecasts, changing the types of some variables if necessary.

Add CONFIG_SYS_PIXIS_VCFGEN0_ENABLE and CONFIG_SYS_PIXIS_VBOOT_ENABLE to make
it easier for specific boards to support variations in the PIXIS registers
sets.  No current boards appears to need this feature.

Fix the definition of CONFIG_SYS_PIXIS_VBOOT_MASK for the MPC8610 HPCD.
Apparently, "pixis_reset altbank" has never worked on this board.

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
14 years ago85xx: Set HID1[mbdd] on e500v2 rev5.0 or greater
Sandeep Gopalpet [Fri, 12 Mar 2010 05:15:02 +0000 (10:45 +0530)]
85xx: Set HID1[mbdd] on e500v2 rev5.0 or greater

The HID1[MBDD] bit is new on rev5.0 or greater cores and will optimize
the performance of mbar/eieio instructions.

Signed-off-by: Sandeep Gopalpet <sandeep.kumar@freescale.com>
14 years ago85xx: Added various P1012/P1013/P1021/P1022 defines
Kumar Gala [Wed, 31 Mar 2010 04:06:53 +0000 (23:06 -0500)]
85xx: Added various P1012/P1013/P1021/P1022 defines

There are various locations that we have chip specific info:

* Makefile for which ddr code to build
* Added P1012/P1013/P1021/P1022 to cpu_type_list and SVR list
* Added number of LAWs for P1012/P1013/P1021/P1022
* Set CONFIG_MAX_CPUS to 2 for P1021/P1022
* PCI port config

Signed-off-by: Haiying Wang <Haiying.Wang@freescale.com>
Signed-off-by: Srikanth Srinivasan <srikanth.srinivasan@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
14 years agoppc/8xxx: Delete PCI nodes from device tree if not configured
Kumar Gala [Tue, 30 Mar 2010 15:07:12 +0000 (10:07 -0500)]
ppc/8xxx: Delete PCI nodes from device tree if not configured

If the PCI controller wasn't configured or enabled delete from the
device tree (include its alias).

For the case that we didn't even configure u-boot with knowledge of
the controller we can use the fact that the pci_controller pointer
is NULL to delete the node in the device tree.  We determine that
a controller was not setup (because of HW config) based on the fact
that cfg_addr wasn't setup.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
14 years agoBlackfin: IP04: new board port
Brent Kandetzki [Wed, 24 Mar 2010 21:41:33 +0000 (17:41 -0400)]
Blackfin: IP04: new board port

A low cost 4 port IP-PBX board.

Signed-off-by: Brent Kandetzki <BrentK@teleco.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoBlackfin: drop bfin #undef in linker script
Mike Frysinger [Tue, 23 Mar 2010 20:23:39 +0000 (16:23 -0400)]
Blackfin: drop bfin #undef in linker script

Now that the linker script is preprocessed with -ansi, there is no need to
manually undef the bfin define.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoBlackfin: call watchdog_init() for external watchdogs
Mike Frysinger [Fri, 12 Feb 2010 01:19:10 +0000 (20:19 -0500)]
Blackfin: call watchdog_init() for external watchdogs

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoBlackfin: link with normal ABI target
Mike Frysinger [Wed, 10 Feb 2010 06:20:44 +0000 (01:20 -0500)]
Blackfin: link with normal ABI target

If someone uses the FDPIC toolchain to compile U-Boot, make sure the
linker knows to use the normal ABI target rather than the FDPIC one.
This wasn't needed with older toolchains, but when we fixed the linker
such that the default target changed based on tuple, this broke.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoBlackfin: sync ptrace headers with linux
Mike Frysinger [Fri, 29 Jan 2010 20:48:28 +0000 (15:48 -0500)]
Blackfin: sync ptrace headers with linux

Scrub a lot of dead cruft in the process.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoBlackfin: cm-bf561: update network/env settings
Harald Krapfenbauer [Fri, 22 Jan 2010 22:15:55 +0000 (17:15 -0500)]
Blackfin: cm-bf561: update network/env settings

Switch to the SMC911X driver by default now, and fix LDR env settings.

Signed-off-by: Harald Krapfenbauer <Harald.Krapfenbauer@bluetechnix.at>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoBlackfin: bf537-stamp: add board test defines
Mike Frysinger [Fri, 22 Jan 2010 04:29:18 +0000 (23:29 -0500)]
Blackfin: bf537-stamp: add board test defines

We tweak the configs a little when doing automated hardware tests.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoBlackfin: relax .data alignment
Mike Frysinger [Wed, 20 Jan 2010 02:02:00 +0000 (21:02 -0500)]
Blackfin: relax .data alignment

The strictest alignment on Blackfin systems is 32bits (since that is the
largest load instruction), so don't force 256byte alignment here.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoBlackfin: drop reference to gd->reloc_off
Mike Frysinger [Tue, 19 Jan 2010 20:39:07 +0000 (15:39 -0500)]
Blackfin: drop reference to gd->reloc_off

The reloc_off member no longer exists, so drop it.  Also change this
function so that it is always compiled and prevents latent issues like
this in the future.

Reported-by: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agofdt: Add fdt_del_node_and_alias helper
Kumar Gala [Tue, 30 Mar 2010 15:19:26 +0000 (10:19 -0500)]
fdt: Add fdt_del_node_and_alias helper

Add a helper function that given an alias will delete both the node
the alias points to and the alias itself

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Acked-by: Gerald Van Baren <vanbaren@cideas.com>
14 years agoBlackfin: disable NetBSD bootm support by default
Mike Frysinger [Tue, 3 Nov 2009 20:53:12 +0000 (15:53 -0500)]
Blackfin: disable NetBSD bootm support by default

There is no Blackfin/NetBSD port, so enabling support for it by default
doesn't make any sense.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years ago85xx: Add defines for BUCSR bits to make code more readable
Kumar Gala [Mon, 29 Mar 2010 18:50:31 +0000 (13:50 -0500)]
85xx: Add defines for BUCSR bits to make code more readable

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
14 years agofsl-ddr: change the default burst mode for DDR3
Dave Liu [Fri, 5 Mar 2010 04:22:00 +0000 (12:22 +0800)]
fsl-ddr: change the default burst mode for DDR3

For 64B cacheline SoC, set the fixed 8-beat burst len,
for 32B cacheline SoC, set the On-The-Fly as default.

Signed-off-by: Dave Liu <daveliu@freescale.com>
14 years agofsl-ddr: Fix the turnaround timing for TIMING_CFG_4
Dave Liu [Fri, 5 Mar 2010 04:22:00 +0000 (12:22 +0800)]
fsl-ddr: Fix the turnaround timing for TIMING_CFG_4

Read-to-read/Write-to-write turnaround for same chip select
of DDR3 memory, BL/2+2 cycles is enough for them at BC4 and
OTF case, BL/2 cycles is enough for fixed BL8.
Cutting down the turnaround from BL/2+4 to BL/2+2 or BL/2
will improve the memory performance.

Signed-off-by: Dave Liu <daveliu@freescale.com>
14 years agofsl_esdhc: Only modify the field we are changing in WML
Roy Zang [Tue, 9 Feb 2010 10:23:33 +0000 (18:23 +0800)]
fsl_esdhc: Only modify the field we are changing in WML

When we set the read or write watermark in WML we should maintain the
rest of the register as is, rather than using some hard coded value.

Signed-off-by: Roy Zang <tie-fei.zang@freescale.com>
Acked-by: Stefano Babic <sbabic@denx.de>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
14 years agofsl_esdhc: Add function to reset the eSDHC controller
Jerry Huang [Thu, 18 Mar 2010 20:57:06 +0000 (15:57 -0500)]
fsl_esdhc: Add function to reset the eSDHC controller

To support multiple block read command we must set abort or use auto
CMD12.  If we booted from eSDHC controller neither of these are used
and thus we need to reset the controller to allow multiple block read
to function.

Signed-off-by: Jerry Huang <Chang-Ming.Huang@freescale.com>
Signed-off-by: Roy Zang <tie-fei.zang@freescale.com>
Acked-by: Stefano Babic <sbabic@denx.de>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
14 years agofsl_esdhc: Always stop clock before changing frequency
Kumar Gala [Thu, 18 Mar 2010 20:51:05 +0000 (15:51 -0500)]
fsl_esdhc: Always stop clock before changing frequency

We need to stop the clocks on 83xx/85xx as well as imx.  No need to make
this code conditional to just imx.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Acked-by: Stefano Babic <sbabic@denx.de>
14 years agoi2c: Move PPC4xx I2C driver into drivers/i2c directory
Stefan Roese [Thu, 1 Apr 2010 12:37:24 +0000 (14:37 +0200)]
i2c: Move PPC4xx I2C driver into drivers/i2c directory

This patch moves the PPC4xx specific I2C device driver into the I2C
drivers directory. All 4xx config headers are updated to include this
driver.

Signed-off-by: Stefan Roese <sr@denx.de>
14 years agoarm/integrator: Remove unneccessary CONFIG_PCI check.
Detlev Zundel [Wed, 31 Mar 2010 13:38:55 +0000 (15:38 +0200)]
arm/integrator: Remove unneccessary CONFIG_PCI check.

pci_eth_init() is already conditional to CONFIG_PCI so not every caller
needs to have conditionals.

This is the only place in the current code base where such a check is
still at the calling site.

Signed-off-by: Detlev Zundel <dzu@denx.de>
CC: Ben Warren <biggerbadderben@gmail.com>
CC: Peter Pearse <peter.pearse@arm.com>
14 years agoat91: use C structs for AT91 OHCI code
Matthias Fuchs [Thu, 25 Mar 2010 13:30:13 +0000 (14:30 +0100)]
at91: use C structs for AT91 OHCI code

This patch is part of migrating the AT91 support towards
using C struct for all SOC access.

It removes one more CONFIG_AT91_LEGACY warning.

at91_pmc.h needs cleanup after migration of the drivers
has been done.

Signed-off-by: Matthias Fuchs <matthias.fuchs@esd.eu>
14 years agousing AT91_PMC_MCKR_MDIV_ instead of LEGACY one in at91/clock.c
Asen Dimov [Thu, 18 Mar 2010 11:46:45 +0000 (13:46 +0200)]
using AT91_PMC_MCKR_MDIV_ instead of LEGACY one in at91/clock.c

Signed-off-by: Asen Dimov <dimov@ronetix.at>
14 years agoNomadik: fix reset_timer()
Alessandro Rubini [Wed, 25 Nov 2009 22:41:51 +0000 (23:41 +0100)]
Nomadik: fix reset_timer()

Previous code was failing when reading back the timer less than
400us after resetting it. This lead nand operations to incorrectly
timeout any now and then.  Moreover, writing the load register isn't
immediately reflected in the value register. We must wait for a clock
edge, so read_timer now waits for the value to change at least once,
otherwise nand operation would timeout anyways (though less frequently).

Signed-off-by: Alessandro Rubini <rubini@unipv.it>
Acked-by: Andrea Gallo <andrea.gallo@stericsson.com>
14 years agoConvert at91 watchdog driver to new SoC access
Achim Ehrlich [Wed, 17 Mar 2010 13:50:29 +0000 (14:50 +0100)]
Convert at91 watchdog driver to new SoC access

This converts the at91 watchdog driver to new c structure
type to access registers of the SoC

Signed-off-by: Achim Ehrlich <aehrlich@taskit.de>
14 years agoat91: boards cleanup for deprecated CONFIG_CMD_AUTOSCRIPT
Daniel Gorsulowski [Wed, 17 Mar 2010 07:21:11 +0000 (08:21 +0100)]
at91: boards cleanup for deprecated CONFIG_CMD_AUTOSCRIPT

CONFIG_CMD_AUTOSCRIPT support is deprecated and non-existing
This clean up patch removes the references for esd boards

Signed-off-by: Daniel Gorsulowski <Daniel.Gorsulowski@esd.eu>
14 years agoep93xx timer: refactoring
Matthias Kaehlcke [Tue, 9 Mar 2010 21:13:56 +0000 (22:13 +0100)]
ep93xx timer: refactoring

ep93xx timer: Simplified the timer code by eliminating clk_to_systicks() and
performing (almost) all manipulation of the timer structure in read_timer()

Signed-off-by: Matthias Kaehlcke <matthias@kaehlcke.net>
14 years agoep93xx timer: Rename struct timer_reg pointers
Matthias Kaehlcke [Tue, 9 Mar 2010 21:13:47 +0000 (22:13 +0100)]
ep93xx timer: Rename struct timer_reg pointers

ep93xx timer: Renamed pointers to struct timer_regs from name 'timer' to
'timer_regs' in order to avoid confusion with the global variable 'timer'

Signed-off-by: Matthias Kaehlcke <matthias@kaehlcke.net>
14 years agoSAMSUNG: SMDKC100: Adds ethernet support.
Naveen Krishna CH [Fri, 5 Mar 2010 08:16:05 +0000 (17:16 +0900)]
SAMSUNG: SMDKC100: Adds ethernet support.

Add setup for ethernet on SMDKC100, allowing kernel/ramdisk to be
loaded over tftp.

The preinit function will configure GPIO (GPK0CON) & SROMC to look
for environment in SROM Bank 3.

Signed-off-by: Naveen Krishna Ch <ch.naveen@samsung.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
14 years agoS5PC100: Function to configure the SROMC registers.
Naveen Krishna CH [Fri, 5 Mar 2010 08:15:38 +0000 (17:15 +0900)]
S5PC100: Function to configure the SROMC registers.

Nand Flash, Ethernet, other features might need to configure the
SROMC registers accordingly.
The config_sromc() functions helps with this.

Signed-off-by: Naveen Krishna Ch <ch.naveen@samsung.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
14 years agoS5PC100: Memory SubSystem Header file, register description(SROMC).
Naveen Krishna CH [Fri, 5 Mar 2010 08:15:13 +0000 (17:15 +0900)]
S5PC100: Memory SubSystem Header file, register description(SROMC).

Memory subsystem of S5PC100 handles SROM, SRAM, OneDRAM, OneNand,
NAND Flash, DDRs.
smc.h is a common place for the register description of Memory subsystem
of S5PC100.
Note: Only SROM related registers are descibed now.

Signed-off-by: Naveen Krishna Ch <ch.naveen@samsung.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
14 years agos5pc1xx: update the README file
Minkyu Kang [Fri, 12 Feb 2010 09:21:17 +0000 (18:21 +0900)]
s5pc1xx: update the README file

Because adds support the GPIO Interface, README file is updated.

Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
14 years agos5pc1xx: support the GPIO interface
Minkyu Kang [Fri, 12 Feb 2010 09:17:52 +0000 (18:17 +0900)]
s5pc1xx: support the GPIO interface

This patch adds support the GPIO interface

Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
14 years agos3c64xx: Add ifdef at the S3C64XX only codes
Joonyoung Shim [Mon, 8 Feb 2010 13:00:52 +0000 (22:00 +0900)]
s3c64xx: Add ifdef at the S3C64XX only codes

The s3c6400.h file is only for S3C64XX cpu and the pheripheral port
address(0x70000000 - 0x7fffffff) exists at only S3C64XX cpu, so they
should be included by only S3C64XX cpu.

Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
14 years agoS5PC100: Moves the Macros to a common header file
Naveen Krishna CH [Thu, 4 Feb 2010 05:17:38 +0000 (14:17 +0900)]
S5PC100: Moves the Macros to a common header file

The get_pll_clk(int) API returns the PLL frequency based on
the (int) argument which is defined locally in clock.c

Moving that #define to common header file (clk.h) would
be helpful when using the API from other files.

Signed-off-by: Naveen Krishna Ch <ch.naveen@samsung.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
14 years agoMAINTAINERS: sort the list of ARM Maintainers by last name
Minkyu Kang [Mon, 8 Mar 2010 07:22:33 +0000 (16:22 +0900)]
MAINTAINERS: sort the list of ARM Maintainers by last name

Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
14 years agoSPEAr : Adding maintainer name for spear SoCs
Vipin KUMAR [Mon, 8 Mar 2010 05:16:07 +0000 (10:46 +0530)]
SPEAr : Adding maintainer name for spear SoCs

Signed-off-by: Vipin Kumar <vipin.kumar@st.com>
14 years agonios2: Reload timer count in reset_timer()
Scott McNutt [Thu, 1 Apr 2010 04:00:56 +0000 (00:00 -0400)]
nios2: Reload timer count in reset_timer()

   When the timestamp is incremented via interrupt and the interrupt
   period is greater than 1 msec, successive calls to get_timer() can
   produce inaccurate timing since the interrupts are asynchronous
   to the timing loop. For example, with an interrupt period of 10 msec
   two successive calls to get_timer() could indicate an elapsed time
   of 10 msec after only several hundred usecs -- depending on when
   the next interrupt actually occurs. This behavior can cause
   reliability issues with components such as CFI and NAND.

   This can be remedied by calling reset_timer() prior to establishing
   the base timestamp with get_timer(0), provided reset_timer()
   resets the hardware timer (rather than simply resetting only the
   timestamp). This has the effect of synchronizing the interrupts
   (and the advance of the timestamp) with the timing loop.

Signed-off-by: Scott McNutt <smcnutt@psyent.com>
14 years agonios2: pass command line and initrd to linux in bootm.c
Thomas Chou [Wed, 24 Mar 2010 03:41:46 +0000 (11:41 +0800)]
nios2: pass command line and initrd to linux in bootm.c

This patch adds bootargs passing to nios2 linux.

The args passing is enabled with,
r4 : 'NIOS' magic
r5 : pointer to initrd start
r6 : pointer to initrd end
r7 : pointer to command line

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Signed-off-by: Scott McNutt <smcnutt@psyent.com>
14 years agonios2: Fix AMDLV065D flash write bug in altera board common tree.
Scott McNutt [Wed, 31 Mar 2010 00:26:15 +0000 (20:26 -0400)]
nios2: Fix AMDLV065D flash write bug in altera board common tree.

Signed-off-by: Scott McNutt <smcnutt@psyent.com>
14 years agonios2: Set CONFIG_SYS_HZ to 1000 all nios2 boards.
Scott McNutt [Wed, 31 Mar 2010 00:23:04 +0000 (20:23 -0400)]
nios2: Set CONFIG_SYS_HZ to 1000 all nios2 boards.

   CONFIG_SYS_HZ was being calculated (incorrectly) in nios2 configuration
   headers. Updated comments to accurately describe timebase macros.

Signed-off-by: Scott McNutt <smcnutt@psyent.com>
14 years agonios2: Fix outx/writex parameter order in io.h
Scott McNutt [Mon, 22 Mar 2010 01:24:43 +0000 (21:24 -0400)]
nios2: Fix outx/writex parameter order in io.h

The outx/writex macros were using writex(addr, val) rather than
   the standard writex(val, addr), resulting in incompatibilty with
   architecture independent components. This change set uses standard
   parameter order.

Signed-off-by: Scott McNutt <smcnutt@psyent.com>
14 years agonios2: Add support for EPCS16 and EPCS64 configuration devices.
Scott McNutt [Sun, 21 Mar 2010 19:36:44 +0000 (15:36 -0400)]
nios2: Add support for EPCS16 and EPCS64 configuration devices.

Signed-off-by: Scott McNutt <smcnutt@psyent.com>
14 years agonios2: Add missing Ethernet initialization to board_init().
Scott McNutt [Sun, 21 Mar 2010 17:26:33 +0000 (13:26 -0400)]
nios2: Add missing Ethernet initialization to board_init().

Signed-off-by: Scott McNutt <smcnutt@psyent.com>
14 years agonios2: add struct stat support in linux/stat.h
Thomas Chou [Fri, 19 Mar 2010 23:05:47 +0000 (07:05 +0800)]
nios2: add struct stat support in linux/stat.h

This is needed for jffs2 support.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Signed-off-by: Scott McNutt <smcnutt@psyent.com>
14 years agonios2: use bitops from linux-2.6 asm-generic
Thomas Chou [Fri, 19 Mar 2010 23:05:46 +0000 (07:05 +0800)]
nios2: use bitops from linux-2.6 asm-generic

These are needed to use ubi/ubifs.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Signed-off-by: Scott McNutt <smcnutt@psyent.com>
14 years agonios2: add local_irq_enable/disable to asm-nios2/system.h
Thomas Chou [Fri, 19 Mar 2010 23:05:45 +0000 (07:05 +0800)]
nios2: add local_irq_enable/disable to asm-nios2/system.h

Copy from linux header. This is needed for generic bitops.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Signed-off-by: Scott McNutt <smcnutt@psyent.com>
14 years agonios2: add asm-nios2/errno.h
Thomas Chou [Fri, 19 Mar 2010 23:05:44 +0000 (07:05 +0800)]
nios2: add asm-nios2/errno.h

Just pull in asm-generic.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Signed-off-by: Scott McNutt <smcnutt@psyent.com>
14 years agonios2: Move serial drivers to individual files in drivers/serial
Scott McNutt [Fri, 19 Mar 2010 23:03:28 +0000 (19:03 -0400)]
nios2: Move serial drivers to individual files in  drivers/serial

   The standard Altera UART & JTAG UART as well as the OpenCores
   YANU driver are now in individual files in drivers/serial
   rather than a single file uner cpu/nios2.

Signed-off-by: Scott McNutt <smcnutt@psyent.com>
14 years agoMerge branch 'next'
Wolfgang Denk [Thu, 1 Apr 2010 09:28:32 +0000 (11:28 +0200)]
Merge branch 'next'

14 years agoPrepare v2010.03 v2010.03
Wolfgang Denk [Wed, 31 Mar 2010 21:54:39 +0000 (23:54 +0200)]
Prepare v2010.03

Signed-off-by: Wolfgang Denk <wd@denx.de>
14 years agonet, doc: How to setup MAC address correctly
Heiko Schocher [Wed, 31 Mar 2010 06:34:51 +0000 (08:34 +0200)]
net, doc: How to setup MAC address correctly

As this seems unclear, document how the flow of setting up
the MAC address is correct.

Signed-off-by: Heiko Schocher <hs@denx.de>
Text changed slightly, adding input from Mike Frysinger.

Signed-off-by: Wolfgang Denk <wd@denx.de>
14 years agonet, fec_mxc: only setup the device enetaddr with eeprom value
Heiko Schocher [Wed, 31 Mar 2010 06:34:46 +0000 (08:34 +0200)]
net, fec_mxc: only setup the device enetaddr with eeprom value

Only fill the device enetaddr with the contents of the eeprom,
do not program it in MAC address registers

Signed-off-by: Heiko Schocher <hs@denx.de>
Acked-by: Ben Warren <biggerbadderben@gmail.com>
14 years agodoc: Fix ramdisk examples in doc/uImage.FIT/multi.its
Felix Radensky [Tue, 30 Mar 2010 12:02:13 +0000 (15:02 +0300)]
doc: Fix ramdisk examples in doc/uImage.FIT/multi.its

The ramdisk sections in doc/uImage.FIT/multi.its lack
load address and entry point properties. Using examples
from this file will result in unbootable image, u-boot
will issue the following error messages:

Can't get ramdisk subimage load address!
Ramdisk image is corrupt or invalid

This patch adds missing properties to ramdisk sections.

Signed-off-by: Felix Radensky <felix@embedded-sol.com>
14 years agojffs2, suen3: Fix compiler warning
Heiko Schocher [Wed, 24 Mar 2010 12:22:50 +0000 (13:22 +0100)]
jffs2, suen3: Fix compiler warning

$ ./MAKEALL suen3
jffs2_1pass.c: In function 'get_fl_mem':
jffs2_1pass.c:399: warning: unused variable 'id'
jffs2_1pass.c: In function 'get_node_mem':
jffs2_1pass.c:423: warning: unused variable 'id'

Signed-off-by: Heiko Schocher <hs@denx.de>
Tested-by: Tom <Tom.Rix@windriver.com>
14 years agoMerge branch 'master' of git://git.denx.de/u-boot-mpc85xx
Wolfgang Denk [Tue, 30 Mar 2010 20:22:47 +0000 (22:22 +0200)]
Merge branch 'master' of git://git.denx.de/u-boot-mpc85xx

14 years agoMerge branch 'master' of git://git.denx.de/u-boot-ppc4xx
Wolfgang Denk [Tue, 30 Mar 2010 20:21:24 +0000 (22:21 +0200)]
Merge branch 'master' of git://git.denx.de/u-boot-ppc4xx

14 years agompc86xx: set the DDR BATs after calculating true DDR size
Timur Tabi [Mon, 29 Mar 2010 17:51:07 +0000 (12:51 -0500)]
mpc86xx: set the DDR BATs after calculating true DDR size

After determining how much DDR is actually in the system, set DBAT0 and
IBAT0 accordingly.  This ensures that the CPU won't attempt to access
(via speculation) addresses outside of actual memory.

On 86xx systems, DBAT0 and IBAT0 (the BATs for DDR) are initialized to 2GB
and kept that way.  If the system has less than 2GB of memory (typical for
an MPC8610 HPCD), the CPU may attempt to access this memory during
speculation.  The zlib code is notorious for generating such memory reads,
and indeed on the MPC8610, uncompressing the Linux kernel causes a machine
check (without this patch).

Currently we are limited to power of two sized DDR since we only use a
single bat.  If a non-power of two size is used that is less than
CONFIG_MAX_MEM_MAPPED u-boot will crash.

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
14 years ago85xx: Fix enabling of L1 cache parity on secondary cores
Kumar Gala [Fri, 26 Mar 2010 20:14:43 +0000 (15:14 -0500)]
85xx: Fix enabling of L1 cache parity on secondary cores

Use the same code between primary and secondary cores to init the
L1 cache.  We were not enabling cache parity on the secondary cores.

Also, reworked the L1 cache init code to match the e500mc L2 init code
that first invalidates the cache and locks.  Than enables the cache and
makes sure its enabled before continuing.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
14 years agoppc4xx: Fix problem with I2C bus >= 1 initialization
Stefan Roese [Mon, 29 Mar 2010 13:30:46 +0000 (15:30 +0200)]
ppc4xx: Fix problem with I2C bus >= 1 initialization

This patch fixes a problem introduced with patch eb5eb2b0
[ppc4xx: Cleanup PPC4xx I2C infrastructure]. We need to assign the I2C
base address to the "i2c" pointer inside of the controller loop.
Otherwise controller 0 is initialized multiple times instead of
initializing each I2C controller sequentially.

Tested on Katmai.

Signed-off-by: Stefan Roese <sr@denx.de>
Acked-by: Heiko Schocher <hs@denx.de>
14 years agobootm, linux: fix booting Multi-File Image with "kernel+ramdisk+fdt"
Heiko Schocher [Mon, 29 Mar 2010 11:15:48 +0000 (13:15 +0200)]
bootm, linux: fix booting Multi-File Image with "kernel+ramdisk+fdt"

Booting a "Multi-File Image" including a linux kernel, ramdisk and
fdt, generated with

mkimage -A ppc \
    -O linux \
    -T multi \
    -C gzip \
    -a 00000000 \
    -e 00000000 \
    -n "kernel-2.6+initrd+dtb" \
    -d "vmlinux.bin.gz:ramdisk_image.gz:board.dtb" \
    multi.bin

actually fails, because ramdisk start and end addresses
didn;t get initialized. This patch fixes this issue.

Tested on the KUP4K board.

Signed-off-by: Heiko Schocher <hs@denx.de>
14 years agoi2c: made unused function i2c_mux_add_device static
Frans Meulenbroeks [Fri, 26 Mar 2010 08:46:42 +0000 (09:46 +0100)]
i2c: made unused function i2c_mux_add_device static

and removed it from the .h file

Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
14 years agocmd_i2c: introduced get_alen helper function
Frans Meulenbroeks [Fri, 26 Mar 2010 08:46:41 +0000 (09:46 +0100)]
cmd_i2c: introduced get_alen helper function

The code to parse alen appeared 6 times in the function.
Factored this out in a small helper function

Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
14 years agocmd_i2c: moved a define to before the functions
Frans Meulenbroeks [Fri, 26 Mar 2010 08:46:40 +0000 (09:46 +0100)]
cmd_i2c: moved a define to before the functions

Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>