Commit Graph

2400 Commits

Author SHA1 Message Date
Wolfgang Denk cd6881b519 Minor coding style cleanup.
Signed-off-by: Wolfgang Denk <wd@denx.de>
2011-05-19 22:22:44 +02:00
Dirk Behme 96e0e7b36c MMC: omap_hsmmc.c: Add missing prototype header
Add missing header file to fix compilation warning

omap_hsmmc.c: In function 'omap_mmc_init':
omap_hsmmc.c:474: warning: implicit declaration of function 'get_cpu_family'
omap_hsmmc.c:474: warning: implicit declaration of function 'get_cpu_rev'

introduced by commit "MMC: omap_hsmmc.c: disable
multiblock rw on old rev omap34xx silicon"
(4ca9244d74)

Signed-off-by: Dirk Behme <dirk.behme@googlemail.com>
CC: Andy Fleming <afleming@freescale.com>
CC: John Rigby <john.rigby@linaro.org>
2011-05-18 14:38:05 -05:00
Fabio Estevam 1ed60d7ade fsl_esdhc: Initialize mmc->b_max
commit 262951(MMC: make b_max unconditional) missed to update fsl_esdhc.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Stefano Babic <sbabic@denx.de>
2011-05-18 14:37:45 -05:00
Lei Wen bc897b1d4d mmc: enable partition switch function for emmc
For emmc, it may have up to 7 partitions: two boot partitions, one
user partition, one RPMB partition and four general purpose partitions.
(Refer to JESD84-A44.pdf/page 154)

As bootloader may need to read out or reflashing images on those

different partitions, it is better to enable the partition switch with
console command support.

Also for partition would be restore to user partition(part 0) when CMD0
is used, so change mmc_init routine to perform normal initialization
only once for each slot, unless use the rescan command to force init
again.

Signed-off-by: Lei Wen <leiwen@marvell.com>
Acked-by: Andy Fleming <afleming@freescale.com>
2011-05-18 14:37:03 -05:00
Lei Wen ea6ebe2177 cmd_mmc: eliminate device num in the mmc command
mmc command applied device, like ide and usb...

Signed-off-by: Lei Wen <leiwen@marvell.com>
Acked-by: Andy Fleming <afleming@freescale.com>
2011-05-18 14:36:35 -05:00
Thomas Chou ed018b21d6 mmc_spi: generate response for send status command
A "send status" command is added with the commit "mmc: checking
status after commands with R1b response". But the status register
returned from send status command of SPI protocol is different from
that of MMC/SD protocol. We do a simple test and generate a response
in stead of full bit-by-bit translation.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
2011-05-18 14:30:34 -05:00
Reinhard Meyer 7f6ed7ff7c AT91: fix at91sam_wdt.c to reworked header files
Signed-off-by: Reinhard Meyer <u-boot@emk-elektronik.de>
2011-05-18 07:56:51 +02:00
Reinhard Meyer a0cfd18876 ATMEL: fix dataflash (dirty) this file should be converted to struct SoC access
Signed-off-by: Reinhard Meyer <u-boot@emk-elektronik.de>
2011-05-18 07:56:51 +02:00
Reinhard Meyer 86592f6059 AT91: change includes from asm/arch/io.h to asm/io.h
and remove the now unused asm/arch-at91/io.h

Signed-off-by: Reinhard Meyer <u-boot@emk-elektronik.de>
2011-05-18 07:56:51 +02:00
Reinhard Meyer 329f0f52fa ATMEL: fix related common atmel driver files
Signed-off-by: Reinhard Meyer <u-boot@emk-elektronik.de>
2011-05-18 07:56:51 +02:00
Reinhard Meyer 372f2783a7 AT91: fix related at91 driver files
Signed-off-by: Reinhard Meyer <u-boot@emk-elektronik.de>
2011-05-18 07:56:51 +02:00
Andreas Bießmann f4278b716c avr32: fixup definitions to ATMEL_BASE_xxx
Signed-off-by: Andreas Bießmann <biessmann@corscience.de>
2011-05-18 07:56:50 +02:00
Andreas Bießmann 5d73bc7af7 avr32: rename memory-map.h -> hardware.h
Signed-off-by: Andreas Bießmann <biessmann@corscience.de>
2011-05-18 07:56:50 +02:00
Macpaul Lin f194f6ba5b ftsmc020: fix relocation
Avoid relocation problem by fix global declaration.

