Commit Graph

182 Commits

Author SHA1 Message Date
Dave Liu cd54081cd4 ata: enable the sata initialize on boot up
Signed-off-by: Dave Liu <daveliu@freescale.com>
2008-03-26 23:38:54 +01:00
Wolfgang Denk 438a4c1126 Cleanup coding style, update CHANGELOG
Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-03-26 11:48:46 +01:00
Bartlomiej Sieka 27f33e9f45 Merge branch 'new-image' of git://www.denx.de/git/u-boot-testing
Conflicts:

	common/cmd_bootm.c
	cpu/mpc8xx/cpu.c

Signed-off-by: Bartlomiej Sieka <tur@semihalf.com>
2008-03-26 09:38:06 +01:00
Kumar Gala 9c666a7db0 ppc: Allow boards to specify how much memory they can map
For historical reasons we limited the stack to 256M because some boards
could only map that much via BATS.  However newer boards are capable of
mapping more memory (for example 85xx is capble of doing up to 2G).

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-03-25 22:26:11 +01:00
Bartlomiej Sieka dafaede8a4 [new uImage] Disable debuging output in preparation for merge with master
Signed-off-by: Bartlomiej Sieka <tur@semihalf.com>
2008-03-20 23:20:31 +01:00
Yuri Tikhonov 3d61018643 The patch introduces the alternative configuration of the log buffer for the lwmon5 board: the storage for the log-buffer itself is OCM(on-chip memory), the log-buffer header is moved to six GPT registers (PPC440EPX_GPT0_COMP1, ..., PPC440EPX_GPT0_COMP5).
To enable this, alternative, configuration the U-Boot board configuration
file for lwmon5 includes the definitions of alternative addresses for header
(CONFIG_ALT_LH_ADDR) and buffer (CONFIG_ALT_LB_ADDR).

 The Linux shall be configured with the CONFIG_ALT_LB_LOCATION option set,
and has the BOARD_ALT_LH_ADDR and BOARD_ALT_LB_ADDR constants defined in the
lwmon5 board-specific header (arch/ppc/platforms/4xx/lwmon5.h).

Signed-off-by: Yuri Tikhonov <yur@emcraft.com>
2008-03-18 22:24:48 +01:00
Marian Balakowicz f773bea8e1 [new uImage] Add proper ramdisk/FDT handling when FIT configuration is used
Save FIT configuration provied in the first bootm argument and use it
when to get ramdisk/FDT subimages when second and third (ramdisk/FDT)
arguments are not specified.

Signed-off-by: Marian Balakowicz <m8@semihalf.com>
2008-03-12 10:35:46 +01:00
Marian Balakowicz cd7c596e9f [new uImage] Add new uImage format support to arch specific do_bootm_linux() routines
This patch updates architecture specific implementations of
do_bootm_linux() adding new uImage format handling for
operations like get kernel entry point address, get kernel
image data start address.

Signed-off-by: Marian Balakowicz <m8@semihalf.com>
2008-03-12 10:33:00 +01:00
Marian Balakowicz 3dfe110149 [new uImage] Add node offsets for FIT images listed in struct bootm_headers
This patch adds new node offset fields to struct bootm_headers
and updates bootm_headers processing code to make use of them.
Saved node offsets allow to avoid repeating fit_image_get_node() calls.

Signed-off-by: Marian Balakowicz <m8@semihalf.com>
2008-03-12 10:32:59 +01:00
Marian Balakowicz bc8ed486b1 [new uImage] ppc: Add new uImage format support to FDT handling routines
Support for new (FIT) format uImages is added to powerpc specific
boot_get_fdt() routine which now recognizes, sanity checks FIT image
and is able to access data sections of the requested component image.

Signed-off-by: Marian Balakowicz <m8@semihalf.com>
2008-03-12 10:32:53 +01:00
Marian Balakowicz d985c8498c [new uImage] Remove unnecessary arguments passed to ramdisk routines
boot_get_ramdisk() and image_get_ramdisk() do not need all
cmdtp, flag, argc and argv arguments. Simplify routines definition.

