platform/kernel/u-boot.git
16 years agoCoding Style cleanup, update CHANGELOG
Wolfgang Denk [Sun, 2 Nov 2008 15:14:22 +0000 (16:14 +0100)]
Coding Style cleanup, update CHANGELOG

Signed-off-by: Wolfgang Denk <wd@denx.de>
16 years agoMerge branch 'master' of git://git.denx.de/u-boot-nand-flash
Wolfgang Denk [Sat, 1 Nov 2008 15:18:43 +0000 (16:18 +0100)]
Merge branch 'master' of git://git.denx.de/u-boot-nand-flash

16 years agoMerge branch 'master' of git://git.denx.de/u-boot-sh
Wolfgang Denk [Sat, 1 Nov 2008 15:13:12 +0000 (16:13 +0100)]
Merge branch 'master' of git://git.denx.de/u-boot-sh

16 years agoMerge branch 'master' of git://git.denx.de/u-boot-cfi-flash
Wolfgang Denk [Sat, 1 Nov 2008 15:11:08 +0000 (16:11 +0100)]
Merge branch 'master' of git://git.denx.de/u-boot-cfi-flash

16 years agoMerge branch 'master' of git://git.denx.de/u-boot-ppc4xx
Wolfgang Denk [Sat, 1 Nov 2008 15:07:43 +0000 (16:07 +0100)]
Merge branch 'master' of git://git.denx.de/u-boot-ppc4xx

16 years agoMerge branch 'master' of git://git.denx.de/u-boot-fdt
Wolfgang Denk [Sat, 1 Nov 2008 15:05:51 +0000 (16:05 +0100)]
Merge branch 'master' of git://git.denx.de/u-boot-fdt

16 years agoMerge branch 'master' of git://git.denx.de/u-boot-blackfin
Wolfgang Denk [Sat, 1 Nov 2008 14:59:35 +0000 (15:59 +0100)]
Merge branch 'master' of git://git.denx.de/u-boot-blackfin

16 years agoNAND: Allow NAND and OneNAND to coexist
Alessandro Rubini [Fri, 31 Oct 2008 21:33:21 +0000 (22:33 +0100)]
NAND: Allow NAND and OneNAND to coexist

This removes in nand.h code that is verbatim duplicated from bbm.h,
including directly bbm.h in nand.h. The previous state of affairs
prevented compiling code for a board hosting both NAND and OneNAND chips.

Reported-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Alessandro Rubini <rubini@unipv.it>
Signed-off-by: Scott Wood <scottwood@freescale.com>
16 years agoJFFS2: Eliminate compiler error when both NAND and OneNAND are enabled.
Scott Wood [Fri, 31 Oct 2008 18:51:12 +0000 (13:51 -0500)]
JFFS2: Eliminate compiler error when both NAND and OneNAND are enabled.

Reported-by: Alessandro Rubini <rubini-list@gnudd.com>
Signed-off-by: Scott Wood <scottwood@freescale.com>
16 years agoNAND: Add NAND support for MPC8536DS board
Jason Jin [Fri, 31 Oct 2008 10:07:04 +0000 (05:07 -0500)]
NAND: Add NAND support for MPC8536DS board

This patch defines 1M TLB&LAW size for NAND on MPC8536DS, assigns 0xffa00000
for CONFIG_SYS_NAND_BASE and adds other NAND supports in config file.
It also moves environment(CONFIG_ENV_ADDR) outside of u-boot image.

Singed-off-by: Jason Jin <Jason.Jin@freescale.com>
Signed-off-by: Haiying Wang <Haiying.Wang@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
16 years agoNAND: Fix CONFIG_ENV_ADDR for MPC8572DS
Haiying Wang [Fri, 31 Oct 2008 10:06:14 +0000 (05:06 -0500)]
NAND: Fix CONFIG_ENV_ADDR for MPC8572DS

CONFIG_ENV_ADDR should be (CONFIG_SYS_MONITOR_BASE - CONFIG_ENV_SECT_SIZE).

Signed-off-by: Haiying Wang <Haiying.Wang@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
16 years agosh: rsk7203: Moved rsk7203 board to board/renesas
Nobuhiro Iwamatsu [Fri, 24 Oct 2008 01:49:48 +0000 (10:49 +0900)]
sh: rsk7203: Moved rsk7203 board to board/renesas

Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
16 years agosh: MigoR: Moved MigoR board to board/renesas
Nobuhiro Iwamatsu [Fri, 24 Oct 2008 01:48:31 +0000 (10:48 +0900)]
sh: MigoR: Moved MigoR board to board/renesas

Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
16 years agosh: r2dplus: Moved r2dplus board to board/renesas
Nobuhiro Iwamatsu [Fri, 24 Oct 2008 01:39:44 +0000 (10:39 +0900)]
sh: r2dplus: Moved r2dplus board to board/renesas

Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
16 years agosh: sh7763rdp: Moved sh7763rdp board to board/renesas
Nobuhiro Iwamatsu [Fri, 24 Oct 2008 01:36:13 +0000 (10:36 +0900)]
sh: sh7763rdp: Moved sh7763rdp board to board/renesas

Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
16 years agosh: sh7785lcr: Moved sh7785lcr board to board/renesas
Nobuhiro Iwamatsu [Fri, 24 Oct 2008 01:35:19 +0000 (10:35 +0900)]
sh: sh7785lcr: Moved sh7785lcr board to board/renesas

Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
16 years agosh: r7780mp: Moved r7780mp board to board/renesas
Nobuhiro Iwamatsu [Fri, 24 Oct 2008 01:34:21 +0000 (10:34 +0900)]
sh: r7780mp: Moved r7780mp board to board/renesas

Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
16 years agosh: ap325rxa: Moved ap325rxa board to board/renesas
Nobuhiro Iwamatsu [Fri, 24 Oct 2008 01:32:14 +0000 (10:32 +0900)]
sh: ap325rxa: Moved ap325rxa board to board/renesas

Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
16 years agoCFI Driver: Fix "flash not ready" problem
Wolfgang Denk [Fri, 31 Oct 2008 00:12:28 +0000 (01:12 +0100)]
CFI Driver: Fix "flash not ready" problem

