Commit Graph

1478 Commits

Author SHA1 Message Date
Stefan Roese d318d0c44d UBI: Fix build problem noticed on Apollon (arm/testing repo)
This patch fixes a build problem noticed on Apollon by using
mtd_dev_by_eb() instead of "/" as done in the Linux UBI version.
So this brings the U-Boot UBI version more in sync with the Linux
version again.

Signed-off-by: Stefan Roese <sr@denx.de>
2009-07-07 16:33:44 +02:00
Prafulla Wadaskar 2efee52b09 sf: Macronix additional chips supported
new chips supported:-
MX25L1605D, MX25L3205D, MX25L6405D, MX25L12855E
out of which MX25L6405D and MX25L12855E tested on Kirkwood platforms

Modified the Macronix flash support to use 2 bytes of device id instead of 1
This was required to support MX25L12855E

Signed-off-by: Piyush Shah <spiyush@marvell.com>
Signed-off-by: Prafulla Wadaskar <prafulla@marvell.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-07-06 18:46:20 -04:00
Mike Frysinger dd54126715 sf: sst: add sst25vf###b ids
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-07-06 18:46:20 -04:00
Mike Frysinger 7d907f0ea9 sf: sst: fix sector size
Looks like when I was encoding the sector sizes, I forgot to divide by 8
(due to the stupid marketing driven process that declares all sizes in
useless megabits and not megabytes).

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-07-06 18:46:20 -04:00
Prafulla Wadaskar 0b785ddd60 net: merge bugfix: Marvell Kirkwood gigabit ethernet driver
This patch looks okay on u-boot-net.git/next branch
but when it was merged to u-boot.git/master the last line is missing

Signed-off-by: Prafulla Wadaskar <prafulla@marvell.com>
Acked-by: Ben Warren <biggerbadderben@gmail.com>
2009-07-06 21:52:53 +02:00
Thomas Lange d583ef5147 ARM DaVinci: EMIF settings
NAND module should not modify EMIF registers unrelated to CS2
that is used for NAND, i.e. do not modify EWAIT config register
or registers for other Chip Selects.

Without this patch, EMIF configurations made in board_init()
will be invalidated.

Signed-off-by: Thomas Lange <thomas@corelatus.se>
2009-07-06 21:52:23 +02:00
Prafulla Wadaskar 4efb77d41f arm: Kirkwood: Basic SOCs support
Kirkwood family controllers are highly integrated SOCs
based on Feroceon-88FR131/Sheeva-88SV131/arm926ejs cpu core.

SOC versions supported:-
1) 88F6281-A0       define CONFIG_KW88F6281_A0
2) 88F6192-A0       define CONFIG_KW88F6192_A0

Other supported features:-
1) get_random_hex() fucntion
2) PCI Express port initialization
3) NS16550 driver support

Contributors:
Yotam Admon <yotam@marvell.com>
Michael Blostein <michaelbl@marvell.com

Reviewed-by: Ronen Shitrit <rshitrit@marvell.com>
Acked-by: Stefan Rose <sr@denx.de>
Signed-off-by: Prafulla Wadaskar <prafulla@marvell.com>
2009-07-06 21:52:17 +02:00
Peter Tyser e94e460c6e 83xx: Add support for fsl_dma driver
Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
Reviewed-by: Ira W. Snyder <iws@ovro.caltech.edu>
Tested-by: Ira W. Snyder <iws@ovro.caltech.edu>
Acked-by: Kim Phillips <kim.phillips@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2009-07-02 11:15:57 -05:00
Peter Tyser 6af015b86b fsl_dma: Make DMA transactions snoopable
Make DMA transactions snoopable so that CPUs can keep caches up-to-date.
This allows dma transactions to be used for operations such as memory
copies without any additional cache control operations.

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2009-07-01 23:12:05 -05:00
Peter Tyser 0d595f76bc fsl_dma: Break out common memory initialization function
Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2009-07-01 23:12:01 -05:00
Peter Tyser 7892f619d4 8xxx: Rename dma_xfer() to dmacpy()
Also update dmacpy()'s argument order to match memcpy's and use
phys_addr_t/phy_size_t for address/size arguments

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2009-07-01 23:07:47 -05:00
Peter Tyser 484919cf33 fsl_dma: Fix Channel Start bug in dma_check()
The Channel Start (CS) bit in the Mode Register (MR) should actually be
cleared as the comment in the code suggests.  Previously, CS was being
set, not cleared.

