Commit Graph

8969 Commits

Author SHA1 Message Date
Stefan Roese
c85b583970 ppc4xx: Yosemite/Yellowstone: Check and reconfigure the PCI sync clock
This patch now uses the 440EP(x)/GR(x) function to check and dynamically
reconfigure the PCI sync clock.

Signed-off-by: Stefan Roese <sr@denx.de>
2009-10-23 16:05:02 +02:00
Stefan Roese
23c51a2d63 ppc4xx: Sequoia/Rainer: Check and reconfigure the PCI sync clock
This patch now uses the 440EP(x)/GR(x) function to check and dynamically
reconfigure the PCI sync clock.

Signed-off-by: Stefan Roese <sr@denx.de>
2009-10-23 16:04:54 +02:00
Stefan Roese
08c6a26284 ppc4xx: Print PCI synchronous clock frequency upon bootup
Some 4xx variants (e.g. 440EP(x)/GR(x)) have an internal
synchronous PCI clock. Knowledge about the currently configured
value might be helpful. So let's print it out upon bootup.

Signed-off-by: Stefan Roese <sr@denx.de>
2009-10-23 16:04:45 +02:00
Stefan Roese
5e47f9535f ppc4xx: Add function to check and dynamically change PCI sync clock
PPC440EP(x)/PPC440GR(x):
In asynchronous PCI mode, the synchronous PCI clock must meet
certain requirements. The following equation describes the
relationship that must be maintained between the asynchronous PCI
clock and synchronous PCI clock. Select an appropriate PCI:PLB
ratio to maintain the relationship:

AsyncPCIClk - 1MHz <= SyncPCIclock <= (2 * AsyncPCIClk) - 1MHz

This patch now adds a function to check and reconfigure the sync
PCI clock to meet this requirement. This is in preparation for
some AMCC boards (Sequoia/Rainier and Yosemite/Yellowstone) using this
function to not violate the PCI clocking rules.

Signed-off-by: Stefan Roese <sr@denx.de>
2009-10-23 16:04:36 +02:00
Stefan Roese
92b8964bed ppc4xx: Update flash size in reg property of the NOR flash node
Till now only the ranges in the ebc node are updated with the values
currently configured in the PPC4xx EBC controller. With this patch now
the NOR flash size is updated in the device tree blob as well. This is
done by scanning the compatible nodes "cfi-flash" and "jedec-flash"
for the correct chip select number.

This size fixup is enabled for all AMCC eval board right now. Other
4xx boards may want to enable it as well, if this problem with multiple
NOR FLASH sizes exists.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Wolfgang Denk <wd@denx.de>
2009-10-23 15:56:32 +02:00
Stefan Roese
30d45c0d3e fdt: Add fdt_fixup_nor_flash_size() to fixup NOR FLASH size in dtb
This function can be used to update the size in the "reg" property
of the NOR FLASH device nodes. This is necessary for boards with
non-fixed NOR FLASH sizes.

Signed-off-by: Stefan Roese <sr@denx.de>
Acked-by: Gerald Van Baren <vanbaren@cideas.com>
Acked-by: Wolfgang Denk <wd@denx.de>
2009-10-23 15:55:23 +02:00
Wolfgang Denk
76706cb86b cpu/ppc4xx/fdt.c: avoid strcpy() to constant string
strcpy() was iused with the target address being a pointer to a
constant string, which potentially is read-only. Use a (writable)
array of characters instead.