This patch fixes a problem on systems where the NOR flash is attached
to a 64 bit bus.  The toggle bit detection in flash_toggle() is based
on the assumption that the same flash address is read twice without
any other interjacent flash accesses.  However, on 32 bit systems the
function flash_read64() [as currently implemented] does not perform
an atomic 64 bit read - instead, this is broken down into two 32 bit
read accesses on addresses "addr" and "addr + 4".  So instead of
reading a 64 bit value twice from "addr", we see a sequence of 4 32
bit reads from "addr", "addr + 4", "addr", and "addr + 4".  The
consequence is that flash_toggle() fails to work.

This patch implements a simple, but somewhat ugly solution, as it
avoids the use of flash_read64() in this critical place (by breaking
it down manually into 32 bit read operations) instead of rewriting
flash_read64() such to perform atomic 64 bit reads as one could
expect.  However, such a rewrite would require the use of floating
point load operations, which becomes pretty complex:

save MSR;
set Floating Point Enable bit in MSR;
use "lfd" instruction to perform atomic 64 bit read;
use "stfd" to store value to temporary variable on stack;
load u64 value from temporary variable;
restore saved MSR;
return u64 value;

The benefit-cost ratio of such an implementation was considered too
bad to actually attempt this, especially as we can expect that such
an implementation would not only have a bigger memory footprint but
also cause a performance degradation.

Signed-off-by: Wolfgang Denk <wd@denx.de>
Signed-off-by: Stefan Roese <sr@denx.de>
16 years agoppc4xx: Fix spelling error in MAINTAINERS file
Stefan Roese [Fri, 31 Oct 2008 09:48:08 +0000 (10:48 +0100)]
ppc4xx: Fix spelling error in MAINTAINERS file

Signed-off-by: Stefan Roese <sr@denx.de>
16 years agoppc4xx: Update PMC440 board support
Matthias Fuchs [Tue, 28 Oct 2008 12:37:00 +0000 (13:37 +0100)]
ppc4xx: Update PMC440 board support

This patch brings PMC440 board support up to date:

- fix GPIO configuration
- add misc_init_f()
- use better values for usbact variable
- fix USB 2.0 phy reset sequence
- shrink BAR2 to save PCI address space
- add FDT support

Signed-off-by: Matthias Fuchs <matthias.fuchs@esd-electronics.com>
Signed-off-by: Stefan Roese <sr@denx.de>
16 years agoppc4xx: Fix PMC440 BSP commands
Matthias Fuchs [Tue, 28 Oct 2008 12:36:59 +0000 (13:36 +0100)]
ppc4xx: Fix PMC440 BSP commands

This patch fixes the PMC440 BSP commands painit and selfreset

Signed-off-by: Matthias Fuchs <matthias.fuchs@esd-electronics.com>
Signed-off-by: Stefan Roese <sr@denx.de>
16 years agoppc4xx: Update PMC440 board configuration
Matthias Fuchs [Tue, 28 Oct 2008 12:36:58 +0000 (13:36 +0100)]
ppc4xx: Update PMC440 board configuration

Signed-off-by: Matthias Fuchs <matthias.fuchs@esd-electronics.com>
Signed-off-by: Stefan Roese <sr@denx.de>
16 years agoppc4xx: Fix esd loadpci command
Matthias Fuchs [Tue, 28 Oct 2008 12:36:57 +0000 (13:36 +0100)]
ppc4xx: Fix esd loadpci command

This patch fixes esd's loadpci command when not all
memory on adapter boards is accessable via PCI.

Signed-off-by: Matthias Fuchs <matthias.fuchs@esd-electronics.com>
Signed-off-by: Stefan Roese <sr@denx.de>
16 years agoppc4xx: Clean up PMC440 header
Matthias Fuchs [Tue, 28 Oct 2008 12:36:56 +0000 (13:36 +0100)]
ppc4xx: Clean up PMC440 header

-Codingstyle cleanup
-Remove unused GPIO define

Signed-off-by: Matthias Fuchs <matthias.fuchs@esd-electronics.com>
Signed-off-by: Stefan Roese <sr@denx.de>
16 years agoppc4xx: Handle other board variant in PMC440 FPGA code
Matthias Fuchs [Tue, 28 Oct 2008 12:36:55 +0000 (13:36 +0100)]
ppc4xx: Handle other board variant in PMC440 FPGA code

Signed-off-by: Matthias Fuchs <matthias.fuchs@esd-electronics.com>
Signed-off-by: Stefan Roese <sr@denx.de>
16 years agoppc4xx: Merge xilinx-ppc440 and xilinx-ppc405 cfg
Ricardo Ribalda Delgado [Mon, 27 Oct 2008 11:35:59 +0000 (12:35 +0100)]
ppc4xx: Merge xilinx-ppc440 and xilinx-ppc405 cfg