Signed-off-by: Marian Balakowicz <m8@semihalf.com>
2008-03-12 10:14:38 +01:00
Marian Balakowicz 05e07b1ea2 [new uImage] Fix FDT blob totalsize calculation in boot_relocate_fdt()
Do not use global fdt blob pointer, calculate blob size from routine
argument blob pointer.

Signed-off-by: Marian Balakowicz <m8@semihalf.com>
2008-02-29 22:22:46 +01:00
Marian Balakowicz 9a4daad0a3 [new uImage] Update naming convention for bootm/uImage related code
This patch introduces the following prefix convention for the
image format handling and bootm related code:

genimg_		- dual format shared code
image_		- legacy uImage format specific code
fit_		- new uImage format specific code
boot_		- booting process related code

Related routines are renamed and a few pieces of code are moved around and
re-grouped.

Signed-off-by: Marian Balakowicz <m8@semihalf.com>
2008-02-29 14:58:34 +01:00
Marian Balakowicz e18489e8c2 Merge branch 'master' of git://www.denx.de/git/u-boot into new-image 2008-02-29 13:56:44 +01:00
Kumar Gala 75fa002c47 [new uImage] Respect autostart setting in linux bootm
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Acked-by: Marian Balakowicz <m8@semihalf.com>
2008-02-29 13:15:56 +01:00
Kumar Gala d3f2fa0d27 [new uImage] Provide ability to restrict region used for boot images
Allow the user to set 'bootm_low' and 'bootm_size' env vars as a way
to restrict what memory range is used for bootm.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Acked-by: Marian Balakowicz <m8@semihalf.com>
2008-02-29 13:15:56 +01:00
Kumar Gala e822d7fc4d [new uImage] Use lmb for bootm allocations
Convert generic ramdisk_high(), get_boot_cmdline(), get_boot_kbd()
functions over to using lmb for allocation of the ramdisk, command line
and kernel bd info.

Convert PPC specific fdt_relocate() to use lmb for allocation of the device
tree.

Provided a weak function that board code can call to do additional
lmb reserves if needed.

Also introduce the concept of bootmap_base to specify the offset in
physical memory that the bootmap is located at.  This is used for
allocations of the cmdline, kernel bd, and device tree as they should
be contained within bootmap_base and bootmap_base + CFG_BOOTMAPSZ.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-02-29 13:15:56 +01:00
Kumar Gala 4648c2e7a1 [new uImage] ppc: Allow boards to specify effective amount of memory
For historical reasons we limited the stack to 256M because some boards
could only map that much via BATS.  However newer boards are capable of
mapping more memory (for example 85xx is capable of doing up to 2G).

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Acked-by: Marian Balakowicz <m8@semihalf.com>
2008-02-29 13:15:24 +01:00
Kumar Gala 274cea2bdd [new uImage] rework error handling so common functions don't reset
Changed image_get_ramdisk() to just return NULL on error and have
get_ramdisk() propogate that error to the caller.  It's left to the
caller to call do_reset() if it wants to.

Also moved calling do_reset() in get_fdt() and fdt_relocate() on ppc
to a common location.  In the future we will change get_fdt() and
fdt_relocate() to return success/failure and not call do_reset() at all.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Acked-by: Marian Balakowicz <m8@semihalf.com>
2008-02-29 12:32:50 +01:00
Kumar Gala d2bc095a63 [new uImage] ppc: Re-order ramdisk/fdt handling sequence
Doing the fdt before the ramdisk allows us to grow the fdt w/o concern
however it does mean we have to go in and fixup the initrd info since
we don't know where it will be.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-02-29 12:30:14 +01:00
Kumar Gala 27953493ef [new uImage] ppc: Determine if we are booting an OF style
If we are bootin OF style than we can skip setting up some things
that are used for the old boot method.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Acked-by: Marian Balakowicz <m8@semihalf.com>
2008-02-29 12:30:03 +01:00
Kumar Gala a6612bdfe7 [new uImage] Don't pass kdb to ramdisk_high since we may not have one
We don't actually need the kdb param as we are just using it to get
bd->bi_memsize which we can get from gd->bd->bi_memsize.  Also, if we
boot via OF we might not actually fill out a kdb.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Acked-by: Marian Balakowicz <m8@semihalf.com>
2008-02-29 12:27:21 +01:00
Marian Balakowicz 4efbe9dbb1 [new uImage] Correct raw FDT blob handlig when CONFIG_FIT is disabled
Dual format image code must properly handle all three FDT passing methods:
- raw FDT blob passed
- FDT blob embedded in the legacy uImage
- FDT blob embedded in the new uImage

