]> git.dujemihanovic.xyz Git - u-boot.git/log
u-boot.git
12 years agopowerpc/corenet: fix compile error when CONFIG_SYS_NO_FLASH is defined
Shaohui Xie [Thu, 28 Jun 2012 23:35:34 +0000 (23:35 +0000)]
powerpc/corenet: fix compile error when CONFIG_SYS_NO_FLASH is defined

ENV location compile logic is wrong, and when CONFIG_SYS_NO_FLASH is defined
and non-NOR u-boot is building, it will cause compile error. Also, add
CONFIG_SYS_FLASH_USE_BUFFER_WRITE for p2041, which will improve NOR flash
write performance.

Signed-off-by: Shaohui Xie <Shaohui.Xie@freescale.com>
Signed-off-by: Andy Fleming <afleming@freescale.com>
12 years agopowerpc/mpc8xxx: fix workaround for errata DDR111 and DDR134 for DDR over 4GB
York Sun [Mon, 21 May 2012 08:43:11 +0000 (08:43 +0000)]
powerpc/mpc8xxx: fix workaround for errata DDR111 and DDR134 for DDR over 4GB

The fix for errata workaround is to avoid covering physical address
0xff000000 to 0xffffffff during the implementation. Early commit eb672e92
works until DDR size exceeds 4GB. This fix works for DDR size up to 64GB.

Signed-off-by: York Sun <yorksun@freescale.com>
Signed-off-by: Andy Fleming <afleming@freescale.com>
12 years agopowerpc/p1022ds: fix DIU/LBC switching with NAND enabled
Timur Tabi [Fri, 18 May 2012 09:09:09 +0000 (09:09 +0000)]
powerpc/p1022ds: fix DIU/LBC switching with NAND enabled

In order for indirect mode on the PIXIS to work properly, both chip selects
need to be set to GPCM mode, otherwise writes to the chip select base
addresses will not actually post to the local bus -- they'll go to the
NAND controller instead.  Therefore, we need to set BR0 and BR1 to GPCM
mode before switching to indirect mode.

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Andy Fleming <afleming@freescale.com>
12 years agopowerpc/p1022ds: add support for SPI and SD boot
Matthew McClintock [Fri, 18 May 2012 06:04:17 +0000 (06:04 +0000)]
powerpc/p1022ds: add support for SPI and SD boot

Add TLB mappings, board target options, and configuration items
need for SPI/SD boot.

Since P1022DS RevB board, the NOR flash have been changed to 16 bit/28bit
address flash, therefore, when SDHC/ESPI booting and access to eLBC,
the PMUXCR[0~1] must be set to 10b, and PMUXCR[9~10] must be set to
00b for them.

Configure the PX_BRDCFG0[0~1] to 10b which is connected to
SPI devices as SPI_CS(0:3)_B.

Signed-off-by: Matthew McClintock <msm@freescale.com>
Signed-off-by: Jerry Huang <Chang-Ming.Huang@freescale.com>
Signed-off-by: Jiang Yutang <b14898@freescale.com>
Signed-off-by: Andy Fleming <afleming@freescale.com>
12 years agopowerpc/82xx: adapt SDRAM settings for mgcoge3ne
Gerlando Falauto [Fri, 27 Jul 2012 05:16:40 +0000 (05:16 +0000)]
powerpc/82xx: adapt SDRAM settings for mgcoge3ne

The HW guys suggested to change these two values. And these values are
now identical to the values we use on mgcoge.

PSDMR_WRC was set to 1C as it should lead to better performance.

Signed-off-by: Gerlando Falauto <gerlando.falauto@keymile.com>
Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
12 years agopowerpc/82xx: use SDRAM detection for mgcoge2ne
Gerlando Falauto [Fri, 27 Jul 2012 05:16:39 +0000 (05:16 +0000)]
powerpc/82xx: use SDRAM detection for mgcoge2ne

mgcoge2ne was an intermediate step towards mgcoge3ne. One difference is the
smaller SDRAM on mgcoge2ne (128MB). To support both boards with the same
u-boot we use here the SDRAM detection.

This patch enables SDRAM detection between 256MB and 128MB.
So in addition to the existing 256MB geometry:
     4 chips x 8M (13 rows, 10 cols) x 16 bit x 4 banks
we can now also have 128MB geometry:
     4 chips x 4M (13 rows,  9 cols) x 16 bit x 4 banks

Signed-off-by: Gerlando Falauto <gerlando.falauto@keymile.com>
12 years agopowerpc/82xx: add SDRAM detection for km82xx
Gerlando Falauto [Fri, 27 Jul 2012 05:16:38 +0000 (05:16 +0000)]
powerpc/82xx: add SDRAM detection for km82xx

This patch adds SDRAM detection feature to km82xx boards.
To enable this feature, define CONFIG_SYS_SDRAM_LIST as the initializer
for an array of struct sdram_conf_s.
These structs will expose the bitfields within registers PSDMR and OR1 which
have to be different between configurations; common bitfields will be
defined, as usual, within CONFIG_SYS_PSDMR and CONFIG_SYS_OR1.
If CONFIG_SYS_SDRAM_LIST is not defined, then the usual behavior is retained.

Signed-off-by: Gerlando Falauto <gerlando.falauto@keymile.com>
12 years agopowerpc/82xx: move km/km82xx-common.h within km82xx.h
Gerlando Falauto [Fri, 27 Jul 2012 05:16:37 +0000 (05:16 +0000)]
powerpc/82xx: move km/km82xx-common.h within km82xx.h

The only file including km82xx-common.h is km82xx.h.
So there is no need to have it as a separate file.

Signed-off-by: Gerlando Falauto <gerlando.falauto@keymile.com>
12 years agopowerpc/82xx: merge mgcoge.h and mgcoge3ne.h into km82xx.h
Gerlando Falauto [Mon, 30 Jul 2012 08:22:30 +0000 (08:22 +0000)]
powerpc/82xx: merge mgcoge.h and mgcoge3ne.h into km82xx.h

Since mgcoge and mgcoge3ne are the only km82xx boards, there is no need
to keep them as separate .h config files.
Therefore, make mgcoge3ne.h and mgcoge.h converge into a single km82xx.h
file.

Signed-off-by: Gerlando Falauto <gerlando.falauto@keymile.com>
12 years agopowerpc/82xx: move mgcoge, mgcoge3ne defines to ease subsequent merge
Gerlando Falauto [Fri, 27 Jul 2012 05:16:35 +0000 (05:16 +0000)]
powerpc/82xx: move mgcoge, mgcoge3ne defines to ease subsequent merge