Signed-off-by: Macpaul Lin <macpaul@andestech.com>
2011-05-12 23:43:27 +02:00
Macpaul Lin 4bed7265f2 ftide020: add faraday ide ahb controller
Faraday's ftide020_s is an IDE-AHB controller for SoC design.
This patch add the u-boot driver (PIO) of ftide020 ATA (IDE) driver.
IDE commands include read, info, and other functions has been implemented.

Because this IDE controller support AHB interface only which is differ
from other most IDE controller supports PCI interface. Some registers
access is required during CMD/DATA I/O. Hence a configuration
"CONFIG_IDE_AHB" is required to be defined according to the feature in
cmd_ide.c.

Signed-off-by: Macpaul Lin <macpaul@andestech.com>
2011-05-12 23:41:44 +02:00
Dirk Eibach 31c1bdd93d hwmon: Extend lm63.c to support LM64
This patch adds support for the National LM64 temperature
sensor with integrated fan control to lm63.c.
Main difference between LM63 and LM64 is 16°C offset in sensor
readings.

Signed-off-by: Dirk Eibach <eibach@gdsys.de>
2011-05-12 23:01:34 +02:00
Michal Simek 95efa79d08 net: xilinx emaclite: Fix return values
Fix return values for initialize/init/recv/send functions

Signed-off-by: Michal Simek <monstr@monstr.eu>
2011-05-12 22:29:28 +02:00
Luca Ceresoli 03eb129f8a NET: pass source IP address to packet handlers
This is needed for the upcoming TFTP server implementation.

This also simplifies PingHandler() and fixes rxhand_f documentation.

Signed-off-by: Luca Ceresoli <luca.ceresoli@comelit.it>
Cc: Wolfgang Denk <wd@denx.de>
Acked-by: Detlev Zundel <dzu@denx.de>
2011-05-12 19:38:19 +02:00
Wolfgang Denk 162eee4106 Merge branch 'master' of git://git.denx.de/u-boot-arm 2011-05-12 19:26:45 +02:00
John Rigby 910f1ae3eb Serial: p1011: new vendor init options
Two new options:

CONFIG_PL011_SERIAL_RLCR

Some vendor versions of PL011 serial ports (e.g. ST-Ericsson U8500)
have separate receive and transmit line control registers.  Set
this variable to initialize the extra register.

CONFIG_PL011_SERIAL_FLUSH_ON_INIT

On some platforms (e.g. U8500) U-Boot is loaded by a second stage
boot loader that has already initialized the UART.  Define this
variable to flush the UART at init time.
empty fifo on init

Signed-off-by: John Rigby <john.rigby@linaro.org>
Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com>
2011-05-12 19:09:07 +02:00
Fabio Estevam e53bcd947d gpio: imx: Fix return value on error
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
2011-05-11 23:03:15 +02:00
Wolfgang Denk aeabdeb7a3 Merge branch 'master' of git://git.denx.de/u-boot-mpc85xx 2011-04-30 22:45:55 +02:00
Thomas Chou dea6386b71 spi: add new driver for OpenCores tiny_spi
This patch adds support for OpenCores tiny_spi.

http://opencores.org/project,tiny_spi

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
2011-04-30 20:58:36 +02:00
Wolfgang Denk a146bcc208 Merge branch 'master' of git://git.denx.de/u-boot-mmc 2011-04-29 22:45:50 +02:00
Mingkai Hu 273feafefd powerpc: eSPI and eSPI controller support
Signed-off-by: Mingkai Hu <Mingkai.hu@freescale.com>
Singed-off-by: Jerry Huang <Chang-Ming.Huang@freescale.com>
Signed-off-by: Shaohui Xie <b21989@freescale.com>
Cc: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2011-04-29 07:34:09 -05:00
Jason Liu 4571de33ee fsl_esdhc: Fix multi-block read restriction on i.MX53 eSDHCv2
For freescale i.MX53 eSDHCv2, when using CMD12, cmdtype need
to be set to ABORT, otherwise, next read command will hang.