This patch enables proper raw FDT handling when no FIT imaeg support
is compiled in. This is a bit tricky as we must dected FIT format even
when FIT uImage handling is not enabled as both FIT uImages and raw FDT
blobs use tha same low level format (libfdt).

Signed-off-by: Marian Balakowicz <m8@semihalf.com>
2008-02-27 11:02:26 +01:00
Marian Balakowicz ff0734cff0 [new uImage] POWERPC: Add image_get_fdt() routine
FDT blob may be passed either: (1) raw (2) or embedded in the legacy uImage
(3) or embedded in the new uImage. For the (2) case embedding image must be
verified before we get FDT from it. This patch factors out legacy image
specific verification routine to the separate helper routine.

Signed-off-by: Marian Balakowicz <m8@semihalf.com>
Acked-by: Kumar Gala <galak@kernel.crashing.org>
2008-02-27 11:02:26 +01:00
Marian Balakowicz 8a5ea3e616 [new uImage] Move image verify flag to bootm_headers structure
Do not pass image verification flag directly to related routines.
Simplify argument passing and move it to the bootm_header structure which
contains curently processed image specific data and is already being passed
on the argument list.

Signed-off-by: Marian Balakowicz <m8@semihalf.com>
Acked-by: Kumar Gala <galak@kernel.crashing.org>
2008-02-27 11:01:04 +01:00
Marian Balakowicz 823afe7cef [Makefile] Sort COBJS in lib_<arch> Makefiles
Signed-off-by: Marian Balakowicz <m8@semihalf.com>
2008-02-27 11:00:47 +01:00
Marian Balakowicz d2ced9eb19 [new uImage] POWERPC: Split get_fdt() into get and relocate routines
PPC specific FDT blob handling code is divided into two separate routines:

get_fdt()	- find and verify a FDT blob (either raw or image embedded)
fdt_relocate()	- move FDT blob to within BOOTMAP if needed

Signed-off-by: Marian Balakowicz <m8@semihalf.com>
Acked-by: Kumar Gala <galak@kernel.crashing.org>
2008-02-27 10:59:56 +01:00
Marian Balakowicz d5934ad775 [new uImage] Add dual format uImage support framework
This patch adds framework for dual format images. Format detection is added
and the bootm controll flow is updated to include cases for new FIT format
uImages.

When the legacy (image_header based) format is detected appropriate
legacy specific handling is invoked. For the new (FIT based) format uImages
dual boot framework has a minial support, that will only print out a
corresponding debug messages. Implementation of the FIT specific handling will
be added in following patches.

Signed-off-by: Marian Balakowicz <m8@semihalf.com>
2008-02-25 15:53:49 +01:00
Yuri Tikhonov 2e721094a7 lwmon5: enable hardware watchdog
Some boards (e.g. lwmon5) may use rather small watchdog intervals, so
causing it to reboot the board if U-Boot does a long busy-wait with
udelay(). Thus, for these boards we have to restart WD more
frequently.

This patch splits the busy-wait udelay() into smaller, predefined,
intervals, so that the watchdog timer may be resetted with the
configurable (CONFIG_WD_PERIOD) interval.