Signed-off-by: Gerlando Falauto <gerlando.falauto@keymile.com>
12 years agopowerpc/82xx: remove unused define for mgcoge3ne
Holger Brunck [Fri, 27 Jul 2012 05:16:34 +0000 (05:16 +0000)]
powerpc/82xx: remove unused define for mgcoge3ne

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
12 years agoSMDK6400: Add MAINTAINERS entry
Zhong Hongbo [Fri, 20 Jul 2012 02:24:55 +0000 (02:24 +0000)]
SMDK6400: Add MAINTAINERS entry

Signed-off-by: Zhong Hongbo <bocui107@gmail.com>
12 years agoMerge branch 'master' of git://git.denx.de/u-boot-i2c
Wolfgang Denk [Tue, 31 Jul 2012 20:07:42 +0000 (22:07 +0200)]
Merge branch 'master' of git://git.denx.de/u-boot-i2c

* 'master' of git://git.denx.de/u-boot-i2c:
  km/common: remove printfs for i2c deblocking code
  CONFIG: SMDK5250: I2C: Enable I2C
  I2C: Add support for Multi channel
  I2C: Modify the I2C driver for EXYNOS5
  I2C: Move struct s3c24x0_i2c to a common place.
  EXYNOS: PINMUX: Add pinmux support for I2C
  EXYNOS5: define EXYNOS5_I2C_SPACING
  EXYNOS: Add I2C base address.
  EXYNOS: CLK: Add i2c clock
  mx6qsabrelite: add i2c multi-bus support
  imx-common: add i2c.c for bus recovery support
  i.mx53: add definition for I2C3_BASE_ADDR
  i.mx: iomux-v3.c: move to imx-common directory
  i.mx: iomux-v3.h: move to imx-common include directory
  iomux-v3: remove include of mx6x_pins.h
  mxc_i2c: finish adding CONFIG_I2C_MULTI_BUS support
  mxc_i2c: add bus recovery support
  mxc_i2c: prep work for multiple busses support
  mxc_i2c: add i2c_regs argument to i2c_imx_stop
  mxc_i2c: add retries
  mxc_i2c: check for arbitration lost
  mxc_i2c: change slave addr if conflicts with destination.
  mxc_i2c: don't disable controller after every transaction
  mxc_i2c: place i2c_reset code inline
  mxc_i2c: place imx_start code inline
  mxc_i2c: remove redundant read
  mxc_i2c: combine i2c_imx_bus_busy and i2c_imx_trx_complete into wait_for_sr_state
  mxc_i2c.c: code i2c_probe as a 0 length i2c_write
  mxc_i2c: call i2c_imx_stop on error in i2c_read/i2c_write
  mxc_i2c: create i2c_init_transfer
  mxc_i2c: clear i2sr before waiting for bit
  mxc_i2c: create tx_byte function
  mxc_i2c: remove ifdef of CONFIG_HARD_I2C
  mxc_i2c: fix i2c_imx_stop
  i2c: deblock i2c bus also if accessed before realocation

Signed-off-by: Wolfgang Denk <wd@denx.de>
12 years agoMerge branch 'master' of git://git.denx.de/u-boot-microblaze
Wolfgang Denk [Tue, 31 Jul 2012 20:01:08 +0000 (22:01 +0200)]
Merge branch 'master' of git://git.denx.de/u-boot-microblaze

* 'master' of git://git.denx.de/u-boot-microblaze:
  microblaze: Wire up SPI driver
  spi: microblaze: Adds driver for Xilinx SPI controller
  microblaze: intc: Clear interrupt code
  microblaze: Call serial multi initialization
  microblaze: Move __udelay implementation
  microblaze: Remove extern from board.c
  microblaze: Wire up dts configuration
  fdt: Add board specific dts inclusion
  microblaze: Move individual board linker scripts to common script in cpu tree.
  microblaze: Add gpio.h
  microblaze: Add missing undefs for UBI and UBIFS
  microblaze: Expand and correct configuration comments
  microblaze: Enable ubi support
  microblaze: Avoid compile error on systems without cfi flash
  microblaze: Remove wrong define CONFIG_SYS_FLASH_PROTECTION

Conflicts:
drivers/spi/Makefile

Signed-off-by: Wolfgang Denk <wd@denx.de>
12 years agokm/common: remove printfs for i2c deblocking code
Holger Brunck [Fri, 27 Jul 2012 04:58:13 +0000 (04:58 +0000)]
km/common: remove printfs for i2c deblocking code

This code will also be used before reallocation and during this time we
are not allowed to do these printings.

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
Acked-by: Prafulla Wadaskar <Prafulla@marvell.com>
Acked-by: Heiko Schocher <hs@denx.de>
12 years agoCONFIG: SMDK5250: I2C: Enable I2C
Rajeshwari Shinde [Mon, 23 Jul 2012 21:23:55 +0000 (21:23 +0000)]
CONFIG: SMDK5250: I2C: Enable I2C

This enables I2C support on smdk5250.
Pinmux setting moved to board file to avoid repeated setting of
gpio lines.

Signed-off-by: Alim Akhtar <alim.akhtar@samsung.com>
Signed-off-by: Doug Anderson <dianders@chromium.org>
Signed-off-by: Rajeshwari Shinde <rajeshwari.s@samsung.com>
Acked-by: Simon Glass <sjg@chromium.org>
12 years agoI2C: Add support for Multi channel
Rajeshwari Shinde [Mon, 23 Jul 2012 21:23:54 +0000 (21:23 +0000)]
I2C: Add support for Multi channel

This adds multiple i2c channel support for I2C.

Signed-off-by: Alim Akhtar <alim.akhtar@samsung.com>
Signed-off-by: Rajeshwari Shinde <rajeshwari.s@samsung.com>
Acked-by: Simon Glass <sjg@chromium.org>
12 years agoI2C: Modify the I2C driver for EXYNOS5
Rajeshwari Shinde [Mon, 23 Jul 2012 21:23:53 +0000 (21:23 +0000)]
I2C: Modify the I2C driver for EXYNOS5

This patch modifies the S3C I2C driver to suppport EXYNOS5.
The cahnges made to driver are as follows:
        - I2C base address is passed as a parameter to many
        functions to avoid multiple #ifdef
        - Channel initialisation is moved to a commom funation
        as it is required by i2c_init.
        - Hardcoding for I2CCON_ACKGEN removed.
        - Replaced printf with debug.
        - Checkpatch issues resolved.
        - Pinmux setting will be done in board/samsung/smdk5250/smdk5250.c
        to avoid repeated setting of gpio lines, as it have multi bus support.

Signed-off-by: Alim Akhtar <alim.akhtar@samsung.com>
Signed-off-by: Doug Anderson <dianders@chromium.org>
Signed-off-by: Rajeshwari Shinde <rajeshwari.s@samsung.com>
Acked-by: Simon Glass <sjg@chromium.org>
12 years agoI2C: Move struct s3c24x0_i2c to a common place.
Rajeshwari Shinde [Mon, 23 Jul 2012 21:23:52 +0000 (21:23 +0000)]
I2C: Move struct s3c24x0_i2c to a common place.