This is a software Software Restrictions in i.MX53 reference manual:

29.7.8 Multi-block Read
For pre-defined multi-block read operation, that is,the number of blocks
to read has been defined by previous CMD23 for MMC, or pre-defined number
of blocks in CMD53 for SDIO/SDCombo,or whatever multi-block read without
abort command at card side, an abort command, either automatic or manual
CMD12/CMD52, is still required by ESDHC after the pre-defined number of
blocks are done, to drive the internal state machine to idle mode. In this
case, the card may not respond to this extra abort command and ESDHC will
get Response Timeout.  It is recommended to manually send an abort command
with RSPTYP[1:0] both bits cleared.

Signed-off-by: Jason Liu <jason.hui@linaro.org>
2011-04-29 03:22:17 -05:00
John Rigby 4ca9244d74 MMC: omap_hsmmc.c: disable multiblock rw on old rev omap34xx silicon
Signed-off-by: John Rigby <john.rigby@linaro.org>
2011-04-29 03:22:17 -05:00
John Rigby 8feafcc49c MMC: make b_max unconditional
Make existing field b_max field in struct mmc unconditional
and use it instead of CONFIG_SYS_MMC_MAX_BLK_COUNT in mmc_bread
and mmc_bwrite.

Initialize b_max to CONFIG_SYS_MMC_MAX_BLK_COUNT in mmc_register
if it has not been initialized by the hw driver.

Initialize b_max to 0 in all callers to mmc_register.

Signed-off-by: John Rigby <john.rigby@linaro.org>
Signed-off-by: Andy Fleming <afleming@freescale.com>
2011-04-29 03:21:54 -05:00
Matt Waddel 23b93e1d66 MMC: Add support for PL180 ARM mmc device
Add support for the ARM PrimeCell MultiMedia Interface - PL180.
Ported from original device driver written by ST-Ericsson.

Signed-off-by: Matt Waddel <matt.waddel@linaro.org>
2011-04-29 03:20:01 -05:00
Wolfgang Denk 1911602b68 Merge branch 'master' of git://git.denx.de/u-boot-video 2011-04-28 23:45:16 +02:00
Timur Tabi ba8e76bd49 powerpc: use 'video-mode' environment variable to configure DIU
Use the 'video-mode' environment variable (for Freescale chips that have a
DIU display controller) to designate the full video configuration.  Previously,
the DIU driver used the 'monitor' variable, and it was used only to determine
the output video port.

The old definition of the "monitor" environment variable only determines
which video port to use for output.  This variable was set to a number (0,
1, or sometimes 2) to specify a DVI, LVDS, or Dual-LVDS port.  The
resolution was hard-coded into board-specific code.  The Linux command-line
arguments needed to be hard-coded to the proper video definition string.

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Anatolij Gustschin <agust@denx.de>
2011-04-28 21:31:16 +02:00
Timur Tabi a5dbdc81ea video: parse the video-mode environment variable
Add function video_get_video_mode(), which parses the "video-mode" environment
variable and returns each of its components.  The format matches the video=
command-line option used for Linux:

	video-mode=<driver>:<xres>x<yres>-<depth>@<freq><,option=string>

	<driver> The video driver, ignored by U-Boot
	<xres> The X resolution (in pixels) to use.
	<yres> The Y resolution (in pixels) to use.
	<depth> The color depth (in bits) to use.
	<freq> The frequency (in Hz) to use.
	<options> A comma-separated list of device-specific options

Signed-off-by: Timur Tabi <timur@freescale.com>
2011-04-28 21:31:02 +02:00
Anatolij Gustschin 74446b63dd cfb_console: fix RLE bitmap drawing code
There seems to be tools producing incorrect 'end of bitmap data'
markers '0100' in a RLE bitmap. Drawing such bitmaps can result
in overwriting memory above the frame buffer. E.g. on MPC5121e
based boards this memory can contain U-Boot environment.

We may not rely on the correct end of bitmap data marker 0001
only, but also have to check whether we are going to draw a
valid frame buffer scan line.