Xilinx ppc440 and ppc405 have many similarities. This patch merge the
config files of both infrastuctures

Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@uam.es>
Signed-off-by: Stefan Roese <sr@denx.de>
16 years agoppc4xx: Correctly configure the GPIO pin muxing on Arches
Stefan Roese [Sat, 25 Oct 2008 04:45:31 +0000 (06:45 +0200)]
ppc4xx: Correctly configure the GPIO pin muxing on Arches

Arches doesn't use PerCS3 but GPIO43, so let's configure the GPIO
pin multiplexing correctly

Signed-off-by: Stefan Roese <sr@denx.de>
16 years agoFix to the auto-update feature documentation (CONFIG_UPDATE_TFTP_MSEC_MAX)
Bartlomiej Sieka [Thu, 30 Oct 2008 22:22:04 +0000 (23:22 +0100)]
Fix to the auto-update feature documentation (CONFIG_UPDATE_TFTP_MSEC_MAX)

Signed-off-by: Bartlomiej Sieka <tur@semihalf.com>
16 years agolibfdt: Fix bug in fdt_subnode_offset_namelen()
David Gibson [Thu, 30 Oct 2008 04:27:45 +0000 (23:27 -0500)]
libfdt: Fix bug in fdt_subnode_offset_namelen()

There's currently an off-by-one bug in fdt_subnode_offset_namelen()
which causes it to keep searching after it's finished the subnodes of
the given parent, and into the subnodes of siblings of the original
node which come after it in the tree.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
16 years agofdt_resize(): ensure minimum padding
Peter Korsgaard [Tue, 28 Oct 2008 07:26:52 +0000 (08:26 +0100)]
fdt_resize(): ensure minimum padding

fdt_add_mem_rsv() requires space for a struct fdt_reserve_entry
(16 bytes), so make sure that fdt_resize at least adds that much
padding, no matter what the location or size of the fdt is.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Acked-by: Andy Fleming <afleming@freescale.com>
16 years ago74xx: use r4 instead of r2 in lock_ram_in_cache and unlock_ram_in_cache
Dave Liu [Thu, 23 Oct 2008 13:59:35 +0000 (21:59 +0800)]
74xx: use r4 instead of r2 in lock_ram_in_cache and unlock_ram_in_cache

The patch is following the commit 392438406041415fe64ab8748ec5ab5ad01d1cf7

mpc86xx: use r4 instead of r2 in lock_ram_in_cache and unlock_ram_in_cache

This is needed in unlock_ram_in_cache() because it is called from C and
will corrupt the small data area anchor that is kept in R2.

lock_ram_in_cache() is modified similarly as good coding practice, but
is not called from C.

Signed-off-by: Nick Spence <nick.spence@freescale.com>
also, the r2 is used as global data pointer.

Signed-off-by: Dave Liu <daveliu@freescale.com>
16 years agoMerge branch 'master' of git://git.denx.de/u-boot-mpc83xx
Wolfgang Denk [Thu, 30 Oct 2008 20:34:40 +0000 (21:34 +0100)]
Merge branch 'master' of git://git.denx.de/u-boot-mpc83xx

16 years agompc83xx pci: Round up memory size in inbound window.
Scott Wood [Tue, 28 Oct 2008 16:45:04 +0000 (11:45 -0500)]
mpc83xx pci: Round up memory size in inbound window.

The current calculation will fail to cover all memory if
its size is not a power of two.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
16 years agoMerge branch 'master' of git://git.denx.de/u-boot-mpc86xx
Wolfgang Denk [Thu, 30 Oct 2008 19:57:46 +0000 (20:57 +0100)]
Merge branch 'master' of git://git.denx.de/u-boot-mpc86xx

16 years ago86xx: remove the unused definition
Dave Liu [Thu, 23 Oct 2008 13:19:13 +0000 (21:19 +0800)]
86xx: remove the unused definition

Signed-off-by: Dave Liu <daveliu@freescale.com>
16 years ago86xx: remove the redundant r2 global data pointer save
Dave Liu [Tue, 28 Oct 2008 09:47:49 +0000 (17:47 +0800)]
86xx: remove the redundant r2 global data pointer save

The commit 67256678f00c09b0a7f19e862e5c1847553d31bc add
the another global data pointer save, but in fact the
global data pointer will be initialized in the board_init_r,
so remove it such as the 85xx/83xx family.

Signed-off-by: Dave Liu <daveliu@freescale.com>
Acked-by: Kumar Gala <kumar.gala@freescale.com>
16 years ago86xx: remove the unused code for 86xx family
Dave Liu [Tue, 28 Oct 2008 09:47:41 +0000 (17:47 +0800)]
86xx: remove the unused code for 86xx family

I believe these code was copied from 74xx family, but for
86xx, it is unused.

Signed-off-by: Dave Liu <daveliu@freescale.com>
Acked-by: Kumar Gala <kumar.gala@freescale.com>
16 years ago86xx: remove the second DDR LAW setting for mpc8641hpcn
Dave Liu [Tue, 28 Oct 2008 09:46:35 +0000 (17:46 +0800)]
86xx: remove the second DDR LAW setting for mpc8641hpcn

