Commit Graph

10310 Commits

Author SHA1 Message Date
Terry Lv 95bc39e848 ARM: fix bug in macro __arch_ioremap.
Signed-off-by: Terry Lv <r65388@freescale.com>

Fix commit message and code formatting.

Signed-off-by: Wolfgang Denk <wd@denx.de>
2010-06-22 22:33:06 +02:00
Vitaly Kuzmichev a71da1b6c9 ARM: Align stack to 8 bytes
The ARM ABI requires that the stack be aligned to 8 bytes as it is noted
in Procedure Call Standard for the ARM Architecture:
http://infocenter.arm.com/help/topic/com.arm.doc.ihi0042d/index.html

Unaligned SP also causes the problem with variable-length arrays
allocation when VLA address becomes less than stack pointer during
aligning of this address, so the next 'push' in the stack overwrites
first 4 bytes of VLA.

Signed-off-by: Vitaly Kuzmichev <vkuzmichev@mvista.com>

Tested on tx25(mx25), imx27lite(mx27), qong(mx31) and trab(s3c2400)
Tested-by: Wolfgang Denk <wd@denx.de>
2010-06-22 22:15:07 +02:00
Vitaly Kuzmichev 1a27f7d9c2 ARM: Align stack to 8 bytes
The ARM ABI requires that the stack be aligned to 8 bytes as it is noted
in Procedure Call Standard for the ARM Architecture:
http://infocenter.arm.com/help/topic/com.arm.doc.ihi0042d/index.html

Unaligned SP also causes the problem with variable-length arrays
allocation when VLA address becomes less than stack pointer during
aligning of this address, so the next 'push' in the stack overwrites
first 4 bytes of VLA.

Signed-off-by: Vitaly Kuzmichev <vkuzmichev@mvista.com>
2010-06-22 21:41:06 +02:00
Wolfgang Denk 96b35730a4 Merge branch 'master' of /home/wd/git/u-boot/custodians 2010-06-22 21:30:05 +02:00
Nick Thompson 77436d6696 Davinci: SPI performance enhancements
The following restructuring and optimisations increase the SPI
read performance from 1.3MiB/s (on da850) to 2.87MiB/s (on da830):

Remove continual revaluation of driver state from the core of the
copy loop. State can not change during the copy loop, so it is
possible to move these evaluations to before the copy loop.

Cost is more code space as loop variants are required for each set
of possible configurations. The loops are simpler however, so the
extra is only 128bytes on da830 with CONFIG_SPI_HALF_DUPLEX
defined.

Unrolling the first copy loop iteration allows the TX buffer to be
pre-loaded reducing SPI clock starvation.

Unrolling the last copy loop iteration removes testing for the
final loop iteration every time round the loop.

Using the RX buffer empty flag as a transfer throttle allows the
assumption that it is always safe to write to the TX buffer, so
polling of TX buffer full flag can be removed.

Signed-off-by: Nick Thompson <nick.thompson@ge.com>
Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
2010-06-22 11:06:01 -04:00
Prakash PM e6441c4f40 DaVinci: EMAC: Get EMAC_MDIO_PHY_NUM from config files
Currently EMAC_MDIO_PHY_NUM is defined as 1 in emac_defs.h.
Because of this, EMAC does not work on EVMs which do not have phy
connected at 1. Moving the macro to board config file makes this
configurable depending on where the phy is connected on the MDIO bus.

This patch fixes the board reset issue observed during network access
on DM365EVM. EMAC driver was assuming EMAC_MDIO_PHY_NUM as 1
but it is 0 on DM365EVM.

This patch is verified on da830/omap-l137, dm365 and dm644x evms.

Signed-off-by: Prakash PM <prakash.pm@ti.com>
Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
2010-06-22 10:24:43 -04:00
Wolfgang Denk 6de27bdc78 net/eth.c: eth_mac_skip() is only needed when CONFIG_NET_MULTI is set
Move it inside the #ifdef CONFIG_NET_MULTI to avoid

	eth.c:64: warning: 'eth_mac_skip' defined but not used

messages from a number of old, non-CONFIG_NET_MULTI boards.

Signed-off-by: Wolfgang Denk <wd@denx.de>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2010-06-20 22:13:18 -07:00
Fillod Stephane e397e59e86 ip/defrag: fix processing of last short fragment
TFTP'ing a file of size 1747851 bytes with CONFIG_IP_DEFRAG and
CONFIG_TFTP_BLOCKSIZE set to 4096 fails with a timeout, because
the last fragment is not taken into account. This patch fixes
IP fragments having less than 8 bytes of payload.

