Commit Graph

2919 Commits

Author SHA1 Message Date
Kumar Gala 2a1a2cb6e2 fdt: refactor initrd related code
Created a new fdt_initrd() to deal with setting the initrd properties
in the device tree and fixing up the mem reserve.  We can use this
both in the choosen node handling and lets us remove some duplicated
code when we fixup the initrd info in bootm on PPC.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-08-26 23:45:20 +02:00
Kumar Gala 3082d2348c fdt: refactor fdt resize code
Move the fdt resizing code out of ppc specific boot code and into
common fdt support code.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-08-26 23:43:36 +02:00
Kumar Gala 396f635b8f bootm: refactor image detection and os load steps
Created a bootm_start() that handles the parsing and detection of all
the images that will be used by the bootm command (OS, ramdisk, fdt).
As part of this we now tract all the relevant image offsets in the
bootm_headers_t struct. This will allow us to have all the needed
state for future sub-commands and lets us reduce a bit of arch
specific code on SPARC.

Created a bootm_load_os() that deals with decompression and loading
the OS image.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-08-26 23:41:43 +02:00
Kumar Gala e906cfae08 bootm: move lmb into the bootm_headers_t structure
To allow for persistent state between future bootm subcommands we
need the lmb to exist in a global state.
Moving it into the bootm_headers_t allows us to do that.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-08-26 23:38:48 +02:00
Kumar Gala 54f9c86691 bootm: Set working fdt address as part of the bootm flow
Set the fdt working address so "fdt FOO" commands can be used as part
of the bootm flow.  Also set an the environment variable "fdtaddr"
with the value.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-08-26 23:37:54 +02:00
Kumar Gala 06a09918f3 bootm: refactor fdt locating and relocation code
Move the code that handles finding a device tree blob and relocating
it (if needed) into common code so all arch's have access to it.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-08-26 23:37:12 +02:00
Kumar Gala c4f9419c6b bootm: refactor ramdisk locating code
Move determing if we have a ramdisk and where its located into the
common code. Keep track of the ramdisk start and end in the
bootm_headers_t image struct.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-08-26 23:35:24 +02:00
Kumar Gala c160a95447 bootm: refactor entry point code
Move entry point code out of each arch and into common code.
Keep the entry point in the bootm_headers_t images struct.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-08-26 23:31:33 +02:00
Wolfgang Denk c5d11e79a2 Merge branch 'master' of git://git.denx.de/u-boot-mpc83xx 2008-08-26 23:14:58 +02:00
Wolfgang Denk 51e46e28fd ADS5121: adjust image addresses in RAM and flash
Use the same mapping in flash as used by Linux

Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-08-26 15:01:28 +02:00
Andre Schwarz 1a9eeb78b8 change mvBL-M7 default env and move to vendor subdir
fix mvBL-M7 config and move to matrix_vision subdir

Signed-off-by: Andre Schwarz <andre.schwarz@matrix-vision.de>
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
2008-08-25 17:11:20 -05:00
Nick Spence 002d27caf2 MPC83XX: Add miscellaneous registers and #defines to support MPC83xx family devices
This patch adds elements to the 83xx sysconf structure and #define values that are used
by mpc83xx family devices.

Signed-off-by: Nick Spence <nick.spence@freescale.com>
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
2008-08-25 17:04:40 -05:00
Ira W. Snyder 447ad5768a MPC8349EMDS: Add PCI Agent (PCISLAVE) support
Add the ability for the MPC8349EMDS to run in PCI Agent mode, acting as a
PCI card rather than a host computer.

Signed-off-by: Ira W. Snyder <iws@ovro.caltech.edu>
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
2008-08-25 17:04:36 -05:00
Ira W. Snyder 162338e1fc MPC8349EMDS: use 83XX_GENERIC_PCI setup code
Change the MPC8349EMDS board to use the generic PCI initialization code
for the mpc83xx cpu.