The DDR1 LAW will precedence the DDR2 LAW, so remove
the second DDR LAW.

Signed-off-by: Dave Liu <daveliu@freescale.com>
Acked-by: Becky Bruce <becky.bruce@freescale.com>
16 years ago86xx: remove the unused ddr_enable_ecc in the board file
Dave Liu [Tue, 28 Oct 2008 09:46:23 +0000 (17:46 +0800)]
86xx: remove the unused ddr_enable_ecc in the board file

The DDR controller of 86xx processors have the ECC data init
feature, and the new DDR code is using the feature, we don't
need the way with DMA to init memory again.

Signed-off-by: Dave Liu <daveliu@freescale.com>
Acked-by: Kumar Gala <kumar.gala@freescale.com>
16 years ago86xx: Move the clear_tlbs before MMU turn on
Dave Liu [Tue, 28 Oct 2008 09:46:12 +0000 (17:46 +0800)]
86xx: Move the clear_tlbs before MMU turn on

We must invalidate TLBs before MMU turn on, but
currently the code is not, if there are some stale
TLB entry valid in the TLBs, it will cause strange
issue.

Signed-off-by: Dave Liu <daveliu@freescale.com>
Acked-by: Becky Bruce <becky.bruce@freescale.com>
16 years agompc8313erdb: Document NAND boot.
Scott Wood [Mon, 27 Oct 2008 20:57:08 +0000 (15:57 -0500)]
mpc8313erdb: Document NAND boot.

Previously, the documentation claimed that NAND boot is not supported.
This is no longer true.

Signed-off-by: Scott Wood <scottwood@freescale.com>
16 years agoNAND: Properly create JFFS2 cleanmarkers.
Scott Wood [Wed, 29 Oct 2008 19:20:26 +0000 (14:20 -0500)]
NAND: Properly create JFFS2 cleanmarkers.

As reported by Ilko Iliev <iliev@ronetix.at>, the "nand erase clean"
command is currently broken, and among other things causes all blocks
to be marked bad.

This implements it properly using MTD_OOB_AUTO, along with some
indentation fixes.

Signed-off-by: Scott Wood <scottwood@freescale.com>
16 years agoNAND fsl elbc: Set FMR[ECCM] based on page size.
Scott Wood [Wed, 29 Oct 2008 18:42:41 +0000 (13:42 -0500)]
NAND fsl elbc: Set FMR[ECCM] based on page size.

Hardware expects ECCM 0 for small page and ECCM 1 for large page
when booting from NAND, so use those defaults.

Signed-off-by: Scott Wood <scottwood@freescale.com>
16 years agoNAND: Add support for MPC8572DS board
Haiying Wang [Wed, 29 Oct 2008 17:32:59 +0000 (13:32 -0400)]
NAND: Add support for MPC8572DS board

This patch defines 1M TLB&LAW size for NAND on MPC8572DS, assigns
0xffa00000 for CONFIG_SYS_NAND_BASE and adds other NAND supports in
config file.

It also moves environment(CONFIG_ENV_ADDR) outside of u-boot image, to
make room for the increased code size with NAND enabled.

Signed-off-by: Jason Jin <Jason.Jin@freescale.com>
Signed-off-by: Haiying Wang <Haiying.Wang@freescale.com>
Signed-off-by: Scott Wood <scottwood@freescale.com>
16 years agoMake Freescale local bus registers available for both 83xx and 85xx.
Haiying Wang [Wed, 29 Oct 2008 15:05:55 +0000 (11:05 -0400)]
Make Freescale local bus registers available for both 83xx and 85xx.

- Rename lbus83xx_t to fsl_lbus_t and move it to asm/fsl_lbc.h so that it
  can be shared by both 83xx and 85xx
- Remove lbus83xx_t and replace it with fsl_lbus_t in all 83xx boards
  files which use lbus83xx_t.
- Move FMR, FIR, FCR, FPAR, LTESR from mpc83xx.h to asm/fsl_lbc.h so that
  85xx can share them.

Signed-off-by: Jason Jin <Jason.Jin@freescale.com>
Signed-off-by: Haiying Wang <Haiying.Wang@freescale.com>
Signed-off-by: Scott Wood <scottwood@freescale.com>
16 years agoNAND: Align right column of the shorthelp with other commands.
Scott Wood [Mon, 27 Oct 2008 20:38:30 +0000 (15:38 -0500)]
NAND: Align right column of the shorthelp with other commands.

I accidentally broke this in when making consistent the partial
alignment of the longhelp.

Signed-off-by: Scott Wood <scottwood@freescale.com>
16 years agoNAND: Reset chip on power-up
Karl Beldan [Mon, 15 Sep 2008 14:08:03 +0000 (16:08 +0200)]
NAND: Reset chip on power-up

Some chips require a RESET after power-up (e.g. Micron MT29FxGxxxxx).
The first command sent is NAND_CMD_READID.
Issue a NAND_CMD_RESET in nand_scan_ident before reading the device id.
Tested with an MT29F4G08AAC.

Signed-off-by: Karl Beldan <karl.beldan@gmail.com>
Signed-off-by: Scott Wood <scottwood@freescale.com>
16 years agoNAND: sync with 2.6.27
Scott Wood [Fri, 24 Oct 2008 21:20:43 +0000 (16:20 -0500)]
NAND: sync with 2.6.27

This brings the core NAND code up to date with the Linux kernel.