struct s3c24x0_i2c is being moved to common local header file so that
the same can be used by s3c series and exynos series SoCs.

Signed-off-by: Alim Akhtar <alim.akhtar@samsung.com>
Signed-off-by: Doug Anderson <dianders@chromium.org>
Signed-off-by: Rajeshwari Shinde <rajeshwari.s@samsung.com>
Acked-by: Simon Glass <sjg@chromium.org>
12 years agoEXYNOS: PINMUX: Add pinmux support for I2C
Rajeshwari Shinde [Mon, 23 Jul 2012 21:23:51 +0000 (21:23 +0000)]
EXYNOS: PINMUX: Add pinmux support for I2C

This patch adds pinmux code for I2C.

Signed-off-by: Rajeshwari Shinde <rajeshwari.s@samsung.com>
Acked-by: Simon Glass <sjg@chromium.org>
12 years agoEXYNOS5: define EXYNOS5_I2C_SPACING
Rajeshwari Shinde [Mon, 23 Jul 2012 21:23:50 +0000 (21:23 +0000)]
EXYNOS5: define EXYNOS5_I2C_SPACING

This patch defined EXYNOS5_I2C_SPACING used to calculate I2C channel
base address.

Signed-off-by: Rajeshwari Shinde <rajeshwari.s@samsung.com>
Acked-by: Simon Glass <sjg@chromium.org>
12 years agoEXYNOS: Add I2C base address.
Rajeshwari Shinde [Mon, 23 Jul 2012 21:23:49 +0000 (21:23 +0000)]
EXYNOS: Add I2C base address.

This patch adds the base address for I2C.

Signed-off-by: Alim Akhtar <alim.akhtar@samsung.com>
Signed-off-by: Rajeshwari Shinde <rajeshwari.s@samsung.com>
Acked-by: Simon Glass <sjg@chromium.org>
12 years agoEXYNOS: CLK: Add i2c clock
Rajeshwari Shinde [Mon, 23 Jul 2012 21:23:48 +0000 (21:23 +0000)]
EXYNOS: CLK: Add i2c clock

This adds i2c clock information for EXYNOS5.

Signed-off-by: Alim Akhtar <alim.akhtar@samsung.com>
Signed-off-by: Doug Anderson <dianders@chromium.org>
Signed-off-by: Rajeshwari Shinde <rajeshwari.s@samsung.com>
Acked-by: Simon Glass <sjg@chromium.org>
12 years agomx6qsabrelite: add i2c multi-bus support
Troy Kisky [Thu, 19 Jul 2012 08:18:26 +0000 (08:18 +0000)]
mx6qsabrelite: add i2c multi-bus support

This includes bus recovery support.

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
Acked-by: Jason Liu <r64343@freescale.com>
12 years agoimx-common: add i2c.c for bus recovery support
Troy Kisky [Thu, 19 Jul 2012 08:18:25 +0000 (08:18 +0000)]
imx-common: add i2c.c for bus recovery support

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
12 years agoi.mx53: add definition for I2C3_BASE_ADDR
Troy Kisky [Thu, 19 Jul 2012 08:18:24 +0000 (08:18 +0000)]
i.mx53: add definition for I2C3_BASE_ADDR

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
12 years agoi.mx: iomux-v3.c: move to imx-common directory
Troy Kisky [Thu, 19 Jul 2012 08:18:23 +0000 (08:18 +0000)]
i.mx: iomux-v3.c: move to imx-common directory

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
12 years agoi.mx: iomux-v3.h: move to imx-common include directory
Troy Kisky [Thu, 19 Jul 2012 08:18:22 +0000 (08:18 +0000)]
i.mx: iomux-v3.h: move to imx-common include directory

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
12 years agoiomux-v3: remove include of mx6x_pins.h
Troy Kisky [Thu, 19 Jul 2012 08:18:21 +0000 (08:18 +0000)]
iomux-v3: remove include of mx6x_pins.h

This include is not needed.

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
Acked-by: Jason Liu <r64343@freescale.com>
12 years agomxc_i2c: finish adding CONFIG_I2C_MULTI_BUS support
Troy Kisky [Thu, 19 Jul 2012 08:18:20 +0000 (08:18 +0000)]
mxc_i2c: finish adding CONFIG_I2C_MULTI_BUS support

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
12 years agomxc_i2c: add bus recovery support
Troy Kisky [Thu, 19 Jul 2012 08:18:19 +0000 (08:18 +0000)]
mxc_i2c: add bus recovery support

Add support for calling a function that will toggle the
SCL line to return the bus to idle condition.

The actual toggling function is added in a later patch.

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
12 years agomxc_i2c: prep work for multiple busses support
Troy Kisky [Thu, 19 Jul 2012 08:18:18 +0000 (08:18 +0000)]
mxc_i2c: prep work for multiple busses support

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
12 years agomxc_i2c: add i2c_regs argument to i2c_imx_stop
Troy Kisky [Thu, 19 Jul 2012 08:18:17 +0000 (08:18 +0000)]
mxc_i2c: add i2c_regs argument to i2c_imx_stop

This is prep work for CONFIG_I2C_MULTI_BUS.

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
Acked-by: Marek Vasut <marex@denx.de>
12 years agomxc_i2c: add retries
Troy Kisky [Thu, 19 Jul 2012 08:18:16 +0000 (08:18 +0000)]
mxc_i2c: add retries

Retry unexpected hardware errors. This
will not retry a received NAK.

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
12 years agomxc_i2c: check for arbitration lost
Troy Kisky [Thu, 19 Jul 2012 08:18:15 +0000 (08:18 +0000)]
mxc_i2c: check for arbitration lost

No need to continue waiting if arbitration lost.

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
Acked-by: Marek Vasut <marex@denx.de>
12 years agomxc_i2c: change slave addr if conflicts with destination.
Troy Kisky [Thu, 19 Jul 2012 08:18:14 +0000 (08:18 +0000)]
mxc_i2c: change slave addr if conflicts with destination.

The i2c controller cannot be both master and slave in the
same transaction.

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
12 years agomxc_i2c: don't disable controller after every transaction
Troy Kisky [Thu, 19 Jul 2012 08:18:13 +0000 (08:18 +0000)]
mxc_i2c: don't disable controller after every transaction

This helps in a multiple bus master environment which
is why I also added a wait for bus idle.

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
12 years agomxc_i2c: place i2c_reset code inline
Troy Kisky [Thu, 19 Jul 2012 08:18:12 +0000 (08:18 +0000)]
mxc_i2c: place i2c_reset code inline

