Commit Graph

2275 Commits

Author SHA1 Message Date
Vitaly Kuzmichev ac5d32d15c USB-CDC: Fix tx/rx_req memory leaks
Remove and fix needless and destructive operations with tx/rx_req.

1) 'req' in rx_complete is always not NULL and always equals to rx_req
2) Free allocated tx_req if rx_req allocation has failed
3) Do not zero out tx/rx_req in usb_eth_init, leave this for
eth_reset_config which will be called at the next use of usb0
4) Additional check in usb_eth_recv is not required

Signed-off-by: Vitaly Kuzmichev <vkuzmichev@mvista.com>
2010-10-13 12:07:58 +02:00
Marek Vasut f2443d10ff USB: Make non-bulk delay longer in OHCI
This fixes TIMEOUT with my Kingston 32GB USB3.0 flashdrive, which I experienced
on my PXA270 (USB 1.1) Vpac270 board.

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
2010-10-13 12:07:58 +02:00
Matt Waddel 249d5219c4 ARMV7: Fixed baudrate setting in pl01x driver
The pl01x serial driver was lacking the code to switch baudrates from the
command line.  Fixed by simply saving the new baudrate and calling
serial_init() again.  Also fixed CamelCase variables, I/O accessors and
comment style.

Signed-off-by: Matt Waddel <matt.waddel@linaro.org>
2010-10-13 09:59:43 +02:00
Albert Aribaud d3497138ff mvsata_ide: adjust port init sequence
mvsata_ide_initialize_port(): adjust init sequence (SStatus
should be checked only after all writes to SControl) and
return success/failure to ide_preinit().

Also, as some tests showed init durations in the hundreds
of us, raise the time-out to 01 ms to be on the safe side.

Signed-off-by: Albert Aribaud <albert.aribaud@free.fr>
2010-10-13 09:35:54 +02:00
Reinhard Meyer 0d3fe2b153 sf: turn probe switch into a lookup table
This allows for arbitrarily long manufacturer ids following the JEDEC
standard of 0x7f continuation bytes.  It also makes adding new entries
easier as it's just one element in an array.  The downside is that it
increases code size a bit, but we're talking ~50 bytes.

Signed-off-by: Reinhard Meyer <u-boot@emk-elektronik.de>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-10-12 21:08:25 -04:00
Ilya Yanok 7f0d241d5c led_display: split led display support into generic and hw-dependent parts
Split the display command into generic interface and hardware-specific
realization for PDSP188x LED display found on hmi1001 and manroland
boards. Simple interface for LED displays is defined in
include/led-display.h and described in doc/README.LED_display.
Driver-specific implementation was moved into drivers/misc/pdsp188x.c
file (enabled with CONFIG_PDSP188x set).

Signed-off-by: Ilya Yanok <yanok@emcraft.com>
2010-10-12 22:44:33 +02:00
Wolfgang Denk c0c3590bb2 Merge branch 'master' of git://git.denx.de/u-boot-cfi-flash 2010-10-12 20:49:27 +02:00
Wolfgang Denk 0ee8746a93 Merge branch 'master' of git://git.denx.de/u-boot-net 2010-10-12 20:44:46 +02:00
John Schmoller 0e3fa01a63 cfi_flash: Fix "Unknown FLASH" error message
When a CFI flash chip could not be detected an error message similar to
the following would be printed on bootup:

 FLASH: ## Unknown FLASH on Bank 1 - Size = 0x01000000 = 0 MB

The printf incorrectly converted the flash size into megabytes.  This
patch fixes the printing of the flash size in megabytes:

 FLASH: ## Unknown FLASH on Bank 1 - Size = 0x01000000 = 16 MB

Signed-off-by: John Schmoller <jschmoller@xes-inc.com>
Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
Signed-off-by: Stefan Roese <sr@denx.de>
2010-10-12 08:59:15 +02:00
Thomas Chou 1ca6d0df3e smc91111: add write_hwaddr
Add smc_write_hwaddr() to set mac address.
Clear dev before use.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Acked-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2010-10-11 23:07:28 -07:00
Ben Gardiner 7b37a27e14 davinci_emac: davinci_eth_set_mac_addr to ->write_hwaddr
This patch proposes to migrate the davinci_emac driver to using the
eth_device->write_hwaddr function pointer as suggested by Ben Warren.

All the davinci boards had the behaviour, prior to this patch, of
sync'ing the environment variable enetaddr with the MAC address read
from non-volatile storage on boot -- when the two locations disagreed,
the environment variable value took precendence. This patch keeps the
same behaviour but lets eth_initialize take care of it.

This patch refactors davinci_emac setup in the boards so that the MAC
address is read from non-volatile storage into the environment variable
and then the environment variable value is use in eth_intialize. The
only exception is the direct call to davinci_eth_set_mac_addr made by
the da830evm board init which was changed into an assignment of the
enetaddr field.

Signed-off-by: Ben Gardiner <bengardiner@nanometrics.ca>
Tested-by: Nick Thompson <nick.thompson@ge.com>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2010-10-11 23:07:17 -07:00
Michal Simek 042272a6f2 net: Move Emaclite to NET_MULTI
Emaclite was using old net api that's why
this patch move emaclite to NET_MULTI api.

Signed-off-by: Michal Simek <monstr@monstr.eu>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2010-10-11 23:07:04 -07:00
Michal Simek 3f91ec0fa1 net: Fix emaclite driver to support little-endian microblaze
Support New emaclite AXI IP.

Signed-off-by: Michal Simek <monstr@monstr.eu>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2010-10-11 23:00:29 -07:00
Ilya Yanok f87a6f27e6 mpc5xxx_fec: add call to reset_phy() after PHY initialization
Some boards need their board-specific PHY quirks to be called
to PHY to work normally. As mpc5xxx_fec driver uses on demand
PHY initialization and can even reinit PHY during normal operation
we can't count on reset_phy() call from arch/<arch>/lib/board.c
(it is most likely called _before_ we init the PHY from the
driver) so we need to add call to reset_phy() directly in the
driver.

Signed-off-by: Ilya Yanok <yanok@emcraft.com>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2010-10-11 23:00:29 -07:00
Andreas Bießmann 77179067db drivers/net/at91_emac.c: change return values
Some return values pretended correct pass. This patch changes them according
to README.drivers.net. This patch changes e.g. command 'dhcp' to stop after
errorneous autonegotiation.

Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2010-10-11 23:00:29 -07:00
Andreas Bießmann e63ac4cf11 drivers/net/at91_emac.c: increase timeout for autonegotiation
This patch increases timeout for autonegotiation from 1 second to 3 seconds.
Some boards (e.g. at91rm9200ek) did not negotiate within 1 second.

Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2010-10-11 23:00:28 -07:00
Reinhard Meyer a61a81967f NET: add ENC28J60 driver using SPI framework
V3: further refinements:
- use priv member instead of container method
- allow setting of MAC address by write_hwaddr method
- avoid shutting down link between commands

Signed-off-by: Reinhard Meyer <u-boot@emk-elektronik.de>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2010-10-11 22:47:48 -07:00
Joakim Tjernlund f29c181cd4 UEC PHY: Speed up initial PHY neg.
Instead of always performing an autoneg, check if the PHY
already has a link and if it matches one of the requested
modes. Initially only 100MbFD is optimized this way.

Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2010-10-11 22:47:48 -07:00
Joakim Tjernlund b0a75d7aa3 UEC PHY: Remove strange 0.5 sec delay
This udelay looks bogus and doesn't help my board.

Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
Acked-by: Kim Phillips <kim.phillips@freescale.com>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2010-10-11 22:47:48 -07:00
Joakim Tjernlund bd6c25afd2 UEC: Don't udelay needlessly
uec_init() adds an udelay(100000) even though
the PHY status read went well, don't do that.

Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
Acked-by: Kim Phillips <kim.phillips@freescale.com>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2010-10-11 22:47:48 -07:00
Reinhard Meyer (-VC) b7081d9197 NET: move legacy enc28j60.c to sidetrack as enc28j60_lpc2292.c
This patch is required before the upcoming new enc28j60 driver
using SPI framework patch can be applied:
- Move legacy enc28j60.c to enc28j60_lpc2292.c.
- Change Makefile and the two affected boards' definition files.

Tested with ./MAKEALL ARM7 that both boards still compile.

Signed-off-by: Reinhard Meyer<info@emk-elektronik.de>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2010-10-11 22:47:48 -07:00
Enric Balletbo i Serra 456be17dbe mtd: OneNAND: add support for OneNAND manufactured by Numonyx
This patch adds the Numonyx manufacturer code (0x20) to
onenand manufacturers.

Signed-off-by: Enric Balletbo i Serra <eballetbo@gmail.com>
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Steve Sakoman <steve.sakoman@linaro.org>
Tested-by: Steve Sakoman <steve.sakoman@linaro.org>
2010-10-11 15:15:45 -05:00
Scott Wood 36650ca9f1 Followup fixes on the mtdparts spread patchset
Consolidate some code in mtd_get_len_incl_bad(), and fix a condition
where a valid partition could be reported as truncated if it has a
good block at the end of the device (unlikely, since the BBT is usually
there).

Fix mid-block declarations in net_part_size().

Signed-off-by: Scott Wood <scottwood@freescale.com>
Reviewed-by: Ben Gardiner <bengardiner@nanometrics.ca>
2010-10-11 15:11:01 -05:00
Ben Gardiner 4ba692fb1e mtd: add an mtd method for get_len_incl_bad()
The logic to 'spread' mtd partitions needs to calculate the length in
the mtd device, including bad blocks.

This patch introduces a new function, mtd_get_len_incl_bad that can
return both the length including bad blocks and whether that length
was truncated on the device. This new function will be used by the
mtdparts spread command later in this series. The definition of the
function is #ifdef'd out in configurations that do not use the new
'mtdparts spread' command.

Signed-off-by: Ben Gardiner<bengardiner@nanometrics.ca>
CC: Scott Wood <scottwood@freescale.com>
2010-10-11 15:11:00 -05:00
Scott Wood 5b8e6bb517 nand: remove dead code and suspend/resume
Get rid of the several "#if 0" sections that were keeping around Linux
code that isn't relevant to U-Boot.  Besides cluttering the code, these
sections make tracking upstream changes harder, rather than easier.
It's easy to discard obviously irrelevant diff hunks that patch rejects,
but it's not as easy to notice hunks that apply cleanly to the #if 0
section, but *are* relevant to U-Boot and require modification elsewhere.

Also remove suspend/resume, as this is not applicable to U-Boot.  Removal
saves 232 bytes on powerpc.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Tested-by: Ben Gardiner <bengardiner@nanometrics.ca>
2010-10-11 15:10:35 -05:00
Scott Wood 3048632251 nand erase: .spread, .part, .chip subcommands
A while back, in http://lists.denx.de/pipermail/u-boot/2009-June/054428.html,
Michele De Candia posted a patch to not count bad blocks toward the
requested size to be erased.  This is desireable when you're passing in
something like $filesize, but not when you're trying to erase a partition.