Signed-off-by: Ira W. Snyder <iws@ovro.caltech.edu>
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
2008-08-25 17:04:24 -05:00
Kim Phillips ce0eb70333 Merge branch 'next' 2008-08-25 17:02:10 -05:00
David Gibson 0219399a4e libfdt: Implement fdt_get_property_namelen() and fdt_getprop_namelen()
As well as fdt_subnode_offset(), libfdt includes an
fdt_subnode_offset_namelen() function that takes the subnode name to
look up not as a NUL-terminated string, but as a string with an
explicit length.  This can be useful when the caller has the name as
part of a longer string, such as a full path.

However, we don't have corresponding 'namelen' versions for
fdt_get_property() and fdt_getprop().  There are less obvious use
cases for these variants on property names, but there are
circumstances where they can be useful e.g. looking up property names
which need to be parsed from a longer string buffer such as user input
or a configuration file, or looking up an alias in a path with
IEEE1275 style aliases.

So, since it's very easy to implement such variants, this patch does
so.  The original NUL-terminated variants are, of course, implemented
in terms of the namelen versions.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2008-08-24 22:20:50 -04:00
Wolfram Sang 46390da154 libfdt: Improve documentation in libfdt.h
Fix a few typos and mistakes.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Acked-by: David Gibson <david@gibson.dropbear.id.au>
2008-08-24 22:20:49 -04:00
David Gibson c66830263a dtc: Enable and fix -Wcast-qual warnings
Enabling -Wcast-qual warnings in dtc shows up a number of places where
we are incorrectly discarding a const qualification.  There are also
some places where we are intentionally discarding the 'const', and we
need an ugly cast through uintptr_t to suppress the warning.  However,
most of these are pretty well isolated with the *_w() functions.  So
in the interests of maximum safety with const qualifications, this
patch enables the warnings and fixes the existing complaints.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Acked-by: Gerald Van Baren <vanbaren@cideas.com>
2008-08-24 22:20:49 -04:00
David Gibson ef4e8ce1be dtc: Enable and fix -Wpointer-arith warnings
This patch turns on the -Wpointer-arith option in the dtc Makefile,
and fixes the resulting warnings due to using (void *) in pointer
arithmetic.  While convenient, pointer arithmetic on void * is not
portable, so it's better that we avoid it, particularly in libfdt.