imx_reset is only referenced once so
move to that location.

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
Acked-by: Marek Vasut <marex@denx.de>
12 years agomxc_i2c: place imx_start code inline
Troy Kisky [Thu, 19 Jul 2012 08:18:11 +0000 (08:18 +0000)]
mxc_i2c: place imx_start code inline

imx_start is only referenced once so
move to that location.

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
Acked-by: Marek Vasut <marex@denx.de>
12 years agomxc_i2c: remove redundant read
Troy Kisky [Thu, 19 Jul 2012 08:18:10 +0000 (08:18 +0000)]
mxc_i2c: remove redundant read

wait_for_sr_state returns i2sr on success
so no need to read again.

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
Acked-by: Marek Vasut <marex@denx.de>
12 years agomxc_i2c: combine i2c_imx_bus_busy and i2c_imx_trx_complete into wait_for_sr_state
Troy Kisky [Thu, 19 Jul 2012 08:18:09 +0000 (08:18 +0000)]
mxc_i2c: combine i2c_imx_bus_busy and i2c_imx_trx_complete into wait_for_sr_state

Not using udelay gives a more accurate timeout. The current implementation of udelay
in imx-common does not seem to wait at all for a udelay(1).

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
Acked-by: Marek Vasut <marex@denx.de>
----
V2: Added WATCHDOG_RESET as suggested by Marek Vasut
add error message when stop fails

mxc_i2c: code i2c_probe as a 0 length i2c_write

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
Acked-by: Marek Vasut <marex@denx.de>
Acked-by: Stefano Babic <sbabic@denx.de>
12 years agomxc_i2c.c: code i2c_probe as a 0 length i2c_write
Troy Kisky [Thu, 19 Jul 2012 08:18:08 +0000 (08:18 +0000)]
mxc_i2c.c: code i2c_probe as a 0 length i2c_write

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
Acked-by: Marek Vasut <marex@denx.de>
Acked-by: Stefano Babic <sbabic@denx.de>
12 years agomxc_i2c: call i2c_imx_stop on error in i2c_read/i2c_write
Troy Kisky [Thu, 19 Jul 2012 08:18:07 +0000 (08:18 +0000)]
mxc_i2c: call i2c_imx_stop on error in i2c_read/i2c_write

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
12 years agomxc_i2c: create i2c_init_transfer
Troy Kisky [Thu, 19 Jul 2012 08:18:06 +0000 (08:18 +0000)]
mxc_i2c: create i2c_init_transfer

Initial code of i2c_read and i2c_write
is identical, move to subroutine.

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
Acked-by: Marek Vasut <marex@denx.de>
Acked-by: Stefano Babic <sbabic@denx.de>
12 years agomxc_i2c: clear i2sr before waiting for bit
Troy Kisky [Thu, 19 Jul 2012 08:18:05 +0000 (08:18 +0000)]
mxc_i2c: clear i2sr before waiting for bit

Let's clear the sr register before waiting for
bit to be set, instead of clearing it after
hardware sets it. No real operational difference here,
but allows combining of i2c_imx_trx_complete and
i2c_imx_bus_busy in later patches.

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
Acked-by: Marek Vasut <marex@denx.de>
12 years agomxc_i2c: create tx_byte function
Troy Kisky [Thu, 19 Jul 2012 08:18:04 +0000 (08:18 +0000)]
mxc_i2c: create tx_byte function

Use tx_byte function instead of having 3 copies
of the code.

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
Acked-by: Marek Vasut <marex@denx.de>
12 years agomxc_i2c: remove ifdef of CONFIG_HARD_I2C
Troy Kisky [Thu, 19 Jul 2012 08:18:03 +0000 (08:18 +0000)]
mxc_i2c: remove ifdef of CONFIG_HARD_I2C

This is always selected when CONFIG_I2C_MXC is
selected, so it adds no value.

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
Acked-by: Marek Vasut <marex@denx.de>
12 years agomxc_i2c: fix i2c_imx_stop
Troy Kisky [Thu, 19 Jul 2012 08:18:02 +0000 (08:18 +0000)]
mxc_i2c: fix i2c_imx_stop

Instead of clearing 2 bits, all the other
bits were set because '|=' was used instead
of '&='.

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
Acked-by: Marek Vasut <marex@denx.de>
Acked-by: Stefano Babic <sbabic@denx.de>
12 years agoi2c: deblock i2c bus also if accessed before realocation
Holger Brunck [Thu, 28 Jun 2012 04:30:22 +0000 (04:30 +0000)]
i2c: deblock i2c bus also if accessed before realocation

If we switch to a different i2c bus in changing the mux config for the
i2c mux, we have to be sure to deblock the bus also before realocation.

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
cc: Heiko Schocher <hs@denx.de>
cc: Valentin Longchamp <valentin.longchamp@keymile.com>

12 years agomicroblaze: Wire up SPI driver
Stephan Linz [Sat, 28 Jul 2012 22:25:36 +0000 (00:25 +0200)]
microblaze: Wire up SPI driver

Depending on XILINX_SPI_FLASH_BASEADDR enable SPI flash
and environment in SPI flash.

Expected values from xparameters.h are:
    - XILINX_SPI_FLASH_BASEADDR
    - XILINX_SPI_FLASH_MAX_FREQ
    - XILINX_SPI_FLASH_CS

Signed-off-by: Stephan Linz <linz@li-pro.net>
Acked-by: Michal Simek <monstr@monstr.eu>
12 years agospi: microblaze: Adds driver for Xilinx SPI controller
Stephan Linz [Sat, 28 Jul 2012 22:25:35 +0000 (00:25 +0200)]
spi: microblaze: Adds driver for Xilinx SPI controller

This is an improved version of the driver patch original
submitted by Graeme Smecher <graeme.smecher@mail.mcgill.ca>

The changes are:
    - remove hard coded Xilinx BSP defines (XPAR_SPI_*) and
      use CONFIG_SYS_SPI_BASE from config.h instead
    - add extensive register struct definitions
    - remove offset calculation for register access and
      use the new register struct instead
    - move default SPI controller configuration from
      spi_setup_slave() to spi_claim_bus()
    - add spi_set_speed()
    - insert SPI controller deactivation in spi_release_bus()
    - protect while loops in spi_xfer() with counter / timeouts
    - support SPI mode flags: LSB_FIRST, CPHA, CPOL, LOOP

Come from:
    http://patchwork.ozlabs.org/patch/71797/

Signed-off-by: Stephan Linz <linz@li-pro.net>
Tested-by: Michal Simek <monstr@monstr.eu>
12 years agoMerge branch 'next' of git://git.denx.de/u-boot
Wolfgang Denk [Mon, 30 Jul 2012 18:39:52 +0000 (20:39 +0200)]
Merge branch 'next' of git://git.denx.de/u-boot