Signed-off-by: Wolfgang Denk <wd@denx.de>
Signed-off-by: Stefan Roese <sr@denx.de>
2009-10-23 15:50:22 +02:00
Mike Frysinger
f67066b6b0 envcrc: check return value of fwrite()
Newer toolchains will often complain about unchecked fwrite():
	envcrc.c:117: warning: ignoring return value of `fwrite´, declared
		with attribute warn_unused_result

So check the return value to silence the warnings.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-10-19 10:36:31 +02:00
Wolfgang Denk
efd988ebaa mcc200: fix build error
Fix compile error:
include/configs/mcc200.h:401:6: error: #elif with no expression

Signed-off-by: Wolfgang Denk <wd@denx.de>
2009-10-19 09:18:57 +02:00
Alessandro Rubini
8c0a92c8f4 lcd: remove '#if 0' 32-bit scroll, now memcpy does it
Signed-off-by: Alessandro Rubini <rubini@unipv.it>
Acked-by: Andrea Gallo <andrea.gallo@stericsson.com>
2009-10-18 23:10:43 +02:00
Alessandro Rubini
e3ea948d45 lib_generic memset: fill one word at a time if possible
If the destination is aligned, fill ulong values until possible.
Then fill remaining part by byte.

Signed-off-by: Alessandro Rubini <rubini@unipv.it>
Acked-by: Andrea Gallo <andrea.gallo@stericsson.com>
Acked-by: Mike Frysinger <vapier@gentoo.org>
2009-10-18 23:10:40 +02:00
Alessandro Rubini
ecd830b863 lib_generic memcpy: copy one word at a time if possible
If source and destination are aligned, this copies ulong values
until possible, trailing part is copied by byte. Thanks for the details
to Wolfgang Denk, Mike Frysinger, Peter Tyser, Chris Moore.

Signed-off-by: Alessandro Rubini <rubini@unipv.it>
Acked-by: Andrea Gallo <andrea.gallo@stericsson.com>
Acked-by: Mike Frysinger <vapier@gentoo.org>
2009-10-18 23:10:37 +02:00
Alessandro Rubini
9c5586aa19 setenv: do console redirection even if previously unset
If "stdout" is not previously set, doing "setenv stdout lcd" had no
effect, since console redirection only worked if the environment
variable was already set; the second time you run setenv it worked.
Most default environments lack stdin/out/err definitions, so I'm sure
I'm not alone with this problem.

This patch simply moves a block of code out of a conditional, to do
the same work even if the variable was previously unset.

Signed-off-by: Alessandro Rubini <rubini@unipv.it>
Acked-by: Andrea Gallo <andrea.gallo@stericsson.com>
2009-10-18 23:07:03 +02:00
Martha Stan
c9ee39972a mpc512x: fix System Clock Control constants for USB1 & USB2
Signer-off-by: Martha Stan <mmarx@silicontkx.com>
2009-10-18 23:04:05 +02:00
Paul Gortmaker
87b22b7787 mem_mtest: fix error reporting, allow escape with ^C
The basic memtest function tries to watch for ^C after each
pattern pass as an escape mechanism, but if things are horribly
wrong, we'll be stuck in an inner loop flooding the console with
error messages and never check for ^C.  To make matters worse,
if the user waits for all the error messages to complete, we
then incorrectly report the test passed without errors.

Adding a check for ^C after any error is printed will give
the end user an escape mechanism from a console flood without
slowing down the overall test speed on a slow processor.

Also, the more extensive memtest quit after just a single error,
which is inconsistent with the normal memtest, and not useful if
if you are doing dynamic environmental impact testing, such as
heating/cooling etc.

Both tests now track the error count and report it properly
at test completion.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Acked-by: Mike Frysinger <vapier@gentoo.org>
2009-10-18 22:57:06 +02:00
Mike Frysinger
9f4a420663 new default shortcut to config & build a board
The majority of the time that I build things in U-Boot, I want to just
build for the board.  I don't make board config tweaks after selecting the
board.  So add a new pattern rule that allows people to combine two steps
in one go:
	`make foo_config && make` => `make foo`

This shouldn't conflict with any existing make rules as the pattern rule
is used only the rule doesn't already exist.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-10-18 22:56:06 +02:00
Mike Frysinger
6dab6add2d env: only build env_embedded and envcrc when needed
The env code is protected by the ENV_IS_EMBEDDED define, so attempting to
compile the code when this isn't defined is pointless.  Now that the env
headers have unified around CONFIG_ENV_IS_EMBEDDED, convert the build
system to only build the env objects when this is enabled.  And now that
the env code is conditionally compiled, we can drop the source code checks.

For people who want to extract the environment manually, add a new option
CONFIG_BUILD_ENVCRC that only enables the envcrc utility.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-10-18 22:53:18 +02:00
Daniel Mack
78f4ca7976 part_dos: check status flags of partitions
Only read partitions which have 0x00 or 0x80 set in their status field.
All others are invalid.

Signed-off-by: Daniel Mack <daniel@caiaq.de>
2009-10-18 22:50:21 +02:00
Eric Millbrandt
45def0ab9d galaxy5200: change cs1 configuration
Correct the chip select configuration for the nand flash chip select.

Signed-off-by: Eric Millbrandt <emillbrandt@dekaresearch.com>
2009-10-18 22:46:31 +02:00
Niklaus Giger
7936b51165 Cleanup: use constant
Signed-off-by: Niklaus Giger <niklaus.giger@netstal.com>
2009-10-18 22:41:33 +02:00
Anton Vorontsov
91525c6715 mpc85xx: Fix booting on various boards
commit 0e870980a6 ("8xxx: Removed
CONFIG_NUM_CPUS from 85xx/86xx") breaks U-Boot on various boards,
namely the ones that call get_sys_info() from board_early_init_f().

get_sys_info() calls cpu_numcores(), which depends on probecpu()
being called before. But probecpu() is called after board_early_init_f(),
and so cpu_numcores() returns random values, which in turn crashes
get_sys_info().

To fix the issue we place probecpu() before board_early_init_f()
in an initialization sequence.

Booting on the following boards should be revived now:
 mpc8540ads
 mpc8541cds
 mpc8548cds
 mpc8555cds
 mpc8560ads
 mpc8568mds
 mpc8569mds
 and maybe more.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2009-10-16 10:21:56 -05:00
Paul Gortmaker
26df6aa991 mpc86xx: delete unused MPC86xx_DDR_SDRAM_CLK_CNTL define
This is an orphaned legacy leftover that is just polluting
the config file namespace.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2009-10-16 10:21:39 -05:00
Dipen Dudhat
fad15096e3 ppc/P1_P2_RDB: On-chip BootROM support
On Chip BootROM support for P1 and P2 series RDB platforms.

This patch is derived from latest On Chip BootROM support on MPC8536DS

Signed-off-by: Dipen Dudhat <dipen.dudhat@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2009-10-16 10:21:39 -05:00
Dipen Dudhat
f7780ec977 ppc/P1_P2_RDB: NAND Boot Support
NAND Boot support for P1 and P2 series RDB platforms.

This patch is derived from NAND Boot support on MPC8536DS.

Signed-off-by: Dipen Dudhat <dipen.dudhat@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2009-10-16 10:21:39 -05:00
Paul Gortmaker
d11823ca3c mpc8xxx: improve LAW error messages when setting up DDR
When setting up the LAWs for the DDR, if there was an error,
you got the not-so-helpful error text "ERROR" and nothing
else.  Not only is it non-informative, but it is also
pretty frustrating trying to grep for "ERROR" in the source.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2009-10-16 10:21:39 -05:00
Paul Gortmaker
a9946e3fc7 sbc8641d: fix LAW so board doesn't hang on DDR init
All versions between now and since this commit:

  commit bd76729bcb
  MPC86xx: set CONFIG_MAX_MEM_MAPPED to 2G by default

will fail to allow the SBC8641D to get past DDR init, because the
LAW config was overlapping.  Eventually this board will do SPD
EEPROM config, but for now this gets the board working again.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2009-10-16 10:21:39 -05:00
Wolfgang Denk
9efe379a0e Merge branch 'master' of git://git.denx.de/u-boot-blackfin 2009-10-15 22:13:37 +02:00
Mike Frysinger
d087d19a99 Blackfin: drop MAC display at boot
The default Blackfin boot would display the MAC address for the first NIC,
but this relies on the environment.  The current net multi stack no longer
writes the default hardware settings to the environment, so most of the
time the display shows all zeros.  This can be pretty confusing and really
doesn't add anything useful, so just drop it.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-10-13 22:00:29 -04:00
Mike Frysinger
1f003cf473 Blackfin: reset watchdog in udelay()
All arches apparently should reset the watchdog in their udelay loop as
noted on the mailing list recently:

  > A comment in flash_status_check() suggests that udelay() is
  > expected to reset the watchdog, but I can't find any architecture
  > where it does.

  If this is missing in other architectures, it should be fixed at the
  root cause, i. e. in udelay() or in the respective support routines.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-10-13 21:48:52 -04:00
Mike Frysinger
370ec73455 Blackfin: Remove relocation fixups
Blackfin pieces like commit 0630535e2d.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-10-13 21:48:52 -04:00
Daniel Gorsulowski
a380279b2a at91: Update MEESC board support
This patch implements several updates:
-disable CONFIG_ENV_OVERWRITE
-add new hardware style variants and set the arch numbers appropriate
-pass the serial# and hardware revision to the kernel
-removed unused macros from include/configs/meesc.h
-fixed multiline comment style

Signed-off-by: Daniel Gorsulowski <Daniel.Gorsulowski@esd.eu>
2009-10-13 06:17:38 -05:00
Simon Kagstrom
9df20ce211 arm: Correct build with CONFIG_SYS_HUSH_PARSER set
FLAG_PARSE_SEMICOLON is not defined without hush.h, so include that.

Signed-off-by: Simon Kagstrom <simon.kagstrom@netinsight.net>
Signed-off-by: Prafulla Wadaskar <prafulla@marvell.com>
2009-10-13 06:17:38 -05:00
Olof Johansson
df3826262c TI: OMAP3: Overo Tobi ethernet support
Add setup for ethernet on Tobi, allowing kernel/ramdisk to be loaded
over tftp.

This also refactors the smc911x driver to allow for detecting when the
chip is missing. I.e. the detect_chip() function is called earlier and
will abort gracefully when the Chip ID read returns all 1's.

Signed-off-by: Olof Johansson <olof@lixom.net>
Acked-by: Dirk Behme <dirk.behme@googlemail.com>
Acked-by: Ben Warren <biggerbadderben@gmail.com>
2009-10-13 06:17:38 -05:00
Olof Johansson
2a6cc97b91 SMC911X: Add chip auto detection
Refactor the smc911x driver to allow for detecting when the chip is missing.
I.e. the detect_chip() function is called earlier and will abort gracefully
when the Chip ID read returns all 1's.

Signed-off-by: Olof Johansson <olof@lixom.net>
Acked-by: Dirk Behme <dirk.behme@googlemail.com>
Acked-by: Ben Warren <biggerbadderben@gmail.com>
2009-10-13 06:17:37 -05:00
Tom Rix
0297ec7e2a TI OMAP3 Use arm init sequence to initialize i2c
This changes fixes an early i2c error.

It appears that I2C is working because once a read or write
error is detected, the omap24xx_i2c driver calls i2c_init
inside its error handling check.

While it is ok to attempt error handling this way, the boards
must not depend on this side effect to initialize it's i2c.

Instead of explicitly calling i2c_init for every board, use
the generic arm initialization in lib_arm/board.c. By defining
the config variable CONFIG_HARD_I2C, the omap3 i2c initialization
is included in the init_sequence table.

Run tested on Beagle.
Compile tested on the omap3's

Signed-off-by: Tom Rix <Tom.Rix@windriver.com>
Acked-by: Dirk Behme <dirk.behme@googlemail.com>
2009-10-13 06:17:37 -05:00
Sandeep Paulraj
4df30f3bb7 TI: DaVinci DM365: Enabling network Support on DM365 EVM
This patch enables EMAC on the DM365 EVM.

Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
Acked-by: Tom Rix <Tom.Rix@windriver.com>
2009-10-13 06:17:37 -05:00
Sandeep Paulraj
00e1665a3c TI: DaVinci: GPIO header file and definitions
Some DaVinci SOC's use GPIOs to enable EMAC and DM9000.
This patch adds some definitions for GPIO registers and also adds
structures for GPIO.
A separate header file is being added so that in future we
can have a DaVinci GPIO driver similer to OMAP.

Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
Acked-by: Tom Rix <Tom.Rix@windriver.com>
2009-10-13 06:17:37 -05:00
Sandeep Paulraj
95ae803afb TI: DaVinci DM646x: Update flag used to represent DM646x SOC's
In the DaVinci specific code, we use both CONFIG_SOC_DM646X and
CONFIG_SOC_DM646x to represent DM646x specific code.
This patch changes occurrences of CONFIG_SOC_DM646x to
CONFIG_SOC_DM646X. This is because for DM644x series of SOCs we use
the flag CONFIG_SOC_DM644X. We want some uniformity.

Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
Acked-by: Tom Rix <Tom.Rix@windriver.com>
2009-10-13 06:17:37 -05:00
Olof Johansson
fc9165fdb3 OMAP3: Clean up whitespace in mux configs
Switch from space-based indentation to tab-based in mux configs, as pointed
out by WD at:

http://lists.denx.de/pipermail/u-boot/2009-September/061241.html

Nothing but whitespace changes in this patch (diff -w gives no output).

Signed-off-by: Olof Johansson <olof@lixom.net>
2009-10-13 06:17:36 -05:00
Dirk Behme
9de0212bd7 OMAP3 MMC: Fix warning dereferencing type-punned pointer
Fix warning
Dereferencing type-punned pointer will break strict-aliasing rules

Signed-off-by: Dirk Behme <dirk.behme@googlemail.com>
CC: Steve Sakoman <sakoman@gmail.com>
Acked-by: Tom Rix <Tom.Rix@windriver.com>
2009-10-13 06:17:36 -05:00
Simon Kagstrom
e92daeb5c2 Support for the OpenRD base board
The implementation is borrowed from the sheevaplug board and the Marvell
1.1.4 code. Unsupported (or untested) is the SD card, PCIe and SATA.

Signed-off-by: Simon Kagstrom <simon.kagstrom@netinsight.net>
2009-10-13 06:17:36 -05:00
Prafulla Wadaskar
a62e78fc44 Kirkwood: mv88f6281gtw_ge: Add kwbimage build support
This patch adds kwbimage configuration file
(used by mkimage utility)
to support u-boot.kwb target on mv88f6281gtw_ge board.

To create Kirkwood boot image to be flashed on SPI Flash,
additional parameter u-boot.kwb need to be passed during make.

Signed-off-by: Prafulla Wadaskar <prafulla@marvell.com>
2009-10-13 06:17:36 -05:00
Prafulla Wadaskar
5bc7cbc15b Kirkwood: rd6281a: Add kwbimage build support
This patch adds kwbimage configuration file
(used by mkimage utility)
to support u-boot.kwb target on rd6281a platform.

To create Kirkwood boot image to be flashed on NAND,
additional parameter u-boot.kwb need to be passed during make.

Signed-off-by: Prafulla Wadaskar <prafulla@marvell.com>
2009-10-13 06:17:36 -05:00
Tom Rix
23b80982a0 Add support for Eukrea CPU9260/CPU9G20 SBC
these boards are built around Atmel's AT91SAM9260/9G20 and have
up to 64MB of NOR flash, up to 128MB of SDRAM, up to 2GB of NAND
and include a 10/100 Ethernet PHY in RMII mode.

Signed-off-by: Eric Benard <eric@eukrea.com>
Signed-off-by: Tom Rix <Tom.Rix@windriver.com>
2009-10-13 06:17:35 -05:00
Tom Rix
d8380c9d35 Add support for Eukrea CPUAT91 SBC
CPUAT91 is built around Atmel's AT91RM9200 and has up to 16MB of NOR
flash, up to 128MB of SDRAM, and includes a Micrel KS8721 PHY in RMII
mode.

Signed-off-by: Eric Benard <eric@eukrea.com>
Signed-off-by: Tom Rix <Tom.Rix@windriver.com>
2009-10-13 06:17:35 -05:00
Sandeep Paulraj
eb95aa15e6 TI: DaVinci DM365: Minor config cleanup
The DM365 config was using the 'CONFIG_CMD_SAVEENV' flag.
This is already included when we include the
config_cmd_default.h header file. So this flag is removed.
Also another flag to enable NAND functions was being
enabled incorrectly.

Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
2009-10-13 06:17:35 -05:00
Sandeep Paulraj
5d783c1ffd TI DaVinci DM365: Removing header file which does not exist
The DaVinci DM365 EVM board specific code was including a header file
which does not exist. So removing this header file.

Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
2009-10-13 06:17:35 -05:00
Sandeep Paulraj
409ec37bd8 TI DaVinci: DM355: Config Cleanup and Update
This patch does the following
1) Enables the NAND driver which is now available.
2) Enables the 'CONFIG_MTD_DEVICE' as without this the
compilation will fail
3) We now have a safe place to store environment and defines
an offset where this can be stored. This offset value is such that it is after
the location where U-Boot is flashed using TI flash utilities.
4) Enables Bootdelay
5) Increases malloc() arena size. Manufacturers are coming out with
NAND with large blocks sizes of upto 1 MiB. It has been noticed that
as the block size of the NAND used is increased, if this particular
value is not increased, the NAND driver will output out of memory
errors.

Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
2009-10-13 06:17:34 -05:00
Sandeep Paulraj
7908c97a10 TI DaVinci: DM646x: Initial Support for DM646x SOC
DM646x is an SOC from TI which has both an ARM and a DSP.
There are multiple variants of the SOC mainly dealing with different
core speeds.
This patch adds the initial framework for the DM646x SOC.

Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
2009-10-13 06:17:34 -05:00
Sandeep Paulraj
5d0f53624c TI DaVinci: DM6446: Fix Compilation error in NAND mode
The Default mode that is built for the Davinci DVEVM happens
to be the NOR mode.
When we want to build for the NAND mode, we get a compilation
error. This is overcome by defining the CONFIG_MTD_DEVICE
flag in the NAND mode.
The image built for NAND mode was successfully tested on the
DaVinci DM6446 EVM.

Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
2009-10-13 06:17:33 -05:00