Commit Graph

5150 Commits

Author SHA1 Message Date
Matthias Fuchs c63ad6325a cfi-flash: Add CFG_FLASH_AUTOPROTECT_LIST
This patch adds a configurable flash auto protection list that can be used
to make U-Boot protect flash regions in flash_init().

The idea has been discussed on the u-boot mailing list starting
on Nov 18th, 2007.

Even this patch brings a new feature it is used as a bugfix for 4xx
platforms where flash_init() does not completely protect the
monitor's flash range in all situations.

U-Boot protects the flash range from CFG_MONITOR_BASE to
(CFG_MONITOR_BASE + monitor_flash_len  - 1) by default. This does not
include the reset vector at 0xfffffffc.

Example:
#define CFG_FLASH_AUTOPROTECT_LIST {{0xfff80000, 0x80000}}

This config option will auto protect the last 512k of flash that
contains the bootloader on board like APC405 and PMC405.

Signed-off-by: Matthias Fuchs <matthias.fuchs@esd-electronics.com>
2008-04-25 15:52:14 +02:00
Stefan Roese d0d91ae3ac ppc4xx: Remove double defines in lwmon5.h
introduced with latest lwmon5/POST merge

Signed-off-by: Stefan Roese <sr@denx.de>
2008-04-25 14:06:15 +02:00
Bartlomiej Sieka 7590378fb9 Use watchdog-aware functions when calculating hashes of images - take two
Some files didn't get updated properly with the "Use watchdog-aware
functions when calculating hashes of images" commit, this commit
fixes this.

Signed-off-by: Bartlomiej Sieka <tur@semihalf.com>
Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-04-25 14:05:21 +02:00
Matthias Fuchs 8e048c438e ppc4xx: Add bootcount limit handling for APC405 boards
Signed-off-by: Matthias Fuchs <matthias.fuchs@esd-electronics.com>
2008-04-25 13:37:14 +02:00
Bartlomiej Sieka 1de6b28be5 Use watchdog-aware functions when calculating hashes of images
Signed-off-by: Bartlomiej Sieka <tur@semihalf.com>
2008-04-25 13:10:29 +02:00
Wolfgang Denk d00ce09040 USB: fix more GCC 4.2.x aliasing warnings
Signed-off-by: Wolfgang Denk <wd@denx.de>
Acked-by: Markus Klotzbuecher <mk@denx.de>
2008-04-25 12:44:08 +02:00
Wolfgang Denk aff4f86448 lib_generic/crc32.c: add missing #include <watchdog.h>
Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-04-25 12:41:53 +02:00
Wolfgang Denk 03ccdbcd56 lib_generic/crc32.c: fix compile problem
Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-04-25 11:52:21 +02:00
Stefan Roese 24bfedbd0b ppc4xx: Pass PCIe root-complex/endpoint configuration to Linux via the fdt
The PCIe root-complex/endpoint setup as configured via the "pcie_mode"
environment variable will now get passed to the Linux kernel by setting
the device_type property of the PCIe device tree node. For normal root-
complex configuration it will keep its defaults value of "pci" and for
endpoint configuration it will get changed to "pci-endpoint".

Signed-off-by: Stefan Roese <sr@denx.de>
2008-04-25 11:44:47 +02:00
Yuri Tikhonov eb0615bf60 lwmon5: watchdog POST fix
Use the GPT0_MASKx registers as the temporary storage for watch-dog
timer POST test instead of GPT0_COMPx. The latter
(GPT0_COMP1..GPT0_COMP5) are used for the log-buffer header.

