Commit Graph

14967 Commits

Author SHA1 Message Date
Timur Tabi
fbc20aab11 powerpc/85xx: always implement the work-around for Erratum SATA_A001
On the P1022/P1013, the work-around for erratum SATA_A001 was implemented
only if U-Boot initializes SATA, but SATA is not initialized by default.  So
move the work-around to the CPU initialization function, so that it's always
executed on the SOCs that need it.

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2011-11-29 08:48:06 -06:00
Timur Tabi
3e0529f742 powerpc/85xx: CONFIG_FSL_SATA_V2 should be defined in config_mpc85xx.h
Macro CONFIG_FSL_SATA_V2 is defined if the SOC has a V2 Freescale SATA
controller, so it should be defined in config_mpc85xx.h instead of the various
board header files.  So now CONFIG_FSL_SATA_V2 is always defined on the P1013,
P1022, P2041, P3041, P5010, and P5020.  It was already defined for the
P1010 and P1014.

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2011-11-29 08:48:06 -06:00
York Sun
4108508a96 powerpc/85xx: Add workaround for erratum A-003474
Erratum A-003474: Internal DDR calibration circuit is not supported

Impact:
Experience shows no significant benefit to device operation with
auto-calibration enabled versus it disabled. To ensure consistent timing
results, Freescale recommends this feature be disabled in future customer
products. There should be no impact to parts that are already operating
in the field.

Workaround:
Prior to setting DDR_SDRAM_CFG[MEM_EN]=1, do the following:
1. Write a value of 0x0000_0015 to the register at offset
	CCSRBAR + DDR OFFSET + 0xf30
2. Write a value of 0x2400_0000 to the register at offset
	CCSRBAR + DDR OFFSET + 0xf54

Signed-off-by: York Sun <yorksun@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2011-11-29 08:48:06 -06:00
Jia Hongtao
33c875366e powerpc/85xx: fixup flexcan device tree clock-frequency
Make the fixup matchable with dts and kernel.  Update the compatible from
"fsl,flexcan-v1.0" to "fsl,p1010-flexcan" and Change the "clock-freq"
property to "clock-frequency".  We also change flexcan frequency from
CCB-clock to CCB-clock/2 according to P1010 spec.

We now keep the old interfaces to make previous kernel work. They should
be removed in the future.

Signed-off-by: Jia Hongtao <B38951@freescale.com>
Signed-off-by: Li Yang <leoli@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2011-11-29 08:48:05 -06:00
Kumar Gala
43f082bb7f powerpc/85xx: Add workaround for erratum CPU-A003999
Erratum A-003999: Running Floating Point instructions requires special
initialization.

Impact:
Floating point arithmetic operations may result in an incorrect value.

Workaround:
Perform a read modify write to set bit 7 to a 1 in SPR 977 before
executing any floating point arithmetic operation. This bit can be set
when setting MSR[FP], and can be cleared when clearing MSR[FP].
Alternatively, the bit can be set once at boot time, and never cleared.
There will be no performance degradation due to setting this bit.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2011-11-29 08:48:05 -06:00
Wolfgang Denk
d887ad54ca menu.c: use puts() instead of printf() where possible
common/menu.c used printf() in a number of places to print user
provided, constant strings (like the "title" string).  printf() is
dangerous here for example in case the user unwittingly embeds some
'%' caracters that printf() would interpret as formatting and then
pick up random arguments.  Use puts() instead.

We also omit the trailing ':' in the title line - if a user wants
this, he can provide it as part of the title string.

Signed-off-by: Wolfgang Denk <wd@denx.de>
2011-11-29 15:43:42 +01:00
Stefano Babic
34b57d26f0 MAKEALL: drop obsolete mx31pdk_nand target
The mx31pdk can boot only from NAND and the target was
already updated in boards.cfg. mx31pdk_nand is obsolete
and is dropped.

Signed-off-by: Stefano Babic <sbabic@denx.de>
2011-11-29 15:43:41 +01:00
Igor Grinberg
abdbd67cbc dataflash: fix parameters order in write_dataflash()
Fix parameters order in write_dataflash() function extern declaration in
the header file.
Parameters order, as in function definition, should be:
addr_dest, addr_src, size.

Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
2011-11-29 15:43:41 +01:00
Christian Riesch
581a811c3f hawkboard: Replace HAWKBOARD_KICK{0, 1}_UNLOCK defines
This patch replaces the HAWKBOARD_KICK{0,1}_UNLOCK defines by
DV_SYSCFG_KICK{0,1}_UNLOCK.