Signed-off-by: Yuri Tikhonov <yur@emcraft.com>
2008-02-22 15:54:34 +01:00
Kumar Gala 81d93e5c4b ppc: Allow boards to specify effective amount of memory
For historical reasons we limited the stack to 256M because some boards
could only map that much via BATS.  However newer boards are capable of
mapping more memory (for example 85xx is capable of doing up to 2G).

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-02-22 12:35:53 +01:00
Marian Balakowicz 2242f53698 [new uImage] Rename and move print_image_hdr() routine
Signed-off-by: Marian Balakowicz <m8@semihalf.com>
2008-02-21 17:27:41 +01:00
Marian Balakowicz fff888a199 [new uImage] Add gen_get_image() routine
This routine assures that image (whether legacy or FIT) is not
in a special dataflash storage.

If image address is a dataflash address image is moved to system RAM.

Signed-off-by: Marian Balakowicz <m8@semihalf.com>
2008-02-21 17:20:19 +01:00
Marian Balakowicz 20c9395933 Merge branch 'master' of /home/git/u-boot 2008-02-21 17:18:01 +01:00
Rafal Jaworowski f57d7d364c ppc: Refactor cache routines, so there is only one common set.
Signed-off-by: Rafal Jaworowski <raj@semihalf.com>
2008-02-14 22:00:41 +01:00
Marian Balakowicz 7b325454fd [new uImage] Cleanup FDT handling in PPC do_boot_linux()
Move FDT blob finding and relocation to a dedicated
get_fdt() routine. It increases code readability and
will make adding support for new uImage format easier.

Signed-off-by: Marian Balakowicz <m8@semihalf.com>
2008-02-07 01:13:00 +01:00
Marian Balakowicz b6b0fe6460 [new uImage] Cleanup do_botm_linux() boot allocations
This patch moves common pre-boot allocation steps shared between PPC
and M68K to a helper routines:

common:
- get_boot_sp_limit()
- get_boot_cmline()
- get_boot_kbd()

platform:
- set_clocks_in_mhz()

Signed-off-by: Marian Balakowicz <m8@semihalf.com>
2008-02-07 01:13:00 +01:00
Marian Balakowicz ceaed2b1e5 [new uImage] Move ramdisk loading to a common routine
Ramdisk loading code, including initrd_high variable handling,
was duplicated for PPC and M68K platforms. This patch creates
common helper routine that is being called from both platform
do_bootm_linux() routines.

Signed-off-by: Marian Balakowicz <m8@semihalf.com>
2008-02-07 01:13:00 +01:00
Marian Balakowicz 5ad03eb385 [new uImage] Factor out common image_get_ramdisk() routine
Architecture specific do_bootm_linux() routines share common
ramdisk image processing code. Move this code to a common
helper routine.

Signed-off-by: Marian Balakowicz <m8@semihalf.com>
2008-02-07 01:12:59 +01:00
Marian Balakowicz d3c5eb6dd1 [new uImage] Move FDT error printing to common fdt_error() routine
FDT error handling in PPC do_bootm_linux() shares the same message format.
This patch moves error message printing to a helper fdt_error() routine.

Signed-off-by: Marian Balakowicz <m8@semihalf.com>
Acked-by: Gerald Van Baren <vanbaren@cideas.com>
2008-02-07 01:12:59 +01:00
Marian Balakowicz 4a2ad5ff64 [new uImage] Remove OF_FLAT_TREE support from PPC bootm code
Support for OF_FLAT_TREE is to be obsoleted in the near future,
remove related code from the bootm routines.

Signed-off-by: Marian Balakowicz <m8@semihalf.com>
2008-02-07 01:12:57 +01:00
Marian Balakowicz 4a995edec1 [new uImage] Rename architecture specific bootm code files
Implementation of the do_bootm_linux() and other bootm helper routines is
architecture specific code. As such it resides in lib_<arch> directories
in files named <arch>_linux.c