Signed-off-by: Sergei Poselenov <sposelenov@emcraft.com>
Signed-off-by: Yuri Tikhonov <yur@emcraft.com>
2008-04-25 11:35:32 +02:00
Wolfgang Denk 4b7a6dd896 Merge branch 'master' of /home/wd/git/u-boot/lwmon5
Conflicts:

	common/cmd_bootm.c
	common/cmd_log.c
	include/common.h
	post/board/lwmon5/Makefile
	post/board/lwmon5/dsp.c
	post/board/lwmon5/dspic.c
	post/board/lwmon5/fpga.c
	post/board/lwmon5/gdc.c
	post/board/lwmon5/sysmon.c
	post/board/lwmon5/watchdog.c

Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-04-25 11:32:01 +02:00
Wolfgang Denk 926662762e Merge branch 'master' of git://www.denx.de/git/u-boot-nand-flash 2008-04-25 11:10:17 +02:00
Wolfgang Denk 04a5b03d86 Merge branch 'master' of git://www.denx.de/git/u-boot-at91 2008-04-25 10:05:42 +02:00
Kim Phillips 78e4882988 lib_ppc: Revert "Make MPC83xx one step closer to full relocation."
This reverts commit 70431e8a73 which has
proven problematic getting right from the start at least on 83xx and
4xx.

Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
2008-04-25 00:13:12 +02:00
Detlev Zundel a99715b8eb Realining some header definitions.
Signed-off-by: Detlev Zundel <dzu@denx.de>
2008-04-25 00:09:53 +02:00
Jean-Christophe PLAGNIOL-VILLARD 4acbc6c7f9 NE2000: coding style cleanup
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-04-25 00:08:32 +02:00
Jean-Christophe PLAGNIOL-VILLARD b4aff1ffaf qemu-mips.h: Add CFI support
CONFIG_ENV_OVERWRITE is also added.

This patch is originally created by Jean-Christophe PLAGNIOL-VILLARD.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Shinya Kuribayashi <skuribay@ruby.dti.ne.jp>
2008-04-25 00:05:09 +02:00
Shinya Kuribayashi 4a1f11b45a doc/README.mips: Add MIPS notes
Signed-off-by: Shinya Kuribayashi <skuribay@ruby.dti.ne.jp>
2008-04-25 00:03:53 +02:00
Bartlomiej Sieka 215b01bba8 Add support for calculating hashes with watchdog triggering
Implement watchodg-aware variants of hash calculation functions:
- crc32_wd()
- md5_wd()
- sha1_csum_wd()
The above functions calculate the hash of the input buffer in chunks,
triggering the watchdog after processing each chunk. The chunk size
is given as a function call parameter.

Signed-off-by: Bartlomiej Sieka <tur@semihalf.com>
2008-04-25 00:01:06 +02:00
Shinya Kuribayashi 8875e3abab qemu-mips: Cleanup whitespace, indentation, etc.
No functional change.

This patch was originally submitted by Jean-Christophe PLAGNIOL-VILLARD.
Then I re-created from scratch, and changed more lines than the original.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Shinya Kuribayashi <skuribay@ruby.dti.ne.jp>
2008-04-24 23:54:06 +02:00
Vlad Lungu 386563197e Fixed pcnet io_base
Bus and phys address are not always the same

Signed-off-by: Vlad Lungu <vlad@comsys.ro>
2008-04-24 23:49:00 +02:00
Wolfgang Denk 11ea26fd1c drivers/net/pcnet.c: Coding Style cleanup.
Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-04-24 23:44:26 +02:00
Vlad Lungu 899ef7b845 Added Am79C970A chip id to pcnet
Signed-off-by: Vlad Lungu <vlad@comsys.ro>
2008-04-24 23:43:10 +02:00
Magnus Lilja 17c9de6bb3 i.MX31: Fix architecture numbers for ADS and Litekit boards
Correct the Linux architecture number for i.MX31 Litekit and ADS boards.

Signed-off-by: Magnus Lilja <lilja.magnus@gmail.com>
2008-04-24 23:37:57 +02:00
Magnus Lilja e7ae84d6c7 i.MX31: Use symbolic names for Litekit membases.
Use symbolic names instead of hard coded addresses for Litekit membases.

Signed-off-by: Magnus Lilja <lilja.magnus@gmail.com>
2008-04-24 23:35:23 +02:00
Jean-Christophe PLAGNIOL-VILLARD 2ef1d9b603 Fix show_boot_progress prototype
in commit fad634071 "make show_boot_progress () weak."
show_boot_progress is supposed to be declared as weak but declared as
inline instead.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-04-24 23:22:52 +02:00
Bartlomiej Sieka edbed247a1 Memory footprint optimizations
As suggested by Wolfgang Denk:
- image printing functions:
  - remove wrappers
  - remove indentation prefix from functions' signatures
- merge getenv_verify and getenv_autostart into one parametrized function

Signed-off-by: Bartlomiej Sieka <tur@semihalf.com>
2008-04-24 17:21:55 +02:00
Guennadi Liakhovetski 0a0b606faa MX31ADS environment variable update, spi and rtc support
Update MX31ADS default environment to better match the flash layout and
the memory map, support SPI and RTC.