The kick register values are not hawkboard specific but may be used
for all davinci boards. In commit f3c149d6c6
new defines for these values wer introduced.

Signed-off-by: Christian Riesch <christian.riesch@omicron.at>
Cc: Syed Mohammed Khasim <sm.khasim@gmail.com>
Cc: Sughosh Ganu <urwithsughosh@gmail.com>
Cc: Sandeep Paulraj <s-paulraj@ti.com>
2011-11-29 15:43:40 +01:00
Christian Riesch
eccb213e9d davinci_sonata: define CONFIG_MACH_TYPE for davinci_sonata board
This patch fixes the build breakage for the davinci_sonata board.

Signed-off-by: Christian Riesch <christian.riesch@omicron.at>
Cc: Sergey Kubushyn <ksi@koi8.net>
Cc: Sandeep Paulraj <s-paulraj@ti.com>
2011-11-29 15:43:40 +01:00
Christian Riesch
0647508d44 davinci_schmoogie: define CONFIG_MACH_TYPE for davinci_schmoogie board
This patch fixes the build breakage for the davinci_schmoogie board.

Signed-off-by: Christian Riesch <christian.riesch@omicron.at>
Cc: Sergey Kubushyn <ksi@koi8.net>
Cc: Sandeep Paulraj <s-paulraj@ti.com>
2011-11-29 15:43:39 +01:00
Yan-Pai Chen
9926fa01f4 arm: a320evb: define mach-type in board config file
MACH_TYPE_FARADAY was dropped from mach-types.h. Add it back to
board config file.

Signed-off-by: Yan-Pai Chen <ypchen@faraday-tech.com>
Acked-by: Igor Grinberg <grinberg@compulab.co.il>
2011-11-29 15:43:39 +01:00
Alexander Holler
86623add12 OMAP3: Use sdelay from arch/arm/cpu/armv7/syslib.c instead of cloning that.
There is no need to have such a function twice.

Signed-off-by: Alexander Holler <holler@ahsoftware.de>
Acked-by: Dirk Behme <dirk.behme@googlemail.com>
Signed-off-by: Anatolij Gustschin <agust@denx.de>
2011-11-29 15:43:38 +01:00
Stelian Pop
c9e798d35a Fix Stelian's email address
Change my old email address which is no longer valid.

Signed-off-by: Stelian Pop <stelian@popies.net>
Signed-off-by: Anatolij Gustschin <agust@denx.de>
2011-11-29 15:43:38 +01:00
Jerry Huang
debef5cd9e DIU: 1080P and 720P support
Add the 1920x1080 and 1280x720 resolution support.

Signed-off-by: Jerry Huang <Chang-Ming.Huang@freescale.com>
Acked-by: Timur Tabi <timur@freescale.com>
CC: Anatolij Gustschin <agust@denx.de>
2011-11-29 15:43:36 +01:00
Marek Vasut
5fb1a6f9c1 CFB: Fix font rendering on mx5 framebuffer
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Anatolij Gustschin <agust@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
2011-11-29 15:43:36 +01:00
Gabe Black
22e0f5a9ec x86: Fix some bugs in the i8402 driver when no controller is present
If no controller is present, the i8402 driver should return immediately and
not attempt to operate on the missing hardware.

In kbd_input_empty, the status register is checked every millisecond to see
whether the input buffer is empty, up to a timeout which is tracked by
decrimenting a counter each time the check is performed. The decrement is
performed with a postfix -- operator, and the value of the counter is
checked in place. That means that when the counter reaches zero and the
loop terminates, it will actually be decrimented one more time and become
-1. That value is returned as the return value of the function. That would
give the right answer if it wasn't for that extra decrement because a
timeout would indicate that the buffer never became empty.

This change fixes both of those bugs.

Signed-off-by: Gabe Black <gabeblack@chromium.org>
2011-11-29 21:31:35 +11:00
Gabe Black
dd4a5b2246 x86: Make the i8042 driver checkpatch clean
Signed-off-by: Gabe Black <gabeblack@chromium.org>
2011-11-29 21:31:30 +11:00
Gabe Black
36b2409a3d x86: Wrap small helper functions from libgcc to avoid an ABI mismatch
When gcc compiles some 64 bit operations on a 32 bit machine, it generates
calls to small functions instead of instructions which do the job directly.
Those functions are defined in libgcc and transparently provide whatever
functionality was necessary. Unfortunately, u-boot can be built with a
non-standard ABI when libgcc isn't. More specifically, u-boot uses
-mregparm. When the u-boot and libgcc are linked together, very confusing
bugs can crop up, for instance seemingly normal integer division or modulus
getting the wrong answer or even raising a spurious divide by zero
exception.

