Commit Graph

1804 Commits

Author SHA1 Message Date
kevin.morfitt@fearnside-systems.co.uk eb0ae7f549 Clean-up of s3c24x0 drivers excluding nand driver
This patch re-formats the arm920t s3c24x0 driver files, excluding the nand
driver, in preparation for changes to add support for the Embest SBC2440-II Board.

The changes are as follows:
- re-indent the code using Lindent
- make sure register layouts are defined using a C struct
- replace the upper-case typedef'ed C struct names with lower case
  non-typedef'ed ones
- make sure registers are accessed using the proper accessor functions
- run checkpatch.pl and fix any error reports

It assumes the following patch has been applied first:
- [U-Boot][PATCH-ARM] CONFIG_SYS_HZ fix for ARM902T S3C24X0 Boards, 05/09/2009
- patches 1/4 and 2/4 of this series

Tested on an Embest SBC2440-II Board with local u-boot patches as I don't have
any s3c2400 or s3c2410 boards but need this patch applying before I can submit
patches for the SBC2440-II Board. Also, temporarily modified sbc2410x, smdk2400,
smdk2410 and trab configs to use the mtd nand driver (which isn't used by any
board at the moment), ran MAKEALL for all ARM9 targets and no new warnings or
errors were found.

Signed-off-by: Kevin Morfitt <kevin.morfitt@fearnside-systems.co.uk>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2009-10-13 21:13:56 -05:00
Minkyu Kang dd2c9e6a3b s5pc1xx: support serial driver
This patch includes the serial driver for s5pc1xx.
s5pc1xx uart driver needs own register setting and clock configuration.
So, need to special driver.

Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2009-10-13 21:13:55 -05:00
Minkyu Kang 4678d674f0 s5pc1xx: support onenand driver
This patch includes the onenand driver for s5pc100

Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
2009-10-13 21:13:55 -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
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
Wolfgang Denk 14abfe361b Merge branch 'master' of /home/wd/git/u-boot/custodians 2009-10-12 23:40:27 +02:00
Ed Swarthout 285870f753 Leave x86emu op code tables in default section
Forcing the tables into got2 caused extra relocation when using -mrelocatable.
This patch requires any board defining CONFIG_BIOSEMU to use -mrelocatable.

Signed-off-by: Ed Swarthout <Ed.Swarthout@freescale.com>
Acked-by: Jin Zhengxiong <Jason.Jin@freescale.com>
2009-10-12 23:34:06 +02:00
Luigi 'Comio' Mantellini 4ba31ab33a Rewrite the miiphybb (Bit-banged MII bus driver) in order to support an arbitrary number of mii buses.
This feature is useful when your board uses different mii buses for different
phys and all (or a part) of these buses are implemented via bit-banging mode.

The driver requires that the following macros should be defined into the board
configuration file:

CONFIG_BITBANGMII       - Enable the miiphybb driver
CONFIG_BITBANGMII_MULTI - Enable the multi bus support

If the CONFIG_BITBANGMII_MULTI is not defined, the board's config file needs
to define at least the following macros:

MII_INIT      - Generic code to enable the MII bus (optional)
MDIO_DECLARE  - Declaration needed to access to the MDIO pin (optional)
MDIO_ACTIVE   - Activate the MDIO pin as out pin
MDIO_TRISTATE - Activate the MDIO pin as input/tristate pin
MDIO_READ     - Read the MDIO pin
MDIO(v)       - Write v on the MDIO pin
MDC_DECLARE   - Declaration needed to access to the MDC pin (optional)
MDC(v)        - Write v on the MDC pin