Assuming normal operation of the DMA engine, this change shouldn't have
any real affect.

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2009-07-01 23:07:45 -05:00
Peter Tyser 51402ac12b fsl_dma: Add support for arbitrarily large transfers
Support DMA transfers larger than the DMA controller's limit of
(2 ^ 26 - 1) bytes

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2009-07-01 23:07:43 -05:00
Peter Tyser a730393a36 fsl_dma: Use proper I/O access functions
Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2009-07-01 23:02:24 -05:00
Peter Tyser 9c06071a60 fsl_dma: Add bitfield definitions for common registers
Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2009-07-01 23:01:55 -05:00
Peter Tyser 017f11f68e 8xxx: Break out DMA code to a common file
DMA support is now enabled via the CONFIG_FSL_DMA define instead of the
previous CONFIG_DDR_ECC

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2009-07-01 23:01:51 -05:00
Mark Jackson 6bbced6717 Atmel LCD driver GUARDTIME fix
This patch allows the guard time parameter to be set in
the Atmel LCDC driver.

By default, the previous value of 1 is used, unless the
setting is defined elsewhere.

Signed-off-by: Mark Jackson <mpfj@mimc.co.uk>
2009-06-30 16:22:35 +02:00
Peter Meerwald 98ab14e858 Blackfin: TWI/I2C: fix pure writes
If doing a pure write with register address and data (not a read/write
combo transfer), we don't set the initial transfer length properly which
ends up causing only the register address to be transferred.

While we're here, fix the i2c_write() parameter description of the buffer.

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-06-30 08:27:45 +02:00
Prafulla Wadaskar 5710de4580 spi: Add Marvell Kirkwood SPI driver
This patch adds a SPI driver for the Marvell Kirkwood SoC's.

Signed-off-by: Prafulla Wadaskar <prafulla@marvell.com>
2009-06-26 00:59:09 +02:00
Ilya Yanok 47d19da4d3 serial_mx31: allow it to work with mx27 too and rename to serial_mxc
UART hardware on i.MX27 is the same as on the i.MX31 so we just
need to provide the driver with correct address of the registers.

Signed-off-by: Ilya Yanok <yanok@emcraft.com>
2009-06-21 16:18:13 +02:00
Remy Bohmer 60f61e6d76 Convert DM9000 driver for CONFIG_NET_MULTI
All drivers need to be converted to CONFIG_NET_MULTI.
This patch converts the dm9000 driver.

Signed-off-by: Thomas Smits <ts.smits@gmail.com>
Signed-off-by: Remy Bohmer <linux@bohmer.net>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2009-06-15 00:13:55 -07:00
Prafulla Wadaskar 9131589ada net: Add Marvell Kirkwood gigabit ethernet driver
This patch adds a egiga driver for the Marvell Kirkwood SoC's.

Contributors:
Yotam Admon <yotam@marvell.com>
Michael Blostein <michaelbl@marvell.com

Reviewed-by: Ronen Shitrit <rshitrit@marvell.com>
Acked-by: Stefan Rose <sr@denx.de>
Signed-off-by: Prafulla Wadaskar <prafulla@marvell.com>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2009-06-15 00:13:55 -07:00
Richard Retanubun 44578bea14 Subject: [PATCH] [repost] Standardize the use of MCFFEC_TOUT_LOOP as a udelay(1) loop counter.
From 584b5fbd4abfc43f920cc1c329633e03816e28be Mon Sep 17 00:00:00 2001
From: Richard Retanubun <RichardRetanubun@RuggedCom.com>
Date: Wed, 20 May 2009 18:26:01 -0400
Subject: [PATCH] Standardize the use of MCFFEC_TOUT_LOOP as a udelay(1) loop counter.

Signed-off-by: Richard Retanubun <RichardRetanubun@RuggedCom.com>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2009-06-15 00:13:55 -07:00
Ben Warren 6e0d2fc7fe Remove support for non-CONFIG_NET_MULTI on PPC4xx EMAC
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2009-06-15 00:13:54 -07:00
Ben Warren 8453587ef9 Switched davinci_emac Ethernet driver to use newer API
Added CONFIG_NET_MULTI to all Davinci boards
Removed all calls to Davinci network driver from board code
Added cpu_eth_init() to cpu/arm926ejs/cpu.c

Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2009-06-15 00:13:54 -07:00
Ben Warren 8cc13c13f1 Initial cleanup of Davinci Ethernet driver
Removed pointless #ifdefs
 Moved functions around in file in preparation for switch to newer API

Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2009-06-15 00:13:54 -07:00
Ben Warren 09cdd1b9b0 Moved Davinci Ethernet driver to drivers/net
This driver has been renamed davinci_emac.c

Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2009-06-15 00:13:54 -07:00
Prafulla Wadaskar 6f51deb7f2 Marvell MV88E61XX Switch Driver support
Chips supported:-
1. 88E6161 6 port gbe swtich with 5 integrated PHYs
2. 88E6165 6 port gbe swtich with 5 integrated PHYs
2. 88E6132 3 port gbe swtich with 2 integrated PHYs
Platform specific configuration supported for:-
default or router port vlan configuration
led_init configuration
mdip/n polarity reversal configuration

Note: This driver is supported and tested against
kirkwood egiga interface

Contributors:
Yotam Admon <yotam@marvell.com>
Michael Blostein <michaelbl@marvell.com