Thus, a .spread subcommand (named for consistency with
http://lists.denx.de/pipermail/u-boot/2010-August/075163.html) is introduced
to make explicit the user's desire to erase for a given amount of data,
rather than to erase a specific region of the chip.

While passing $filesize to "nand erase" is useful, accidentally passing
something like $fliesize currently produces quite unpleasant results, as the
variable evaluates to nothing and U-Boot assumes that you want to erase
the entire rest of the chip/partition.  To improve the safety of the
erase command, require the user to make explicit their intentions by
using a .part or .chip subcommand.  This is an incompatible user interface
change, but keeping compatibility would eliminate the safety gain, and IMHO
it's worth it.

While touching nand_erase_opts(), make it accept 64-bit offsets and sizes,
fix the percentage display when erase length is rounded up, eliminate
an inconsistent warning about rounding up the erase length which only
happened when the length was less than one block (rounding up for $filesize
is normal operation), and add a diagnostic if there's an attempt to erase
beginning at a non-block boundary.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Tested-by: Ben Gardiner <bengardiner@nanometrics.ca>
2010-10-11 15:10:17 -05:00
Scott Wood f9a5254111 nand util: read/write: accept unaligned length
The underlying code in nand_base.c already supports non-page-aligned reads
and writes, but the block-skipping wrapper code did not.

With block skipping, an unaligned start address is not useful since you
really want to be starting at the beginning of a partition -- or at least
that's where you want to start checking for blocks to skip, but we don't
(yet) support that.  So we still require the start address to be aligned.

An unaligned length, though, is useful for passing $filesize to the
read/write command, and handling it does not complicate block skipping.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Tested-by: Ben Gardiner <bengardiner@nanometrics.ca>
2010-10-11 15:09:23 -05:00
Wolfgang Denk ddf71e4cff Merge branch 'at91' of git://git.denx.de/u-boot-atmel 2010-10-11 10:24:22 +02:00
Wolfgang Denk e67f462864 Merge branch 'master' of git://git.denx.de/u-boot-imx 2010-10-11 10:19:04 +02:00
Wolfgang Denk 02b117d42b Merge branch 'sf' of git://git.denx.de/u-boot-blackfin 2010-10-11 09:52:16 +02:00
David Jander ff0dc2c433 sf: spansion: add support for S25FL032P parts
This patch introduces an extra mask-field in spansion_spi_flash_params
to support flash chips with 1-byte extended ID (like the S25FL032P).

Signed-off-by: David Jander <david@protonic.nl>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-10-06 20:50:38 -04:00
Marc-André Hébert c3cb09207f sf: spansion: fixing erasing when sector size >64KiB
The spansion_erase currently only works when the sector size is 64KB.
cmd[1] should contain the higher 8 bit of the 24 bit address of the
sector to be erased. Currently it is holding the sector index to be
erased which happens to be the same thing when the sector size is
64KB.

Signed-off-by: Marc-Andre Hebert <marc-andre.hebert@humanware.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-10-06 20:50:38 -04:00
Jeff Dischler 7d85f1dc5c ds1621: Fix negative temperature readings
Fix bug where signed data was processed as unsigned.  The bug previously
resulted in negative temperature readings wrapping around, eg -10 became
245.

Signed-off-by: Jeff Dischler <jdischler@xes-inc.com>
Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
2010-10-06 23:01:22 +02:00
Peter Tyser 9a6c80b0cf ds1621: Clean up coding style
Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
2010-10-06 23:01:21 +02:00
Peter Tyser c3e5fa0b53 ds1621: Poll for register write completion
Poll the ds1621 NV Memory Busy bit instead of waiting a static amount of
time for register writes.

Also add config retister bit defines.

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
2010-10-06 23:01:19 +02:00
Graeme Smecher 74f9e0d8a0 sf: winbond: add support W25Q64 parts
Adds support for Winbond's W25Q64 SPI flash. These devices are used on
(among others) Xilinx' SP601 and SP605 Spartan-6 evaluation boards.
Tested with "sf" commands.

Signed-off-by: Graeme Smecher <graeme.smecher@mail.mcgill.ca>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-10-06 03:34:10 -04:00
Andreas Bießmann 125637c572 atmel_usart: change register access to C structure
This patch introduces C structure definition for register footprint of atmel's
 usart.

Signed-off-by: Andreas Bießmann <biessmann@corscience.de>
2010-10-05 16:58:56 +02:00
Andreas Bießmann 38bda019e4 at91_emac.c: poll for IDLE when writing PHY
This patch replaces the unnecessary waiting in at91emac_read() and
at91emac_write() by checking the IDLE flag.

Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
2010-10-05 16:58:55 +02:00
Andreas Bießmann 4b8d77bb93 at91_emac.c: fix 'Warning: eth device name has a space!'
This patch also removes conditional nameing of at91_emac driver whether it's
connection to PHY is RMII or MII.

Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
2010-10-05 16:58:55 +02:00
Wolfgang Denk d628866474 Merge branch 'master' of git://git.denx.de/u-boot-blackfin 2010-10-05 14:42:32 +02:00
Wolfgang Denk bbf2abc0f5 Merge branch 'next' of git://git.denx.de/u-boot-video 2010-10-05 14:31:48 +02:00
Mike Frysinger 0c7148170b Blackfin: bfin_mac: convert from old style MMR macros
The old MMR defines are being scrubbed, so convert the driver to use the
new standard helper macros.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-10-02 16:00:37 -04:00
Mike Frysinger 6815f540db Blackfin: bfin_sdh: clean up send_cmd
Simplify the command setup and status checking steps, and add a proper
timeout to the status polling code to avoid possible infinite hangs.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-10-02 16:00:37 -04:00
Mike Frysinger 6f070e1867 Blackfin: bfin_spi: add optional DMA support
This moves the last piece from the old spi_flash driver to the new SPI
framework -- optional DMA RX support.  This typically cuts speeds by ~40%
at the cost of additional ~300 bytes.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-10-02 16:00:36 -04:00
Stefano Babic 2f721d1733 MXC: Fix byte-ordering in SPI driver for i.MX31/i.MX51
The actual SPI driver for i.MX31 and i.MX51 controller
use a wrong byte ordering, because it is supposed
to work only with Freescale's devices, as the Power
Controllers (PMIC). The driver is not suitable for
general purposes, because the buffers passed to spi_xfer
must be 32-bit aligned, as it is used mainly to send
integer to PMIC devices.

The patch drops any kind of limitation and makes the
driver useful with devices controlled sending commands
composed by single bytes (or by a odd number of bytes), such as
spi flash, sensor, etc.

Because the byte ordering is changed,
any current driver using this controller must be adapted, too.

Signed-off-by: Stefano Babic <sbabic@denx.de>
2010-09-30 14:42:14 +02:00
Stefano Babic 9f481e95ba MXC: Correct SPI_CPOL setting in SPI driver
The handling of the SPI_CPOL bit inside the SPI
driver was wrong. As reported by the manual,
the meaning of the SSPOL inside the
configuration register is the same as reported
by SPI specification (0 if low in idle, 1 is high
on idle). The driver inverts this logic.

Because this patch sets the logic as specified, it is required
to clear the CPOL bit in the configuration file to adapt
to the correct logic.

Signed-off-by: Stefano Babic <sbabic@denx.de>
Signed-off-by: David Jander <david.jander@protonic.nl>
2010-09-30 14:42:13 +02:00
Stefano Babic 4ec3d2a745 MXC: Add watchdog support to serial driver
Calls WATCHDOG_RESET() inside serial driver
for boards enabling watchdog.

Signed-off-by: Stefano Babic <sbabic@denx.de>
2010-09-29 11:24:31 +02:00
Stefano Babic c4ea142424 Use common function to set GPIOs for MX3 and MX5
The patch adds support for setting gpios to the
MX51 processor and change name to the corresponding
functions for MX31. In this way, it is possible to get rid
of nasty #ifdef switches related to the processor type.

Signed-off-by: Stefano Babic <sbabic@denx.de>
2010-09-29 11:24:30 +02:00
Wolfgang Denk 2e6e1772c0 Merge branch 'next' of /home/wd/git/u-boot/next
Conflicts:
	include/ppc4xx.h

Signed-off-by: Wolfgang Denk <wd@denx.de>
2010-09-28 23:30:47 +02:00
Karl Beldan 86af10cac4 Fix "ubi part" cmd re-entrancy
Commit 2ee951ba (UBI: Enable re-initializing of the "ubi part" command)
reset mtd_devs in ubi_exit() but missed ubi_init()'s failure path.

Signed-off-by: Karl Beldan <karl.beldan@gmail.com>
Cc: Stefan Roese <sr@denx.de>
Signed-off-by: Stefan Roese <sr@denx.de>
2010-09-27 15:06:00 +02:00
Alexander Stein cdfcedbf25 atmel_lcd: Allow contrast polarity to be either positive or negative
Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com>
2010-09-25 15:22:51 +02:00
Stefan Roese e3c78c9b3c ppc4xx: Remove now unused CONFIG_UART1_CONSOLE
CONFIG_UART1_CONSOLE was a PPC4xx specific implementation and is now
removed since the move from the 4xx UART driver to the common NS16550
UART driver. Let's remove all references to this define now.

Signed-off-by: Stefan Roese <sr@denx.de>
2010-09-23 09:02:05 +02:00
Stefan Roese 5e7abce991 ppc4xx: Big header cleanup, mostly PPC440 related
This patch starts a bit PPC4xx header cleanup. First patch mostly
touches PPC440 files. A later patch will touch the PPC405 files as well.

This cleanup is done by creating header files for all SoC versions and
moving the SoC specific defines into these special headers. This way the
common header ppc405.h and ppc440.h can be cleaned up finally.

Signed-off-by: Stefan Roese <sr@denx.de>
2010-09-23 09:02:05 +02:00
Stefan Roese b36df56115 ppc4xx: Move ppc4xx headers to powerpc include directory
This patch moves some ppc4xx related headers from the common include
directory (include/) to the powerpc specific one
(arch/powerpc/include/asm/). This way to common include directory is not
so cluttered with files.

Signed-off-by: Stefan Roese <sr@denx.de>
2010-09-23 09:02:05 +02:00
Wolfgang Denk e6e1fb3050 Merge branch 'master' of git://git.denx.de/u-boot-blackfin 2010-09-22 22:36:42 +02:00
Mike Frysinger 55fed6fd0b Blackfin: bfin_spi: use same gpio cs define as Linux
Linux uses an offset of 8 to switch from hardware cs to a gpio cs,
so have u-boot use the same value.  Also make sure it is public
for boards to access.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-09-21 18:22:14 -04:00
Timur Tabi 68f6618bcd video: cfb_console: add support for 4bpp bitmaps with GDF_32BIT_X888RGB
Add support for 4bpp bitmaps, currently only for GDF_32BIT_X888RGB
frame buffer format.

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Anatolij Gustschin <agust@denx.de>
2010-09-21 22:44:59 +02:00
Wolfgang Denk 696f6cc9ba Merge branch 'next' of ../custodians into next 2010-09-21 09:34:37 +02:00
Wolfgang Denk 0cc89de8ef Merge branch 'master' of /home/wd/git/u-boot/master 2010-09-21 09:34:16 +02:00
Wolfgang Denk e7eb046a24 Merge branch 'next' of git://git.denx.de/u-boot-usb into next 2010-09-21 09:34:02 +02:00
Wolfgang Denk b65e86d8d8 Merge branch 'next' of ../custodians into next 2010-09-21 09:22:17 +02:00
Vitaly Kuzmichev 6142e0ae0f USB-CDC: Fix coding style issues
Fixes most of checkpatch warnings and errors in USB gadget stack.

The most frequently encountered problems are:
1) "(foo*)", "foo * bar", "foo* bar"
2) C99 // comments
3) No spaces before/after/around '?', ':', '=', '==', ',', '&', '('
4) Spaces before '['
5) Spaces between function names and '('
6) Block braces in wrong places
7) Spaces before tabs
8) Macros with complex values not enclosed in parenthesis
9) Multiline comments start just after /*

Signed-off-by: Vitaly Kuzmichev <vkuzmichev@mvista.com>
2010-09-20 21:57:17 +02:00
Stefano Babic a170f2c797 USB-CDC: called handle_interrupts inside usb_eth_send
The patch removes an endless loop  in the usb_eth_send
if the tx_complete is not called before going
in the loop. The driver interrupt routine is called
allowing the driver to check if the TX is completed.

Signed-off-by: Stefano Babic <sbabic@denx.de>
2010-09-20 21:57:17 +02:00
Stefano Babic 8046077219 USB-CDC: correct wrong alignment in ether.c
The buffer for the status request must be word aligned
because it is accessed with 32 bit pointer in the
eth_status_complete function.

Signed-off-by: Stefano Babic <sbabic@denx.de>
2010-09-20 21:57:17 +02:00
Vitaly Kuzmichev c0ef513188 USB-CDC: change simple_strtol to simple_strtoul
The patch is based on commit bb9496c6f7e853e5d4edd5397c9d45f1968d623c
(done by Julia Lawall <julia@diku.dk>) from linux-2.6.git.

Since num is unsigned, it would seem better to use simple_strtoul that
simple_strtol.

Signed-off-by: Vitaly Kuzmichev <vkuzmichev@mvista.com>
2010-09-20 21:57:17 +02:00
Vitaly Kuzmichev d5292c1647 USB-CDC: ethernet error path potential oops fix
Fix potential oops on rare error path.
The patch is based on commit e7b13ec9235b9fded90f826ceeb8c34548631351
(done by David Brownell <david-b@pacbell.net>) from linux-2.6.git.

Description of the issue taken from linux kernel bugzilla:
(https://bugzilla.kernel.org/show_bug.cgi?id=9594)

The potential error can be tracked down as follows:

(1) line 807: let the second conjunct on the "if" statment be false
    meaning "dev->status_ep" is null. This means the "if" evaluates
    to false.

follow thru the code until...

(2) line 808: usb_ep_disable(dev->status_ep) passes in a null argument,
    however "usb_ep_disable" cannot handle that:

(from include/linux/usb/gadget.h)
191 static inline int
192 usb_ep_disable (struct usb_ep *ep)
193 {
194         return ep->ops->disable (ep);
195 }

--

Signed-off-by: Vitaly Kuzmichev <vkuzmichev@mvista.com>
2010-09-20 21:57:17 +02:00
Vitaly Kuzmichev df559c1d21 USB-CDC: Correct stat_req initialization
Fix possible oops on stat_req->buf initialization and fix ep0 and
status_ep confusion (last one is just intended for stat_req keeping).

Signed-off-by: Vitaly Kuzmichev <vkuzmichev@mvista.com>
Signed-off-by: Stefano Babic <sbabic@denx.de>
2010-09-20 21:57:17 +02:00
Vitaly Kuzmichev 2e12abe654 USB-CDC: Replace 'strcpy' by 'strlcpy'
Replace 'strcpy' by more safe 'strlcpy' that is implemented in ether.c

Signed-off-by: Vitaly Kuzmichev <vkuzmichev@mvista.com>
2010-09-20 21:57:17 +02:00
Vitaly Kuzmichev 0129e327f4 USB-CDC: Correct freeing usb requests
Fix in_ep and out_ep confusion (rx_req was allocated from out_ep, not
from in_ep) and add lost dev->req freeing.

Signed-off-by: Vitaly Kuzmichev <vkuzmichev@mvista.com>
2010-09-20 21:57:17 +02:00
Vitaly Kuzmichev 7de7318591 USB-CDC: Use native debug printout macros
Replace Linux-like debug printout macros by native ones.

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

Applied after removing dead code like '#define DEBUG/#undef DEBUG'
2010-09-20 21:57:17 +02:00
Vitaly Kuzmichev 2721dbf1dd USB-CDC: Add lost 'qmult' definition
Add lost 'qmult' definition for High Speed devices and make it
configurable through CONFIG_USB_ETH_QMULT.

Signed-off-by: Vitaly Kuzmichev <vkuzmichev@mvista.com>
2010-09-20 21:57:16 +02:00
Vitaly Kuzmichev 7b2f390611 USB-CDC: Restuct USB gadget Makefile
Prohibit simultaneous usage of both old and new gadget stacks and
allow UDC drivers to be dependent on CONFIG_USB_ETHER.

Signed-off-by: Vitaly Kuzmichev <vkuzmichev@mvista.com>
2010-09-20 21:57:16 +02:00
Remy Bohmer 23cd138503 Integrate USB gadget layer and USB CDC driver layer
Derived from Linux kernel 2.6.27

Signed-off-by: Thomas Smits <ts.smits@gmail.com>
Signed-off-by: Remy Bohmer <linux@bohmer.net>
2010-09-20 21:57:16 +02:00
Mike Frysinger 70fccb3f24 usb: musb: stub out MUSB_TXCSR_MODE for Blackfin parts
The MUSB_TXCSR_MODE register setting isn't supported on Blackfin musb
parts, so stub it out to 0.  This matches Linux behavior.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-09-20 21:56:42 +02:00
Stefan Roese 3c29975e94 cfi_flash: Remove uneccessary #ifdef CONFIG_SYS_MAX_FLASH_BANKS_DETECT
Now that the defines are moved to header files we don't need this
conditional compilation any more. Remove it.

Signed-off-by: Stefan Roese <sr@denx.de>
2010-09-20 15:09:00 +02:00
Stefan Roese ca5def3f30 cfi_flash: Simplify dynamic flash bank number detection
This patch simplifies the use of CONFIG_SYS_MAX_FLASH_BANKS_DETECT. By
moving these optional variables and defines into the common code, board
specific code is minimized. Currently only the following board use
this feature:

APC405, IDS8247, TQM834x

And IDS8247 doesn't seem to really need this feature, since its not
updating the bank number variable at all. So this patch removes the
definition of CONFIG_SYS_MAX_FLASH_BANKS_DETECT from this board port.

This new framework will be used by the upcoming lwmon5 update as well.

Signed-off-by: Stefan Roese <sr@denx.de>
Acked-by: Heiko Schocher <hs@denx.de>
Cc: Matthias Fuchs <matthias.fuchs@esd.eu>
2010-09-20 15:08:51 +02:00
Stefan Roese b00e19cc6b cfi_flash: Add weak default for cfi_flash_bank_addr()
cfi_flash_bank_addr(int bank_nr) returns the base addresses of the
requested bank. Introducing this weak default enables boards to override
this functions with a board specific version when required.

This feature will be used in the lwmon5 board update, supporting runtime
detection of 2 board revisions with different flash layouts.

Signed-off-by: Stefan Roese <sr@denx.de>
2010-09-20 15:08:43 +02:00
Stefan Roese cba34aafde cfi_flash: Simplify flash_get_info()
This patch removes an unecessary check in the return statement. This is
not needed, since "info" is initializes to NULL. And "info" will not be
written to again, if the flash address is not found.

Additionally "info" is not initialized to "0" but to "NULL".

Signed-off-by: Stefan Roese <sr@denx.de>
2010-09-20 15:08:33 +02:00
Wolfgang Denk 77efe35fec Remove HMI10 board support
Recent changes caused that the HMI10 board now is included in the
boards built by MAKEALL, which revealed that compilation for this
board has been broken for a long time:

ps2ser.c: In function 'ps2ser_init':
ps2ser.c:155: error: 'UART_LCR' undeclared (first use in this function)
ps2ser.c:155: error: (Each undeclared identifier is reported only once
ps2ser.c:155: error: for each function it appears in.)
ps2ser.c:156: error: 'UART_DLL' undeclared (first use in this function)
ps2ser.c:157: error: 'UART_DLM' undeclared (first use in this function)
ps2ser.c:159: error: 'UART_IER' undeclared (first use in this function)
ps2ser.c:160: error: 'UART_MCR' undeclared (first use in this function)
ps2ser.c:161: error: 'UART_FCR' undeclared (first use in this function)
ps2ser.c:162: error: 'UART_FCR_ENABLE_FIFO' undeclared (first use in this function)
ps2ser.c:166: error: 'UART_LSR' undeclared (first use in this function)
ps2ser.c: In function 'ps2ser_putc':
ps2ser.c:198: error: 'UART_LSR' undeclared (first use in this function)
ps2ser.c:200: error: 'UART_TX' undeclared (first use in this function)
ps2ser.c: In function 'ps2ser_getc_hw':
ps2ser.c:224: error: 'UART_LSR' undeclared (first use in this function)
ps2ser.c:225: error: 'UART_RX' undeclared (first use in this function)
ps2ser.c: In function 'ps2ser_interrupt':
ps2ser.c:293: error: 'UART_IIR' undeclared (first use in this function)

The board is orphaned, and AFAICT has reached EOL.
Drop support for it.

Signed-off-by: Wolfgang Denk <wd@denx.de>
2010-09-19 21:28:25 +02:00
Heiko Schocher 1724fe9adf i2c, omap24xx: set bus_initialized only after relocation.
Portions of this work were supported by funding from
the CE Linux Forum.

Signed-off-by: Heiko Schocher <hs@denx.de>
2010-09-19 19:29:52 +02:00
Wolfgang Denk fe64fd4238 mmc: fix compiler warnings
Commit d2bf29e3 caused a number of compiler warnings:

mmc.c: In function 'mmc_bwrite':
mmc.c:97: warning: format '%x' expects type 'unsigned int', but argument 2 has type 'long unsigned int'
mmc.c:97: warning: format '%x' expects type 'unsigned int', but argument 3 has type 'lbaint_t'
mmc.c: In function 'mmc_bread':
mmc.c:229: warning: format '%x' expects type 'unsigned int', but argument 2 has type 'long unsigned int'
mmc.c:229: warning: format '%x' expects type 'unsigned int', but argument 3 has type 'lbaint_t'

Fix these.

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Lei Wen <leiwen@marvell.com>
2010-09-19 12:30:54 +02:00
Lei Wen d2bf29e399 mmc: add boundary check for mmc operation
Signed-off-by: Lei Wen <leiwen@marvell.com>
2010-09-18 23:46:24 +02:00
Timur Tabi 6561863678 video: cfb_console: fix definition and usage of CURSOR_xxx macros
The CURSOR_ON, CURSOR_OFF, and CURSOR_SET macros are defined incorrectly.  If
cursor support is disabled, then these macros are defined to nothing, but
then they are used like this:

	if (console_col < CONSOLE_COLS)
		CURSOR_OFF
	console_row++;

which was compiled like this:

	if (console_col < CONSOLE_COLS)
		console_row++;

This is obviously not what was intended.

Signed-off-by: Timur Tabi <timur@freescale.com>
Acked-by: Detlev Zundel <dzu@denx.de>
2010-09-16 00:44:06 +02:00
Wolfram Sang 1075b07e2c nand/davinci: make sure ECC calculation has really started
Due to a register glitch (result code <4 might show up right after the
start-calculation-bit was set), make sure the ECC has really started.

See 1c3275b656045aff9a75bb2c9f3251af1043ebb3 in the kernel.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Cc: Sandeep Paulraj <s-paulraj@ti.com>
2010-09-13 14:43:05 -05:00
Bryan Wu 93ceb4790d usb: musb: set target address for non-multipoint devices
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
Signed-off-by: Cliff Cai <cliff.cai@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-09-11 09:49:22 +02:00
Bryan Wu 8dd7a23007 usb: musb: setup TXCOUNT for Blackfin musb
The Blackfin implementation of musb has a TXCOUNT register that needs to
be programmed when transmitting data.

Signed-off-by: Bryan Wu <bryan.wu@analog.com>
Signed-off-by: Cliff Cai <cliff.cai@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-09-11 09:49:21 +02:00
Wolfgang Denk 2d941de9d5 Prepare v2010.09-rc1
Coding style cleanup.

Signed-off-by: Wolfgang Denk <wd@denx.de>
2010-09-10 00:16:19 +02:00
Wolfgang Denk a78ded1311 Merge branch 'master' of git://git.denx.de/u-boot-ti 2010-09-09 19:55:02 +02:00
Steve Sakoman 4c468397cf mtd: nand: supress 'unknown NAND' warning if no nand is found
This printk was added recently and results in ugly output on systems
with no NAND:

NAND:  nand_get_flash_type: unknown NAND device: Manufacturer ID: 0x00, Chip ID: 0x00 0 MiB

instead of:

NAND:  0 MiB

Signed-off-by: Steve Sakoman <steve@sakoman.com>
Acked-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
2010-09-08 14:51:29 -04:00
Steve Sakoman 5a0a82f42b ARMV7: OMAP: add convenience function to set TWL4030 regulator voltages
This patch adds a function to allow one to easily set the target
voltage for the TWL4030 regulators.  It also modifies the existing
code to use this new function.  Applicable definitions are moved
out of the driver file and into the header file so that they are
generally accessible

Signed-off-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
2010-09-08 14:50:23 -04:00
Wolfgang Denk cf64fda38e Merge branch 'at91' of git://git.denx.de/u-boot-atmel 2010-09-08 00:42:00 +02:00
Wolfgang Denk 09b4a9cf40 Merge branch 'master' of git://git.denx.de/u-boot-samsung 2010-09-08 00:03:22 +02:00
Wolfgang Denk f91506e283 Merge branch 'master' of /home/wd/git/u-boot/master 2010-09-07 22:19:49 +02:00
Wolfgang Denk 67bd94148e Merge branch 'master' of git://git.denx.de/u-boot-i2c 2010-09-07 21:28:20 +02:00
Reinhard Meyer f09d3b2896 AT91/AVR32: atmel_spi.c: flush RDR before next SPI transaction
Signed-off-by: Reinhard Meyer <u-boot@emk-elektronik.de>
2010-09-03 11:22:25 +02:00
Reinhard Meyer c7260d1539 AT91: add RTT and GPBR based RTC
Signed-off-by: Reinhard Meyer <u-boot@emk-elektronik.de>
2010-09-03 11:20:02 +02:00
Reinhard Meyer 1592ef8596 AT91: MCI: add SD/MMC driver using mmc framework
Signed-off-by: Reinhard Meyer <u-boot@emk-elektronik.de>
2010-09-03 11:19:01 +02:00
York Sun 359ec49319 powerpc/8xxx: Fix dma for 36bit addressing
Use more bits to support 36-bit addressing

Signed-off-by: York Sun <yorksun@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2010-08-31 11:23:15 -05:00
Albert Aribaud 306563a773 i2c: rewrite mvtwsi, support orion5x and kirkwood
This rewrite of the mvtwsi driver is 25% smaller and much
faster and simpler than the previous code.

Signed-off-by: Albert Aribaud <albert.aribaud@free.fr>
Acked-by: Prafulla Wadaskar<prafulla@marvell.com>
Acked-by: Heiko Schocher<hs@denx.de>
2010-08-30 14:10:35 +02:00
Albert Aribaud 01ec99d969 i2c: rename kirkwood_i2c to mvtwsi
This driver is not kirkwood-specific and can also be used
e.g. by orion5x. Rename to a SoC-neutral name.

Signed-off-by: Albert Aribaud <albert.aribaud@free.fr>
Acked-by: Prafulla Wadaskar<prafulla@marvell.com>
Acked-by: Heiko Schocher<hs@denx.de>
2010-08-30 14:10:23 +02:00
Minkyu Kang f70409aff3 ARMV7: S5P: separate the peripheral clocks
Because of peripheral devices can select clock sources,
separate the peripheral clocks. (pwm, uart and so on)
It just return the pclk at s5pc1xx SoC,
but s5pc210 SoC must be calculated by own clock register setting.

Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
2010-08-30 14:44:16 +09:00
Minkyu Kang 889a275d42 ARMV7: S5P: rename from CONFIG_S5PC1XX to CONFIG_S5P
Use the same configuration around S5P SoCs.
(s5pc100, s5pc110, s5pc210 and so on)

Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2010-08-26 17:33:23 +09:00
Nishanth Menon 07cf5e207e i2c: omap2+: change header guard to be generic
Make the header guard to be generic to stop conflicting with
omap2 i2c header file arch/arm/include/asm/arch-omap24xx/i2c.h

Cc: Steve Sakoman <steve@sakoman.com>
Cc: Heiko <hs@denx.de>
Cc: Sandeep Paulraj <s-paulraj@ti.com>
Cc: Wolfang Denk <wd@denx.de>

Signed-off-by: Nishanth Menon <nm@ti.com>
Acked-by: Steve Sakoman <steve@sakoman.com>
2010-08-23 08:08:31 +02:00
Wolfgang Denk 5549d22b65 Merge branch 'master' of /home/wd/git/u-boot/master 2010-08-18 21:19:00 +02:00
Philippe De Muyter 54652991ca Work around bug in Numonyx P33/P30 256-Mbit 65nm flash chips.
I have "ported" U-boot to a in house made board with Numonyx Axcell P33/P30
256-Mbit 65nm flash chips.

After some time :( searching for bugs in our board or soft, we have
discovered that those chips have a small but annoying bug, documented in
"Numonyx Axcell P33/P30 256-Mbit Specification Update"

It states :
When customer uses [...] block unlock, the block lock status might be
altered inadvertently. Lock status might be set to either 01h or 03h
unexpectedly (00h as expected data), which leads to program/erase failure
on certain blocks.

A working workaround is given, which I have applied and tested with success :

Workaround:  If the interval between 60h and its subsequent command
	     can be guaranteed within 20us, Option I is recommended,
	     otherwise Option II (involves hardware) should be selected.
Option I: The table below lists the detail command sequences:
Command
	      Data bus           Address bus       Remarks
Sequence
  1              90h            Block Address
						   Read Lock Status
  2             Read         Block Address + 02h
 (2)(3)                                      (1)
3                60h           Block Address
 (2)(3)                                      (1)   Lock/Unlock/RCR Configuration
4           D0h/01h/03h        Block Address
Notes:
(1) Block Address refers to RCR configuration data only when the 60h
    command sequence is used to set RCR register combined with 03h
    subsequent command.
(2) For the third and fourth command sequences, the Block Address must
    be the same.
(3) The interval between 60h command and its subsequent D0h/01h/2Fh/03h
    commands should be less than 20us.

And here is a log comparison of a simple (destructive) flash test without
and with the workaround.

 diff without-numonyx-workaround.log with-numonyx-workaround.log
 -U-Boot 2010.06-00696-g22b002c-dirty (Aug 16 2010 - 15:07:47)
 +U-Boot 2010.06-00696-g22b002c-dirty (Aug 16 2010 - 15:25:19)

  CPU:   Freescale MCF5484
         CPU CLK 200 MHz BUS CLK 100 MHz
  Board: Macq Electronique ME2060
  I2C:   ready
  DRAM:  64 MiB
  FLASH: 32 MiB
  In:    serial
  Out:   serial
  Err:   serial
  Net:   FEC0, FEC1
  -> flinfo

  Bank # 1: CFI conformant FLASH (16 x 16)  Size: 32 MB in 259 Sectors
    Intel Extended command set, Manufacturer ID: 0x89, Device ID: 0x8922
    Erase timeout: 4096 ms, write timeout: 1 ms
    Buffer write timeout: 5 ms, buffer size: 1024 bytes

    Sector Start Addresses:
    FE000000 RO   FE008000 RO   FE010000 RO   FE018000 RO   FE020000 RO
    FE040000 RO   FE060000 RO   FE080000 RO   FE0A0000 RO   FE0C0000 RO
    ...
    FFF80000 RO   FFFA0000 RO   FFFC0000 RO   FFFE0000 RO
  -> protect off all
  Un-Protect Flash Bank # 1
  ................... done
  -> erase all
  Erase Flash Bank # 1
  ................... done
  -> cp.b 1000000 fe000000 2000000
 -Copy to Flash... Flash not Erased
 +Copy to Flash... done
  ->

Signed-off-by: Philippe De Muyter <phdm@macqel.be>
Signed-off-by: Stefan Roese <sr@denx.de>
2010-08-18 09:09:00 +02:00
Stefan Roese 70084df712 cfi_flash: Cleanup flash_print_info()
This patch does the following:

- Extract code to detect if sector is erased into function
  sector_erased().
- Because of this, we don't have variable declarations inside the
  sector loop in flash_print_info()
- Change "return" to "break" in the "if (ctrlc()) statement:
  This fixes a problem with the resulting output. Before this
  patch the output was:

  Sector Start Addresses:
  FC000000        FC020000        FC040000   =>

  With this patch it is now:

  Sector Start Addresses:
  FC000000        FC020000        FC040000
  =>

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Kim Phillips <kim.phillips@freescale.com>
Cc: Wolfgang Denk <wd@denx.de>
2010-08-18 09:09:00 +02:00
Philippe De Muyter d77c7ac47e Fix printing & reading of 16-bit CFI device identifiers
Fix reading and printing of CFI flashes 16-bit devices identifiers

Nowadays CFI flashes have a 16-bit device identifier.  U-boot still
print them and read them as if they were only 8-bit wide.  Fix that.
Before:
  Intel Extended command set, Manufacturer ID: 0x89, Device ID: 0x1B
After:
  Intel Extended command set, Manufacturer ID: 0x89, Device ID: 0x881B

Signed-off-by: Philippe De Muyter <phdm@macqel.be>
Signed-off-by: Stefan Roese <sr@denx.de>
2010-08-18 09:09:00 +02:00
Kim Phillips 2e97394a6d cfi_flash: flinfo: allow user interrupt in flash print info fn
flashes getting larger, users more impatient.

Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
Signed-off-by: Stefan Roese <sr@denx.de>
2010-08-18 09:09:00 +02:00
Minkyu Kang d93d0f0cfe S5P: Use accessor functions instead of SoC specific defines to access the base address
This patch is intended to prepare the other S5P SoC. (s5pc210)
If use SoC specific defines then can't share with other SoC.
So, make the accessor functions for access the base address by common way.

Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
2010-08-17 11:38:19 +09:00
Wolfgang Denk ae37a0704a Merge branch 'master' of git://git.denx.de/u-boot-ti 2010-08-12 23:08:05 +02:00
Grazvydas Ignotas dc41b8bf3d mmc: omap3: fix block read function
The OMAP3 block read function is not following API and always returning
1 instead of read block count, fix it. Also to simplify code, merge it
with with a helper function, which was only called from the block read
function.

After this patch ext2 filesystem can be used properly.

Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Tested-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
2010-08-12 13:50:25 -04:00
Grazvydas Ignotas 8bbf4307c7 mmc: omap3: make local symbols static
Make driver local variables and functions static and
remove them from the arch header.

Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Tested-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
2010-08-12 13:50:19 -04:00
Ajay Kumar Gupta 5689f4b5b4 musb: am35x: Workaround for fifo read issue
AM35x supports only 32bit read operations so we need to have
workaround for 8bit and 16bit read operations.

Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com>
2010-08-12 16:40:00 +02:00
Ajay Kumar Gupta dbea324200 musb: MSC host support for AM35x
Tested MSC Host on AM3517EVM.

Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com>
2010-08-12 16:40:00 +02:00
Matthias Weisser b2621bcb8c video: add support for display controller in MB86R0x SoCs
This patch adds support for the display controller in
the MB86R0x SoCs.

Signed-off-by: Matthias Weisser <weisserm@arcor.de>
Acked-by: Anatolij Gustschin <agust@denx.de>
2010-08-10 23:14:21 +02:00
Wolfgang Denk b9d51fbb18 Merge branch 'master' of git://git.denx.de/u-boot-arm 2010-08-10 23:03:15 +02:00
Wolfgang Denk fe8d63c8c7 Merge branch 'master' of git://git.denx.de/u-boot-marvell 2010-08-10 22:37:27 +02:00
Wolfgang Denk 9844d027b5 Merge branch 'master' of git://git.denx.de/u-boot-ti 2010-08-10 22:20:51 +02:00
Minkyu Kang 6a69e11a79 S5P: mmc: use the standard debug macro
Use the standard debug macro instead of the costom macro

Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
Cc: Wolfgang Denk <wd@denx.de>
2010-08-10 13:42:23 +09:00
Ben Warren d7fb9bcfb2 Fix compile warnings for const correctness
Commit 6e37b1a3a25004d3df5867de49fff6b3fc9c4f04 modifies several net calls
to take a (const char *) parameter instead of (char *), but in some cases
the modified functions call other functions taking (char *).  The end result
is warnings about discarding the const qualifier.

This patch fixes these other function signatures.

Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2010-08-09 11:52:30 -07:00
Mike Frysinger 5700bb6352 miiphy: constify device name
The driver name does not need to be writable, so constify it.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2010-08-09 11:52:29 -07:00
Kim Phillips 78b7a8ef8b net: rename "FSL UECx" net interfaces "UECx"
continuation of commit 2ecc2262d66a286e3aac79005bcb5f461312dea8
"net ppc: fix ethernet device names with spaces" (currently in
u-boot-net.git) for QE based parts.

Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
Acked-by: Dave Liu <daveliu@freescale.com>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2010-08-09 11:52:29 -07:00
Heiko Schocher 48690d8024 net ppc: fix ethernet device names with spaces
since commit 1384f3bb8a ethernet names
with spaces drop a

Warning: eth device name has a space!

message. This patch fix it for:

- "FEC ETHERNET" devices found on
  mpc512x, mpc5xxx, mpc8xx and mpc8220 boards.
  renamed to "FEC".
- "SCC ETHERNET" devices found on
  mpc8xx, mpc82xx based boards. Renamed to "SCC".
- "HDLC ETHERNET" devices found on mpc8xx boards
  Renamed to "HDLC"
- "FCC ETHERNET" devices found on mpc8260 and mpc85xx based
  boards. Renamed to "FCC"

Tested on the kup4k board.

Signed-off-by: Heiko Schocher <hs@denx.de>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2010-08-09 11:52:28 -07:00
Stefano Babic f699fe1e1f net,fec: Shorten device name as done for other drivers
After discussion on the ML it is suggested to drop unrequired
and not useful characters from the device name.
This patch changes the name for the fec_mxc driver from
"FEC_MXC" to "FEC".

Signed-off-by: Stefano Babic <sbabic@denx.de>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2010-08-09 11:52:27 -07:00
Albert Aribaud 39419ce589 ide: add mvsata_ide driver
This driver only provides initialization code; actual driving
is done by cmd_ide.c using the ATA compatibility mode of the
Marvell SATAHC controller.

Signed-off-by: Albert Aribaud <albert.aribaud@free.fr>
2010-08-08 05:17:06 +05:30
Albert Aribaud 4fc7d2872d ide: reorder object files alphabetically
Signed-off-by: Albert Aribaud <albert.aribaud@free.fr>
2010-08-08 05:17:05 +05:30
Wolfgang Denk 3df4f46f32 Merge branch 'master' of /home/wd/git/u-boot/master 2010-08-07 22:33:06 +02:00
Wolfgang Denk 82369c09d9 net 52xx: fix ethernet device names with spaces
Some commands (like 'mii') use this name to select devices, but they
break when those names contain spaces. So drop the space from
Ethernet driver names (cf. commit 1384f3bb).

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Ben Warren <biggerbadderben@gmail.com>
2010-08-05 21:31:54 +02:00
Steve Sakoman 9b16757758 ARMV7: Restructure omap3 musb driver to allow code sharing between OMAP3 and OMAP4
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
2010-08-05 10:11:34 -04:00
Steve Sakoman 516799f677 ARMV7: Add support for the TWL6030 I2C power chip used in OMAP4 systems
This patch add the basic infrastructure for the TWL6030 driver and enables
support in the two existing OMAP4 boards, Panda and OMAP4430 SDP

Signed-off-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
2010-08-05 10:11:30 -04:00
Steve Sakoman d708395d2f ARMV7: Modify i2c driver for more reliable operation on OMAP4
This patch modifies the init routine to follow the TRM
recommendations. It also modifies the i2c_read_byte function
to reflect subtle differences between the i2c controller in
OMAP3 and OMAP4.

Signed-off-by:  Steve Sakoman <steve@sakoman.com>
Acked-by: Nishanth Menon <menon.nishanth@gmail.com>
Acked-by: Heiko Schocher <hs@denx.de>
Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
2010-08-05 10:11:24 -04:00
Wolfgang Denk cdb749778a Rename getenv_r() into getenv_f()
While running from flash, i. e. before relocation, we have only a
limited C runtime environment without writable data segment. In this
phase, some configurations (for example with environment in EEPROM)
must not use the normal getenv(), but a special function.  This
function had been called getenv_r(), with the idea that the "_r"
suffix would mean the same as in the _r_eentrant versions of some of
the C library functions (for example getdate vs. getdate_r, getgrent
vs. getgrent_r, etc.).

Unfortunately this was a misleading name, as in U-Boot the "_r"
generally means "running from RAM", i. e. _after_ relocation.

To avoid confusion, rename into getenv_f() [as "running from flash"]

Signed-off-by: Wolfgang Denk <wd@denx.de>
Acked-by: Detlev Zundel <dzu@denx.de>
2010-08-04 00:45:36 +02:00
Wolfgang Denk 9efac4a1eb Merge branch 'master' of git://git.denx.de/u-boot-samsung 2010-08-04 00:35:10 +02:00
Wolfgang Denk ac956293be Merge branch 'master' of /home/wd/git/u-boot/master 2010-08-03 22:45:13 +02:00
Minkyu Kang 5000284872 S5P: support mmc driver
This patch adds support mmc driver for s5p SoC

Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
2010-08-03 10:18:15 +09:00
Wolfgang Denk 47e26b1bf9 cmd_usage(): simplify return code handling
Lots of code use this construct:

	cmd_usage(cmdtp);
	return 1;

Change cmd_usage() let it return 1 - then we can replace all these
ocurrances by

	return cmd_usage(cmdtp);

This fixes a few places with incorrect return code handling, too.

Signed-off-by: Wolfgang Denk <wd@denx.de>
2010-07-24 20:43:57 +02:00
Wolfgang Denk 4ae0c2dc99 Merge branch 'master' of git://git.denx.de/u-boot-i2c 2010-07-24 20:41:28 +02:00
Mike Frysinger 793b5726f7 i2c: soft_i2c: add simple GPIO implementation
Since the vast majority of GPIO I2C implementations behave the same way,
support the common GPIO framework with default settings.

This adds two new defines CONFIG_SOFT_I2C_GPIO_{SCL,SDA} so that boards
which want GPIO I2C support need only define these.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Tested-by: Thomas Chou <thomas@wytron.com.tw>
2010-07-22 08:03:47 +02:00
Kumar Gala c26de2d8b1 powerpc/p3041: Add various p3041 related defines
There are various locations that we have chip specific info:

* Makefile for which ddr code to build
* Added p3041 to cpu_type_list and SVR list
* Added number of LAWs for p3041
* Set CONFIG_MAX_CPUS to 4 for p3041

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2010-07-20 04:41:19 -05:00
Kumar Gala 19dbcc96c0 powerpc/p5020: Add various p5020 related defines (and p5010)
There are various locations that we have chip specific info:

* Makefile for which ddr code to build
* Added p5020 & p5010 to cpu_type_list and SVR list
* Added number of LAWs for p5020
* Set CONFIG_MAX_CPUS to 2 for p5020

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2010-07-20 04:41:19 -05:00
Kumar Gala 6525d51fa5 powerpc/85xx & 86xx: Rework ft_fsl_pci_setup to not require aliases
Previously we used an alias the pci node to determine which node to
fixup or delete.  Now we use the new fdt_node_offset_by_compat_reg to
find the node to update.

Additionally, we replace the code in each board with a single macro call
that makes assumes uniform naming and reduces duplication in this area.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2010-07-20 04:40:06 -05:00
Anatolij Gustschin 7c050f818b video: cleanup comments in cfb_console.c and video_fb.h
Signed-off-by: Anatolij Gustschin <agust@denx.de>
2010-07-17 00:05:14 +02:00
Wolfgang Denk e9aecdec15 Merge branch 'master' of git://git.denx.de/u-boot-ti 2010-07-16 23:24:38 +02:00
Wolfgang Denk b6c208ab1e Merge branch 'master' of git://git.denx.de/u-boot-mpc85xx 2010-07-16 23:15:01 +02:00
Becky Bruce 11a3de4697 fsl_law.c: Add print_laws() for FSL_CORENET platforms.
Add printing of LAWBARH/LAWBARL for FSL_CORENET platforms.

Signed-off-by: Becky Bruce <Beckyb@kernel.crashing.org>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2010-07-16 10:55:09 -05:00
Becky Bruce e71755f887 drivers/misc/fsl_law.c: Rearrange code to avoid duplication
The current code redefines functions based on FSL_CORENET_ vs not -
create macros/inlines instead that hide the differences.

Signed-off-by: Becky Bruce <beckyb@kernel.crashing.org>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2010-07-16 10:55:09 -05:00
Becky Bruce f51cdaf191 83xx/85xx/86xx: LBC register cleanup
Currently, 83xx, 86xx, and 85xx have a lot of duplicated code
dedicated to defining and manipulating the LBC registers.  Merge
this into a single spot.

To do this, we have to decide on a common name for the data structure
that holds the lbc registers - it will now be known as fsl_lbc_t, and we
adopt a common name for the immap layouts that include the lbc - this was
previously known as either im_lbc or lbus; use the former.

In addition, create accessors for the BR/OR regs that use in/out_be32
and use those instead of the mismash of access methods currently in play.

I have done a successful ppc build all and tested a board or two from
each processor family.

Signed-off-by: Becky Bruce <beckyb@kernel.crashing.org>
Acked-by: Kim Phillips <kim.phillips@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2010-07-16 10:55:09 -05:00
Wolfgang Denk 93502a5e0a Merge branch 'master' of ../master 2010-07-15 22:48:46 +02:00
Ajay Kumar Gupta 900c0c6b0a musb: fix compilation warning
Fixes below compilation warning
omap3.c: In function 'musb_platform_init':
omap3.c:123: warning: implicit declaration of function
			'omap3_evm_need_extvbus'

Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com>
Acked-by: Remy Bohmer <linux@bohmer.net>
Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
2010-07-15 16:11:01 -04:00
Wolfgang Denk d6f324d03d Merge branch 'next' of git://git.denx.de/u-boot-nios 2010-07-14 22:07:41 +02:00
Wolfgang Denk 50298d37e6 Merge branch 'master' of git://git.denx.de/u-boot-net 2010-07-14 22:04:30 +02:00
Wolfgang Denk cb8f031729 Merge branch 'master' of git://git.denx.de/u-boot-blackfin 2010-07-14 21:54:45 +02:00
Mike Frysinger 94060a158f Blackfin: bfin_mac: remove space from name
Some commands (like 'mii') use this name to select devices, but they break
when those names contain spaces.  So drop the space from the Blackfin EMAC
driver.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-07-13 17:50:52 -04:00
Mike Frysinger 37a4b75d4c Blackfin: bfin_spi: support gpios as chip selects
Rather than only support the pins dedicated as chip selects, utilize the
gpio framework to support any gpio pin.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-07-13 17:50:50 -04:00
Mike Frysinger f3732edf46 Blackfin: bfin_spi: convert to portmux framework
Rather than bang MMRs directly, use the new portmux framework to handle
the details.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-07-13 17:50:50 -04:00
Mike Frysinger c5dc48295b Blackfin: pata_bfin: convert to portmux framework
Rather than bang MMRs directly, use the new portmux framework to handle
the details.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-07-13 17:50:49 -04:00
Mike Frysinger a87589fcf9 Blackfin: bfin_sdh: convert to portmux framework
Rather than bang MMRs directly, use the new portmux framework to handle
the details.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-07-13 17:50:49 -04:00
Mike Frysinger 253f47f3a7 Blackfin: bfin_nand: convert to portmux framework
Rather than bang MMRs directly, use the new portmux framework to handle
the details.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Acked-by: Scott Wood <scottwood@freescale.com>
2010-07-13 17:50:49 -04:00
Mike Frysinger 8339ad7373 Blackfin: bfin_mac: convert to portmux framework
Rather than bang MMRs directly, use the new portmux framework to handle
the details.  While we're doing this, let boards declare the exact list
of pins they need in case there is one or two they don't actually have
hooked up.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Acked-by: Ben Warren <biggerbadderben@gmail.com>
2010-07-13 17:50:40 -04:00
Albert Aribaud d3c9ffd07d mvgbe: add support for orion5x GbE controller
Add definitions and initialization in orion5x for mvgbe.
Add orion5x in mvgbe SoC includes.

Signed-off-by: Albert Aribaud <albert.aribaud@free.fr>
Acked-by: Prafulla Wadaskar <prafulla@marvell.com>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2010-07-12 23:40:31 -07:00
Albert Aribaud d44265ad78 mvgbe: support SoCs other than kirkwood
Rename all references to kirkwood in mvgbe symbols
throughout the whole codebase.

Signed-off-by: Albert Aribaud <albert.aribaud@free.fr>
Acked-by: Prafulla Wadaskar <prafulla@marvell.com>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2010-07-12 23:40:31 -07:00
Albert Aribaud 9b6bcdcb93 net: rename: kirkwood_egiga as mvgbe
Rename kirkwood_egiga.* to mvgbe.* and adjust makefile
and #include accordingly.

Signed-off-by: Albert Aribaud <albert.aribaud@free.fr>
Acked-by: Prafulla Wadaskar <prafulla@marvell.com>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2010-07-12 23:40:30 -07:00
Albert Aribaud c67e2ccd50 kirkwood_egiga: CONFIG_SKIP_LOCAL_MAC_RANDOMIZATION
This configuration option allows SoCs without random
generation capability to fill in local MACs with a  fixed
rather than random value

Signed-off-by: Albert Aribaud <albert.aribaud@free.fr>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2010-07-12 23:38:25 -07:00
Thomas Chou ec3b498192 gpio_led: add gpio_request to __led_init
This patch adds the gpio usage request. The polarity is changed to
positive as suggested by Mike Frysinger.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Signed-off-by: Scott McNutt <smcnutt@psyent.com>
2010-07-12 11:30:52 -04:00
Eric Bénard 836cd45358 cpuat91: unbreak ethernet
* the following problems are met :
config was set to use the new driver as a default but
- RMII was not enabled for the new driver
- the new driver didn't compile with RMII enabled
- the new driver initialize a PHY at address O when the PHY of
this board is at 1 thus we get "AT91 EMAC RMII: No PHY present"

* to fix these problems, this patch :
- enable RMII for the new driver
- fix the wrong define used in the at91_emac.c
- allow the config file to set a default phy address (and use
0 as a default as in the actual at91_emac.c driver)

Signed-off-by: Eric Bénard <eric@eukrea.com>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2010-07-12 00:14:29 -07:00
Eric Bénard 409943a989 at91_emac: Write MAC address automatically
tested on cpuat91.

Signed-off-by: Eric Bénard <eric@eukrea.com>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2010-07-12 00:14:29 -07:00
Mike Frysinger cafb14fecb AX88180: use standard I/O accessors
The current dm9000x driver accesses its memory mapped registers directly
instead of using the standard I/O accessors.  This can cause problems on
Blackfin systems as the accesses can get out of order.  So convert the
direct volatile dereferences to use the normal in/out macros.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Tested-by: Hoan Hoang <hnhoan@i-syst.com>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2010-07-12 00:14:29 -07:00
Hoan Hoang 14f637f8f7 AX88180: make OUTW handle 32bit/16bit defines too
The current OUTW function is always defined as a 16bit function, but this
doesn't work correctly when using the 32bit access mode.  So define it as
a 32bit function when in 32bit mode so things work correctly on Blackfin
32bit LE systems.

Signed-off-by: Hoan Hoang <hnhoan@i-syst.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2010-07-12 00:14:29 -07:00
Hoan Hoang 256670680b AX88180: add support for the Marvell 88E1118 phy
Some places in the current code equate the Marvell 88E1111 PHY as the family
when in reality it's a subpart of the Alaska family.  So once we generalize
that, add support for the 88E1118 PHY.

Signed-off-by: Hoan Hoang <hnhoan@i-syst.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2010-07-12 00:14:29 -07:00
Ben Warren 6bb4679017 Write MAC address automatically on MACB-based boards
Also, remove all calls to eth_init() in boards that use MACB

Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2010-07-12 00:14:29 -07:00
Timur Tabi daa2ce6292 tsec: fix the return value for tsec_eth_init()
The Ethernet initialization functions are supposed to return the number of
devices initialized, so fix tsec_eth_init() so that they returns the number of
TSECs initialized, instead of just zero.  This is safe because the return value
is currently ignored by all callers, but now they don't have to ignore it.

In general, if an function initializes only one device, then it should return
a negative number if there's an error.  If it initializes more than one device,
then it should never return a negative number.

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2010-07-12 00:14:28 -07:00
Mike Frysinger ec0d879f08 uli526x: drop newlines from device name
Device names should not contain non-printable characters like newlines.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2010-07-12 00:14:28 -07:00
Mike Frysinger f9abdfe0f2 AX88180: switch to common mii.h header
No compiled code change here, just drop the local PHY defines in favor of
the common standard ones.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2010-07-12 00:14:28 -07:00
Mike Frysinger 141ab7a52c AX88180: improve phy searching
Rather than hardcode specific phy addresses, search the possible phy
address space to find the first available phy.  Also respect the normal
CONFIG_PHY_ADDR option for board porters to pick a specific address.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2010-07-12 00:14:28 -07:00
Hoan Hoang bb7336a414 AX88180: fix media typos
Signed-off-by: Hoan Hoang <hnhoan@i-syst.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2010-07-12 00:14:28 -07:00
Albert Aribaud 49fa6ed8c9 kirkwood_egiga: updates: fix DRAM mapping and typo
DRAM window mapping uses kirkwood-provided functions instead
of global gd as do other drivers--fix this.

Also, fix a typo in a comment

Signed-off-by: Albert Aribaud <albert.aribaud@free.fr>
Acked-by: Prafulla Wadaskar <prafulla@marvell.com>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2010-07-12 00:11:27 -07:00
Vipin KUMAR 5b1b1883ff SPEAr : Network driver support added
Designware network driver support added.
This is a Synopsys ethernet controller

Signed-off-by: Vipin Kumar <vipin.kumar@st.com>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2010-07-12 00:08:05 -07:00
Albert Aribaud c19a20d5bd kirkwood_egiga: bugfix: add DMA sequence points
Insert isb() sequence points to ensure DMA descriptors
are filled in and set up before actual DMA occurs.

Signed-off-by: Albert Aribaud <albert.aribaud@free.fr>
Acked-by: Prafulla Wadaskar <prafulla@marvell.com>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2010-07-12 00:02:12 -07:00
Stefan Roese ca08054e80 net: Add option to disable fiber on M88E1111 PHY for PPC4xx
By defining CONFIG_M88E1111_DISABLE_FIBER boards can configure the
M88E1111 PYH to disable fiber. This is needed for an upcoming PPC460GT
based board, which has fiber/copper auto-selection enabled by default.
This doesn't seem to work. So we disable fiber in the PHY register.

Signed-off-by: Stefan Roese <sr@denx.de>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2010-07-12 00:02:11 -07:00
Mike Frysinger 67bee2fb64 net: dm9000x: re-add casts to I/O pointers to fix gcc warnings
The DM9000 in/out helper functions were casting the register address when
it was accessing things directly (pre commit a45dde2293).  But
when it was changed to using the in/out helpers, those casts were dropped
because those functions don't take pointers.  Even more recently, those
functions were then changed to use the read/write helpers, but the casts
were not re-added.  This is necessary because the read/write helpers do
take pointers.  Otherwise we get a lot of warnings like:
dm9000x.c: In function 'dm9000_inblk_8bit':
dm9000x.c:172: warning: passing argument 1 of 'readb'
	makes pointer from integer without a cast

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Tested-by: Thomas Weber <weber@corscience.de>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2010-07-12 00:02:11 -07:00
Heiko Schocher 26918b7994 tsec: add micrel ksz804 phy
Signed-off-by: Heiko Schocher <hs@denx.de>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2010-07-12 00:02:11 -07:00
Minkyu Kang 1a4106dd20 SAMSUNG: serial: remove compiler warnings
remove below warnings
serial_s5p.c: In function 'serial_getc_dev':
serial_s5p.c:136: warning: dereferencing type-punned pointer will break strict-aliasing rules
serial_s5p.c: In function 'serial_putc_dev':
serial_s5p.c:152: warning: dereferencing type-punned pointer will break strict-aliasing rules

Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
2010-07-09 13:28:55 +09:00
Mike Frysinger bc1a884686 mtd: nand_plat: add simple GPIO framework DEV_READY option
Make it easy to use GPIOs for the DEV_READY pin by using the common GPIO
framework.  Also make the NAND_PLAT_INIT() define optional.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Tested-by: Thomas Chou <thomas@wytron.com.tw>
2010-07-08 16:52:12 -05:00
Florian Fainelli 1445f6ffd5 NAND: add Toshiba TC58NVG0 identifier
The Toshiba TC58NVG0* parts are 128Mbytes x 8 bits 3.3V parts with the 0xD1
identifier. Add these to the list of known devices IDs.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
2010-07-08 16:49:50 -05:00
Florian Fainelli 3e9b349c7f NAND: show manufacturer and device ID for unknown chips
When the NAND part is not supported, it is useful to show the manufacturer
and device ID to help debugging and reporting.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Scott Wood <scottwood@freescale.com>
2010-07-08 16:49:50 -05:00
Nick Thompson dce6538f5d Davinci: SPI: add the missing v2 patch changes
Two Indentation fixes.

Catch requests for full-duplex transfers when driver configured for
half-duplex operation only.

Signed-off-by: Nick Thompson <nick.thompson@ge.com>
Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
2010-07-05 20:00:40 -04:00
Steve Sakoman 89716964d9 mmc: add function prototype for mmc_set_dev in mmc.h
this eliminates compiler warnings when cmd_mmc.c is built with CONFIG_SYS_MMC_SET_DEV

the mmc_set_dev implementation in omap3_mmc.c is also tweaked to match
the new prototype in parameter naming and type

Signed-off-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
2010-07-05 20:00:32 -04:00
Steve Sakoman 938717cee1 ARMV7: Restructure OMAP i2c driver to allow code sharing between OMAP3 and OMAP4
This patch modifies the omap24xx driver so that it will also work with OMAP4.

Signed-off-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
2010-07-05 20:00:10 -04:00
Steve Sakoman bec3dc7599 ARMV7: Restructure OMAP mmc driver to allow code sharing between OMAP3 and OMAP4
The architecture independent header is moved to drivers/mmc, and the architecture
dependent headers reside in asm/arch-omap3 and asm/arch-omap4

Signed-off-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
2010-07-05 20:00:05 -04:00
Steve Sakoman 8f22327a66 OMAP: mmc: add support for second and third mmc channels
This patch adds support for the second and third mmc channels on OMAP3
processors

Boards wishing to use this feature should define CONFIG_SYS_MMC_SET_DEV
in the board config

Tested on Overo

Signed-off-by: Steve Sakoman <steve@sakoman.com>
Tested-by: Philip Balister <philip@opensdr.com>
Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
2010-07-05 19:59:49 -04:00
Wolfgang Denk 54841ab50c Make sure that argv[] argument pointers are not modified.
The hush shell dynamically allocates (and re-allocates) memory for the
argument strings in the "char *argv[]" argument vector passed to
commands.  Any code that modifies these pointers will cause serious
corruption of the malloc data structures and crash U-Boot, so make
sure the compiler can check that no such modifications are being done
by changing the code into "char * const argv[]".

This modification is the result of debugging a strange crash caused
after adding a new command, which used the following argument
processing code which has been working perfectly fine in all Unix
systems since version 6 - but not so in U-Boot:

int main (int argc, char **argv)
{
	while (--argc > 0 && **++argv == '-') {
/* ====> */	while (*++*argv) {
			switch (**argv) {
			case 'd':
				debug++;
				break;
			...
			default:
				usage ();
			}
		}
	}
	...
}