* 'next' of git://git.denx.de/u-boot:
  MPC8xx: Fixup warning in arch/powerpc/cpu/mpc8xx/cpu.c
  doc: cleanup - move board READMEs into respective board directories
  net: sh_eth: add support for SH7757's GETHER
  net: sh_eth: modify the definitions of regsiter
  net: sh_eth: add SH_ETH_TYPE_ condition
  net: sh_eth: clean up for the SH7757's code
  net: fec_mxc: Fix MDC for xMII
  net: fec_mxc: Fix setting of RCR for xMII
  net: nfs: make NFS_TIMEOUT configurable
  net: Inline the new eth_setenv_enetaddr_by_index function
  net: allow setting env enetaddr from net device setting
  net/designware: Consecutive writes to the same register to be avoided
  CACHE: net: asix: Fix asix driver to work with data cache on
  net: phy: micrel: make ksz9021 phy accessible
  net: abort network initialization if the PHY driver fails
  phylib: phy_startup() should return an error code on failure
  net: tftp: fix type of block arg to store_block

Signed-off-by: Wolfgang Denk <wd@denx.de>
12 years agoPrepare v2012.07
Wolfgang Denk [Mon, 30 Jul 2012 18:24:37 +0000 (20:24 +0200)]
Prepare v2012.07

Signed-off-by: Wolfgang Denk <wd@denx.de>
12 years agohawkboard: Fix SPL Nand driver misconfiguration
Linu Cherian [Thu, 26 Jul 2012 22:21:53 +0000 (22:21 +0000)]
hawkboard: Fix SPL Nand driver misconfiguration

Hawkboard was using the wrong nand_read_page version for SPL image.
As a side effect, the u-boot image loaded by the SPL from nand
was getting corrupted.

Enable CONFIG_SYS_NAND_HW_ECC_OOBFIRST to select the correct nand_read_page
algorithm for SPL.

Signed-off-by: Linu Cherian <linucherian@gmail.com>
Acked-by: Sughosh Ganu <urwithsughosh@gmail.com>
Acked-by: Tom Rini <trini@ti.com>
12 years agoMerge branch 'master' of git://git.denx.de/u-boot-mips
Wolfgang Denk [Mon, 30 Jul 2012 08:07:00 +0000 (10:07 +0200)]
Merge branch 'master' of git://git.denx.de/u-boot-mips

* 'master' of git://git.denx.de/u-boot-mips:
  MIPS: fix renaming of inca-swap-bytes to xway-swap-bytes

Signed-off-by: Wolfgang Denk <wd@denx.de>
12 years agoMPC8xx: Fixup warning in arch/powerpc/cpu/mpc8xx/cpu.c
Marek Vasut [Fri, 27 Jul 2012 22:57:12 +0000 (00:57 +0200)]
MPC8xx: Fixup warning in arch/powerpc/cpu/mpc8xx/cpu.c

cpu.c: In function ‘check_CPU’:
cpu.c:256:2: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Wolfgang Denk <wd@denx.de>
Subject slightly changed.
Signed-off-by: Wolfgang Denk <wd@denx.de>
Tested on TQM855MDCBAB7-T66.102 (MPC855T at 66 MHz) and
TQM860LDB0A3-T50.202 (MPC860T at 50MHz).

Tested-by: Wolfgang Denk <wd@denx.de>
Acked-by: Wolfgang Denk <wd@denx.de>
12 years agoMakefile: avoid "Generating asm-offsets.h" message with "-s"
Wolfgang Denk [Thu, 26 Jul 2012 20:52:41 +0000 (20:52 +0000)]
Makefile: avoid "Generating asm-offsets.h" message with "-s"

make would spit out a message like

Generating /tmp/build/include/generated/asm-offsets.h

even when running with option "-s".  Fix this.

Signed-off-by: Wolfgang Denk <wd@denx.de>
12 years agodoc: cleanup - move board READMEs into respective board directories
Wolfgang Denk [Sun, 29 Apr 2012 23:57:39 +0000 (23:57 +0000)]
doc: cleanup - move board READMEs into respective board directories

Also drop a few files referring to no longer / not yet supported
boards.

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Prafulla Wadaskar <prafulla@marvell.com>
Cc: Stefan Roese <sr@denx.de>
Cc: Kim Phillips <kim.phillips@freescale.com>
Cc: Andy Fleming <afleming@gmail.com>
Cc: Jason Jin <jason.jin@freescale.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Daniel Schwierzeck <daniel.schwierzeck@googlemail.com>
Acked-by: Stefano Babic <sbabic@denx.de>
Acked-by: Daniel Schwierzeck <daniel.schwierzeck@googlemail.com>
12 years agoMIPS: fix renaming of inca-swap-bytes to xway-swap-bytes
Daniel Schwierzeck [Fri, 27 Jul 2012 21:44:24 +0000 (23:44 +0200)]
MIPS: fix renaming of inca-swap-bytes to xway-swap-bytes

Fix some remains of the renaming of inca-swap-bytes introduced in

commit 60b74bde9280e85f4423c05a50ecc41de56ad980

MIPS: INCA-IP: rename inca-swap-bytes host tool

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
12 years agoPrepare v2012.07-rc3
Wolfgang Denk [Fri, 27 Jul 2012 06:27:18 +0000 (08:27 +0200)]
Prepare v2012.07-rc3

Signed-off-by: Wolfgang Denk <wd@denx.de>
12 years agonet: Make sure the ethaddr is updated in net_init()
Joe Hershberger [Mon, 23 Jul 2012 13:11:16 +0000 (13:11 +0000)]
net: Make sure the ethaddr is updated in net_init()

NetConsole may call NetSendUDPPacket before NetLoop is called.  This
will cause the source MAC address (NetOurEther) to be wrong.  Instead
of only changing it in NetLoop, move it to NetLoopInit so that it is
also updated when net_init() is called (especially by nc_start()).

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Reported-by: Michael Walle <michael@walle.cc>
Acked-by: Michael Walle <michael@walle.cc>
12 years agonet: sh_eth: add support for SH7757's GETHER
Yoshihiro Shimoda [Tue, 26 Jun 2012 16:38:11 +0000 (16:38 +0000)]
net: sh_eth: add support for SH7757's GETHER

SH7757 has 2 ETHERs and 2 GETHERs. This patch supports the SH7757's
GETHER. If CONFIG_SH_ETHER_USE_GETHER is defined using SH7757,
the driver handles the GETHER.

Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Acked-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
12 years agonet: sh_eth: modify the definitions of regsiter
Yoshihiro Shimoda [Tue, 26 Jun 2012 16:38:09 +0000 (16:38 +0000)]
net: sh_eth: modify the definitions of regsiter