The patch provides a fix by maintaining a pixel counter
which is incremented by the amount of pixels we are going
to draw. If the counter exceeds frame buffer pixels limit
we stop the drawing with the error message.

Reported-by: Michael Weiss <michael.weiss@ifm.com>
Signed-off-by: Anatolij Gustschin <agust@denx.de>
Tested-by: Anatolij Gustschin <agust@denx.de>
2011-04-28 21:30:46 +02:00
Heiko Schocher 4bd5566ee8 i2c, soft_i2c: deblock bus if switching to another i2c bus
Deblock i2c bus when switching to another i2c bus, if using
i2c_set_bus_num().

Signed-off-by: Heiko Schocher <hs@denx.de>
cc: Wolfgang Denk <wd@denx.de>
cc: Detlev Zundel <dzu@denx.de>
cc: Valentin Longchamp <valentin.longchamp@keymile.com>
cc: Holger Brunck <holger.brunck@keymile.com>
Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
2011-04-28 10:57:08 +02:00
Wolfgang Denk f38536f913 Merge branch 'master' of git://git.denx.de/u-boot-arm 2011-04-27 21:48:09 +02:00
Wolfgang Denk 5f902cf139 Merge branch 'spi' of git://git.denx.de/u-boot-blackfin 2011-04-27 21:42:18 +02:00
Macpaul Lin 00d10eb041 ftsmc020: move ftsmc020 static mem controller to driver/mtd
Move the header file and definitions of ftsmc020
static memory control unit from a320 SoC folder to
"drivers/mtd" folder.

This change will let other SoC which also use ftsmc020
could share the same header file.

Signed-off-by: Macpaul Lin <macpaul@andestech.com>
2011-04-27 19:38:10 +02:00
Albert ARIBAUD 57b4bce996 Replace obsolete e-mail address
Signed-off-by: Albert ARIBAUD <albert.u.boot@aribaud.net>
2011-04-27 19:38:09 +02:00
Macpaul Lin caddb8e41e ftpmu010: fix relocation and enhance features
1. ftpmu010.h: fix and add definitions
   Enhanced for more features and asm related support
   according to datasheet.

   Note:
    - FTPMU010_PDLLCR0_HCLKOUTDIS is "incorrect" in datasheet.
    - FTPMU010_PDLLCR0_DLLFRANG is only 1 bit at bit #19. (not 20-19)
    - FTPMU010_PDLLCR0_HCLKOUTDIS is 4 bits at bit #20. (not 24-21)

2. ftpmu010.c: enhance features and fix relocation
   - The following functions is added for pmu features.
     ftpmu010_mfpsr_select_dev()
     ftpmu010_sdramhtc_set()
   - This patch also fix the declare statement for relocation.

Signed-off-by: Macpaul Lin <macpaul@andestech.com>
2011-04-27 19:38:08 +02:00
Lei Wen adb00bb6a0 I2C: mv_i2c: add multi bus support
Add the ability to support multiple i2c bus for mv_i2c

Acked-by: Heiko Schocher <hs@denx.de>
Acked-by: Prafulla Wadaskar <prafulla@marvell.com>
Signed-off-by: Lei Wen <leiwen@marvell.com>
2011-04-27 19:38:08 +02:00
Lei Wen 3df619ec2c mv_i2c: use structure to replace the direclty define
Add i2c_clk_enable in the cpu specific code, since previous platform it,
while new platform don't need. In the pantheon and armada100 platform,
this function is defined as NULL one.

Acked-by: Heiko Schocher <hs@denx.de>
Acked-by: Prafulla Wadaskar <prafulla@marvell.com>
Signed-off-by: Lei Wen <leiwen@marvell.com>
2011-04-27 19:38:08 +02:00
Lei Wen 879de1275a mv_i2c: fix timeout value to be consistent with comments
The original 10000 value would be 100ms, which is not
the comments said.

Acked-by: Heiko Schocher <hs@denx.de>
Acked-by: Prafulla Wadaskar <prafulla@marvell.com>
Signed-off-by: Lei Wen <leiwen@marvell.com>
2011-04-27 19:38:07 +02:00
Lei Wen 68432c2743 pxa: move i2c driver to the common place
For better sharing with other platform other than pxa's,
it is more convenient to put the driver to the common place.