Reviewed by: Ronen Shitrit <rshitrit@marvell.com>
Signed-off-by: Prafulla Wadaskar <prafulla@marvell.com>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2009-06-15 00:13:54 -07:00
Zach LeRoy 091dc9f6ad tsec: Add support for BCM5482S PHY
Signed-off-by: Zach LeRoy <zleroy@xes-inc.com>
Acked-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2009-06-15 00:13:54 -07:00
Grzegorz Bernacki 6325b7780d mpc52xx: Add SPI driver.
Signed-off-by: Grzegorz Bernacki <gjb@semihalf.com>
2009-06-14 23:01:38 +02:00
Wolfgang Denk 92afd368bb Merge branch 'next' of ../master 2009-06-14 22:05:42 +02:00
Wolfgang Denk c3147c1762 Revert "SMC911x driver fixed for NFS boot"
This reverts commit ca9c8a1e10,
which causes compile warnings ("large integer implicitly truncated
to unsigned type") on all systems that use this driver. The warning
results from passing long constants (TX_CFG, RX_CFG) into
smc911x_set_mac_csr() which is declared to accept "unsigned
character" arguments only.

Being close to a release, with nobody available to actually test the
code or the suggested fixes, it seems better to revert the patch.
2009-06-14 20:31:36 +02:00
Haiying Wang e8efef7c1b drivers/qe: add sgmii support in for UEC driver
Signed-off-by: Haiying Wang <Haiying.Wang@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2009-06-12 17:17:02 -05:00
Haiying Wang 8e55258f14 qe: Pass in uec_info struct through uec_initialize
The uec driver contains code to hard code configuration information for the uec
ethernet controllers. This patch creates an array of uec_info structures, which
are then parsed by the corresponding driver instance to determine configuration.
It also creates function uec_standard_init() to initialize all UEC interfaces
for 83xx and 85xx.

Signed-off-by: Haiying Wang <Haiying.Wang@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2009-06-12 17:17:02 -05:00
Haiying Wang 4e7b25e4fe drivers/qe: Add more SNUM number for QE
Some QE chips like 8569 need more SNUM numbers for supporting 4 UECs in RGMII-
1000 mode.

Signed-off-by: Haiying Wang <Haiying.Wang@freescale.com>
Acked-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2009-06-12 17:17:00 -05:00
Haiying Wang 7211fbfa18 drivers/qe: Change QE RISC ALLOCATION to support 4 RISCs
Also define the QE_RISC_ALLOCATION_RISCs to MACROs instead of using enum, and
define MAX_QE_RISC for QE based silicons.

Signed-off-by: Haiying Wang <Haiying.Wang@freescale.com>
Acked-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2009-06-12 17:16:59 -05:00
Haiying Wang 52d6ad5ecf drivers/qe: Rename the camel-case identifiers in uec
Rename riscRx/riscTx to risc_rx/risc_tx to comply with Codingstyle.

Signed-off-by: Haiying Wang <Haiying.Wang@freescale.com>
2009-06-12 17:16:25 -05:00
Stefan Roese 35f2edbb6c nand/mpc512x: Add MPC512x NAND support (NFC)
This patch adds NAND Flash Controller driver for MPC5121 revision 2.
All device features, except hardware ECC and power management, are
supported.

This NFC driver replaces the one orignally posted by John Rigby:

"[PATCH] Freescale NFC NAND driver"

It's a port of the Linux driver version posted by Piotr Ziecik a few
weeks ago. Using this driver has the following advantages (from my
point of view):

- Compatibility with the Linux NAND driver (e.g. ECC usage)
- Better code quality in general
- Resulting U-Boot image is a bit smaller (approx. 3k)
- Better to sync with newer Linux driver versions

The only disadvantage I can see, is that HW-ECC is not supported right
now. But this could be added later (e.g. port from Linux driver after
it's supported there). Using HW-ECC on the MCP5121 NFC has a general
problem because of the ECC usage in the spare area. This collides with
JFFS2 for example.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Piotr Ziecik <kosmo@semihalf.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: John Rigby <jcrigby@gmail.com>
Cc: Scott Wood <scottwood@freescale.com>
2009-06-12 20:47:19 +02:00
Stefan Roese 60cfe87bd3 UBI: Add compile-time check for correct malloc area configuration
UBI is quite memory greedy and requires at least approx. 512k of malloc
area. This patch adds a compile-time check, so that boards will not
build with less memory reserved for this area (CONFIG_SYS_MALLOC_LEN).

Signed-off-by: Stefan Roese <sr@denx.de>
2009-06-12 20:47:18 +02:00
Prafulla Wadaskar 7ce6031afc sf: new Macronix MX25xx SPI flash driver
Added macronix SF driver for MTD framework
MX25L12805D is supported and tested
TBD: sector erase implementation, other deivces support

Signed-off-by: Prafulla Wadaskar <prafulla@marvell.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-06-12 20:47:18 +02:00
Todor I Mollov 2a6cc58869 sf: atmel: implement power-of-two write/erase funcs
Signed-off-by: Todor I Mollov <tmollov@ucsd.edu>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
CC: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
2009-06-12 20:47:18 +02:00
Vivek Mahajan 4ef01010aa mpc83xx: USB: Reorganized its support
The following patch reorganizes/reworks the USB support for mpc83xx
as under:-

  * Moves the 83xx USB clock init from drivers/usb/host/ehci-fsl.c to
    cpu/mpx83xx/cpu_init.c

  * Board specific usb_phy_type is read from the environment

  * Adds USB EHCI specific structure in include/usb/ehci-fsl.h

  * Copyrights revamped in most of the following files

Signed-off-by: Vivek Mahajan <vivek.mahajan@freescale.com>
Signed-off-by: Remy Bohmer <linux@bohmer.net>
2009-06-12 20:47:17 +02:00
Vivek Mahajan ed90d2c871 mpc8xxx: USB: Relocates ehci-fsl.h to include/usb
The following patch moves 8xxx-specifc USB #defines from
drivers/usb/host/ehci-fsl.h to include/usb.

Signed-off-by: Vivek Mahajan <vivek.mahajan@freescale.com>
Signed-off-by: Remy Bohmer <linux@bohmer.net>
2009-06-12 20:47:17 +02:00
Vivek Mahajan cfd39cdf94 mpc8xxx: USB: Removed reenablement of its interface
To prepare for the 85xx USB support, which requires interface enablement
only once in (specified) order, no different than instructions for
enabling the interface under 83xx.  It is unknown why the original author
enabled the interface twice (checked for references in errata, etc).

Signed-off-by: Vivek Mahajan <vivek.mahajan@freescale.com>
Signed-off-by: Remy Bohmer <linux@bohmer.net>
2009-06-12 20:47:17 +02:00
Peter Tyser 2c7920afaf 83xx: Replace CONFIG_MPC83[0-9]X with MPC83[0-9]x
Use the standard lowercase "x" capitalization that other Freescale
architectures use for CPU defines to prevent confusion and errors

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
2009-06-12 20:47:17 +02:00
Wolfgang Denk 3b74e7ec58 MPC512x: remove include/mpc512x.h
Move needed definitions (register descriptions etc.) from
include/mpc512x.h  into  include/asm-ppc/immap_512x.h.

Instead of using a #define'd register offset, use a function that
provides the PATA controller's base address.

All the rest of include/mpc512x.h are register offset definitions
which can be eliminated by proper use of C structures.

There are only a few register offsets remaining that are needed in
cpu/mpc512x/start.S; for these we provide cpu/mpc512x/asm-offsets.h
which is intended as a temporary workaround only. In a later patch
this file will be removed, too, and then auto-generated from the
respective C structs.

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: John Rigby <jcrigby@gmail.com>
2009-06-12 20:47:16 +02:00
Wolfgang Denk a927e491b2 MPC512x FEC: get rid of duplicated struct ethernet_regs
Use existing struct fec512x instead.

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: John Rigby <jcrigby@gmail.com>
Acked-by: Ben Warren <biggerbadderben@gmail.com>
2009-06-12 20:47:16 +02:00
Wolfgang Denk 843efb1192 MPC512x: use I/O accessors instead of pointer accesses
This commit changes the MPC512x code to use I/O accessor calls (i.e.
out_*() and in_*()) instead of using deprecated pointer accesses.

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: John Rigby <jcrigby@gmail.com>
2009-06-12 20:47:16 +02:00
Wolfgang Denk a89c33db96 General help message cleanup
Many of the help messages were not really helpful; for example, many
commands that take no arguments would not print a correct synopsis
line, but "No additional help available." which is not exactly wrong,
but not helpful either.

Commit ``Make "usage" messages more helpful.'' changed this
partially. But it also became clear that lots of "Usage" and "Help"
messages (fields "usage" and "help" in struct cmd_tbl_s respective)
were actually redundant.

This patch cleans this up - for example:

Before:
	=> help dtt
	dtt - Digital Thermometer and Thermostat

	Usage:
	dtt         - Read temperature from digital thermometer and thermostat.

After:
	=> help dtt
	dtt - Read temperature from Digital Thermometer and Thermostat

	Usage:
	dtt

Signed-off-by: Wolfgang Denk <wd@denx.de>
2009-06-12 20:47:16 +02:00
Stefan Roese d558107c18 mtd: Introduce CONFIG_MTD_DEVICE to select compilation of mtdcore.o
This new define enables mtdcore.c compilation and with this we can
select the MTD device infrastructure needed for the reworked mtdparts
command.

We now have the 2 MTD infrastructure defines, CONFIG_MTD_DEVICE and
CONFIG_MTD_PARTITIONS. CONFIG_MTD_DEVICE is needed (as explained above)
for the "mtdparts" command and CONFIG_MTD_PARTITIONS is needed for UBI.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Scott Wood <scottwood@freescale.com>
2009-06-12 20:45:47 +02:00
Stefan Roese 8d2effea23 mtd: Update MTD infrastructure to support 64bit device size
This patch brings the U-Boot MTD infrastructure in sync with the current
Linux MTD version (2.6.30-rc3). Biggest change is the 64bit device size
support and a resync of the mtdpart.c file which has seen multiple fixes
meanwhile.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Scott Wood <scottwood@freescale.com>
Cc: Kyungmin Park <kmpark@infradead.org>
2009-06-12 20:45:47 +02:00
Stefan Roese 0a57265533 mtd: Add MTD concat support to concatenate multiple MTD NOR devices
This patch adds concatenation support to the U-Boot MTD infrastructure.
By enabling CONFIG_MTD_CONCAT this MTD CFI wrapper will concatenate
all found NOR devices into one single MTD device. This can be used by
e.g by UBI to access a partition that spans over multiple NOR chips.

Signed-off-by: Stefan Roese <sr@denx.de>
2009-06-12 20:45:47 +02:00
Tom Rix 660888b7fb ZOOM2 Add serial support.
Zoom2 serial is in general supplied by one of the 4 UARTS on the debug board.
The default serial is from the USB connector on left side of the debug board.
The USB connector will produce 2 of the 4 UARTS.  On your host pick the first
enumeration.

The details of the setting of the serial gpmc setup are not available.
The values were provided by another party.

The serial port set up is the same with Zoom1.
Baud rate 115200, 8 bit data, no parity, 1 stop bit, no flow.

The kernel bootargs are
console=ttyS3,115200n8

Signed-off-by: Tom Rix <Tom.Rix@windriver.com>
2009-06-12 20:39:53 +02:00
Jean-Christophe PLAGNIOL-VILLARD 3ea201b016 lh7a40x: move serial driver to drivers/serial
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2009-06-12 20:39:53 +02:00
Jean-Christophe PLAGNIOL-VILLARD 379be585eb pxa: move serial driver to drivers/serial
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2009-06-12 20:39:52 +02:00
Wolfgang Denk 6cc7ba9ed4 video: Add an option to skip video initialization
This patch adds an option to skip the video initialization on for all
video drivers. This is needed for the CPCI750 which can be built as
CPCI host and adapter/target board. And the adapter board can't
access the video cards located on the CompactPCI bus.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Anatolij Gustschin <agust@denx.de>

Rebased against simplifying patch.
Signed-off-by: Wolfgang Denk <wd@denx.de>
2009-06-12 20:39:51 +02:00
Wolfgang Denk f62f64692f drv_video_init(): simplify logic
Simplify nesting of drv_video_init() and use a consistent way of
indicating failure / success. Before, it took me some time to realize
which of the returns was due to an error condition and which of them
indicated success.

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Anatolij Gustschin <agust@denx.de>
2009-06-12 20:39:51 +02:00
Jean-Christophe PLAGNIOL-VILLARD 65a76d4f94 arm/dcc: add xscale support
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2009-06-12 20:39:49 +02:00
Jean-Christophe PLAGNIOL-VILLARD 66e8f9da68 arm/dcc: use static support to allow to use it at anytime
the dcc can be used at the start of the cpu

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2009-06-12 20:39:49 +02:00
Peter Tyser 0f89c54be9 i2c: Update references to individual i2c commands
The individual i2c commands imd, imm, inm, imw, icrc32, iprobe, iloop,
and isdram are no longer available so all references to them have been
updated to the new form of "i2c <cmd>".

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
2009-06-12 20:39:46 +02:00
Peter Tyser 655b34a78a i2c: Create common default i2c_[set|get]_bus_speed() functions
New default, weak i2c_get_bus_speed() and i2c_set_bus_speed() functions
replace a number of architecture-specific implementations.

Also, providing default functions will allow all boards to enable
CONFIG_I2C_CMD_TREE.  This was previously not possible since the
tree-form of the i2c command provides the ability to display and modify
the i2c bus speed which requires i2c_[set|get]_bus_speed() to be
present.

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
2009-06-12 20:39:45 +02:00
Peter Tyser f0722ee762 tsi108_i2c: Add i2c_init() stub function
Add the i2c_init() function so that the tsi108_i2c.c driver fits
U-Boot's standard I2C API which is utilized by cmd_i2c.c

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
2009-06-12 20:39:45 +02:00
Wolfgang Denk f97db54d7e Merge branch 'master' of git://git.denx.de/u-boot-usb 2009-06-09 22:53:03 +02:00
RONETIX - Ilko Iliev faa14babd7 at91: fix a USB problem for AT91SAM9261
This patch corrects the missing PLLB initialization in usb_cpu_init()
for AT91SAM9261.
Because of the missing PLLB initialization, the USB support for all
AT91SAM9261 based boards will work only if the PLLB is configured by a
precedent bootloader.

Signed-off-by: Ilko Iliev <iliev@ronetix.at>
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Remy Bohmer <linux@bohmer.net>
2009-06-09 22:25:48 +02:00
Felix Radensky 0c24dec550 ppc4xx/net: Fix MDIO clock setup
This patch fixes MDIO clock setup in case when OPB frequency is 100MHz.
Current code assumes that the value of sysinfo.freqOPB is 100000000
when OPB frequency is 100MHz. In reality it is 100000001. As a result
MDIO clock is set to incorrect value, larger than 2.5MHz, thus violating
the standard. This in not a problem on boards equipped with Marvell PHYs
(e.g. Canyonlands), since those PHYs support MDIO clocks up to 8.3MHz,
but can be a problem for other PHYs (e.g. Realtek ones).

Signed-off-by: Felix Radensky <felix@embedded-sol.com>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2009-06-08 22:57:21 -07:00
Yoshihiro Shimoda d65e34d125 rtl8169: fix PCI system memory address
When PCI device use system memory, some PCI host controller should be
set physical memory address.

Signed-off-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2009-06-08 22:57:21 -07:00
Manikandan Pillai ca9c8a1e10 SMC911x driver fixed for NFS boot
eth_halt() function in the smc911x drivers used to call the
smc911x_reset() function. eth_halt() used to be called after
tftp transfers. This used to put the ethernet chip in reset
while the linux boots up resulting in the ethernet driver
not coming up. NFS boot used to fail as a result.

This patch calls smc911x_shutdown() instead of smc911x_reset().
Some comments received has also been fixed.

Signed-off-by: Manikandan Pillai <mani.pillai@ti.com>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2009-06-08 22:57:21 -07:00
Remy Bohmer e5a3bc2401 Add config option for disabling DM9000-SROM support.
Some boards do not have SROM support for the DM9000 network adapter.
Instead of listing these board names in the driver code, make this
option configurable from the board config file.

It also removes a build warning for the at91sam9261ek board:
'dm9000x.c:545: warning: 'read_srom_word' defined but not used'

And it repaires the trizepsiv board build which was broken around the
same routines

Signed-off-by: Remy Bohmer <linux@bohmer.net>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2009-06-08 22:57:21 -07:00
Daniel Mack 2c0234fa79 smc911x: write back the manually set MAC address
If the MAX address is given by the environment, write it back to the
hardware.

Signed-off-by: Daniel Mack <daniel@caiaq.de>
Cc: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2009-06-07 21:24:16 -07:00
Wolfgang Denk 3bc8556f9b Merge branch 'master' of git://git.denx.de/u-boot-mmc 2009-06-04 10:56:09 +02:00
Wolfgang Denk dfcd7f2160 Redundant Environment: protect full sector size
Several boards used different ways to specify the size of the
protected area when enabling flash write protection for the sectors
holding the environment variables: some used CONFIG_ENV_SIZE and
CONFIG_ENV_SIZE_REDUND, some used CONFIG_ENV_SECT_SIZE, and some even
a mix of both for the "normal" and the "redundant" areas.

Normally, this makes no difference at all. However, things are
different when you have to deal with boards that can come with
different types of flash chips, which may have different sector
sizes.

Here we may have to chose CONFIG_ENV_SECT_SIZE such that it fits the
biggest sector size, which may include several sectors on boards using
the smaller sector flash types. In such a case, using CONFIG_ENV_SIZE
or CONFIG_ENV_SIZE_REDUND to enable the protection may lead to the
case that only the first of these sectors get protected, while the
following ones aren't.

This is no real problem, but it can be confusing for the user -
especially on boards that use CONFIG_ENV_SECT_SIZE to protect the
"normal" areas, while using CONFIG_ENV_SIZE_REDUND for the
"redundant" area.

To avoid such inconsistencies, I changed all sucn boards that I found
to consistently use CONFIG_ENV_SECT_SIZE for protection. This should
not cause any functional changes to the code.

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Paul Ruhland
Cc: Pantelis Antoniou <panto@intracom.gr>
Cc: Stefan Roese <sr@denx.de>
Cc: Gary Jennejohn <garyj@denx.de>
Cc: Dave Ellis <DGE@sixnetio.com>
Acked-by: Stefan Roese <sr@denx.de>
2009-06-04 00:16:16 +02:00
Ilya Yanok b81830f6e3 mmc: it's safe to ignore mmc_send_if_cond() return value
Return value of mmc_send_if_cond() can be safely ignored (as it is
done in Linux). This makes older cards work with MXC MCI controller.

Signed-off-by: Ilya Yanok <yanok@emcraft.com>
2009-06-04 00:15:09 +02:00
Stefan Roese dba6fcf651 cfi_mtd: Fix bug in last sector detection
This patch now enabled this cfi-mtd wrapper to correctly detect and
erase the last sector in an NOR FLASH device.

Signed-off-by: Stefan Roese <sr@denx.de>
2009-06-03 23:45:27 +02:00
Yauhen Kharuzhy 4e3d89ba94 mmc: Fix decoding of SCR & function switch data on little-endian machines
SCR & switch data are read from card as big-endian words and should be
converted to CPU byte order.

Signed-off-by: Yauhen Kharuzhy <jekhor@gmail.com>
Signed-off-by: Andy Fleming <afleming@freescale.com>
2009-06-02 17:20:04 -05:00
Yauhen Kharuzhy f33cb34b39 mmc: Remove return from mmc_init for non SD 2.0 compatible cards.
Cards which are not compatible with SD 2.0 standard, may return response
for CMD8 command, but it will be invalid in terms of SD 2.0. We should
accept this case as admissible, just like Linux does.

Signed-off-by: Yauhen Kharuzhy <jekhor@gmail.com>
Signed-off-by: Andy Fleming <afleming@freescale.com>
2009-06-02 17:19:07 -05:00
Rabin Vincent 998be3dd59 mmc: drop unnecessary casts
Now that response is a uint, we can drop all the casts.

Signed-off-by: Rabin Vincent <rabin@rab.in>
2009-06-02 17:18:57 -05:00
Rabin Vincent 0b453ffe28 mmc: fix response decoding on little endian
The mmc code defines the response as an array of chars.  However, it
access the response bytes both as (i) an array of four uints (with
casts) and (ii) as individual chars.  The former case is used more
often, including by the driver when it assigns the response.

The char-wise accesses are broken on little endian systems because they
assume that the bytes in the uints are in big endian byte order.

This patch fixes this by changing the response to be an array of four
uints and replacing the char-wise accesses with equivalent uint-wise
accesses.

Signed-off-by: Rabin Vincent <rabin@rab.in>
2009-06-02 17:18:57 -05:00
Rabin Vincent 9b1f942c09 mmc: use lldiv to fix arm eabi build
The generic MMC core uses direct long long divisions, which do not build
with ARM EABI toolchains.  Use lldiv() instead, which works everywhere.

Signed-off-by: Rabin Vincent <rabin@rab.in>
2009-06-02 17:18:56 -05:00
Rabin Vincent e85649c7e6 mmc: check find_mmc_device return value
find_mmc_device returns NULL if an invalid device number is specified.
Check for this to avoid dereferencing NULL pointers.

Signed-off-by: Rabin Vincent <rabin@rab.in>
2009-06-02 17:18:56 -05:00
Mike Frysinger 7d6900ebe1 Blackfin: spi: fix pin handling of SPI0 SSEL4
CS4 on SPI0 has a dedicated PH8 pin which needs to be enabled as a
peripheral in order to work.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-05-29 17:11:33 -04:00
Stefan Roese f40f6db278 nand: Fix problem with ECC ordering for PPC4xx NDFC platforms
This patch enables Smart Media (SMC) ECC byte ordering which is used
on the PPC4xx NAND FLASH controller (NDFC). Without this patch we have
incompatible ECC byte ordering to the Linux kernel NDFC driver.

Signed-off-by: Stefan Roese <sr@denx.de>
Acked-by: Scott Wood <scottwood@freescale.com>
2009-05-23 12:51:39 +02:00
Detlev Zundel 792a09eb9d Fix e-mail address of Gary Jennejohn.
Signed-off-by: Detlev Zundel <dzu@denx.de>
2009-05-15 22:11:59 +02:00
Wolfgang Denk bf2ba6d46e Merge branch 'master' of git://git.denx.de/u-boot-cfi-flash 2009-04-30 22:59:45 +02:00
Stefan Roese f8e2b3107e MTD: Change cfi-mtd to accept non-uniform sector sizes
With this patch non-uniform NOR FLASH chips (chips with multiple erase
regions) can be exported via the cfi-mtd layer and therefor used by UBI.
We select the largest sector size as erasesize. The cfi driver will make
sure that the smaller sectors are handled correctly.

Signed-off-by: Stefan Roese <sr@denx.de>
2009-04-29 11:06:06 +02:00
Anatolij Gustschin 3dcbe628d6 video: fix bug in cfb_console.c code
Fix bug in drawing long version/info strings:
U-Boot version string like
"U-Boot 2009.03-05647-g7c51e06 (Apr 23 2009 - 12:40:00) MPC83XX"
is long and doesn't wrap around correctly while drawing
beside the logo. Such long strings partially overwrite
the logo. This patch is an attempt to fix it.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
2009-04-28 10:55:13 +02:00
Stefan Roese dbe29e36a4 mtd: nand/onenand: Register mtd device upon device scanning
With this patch the NAND and OneNAND devices are registered in the MTD
subsystem and can then be referenced by the mtdcore code (e.g.
get_mtd_device_nm()). This is needed for the new "ubi part" command
syntax without the flash type parameter (nor|nand|onenand).

Signed-off-by: Stefan Roese <sr@denx.de>
2009-04-28 01:15:38 +02:00
Stefan Roese 10bb62d85a mtd: nand: Include linux/mtd/partitions.h in nand_base.h
This patch removes this compilation warning when CONFIG_MTD_PARTITIONS is
defined:

nand_base.c: In function 'nand_release':
nand_base.c:2922: warning: implicit declaration of function 'del_mtd_partitions'

Signed-off-by: Stefan Roese <sr@denx.de>
2009-04-28 01:15:37 +02:00
Detlev Zundel 294f10ca9e mips/vcth: Use generic 16550 uart driver
As the common code also handles baudrate switching, which the board
specific vct.c driver did not support, this is one of the rare
occassions where deleting code actually adds a feature :)

Signed-off-by: Detlev Zundel <dzu@denx.de>
Acked-by: Stefan Roese <sr@denx.de>
Acked-by: Shinya Kuribayashi <shinya.kuribayashi@necel.com>
2009-04-28 01:10:24 +02:00
Peter Tyser f9a109b3ad Replace __attribute references with __attribute__
__attribute__ follows gcc's documented syntax and is generally more
common than __attribute.  This change is only asthetic and should not
affect functionality.

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
2009-04-28 01:01:39 +02:00
David Brownell ad74cae9ff dm9000 EEPROM reading bugfix
Make the U-Boot dm9000 driver read addresses from EEPROM just
like Linux does ... read six bytes, instead of reading twelve
bytes and then discarding every other one.

Using the right Ethernet address is a big win.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Acked-by: Ben Warren <biggerbadderben@gmail.com>
2009-04-28 00:28:18 +02:00
Yoshihiro Shimoda d4c02e6f5d rtl8169: fix cache coherency problem
Fix the problem that cannot access actual data when CPU data cache enabled.

Signed-off-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
Tested-by: Nobuhiro Iwamatsu <iwamatsu.nobuhiro@renesas.com>
Acked-by: Ben Warren <biggerbadderben@gmail.com>
2009-04-28 00:18:10 +02:00
Wolfgang Denk faa5a0c6fc Merge branch 'master' of git://git.denx.de/u-boot-at91 2009-04-24 13:31:02 +02:00
David Brownell 7732cef2ee CMD_UBI != MTD_PARTITIONS
Fix dependency goofage:  it should certainly be possible to have the
partition support without bringing in UBI commands.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Acked-by: Stefan Roese <sr@denx.de>
2009-04-16 23:03:27 +02:00
Jean-Christophe PLAGNIOL-VILLARD dc39ae9513 at91sam9/at91cap: improve clock framework
calculate dynamically the clock rate and pllb setting for usb

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2009-04-16 21:30:44 +02:00
Wolfgang Denk f75a729b5c Merge branch 'master' of git://git.denx.de/u-boot-blackfin 2009-04-07 21:53:07 +02:00
Graf Yang a343ba87ea Blackfin: nand: flush peripheral before polling it
We need to make sure the data written to the nand flash controller makes
it there before we start polling its status register.  Otherwise, we may
get stale data and return before the controller is actually ready.

Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Acked-by: Scott Wood <scottwood@freescale.com>
2009-04-06 17:37:37 -04:00
Remy Bohmer 3ccbfb25f4 Support for PXA27X UDC.
This Patch adds Support for PXA27X UDC.
	(Rebased to drivers/usb reorganisation)

Signed-off-by: Vivek Kutal <vivek.kutal@azingo.com>
Signed-off-by: Remy Bohmer <linux@bohmer.net>
2009-04-06 20:40:47 +02:00
Jean-Christophe PLAGNIOL-VILLARD 2731b9a866 drivers/usb: regorganisation
move to linux usb driver organisation

as following

drivers/usb/gadget
drivers/usb/host
drivers/usb/musb

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Remy Bohmer <linux@bohmer.net>
2009-04-06 20:40:46 +02:00
Todor I Mollov d04371a116 Blackfin: spi: make cs deassert function deterministic
Blackfin SPI driver was not driving the SPI chip-select high before
putting the chip-select signals into tri-state mode.  This is probably
something that slipped by unnoticed in most designs.  If the signals are
put directly into a tri-state mode, then the board is relying on the
pull-up resistors to pull up the chip-select before the next transaction.
Most of the time this is fine, except when you have two transactions that
follow each other very closely, such as the flash erase and read status
register commands.  In this case I was seeing a 500ns separation between
the transactions.  In my setup, with a 10kOhm pull-up, it would meet
timing spec about half the time and resulted in intermittent errors.  (A
stronger pull up would fix this, but our design is targeted for low power
consumption and a 3.3kOhm @ 3.3v is 3.3mW of needless power consumption.)
I modified the spi_cs_deactivate() function in bfin_spi.c to drive the
chip-selects high before putting them into tri-state.  For me, this
resulted in a rise time of 5ns instead of the previous rise time of about
1us, and fully satisfied the timing spec of the chip.

Signed-off-by: Todor I Mollov <tmollov@ucsd.edu>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-04-06 03:49:31 -04:00
Wolfgang Denk c0a14aedc3 Update CHANGELOG, coding style cleanup. 2009-04-05 00:27:57 +02:00