Signed-off-by: Stephane Fillod <stephane.fillod@grassvalley.com>
Acked-by: Alessandro Rubini <rubini@gnudd.com>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2010-06-20 22:11:32 -07:00
Wolfgang Denk 9c00b2f0a3 net/eth.c: eth_mac_skip() is only needed when CONFIG_NET_MULTI is set
Move it inside the #ifdef CONFIG_NET_MULTI to avoid

	eth.c:64: warning: 'eth_mac_skip' defined but not used

messages from anumber of old, non-CONFIG_NET_MULTI boards.

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Ben Warren <biggerbadderben@gmail.com>
2010-06-20 12:30:22 +02:00
Wolfgang Denk 9312bba01a include/compiler.h: remove redundant declaration of errno
Commit 37566090 "compiler.h: unify system ifdef cruft here" added both
a "#include <errno.h>" and a "extern int errno;" to include/compiler.h
which is causing build warnings for some systems, for example for the
"netstar" board:

	In file included from /home/wd/git/u-boot/work/lib/crc32.c:15:
	include/compiler.h:28: warning: function declaration isn't a prototype

The declaration of "errno" should be redundant, as <errno.h> is
supposed to provide a correct declaration, so drop it.

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Mike Frysinger <vapier@gentoo.org>
2010-06-20 02:21:58 +02:00
Wolfgang Denk cd040a4953 arch/arm/cpu/arm_cortexa8/omap3/cache.S: make build with older tools
The push / pop instructions used in this file are available only with
more recent tool chains:

cache.S: Assembler messages:
cache.S:133: Error: bad instruction `push {r0,r1,r2,lr}'
cache.S:160: Error: bad instruction `pop {r1,r2,r3,pc}'
cache.S:164: Error: bad instruction `push {r0,r1,r2,lr}'
cache.S:191: Error: bad instruction `pop {r1,r2,r3,pc}'

Change push/pop into stmfd/ldmfd instructions to support older
versions of binutils as well.

I verified that the modified source code generates exactly the same
binary code.

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Sandeep Paulraj <s-paulraj@ti.com>
Cc: Tom Rix <tom@bumblecow.com>
2010-06-18 16:01:07 +02:00
Wolfgang Denk 54e19a7ded Merge branch 'master' into next
Conflicts:
	Makefile

Signed-off-by: Wolfgang Denk <wd@denx.de>
2010-06-18 01:20:49 +02:00
Anatolij Gustschin 86caca1cd9 ppc4xx: icon: add support for SM502 chip
Adds initialization code for SM502 graphics controller
and NL6448BC20-21D LCD panel.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Cc: Stefan Roese <sr@denx.de>
2010-06-17 23:12:15 +02:00
Wolfgang Denk ec6baf53f7 Merge branch 'next' of git://git.denx.de/u-boot-video into next 2010-06-17 22:53:03 +02:00
Wolfgang Denk bc33f8c810 Merge branch 'next' of git://git.denx.de/u-boot-pxa into next 2010-06-17 22:39:03 +02:00
Wolfgang Denk 1f241263e0 Merge branch 'fix' of git://git.denx.de/u-boot-pxa 2010-06-17 22:31:04 +02:00
Wolfgang Denk cecda170e7 Merge branch 'master' of git://git.denx.de/u-boot-marvell 2010-06-17 22:22:06 +02:00
Wolfgang Denk 530135dcac Merge branch 'master' of git://git.denx.de/u-boot-ti
Conflicts:
	CONFLICT (rename/add): Rename
	board/davinci/da830evm/Makefile->board/ti/tnetv107xevm/Makefile
	in 89b765c7f6.
	board/ti/tnetv107xevm/Makefile added in HEAD
But files were identical, so no problem.

Signed-off-by: Wolfgang Denk <wd@denx.de>
2010-06-17 21:59:57 +02:00
Wolfgang Denk 399b09331f Merge branch 'master' of git://git.denx.de/u-boot-arm 2010-06-17 21:06:16 +02:00
Albert Aribaud ce9c227cc7 Add support for the LaCie ED Mini V2 board
This patch adds support for the LaCie ED Mini V2 product
which is based on the Marvell Orion5x SoC.

Signed-off-by: Albert Aribaud <albert.aribaud@free.fr>
2010-06-17 19:38:21 +05:30
Albert Aribaud 83142c112d Add Orion5x support to 16550 device driver
This patch provides access to the 16550-compatible
serial device of the Orion5x SoC.