Since there were several drivers in Linux as of the last update that are
not in u-boot, I'm not bringing over new drivers that have been added
since in the absence of an interested party.

I did not update OneNAND since it was recently synced by Kyungmin Park,
and I'm not sure exactly what the common ancestor is.

Signed-off-by: Scott Wood <scottwood@freescale.com>
16 years agobootm: Added CONFIG_BOOTM_{LINUX, NETBSD, RTEMS}
Kumar Gala [Tue, 21 Oct 2008 22:25:47 +0000 (17:25 -0500)]
bootm: Added CONFIG_BOOTM_{LINUX, NETBSD, RTEMS}

Added the ability to config out bootm support for Linux, NetBSD, RTEMS

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
16 years agobootm: support subcommands in linux ppc bootm
Kumar Gala [Tue, 21 Oct 2008 22:25:46 +0000 (17:25 -0500)]
bootm: support subcommands in linux ppc bootm

Add support for 'bdt', 'cmdline', 'prep' to the linux PPC bootm.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
16 years agobootm: Add subcommands
Kumar Gala [Tue, 21 Oct 2008 22:25:45 +0000 (17:25 -0500)]
bootm: Add subcommands

Add the ability to break the steps of the bootm command into several
subcommands: start, loados, ramdisk, fdt, bdt, cmdline, prep, go.

This allows us to do things like manipulate device trees before
they are passed to a booting kernel or setup memory for a secondary
core in multicore situations.

Not all OS types support all subcommands (currently only start, loados,
ramdisk, fdt, and go are supported).

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
16 years agobootm: Move to using a function pointer table for the boot os function
Kumar Gala [Tue, 21 Oct 2008 22:25:44 +0000 (17:25 -0500)]
bootm: Move to using a function pointer table for the boot os function

This removes a bit of code and makes it easier for the upcoming sub bootm
command support to call into the proper OS specific handler.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Wolfgang Denk <wd@denx.de>
16 years agoMerge branch 'master' of git://git.denx.de/u-boot-video
Wolfgang Denk [Tue, 28 Oct 2008 07:37:19 +0000 (08:37 +0100)]
Merge branch 'master' of git://git.denx.de/u-boot-video

16 years agoi386: Renamed show_boot_progress in assembler code
Graeme Russ [Mon, 29 Sep 2008 13:03:14 +0000 (23:03 +1000)]
i386: Renamed show_boot_progress in assembler code

Renamed show_boot_progress in assembler init phase to
show_boot_progress_asm to avoid link conflicts with C version

Signed-off-by: Graeme Russ <graeme.russ@gmail.com>
16 years agoMerge branch 'denx'
Andy Fleming [Mon, 27 Oct 2008 22:31:05 +0000 (17:31 -0500)]
Merge branch 'denx'

16 years ago85xx: Update MPC85xx_PORDEVSR_IO_SEL mask
Peter Tyser [Mon, 27 Oct 2008 21:42:00 +0000 (16:42 -0500)]
85xx: Update MPC85xx_PORDEVSR_IO_SEL mask

The MPC8572 has a 4-bit wide PORDEVSR IO_SEL field. Other MPC85xx
processors have a 3-bit wide IO_SEL field but have the most
significant bit is wired to 0 so this change should not affect
them.

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
16 years agoMerge branch 'master' of git://git.denx.de/u-boot-mpc85xx
Wolfgang Denk [Mon, 27 Oct 2008 21:31:32 +0000 (22:31 +0100)]
Merge branch 'master' of git://git.denx.de/u-boot-mpc85xx

16 years agopowerpc: fix pci window initialization to work with > 4GB DRAM
Becky Bruce [Mon, 27 Oct 2008 21:09:42 +0000 (16:09 -0500)]
powerpc: fix pci window initialization to work with > 4GB DRAM

The existing code has a few errors that need to be fixed in
order to support large RAM sizes.  Fix those, and add a
comment to make it clearer.

Signed-off-by: Becky Bruce <becky.bruce@freescale.com>
Acked-by: Kumar Gala <galak@kernel.crashing.org>
16 years agopci/fsl_pci_init: Removed a bunch pointless trailing backslashes.
Kumar Gala [Mon, 27 Oct 2008 18:16:20 +0000 (13:16 -0500)]
pci/fsl_pci_init: Removed a bunch pointless trailing backslashes.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
16 years agolcd: Let the board code show board-specific info
Haavard Skinnemoen [Mon, 1 Sep 2008 14:21:22 +0000 (16:21 +0200)]
lcd: Let the board code show board-specific info

The information displayed when CONFIG_LCD_INFO is set is inherently
board-specific, so it should be done by the board code. The current code
dealing with this only handles two cases, and is already a horrible mess
of #ifdeffery.

Yes, this duplicates some code, but it also allows boards to print more
board-specific information; this used to be very difficult.

Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
Signed-off-by: Anatolij Gustschin <agust@denx.de>
16 years agolcd: Set lcd_is_enabled before clearing the screen
Haavard Skinnemoen [Mon, 1 Sep 2008 14:21:21 +0000 (16:21 +0200)]
lcd: Set lcd_is_enabled before clearing the screen

This allows the logo/info rendering routines to use the regular
lcd_putc/lcd_puts/lcd_printf calls.

Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
Signed-off-by: Anatolij Gustschin <agust@denx.de>
16 years agolcd: Implement lcd_printf()
Haavard Skinnemoen [Mon, 1 Sep 2008 14:21:20 +0000 (16:21 +0200)]
lcd: Implement lcd_printf()