Also add necessary definition of uintptr_t needed by David Gibson's
changeset "dtc: Enable and fix -Wpointer-arith warnings" (the definition
comes from stdint.h, which u-boot doesn't have). -- gvb

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Gerald Van Baren <vanbaren@cideas.com>
2008-08-24 22:20:49 -04:00
Wolfgang Denk afe3848b79 Merge branch 'master' of git://git.denx.de/u-boot-ppc4xx 2008-08-23 00:10:43 +02:00
Kyungmin Park bfd7f38614 Fix OneNAND read_oob/write_oob functions compatability
Also sync with kernel OneNAND codes

Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Scott Wood <scottwood@freescale.com>
2008-08-21 13:50:20 -05:00
Stefan Roese f556483734 ppc4xx: Cleanup of "ppc4xx: Optimize PLB4 Arbiter..." patch
This patch fixes some minor issues introduced with the patch:
ppc4xx: Optimize PLB4 Arbiter... from Prodyut Hazarika:

- Rework memory-queue and PLB arbiter optimization code, that the
  local variable is not needed anymore. This removes one #ifdef.
- Use consistant spacing in ppc4xx.h header (XXX + 0x01 instead
  of XXX+ 0x01). This was not introduced by Prodyut, just a
  copy-paste problem.

Signed-off-by: Stefan Roese <sr@denx.de>
2008-08-21 11:05:03 +02:00
Prodyut Hazarika 079589bcfb ppc4xx: Optimize PLB4 Arbiter and Memory Queue settings for PPC440SP/SPe,
PPC405EX and PPC460EX/GT/SX

- Read pipeline depth set to 4 for PPC440SP/SPE, PPC405EX, PPC460EX/GT/SX
  processors
- Moved PLB4 Arbiter register definitions to ppc4xx.h since it is shared
  across processors (405 and 440/460)
- Optimize Memory Queue settings for PPC440SP/SPE and PPC460EX/GT/SX
  processors
- Add register bit definitions for Memory Queue Configuration registers

Signed-off-by: Prodyut Hazarika <phazarika@amcc.com>
Signed-off-by: Stefan Roese <sr@denx.de>
2008-08-21 10:31:16 +02:00
Kumar Gala ba37aa0328 fdt: rework fdt_fixup_ethernet() to use env instead of bd_t
Move to using the environment variables 'ethaddr', 'eth1addr', etc..
instead of bd->bi_enetaddr, bi_enet1addr, etc.

This makes the code a bit more flexible to the number of ethernet
interfaces.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-08-21 02:07:43 +02:00
Heiko Schocher 8f2b457ef2 cfi: rename CFG_FLASH_CFI_DRIVER to CONFIG_FLASH_CFI_DRIVER
Commit	00b1883a4c
missed a few boards:
	include/configs/M5253DEMO.h
	include/configs/ml507.h
	include/configs/redwood.h

This patch fixes this.

Signed-off-by: Heiko Schocher <hs@denx.de>
2008-08-21 02:02:28 +02:00
Haavard Skinnemoen 0768b7a872 Consolidate strmhz() implementation
ARM, i386, m68k and ppc all have identical implementations of strmhz().
Other architectures don't provide this function at all.

This patch moves strmhz() into lib_generic, reducing code duplication
and providing a more unified API across architectures.

Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
2008-08-21 01:52:49 +02:00
Axel Beierlein bef92e215d Adding bootlimit/bootcount feature for MPC5XXX on TQM5200 Boards
Tested with TQM5200S on STK52XX.200 Board

Signed-off-by: Axel Beierlein <belatronix@web.de>
2008-08-21 01:39:24 +02:00
Steven A. Falco 36c2d3062e Add a hook to allow board-specific PIO mode setting.
This patch adds a hook whereby a board-specific routine can be called to
configure hardware for a PIO mode.  The prototype for the board-specific
routine is:

	int inline ide_set_piomode(int pio_mode)

ide_set_piomode should be prepared to configure hardware for a pio_mode
between 0 and 6, inclusive.  It should return 0 on success or 1 on failure.

Signed-off-by: Steven A. Falco <sfalco@harris.com>
2008-08-21 01:31:04 +02:00
Steven A. Falco 9571b84cb1 Replace enums in ata.h with an include of libata.h
This patch removes some enums from ata.h and replaces them with an
include of libata.h.  This way, we eliminate duplicated code, and
prevent errors whereby the different versions could be out of sync.

Signed-off-by: Steven A. Falco <sfalco@harris.com>
2008-08-21 01:20:45 +02:00
Jean-Christophe PLAGNIOL-VILLARD 0de0afbca8 coldfire: fix CFI drivers activation with new macro
rename CFG_FLASH_CFI_DRIVER to CONFIG_FLASH_CFI_DRIVER

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-08-21 01:10:52 +02:00
Haavard Skinnemoen 4926714041 hammerhead/mimc200: Use CONFIG_FLASH_CFI_DRIVER
CFG_FLASH_CFI_DRIVER was recently renamed CONFIG_FLASH_CFI_DRIVER.

Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
2008-08-20 09:40:16 +02:00
Haavard Skinnemoen d3c23a790f Merge branch 'next' of git://git.denx.de/u-boot-avr32
Conflicts:

	MAINTAINERS
2008-08-20 09:37:09 +02:00
Haavard Skinnemoen 33eac2b3d9 hammerhead: Add missing printf parameter to CONFIG_AUTOBOOT_PROMPT
Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
2008-08-20 09:28:36 +02:00
Haavard Skinnemoen 25da0b8419 favr-32-ezkit: Fix printf format warnings
Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
2008-08-20 09:27:37 +02:00
Haavard Skinnemoen 7321d7e7b6 Merge branch 'mimc200' of git://git.denx.de/u-boot-avr32
Conflicts:

	MAKEALL
	Makefile
2008-08-20 09:12:28 +02:00
Mark Jackson 13b50fe3bc avr32: Add MIMC200 board
The MIMC200 board is based on Atmel's NGW100 dev kit, but with an extra
8MByte FLASH and 128KByte FRAM.

Signed-off-by: Mark Jackson <mpfj@mimc.co.uk>
Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
2008-08-20 09:10:31 +02:00
Wolfgang Denk b734e5556a Minor code cleanup: keep lists sorted.
Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-08-18 23:50:20 +02:00
Ricardo Ribalda Delgado d0039d4ed2 Add support for ADT7460 I2C monitor chip
Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@uam.es>
2008-08-18 23:47:01 +02:00
Harald Welte 0a823aa2a8 Add 'license' command to U-Boot command line
The 'license' command includes the U-Boot license (GPLv2) into the
actual bootloader binary. The license text can be shown interactively
at the U-Boot commandline.

For products where the commandline can actually be accessed by the
end user, this helps to prevent inadvertent GPL violations, since the
GPLv2 license text can no longer be 'forgotten' to be included into
the product.

The 'license' command can be enabled by CONFIG_CMD_LICENSE.

Signed-off-by: Harald Welte <laforge@openmoko.org>
2008-08-18 23:21:49 +02:00
Harald Welte fe2ce5500e add 'unzip' command to u-boot commandline
[PATCH] add new 'unzip' command to u-boot commandline

common/cmd_mem.c: new command "unzip srcaddr dstaddr [dstsize]" to unzip from
memory to memory, and option CONFIG_CMD_UNZIP to enable it

Signed-off-by: Werner Almesberger <werner@openmoko.org>
Signed-off-by: Harald Welte <laforge@openmoko.org>
2008-08-18 22:59:00 +02:00
TsiChung Liew 4cb4e654ca ColdFire: Multiple fixes for M5282EVB
Incorrect CFG_HZ value, change 1000000 to 1000.
Rename #waring to #warning. RAMBAR1 uses twice
in start.S, rename the later to FLASHBAR. Insert
nop for DRAM setup. And, env_offset in linker file.

Signed-off-by: TsiChung Liew <Tsi-Chung.Liew@freescale.com>
2008-08-14 12:31:56 -06:00
TsiChung Liew 05316f8ece ColdFire: Add M54451EVB platform support for MCF5445x
Signed-off-by: TsiChung Liew <Tsi-Chung.Liew@freescale.com>
2008-08-14 12:31:56 -06:00
TsiChung Liew 922cd75155 ColdFire: Add Serial Flash support for M54455EVB
Signed-off-by: TsiChung Liew <Tsi-Chung.Liew@freescale.com>
2008-08-14 12:31:56 -06:00
TsiChung Liew 9f75155145 ColdFire: Implement SBF feature for M5445EVB
Signed-off-by: TsiChung Liew <Tsi-Chung.Liew@freescale.com>
2008-08-14 12:31:55 -06:00
TsiChung Liew a7323bba22 ColdFire: Add SSPI feature for MCF5445x
Signed-off-by: TsiChung Liew <Tsi-Chung.Liew@freescale.com>
2008-08-14 12:31:55 -06:00
TsiChung Liew b2d022d1ac ColdFire: Use CFI Flash driver for M54455EVB
Remove non-common flash driver in
board/freescale/m54455evb/flash.c. The non-cfi flash will
use CONFIG_FLASH_CFI_LEGACY to configure the flash
attribute.

Signed-off-by: TsiChung Liew <Tsi-Chung.Liew@freescale.com>
2008-08-14 12:30:10 -06:00
TsiChung Liew 6d33c6acfa ColdFire: Add M5253DEMO platform support for MCF5253
Signed-off-by: TsiChung Liew <Tsi-Chung.Liew@freescale.com>
2008-08-14 12:30:10 -06:00
TsiChung Liew 80ba61fd82 ColdFire: Raise M5253EVBE uart baudrate to 115200 bps
Signed-off-by: TsiChung Liew <Tsi-Chung.Liew@freescale.com>
2008-08-14 12:30:10 -06:00
Wolfgang Denk 4b0708093e Coding Style cleanup, update CHANGELOG
Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-08-14 14:41:06 +02:00
Wolfgang Denk 28ac671910 Merge branch 'master' of git://git.denx.de/u-boot-nand-flash 2008-08-14 11:26:22 +02:00