Signed-off-by: Albert Aribaud <albert.aribaud@free.fr>
2010-06-17 19:37:01 +05:30
Albert Aribaud 0c61e6f925 Initial support for Marvell Orion5x SoC
This patch adds support for the Marvell Orion5x SoC.
It has no use alone, and must be followed by a patch
to add Orion5x support for serial, then support for
the ED Mini V2, an Orion5x-based product from LaCie.

Signed-off-by: Albert Aribaud <albert.aribaud@free.fr>
2010-06-17 19:36:07 +05:30
Minkyu Kang 376e7fadba SAMSUNG: goni: add the GPL licence
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Tom <Tom@bumblecow.com>
2010-06-14 18:15:20 -05:00
Minkyu Kang c474a8ebb8 s5pc1xx: Add support for Samsung Goni board
This patch adds support for the Samsung Goni board (S5PC110 SoC)

Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
2010-06-14 18:15:20 -05:00
Minkyu Kang ffb4b02554 s5pc1xx: gpio: bug fix at gpio_set_pull function
When set to PULL_NONE, gpio_set_pull function is returned without write the register.
This patch fixed it.

Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2010-06-14 18:15:20 -05:00
Anatolij Gustschin f0a921518b video: sm501.c: add weak default functions
For boards using sm501/sm502 on PCI bus some driver
functions normaly defined in the board code are not
needed and empty. Provide weak default functions for
them and do not enforce board code to define empty
functions.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
2010-06-14 12:29:34 +02:00
Anatolij Gustschin e2bee9e3c0 video: sm501: add support for SM501 chips on PCI bus
Signed-off-by: Anatolij Gustschin <agust@denx.de>
2010-06-14 12:29:26 +02:00
Anatolij Gustschin 1054382007 video: cfb_console: add weak default video_set_lut()
Do not enforce drivers to provide empty video_set_lut()
if they do not implement indexed color (8 bpp) frame
buffer support. Add default function to the cfb_console
driver and remove empty video_set_lut() functions.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
2010-06-14 12:28:28 +02:00
Wolfgang Denk a6862bc123 Makefile/mkconfig: read simple board configurations from boards.cfg
Instead of adding explicit build rules for each and every board to the
top level Makefile (which makes it grow and grow), we now provide a
simple default rule and extend the "mkconfig" script to read board
configurations from a plain text file (table), "boards.cfg".

For simple boards it is now sufficient to add a single line of text to
the "boards.cfg" file, no changes to the top level Makefile are needed
any more.

To make the table better readable, change the notation for unused
fields from "NULL" into "-".

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Peter Tyser <ptyser@xes-inc.com>
Cc: Mike Frysinger <vapier@gentoo.org>
2010-06-13 18:08:22 +02:00
Wolfgang Denk 8c994630b9 Makefile: simplify handling of common board configurations
Many boards don't need any special handling in the Makefile. Try and
provide as generic make rules for these as possible.  There are still
many areas where this does not work out really well, but the changes
show the direction we should take, and point out which boards or
architectures need further cleanup.

Signed-off-by: Wolfgang Denk <wd@denx.de>
2010-06-13 18:08:20 +02:00
Wolfgang Denk ed7a196cd5 Makefile: simplify handling of build target names
Instead of stripping the "_config" part from the make target names in
each call of the "mkconfig" script let this script strip the string.

This prepares the ground for forther simplification of the top level
Makefile.

Signed-off-by: Wolfgang Denk <wd@denx.de>
2010-06-13 18:08:18 +02:00
Wolfgang Denk 0e42ada310 Fix printing of make targets, simplify Makefile
Make printing the "board names" more useful. So far, we would get
output like this;

$ ./MAKEALL P2020RDB P2020RDB_NAND P2020RDB_SDCARD P2020RDB_SPIFLASH
Configuring for P1_P2_RDB board...
   text    data     bss     dec     hex filename
 342612   32656  265212  640480   9c5e0 /work/wd/tmp-ppc/u-boot
Configuring for P1_P2_RDB board...
   text    data     bss     dec     hex filename
 343160   32704  265212  641076   9c834 /work/wd/tmp-ppc/u-boot
Configuring for P1_P2_RDB board...
   text    data     bss     dec     hex filename
 341908   32620  265212  639740   9c2fc /work/wd/tmp-ppc/u-boot