The previous code had many similar definitions in each CPU.

This patch borrows from the sh_eth driver of Linux kernel.

Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Acked-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
12 years agonet: sh_eth: add SH_ETH_TYPE_ condition
Yoshihiro Shimoda [Tue, 26 Jun 2012 16:38:06 +0000 (16:38 +0000)]
net: sh_eth: add SH_ETH_TYPE_ condition

At the moment, the driver supports the following CPUs:
 - GETHER (Gigabit Ethernet) : SH7763, SH7734
 - ETHER  (Fast Ethernet)    : SH7724, SH7757

And the driver had the following "#if":

 #if defined(CONFIG_CPU_SH7763) || defined(CONFIG_CPU_SH7734)
 #if !defined(CONFIG_CPU_SH7757) && !defined(CONFIG_CPU_SH7724)
 - Those are for GETHER

 #if defined(CONFIG_CPU_SH7724) || defined(CONFIG_CPU_SH7757)
 - This is for ETHER

So, for clean up the code, this patch adds SH_ETH_TYPE_GETHER and
SH_ETH_TYPE_ETHER. And then, the patch modifies the above "#if".

Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Acked-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
12 years agonet: sh_eth: clean up for the SH7757's code
Yoshihiro Shimoda [Tue, 26 Jun 2012 16:38:02 +0000 (16:38 +0000)]
net: sh_eth: clean up for the SH7757's code

The SH7757's ETHER can work using the SH7724's setting. So, the patch
modifies it.

Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Acked-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
12 years agoPrepare v2012.07-rc2
Wolfgang Denk [Sun, 22 Jul 2012 20:00:02 +0000 (22:00 +0200)]
Prepare v2012.07-rc2

Signed-off-by: Wolfgang Denk <wd@denx.de>
12 years agoMinor Coding Style Cleanup.
Wolfgang Denk [Sun, 22 Jul 2012 19:58:26 +0000 (21:58 +0200)]
Minor Coding Style Cleanup.

Signed-off-by: Wolfgang Denk <wd@denx.de>
12 years agoBC3450 board: Remove unused CONFIG_SYS_CPU definition
Wolfgang Denk [Sun, 22 Jul 2012 07:58:47 +0000 (09:58 +0200)]
BC3450 board: Remove unused CONFIG_SYS_CPU definition

This fixes:
cmd_bc3450.c:55:0: warning: "CONFIG_SYS_CPU" redefined [enabled by default]

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Detlev Zundel <dzu@denx.de>
12 years agoBC3450 board: change debug code to using debug()
Wolfgang Denk [Sun, 22 Jul 2012 07:56:06 +0000 (09:56 +0200)]
BC3450 board: change debug code to using debug()

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Detlev Zundel <dzu@denx.de>
12 years agoMerge branch 'master' of git://git.denx.de/u-boot-arm
Wolfgang Denk [Sat, 21 Jul 2012 22:10:39 +0000 (00:10 +0200)]
Merge branch 'master' of git://git.denx.de/u-boot-arm

* 'master' of git://git.denx.de/u-boot-arm:
  ARM1136: Fix cache range checks
  mx6: Make pad name macro consistent with the datasheet
  mx28: Fix elftosb source link in README.mx28_common
  doc: README.mx28_common: Add missing entry into Contents

Signed-off-by: Wolfgang Denk <wd@denx.de>
12 years agoMPC83xx, MPC85xx: compile stub cache function
Stefano Babic [Thu, 19 Jul 2012 23:00:02 +0000 (23:00 +0000)]
MPC83xx, MPC85xx: compile stub cache function

An empty flush_dcache_range() was added into MPC83xx and MPC85xx to
work with drivers shared with other architecture.  However, it is
compiled only if USB is set, but it is required for other drivers
(FSL_ESDHC), too.

Signed-off-by: Stefano Babic <sbabic@denx.de>
CC: Andy Fleming <afleming@gmail.com>
CC: Dirk Behme <dirk.behme@de.bosch.com>
CC: Marek Vasut <marex@denx.de>
CC: Wolfgang Denk <wd@denx.de>
Added MPC83xx version.

Signed-off-by: Wolfgang Denk <wd@denx.de>
12 years agoARM1136: Fix cache range checks
Benoît Thébaudeau [Thu, 19 Jul 2012 01:35:32 +0000 (01:35 +0000)]
ARM1136: Fix cache range checks

bad_cache_range actually returned true if the range was OK, but it was used
according to its name, which resulted in all valid dcache range invalidate/flush
operations being dropped. Hence, most DMA transfers resulted in garbage data.

This patch renames this function according to what it does, and it fixes the
interpretation of its return value by other functions. The chosen naming is the
same as for ARM926EJ-S in order to be consistent.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Cc: Albert Aribaud <albert.u.boot@aribaud.net>
Acked-by: Stefano Babic <sbabic@denx.de>
12 years agomx6: Make pad name macro consistent with the datasheet
Ashok [Fri, 15 Jun 2012 03:48:57 +0000 (03:48 +0000)]
mx6: Make pad name macro consistent with the datasheet

Use the same name as defined in the datasheet.
DSP_CLK -> DISP_CLK

Signed-off-by: Ashok Kumar Reddy Kourla <ashokkourla2000@gmail.com>
Acked-by: Marek Vasut <marex@denx.de>
12 years agomx28: Fix elftosb source link in README.mx28_common
Anatolij Gustschin [Wed, 27 Jun 2012 04:14:29 +0000 (04:14 +0000)]
mx28: Fix elftosb source link in README.mx28_common

The documented link to elftosb package tarball is not accessible,
change to another working link.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Cc: Otavio Salvador <otavio@ossystems.com.br>
Cc: Marek Vasut <marek.vasut@gmail.com>
Cc: Fabio Estevam <festevam@gmail.com>
Acked-by: Otavio Salvador <otavio@ossystems.com.br>
Acked-by: Detlev Zundel <dzu@denx.de>
Acked-by: Marek Vasut <marex@denx.de>
12 years agodoc: README.mx28_common: Add missing entry into Contents
Fabio Estevam [Mon, 18 Jun 2012 05:51:49 +0000 (05:51 +0000)]
doc: README.mx28_common: Add missing entry into Contents

commit 419ea2d84 (mx28: Split the README into a common part and a m28 specific part)
missed an entry in the Contents section that was part of the original file.

Add the missing entry for completeness.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Marek Vasut <marex@denx.de>
12 years agoMerge branch 'master' of git://git.denx.de/u-boot-arm
Wolfgang Denk [Fri, 20 Jul 2012 20:38:32 +0000 (22:38 +0200)]
Merge branch 'master' of git://git.denx.de/u-boot-arm