lcd_printf() has a prototype in include/lcd.h but no implementation. Fix
this by borrowing the lcd_printf() implementation from the cogent board
code (which appears to use its own LCD framework.)

Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
Signed-off-by: Anatolij Gustschin <agust@denx.de>
16 years agoatmel_lcdfb: Straighten out funky vl_sync logic
Haavard Skinnemoen [Mon, 1 Sep 2008 14:21:19 +0000 (16:21 +0200)]
atmel_lcdfb: Straighten out funky vl_sync logic

If the board _didn't_ request INVLINE_INVERTED, we set INVLINE_INVERTED,
otherwise we don't. WTF?

Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
Signed-off-by: Anatolij Gustschin <agust@denx.de>
16 years agoatmel_lcdfb: Eliminate unneeded #include <asm/arch/hardware.h>
Haavard Skinnemoen [Mon, 1 Sep 2008 14:21:18 +0000 (16:21 +0200)]
atmel_lcdfb: Eliminate unneeded #include <asm/arch/hardware.h>

atmel_lcdfb doesn't actually need anything from asm/arch/hardware.h. It
includes a file that does, asm/arch/gpio.h, but this file doesn't
include <asm/arch/hardware.h> like it's supposed to.

Add the missing include to asm/arch/gpio.h and remove the workaround
from the atmel_lcdfb driver. This makes the driver compile on avr32.

Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
Signed-off-by: Anatolij Gustschin <agust@denx.de>
16 years ago86xx: Convert all fsl_pci_init users to new APIs
Kumar Gala [Wed, 22 Oct 2008 19:38:55 +0000 (14:38 -0500)]
86xx: Convert all fsl_pci_init users to new APIs

Converted MPC8610HCPD, MPC8641HPCN, and SBC8641D to use
fsl_pci_setup_inbound_windows() and ft_fsl_pci_setup().

With these changes the board code is a bit smaller and we get dma-ranges
set in the device tree for these boards.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Andrew Fleming-AFLEMING <afleming@freescale.com>
Acked-by: Jon Loeliger <jdl@freescale.com>
16 years ago85xx: Convert all fsl_pci_init users to new APIs
Kumar Gala [Tue, 21 Oct 2008 13:28:33 +0000 (08:28 -0500)]
85xx: Convert all fsl_pci_init users to new APIs

Converted ATUM8548, MPC8536DS, MPC8544DS, MPC8548CDS, MPC8568MDS,
MPC8572DS, TQM85xx, and SBC8548 to use fsl_pci_setup_inbound_windows()
and ft_fsl_pci_setup().

With these changes the board code is a bit smaller and we get dma-ranges
set in the device tree for these boards.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Andrew Fleming-AFLEMING <afleming@freescale.com>
16 years agopci/fsl_pci_init: Added fdt helper for setting up bus-ranges & dma-ranges
Kumar Gala [Thu, 23 Oct 2008 05:01:06 +0000 (00:01 -0500)]
pci/fsl_pci_init: Added fdt helper for setting up bus-ranges & dma-ranges

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Andrew Fleming-AFLEMING <afleming@freescale.com>
16 years agopci/fsl_pci_init: Add a common PCI inbound setup function
Kumar Gala [Wed, 22 Oct 2008 19:06:24 +0000 (14:06 -0500)]
pci/fsl_pci_init: Add a common PCI inbound setup function

Add a common setup function that determines the pci_region(s) based
on how much memory we have in the system.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Andrew Fleming-AFLEMING <afleming@freescale.com>
16 years agopci/fsl_pci_init: Enable larger address and setting inbound windows properly
Kumar Gala [Tue, 21 Oct 2008 15:13:14 +0000 (10:13 -0500)]
pci/fsl_pci_init: Enable larger address and setting inbound windows properly

* PCI Inbound window was setup incorrectly.  The PCI address and system
  address were swapped.  The PCI address should be setting piwar/piwbear
  and the system address should be setting pitar.

* Removed masking of addresses to allow for system address to support
  system address & PCI address >32-bits

* Set PIWBEAR & POTEAR to allow for full 64-bit PCI addresses

* Respect the PCI_REGION_PREFETCH for inbound windows

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Andrew Fleming-AFLEMING <afleming@freescale.com>
16 years agofdt: Added helper to set PCI dma-ranges property
Kumar Gala [Thu, 23 Oct 2008 04:33:56 +0000 (23:33 -0500)]
fdt: Added helper to set PCI dma-ranges property

Added fdt_pci_dma_ranges() that parses the pci_region info from the
struct pci_controller and populates the dma-ranges based on it.

The max # of windws/dma-ranges we support is 3 since on embedded
PowerPC based systems this is the max number of windows.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Andrew Fleming-AFLEMING <afleming@freescale.com>
16 years agofdt: Add fdt_getprop_u32_default helpers
Kumar Gala [Thu, 23 Oct 2008 05:05:47 +0000 (00:05 -0500)]
fdt: Add fdt_getprop_u32_default helpers