The line marked "====>" will corrupt the malloc data structures and
usually cause U-Boot to crash when the next command gets executed by
the shell.  With the modification, the compiler will prevent this with
an
	error: increment of read-only location '*argv'

N.B.: The code above can be trivially rewritten like this:

	while (--argc > 0 && **++argv == '-') {
		char *arg = *argv;
		while (*++arg) {
			switch (*arg) {
			...

Signed-off-by: Wolfgang Denk <wd@denx.de>
Acked-by: Mike Frysinger <vapier@gentoo.org>
2010-07-04 23:55:42 +02:00
Wolfgang Denk f12d4cb48a Merge branch 'sf' of git://git.denx.de/u-boot-blackfin 2010-07-04 23:36:11 +02:00
Mike Frysinger b376bbb49f sf: move useful messages from debug to printf
At the moment, the default SPI flash subsystem is quite terse.  Errors and
successes both result in a generic message.  So move the useful errors and
useful successes to printf output by default.

While we're here, also convert the messages to use print_size().

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-06-30 23:47:08 -04:00
Thomas Chou 12c2e3bbbe spi_flash: support old STMicro parts with RES
Some old STMicro parts do not support JEDEC ID (0x9f). This patch
uses RES (0xab) to get Electronic ID and translates it to JEDEC ID.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Acked-by: Mike Frysinger <vapier@gentoo.org>
2010-06-30 23:47:08 -04:00
Becky Bruce a5496a180b drivers/usb/host/ohci-hcd: rename readl/writel to ohci_readl/ohci_writel
This avoids a build warning that you see if anyone in the
header chain has included io.h (which is coming shortly).  The previous
code redefined readl/writel; this patch renames it to be specific to
ohci.  The defines are also moved from ohci-hcd.c to ohci.h.

Signed-off-by: Becky Bruce <beckyb@kernel.crashing.org>
2010-06-30 21:38:10 +02:00
Ajay Kumar Gupta 944a4894c0 musb: Program extvbus for OMAP3EVM Rev >= E
OMAP3EVM Rev >=E uses external Vbus supply so setting 'extvbus'
to '1' for OMAP3EVM Rev >=E runtime based on EVM revision.

CC: Remy Bohmer <linux@bohmer.net>
Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com>
2010-06-30 21:37:37 +02:00
Ajay Kumar Gupta 9bb47abf0d musb: Add Phy programming for using external Vbus
MUSB PHY on OMAP3EVM Rev >= E uses external Vbus supply to support
500mA of power.We need to program MUSB PHY to use external Vbus
for this purpose.

Adding 'extvbus' member in musb_config structure which should be set
by all the boards where MUSB interface is using external Vbus supply.

Also added ULPI bus control register read/write abstraction for
Blackfin processor as it doesn't have ULPI registers.

CC: Remy Bohmer <linux@bohmer.net>
Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com>
Acked-by: Mike Frysinger <vapier@gentoo.org>
2010-06-30 21:37:37 +02:00
Ajay Kumar Gupta bbf4c01efc musb: Use name based initialization for musb_config
Changed musb_config initialization for omap3.c, davinci.c
and da8xx.c using name of structure fields. This would cause
the uninitialized field to be null by default and thus would
help in avoiding to init some flags required to be set only
for a few selected platforms.

CC: Remy Bohmer <linux@bohmer.net>
Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com>
2010-06-30 21:37:37 +02:00
Sergey Matyukevich 64203c7b0f USB OHCI support for at91sam9g45 SoC
Add USB OHCI support for at91sam9g45ekes/at91sam9m10g45ek boards.

Note that according to errata from Atmel, OHCI is not operational
on the first revision of at91sam9g45 chip. So this patch enables
OHCI support for later revisions.

Signed-off-by: Sergey Matyukevich <geomatsi@gmail.com>
2010-06-30 21:37:36 +02:00
Wolfgang Denk 0a9463e935 Merge branch 'master' into next 2010-06-30 01:02:11 +02:00
Sergei Shtylyov 9fb3b50857 EHCI: zero out QH transfer overlay in ehci_submit_async()
ehci_submit_async() doesn't really zero out the QH transfer overlay (as the EHCI
specification suggests) which leads to the controller seeing the "token" field
as the previous call has left it, i.e.:
- if a timeout occured on the previous call (Active bit left as 1), controller
  incorrectly tries to complete a previous transaction on a newly programmed
  endpoint;
- if a halt occured on the previous call (Halted bit set to 1), controller just
  ignores the newly programmed TD(s) and the function then keeps returning error
  ad infinitum.

This turned out to be caused by the wrong orger of the arguments to the memset()
call in ehci_alloc(), so the allocated TDs weren't cleared either.

While at it, stop needlessly initializing the alternate next TD pointer in the
QH transfer overlay...

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Acked-by: Remy Bohmer <linux@bohmer.net>
2010-06-29 23:03:40 +02:00
Felix Radensky c987f4753b tsec: Fix eTSEC2 link problem on P2020RDB
On P2020RDB eTSEC2 is connected to Vitesse VSC8221 PHY via SGMII.
Current TBI PHY settings for SGMII mode cause link problems on
this platform, link never comes up.

Fix this by making TBI PHY settings configurable and add a working
configuration for P2020RDB.

Signed-off-by: Felix Radensky <felix@embedded-sol.com>
Acked-by: Andy Fleming <afleming@freescale.com>
Acked-by: Peter Tyser <ptyser@xes-inc.com>
Tested-by: Peter Tyser <ptyser@xes-inc.com>
2010-06-29 23:03:23 +02:00
Wolfgang Denk e365c43d6a Merge branch 'next' of git://git.denx.de/u-boot-ti into next 2010-06-29 21:58:16 +02:00
Wolfgang Denk 953b7e6291 Remove AmigaOneG3SE board
The AmigaOneG3SE board has been orphaned or a very long time, and
broken for more than 12 releases resp. more than 3 years.  As nobody
seems to be interested any more in this stuff we may as well ged rid
of it, especially as it clutters many areas of the code so it is a
continuous pain for all kinds of ongoing work.

Signed-off-by: Wolfgang Denk <wd@denx.de>
2010-06-23 23:24:20 +02:00
Wolfgang Denk f35f3968c2 Merge branch 'master' into next 2010-06-23 21:17:29 +02:00
Peter Horton ceeba00308 UBI: initialise update marker
UBI: initialise update marker

The in kernel copy of a volume's update marker is not initialised from the
volume table. This means that volumes where an update was unfinnished will
not be treated as "forbidden to use". This is basically that the update
functionality was broken.

Signed-off-by: Peter Horton <zero@colonel-panic.org>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Stefan Roese <sr@denx.de>
2010-06-23 00:00:05 +02:00
Nick Thompson 77436d6696 Davinci: SPI performance enhancements
The following restructuring and optimisations increase the SPI
read performance from 1.3MiB/s (on da850) to 2.87MiB/s (on da830):

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

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

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

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

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

Signed-off-by: Nick Thompson <nick.thompson@ge.com>
Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
2010-06-22 11:06:01 -04:00
Wolfgang Denk 54e19a7ded Merge branch 'master' into next
Conflicts:
	Makefile

Signed-off-by: Wolfgang Denk <wd@denx.de>
2010-06-18 01:20:49 +02:00
Wolfgang Denk ec6baf53f7 Merge branch 'next' of git://git.denx.de/u-boot-video into next 2010-06-17 22:53:03 +02:00
Wolfgang Denk cecda170e7 Merge branch 'master' of git://git.denx.de/u-boot-marvell 2010-06-17 22:22:06 +02:00
Wolfgang Denk 399b09331f Merge branch 'master' of git://git.denx.de/u-boot-arm 2010-06-17 21:06:16 +02:00
Albert Aribaud 83142c112d Add Orion5x support to 16550 device driver
This patch provides access to the 16550-compatible
serial device of the Orion5x SoC.

Signed-off-by: Albert Aribaud <albert.aribaud@free.fr>
2010-06-17 19:37:01 +05:30
Minkyu Kang ffb4b02554 s5pc1xx: gpio: bug fix at gpio_set_pull function
When set to PULL_NONE, gpio_set_pull function is returned without write the register.
This patch fixed it.

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

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

Signed-off-by: Anatolij Gustschin <agust@denx.de>
2010-06-14 12:28:28 +02:00
Marek Vasut 43c15d3dd5 PXA: PXAMMC: Add Monahans support
This patch enables PXAMCI support on PXA3xx CPUs. This patch only enables MMC1
though, MMC2 and PXA31x MMC3 will need further patch to be operational.

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

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
2010-06-13 13:39:11 +02:00
Delio Brignoli 9268236529 DaVinci: Improve DaVinci SPI speed.
I have updated this patch based on the comments [1] by Wolfgang Denk and
removed unused variables.
[1][http://lists.denx.de/pipermail/u-boot/2010-May/071728.html]

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

Signed-off-by: Delio Brignoli <dbrignoli@audioscience.com>
Tested-by: Ben Gardiner <bengardiner@nanometrics.ca>
Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
2010-06-08 10:07:19 -05:00
Wolfgang Denk bd7bb6f8a3 Merge branch 'next' of git://git.denx.de/u-boot-nios 2010-05-28 20:34:39 +02:00
Thomas Chou 661ba14051 spi: add altera spi controller support
This patch adds the driver of altera spi controller, which is
used as epcs/spi flash controller. It also works with mmc_spi
driver.

This driver support more than one spi bus, with base list declared
#define CONFIG_SYS_ALTERA_SPI_LIST { BASE_0,BASE_1,... }

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Tested-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Scott McNutt <smcnutt@psyent.com>
2010-05-28 10:56:03 -04:00
Thomas Chou 3e6b86b555 misc: add gpio based status led driver
This patch adds a status led driver followed the GPIO access
conventions of Linux. The led mask is used to specify the gpio pin.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Tested-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Scott McNutt <smcnutt@psyent.com>
2010-05-28 10:56:03 -04:00
Andrew Caldwell c941b77adc Blackfin: nand: drain the write buffer before returning
The current Blackfin nand write function fills up the write buffer but
returns before it has had a chance to drain.  On faster systems, this
isn't a problem as the operation finishes before the ECC registers are
read, but on slower systems the ECC may be incomplete when the core tries
to read it.

So wait for the buffer to drain once we're done writing to it.

Signed-off-by: Andrew Caldwell <Andrew.Caldwell@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-05-26 17:59:13 -05:00
Wolfgang Denk c4976807cb Coding style cleanup, update CHANGELOG.
Signed-off-by: Wolfgang Denk <wd@denx.de>
2010-05-26 23:51:22 +02:00
Wolfgang Denk d74dda09f0 dm9000x.c: fix compile problems
Use readX() / writeX() accessors instead of inX() / outX().

Suggested-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Wolfgang Denk <wd@denx.de>
2010-05-26 22:19:35 +02:00
Wolfgang Denk 8b79f2ce80 Merge branch 'master' of git://git.denx.de/u-boot-ubi 2010-05-21 22:26:14 +02:00
Wolfgang Denk 8a452c2c17 Merge branch 'master' of git://git.denx.de/u-boot-imx 2010-05-21 22:22:23 +02:00
Stefan Roese 1b1f9a9d00 UBI: Ensure that "background thread" operations are really executed
The current U-Boot UBI implementation is copied from Linux. In this
porting the UBI background thread was not handled correctly. Upon write
operations ubi_wl_flush() makes sure, that all queued operations, like
page-erase, are completed. But this is missing for read operations.

This patch now makes sure that such operations (like scrubbing upon
bit-flip errors) are not queued, but executed directly.

Signed-off-by: Stefan Roese <sr@denx.de>
2010-05-19 10:57:19 +02:00
Stefano Babic 03af5abd85 MX31: Added support for the Casio COM57H5M10XRC to QONG
The patch adds setup to connect a CASIO COM57H5M10XRC
(640x480 TFT display) to the QONG module.

Signed-off-by: Stefano Babic <sbabic@denx.de>
2010-05-19 09:15:50 +02:00
Serge Ziryukin a599cde769 lan91c96, smc911x: remove useless free(ptr) calls on NULL ptr
Signed-off-by: Serge Ziryukin <ftrvxmtrx@gmail.com>
2010-05-17 23:21:08 +02:00
Wolfgang Denk 1a1e6bf12b Merge branch 'master' of git://git.denx.de/u-boot-mpc85xx 2010-05-17 23:11:21 +02:00
Wolfgang Denk 7b43db9211 drivers/mmc/fsl_esdhc.c: fix compiler warnings
Commit 77c1458d caused the following compiler warnings:

fsl_esdhc.c: In function 'esdhc_pio_read_write':
fsl_esdhc.c:142: warning: assignment discards qualifiers from pointer target type
fsl_esdhc.c: In function 'esdhc_setup_data':
fsl_esdhc.c:169: warning: unused variable 'wml_value'
fsl_esdhc.c: In function 'esdhc_pio_read_write':
fsl_esdhc.c:164: warning: control reaches end of non-void function

Fix these.

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Dipen Dudhat <dipen.dudhat@freescale.com>
Cc: Andy Fleming <afleming@freescale.com>
2010-05-15 19:47:17 +02:00
Kumar Gala f54fe87ace 85xx/fsl-sata: Use is_serdes_configured() to determine if SATA is enabled
On the MPC85xx platform if we have SATA its connected on SERDES.
Determing if SATA is enabled via sata_initialize should not be board
specific and thus we move it out of the MPC8536DS board code.

Additionally, now that we have is_serdes_configured() we can determine
if the given SATA port is enabled and error out if its not in the
driver.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2010-05-12 04:53:51 -05:00
Wolfgang Denk 7b2afd9381 Merge branch 'master' of git://git.denx.de/u-boot-i2c 2010-05-06 23:21:00 +02:00
Ender.Dai 767fdc4af6 drivers/*/Makefile: fix conditional compile rule.
Fix conditional compile rule for twl4030.c and videomodes.c.

Signed-off-by: Ender.Dai <ender.dai@gmail.com>
2010-05-06 00:41:08 +02:00
Graeme Russ 167cdad137 SERIAL: Enable port-mapped access
The x86 architecture exclusively uses Port-Mapped I/O (inb/outb) to access
the 16550 UARTs. This patch mimics how Linux selects between Memory-Mapped
and Port-Mapped I/O. This allows x86 boards to use CONFIG_SERIAL_MUTLI and
drop the custom serial port driver

Signed-off-by: Graeme Russ <graeme.russ@gmail.com>
2010-05-06 00:16:28 +02:00
Mike Frysinger b5cebb4fd6 Blackfin: TWI/I2C: implement multibus support
In order to do this cleanly, the register accesses have to be converted to
a C struct (base pointer), so do that in the process.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-05-05 10:04:38 +02:00
Stefano Babic d205ddcfc5 SPI: added support for MX51 to mxc_spi
This patch add SPI support for the MX51 processor.

Signed-off-by: Stefano Babic <sbabic@denx.de>
2010-05-05 09:48:41 +02:00
Stefano Babic dfe5e14fa2 MX: RTC13783 uses general function to access PMIC
The RTC is part of the Freescale's PMIC controller.
Use general function to access to PMIC internal registers.

Signed-off-by: Stefano Babic <sbabic@denx.de>
Tested-by: Magnus Lilja <lilja.magnus@gmail.com>
2010-05-05 09:48:41 +02:00
Stefano Babic 28bb6d34d3 MX: Added Freescale Power Management Driver
The patch add supports for the Freescale's Power
Management Controller (known as Atlas) used together with i.MX31/51
processors. It was tested with a MC13783 (MX31) and
MC13892 (MX51).

Signed-off-by: Stefano Babic <sbabic@denx.de>
2010-05-05 09:48:41 +02:00
Wolfgang Denk 679ec15462 Merge branch 'master' of git://git.denx.de/u-boot-net 2010-05-04 22:57:37 +02:00
Mike Frysinger 4324dc72df Blackfin: bfin_mac: hook up new write_hwaddr function
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2010-05-03 14:52:50 -07:00
Thomas Chou 3ac9d6c650 net: ethoc: add write_hwaddr support
Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2010-05-03 14:52:50 -07:00
Thomas Chou 6c7c444786 net: altera_tse: add write_hwaddr support
Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2010-05-03 14:52:50 -07:00
Heiko Schocher fb57ec97b9 net: fec_mxc: add write_hwaddr support
tested on the magnesium board.

Signed-off-by: Heiko Schocher <hs@denx.de>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2010-05-03 14:52:49 -07:00
Prafulla Wadaskar b5ce63ed12 net:kirkwood_egiga.c: MAC addresses programming using write_hwaddr
Added a new function kwgbe_write_hwaddr for programming egiga
controller's hardware address.
This function will be called for each egiga port being used

Signed-off-by: Prafulla Wadaskar <prafulla@marvell.com>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2010-05-03 14:52:49 -07:00
Thomas Chou c960b13ed2 net: add altera triple speeds ethernet mac driver
This driver supports the Altera triple speeds 10/100/1000 ethernet
mac.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2010-05-03 14:52:49 -07:00
Thomas Chou f6569884b4 net: add opencore 10/100 ethernet mac driver
This patch ports the opencore 10/100 ethernet mac driver ethoc.c
from linux kernel to u-boot.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2010-05-03 14:52:49 -07:00
Valentin Yakovenkov bd75db3feb smc911x driver frame alignment patch
SMSC911x chips have alignment function to allow frame payload data
(which comes after 14-bytes ethernet header) to be aligned at some
boundary when reading it from fifo (usually - 4 bytes boundary).
This is done by inserting fake zeros bytes BEFORE actual frame data when
reading from SMSC's fifo.
This function controlled by RX_CFG register. There are bits that
represents amount of fake bytes to be inserted.

Linux uses alignment of 4 bytes. Ethernet frame header is 14 bytes long,
so we need to add 2 fake bytes to get payload data aligned at 4-bytes
boundary.
Linux driver does this by adding IP_ALIGNMENT constant (defined at
skb.h) when calculating fifo data length. All network subsystem of Linux
uses this constant too when calculating different offsets.

But u-boot does not use any packet data alignment, so we don't need to
add anything when calculating fifo data length.
Moreover, driver zeros the RX_CFG register just one line up, so chip
does not insert any fake data at the beginig. So calculated data length
is always bigger by 1 word.

It seems that at almost every packet read we get an underflow condition
at fifo and possible corruption of data. Especially at continuous
transfers, such as tftp.

Just after removing this magic addition, I've got tftp transfer speed as
it aught to be at 100Mbps. It was really slow before.

It seems that fifo underflow occurs only when using byte packing on
32-bit blackfin bus (may be because of very small delay between reads).

Signed-off-by: Valentin Yakovenkov <yakovenkov@niistt.ru>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2010-05-03 14:52:49 -07:00
Prafulla Wadaskar f0588fdf92 net: Kirkwood_egiga.c bugfixes for rx path
Cosmetic changes: Few comments updated
Functionality: Rx packet frame size is programming should
be done when port is in disabled state. this is corrected

Signed-off-by: Prafulla Wadaskar <prafulla@marvell.com>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2010-05-03 14:52:49 -07:00