* 'master' of git://git.denx.de/u-boot-arm:
  ARM: lib: Remove CONFIG_ARCH_CPU_INIT dependency
  ARM: OMAP4: PANDA: Add rest of the USB module pads to essentials
  arm: armv7: add compile option -mno-unaligned-access if available
  arm: Fix to mistake clean the memory space

Signed-off-by: Wolfgang Denk <wd@denx.de>
12 years agoMerge branch 'master' of git://git.denx.de/u-boot-nds32
Wolfgang Denk [Fri, 20 Jul 2012 20:35:13 +0000 (22:35 +0200)]
Merge branch 'master' of git://git.denx.de/u-boot-nds32

* 'master' of git://git.denx.de/u-boot-nds32:
  nds32: split common cache access from cpu into lib

Signed-off-by: Wolfgang Denk <wd@denx.de>
12 years agocommon.h: Remove include compiler.h
Marek Vasut [Fri, 20 Jul 2012 10:12:58 +0000 (10:12 +0000)]
common.h: Remove include compiler.h

Remove this as including it on global scale breaks a lot of things.
This was reported by:
Matthew McClintock <B29882@freescale.com>

Fix found by:
Tom Rini <trini@ti.com>

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Tom Rini <trini@ti.com>
12 years agonds32: split common cache access from cpu into lib
Macpaul Lin [Sun, 15 Jul 2012 03:54:13 +0000 (11:54 +0800)]
nds32: split common cache access from cpu into lib

This commit does the following updates.
1. Split the common cache access from cpu.c into lib folder.
2. Rename the following cache api to adapt common.h
 - dcache_flush_rang -> flush_dcache_rang
 - icache_inval_range -> invalidate_icache_range
3. Add invalidate_dcache_range

Signed-off-by: Macpaul Lin <macpaul@gmail.com>
12 years agoARM: lib: Remove CONFIG_ARCH_CPU_INIT dependency
Fabio Estevam [Thu, 1 Mar 2012 04:02:38 +0000 (04:02 +0000)]
ARM: lib: Remove CONFIG_ARCH_CPU_INIT dependency

Create a weak-aliased arch_cpu_init, so that we can get rid of CONFIG_ARCH_CPU_INIT
and always call arch_cpu_init.

This way we do not need to define CONFIG_ARCH_CPU_INIT in every board file, since
arch_cpu_init() is supposed to handle common CPU level code.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Marek Vasut <marex@denx.de>
Acked-by: Stefano Babic <sbabic@denx.de>
12 years agoARM: OMAP4: PANDA: Add rest of the USB module pads to essentials
SRICHARAN R [Wed, 18 Jul 2012 21:54:47 +0000 (14:54 -0700)]
ARM: OMAP4: PANDA: Add rest of the USB module pads to essentials

In commit 1a89a217f5c5ab3645c80c1247e8911a8b5ad491 we moved most of the
required pads and mux data for USB to the essential list so that later
on we could NOT enable anything that wasn't essential unless otherwise
configured.  This was however missing a few pandaboard-specific parts
which left for example USB ethernet non-functional.

Tested this on OMAP4430 ES2.2, OMAP4460 ES1.1 PANDA boards.

(Reworded by Tom Rini to be more precise about what the problem was)

Signed-off-by: R Sricharan <r.sricharan@ti.com>
Tested-by: Gary Thomas <gary@mlbassoc.com>
Tested-by: Tom Rini <trini@ti.com>
12 years agoarm: armv7: add compile option -mno-unaligned-access if available
Tetsuyuki Kobayashi [Sun, 1 Jul 2012 23:42:10 +0000 (23:42 +0000)]
arm: armv7: add compile option -mno-unaligned-access if available

Recent compiler generates unaligned memory access in armv7 default.
But current U-Boot does not allow unaligned memory access, so it causes
data abort exception.
This patch add compile option "-mno-unaligned-access" if it is available.

Signed-off-by: Tetsuyuki Kobayashi <koba@kmckk.co.jp>
Tested-by: Gary Thomas <gary@mlbassoc.com>
12 years agoarm: Fix to mistake clean the memory space
Zhong Hongbo [Sat, 7 Jul 2012 03:24:33 +0000 (03:24 +0000)]
arm: Fix to mistake clean the memory space

In currently, when __bss_start is equal to __bss_end__,
The bss loop will clear all the things in memory space.

But just only when __bss_end__ greater than __bss_start__,
we do the clear bss section operation.

Signed-off-by: Zhong Hongbo <bocui107@gmail.com>
Acked-by: Andreas Bießmann <andreas.devel@googlemail.com>
12 years agoMerge branch 'master' of git://git.denx.de/u-boot-usb
Wolfgang Denk [Fri, 20 Jul 2012 07:12:43 +0000 (09:12 +0200)]
Merge branch 'master' of git://git.denx.de/u-boot-usb

* 'master' of git://git.denx.de/u-boot-usb:
  usb_storage: fix ehci driver max transfer size
  smsc95xx: align buffers to cache line size
  ehci-hcd: change debug() to printf() in case of errors
  usb: check return value of submit_{control, bulk}_msg
  usb: pass cache-aligned buffer to usb_get_descriptor()
  ehci-hcd: fix external buffer cache handling
  ehci-hcd.c, musb_core, usb.h: Add USB_DMA_MINALIGN define for cache alignment
  ehci-hcd: program asynclistaddr before every transfer
  common.h: Introduce DEFINE_CACHE_ALIGN_BUFFER
  ehci-omap: Do not call dcache_off from omap_ehci_hcd_init

Signed-off-by: Wolfgang Denk <wd@denx.de>
12 years agoMerge branch 'sf' of git://git.denx.de/u-boot-blackfin
Wolfgang Denk [Fri, 20 Jul 2012 06:58:06 +0000 (08:58 +0200)]
Merge branch 'sf' of git://git.denx.de/u-boot-blackfin

* 'sf' of git://git.denx.de/u-boot-blackfin:
  sf: spansion: inline useless id defines
  sf: drop unused/duplicate command defines

Signed-off-by: Wolfgang Denk <wd@denx.de>
12 years agoMerge branch 'master' of git://git.denx.de/u-boot-net
Wolfgang Denk [Fri, 20 Jul 2012 06:55:38 +0000 (08:55 +0200)]
Merge branch 'master' of git://git.denx.de/u-boot-net

* 'master' of git://git.denx.de/u-boot-net:
  net: link_local: fix build
  net: bootp: fix build

Signed-off-by: Wolfgang Denk <wd@denx.de>
12 years agotools: clean up mingw ifdefs
Mike Frysinger [Wed, 18 Jul 2012 16:59:45 +0000 (16:59 +0000)]
tools: clean up mingw ifdefs