Add helper functions to return find a node and return it's property
or a default value.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Andrew Fleming-AFLEMING <afleming@freescale.com>
Acked-by: Gerald Van Baren <vanbaren@cideas.com>
16 years ago86xx: Enable 64-bit PCI resources on all Freescale boards
Kumar Gala [Tue, 21 Oct 2008 23:06:15 +0000 (18:06 -0500)]
86xx: Enable 64-bit PCI resources on all Freescale boards

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Andrew Fleming-AFLEMING <afleming@freescale.com>
16 years ago85xx: Enable 64-bit PCI resources on all Freescale boards
Kumar Gala [Tue, 21 Oct 2008 16:33:58 +0000 (11:33 -0500)]
85xx: Enable 64-bit PCI resources on all Freescale boards

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Andrew Fleming-AFLEMING <afleming@freescale.com>
16 years agopci: Allow for PCI addresses to be 64-bit
Kumar Gala [Tue, 21 Oct 2008 13:36:08 +0000 (08:36 -0500)]
pci: Allow for PCI addresses to be 64-bit

PCI bus is inherently 64-bit.  While not all system require access to
the full 64-bit PCI address range some do.  This allows those systems
to enable the full PCI address width via CONFIG_SYS_PCI_64BIT.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Andrew Fleming-AFLEMING <afleming@freescale.com>
Acked-by: Wolfgang Denk <wd@denx.de>
16 years ago85xx: Fix the incorrect register used for DDR erratum1
Dave Liu [Thu, 23 Oct 2008 13:18:53 +0000 (21:18 +0800)]
85xx: Fix the incorrect register used for DDR erratum1

The 8572 DDR erratum1:
DDR controller may enter an illegal state when operating
in 32-bit bus mode with 4-beat bursts.

Description:
When operating with a 32-bit bus, it is recommended that
DDR_SDRAM_CFG[8_BE] is cleared when DDR2 memories are used.
This forces the DDR controller to use 4-beat bursts when
communicating to the DRAMs. However, an issue exists that
could lead to data corruption when the DDR controller is
in 32-bit bus mode while using 4-beat bursts.

Projected Impact:
If the DDR controller is operating in 32-bit bus mode with
4-beat bursts, then the controller may enter into a bad state.
All subsequent reads from memory is corrupted.
Four-beat bursts with a 32-bit bus only is used with DDR2 memories.
Therefore, this erratum does not affect DDR3 mode.

Work Arounds:
To work around this issue, software must set DEBUG_1[31] in
DDR memory mapped space (CCSRBAR offset + 0x2f00 for DDR_1
and CCSRBAR offset + 0x6f00 for DDR_2).

Currenlty, the code is using incorrect register DDR_SDRAM_CFG_2
as condition, but it should be DDR_SDRAM_CFG register.

Signed-off-by: Dave Liu <daveliu@freescale.com>
16 years ago85xx: remove unused config definition
Dave Liu [Thu, 23 Oct 2008 13:17:19 +0000 (21:17 +0800)]
85xx: remove unused config definition

Signed-off-by: Dave Liu <daveliu@freescale.com>
16 years ago85xx: Add basic e500mc core support
Kumar Gala [Thu, 23 Oct 2008 06:47:38 +0000 (01:47 -0500)]
85xx: Add basic e500mc core support

Introduce CONFIG_E500MC to deal with the minor differences between
e500v2 and e500mc.

* Certain fields of HID0/1 don't exist anymore on e500mc
* Cache line size is 64-bytes on e500mc
* reset value of PIR is different

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
16 years ago85xx: Use CONFIG_SYS_CACHELINE_SIZE instead of magic number
Kumar Gala [Thu, 23 Oct 2008 06:47:37 +0000 (01:47 -0500)]
85xx: Use CONFIG_SYS_CACHELINE_SIZE instead of magic number

Using CONFIG_SYS_CACHELINE_SIZE instead of 31 means we can handle
e500mc's 64-byte cacheline properly when it gets added.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
16 years agoppc4xx: New board avnet fx12 minimodul
Georg Schardt [Fri, 24 Oct 2008 11:51:52 +0000 (13:51 +0200)]
ppc4xx: New board avnet fx12 minimodul

This patch adds support for the avnet fx12 minimodul.
It needs the "ppc4xx: Generic architecture for xilinx ppc405"
patch from Ricardo.

Signed-off-by: Georg Schardt <schardt@team-ctech.de>
Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@uam.es>
Signed-off-by: Stefan Roese <sr@denx.de>
16 years agoppc4xx: Generic architecture for xilinx ppc405(v3)
Ricardo Ribalda Delgado [Tue, 21 Oct 2008 16:29:46 +0000 (18:29 +0200)]
ppc4xx: Generic architecture for xilinx ppc405(v3)

As "ppc44x: Unification of virtex5 pp440 boards" did for the xilinx
ppc440 boards, this patch presents a common architecture for all the
xilinx ppc405 boards.

Any custom xilinx ppc405 board can be added very easily with no code
duplicity.

This patch also adds a simple generic board, that can be used on almost
any design with xilinx ppc405 replacing the file ppc405-generic/xparameters.h

This patch is prepared to work with the latest version of EDK (10.1)

Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@uam.es>
Signed-off-by: Stefan Roese <sr@denx.de>
16 years agoppc4xx: Disable DDR2 autocalibration on Kilauea for now
Stefan Roese [Fri, 24 Oct 2008 06:56:09 +0000 (08:56 +0200)]
ppc4xx: Disable DDR2 autocalibration on Kilauea for now

Since the new autocalibration still has some problems on some Kilauea
boards with 200MHz DDR2 frequency we disable the autocalibration and
use the hardcoded values as done before. This seems to work reliably
on all known DDR2 frequencies.