This patch renames those files to a more clear and accurate
lib_<arch>/bootm.c form.

List of the renamed files:
   lib_arm/armlinux.c -> lib_arm/bootm.c
   lib_avr32/avr32_linux.c -> lib_avr32/bootm.c
   lib_blackfin/bf533_linux.c -> lib_blackfin/bootm.c
   lib_i386/i386_linux.c -> lib_i386/bootm.c
   lib_m68k/m68k_linux.c -> lib_m68k/bootm.c
   lib_microblaze/microblaze_linux.c -> lib_microblaze/bootm.c
   lib_mips/mips_linux.c -> lib_mips/bootm.c
   lib_nios/nios_linux.c -> lib_nios/bootm.c
   lib_nios2/nios_linux.c -> lib_nios2/bootm.c
   lib_ppc/ppc_linux.c -> lib_ppc/bootm.c
   lib_sh/sh_linux.c -> lib_sh/bootm.c

Signed-off-by: Marian Balakowicz <m8@semihalf.com>
2008-02-07 01:12:57 +01:00
Marian Balakowicz 7582438c28 [new uImage] Return error on image move/uncompress overwrites
Check for overwrites during image move/uncompress, return with error
when the original image gets corrupted. Report clear message to the user
and prevent further troubles when pointer to the corrupted images is passed
to do_bootm_linux routine.

Signed-off-by: Marian Balakowicz <m8@semihalf.com>
2008-02-07 01:12:57 +01:00
Marian Balakowicz f13e7b2e99 [new uImage] Cleanup image header pointer use in bootm code
- use single image header pointer instead of a set of auxilliary variables.
- add multi component image helper routines: get component size/data address

Signed-off-by: Marian Balakowicz <m8@semihalf.com>
2008-02-07 01:12:57 +01:00
Marian Balakowicz af13cdbc01 [new uImage] Add memmove_wd() common routine
Move common, watchdog sensible memmove code to a helper memmmove_wd() routine.

Signed-off-by: Marian Balakowicz <m8@semihalf.com>
2008-02-07 01:12:56 +01:00
Marian Balakowicz 958fc48abd [new uImage] Fix FDT header verification in PPC do_boot_linux() routine
Signed-off-by: Marian Balakowicz <m8@semihalf.com>
2008-02-07 01:12:56 +01:00
Marian Balakowicz 559316faf7 [new uImage] Move CHUNKSZ definition to image.h
CHUNKSZ defined for PPC and M68K is set to the same value of 64K,
move this definition to a common header.

Signed-off-by: Marian Balakowicz <m8@semihalf.com>
2008-02-07 01:12:55 +01:00
Marian Balakowicz d45d5a18b6 [new uImage] Cleanup OF/FDT #if/#elif/#endif use in do_bootm_linux()
Make CONFIG_OF_LIBFDT and CONFIG_OF_FLAT_TREE use more
readable in PPC variant of do_bootm_linux() routine.

Signed-off-by: Marian Balakowicz <m8@semihalf.com>
2008-02-07 01:12:55 +01:00
Marian Balakowicz 5d3cc55ecb [new uImage] Move PPC do_bootm_linux() to lib_ppc/ppc_linux.c
PPC implementation of do_bootm_linux() routine is moved to
a dedicated file lib_ppc/ppc_linux.c

Signed-off-by: Marian Balakowicz <m8@semihalf.com>
2008-02-07 01:12:54 +01:00
Wolfgang Denk ed3afca32e Merge branch 'master' of git://www.denx.de/git/u-boot-mpc86xx 2008-01-23 14:18:18 +01:00
Haiying Wang d59feffb42 FSL: Fix common EEPROM_data structure definition
- Fix EEPROM_data structure definition according to System EEPROM Data Format.
- Read MAC addresses from EEPROM to ethXaddr before saving ethXaddr to
  bd->bi_ethaddr.

Signed-off-by: Haiying Wang <Haiying.Wang@freescale.com>
2008-01-17 12:26:56 -06:00