The previous macros make the driver compatible with the previous version
(that didn't support the multi-bus).

When the CONFIG_BITBANGMII_MULTI is also defined, the board code needs to fill
the bb_miiphy_buses[] array with a record for each required bus and declare
the bb_miiphy_buses_num variable with the number of mii buses.
The record (struct bb_miiphy_bus) has the following fields/callbacks (see
miiphy.h for details):

char name[]            - The symbolic name that must be equal to the MII bus
                         registered name
int (*init)()          - Initialization function called at startup time (just
                         before the Ethernet initialization)
int (*mdio_active)()   - Activate the MDIO pin as output
int (*mdio_tristate)() - Activate the MDIO pin as input/tristate pin
int (*set_mdio)()      - Write the MDIO pin
int (*get_mdio)()      - Read the MDIO pin
int (*set_mdc)()       - Write the MDC pin
int (*delay)()         - Delay function
void *priv             - Private data used by board specific code

The board code will look like:

struct bb_miiphy_bus bb_miiphy_buses[] = {
 { .name = miibus#1, .init = b1_init, .mdio_active = b1_mdio_active, ... },
 { .name = miibus#2, .init = b2_init, .mdio_active = b2_mdio_active, ... },
 ...
int bb_miiphy_buses_num = sizeof(bb_miiphy_buses) /
                          sizeof(bb_miiphy_buses[0]);

Signed-off-by: Luigi 'Comio' Mantellini <luigi.mantellini@idf-hit.com>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2009-10-10 23:16:53 -07:00
Wolfgang Denk cd77dd109c Merge branch 'reloc' 2009-10-09 00:03:18 +02:00
Niklaus Giger ddc922ff2c ppc_4xx: Apply new HW register names
Modify all existing *.c files to use the new register names
as seen in the AMCC manuals.

Signed-off-by: Niklaus Giger <niklaus.giger@member.fsf.org>
Signed-off-by: Stefan Roese <sr@denx.de>
2009-10-07 09:15:20 +02:00
Prafulla Wadaskar aba8237257 net: kirkwood_egiga.c: fixed build warning
if link up detection code is disabled through config option, it gives build warning.
This patch fixes the same

Signed-off-by: Prafulla Wadaskar <prafulla@marvell.com>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2009-10-04 22:55:02 -07:00
Ben Warren 7194ab8095 Convert SMC91111 Ethernet driver to CONFIG_NET_MULTI API
All in-tree boards that use this controller have CONFIG_NET_MULTI
added
Also:
  - changed CONFIG_DRIVER_SMC91111 to CONFIG_SMC91111
  - cleaned up line lengths
  - modified all boards that override weak function in this driver
  - modified all eeprom standalone apps to work with new driver
  - updated blackfin standalone EEPROM app after testing

Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-10-04 22:37:03 -07:00
Prafulla Wadaskar 32e7f239dd net: phy: mv88e61xx.c : fixed build warning
following build warning was observed

mv88e61xx.c: In function ‘mv88e61xx_busychk’:
mv88e61xx.c:208: warning: dereferencing type-punned pointer will break strict-aliasing rules

This patch fixes the same
Patch tested for rd6281a board build

Signed-off-by: Prafulla Wadaskar <prafulla@marvell.com>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2009-10-04 22:30:46 -07:00
James Clough c0b46d8ead net: Fix problem with 405EZ ethernet interrupt
On 405EZ the RX-/TX-interrupts are coalesced into one IRQ bit in the
UIC. We need to acknowledge the RX-/TX-interrupts in the
SDR0_ICINTSTAT reg as well.

This problem was introduced with commit
d1631fe1 [ppc4xx: Consolidate PPC4xx UIC defines]

Signed-off-by: James Clough <james@rtetc.com>
Signed-off-by: Stefan Roese <sr@denx.de>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2009-10-04 22:25:20 -07:00
Peter Tyser 521af04d85 Conditionally perform common relocation fixups
Add #ifdefs where necessary to not perform relocation fixups.  This
allows boards/architectures which support relocation to trim a decent
chunk of code.

Note that this patch doesn't add #ifdefs to architecture-specific code
which does not support relocation.

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
2009-10-03 10:17:57 +02:00
Peter Tyser 6385b28116 fpga: Remove relocation fixups
PPC boards are the only users of the current FPGA code which is littered
with manual relocation fixups.  Now that proper relocation is supported
for PPC boards, remove FPGA manual relocation.

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
2009-10-03 10:17:56 +02:00
Peter Tyser cd1011db80 tsec: Remove PHY command relocation fixups
Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
2009-10-03 10:17:56 +02:00
Wolfgang Denk 1d96cfe8f5 Merge branch 'master' of git://git.denx.de/u-boot-mpc85xx 2009-09-30 23:39:36 +02:00
Wolfgang Denk 7529b4445b Merge branch 'master' of git://git.denx.de/u-boot-nand-flash 2009-09-30 23:34:36 +02:00
Wolfgang Denk 7b5ae460c3 Merge branch 'master' of git://git.denx.de/u-boot-i2c 2009-09-30 23:24:10 +02:00
Kumar Gala 24b17d8a3c ppc/85xx: get_law_entry isn't used in CONFIG_NAND_SPL
Don't include get_law_entry as part of the NAND_SPL build since the
code isnt used.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2009-09-30 08:42:12 -05:00
Scott Wood d44e9c1736 NAND: davinci: Fix warnings when 4-bit ECC not used
I accidentally left v2 of "NAND: DaVinci:Adding 4 BIT ECC support"
applied when I pushed the tree last merge window, and missed these fixes
which were in v3 of that patch.

Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
Signed-off-by: Scott Wood <scottwood@freescale.com>
2009-09-28 16:33:18 -05:00
Joakim Tjernlund d1c9e5b379 fsl_i2c: Do not generate STOP after read.
__i2c_read always ends with a STOP condition thereby releasing
the bus. It is cleaner to do the STOP magic in i2c_read(), like
i2c_write() does. This may also help future multimaster systems which
wants to hold on to the bus until all transactions are finished.

Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
2009-09-28 07:35:56 +02:00
Joakim Tjernlund 9940420212 fsl_i2c: Impl. AN2919, rev 5 to calculate FDR/DFSR
The latest AN2919 has changed the way FDR/DFSR should be calculated.
Update the driver according to spec. However, Condition 2
is not accounted for as it is not clear how to do so.

Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
Acked-by: Wolfgang Grandegger <wg@grandegger.com>
2009-09-28 07:35:54 +02:00
Joakim Tjernlund d01ee4db93 fsl_i2c: Add CONFIG_FSL_I2C_CUSTOM_{DFSR/FDR}
Some boards need a higher DFSR value than the spec currently
recommends so give these boards the means to define there own.

For completeness, add CONFIG_FSL_I2C_CUSTOM_FDR too.

Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
2009-09-28 07:35:53 +02:00
Joakim Tjernlund 21f4cbb772 fsl_i2c: Wait for STOP condition to propagate
After issuing a STOP one must wait until the STOP has completed
on the bus before doing something new to the controller.

Also add an extra read of SR as the manual mentions doing that
is a good idea.

Remove surplus write of CR just before a write, isn't required and
could potentially disturb the I2C bus.

Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
2009-09-28 07:35:52 +02:00
Anton Vorontsov d77c779bc2 net: uec: Fix uccf.h and uec.h headers to include headers they depend on
Headers should include headers containing prototypes and defines they
depend on, don't assume that they're included by somebody else.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
2009-09-25 18:25:50 -05:00
Anton Vorontsov 6185f80c31 net: uec_phy: Implement TXID and RXID RGMII modes for Marvell PHYs
This will be needed for MPC8360E-MDS boards with rev. 2.1 CPUs.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
2009-09-25 18:25:41 -05:00
Wolfgang Denk 5e498dfab8 Merge branch 'master' of /home/wd/git/u-boot/custodians 2009-09-24 23:40:25 +02:00
Kumar Gala 7e4259bba4 ppc/p4080: Add various p4080 related defines (and p4040)
There are various locations that we have chip specific info:

* Makefile for which ddr code to build
* Added p4080 & p4040 to cpu_type_list and SVR list
* Added number of LAWs for p4080
* Set CONFIG_MAX_CPUS to 8 for p4080

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2009-09-24 12:05:28 -05:00
Kumar Gala 418ec85843 ppc/p4080: Add support for CoreNet style platform LAWs
On CoreNet based platforms the LAW address is split between an high &
low register and we no longer shift the address.  Also, the target IDs
on CoreNet platforms have been completely re-assigned.

Additionally, added a new find_law() API to which LAW an address hits in.
This is need for the CoreNet style boot release code since it will need
to determine what the target ID should be set to for boot window
translation.

Finally, enamed LAWAR_EN to LAW_EN and moved to header so we can use
it elsewhere.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2009-09-24 12:05:28 -05:00
Kumar Gala 93a83872c7 ppc/85xx: Clean up p1_p2_rdb PCI setup
General code cleanup to use in/out IO accessors as well as making
the code that prints out info sane between board and generic fsl pci
code.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2009-09-24 12:04:58 -05:00
Werner Pfister b0078c8792 rtc/ds1337.c: Allow to set TCR register
This is needed to correctly start the charging of an attached capacitor
or battery.

Signed-off-by: Werner Pfister <werner.pfister@intercontrol.de>
Signed-off-by: Detlev Zundel <dzu@denx.de>
2009-09-24 00:20:33 +02:00
Paul Gibson d3f4941874 mpc512x. Micron nand flash needs a reset before a read command is issued.
Micron nand flash needs a reset before a read command is issued.
The current mpc5121_nfc driver ignores the reset command.
2009-09-22 22:59:42 +02:00
Mingkai Hu 7da53351d8 ppc/85xx: add boot from NAND/eSDHC/eSPI support
The MPC8536E is capable of booting form NAND/eSDHC/eSPI, this patch
implements these three bootup methods in a unified way - all of these
use the general cpu/mpc85xx/start.S, and load the main image to L2SRAM
which lets us use the SPD to initialize the SDRAM.

For all three bootup methods, the bootup process can be divided into two
stages: the first stage will initialize the corresponding controller,
configure the L2SRAM, then copy the second stage image to L2SRAM and
jump to it. The second stage image is just like the general U-Boot image
to configure all the hardware and boot up to U-Boot command line.

When boot from NAND, the eLBC controller will first load the first stage
image to internal 4K RAM buffer because it's also stored on the NAND
flash. The first stage image, also call 4K NAND loader, will initialize
the L2SRAM, load the second stage image to L2SRAM and jump to it. The 4K
NAND loader's code comes from the corresponding nand_spl directory, along
with the code twisted by CONFIG_NAND_SPL.

When boot from eSDHC/eSPI, there's no such a first stage image because
the CPU ROM code does the same work. It will initialize the L2SRAM
according to the config addr/word pairs on the fixed address and
initialize the eSDHC/eSPI controller, then load the second stage image
to L2SRAM and jump to it.

The macro CONFIG_SYS_RAMBOOT is used to control the code to produce the
second stage image for all different bootup methods. It's set in the
board config file when one of the bootup methods above is selected.

Signed-off-by: Mingkai Hu <Mingkai.hu@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2009-09-15 21:30:09 -05:00
Wolfgang Denk 041a6a0c2e Merge branch 'master' of git://git.denx.de/u-boot-microblaze 2009-09-15 21:45:50 +02:00
Wolfgang Denk cae26e2fdd Merge branch 'master' of git://git.denx.de/u-boot-ppc4xx 2009-09-15 21:43:25 +02:00
Wolfgang Denk 2d6d9f0848 sk98lin: fix compile warnings
Fix warnings:
skge.c: In function 'BoardInitMem':
skge.c:1389: warning: dereferencing type-punned pointer will break strict-aliasing rules
skge.c:1390: warning: dereferencing type-punned pointer will break strict-aliasing rules
skge.c:1391: warning: dereferencing type-punned pointer will break strict-aliasing rules
skgesirq.c: In function 'SkGePortCheckUpXmac':
skgesirq.c:1301: warning: dereferencing type-punned pointer will break strict-aliasing rules
skgesirq.c:1301: warning: dereferencing type-punned pointer will break strict-aliasing rules
skgesirq.c:1398: warning: dereferencing type-punned pointer will break strict-aliasing rules
skgesirq.c:1398: warning: dereferencing type-punned pointer will break strict-aliasing rules
skrlmt.c: In function 'SkRlmtInit':
skrlmt.c:661: warning: dereferencing type-punned pointer will break strict-aliasing rules
skxmac2.c: In function 'SkMacPromiscMode':
skxmac2.c:753: warning: dereferencing type-punned pointer will break strict-aliasing rules
skxmac2.c:753: warning: dereferencing type-punned pointer will break strict-aliasing rules
skxmac2.c: In function 'SkMacHashing':
skxmac2.c:803: warning: dereferencing type-punned pointer will break strict-aliasing rules
skxmac2.c:803: warning: dereferencing type-punned pointer will break strict-aliasing rules
skxmac2.c: In function 'SkMacFlushTxFifo':
skxmac2.c:1115: warning: dereferencing type-punned pointer will break strict-aliasing rules
skxmac2.c:1115: warning: dereferencing type-punned pointer will break strict-aliasing rules
skxmac2.c: In function 'SkMacFlushRxFifo':
skxmac2.c:1145: warning: dereferencing type-punned pointer will break strict-aliasing rules
skxmac2.c:1145: warning: dereferencing type-punned pointer will break strict-aliasing rules
skxmac2.c: In function 'SkXmInitPauseMd':
skxmac2.c:1987: warning: dereferencing type-punned pointer will break strict-aliasing rules
skxmac2.c:1987: warning: dereferencing type-punned pointer will break strict-aliasing rules
skxmac2.c: In function 'SkXmOverflowStatus':
skxmac2.c:4236: warning: dereferencing type-punned pointer will break strict-aliasing rules
skxmac2.c:4236: warning: dereferencing type-punned pointer will break strict-aliasing rules
skxmac2.c:4242: warning: dereferencing type-punned pointer will break strict-aliasing rules
skxmac2.c:4242: warning: dereferencing type-punned pointer will break strict-aliasing rules

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Ben Warren <biggerbadderben@gmail.com>
2009-09-15 00:11:48 +02:00
Wolfgang Denk 3708e4cdb1 drivers/net/natsemi.c: fix compile warning
Fix warning: natsemi.c:757: warning: dereferencing type-punned pointer
will break strict-aliasing rules

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Ben Warren <biggerbadderben@gmail.com>
2009-09-15 00:11:02 +02:00
Michal Simek 78d19a3987 net: emaclite: Cleanup license to be GPL compatible
Signed-off-by: Stephen Neuendorffer <stephen.neuendorffer@xilinx.com>
Signed-off-by: Michal Simek <monstr@monstr.eu>
2009-09-14 14:40:04 +02:00
Michal Simek 3ceba1d45d net: Remove old Xilinx Emac driver
Signed-off-by: Michal Simek <monstr@monstr.eu>
2009-09-14 14:40:03 +02:00
Stefan Roese d1c3b27525 ppc4xx: Big cleanup of PPC4xx defines
This patch cleans up multiple issues of the 4xx register (mostly
DCR, SDR, CPR, etc) definitions:

- Change lower case defines to upper case (plb4_acr -> PLB4_ACR)
- Change the defines to better match the names from the
  user's manuals (e.g. cprpllc -> CPR0_PLLC)
- Removal of some unused defines

Please test this patch intensive on your PPC4xx platform. Even though
I tried not to break anything and tested successfully on multiple
4xx AMCC platforms, testing on custom platforms is recommended.

Signed-off-by: Stefan Roese <sr@denx.de>
2009-09-11 10:35:58 +02:00
Timur Tabi 74c5dfd81f fsl: add register read-back to set_law()
After programming a new LAW, we should read-back the LAWAR register so that
we sync the writes.  Otherwise, code that attempts to use the new LAW-mapped
memory might fail right away.

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2009-09-08 09:10:06 -05:00
Timur Tabi 92477a631b fsl_i2c: increase I2C timeout values and make them configurable
The value of I2C_TIMEOUT in fsl_i2c.c has several problems.  First, it is
defined as CONFIG_HZ/4, but it is used as a count of microseconds, so it makes
no sense to derive it from a clock rate.  Second, the current value (250) is
too low for some boards, so it needs to be increased.  Third, the timeout
necessary for multiple-master arbitration is larger than the timeout for basic
read/write operations, so we shouldn't have a single constant for both timeouts.
Finally, it would be nice if we could override these values on a per-board
basis.

Signed-off-by: Timur Tabi <timur@freescale.com>
Acked-by: Wolfgang Denk <wd@denx.de>
Tested-by: Peter Tyser <ptyser@xes-inc.com>
Acked-by: Peter Tyser <ptyser@xes-inc.com>
2009-09-06 11:26:05 +02:00
Scott Wood cfcbf8c4cf mxc_nand: Remove Freescale's "All Rights Reserved."
Signed-off-by: Scott Wood <scottwood@freescale.com>
2009-09-04 23:03:10 +02:00
Wolfgang Denk 46ff6d4613 License cleanup: remove unintended "All Rights Reserved" notices.
Some files included my old standerd file header which had a "All
Rights Reserved" part. As this has never been my intention, I remove
these lines to make the files compatible with GPL v.2 and later.

Signed-off-by: Wolfgang Denk <wd@denx.de>
2009-09-04 23:00:56 +02:00
Roy Zang 9ea005fb44 Use different PBA value for E1000 PCI and PCIe cards
Signed-off-by: Roy Zang <tie-fei.zang@freescale.com>
Acked-by: Andr Schwarz <andre.schwarz@matrix-vision.de>
2009-09-04 22:03:02 +02:00
Graeme Russ 8907b8dbc5 Misc ds1722 fixups
This patch is based on a patch submitted by Jean-Christophe PLAGNIOL-VILLARD
on 18th May 2008 as part of a general i386 / sc520 fixup which was never
applied

Signed-off-by: Graeme Russ <graeme.russ@gmail.com>
2009-09-04 21:54:52 +02:00
Graeme Russ a92510e7fa Misc ti_pci1410a fixups
Removed do_pinit() - now declared in cmd_pcmcia.c

Added #define CONFIG_CMD_PCMCIA around pcmcia_off() in line with other
PCMCIA drivers

signed/unsigned type fixups

Added semi-colon after default: label as required by newer gcc

The only board that appears to use this driver is the sc520_spunk which
is very old and very likely very broken anyway. I do not have one to test
whether this patch breaks anything functionaly, I have can only check
that it compiles without warning or error

Signed-off-by: Graeme Russ <graeme.russ@gmail.com>
2009-09-04 21:54:04 +02:00
Graeme Russ 31b9ab33d9 Misc SATA fixups
Cast first parameter to sata_cpy()

In /drivers/block/ata_piix.h, ata_id_has_lba48(), ata_id_has_lba(),
ata_id_has_dma(), ata_id_u32(), ata_id_u64() are all defined in
include/libata.h which is included in ata.h which is included by all files
which include ata_piix.h (only ata_piix.c) so these definitions are
supurflous to (and conlict with) this in libata.h. Interestingly, my
compiler complains about ata_id_u64 already being defined, but not
ata_id_u32

ata_dump_id() is defined in include/libata.h and should not be static
(maybe should even use ata_dump_id() in libata.c

Signed-off-by: Graeme Russ <graeme.russ@gmail.com>
2009-09-04 21:53:37 +02:00
Poonam Aggrwal 0d3d68b25a driver/fsl_pci: Add fsl_pci_init_port function to initialize a PCI controller
fsl_pci_init_port can be called from board specific PCI initialization
routines to setup the PCI (or PCIe) controller.  This will reduce code
redundancy in most of the 85xx/86xx FSL board ports that setup PCI.

Signed-off-by: Poonam Aggrwal <poonam.aggrwal@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2009-08-28 17:12:43 -05:00
Poonam Aggrwal a713ba926b 85xx: Added single core members of FSL P1xx/P2xx processors series
P1011 - Single core variant of P1020
P2010 - Single core variant of P2020

Signed-off-by: Poonam Aggrwal <poonam.aggrwal@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2009-08-28 17:12:41 -05:00
Poonam Aggrwal 87c7661b42 85xx: Added P1020 Processor Support.
P1020 is another member of QorIQ series of processors which falls in ULE
category. It is an e500 based dual core SOC.

Being a scaled down version of P2020 it has following differences:
- 533MHz - 800MHz core frequency.
- 256Kbyte L2 cache
- Ethernet controllers with classification capabilities.
Also the SOC is pin compatible with P2020

Signed-off-by: Poonam Aggrwal <poonam.aggrwal@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2009-08-28 17:12:39 -05:00
Kumar Gala ad19e7a5d2 pci/fsl_pci_init: Rework PCI ATMU setup to handle >4G of memory
The old PCI ATMU setup code would just mimic the PCI regions into the
ATMU registers.  For simple memory maps in which all memory, MMIO, etc
space fit into 4G this works ok.  However there are issues with we have
>4G of memory as we know can't access all of memory and we need to
ensure that PCICSRBAR (PEXCSRBAR on PCIe) isn't overlapping with
anything since we can't turn it off.

We first setup outbound windows based on what the board code setup
in the pci regions for MMIO and IO access.  Next we place PCICSRBAR
below the MMIO window.  After which we try to setup the inbound windows
to map as much of memory as possible.

On PCIe based controllers we are able to overmap the ATMU setup since
RX & TX links are separate but report the proper amount of inbound
address space to the region tracking to ensure there is no overlap.

On PCI based controllers we use as many inbound windows as available to
map as much of the memory as possible.

Additionally we changed all the CCSR register access to use proper IO
accessor functions.  Also had to add CONFIG_SYS_CCSRBAR_PHYS to some
86xx platforms that didn't have it defined.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2009-08-28 17:12:36 -05:00
Kumar Gala 8295b94400 pci/fsl_pci_init: Use PCIe capability to determine if controller is PCIe
Change the code to use the PCIe capabilities register to determine if we
are a PCIe controller or not.  Additionally cleaned up some white space
and formatting in the file.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2009-08-28 17:12:36 -05:00
Kumar Gala cb151aa2cf pci/fsl_pci_init: Fold fsl_pci_setup_inbound_windows into fsl_pci_init
Every platform that calls fsl_pci_init calls fsl_pci_setup_inbound_windows
before it calls fsl_pci_init.  There isn't any reason to just call it
from fsl_pci_init and simplify things a bit.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2009-08-28 17:12:35 -05:00
Kumar Gala fb3143b35e pci/fsl_pci_init: Fold pci_setup_indirect into fsl_pci_init
Every platform that calls fsl_pci_init calls pci_setup_indirect before
it calls fsl_pci_init.  There isn't any reason to just call it from
fsl_pci_init and simplify things a bit.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2009-08-28 17:12:35 -05:00
Sandeep Paulraj 77b351cd0f NAND: DaVinci: V2 Adding 4 BIT ECC support
This patch adds 4 BIT ECC support in the DaVinci NAND
driver. Tested on both the DM355 and DM365.

Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
Signed-off-by: Scott Wood <scottwood@freescale.com>
2009-08-26 15:37:03 -05:00
Sandeep Paulraj f83b7f9e8a MTD:NAND: ADD new ECC mode NAND_ECC_HW_OOB_FIRST
This patch adds the new mode NAND_ECC_HW_OOB_FIRST in the nand code to
support 4-bit ECC on TI DaVinci devices with large page (up to 2K) NAND
chips.  This ECC mode is similar to NAND_ECC_HW, with the exception of
read_page API that first reads the OOB area, reads the data in chunks,
feeds the ECC from OOB area to the ECC hw engine and perform any
correction on the data as per the ECC status reported by the engine.

This patch has been accepted by Andrew Morton and can be found at

http://userweb.kernel.org/~akpm/mmotm/broken-out/mtd-nand-add-new-ecc-mode-ecc_hw_oob_first.patch

Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
Signed-off-by: Sneha Narnakaje <nsnehaprabha@ti.com>
Signed-off-by: Scott Wood <scottwood@freescale.com>
2009-08-26 15:37:03 -05:00
Ilya Yanok 36fab997d8 mxc_nand: add nand driver for MX2/MX3
Driver for NFC NAND controller found on Freescale's MX2 and MX3
processors. Ported from Linux. Tested only with i.MX27 but should
works with other MX2 and MX3 processors too.

Signed-off-by: Ilya Yanok <yanok@emcraft.com>
Signed-off-by: Scott Wood <scottwood@freescale.com>
2009-08-26 15:37:03 -05:00
Sandeep Paulraj a2c65b47ef NAND: ADD page Parameter to all read_page/read_page_raw API's
This patch adds a new "page" parameter to all NAND read_page/read_page_raw
APIs.  The read_page API for the new mode ECC_HW_OOB_FIRST requires the
page information to send the READOOB command and read the OOB area before
the data area.

This patch has been accepted by Andrew Morton and can be found at
http://userweb.kernel.org/~akpm/mmotm/broken-out/mtd-nand-add-page-parameter-to-all-read_page-read_page_raw-apis.patch

WE would like this to become part of the u-boot GIT as well

Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
Signed-off-by: Sneha Narnakaje <nsnehaprabha@ti.com>
Signed-off-by: Scott Wood <scottwood@freescale.com>
2009-08-26 15:37:02 -05:00
Heiko Schocher de4250929f 83xx, kmeter1: added NAND support
Signed-off-by: Heiko Schocher <hs@denx.de>
Signed-off-by: Scott Wood <scottwood@freescale.com>
2009-08-26 15:37:02 -05:00
Kyungmin Park ecad289fc6 OneNAND: Remove unused read_spareram
Remove unused read_spareram and add unlock_all as kernel does

Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Scott Wood <scottwood@freescale.com>
2009-08-26 15:37:02 -05:00
Matthias Kaehlcke 403ce1f759 KB9202: Add NAND support
Add KB9202 NAND driver

Signed-off-by: Matthias Kaehlcke <matthias@kaehlcke.net>
Signed-off-by: Scott Wood <scottwood@freescale.com>
2009-08-26 15:37:01 -05:00
Wolfgang Denk d7f4d14a8b Merge branch 'next' of git://www.denx.de/git/u-boot-coldfire into next 2009-08-26 21:29:32 +02:00
TsiChung Liew f6a309080b ColdFire: Fix compile warning messages
Change %08lX to %08X in board.c. Remove unused variable
'oscillator' in mcf5227x/cpu_init.c and 'scm2' in
mcf532x/cpu_init.c. Provide argument type cast in
drivers/dma/MCD_dmaApi.c.

Signed-off-by: TsiChung Liew <tsicliew@gmail.com>
2009-08-26 03:44:31 -05:00
Niklaus Giger 3a7b2c21fb Support up to 7 banks for ids as specified in JEDEC JEP106Z
see http://www.jedec.org/download/search/jep106Z.pdf
Add some second source legacy flash chips 256x8.

Signed-off-by: Niklaus Giger <niklaus.giger@member.fsf.org>
Signed-off-by: Stefan Roese <sr@denx.de>
2009-08-26 08:58:27 +02:00
Wolfgang Denk d3870bd2d8 Merge branch 'next' of git://git.denx.de/u-boot-net into next 2009-08-25 23:03:22 +02:00
Wolfgang Denk 68ccfa482b Merge branch 'master' into next 2009-08-25 22:57:10 +02:00
Kim Phillips 0d071cdd78 net: tsec - handle user interrupt while waiting for PHY auto negotiation to complete
if you don't have firmware installed for the PHY to come to life, this
wait can be painful - let's give the option to avoid it if we want.

Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
Acked-by: Andy Fleming <afleming@freescale.com>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2009-08-25 13:35:55 -07:00
Robin Getz 488feef852 Add debug message for Blackfin Ethernet Rx function.
Add a simple print for the Blackfin's Ethernet Rx function,
so we can debug incomming Ethernet functions easier.

Signed-off-by: Robin Getz <rgetz@blackfin.uclinux.org>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2009-08-25 13:35:54 -07:00
Ben Warren b1c0eaac11 Convert CS8900 Ethernet driver to CONFIG_NET_MULTI API
All in-tree boards that use this controller have CONFIG_NET_MULTI added
Also:
  - changed CONFIG_DRIVER_CS8900 to CONFIG_CS8900
  - changed CS8900_BASE to CONFIG_CS8900_BASE
  - changed CS8900_BUS?? to CONFIG_CS8900_BUS??
  - cleaned up line lengths
  - modified VCMA9 command function that accesses the device
  - removed MAC address initialization from lib_arm/board.c

Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
Tested-by: Wolfgang Denk <wd@denx.de>
Acked-by: Wolfgang Denk <wd@denx.de>
2009-08-25 13:35:54 -07:00
Feng Kan 68e74567cf ppc4xx: Fix ECC Correction bug with SMC ordering for NDFC driver
Fix ECC Correction bug where the byte offset location were double
flipped causing correction routine to toggle the wrong byte location
in the ECC segment. The ndfc_calculate_ecc routine change the order
of getting the ECC code.
        /* The NDFC uses Smart Media (SMC) bytes order */
        ecc_code[0] = p[2];
        ecc_code[1] = p[1];
        ecc_code[2] = p[3];
But in the Correction algorithm when calculating the byte offset
location, the s1 is used as the upper part of the address. Which
again reverse the order making the final byte offset address
location incorrect.
	byteoffs = (s1 << 0) & 0x80;
	.
	.
	byteoffs |= (s0 >> 4) & 0x08;
The order is change to read it in straight and let the correction
function to revert it to SMC order.

Signed-off-by: Feng Kan <fkan@amcc.com>
Acked-by: Victor Gallardo <vgallardo@amcc.com>
Acked-by: Prodyut Hazarika <phazarika@amcc.com>
Signed-off-by: Stefan Roese <sr@denx.de>
2009-08-25 17:41:42 +02:00
Albin Tonnerre 6b8548b0f7 Add driver for the ST M41T94 SPI RTC
This RTC is used in some Calao boards. The driver code is taken from
the linux rtc-m41t94 driver

Signed-off-by: Albin Tonnerre <albin.tonnerre@free-electrons.com>
2009-08-25 12:57:55 +02:00
Albin Tonnerre 885fc78c28 Switch from per-driver to common definition of bin2bcd and bcd2bin
Signed-off-by: Albin Tonnerre <albin.tonnerre@free-electrons.com>
Acked-by: Stefan Roese <sr@denx.de>
2009-08-25 12:57:55 +02:00
Albin Tonnerre e84aba135e Replace BCD2BIN and BIN2BCD macros with inline functions
In the process, also remove backward-compatiblity macros BIN_TO_BCD and
BCD_TO_BIN and update the sole board using them to use the new bin2bcd
and bcd2bin instead

Signed-off-by: Albin Tonnerre <albin.tonnerre@free-electrons.com>
Acked-by: Stefan Roese <sr@denx.de>
Acked-by: Detlev Zundel <dzu@denx.de>
2009-08-25 12:57:55 +02:00
Jean-Christophe PLAGNIOL-VILLARD a3c5057a6c eeprom_m95xxx: remove unused variable i
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2009-08-21 23:36:19 +02:00
Wolfgang Denk db81c0d276 Merge branch 'master' of git://git.denx.de/u-boot-net 2009-08-21 23:03:58 +02:00
Giulio Benetti 1fc1d9aed0 add WATCHDOG_RESET() on nand write and read
Signed-off-by: giulio.benetti@micronovasrl.com
Acked-by: Wolfgang Denk <wd@denx.de>
Signed-off-by: Scott Wood <scottwood@freescale.com>
2009-08-21 22:55:21 +02:00
Peter Tyser b1e849f220 tsec: Wait for auto-negotiation to complete without link
Previously, waiting for auto-negotiation would only occur if a valid
link had been detected.  Problems arose when attempting to use a
tsec immediately after bootup but before link was achieved, eg:
=> dhcp
Auto-neg error, defaulting to 10BT/HD
eTSEC1: No link.
Auto-neg error, defaulting to 10BT/HD
eTSEC2: No link.
=>

With this patch applied the same operation as above resulted in:
=> dhcp
Waiting for PHY auto negotiation to complete. done
Enet starting in 1000BT/FD
Speed: 1000, full duplex

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2009-08-21 10:35:30 -07:00
Simon Kagstrom 477fa6378f arm: kirkwood: See to it that sent data is 8-byte aligned
U-boot might use non-8-byte-aligned addresses for sending data, which
the kwgbe_send doesn't accept (bootp does this for me). This patch
copies the data to be sent to a malloced temporary buffer if it is
non-aligned.

Signed-off-by: Simon Kagstrom <simon.kagstrom@netinsight.net>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2009-08-21 09:57:33 -07:00
Simon Kagstrom cad713bf75 Wait for the link to come up on kirkwood network init
This patch makes the device wait for up to 5 seconds for the link to
come up, similar to what many of the other network drivers do. This
avoids confusing situations where, e.g., a tftp fails when initiated
early after U-boot has started (before the link has come up).

Signed-off-by: Simon Kagstrom <simon.kagstrom@netinsight.net>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2009-08-21 09:57:33 -07:00
Simon Kagstrom bb1ca3b27f arm:kirkwood Define kirkwood phy address magic number
Signed-off-by: Simon Kagstrom <simon.kagstrom@netinsight.net>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2009-08-21 09:57:33 -07:00
Timur Tabi f81ecb5d33 e1000: fix PCI memory addressing
The Intel E1000 driver was making assumptions about the relationship between
some virtual, physical, and PCI addresses.

Also fix some bad usage of the DEBUGOUT macro

Signed-off-by: Timur Tabi <timur@freescale.com>
Acked-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2009-08-21 09:57:33 -07:00
John Schmoller 7dedefdf74 flash: Fix CFI buffer size bug
Fix bug introduced by 9c048b5234.

The cfi_flash.c driver cast the flash buffer size to a uchar in
flash_write_cfibuffer(). On some flash parts, (tested on Numonyx
part PC32F512M29EWH), the buffer size is 1KB. Remove the cast to
uchar to enable buffer sizes to be larger.

Signed-off-by: John Schmoller <jschmoller@xes-inc.com>
Signed-off-by: Stefan Roese <sr@denx.de>
2009-08-13 09:28:20 +02:00
Heiko Schocher 3426d65daa dtt, lm81: move unneccessary printf into a debug printf
Signed-off-by: Heiko Schocher <hs@denx.de>
2009-08-11 21:59:08 +02:00
Richard Retanubun 1443cd7e54 UEC FIXED PHY: Determine fixed-phy port using UEC interface name.
Fixed a misunderstanding in the original implementation, 'devnum' that
was used in the cpu/ppc4xx/4xx_enet.c implementation was NOT the
PHY's SMI address, rather it was the number of the MAC interface on
the CPU. The equivalent of this for uec_phy will be the UEC number
stored in mii_info->dev->name. Usage example is updated for uec.

Signed-off-by: Richard Retanubun <RichardRetanubun@RuggedCom.com>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2009-08-10 16:07:54 -07:00
Richard Retanubun 1a9519373b Assigned a static SMI address to all UECs TBIPA address.
It is set to 0x1F by default and can be overwritten on the board
header file by defining CONFIG_UTBIPAR_INIT_TBIPA. This allows
the CPU to simply "reserve" one SMI address instead of using
a different one for each UEC.

Signed-off-by: Richard Retanubun <RichardRetanubun@RuggedCom.com>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2009-08-10 15:55:42 -07:00
Prafulla Wadaskar 9fd38a01cb net: kirkwood: updates: used eth_setenv_enetaddr api
eth_setenv_enetaddr is avaible by upper layer
using this saves 204 bytes on total image size

used Local OUI instead of Marvell OUI for
random MAC address generation logic

Signed-off-by: Prafulla Wadaskar <prafulla@marvell.com>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2009-08-10 14:58:13 -07:00
Roy Zang ecbd2078a1 Fix E1000 build warning on AP1000 board
Fix E1000 build warning on AP1000 board
 Fix the build warning on AP1000 board:
 e1000.c:131: warning: 'e1000_read_eeprom' used but never defined
 e1000.c:2012: warning: 'e1000_set_phy_mode' defined but not used

Signed-off-by: Roy Zang <tie-fei.zang@freescale.com>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2009-08-10 14:53:54 -07:00
Prafulla Wadaskar 08c2df33f1 net: phy: bugfixes: mv88E61xx compiler warnings fixed
1. mv88E61xx driver compiler warnings fixed
2. idstr if-else statements changed to switch() construct
   and added default case too.
   This fixed idstr may be uninitialized warning

Signed-off-by: Prafulla Wadaskar <prafulla@marvell.com>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2009-08-10 14:53:52 -07:00
Po-Yu Chuang 750326e5d5 arm: A320: driver for FTMAC100 ethernet controller
This patch adds an FTMAC100 ethernet driver for Faraday A320 evaluation board.

Signed-off-by: Po-Yu Chuang <ratbert@faraday-tech.com>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2009-08-10 14:53:52 -07:00
Wolfgang Denk 53cc18c71b Minor coding style cleanup.
Signed-off-by: Wolfgang Denk <wd@denx.de>
2009-08-10 10:38:34 +02:00
Ilya Yanok ba3dbaf281 mxc-mmc: sdhc host driver for MX2 and MX3 proccessor
This is a port of Linux driver for SDHC host controller hardware
found on Freescale's MX2 and MX3 processors. Uses new generic MMC
framework (CONFIG_GENERIC_MMC) and it looks like there are some
problems with a framework (at least on LE cpus). Some of these
problems are addressed in the following patches.

Signed-off-by: Ilya Yanok <yanok@emcraft.com>
2009-08-09 23:47:38 +02:00
Albin Tonnerre 3ac374c0f0 Add driver for the ST M95xxx SPI EEPROM
This chip is used in a number of boards manufactured by Calao-Systems
which should be supported soon. This driver provides the necessary
spi_read and spi_write functions necessary to communicate with the chip.

Signed-off-by: Albin Tonnerre <albin.tonnerre@free-electrons.com>
2009-08-09 23:45:14 +02:00
Josh Boyer 317734966e Dual-license IBM code contributions
It was brought to our attention that U-Boot contains code derived from the
IBM OpenBIOS source code originally provided with some of the older PowerPC
4xx development boards.  As a result, the original license of this code has
been carried in the various files for a number of years in the U-Boot project.

IBM is dual-licensing the IBM code contributions already present in U-Boot
under either the terms of the GNU General Public License version 2, or the
original code license already present.

Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
2009-08-09 23:15:33 +02:00
Jens Scharsig 1c6232f1e2 bus_vcxk.c: fix warning: unused variable 'lineptr'
Signed-off-by: Jens Scharsig <esw@bus-elektronik.de>
2009-08-09 22:49:16 +02:00
Wolfgang Denk 81813cb01f Merge branch 'master' of git://git.denx.de/u-boot-net 2009-08-08 12:08:09 +02:00
Dirk Behme 894113529e omap3: replace all instances of gpmc config struct by one global
Signed-off-by: Matthias Ludwig <mludwig@ultratronik.de>
Signed-off-by: Dirk Behme <dirk.behme@googlemail.com>
2009-08-08 11:34:11 +02:00
Dirk Behme 97a099eaa4 omap3: remove typedefs for configuration structs
Signed-off-by: Matthias Ludwig <mludwig@ultratronik.de>
Signed-off-by: Dirk Behme <dirk.behme@googlemail.com>
2009-08-08 11:33:23 +02:00
Roy Zang aa0707897c Add Intel E1000 PCIE card support
Based on Intel PRO/1000 Network Driver 7.3.20-k2
  Add Intel E1000 PCIE card support. The following cards are added:
  INTEL_82571EB_COPPER
  INTEL_82571EB_FIBER,
  INTEL_82571EB_SERDES
  INTEL_82571EB_QUAD_COPPER
  INTEL_82571PT_QUAD_COPPER
  INTEL_82571EB_QUAD_FIBER
  INTEL_82571EB_QUAD_COPPER_LOWPROFILE
  INTEL_82571EB_SERDES_DUAL
  INTEL_82571EB_SERDES_QUAD
  INTEL_82572EI_COPPER
  INTEL_82572EI_FIBER
  INTEL_82572EI_SERDES
  INTEL_82572EI
  INTEL_82573E
  INTEL_82573E_IAMT
  INTEL_82573L
  INTEL_82546GB_QUAD_COPPER_KSP3
  INTEL_80003ES2LAN_COPPER_DPT
  INTEL_80003ES2LAN_SERDES_DPT
  INTEL_80003ES2LAN_COPPER_SPT
  INTEL_80003ES2LAN_SERDES_SPT

 82571EB_COPPER dual ports,
 82572EI single port,
 82572EI_COPPER single port PCIE cards
 and
 82545EM_COPPER,
 82541GI_LF
 pci cards are tested on both  P2020 board
 and MPC8544DS board.

 Signed-off-by: Roy Zang <tie-fei.zang@freescale.com>

Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2009-08-08 02:26:05 -07:00
Matthias Ludwig 187af954cf omap3: embedd gpmc_cs into gpmc config struct
Embedd chip select configuration into struct for gpmc config
instead of having it completely separated as suggested by
Wolfgang Denk on
http://lists.denx.de/pipermail/u-boot/2009-May/052247.html

Signed-off-by: Matthias Ludwig <mludwig@ultratronik.de>
2009-08-07 23:31:51 +02:00
Wolfgang Denk cb32ed1fc2 Merge branch 'next' of git://git.denx.de/u-boot-coldfire 2009-08-04 21:54:11 +02:00
Wolfgang Denk 108f56b056 Merge branch 'master' of git://git.denx.de/u-boot-i2c 2009-07-30 00:36:25 +02:00
Kumar Gala 4c2e3da82d Update Freescale copyrights to remove "All Rights Reserved"
"All Rights Reserved" conflicts with the GPL.

Signed-off-by: Kumar Gala <kumar.gala@freescale.com>
2009-07-29 09:59:22 +02:00
Tom Rix fccc0fcaaa OMAP3 Move twl4030 mmc function
Because twl4030 now has its own device files, move and rename
twl4030_mmc_config.

twl4030_mmc_config initializes the twl4030 power setting to
the mmc device.  Because it is in the twl4030 power domain, move
it out of drivers/mmc/omap3_mmc.c and into drivers/power/twl4030.c.

The function was renamed to twl4030_power_mmc_init because all
the functions in this file are to have the format

twl4030_power_<device>_<action>

In this case the suffix is mmc_init so
device : mmc
action : init

Signed-off-by: Tom Rix <Tom.Rix@windriver.com>
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Acked-by: Heiko Schocher <hs@denx.de>
2009-07-29 09:57:43 +02:00
Tom Rix 2c15513010 OMAP3 Move twl4030 power and led functions
Because twl4030 now has its own device files, move exiting
omap3 power_init_r to a new location.

power_init_r is the only function in board/omap3/common.
It initializes the twl4030 power for the board and enables
the led.

The power part of the the function is moved to twl4030_power_init in
drivers/power/twl4030.c The power compilation is conditional on the
existing config variable CONFIG_TWL4030_POWER.

The led part is moved to twl4030_led_init in the new file
drivers/misc/twl4030_led.c  The led compilation is conditional on
the new config variable CONFIG_TWL4030_LED

The directory board/omap3/common was removed because power_init_r
was the only function in it.

Signed-off-by: Tom Rix <Tom.Rix@windriver.com>
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Acked-by: Heiko Schocher <hs@denx.de>
2009-07-29 09:57:30 +02:00
Tom Rix cd7826359e TWL4030 Add power reset button
The Zoom2 power reset button is on the top right side of the
main board.  Press and hold for about to 8 seconds to completely
reset the board.

Some of the beta boards have a hardware problem that prevents
using this feature.  If is difficult to further characterize the
boards that fail.  So disable resetting for all beta boards.

The Zoom1 reset button is the red circle on the top right,
front of the board.  Press and hold the button for 8 seconds to
completely reset the board.

After analyzing beagle, it was determined that other boards
that use the twl4030 for power managment can also make use
this function.

The resetting is done by the power management part of the twl4030.
Since there is no existing drivers/power, add one.

The compilation of power/twl4030.h is controlled by the config
variable CONFIG_TWL4030_POWER

Signed-off-by: Tom Rix <Tom.Rix@windriver.com>
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Acked-by: Heiko Schocher <hs@denx.de>
2009-07-28 08:56:31 +02:00
Tom Rix 7f79dfb48b OMAP I2C Fix the sampling clock.
This problem is seen on Zoom1 and Zoom2 in the startup and
when i2c probe is used

Before :

In:    serial
Out:   serial
Err:   serial
timed out in wait_for_bb: I2C_STAT=1000
timed out in wait_for_bb: I2C_STAT=1000
timed out in wait_for_bb: I2C_STAT=1000
timed out in wait_for_pin: I2C_STAT=1000
I2C read: I/O error
timed out in wait_for_bb: I2C_STAT=1000
timed out in wait_for_bb: I2C_STAT=1000
Die ID #327c00020000000004013ddd05026013
Hit any key to stop autoboot:  0
OMAP3 Zoom1# i2c probe
Valid chip addresses:timed out in wait_for_bb: I2C_STAT=1000
 02 03 04 05 06 07 08 09 0A 0B 0C 0D <snip>

After :

In:    serial
Out:   serial
Err:   serial
Die ID #327c00020000000004013ddd05026013
Hit any key to stop autoboot:  0
OMAP3 Zoom1# i2c probe
Valid chip addresses: 48 49 4A 4B

The addresses are for the twl4030.

The prescalar that converts the function clock to the sampling
clock is hardcoded to 0.  The reference manual recommends 7
if the function clock is 96MHz.

Instead of just changing the hardcoded values, the prescalar
is calculated from the value I2C_IP_CLK.

The i2c #defines are in kHz.  The speed passed into the
i2c init routine is in Hz.  To be consistent, change the
defines to be in Hz.

The timing calculations are based on what is done in the
linux 2.6.30 kernel in drivers/i2c/buses/i2c_omap.c as
apposed to what is done in TRM.

The major variables in the timing caculations are
specified as #defines that can be overriden as required.

The variables and their defaults are

I2C_IP_CLK				SYSTEM_CLOCK_96
I2C_INTERNAL_SAMPLING_CLK		19200000
I2C_FASTSPEED_SCLL_TRIM			6
I2C_FASTSPEED_SCLH_TRIM			6
I2C_HIGHSPEED_PHASE_ONE_SCLL_TRIM	I2C_FASTSPEED_SCLL_TRIM
I2C_HIGHSPEED_PHASE_ONE_SCLH_TRIM	I2C_FASTSPEED_SCLH_TRIM
I2C_HIGHSPEED_PHASE_TWO_SCLL_TRIM	I2C_FASTSPEED_SCLL_TRIM
I2C_HIGHSPEED_PHASE_TWO_SCLH		I2C_FASTSPEED_SCLH_TRIM

This was runtime verified on Zoom1, Zoom2, Beagle and Overo.
The 400kHz and 3.4M cases were verifed on test Zoom1,
Zoom2, Beagle and Overo configurations.

Testing for omap2 will be done in a second step as Nishanth
and Jean-Christophe commented.

Signed-off-by: Tom Rix <Tom.Rix@windriver.com>
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Acked-by: Heiko Schocher <hs@denx.de>
2009-07-28 08:52:33 +02:00
Heiko Schocher 4ce5a72851 arm, i2c: added support for the TWSI I2C Interface
Signed-off-by: Heiko Schocher <hs@denx.de>
2009-07-28 08:20:58 +02:00
Reinhard Arlt c2e49f706b mpc83xx: Add esd VME8349 board support
This patch adds support for the esd VME8349 board equipped with the
MPC8349. It's a VME PMC carrier board equipped with the Tundra
TSI148 VME-bridge.

Signed-off-by: Reinhard Arlt <reinhard.arlt@esd-electronics.com>
Signed-off-by: Stefan Roese <sr@denx.de>
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
2009-07-27 18:36:36 -05:00
Wolfgang Denk 8bf7437c01 Merge branch 'master' of git://git.denx.de/u-boot-video 2009-07-26 23:15:57 +02:00
Anatolij Gustschin 04538cdb75 video: bus_vcxk.c: fix style issues added by 50217dee
Signed-off-by: Anatolij Gustschin <agust@denx.de>
2009-07-26 13:18:43 +02:00
Jens Scharsig 50217deeb0 new video driver for bus vcxk framebuffers
This patch adds a new video driver

* adds common bus_vcxk framebuffer driver

Signed-off-by: Jens Scharsig <esw@bus-elektronik.de>
[agust@denx.de: fixed lots of style issues before applying]
Signed-off-by: Anatolij Gustschin <agust@denx.de>
2009-07-26 13:17:21 +02:00
Prafulla Wadaskar 44259bb9e6 usb: bugfix driver/usb/host/ehci-hcd.c function ehci_submit_root
This change is cheked in Linux source and fix found to be in sync.
This patch is tested for USB host interface on Kirkwood based
Sheevaplug platform (ARM little endian board)

Risk: the impact of this patch is not validated on big endian board.
This need to be checked...

Signed-off-by: Prafulla Wadaskar <prafulla@marvell.com>
Signed-off-by: Remy Bohmer <linux@bohmer.net>
2009-07-23 23:27:06 +02:00
Wolfgang Denk 28958b8bea Coding Style cleanup; update CHANGELOG.
Signed-off-by: Wolfgang Denk <wd@denx.de>
2009-07-23 22:23:23 +02:00
Mike Frysinger 9aef738885 unify HOST_CFLAGS and HOSTCFLAGS
The top build system sets up HOSTCFLAGS a bit and exports it, but other
places use HOST_CFLAGS instead.  Unify the two as HOSTCFLAGS so that the
values stay in sync.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-07-23 21:26:14 +02:00
Kumar Gala cb6d0b72c2 ahci: Fix gcc 4.4 compiler warning
ahci.c: In function 'ata_scsiop_read_capacity10':
ahci.c:616: warning: dereferencing type-punned pointer will break strict-aliasing rules

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2009-07-23 21:04:58 +02:00
Kumar Gala 51d91e1a25 drivers/bios_emulator: Fix gcc 4.4 compiler warning
biosemu.c: In function 'BE_setVGA':
biosemu.c:147: warning: dereferencing type-punned pointer will break strict-aliasing rules

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2009-07-23 21:03:33 +02:00
Ilya Yanok 0b23fb368d fec_mxc: driver for FEC ethernet controller on i.MX27
Signed-off-by: Ilya Yanok <yanok@emcraft.com>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2009-07-22 22:59:07 -07:00
Alessio Centazzo 0544c63681 ppc4xx: Fixed compilation warning in 4xx_enet.c
This patch fixes a compilation warning for some Ethernet PHY-less
PPC4xx platforms (440SPE based ones) and a potential compilation
error for 440SP platforms (use of undefined 'ethgroup' variable).
In the original code and in case of 440SPE platforms, 'ethgroup'
is initialized to -1 and never modified.  Later in the function,
within an #ifdef statement, an 'if statement' executes code only
if 'ethgroup' is set to 4, therefore it is harmless to avoid
executing the 'if statement' by removing the CONFIG_440SPE from
the affected #ifdefs.  In case of 440SP platforms  with on-board
Ethernet PHY, 'ethgroup' is undefined but used (there are not such
platforms in the repository yet). All other architectures are not
affected by this change.

Signed-off-by: Alessio Centazzo acpatin@yahoo.com
Acked-by: Stefan Roese <sr@denx.de>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2009-07-22 22:53:45 -07:00
Prafulla Wadaskar 443ce4ac9d net: phy: bugfixes: mv88E61xx multichip addressing support
With these fixes, this driver works properly for multi chip
addressging mode

Bugfixes:
1. Build error fixed for function mv88e61xx_busychk_multic-fixed
2. PHY dev address error detection- fixed
3. wrong busy bit was refered in function mv88e61xx_busychk -fixed
4. invalid data read ptr was refered for RD_PHY in case of
	multichip addressing mode -fixed

The Multichip Address mode is tested with RD6281A board having
MV88E6165 switch on it

Signed-off-by: Prafulla Wadaskar <prafulla@marvell.com>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2009-07-22 22:53:45 -07:00
Simon Kagstrom 16025ea455 arm: Kirkwood: Check the error summary bit for error detection
The Marvell documentation for the 88f6281 states that the error coding
is only valid if the error summary and last frame bits in the transmit
descriptor status field are set. This patch adds checks for these for
transmit (I would get transmit errors on bootp with the current check,
which I believe are spurious).

Signed-off-by: Simon Kagstrom <simon.kagstrom@netinsight.net>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2009-07-22 22:53:45 -07:00
Simon Kagstrom 7b05f5e027 arm: Kirkwood: Fix compiler optimization bug for kwgbe_send
kwgbe_send/recv both have loops waiting for the hardware to set  a bit.
GCC 4.3.3 cleverly optimizes the send case to ... a while(1); loop. This
patch uses readl to force a read from device memory. Other volatile
accesses have also been replaced with readl/writel where appropriate
(as per suggestions on the U-boot mailing list).

Signed-off-by: Simon Kagstrom <simon.kagstrom@netinsight.net>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2009-07-22 22:53:45 -07:00
Richard Retanubun 3f6b18ffd9 MIIPHYBB: Return 0xFFFF if the PHY is not asserting TA.
This patch sets the returned value to 0xFFFF if the PHY does not exist
and does not assert Transfer Acknowledge. A NULL check for the value
pointer is also added for buffer overflow protection.

Without this patch 'mii info' will  show 'phantom' devices because the
value will be not be initialized and return with some random value.

Signed-off-by: Richard Retanubun <RichardRetanubun@RuggedCom.com>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2009-07-22 22:53:44 -07:00
Ben Warren 736fead8fd Convert SMC911X Ethernet driver to CONFIG_NET_MULTI API
All in-tree boards that use this controller have CONFIG_NET_MULTI added
Also:
 - changed CONFIG_DRIVER_SMC911X* to CONFIG_SMC911X*
 - cleaned up line lengths
 - modified all boards that override weak function in this driver
 - added

Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
Tested-by: Mike Frysinger <vapier@gentoo.org>
2009-07-22 22:53:44 -07:00
Poonam Aggrwal b7fe25d2a8 P2020RDB Added support of Vitesse PHYs VSC8641(RGMII) and VSC8221(SGMII)
These PHYs are on P2020RDB platform.

Also revamped Freescale copyright message in drivers/net/tsec.c.

Signed-off-by: Poonam Aggrwal <poonam.aggrwal@freescale.com>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2009-07-22 22:53:44 -07:00
Kim Phillips 88ad3fd91c net: tsec - fix dereferencing type-punned pointer will break strict-aliasing rules warning
fix this gcc 4.4 warning:

tsec.c: In function 'tsec_init':
tsec.c:200: warning: dereferencing type-punned pointer will break strict-aliasing rules

Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2009-07-22 22:53:44 -07:00
Nobuhiro Iwamatsu 88a4c2e77c sh: sh_eth: Remove garbage from printf
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu.nobuhiro@renesas.com>
CC: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2009-07-22 22:53:43 -07:00
Andreas Pretzsch 2ea20efa47 smc911x: add support for LAN9221
Signed-off-by: Andreas Pretzsch <apr@cn-eng.de>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2009-07-22 22:53:43 -07:00
Wolfgang Denk 84efbf4d14 Merge branch 'master' of git://git.denx.de/u-boot-arm 2009-07-23 00:59:37 +02:00
Dieter Kiermaier ec16441085 Kirkwood: add Marvell Kirkwood gpio driver
Signed-off-by: Dieter Kiermaier <dk-arm-linux@gmx.de>
Acked-by: Prafulla Wadaskar <prafulla@marvell.com>
Tested-by: Heiko Schocher <hs@denx.de>
2009-07-23 00:19:28 +02:00
Heiko Schocher 39df00d9ae i2c, mpc83xx: add CONFIG_SYS_I2C_INIT_BOARD for fsl_i2c
This patch adds the possibility to call a board specific
i2c bus reset routine for the fsl_i2c bus driver, and adds
this option for the keymile kmeter1 board.

The deblock sequence for this board is implemented and
tested in the following way:

CR = 0x20 (release SDA and SCL pin)
CR = 0xa0 (start read)
dummy read
dummy read
if 2. dummy read == 0x00
	3. dummy read

CR = 0x80 (SDA and SCL now 1 SR = 0x86)
CR = 0x00 (Modul reset SR=0x81)
CR = 0x80 (SDA and SCL = 1, SR = 0x81)

Signed-off-by: Heiko Schocher <hs@denx.de>
2009-07-21 07:06:26 +02:00
galak f14d81050a fsl_sata: Fix compiler warnings shown by gcc-4.4
Update fsl_sata to use common structures instead of casting
back and forth between the fsl specific ones and the common ones
(which are identical).

fsl_sata.c: In function 'scan_sata':
fsl_sata.c:550: warning: dereferencing pointer 'cfis' does break strict-aliasing rules
fsl_sata.c:549: warning: dereferencing pointer 'cfis' does break strict-aliasing rules
fsl_sata.c:548: warning: dereferencing pointer 'cfis' does break strict-aliasing rules
fsl_sata.c:545: note: initialized from here
fsl_sata.c:592: warning: dereferencing pointer 'cfis' does break strict-aliasing rules
fsl_sata.c:590: warning: dereferencing pointer 'cfis' does break strict-aliasing rules
fsl_sata.c:588: warning: dereferencing pointer 'cfis' does break strict-aliasing rules
fsl_sata.c:586: warning: dereferencing pointer 'cfis' does break strict-aliasing rules
fsl_sata.c:579: warning: dereferencing pointer 'cfis' does break strict-aliasing rules
...

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2009-07-20 23:54:58 +02:00
Ilya Yanok b86b85e261 mmc: set bus width to 1 and clock to minimum early during initialization
We need to switch back to 1-bit before initialization or SD 2.0 cards
will fail to send SCR if we've switched to 4-bit already.

Signed-off-by: Ilya Yanok <yanok@emcraft.com>
2009-07-19 22:07:29 +02:00
Kazuaki Ichinohe e405afab1d Canyonlands SATA harddisk driver
This patch adds a SATA harddisk driver for the canyonlands.
This patch is kernel driver's porting.
This patch corresponded to not cmd_scsi but cmd_sata.
This patch divided an unused member with ifndef __U_BOOT__ in the structure.

[environment variable, boot script]
setenv bootargs root=/dev/sda7 rw
setenv bootargs ${bootargs} console=ttyS0,115200
ext2load sata 0:2 0x400000 /canyonlands/uImage
ext2load sata 0:2 0x800000 /canyonlands/canyonlands.dtb
fdt addr 0x800000 0x4000
bootm 0x400000 - 0x800000

If you drive SATA-2 disk on Canyonlands, you must change parts from
PI2PCIE212 to PI2PCIE2212 on U25. We confirmed to boot by using
following disks:

1.Vendor: Fujitsu	 Type: MHW2040BS
2.Vendor: Fujitsu	 Type: MHW2060BK
3.Vendor: HAGIWARA SYS-COM:HFD25S-032GT
4.Vendor: WesternDigital Type: WD3200BJKT (CONFIG_LBA48 required)
5.Vendor: WesternDigital Type: WD3200BEVT (CONFIG_LBA48 required)
6.Vendor: Hitachi	 Type: HTS543232L9A300 (CONFIG_LBA48 required)
7.Vendor: Seagate	 Type: ST31000333AS (CONFIG_LBA48 required)
8.Vendor: Transcend	 Type: TS32GSSD25S-M
9.Vendor: MTRON		 Type: MSD-SATA1525-016

Signed-off-by: Kazuaki Ichinohe <kazuichi at fsi.co.jp>
2009-07-19 11:24:09 +02:00
Wolfgang Denk a694610d33 Merge branch 'master' of git://git.denx.de/u-boot-nand-flash 2009-07-19 00:38:23 +02:00
Jean-Christophe PLAGNIOL-VILLARD 52cb4d4fb3 stdio/device: rework function naming convention
So far the console API uses the following naming convention:

	======Extract======
	typedef struct device_t;

	int	device_register (device_t * dev);
	int	devices_init (void);
	int	device_deregister(char *devname);
	struct list_head* device_get_list(void);
	device_t* device_get_by_name(char* name);
	device_t* device_clone(device_t *dev);
	=======

which is too generic and confusing.

Instead of using device_XX and device_t we change this
into stdio_XX and stdio_dev

This will also allow to add later a generic device mechanism in order
to have support for multiple devices and driver instances.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>

Edited commit message.

Signed-off-by: Wolfgang Denk <wd@denx.de>
2009-07-18 00:27:46 +02:00
Wolfgang Denk dcf728a6af Merge branch 'master' of git://git.denx.de/u-boot-video 2009-07-17 23:05:41 +02:00
Mike Frysinger 569460ebf1 sata: namespace curr_device variable
The curr_device variable really should be namespaced with a "sata_" prefix
since it is only used by the sata code.  It also avoids random conflicts
with other pieces of code (like cmd_mmc):
common/libcommon.a(cmd_sata.o):(.data.curr_device+0x0):
	multiple definition of `curr_device'
common/libcommon.a(cmd_mmc.o):(.data.curr_device+0x0): first defined here

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-07-17 22:15:27 +02:00
Matthias Weisser 1ca298ced0 Added support for splash screen positioning
This patch adds support splash image positioning by adding an
additional variable "splashpos" to the environment. Please see
README for details.

Signed-off-by: Matthias Weisser <matthias.weisser@graf-syteco.de>
Acked-by: Matthias Fuchs <matthias.fuchs@esd.eu>
Signed-off-by: Anatolij Gustschin <agust@denx.de>
2009-07-17 15:23:41 +02:00
Anatolij Gustschin 9d173e0233 video: mb862xx: replace printf with puts
Signed-off-by: Anatolij Gustschin <agust@denx.de>
2009-07-17 15:23:40 +02:00
Anatolij Gustschin cce99b2a7d video: mb862xx: use macros instead of magic numbers
Signed-off-by: Anatolij Gustschin <agust@denx.de>
2009-07-17 15:23:40 +02:00
Anatolij Gustschin e86528671e video: mb862xx: fix coding style and remove dead code
Signed-off-by: Anatolij Gustschin <agust@denx.de>
2009-07-17 15:23:40 +02:00
Scott Wood be33b046b5 Remove legacy NAND and disk on chip code.
Legacy NAND had been scheduled for removal.  Any boards that use this
were already not building in the previous release due to an #error.

The disk on chip code in common/cmd_doc.c relies on legacy NAND,
and it has also been removed.  There is newer disk on chip code
in drivers/mtd/nand; someone with access to hardware and sufficient
time and motivation can try to get that working, but for now disk
on chip is not supported.

Signed-off-by: Scott Wood <scottwood@freescale.com>
2009-07-16 19:07:47 -05:00
Stefan Roese f2f376ab95 nand: ndfc: Remove unnecessary #ifdef's
Now that the 4xx NAND driver ndfc is moved to the common NAND driver
directory we don't need this #ifdef's anymore.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Scott Wood <scottwood@freescale.com>
Signed-off-by: Scott Wood <scottwood@freescale.com>
2009-07-16 17:52:03 -05:00
Stefan Roese 12582ac771 nand/ppc4xx: Move PPC4xx NAND driver to common NAND driver directory
Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Scott Wood <scottwood@freescale.com>
Signed-off-by: Scott Wood <scottwood@freescale.com>
2009-07-16 17:52:02 -05:00
Valeriy Glushkov 3ebf70db54 nand: fixed failed reads on corrected ECC errors in nand_util.c
Signed-off-by: Valeriy Glushkov <gvv@lstec.com>
Signed-off-by: Paulraj, Sandeep <s-paulraj@ti.com>
Signed-off-by: Scott Wood <scottwood@freescale.com>
2009-07-16 17:52:01 -05:00
David Brownell ed727d394c Typo fix: use CONFIG_SOC_DM644X, not CONFIG_SOC_DM646.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Scott Wood <scottwood@freescale.com>
2009-07-16 17:52:01 -05:00
Anton Vorontsov b33433a63f fsl_esdhc: Add device tree fixups
This patch implements fdt_fixup_esdhc() function that is used to fixup
the device tree.

The function adds status = "disabled" propery if esdhc pins muxed away,
otherwise it fixups clock-frequency for esdhc nodes.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Acked-by: Kim Phillips <kim.phillips@freescale.com>
2009-07-16 22:24:06 +02:00
Kim Phillips 9578718c1b mtd: cfi - if defined, use MAX_FLASH_BANKS_DETECT for static declarations
a.k.a cfi_mtd.c does as cfi_flash.c does.  This also prevents
the TQM834x build from doing a:

cfi_mtd.c:36: error: variably modified 'cfi_mtd_info' at file scope
cfi_mtd.c:37: error: variably modified 'cfi_mtd_names' at file scope

using gcc 4.4.

Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
Signed-off-by: Stefan Roese <sr@denx.de>
2009-07-16 15:27:45 +02:00
TsiChung Liew dec61c7851 Coldfire: Consolidate DSPI driver
Unify both MCF5227x and MCF5445x DSPI driver in CPU to
driver/spi folder for common use.

Signed-off-by: TsiChung Liew <tsicliew@gmail.com>
2009-07-14 09:46:09 -05:00
Wolfgang Denk c3ae126c2c Merge branch 'master' of git://git.denx.de/u-boot-arm 2009-07-13 23:45:02 +02:00
Wolfgang Denk 227ad917c5 Merge branch 'master' of git://git.denx.de/u-boot-cfi-flash 2009-07-13 23:38:27 +02:00
Po-Yu Chuang b4db4a7638 issue write command to base for JEDEC flash
For JEDEC flash, we should issue word programming command relative to
base address rather than sector base address. Original source makes
SST Flash fails to program sectors which are not on the 0x10000 boundaries.

e.g.
SST39LF040 uses addr1=0x5555 and addr2=0x2AAA, however, each sector
is 0x1000 bytes.

Thus, if we issue command to "sector base (0x41000) + offset(0x5555)",
it sends to 0x46555 and the chip fails to recognize that address.

This patch is tested with SST39LF040.

Signed-off-by: Po-Yu Chuang <ratbert@faraday-tech.com>
Signed-off-by: Stefan Roese <sr@denx.de>
2009-07-13 11:01:31 +02:00
Sedji Gaouaou 22ee647380 at91: Introduction of at91sam9g45 SOC.
AT91sam9g45 series is an ARM 926ej-s SOC family clocked at 400/133MHz.
It embeds USB high speed host and device, LCD, DDR2 RAM, and a full set of
peripherals.

The first board that embeds at91sam9g45 chip is the AT91SAM9G45-EKES.
On the board you can find 2 USART, USB high speed,
a 480*272 LG lcd, ethernet, gpio/joystick/buttons.

Signed-off-by: Sedji Gaouaou <sedji.gaouaou@atmel.com>
2009-07-12 17:43:34 +02:00
Kumar Gala 50243e3e7a usb: Fix compiler warning with gcc4.4
ehci-hcd.c: In function 'ehci_submit_root':
ehci-hcd.c:719: warning: value computed is not used
ehci-hcd.c:748: warning: value computed is not used

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Remy Bohmer <linux@bohmer.net>
2009-07-11 11:30:17 +02:00
Prafulla Wadaskar 1d8937a469 usb: add Marvell Kirkwood ehci host controller driver
This driver is tested on Sheevaplug platform

Signed-off-by: Prafulla Wadaskar <prafulla@marvell.com>
Signed-off-by: Remy Bohmer <linux@bohmer.net>
2009-07-09 21:33:15 +02:00
Vivek Mahajan 0806615273 mpc8xxx: USB: fix: access of ehci struct elements
This patch fixes the access to the 'ehci' struct elements which should
have been taken care off in 4ef01010aa
Sorry about that.

Signed-off-by: Vivek Mahajan <vivek.mahajan@freescale.com>
Signed-off-by: Remy Bohmer <linux@bohmer.net>
2009-07-09 21:33:15 +02:00
Bryan Wu c3a012ce65 usb: musb: add timeout via CONFIG_MUSB_TIMEOUT
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Remy Bohmer <linux@bohmer.net>
2009-07-09 21:33:15 +02:00
Mike Frysinger 7984967a94 usb: musb: drop old musb read/write prototypes
These functions are no longer defined, so remove their prototypes.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Remy Bohmer <linux@bohmer.net>
2009-07-09 21:33:15 +02:00
Prafulla Wadaskar 205a0988d8 nand: Add Marvell Kirkwood NAND driver
This patch adds a NAND driver for the Marvell Kirkwood SoC's

Signed-off-by: Prafulla Wadaskar <prafulla@marvell.com>
Acked-by: Scott Wood <scottwood@freescale.com>
2009-07-08 21:20:10 +02:00
Mingkai Hu 66372fe2ab fsl_elbc_nand: redirect the pointer of bbt pattern to RAM
The bbt descriptors contains the pointer to the bbt pattern which
are statically initialized memory struct. When relocated to RAM,
these pointers will continue point to NOR flash(or L2 SRAM, or
other boot device). If the contents of NOR flash changed or L2
SRAM disabled, it'll hang the system.

Signed-off-by: Mingkai Hu <Mingkai.hu@freescale.com>
Signed-off-by: Scott Wood <scottwood@freescale.com>
2009-07-07 17:58:10 -05:00
kevin.morfitt@fearnside-systems.co.uk 98713d2663 Bug-fix in drivers mtd nand Makefile
The S3C2410 NAND driver source file is included in the makefile instead of
the object file.

Signed-off-by: Kevin Morfitt <kevin.morfitt@fearnside-systems.co.uk>
Signed-off-by: Scott Wood <scottwood@freescale.com>
2009-07-07 17:58:09 -05:00
Jean-Christophe PLAGNIOL-VILLARD 378adfcdf4 mtd: nand: use loff_t for offset
nand_util currently uses size_t which is arch dependent and not always a
unsigned long.  Now use loff_t, as does the linux mtd layer.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Scott Wood <scottwood@freescale.com>
2009-07-07 17:58:06 -05:00
Mike Frysinger cd84423a09 mtd: nand: new base driver for memory mapped nand devices
The BF537-STAMP Blackfin board had a driver for working with NAND devices
that are simply memory mapped.  Since there is nothing Blackfin specific
about this, generalize the driver a bit so that everyone can leverage it.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Scott Wood <scottwood@freescale.com>
2009-07-07 17:58:04 -05:00
David Brownell 154b5484ac davinci_nand chipselect/init cleanup
Update chipselect handling in davinci_nand.c so that it can
handle 2 GByte chips the same way Linux does:  as one device,
even though it has two halves with independent chip selects.
For such chips the "nand info" command reports:

  Device 0: 2x nand0, sector size 128 KiB

Switch to use the default chipselect function unless the board
really needs its own.  The logic for the Sonata board moves out
of the driver into board-specific code.  (Which doesn't affect
current build breakage if its NAND support is enabled...)

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Scott Wood <scottwood@freescale.com>
2009-07-07 17:58:03 -05:00
David Brownell 6e29ed8e57 davinci_nand: cleanup II (CONFIG_SYS_DAVINCI_BROKEN_ECC)
Remove CONFIG_SYS_DAVINCI_BROKEN_ECC option.  It's not just nasty;
it's also unused by any current boards, and doesn't even match the
main U-Boot distributions from TI (which use soft ECC, or 4-bit ECC
on newer chips that support it).

DaVinci GIT kernels since 2.6.24, and mainline Linux since 2.6.30,
match non-BROKEN code paths for 1-bit HW ECC.  The BROKEN code paths
do seem to partially match what MontaVista/TI kernels (4.0/2.6.10,
and 5.0/2.6.18) do ... but only for small pages.  Large page support
is really broken (and it's unclear just what software it was trying
to match!), and the ECC layout was making three more bytes available
for use by filesystem (or whatever) code.

Since this option itself seems broken, remove it.  Add a comment
about the MV/TI compat issue, and the most straightforward way to
address it (should someone really need to solve it).

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Scott Wood <scottwood@freescale.com>
2009-07-07 17:58:01 -05:00
David Brownell fcb7747775 davinci_nand: cleanup I (minor)
Minor cleanup for DaVinci NAND code:

 - Use I/O addresses from nand_chip; CONFIG_SYS_NAND_BASE won't
   be defined when there are multiple chipselect lines in use
   (as with common 2 GByte chips).

 - Cleanup handling of EMIF control registers
    * Only need one pointer pointing to them
    * Remove incorrect and unused struct supersetting them

 - Use the standard waitfunc; we don't need a custom version

 - Partial legacy cleanup:
    * Don't initialize every board like it's a DM6446 EVM
    * #ifdef a bit more code for BROKEN_ECC

Sanity checked with small page NAND on dm355 and dm6446 EVMs;
and large page on dm355 EVM (packaged as two devices, not one).

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Scott Wood <scottwood@freescale.com>
2009-07-07 17:44:55 -05:00
Wolfgang Denk 59869ca72d Merge branch 'master' of git://git.denx.de/u-boot-video 2009-07-07 23:18:03 +02:00
Wolfgang Denk 8e5e9b940c Coding style cleanup; update CHANGELOG
Signed-off-by: Wolfgang Denk <wd@denx.de>
2009-07-07 22:35:02 +02:00
Wolfgang Denk a48ecc969f Merge branch 'master' of git://git.denx.de/u-boot-arm
Conflicts:
	drivers/spi/Makefile

Signed-off-by: Wolfgang Denk <wd@denx.de>
2009-07-07 22:22:05 +02:00
Wolfgang Denk bec9cab929 Merge branch 'master' of git://git.denx.de/u-boot-mpc5xxx 2009-07-07 21:06:07 +02:00
Wolfgang Denk 37572cde7f Merge branch 'master' of git://git.denx.de/u-boot-ubi 2009-07-07 20:58:30 +02:00
Wolfgang Denk bc1bdab940 Merge branch 'sf' of git://git.denx.de/u-boot-blackfin 2009-07-07 20:56:56 +02:00
Wolfgang Denk 73e1140b49 Merge branch 'master' of git://git.denx.de/u-boot-mpc85xx 2009-07-07 20:54:12 +02:00
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