Signed-off-by: Guennadi Liakhovetski <lg@denx.de>
2008-04-24 17:06:39 +02:00
Kumar Gala 022f121635 85xx: Round up frequency calculations to get reasonable output
eg. because of rounding error we can get 799Mhz instead of 800Mhz.

Introduced DIV_ROUND_UP and roundup taken from linux kernel.

Signed-off-by: Dejan Minic <minic@freescale.com>
Signed-off-by: Srikanth Srinivasan <srikanth.srinivasan@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Acked-by: Andy Fleming <afleming@freescale.com>
2008-04-24 15:42:35 +02:00
Wolfgang Denk 0aa88c8266 Merge branch 'master' of git://www.denx.de/git/u-boot-mpc85xx 2008-04-24 15:28:05 +02:00
Kumar Gala 876b8f9789 fsl_pci: Only modify registers if we have them
pme_msg_det exists only on PCIe controllers only set it if we are a "bridge".

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-04-24 14:20:12 +02:00
Wolfgang Denk be32bf20bc Merge branch 'master' of git://www.denx.de/git/u-boot-video 2008-04-24 14:00:54 +02:00
Markus Klotzbücher 83fe323343 USB: remove a cpu bug workaround for an unsupported architecture.
Signed-off-by: Markus Klotzbuecher <mk@denx.de>
2008-04-24 13:34:35 +02:00
Markus Klotzbücher f957576cb5 USB: fix those pesky aliasing warnings issued by gcc-4.2
Signed-off-by: Markus Klotzbuecher <mk@denx.de>
Signed-off-by: Detlev Zundel <dzu@denx.de>
2008-04-24 13:30:56 +02:00
Mike Frysinger 89cdab788f crc32: use uint32_t rather than unsigned long
The envcrc.c does sizeof(unsigned long) when calculating the crc, but
this is done with the build toolchain instead of the target tool
chain, so if the build is a 64bit system but the target is 32bits,
the size will obviously be wrong. This converts all unsigned long
stuff related to crc32 to uint32_t types. Compile tested only: output
of ./tools/envcrc when run on a 32bit build system matches that of a
64bit build system.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-04-24 13:18:17 +02:00
Dirk Behme 80c40b765b ARM: Davinci: Fix DM644x timer overflow handling and cleanup
Fix ARM based DaVinci DM644x timer overflow handling and cleanup timer code.

Changes:

- Remove *_masked() functions as noted by Wolfgang

- Adapt register naming to recent TI spec (sprue26, March 2007)

- Fix reset_timer() handling

- As reported by Pieter [1] the overflow fix introduced a delay of factor 16 (e.g 2 seconds became 32). While the overflow fix is basically okay, it missed to divide udelay by 16, too. Fix this.

[1] http://article.gmane.org/gmane.comp.boot-loaders.u-boot/38179

- Remove software division of timer count value (DIV(x) macro) and do it in hardware (TIM_CLK_DIV).

Many thanks to Troy Kisky <troy.kisky@boundarydevices.com> and Pieter Voorthuijsen <pieter.voorthuijsen@Prodrive.nl> for the hints & testing!

Patch is compile tested with davinci_dvevm & sonata & schmoogie configuration and tested by Pieter on DaVinci EVM hardware.

Signed-off-by: Dirk Behme <dirk.behme@gmail.com>
Acked-by: Pieter Voorthuijsen <pieter.voorthuijsen@Prodrive.nl>
2008-04-22 23:12:01 +02:00
Wolfgang Denk 58c5376ba6 Merge branch 'master' of git://www.denx.de/git/u-boot-ppc4xx 2008-04-22 17:21:24 +02:00
Sergei Poselenov a6e6fc610e Added watchdog triggering calls in the "mtest" test function.
Signed-off-by: Sergei Poselenov <sposelenov@emcraft.com>
2008-04-22 15:21:37 +02:00
Yuri Tikhonov d32a874b9b lwmon5 watchdog: limit trigger rate
Limit the rate of h/w watch-dog triggering on the LWMON5 board by
the CONFIG_WD_MAX_RATE value.