This change borrows (steals) a technique and some code from coreboot which
solves this problem by creating wrappers which translate the calling
convention when calling the functions in libgcc. Unfortunately that means
that these instructions which had already been turned into functions have
even more overhead, but more importantly it makes them work properly.

To find all of the functions that needed wrapping, u-boot was compiled
without linking in libgcc. All the symbols the linker complained were
undefined were presumed to be the symbols that are needed from libgcc.
These were a subset of the symbols covered by the coreboot code, so it was
used unmodified.

To prevent symbols which are provided by libgcc but not currently wrapped
(or even known about) from being silently linked against by code generated
by libgcc, a new copy of libgcc is created where all the symbols are
prefixed with __normal_. Without being purposefully wrapped, these symbols
will cause linker errors instead of silently introducing very subtle,
confusing bugs.

Another approach would be to whitelist symbols from libgcc and strip out
all the others. The problem with this approach is that it requires the
white listed symbols to be specified three times, once for objcopy, once so
the linker inserts the wrapped, and once to generate the wrapper itself,
while this implementation needs it to be listed only twice. There isn't
much tangible difference in what each approach produces, so this one was
preferred.

Signed-off-by: Gabe Black <gabeblack@chromium.org>
2011-11-29 21:31:24 +11:00
Gabe Black
dbaef6ef33 x86: Import the glibc memset implementation
The new implementation is about twice as fast as the old. This is from
glibc-2.14, sysdeps/i386/memset.c.

Signed-off-by: Gabe Black <gabeblack@chromium.org>
2011-11-29 21:31:17 +11:00
Gabe Black
60a9b6bfdd x86: Fix a few recently added bugs
Signed-off-by: Gabe Black <gabeblack@chromium.org>
Signed-off-by: Graeme Russ <graeme.russ@gmail.com>
2011-11-29 21:30:51 +11:00
Gabe Black
769db03a4a x86: Don't relocate symbols which point to things that aren't relocated
This change adds an upper bound for symbols which are fixed up after u-boot
is relocated into RAM. This way portions that are left at their original
location can be referred to without having to manually fix up any pointers.

Signed-off-by: Gabe Black <gabeblack@chromium.org>
2011-11-29 21:30:44 +11:00
Gabe Black
03228b26d5 x86: Fix how the location of the realmode and bios blobs are calculated
There are two blobs embedded into the u-boot image which are linked to run
at an address which is different from where they actually end up in the
ROM, one called "realmode" and one called "bios". There are realmode_setup
and bios_setup functions which prepare those blobs by copying them into the
location they're supposed to run from, among other things.

During u-boot relocation from ROM to RAM, the text and a few data segments
are copied over. The realmode and bios sections are not copied, and so the
only place they can be read from is their original location in the ROM.
Looking specifically at the bios blob, there are symbols defined in the
linker script called __bios_start and __bios_size which are defined to be
the start and size of the blob in the ROM.

In the bios_setup function, there seem to be two mistakes happening. First,
the offset from ROM to RAM is being added to __bios_start which implies that
this code expects to use the copy moved to RAM. No such copy is made, so
that's wrong. More subtly, when u-boot relocates itself, it goes through
all of the relocations stored in .rel.dyn and fixes them up. This has the
effect of transforming the __bios_start reference in bios_setup so that it
refers to the version in RAM (if one existed) instead of the one in ROM. To
correct for that, the offset actually needs to be subtracted out again to
translate the address back into the ROM.

The net effect is that for both blobs, a + needs to be changed to a -.

Signed-off-by: Gabe Black <gabeblack@chromium.org>
2011-11-29 21:30:38 +11:00
Graeme Russ
2f0e0cd246 x86: Misc cleanups
Signed-off-by: Graeme Russ <graeme.russ@gmail.com>
2011-11-29 21:10:12 +11:00
Graeme Russ
1cfcf03701 x86: Misc PCI touchups
Signed-off-by: Graeme Russ <graeme.russ@gmail.com>
2011-11-29 21:10:08 +11:00
Graeme Russ
303418cc97 x86: Ensure IDT and GDT remain 16-byte aligned post relocation
Some CPUs have strict alignment requirements for these tables