Configuring for P1_P2_RDB board...
   text    data     bss     dec     hex filename
 341908   32620  265212  639740   9c2fc /work/wd/tmp-ppc/u-boot

For all build targets the same board name would be printed, which
makes is often pretty difficult to find out which exact build target
caused problems. With this commit, the real make target name gets
printed instead, which is way more useful:

$ ./MAKEALL P2020RDB P2020RDB_NAND P2020RDB_SDCARD P2020RDB_SPIFLASH
Configuring for P2020RDB board...
   text    data     bss     dec     hex filename
 342612   32656  265212  640480   9c5e0 /work/wd/tmp-ppc/u-boot
Configuring for P2020RDB_NAND board...
   text    data     bss     dec     hex filename
 343160   32704  265212  641076   9c834 /work/wd/tmp-ppc/u-boot
Configuring for P2020RDB_SDCARD board...
   text    data     bss     dec     hex filename
 341908   32620  265212  639740   9c2fc /work/wd/tmp-ppc/u-boot
Configuring for P2020RDB_SPIFLASH board...
   text    data     bss     dec     hex filename
 341908   32620  265212  639740   9c2fc /work/wd/tmp-ppc/u-boot

Signed-off-by: Wolfgang Denk <wd@denx.de>
Acked-by: Detlev Zundel <dzu@denx.de>
Tested-by: Thomas Chou <thomas@wytron.com.tw>
2010-06-13 18:07:25 +02:00
Wolfgang Denk a9046b9e1a Prepare v2010-rc2
Signed-off-by: Wolfgang Denk <wd@denx.de>
2010-06-13 17:48:15 +02:00
Marek Vasut bb596e84eb PXA: Add missing MDREFR bits
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
2010-06-13 13:39:11 +02:00
Marek Vasut 52dc45e5a3 PXA: Add UP2OCR register bit definitions
This register is used on PXA to control the USB Port2 operation (USB Port2 is
the host port).

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
2010-06-13 13:39:11 +02:00
Marek Vasut 43c15d3dd5 PXA: PXAMMC: Add Monahans support
This patch enables PXAMCI support on PXA3xx CPUs. This patch only enables MMC1
though, MMC2 and PXA31x MMC3 will need further patch to be operational.

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
2010-06-13 13:39:11 +02:00
Marek Vasut 55429a0323 PXA: PXAMMC: Drop different delays for PXA27X
In case the delays were set to 10000, the MMC card on PXA27X boards (and PXA3xx
boards) didn't initialize on first try. Increasing the delays and leaving just
those for PXA25x and 26x (that is 200000) fixes this problem.

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
2010-06-13 13:39:11 +02:00
Marek Vasut 3a96ad851f PXA: Align stack to 8 bytes
Part of this patch is by: Mikhail Kshevetskiy.

Stack must be aligned to 8 bytes on PXA (possibly all armv5te) for LDRD/STRD
instructions. In case LDRD/STRD is issued on an unaligned address, the behaviour
is undefined.

The issue was observed when working with the NAND code, which was rendered
disfunctional. Also, the vsprintf() function had serious problems with printing
64bit wide long longs. After aligning the stack, this wrong behaviour is no
longer present.

Tested on:
	Marvell Littleton PXA310 board
	Toradex Colibri PXA320 board
	Aeronix Zipit Z2 PXA270 handheld
	Voipac PXA270 board

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
2010-06-13 13:39:02 +02:00
Sudhakar Rajashekhara 89b765c7f6 TI: DaVinci: Add board specific code for da850 EVM
Provides initial support for TI OMAP-L138/DA850 SoC devices on
a Logic PD EVM board.

Provides:
Initial boot and configuration.
Support for i2c.
UART support (console).