After the autocalibration issue is fixed we will enable it again.

Signed-off-by: Stefan Roese <sr@denx.de>
16 years agoBlackfin: fix up UART status bit handling
Mike Frysinger [Wed, 9 Apr 2008 06:02:07 +0000 (02:02 -0400)]
Blackfin: fix up UART status bit handling

Some Blackfin UARTs are read-to-clear while others are write-to-clear.
This can cause problems when we poll the LSR and then later try and handle
any errors detected.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
16 years agoBlackfin: bf561-ezkit: drop redundant code
Mike Frysinger [Sun, 12 Oct 2008 00:42:17 +0000 (20:42 -0400)]
Blackfin: bf561-ezkit: drop redundant code

Common Blackfin code already announces CPU information.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
16 years agoBlackfin: bf561-ezkit: drop pointless USB code
Mike Frysinger [Sun, 12 Oct 2008 00:43:10 +0000 (20:43 -0400)]
Blackfin: bf561-ezkit: drop pointless USB code

The USB/LAN register settings are not actually used/needed in order to
drive things from U-Boot, so drop the code.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
16 years agoBlackfin: linker scripts: force start.o and set initcode boundaries
Mike Frysinger [Sun, 12 Oct 2008 00:47:58 +0000 (20:47 -0400)]
Blackfin: linker scripts: force start.o and set initcode boundaries

Make sure that the start.o object is always the first object in our linker
script regardless of configuration settings, and add some linker symbols
so the ldr utility can properly locate the initcode when generating a LDR.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
16 years agoBlackfin: small cpu init optimization while setting interrupt mask
Mike Frysinger [Sun, 12 Oct 2008 01:19:39 +0000 (21:19 -0400)]
Blackfin: small cpu init optimization while setting interrupt mask

Use the sti instruction to set the initial interrupt mask rather than
banging on the core IMASK MMR to save both space and time.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
16 years agoBlackfin: set initial stack correctly according to Blackfin ABI
Mike Frysinger [Sun, 12 Oct 2008 01:18:10 +0000 (21:18 -0400)]
Blackfin: set initial stack correctly according to Blackfin ABI

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
16 years agoBlackfin: make baud calculation more accurate
Mike Frysinger [Sun, 20 Apr 2008 07:11:53 +0000 (03:11 -0400)]
Blackfin: make baud calculation more accurate

We should use the algorithm in the Linux kernel so that the UART divisor
calculation is more accurate.  It also fixes problems on some picky UARTs
that have sampling anomalies.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
16 years agoBlackfin: decode hwerrcause/excause when crashing
Mike Frysinger [Mon, 6 Oct 2008 08:21:41 +0000 (04:21 -0400)]
Blackfin: decode hwerrcause/excause when crashing

Having to decode hwerrcause/excause values is a pain, so automate it.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
16 years agoBlackfin: fix register dump messages
Mike Frysinger [Mon, 6 Oct 2008 08:20:54 +0000 (04:20 -0400)]
Blackfin: fix register dump messages

Make sure we report RETI/IPEND correctly.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
16 years agoBlackfin: don't bother displaying reboot msg when crashing
Mike Frysinger [Mon, 6 Oct 2008 08:19:34 +0000 (04:19 -0400)]
Blackfin: don't bother displaying reboot msg when crashing

The hang function already tells you to reboot, so no point in showing it
twice.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
16 years agoBlackfin: enable support for nested interrupts
Mike Frysinger [Sun, 1 Jun 2008 05:23:48 +0000 (01:23 -0400)]
Blackfin: enable support for nested interrupts

During cpu init, make sure we initialize the CEC properly so that
interrupts can fire and be handled while U-Boot is running.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
16 years agoBlackfin: init NAND before relocating env
Mike Frysinger [Mon, 6 Oct 2008 07:55:25 +0000 (03:55 -0400)]
Blackfin: init NAND before relocating env

If booting out of NAND, we need to make sure we initialize it properly
before attempting to relocate the environment.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
16 years agoBlackfin: check cache bits, not cplb bits
Mike Frysinger [Thu, 7 Aug 2008 22:40:13 +0000 (18:40 -0400)]
Blackfin: check cache bits, not cplb bits

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
16 years agoBlackfin: drop unused cache flush code
Mike Frysinger [Thu, 7 Aug 2008 21:52:59 +0000 (17:52 -0400)]
Blackfin: drop unused cache flush code

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
16 years agoBlackfin: unify cache handling code
Mike Frysinger [Thu, 7 Aug 2008 19:21:47 +0000 (15:21 -0400)]
Blackfin: unify cache handling code

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
16 years agoBlackfin: only initialize the RTC when actually used
Mike Frysinger [Mon, 6 Oct 2008 07:39:07 +0000 (03:39 -0400)]
Blackfin: only initialize the RTC when actually used

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
16 years agoBlackfin: fix SWRST register definition
Mike Frysinger [Mon, 6 Oct 2008 07:44:33 +0000 (03:44 -0400)]
Blackfin: fix SWRST register definition

The SWRST register is a 16bit, not 32bit, register.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
16 years agoBlackfin: build with -fomit-frame-pointer
Mike Frysinger [Thu, 7 Aug 2008 22:54:57 +0000 (18:54 -0400)]
Blackfin: build with -fomit-frame-pointer

Signed-off-by: Mike Frysinger <vapier@gentoo.org>