We have a header file specifically for mingw cruft, so keep it there
to avoid crap spreading into the main tools.  This lets our devs just
worry about *nix systems.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
12 years agosf: spansion: inline useless id defines
Mike Frysinger [Sun, 29 Jan 2012 00:32:18 +0000 (16:32 -0800)]
sf: spansion: inline useless id defines

No need for dedicated defines when these really only get used once.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
12 years agosf: drop unused/duplicate command defines
Mike Frysinger [Sun, 29 Jan 2012 00:26:03 +0000 (16:26 -0800)]
sf: drop unused/duplicate command defines

In an effort to unify the spi flash drivers further, drop all the
unused and/or duplicate command defines.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
12 years agonet: link_local: fix build
benoit.thebaudeau@advans [Thu, 19 Jul 2012 01:19:34 +0000 (01:19 +0000)]
net: link_local: fix build

Fix comment within comment build error.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Cc: Joe Hershberger <joe.hershberger@gmail.com>
12 years agonet: bootp: fix build
benoit.thebaudeau@advans [Thu, 19 Jul 2012 01:23:21 +0000 (01:23 +0000)]
net: bootp: fix build

Fix NetSetState function name used with CONFIG_BOOTP_MAY_FAIL.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Cc: Joe Hershberger <joe.hershberger@gmail.com>
12 years agonet: fec_mxc: Fix MDC for xMII
benoit.thebaudeau@advans [Thu, 19 Jul 2012 02:12:58 +0000 (02:12 +0000)]
net: fec_mxc: Fix MDC for xMII

The MDC signal is available on all xMII (i.e. 'not 7-wire') interfaces, so
mii_speed has to be set for all these interfaces, and not only for MII.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Cc: Joe Hershberger <joe.hershberger@gmail.com>
Cc: Stefano Babic <sbabic@denx.de>
12 years agonet: fec_mxc: Fix setting of RCR for xMII
benoit.thebaudeau@advans [Thu, 19 Jul 2012 02:12:46 +0000 (02:12 +0000)]
net: fec_mxc: Fix setting of RCR for xMII

At least on i.MX25, the RMII mode did not work, which is fixed by this patch.

The MII_MODE bit of the FEC RCR register means xMII, i.e. 'not 7-wire', so set
it accordingly.

According to the xMII and 7-wire (aka GPSI) standards, full duplex should be
available on xMII, but not on 7-wire, so set FCE accordingly. The FEC may
support full duplex for 7-wire too, but the reference manual does not say that,
so avoid an invalid assumption. Actually, the choice between half and full
duplex also depends on the endpoint/switch/repeater configuration, so a config
option could be added for that, but there has been no need for it so far.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Cc: Joe Hershberger <joe.hershberger@gmail.com>
Cc: Stefano Babic <sbabic@denx.de>
12 years agoBlackfin: bfin_mac: drop volatile markings on packet buffers
Mike Frysinger [Thu, 19 Jul 2012 04:08:47 +0000 (00:08 -0400)]
Blackfin: bfin_mac: drop volatile markings on packet buffers

Now that common code doesn't declare these as volatile, we don't need to
either anymore.  This fixes the build warning:

bfin_mac.c: In function 'bfin_EMAC_recv':
bfin_mac.c:193:23: warning: assignment discards qualifiers from pointer target type

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
12 years agousb_storage: fix ehci driver max transfer size
Stefan Herbrechtsmeier [Mon, 9 Jul 2012 09:52:29 +0000 (09:52 +0000)]
usb_storage: fix ehci driver max transfer size

The commit 5dd95cf93dfffa1d19a1928990852aac9f55b9d9 'usb_storage:
Fix EHCI "out of buffer pointers" with CD-ROM' introduce a bug in
usb_storage as it wrongly assumes that every transfer can use
4096 bytes per qt_buffer. This is wrong if the start address of
the data is not page aligned to 4096 bytes and leads to 'EHCI
timed out on TD' messages because of 'out of buffer pointers'
in ehci_td_buffer function.

The bug appears during load of a fragmented file and
read from or write to an unaligned memory address.

Cc: Marek Vasut <marex@denx.de>
Signed-off-by: Stefan Herbrechtsmeier <stefan@herbrechtsmeier.net>
12 years agosmsc95xx: align buffers to cache line size
Ilya Yanok [Sun, 15 Jul 2012 04:43:53 +0000 (04:43 +0000)]
smsc95xx: align buffers to cache line size

Align buffers passed to the USB code to cache line size so
they can be DMAed safely.

Signed-off-by: Ilya Yanok <ilya.yanok@cogentembedded.com>
12 years agoehci-hcd: change debug() to printf() in case of errors
Ilya Yanok [Sun, 15 Jul 2012 04:43:52 +0000 (04:43 +0000)]
ehci-hcd: change debug() to printf() in case of errors

Printing message could be useful if something goes really wrong.

Signed-off-by: Ilya Yanok <ilya.yanok@cogentembedded.com>
12 years agousb: check return value of submit_{control, bulk}_msg
Ilya Yanok [Sun, 15 Jul 2012 04:43:51 +0000 (04:43 +0000)]
usb: check return value of submit_{control, bulk}_msg

Return values of submit_{control,bulk}_msg() functions
should be checked to detect possible error.

Signed-off-by: Ilya Yanok <ilya.yanok@cogentembedded.com>
12 years agousb: pass cache-aligned buffer to usb_get_descriptor()
Ilya Yanok [Sun, 15 Jul 2012 04:43:50 +0000 (04:43 +0000)]
usb: pass cache-aligned buffer to usb_get_descriptor()

usb_get_descriptor passes it's buffer argument directly to
usb_control_msg() so it has to be properly aligned/padded.

Signed-off-by: Ilya Yanok <ilya.yanok@cogentembedded.com>
12 years agoehci-hcd: fix external buffer cache handling
Ilya Yanok [Sun, 15 Jul 2012 04:43:49 +0000 (04:43 +0000)]
ehci-hcd: fix external buffer cache handling

Buffer coming from upper layers should be cacheline aligned/padded
to perform safe cache operations. For now we don't do bounce
buffering so getting unaligned buffer is an upper layer error.
We can't check if the buffer is properly padded with current
interface so just assume it is (consider changing with in the
future). The following changes are done:

1. Remove useless length alignment check. We get actual transfer
length not the size of the underlying buffer so it's perfectly
valid for it to be unaligned.
2. Move flush_dcache_range() out of while loop or it will
flush too much.
3. Don't try to fix buffer address before calling invalidate:
if it's unaligned it's an error anyway so let cache subsystem
cry about that.
4. Fix end buffer address to be cacheline aligned assuming upper
layer reserved enough space. This is potentially dangerous
operation so upper layers should be careful about that.

Signed-off-by: Ilya Yanok <ilya.yanok@cogentembedded.com>