Note that an earlier version of this patch which used microseconds
instead of ticks dis not work. The problem was that we used
usec2ticks() to convert microseconds into ticks. usec2ticks() uses
get_tbclk(), which in turn calls get_sys_info(). It turns out that
this function does a lot of prolonged operations (like divisions)
which take too much time so we do not trigger the watchdog in time,
and it resets the system.

Signed-off-by: Yuri Tikhonov <yur@emcraft.com>
2008-04-22 15:21:15 +02:00
Yuri Tikhonov 2d2b994a30 POST: move CONFIG_POST to Makefiles
Introduce the new logical option CONFIG_HAS_POST which is set when the
platform has CONFIG_POST set. Use CONFIG_HAS_POST in the post/ Makefiles
to determine should the POST libs be compiled for the selected target
platform, or not.

To avoid breaking u-boot linking process, the empty post/libpost.a file is
created for platforms which do not have POSTs.

Signed-off-by: Yuri Tikhonov <yur@emcraft.com>
Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-04-22 14:40:19 +02:00
Yuri Tikhonov 0a51e9248e POST: preparations for moving CONFIG_POST to Makefiles
Remove CONFIG_POST ifdefs from the post/ source files.

Signed-off-by: Yuri Tikhonov <yur@emcraft.com>
Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-04-22 14:38:38 +02:00
Stefan Roese 5d40d4430d ppc4xx: Fix Canyonlands and Glacier default environment for fdt usage
This patch fixes the Canyonlands and Glacier default environment to better
fit to the arch/powerpc device-tree kernels. The variables dealing with
arch/ppc booting are removed, since these boards are supported only in
arch/powerpc. Glacier uses the same config file as Canyonlands.

Also, the Glacier now uses non-FPU rootpath, since 460GT has no FPU.

Signed-off-by: Stefan Roese <sr@denx.de>
2008-04-22 14:14:20 +02:00
Stefan Roese b789cb4a4c ppc4xx: Small coding style cleanup for the latest esd patches
Signed-off-by: Stefan Roese <sr@denx.de>
2008-04-22 14:06:42 +02:00
Matthias Fuchs 79941d63bc ppc4xx: Update CPU strapping for PMC440 boards
This patch removes the temporary 'test' strapping option
of the sbe command. The '667' strapping option now uses
a PLB/PCI divider of 3.

Signed-off-by: Matthias Fuchs <matthias.fuchs@esd-electronics.com>
2008-04-22 13:48:54 +02:00
Matthias Fuchs f00cf3193a ppc4xx: Remove unused APC405 strataflash driver
The APC405 board support has been migrated to use the common
CFI flash driver.

Signed-off-by: Matthias Fuchs <matthias.fuchs@esd-electronics.com>
2008-04-22 13:48:32 +02:00
Matthias Fuchs 1c686676a8 ppc4xx: Update APC405 configuration
- enable esd's auto_update mechanism
- support alternative flash layout on rev. 1.8 boards
- update default environment
- use common CFI flash driver
- coding style cleanup

Signed-off-by: Matthias Fuchs <matthias.fuchs@esd-electronics.com>
2008-04-22 13:48:20 +02:00
Matthias Fuchs 0b9872515a ppc4xx: Update APC405 board support
- enable esd's auto_update mechanism
- fix LCD support on latest hardware revision (uses other LCD controller)
- support alternative flash layout on rev. 1.8 boards
- coding style cleanup

Signed-off-by: Matthias Fuchs <matthias.fuchs@esd-electronics.com>
2008-04-22 13:48:04 +02:00
Matthias Fuchs 83975d02e2 ppc4xx: update esd's common auto_update code for 405 boards
- Coding style cleanup (long lines)
- improve handling of protected flash regions
- remove dead code

Signed-off-by: Matthias Fuchs <matthias.fuchs@esd-electronics.com>
2008-04-22 13:47:49 +02:00
Matthias Fuchs b9233fe5d5 ppc4xx: Update esd's common LCD code for 405 boards
- Coding style cleanup (long lines)
- Add s1d13505 support
- Make some functions return a result code instead of void

Signed-off-by: Matthias Fuchs <matthias.fuchs@esd-electronics.com>
2008-04-22 13:47:37 +02:00
Matthias Fuchs dea6818942 ppc4xx: Update FPGA image for APC405 boards
Signed-off-by: Matthias Fuchs <matthias.fuchs@esd-electronics.com>
2008-04-22 13:45:51 +02:00