Signed-off-by: Sudhakar Rajashekhara <sudhakar.raj@ti.com>
Acked-by: Ben Gardiner <bengardiner@nanometrics.ca>
Reviewed-by: Wolfgang Denk <wd@denx.de>
Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
2010-06-10 12:04:42 -04:00
Sudhakar Rajashekhara 158557001a TI: DaVinci: Prepare for da850 support
DA850/OMAP-L138 is a new SoC from Texas Instruments
(http://focus.ti.com/docs/prod/folders/print/omap-l138.html).
This SoC is similar to DA830/OMAP-L137 in many aspects. Hence
rename the da830 specific files and folders to da8xx to
accommodate DA850/OMAP-L138.

Signed-off-by: Sudhakar Rajashekhara <sudhakar.raj@ti.com>
Acked-by: Ben Gardiner <bengardiner@nanometrics.ca>
Reviewed-by: Wolfgang Denk <wd@denx.de>
Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
2010-06-10 12:04:37 -04:00
Sudhakar Rajashekhara 9d79956029 da830: Move common code out of da830evm.c file
TI's DA850/OMAP-L138 platform is similar to DA830/OMAP-L137
in many aspects. So instead of repeating the same code in
multiple files, move the common code to a different file
and call those functions from the respective da830/da850
files.

Signed-off-by: Sudhakar Rajashekhara <sudhakar.raj@ti.com>
Acked-by: Nick Thompson <nick.thompson@ge.com>
Acked-by: Ben Gardiner <bengardiner@nanometrics.ca>
Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
2010-06-10 12:04:32 -04:00
Grazvydas Ignotas 5246d01edd OMAP3: pandora: enable battery backup capacitor
Pandora has a capacitor connected as backup battery, which allows
retaining RTC for some time while main battery is removed. Enable backup
battery charge function to charge that capacitor.

Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
2010-06-08 17:19:22 -04:00
Delio Brignoli 9268236529 DaVinci: Improve DaVinci SPI speed.
I have updated this patch based on the comments [1] by Wolfgang Denk and
removed unused variables.
[1][http://lists.denx.de/pipermail/u-boot/2010-May/071728.html]

Reduce the number of reads per byte transferred on the BUF register from 2 to 1 and
take advantage of the TX buffer in the SPI module. On LogicPD OMAP-L138 EVM,
SPI read throughput goes up from ~0.8Mbyte/s to ~1.3Mbyte/s. Tested with a 2Mbyte image file.
Remove unused variables in the spi_xfer() function.

Signed-off-by: Delio Brignoli <dbrignoli@audioscience.com>
Tested-by: Ben Gardiner <bengardiner@nanometrics.ca>
Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
2010-06-08 10:07:19 -05:00
Vaibhav Hiremath 1a5038ca68 AM35x: Add support for EMIF4
This patch adds support for the EMIF4 interface
available in the AM35x processors.

Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
Signed-off-by: Sanjeev Premi <premi@ti.com>
Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
2010-06-08 10:07:19 -05:00
Vaibhav Hiremath ed01e45cfa AM35x: Add support for AM3517EVM
This patch adds basic support for the AM3517EVM.
It includes:
	- Board files (.c and .h)
	- Default configuration file
	- Updates for Makefile

Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
Signed-off-by: Sanjeev Premi <premi@ti.com>
Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
2010-06-08 10:07:18 -05:00
Vaibhav Hiremath cae377b59a omap3: Consolidate SDRC related operations
Consolidated SDRC related functions into one file - sdrc.c

And also replaced sdrc_init with generic memory init
function (mem_init), this generalization of omap memory setup
is necessary to support the new emif4 interface introduced in AM3517.

Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
2010-06-08 10:07:18 -05:00
Vaibhav Hiremath d11212e377 omap3: Calculate CS1 size only when SDRC is
initialized for CS1

From: Vaibhav Hiremath <hvaibhav@ti.com>

The patch makes sure that size for SDRC CS1 gets calculated
only when the CS1 SDRC is initialized.

Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
2010-06-08 10:07:18 -05:00
Vaibhav Hiremath 675e0eaf0f OMAP3EVM: Added NAND support
The EVMS have been shipping with NAND (instead of OneNAND) as default.
So, this patch sets NAND as default.

To choose OneNAND, define CMD_ONENAND instead of CMD_NAND in the
config file omap3_evm.h.

Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
2010-06-08 10:07:18 -05:00
Cyril Chemparathy 5cc48f7e55 TI: TNETV107X EVM initial support
TNETV107X is a Texas Instruments SoC based on an ARM1176 core, and with a
bunch on on-chip integrated peripherals.  This patch adds support for the
TNETV107X EVM board.

Signed-off-by: Cyril Chemparathy <cyril@ti.com>
Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
2010-06-08 10:07:17 -05:00
Cyril Chemparathy 3712367c48 ARM1176: TI: TNETV107X soc initial support
TNETV107X is a Texas Instruments SoC based on an ARM1176 core, and with a
bunch on on-chip integrated peripherals.  This is an initial commit with
basic functionality, more commits with drivers, etc. to follow.

Signed-off-by: Cyril Chemparathy <cyril@ti.com>
Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
2010-06-08 10:07:17 -05:00