Acked-by: Heiko Schocher <hs@denx.de>
Acked-by: Prafulla Wadaskar <prafulla@marvell.com>
Signed-off-by: Lei Wen <leiwen@marvell.com>
2011-04-27 19:38:07 +02:00
Po-Yu Chuang d6150db2dc power: ftpmu010: move drivers/power/ftpmu010.h to include/faraday
Also add API declarations.

Signed-off-by: Po-Yu Chuang <ratbert@faraday-tech.com>
Signed-off-by: Albert Aribaud <albert.aribaud@free.fr>
2011-04-27 19:38:07 +02:00
Stefano Babic 8627111543 IMX: MX31: Cleanup include files and drop nasty #ifdef in drivers
As exception among the i.MX processors, the i.MX31 has headers
without general names (mx31-regs.h, mx31.h instead of imx-regs.h and
clock.h). This requires several nasty #ifdef in the drivers to
include the correct header. The patch cleans up the driver and
renames the header files as for the other i.MX processors.

Signed-off-by: Stefano Babic <sbabic@denx.de>
2011-04-27 19:38:05 +02:00
Heiko Schocher 71d19f30d6 rtc, rv3029: add trickle charger support.
Signed-off-by: Heiko Schocher <hs@denx.de>
Acked-by: Detlev Zundel <dzu@denx.de>
2011-04-26 00:24:40 +02:00
Thomas Chou 6c3eb43a0f bfin_spi: add spi_set_speed
The new speed will be applied by spi_claim_bus.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-04-25 01:45:42 -04:00
Aaron Williams a90b9575f3 cfi_flash driver - Add delay after reset command
I ran into a problem where the reset was failing except when I enabled
debugging support.  After talking with Garret Swalling at Spansion I
was told that the GL-N series of devices require a 500ns wait for the
reset to complete.  The below patch adds a 1us delay after all reset
commands.

-Aaron Williams

Signed-off-by: Aaron Williams <aaron.williams@caviumnetworks.com>
Signed-off-by: Stefan Roese <sr@denx.de>
2011-04-21 15:51:49 +02:00
Heiko Schocher 5b448adb4b mtd, cfi: read AMD 3-byte (expanded) device ids on 16bit devices
tested on the a4m072 board with a S29GL512P flash.

flinfo without this patch
Bank # 1: CFI conformant flash (16 x 16)  Size: 32 MB in 256 Sectors
  AMD Standard command set, Manufacturer ID: 0x01, Device ID: 0x227E
  Erase timeout: 16384 ms, write timeout: 2 ms
  Buffer write timeout: 5 ms, buffer size: 32 bytes
[...]

flinfo with this patch
Bank # 1: CFI conformant flash (16 x 16)  Size: 32 MB in 256 Sectors
  AMD Standard command set, Manufacturer ID: 0x01, Device ID: 0x227E2301
  Erase timeout: 16384 ms, write timeout: 2 ms
  Buffer write timeout: 5 ms, buffer size: 32 bytes
[...]

Signed-off-by: Heiko Schocher <hs@denx.de>
Signed-off-by: Stefan Roese <sr@denx.de>
2011-04-21 15:51:39 +02:00
Mike Frysinger 6a011ce851 cfi_flash: reverse geometry for M29W800DT parts
The M29W800DT parts also report their geometry with the sector layout
reversed.  So add that ID to the flash_fixup_stm function.

Otherwise, we get:
bfin> flinfo

Bank # 1: CFI conformant FLASH (16 x 16)  Size: 1 MB in 19 Sectors
  AMD Standard command set, Manufacturer ID: 0x20, Device ID: 0x22D7
  Erase timeout: 8192 ms, write timeout: 1 ms

  Sector Start Addresses:
  20000000        20004000        20006000        20008000        20010000
  20020000        20030000        20040000        20050000        20060000
  20070000        20080000        20090000        200A0000        200B0000
  200C0000        200D0000        200E0000        200F0000

Reported-by: Jianxi Fu <fujianxi@gmail.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Stefan Roese <sr@denx.de>
2011-04-21 15:51:17 +02:00