Signed-off-by: Graeme Russ <graeme.russ@gmail.com>
2011-11-29 21:10:01 +11:00
Graeme Russ
a76fc70ee1 x86: Provide more configuration granularity
Planned future ports requires more granularity for some options

Signed-off-by: Graeme Russ <graeme.russ@gmail.com>
2011-11-29 21:09:52 +11:00
Graeme Russ
a206cc2343 x86: Add multiboot header
By adding a multiboot header, U-Boot can be loaded by GRUB2. Using GRUB2 to
bootstrap U-Boot is useful for using an existing BIOS to get an initial
U-Boot port up and running before implementing the low-level reset vector
code, SDRAM init, etc. and overwriting the BIOS

Signed-off-by: Graeme Russ <graeme.russ@gmail.com>
2011-11-29 21:08:02 +11:00
Graeme Russ
311b1a2b38 sc520: Create arch asm-offsets
Signed-off-by: Graeme Russ <graeme.russ@gmail.com>
2011-11-29 21:07:42 +11:00
Graeme Russ
facc9e7bf4 x86: Punt cold- and warm-boot flags
Nobody uses them anyway

Signed-off-by: Graeme Russ <graeme.russ@gmail.com>
Acked-by: Mike Frysinger <vapier@gentoo.org>
2011-11-29 21:04:06 +11:00
Graeme Russ
63a90bfb7e cosmetic: checkpatch cleanup of board/eNET/*.c
Signed-off-by: Graeme Russ <graeme.russ@gmail.com>
2011-11-29 21:04:00 +11:00
Graeme Russ
83088afbba cosmetic: checkpatch cleanup of arch/x86/lib/*.c
Signed-off-by: Graeme Russ <graeme.russ@gmail.com>
2011-11-29 21:03:43 +11:00
Graeme Russ
01a0f5a1eb cosmetic: checkpatch cleanup of arch/x86/cpu/sc520/*.c
Signed-off-by: Graeme Russ <graeme.russ@gmail.com>
2011-11-29 21:01:26 +11:00
Graeme Russ
717979fdd7 cosmetic: checkpatch cleanup of arch/x86/cpu/*.c
Signed-off-by: Graeme Russ <graeme.russ@gmail.com>
2011-11-29 21:01:21 +11:00
Graeme Russ
6d7404c4c1 x86: Call hang() on unrecoverable exception
Signed-off-by: Graeme Russ <graeme.russ@gmail.com>
2011-11-29 21:01:13 +11:00
Wolfgang Denk
a63d965275 menu.c: use puts() instead of printf() where possible
common/menu.c used printf() in a number of places to print user
provided, constant strings (like the "title" string).  printf() is
dangerous here for example in case the user unwittingly embeds some
'%' caracters that printf() would interpret as formatting and then
pick up random arguments.  Use puts() instead.

We also omit the trailing ':' in the title line - if a user wants
this, he can provide it as part of the title string.

Signed-off-by: Wolfgang Denk <wd@denx.de>
2011-11-28 20:19:41 +01:00
Wolfgang Denk
68435fa151 Merge branch 'agust@denx.de' of git://git.denx.de/u-boot-staging
* 'agust@denx.de' of git://git.denx.de/u-boot-staging:
  MAKEALL: drop obsolete mx31pdk_nand target
  dataflash: fix parameters order in write_dataflash()
  hawkboard: Replace HAWKBOARD_KICK{0, 1}_UNLOCK defines
  davinci_sonata: define CONFIG_MACH_TYPE for davinci_sonata board
  davinci_schmoogie: define CONFIG_MACH_TYPE for davinci_schmoogie board
  arm: a320evb: define mach-type in board config file
  OMAP3: Use sdelay from arch/arm/cpu/armv7/syslib.c instead of cloning that.
  Fix Stelian's email address
2011-11-28 19:57:38 +01:00
Wolfgang Denk
d5251742a7 Merge branch 'master' of git://git.denx.de/u-boot-video
* 'master' of git://git.denx.de/u-boot-video:
  DIU: 1080P and 720P support
  CFB: Fix font rendering on mx5 framebuffer
2011-11-28 19:53:31 +01:00
Stefano Babic
623e03256e MAKEALL: drop obsolete mx31pdk_nand target
The mx31pdk can boot only from NAND and the target was
already updated in boards.cfg. mx31pdk_nand is obsolete
and is dropped.

Signed-off-by: Stefano Babic <sbabic@denx.de>
2011-11-27 23:45:02 +01:00
Igor Grinberg
85be1e21fc dataflash: fix parameters order in write_dataflash()
Fix parameters order in write_dataflash() function extern declaration in
the header file.
Parameters order, as in function definition, should be:
addr_dest, addr_src, size.

Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
2011-11-27 19:46:27 +01:00
Christian Riesch
e722d5d076 hawkboard: Replace HAWKBOARD_KICK{0, 1}_UNLOCK defines
This patch replaces the HAWKBOARD_KICK{0,1}_UNLOCK defines by
DV_SYSCFG_KICK{0,1}_UNLOCK.

The kick register values are not hawkboard specific but may be used
for all davinci boards. In commit f3c149d6c6
new defines for these values wer introduced.

Signed-off-by: Christian Riesch <christian.riesch@omicron.at>
Cc: Syed Mohammed Khasim <sm.khasim@gmail.com>
Cc: Sughosh Ganu <urwithsughosh@gmail.com>
Cc: Sandeep Paulraj <s-paulraj@ti.com>
2011-11-27 19:45:35 +01:00
Christian Riesch
f880fe5794 davinci_sonata: define CONFIG_MACH_TYPE for davinci_sonata board
This patch fixes the build breakage for the davinci_sonata board.

Signed-off-by: Christian Riesch <christian.riesch@omicron.at>
Cc: Sergey Kubushyn <ksi@koi8.net>
Cc: Sandeep Paulraj <s-paulraj@ti.com>
2011-11-27 19:45:27 +01:00
Christian Riesch
ece91e3026 davinci_schmoogie: define CONFIG_MACH_TYPE for davinci_schmoogie board
This patch fixes the build breakage for the davinci_schmoogie board.

Signed-off-by: Christian Riesch <christian.riesch@omicron.at>
Cc: Sergey Kubushyn <ksi@koi8.net>
Cc: Sandeep Paulraj <s-paulraj@ti.com>
2011-11-27 19:45:19 +01:00
Yan-Pai Chen
641483af40 arm: a320evb: define mach-type in board config file
MACH_TYPE_FARADAY was dropped from mach-types.h. Add it back to
board config file.

Signed-off-by: Yan-Pai Chen <ypchen@faraday-tech.com>
Acked-by: Igor Grinberg <grinberg@compulab.co.il>
2011-11-27 19:44:49 +01:00
Alexander Holler
a67fe5f284 OMAP3: Use sdelay from arch/arm/cpu/armv7/syslib.c instead of cloning that.
There is no need to have such a function twice.

Signed-off-by: Alexander Holler <holler@ahsoftware.de>
Acked-by: Dirk Behme <dirk.behme@googlemail.com>
Signed-off-by: Anatolij Gustschin <agust@denx.de>
2011-11-27 19:44:36 +01:00
Stelian Pop
762e63754b Fix Stelian's email address
Change my old email address which is no longer valid.

Signed-off-by: Stelian Pop <stelian@popies.net>
Signed-off-by: Anatolij Gustschin <agust@denx.de>
2011-11-27 19:44:21 +01:00
Wolfgang Denk
99258c3410 Merge branch 'master' of git://git.denx.de/u-boot-mmc
* 'master' of git://git.denx.de/u-boot-mmc:
  Revert "mmc: retry the cmd8 to meet 74 clocks requirement in the spec"
  mmc: mv_sdhci: Fix host version read for Armada100
2011-11-27 16:03:21 +01:00
Stephan Linz
1de55ef105 microblaze: usable uart16550 for big endian systems
As a result of the commit 6833260 the uart16550 driver
is broken for Microblaze big endian systems, because of
the missing 3 byte offset. Other than as described, not
all U-Boot BSP will treat properly the 3 byte offset.

This why prefer to mask out the 3 byte offset in general
and setup correct _REG_SIZE value depending on edianess.

Signed-off-by: Stephan Linz <linz@li-pro.net>
Tested-by: Michal Simek <monstr@monstr.eu>
2011-11-27 15:49:48 +01:00
Michael Jones
94f6142957 mvblx: punt unused clean/distclean targets
Signed-off-by: Michael Jones <michael.jones@matrix-vision.de>
2011-11-27 15:48:33 +01:00
Kumar Gala
068f158fdf cmd_nvedit.c: Fix compiler warning introduced by checkpatch cleanup
cmd_nvedit.c: In function 'do_env_grep':
cmd_nvedit.c:182:3: warning: suggest parentheses around assignment used as truth value

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Acked-by: Mike Frysinger <vapier@gentoo.org>
Acked-by: Igor Grinberg <grinberg@compulab.co.il>
2011-11-27 15:46:10 +01:00