kernel/u-boot.git
11 years agopowerpc/asm: Move function declaration of 'serdes_get_prtcl' to fsl_serdes.h
Shaveta Leekha [Tue, 2 Jul 2013 09:12:07 +0000 (14:42 +0530)]
powerpc/asm: Move function declaration of 'serdes_get_prtcl' to fsl_serdes.h

It allows files not in the same path to use this function
as required by B4 board file

Signed-off-by: Shaveta Leekha <shaveta@freescale.com>
11 years agopowerpc/mpc85xx: Add defines for serdes RSTCTL register
Shaveta Leekha [Tue, 2 Jul 2013 09:09:21 +0000 (14:39 +0530)]
powerpc/mpc85xx: Add defines for serdes RSTCTL register

Also change the define name SRDS_RSTCTL_SDPD to
SRDS_RSTCTL_SDEN, which stands for SerDes enable
as mentioned in SerDes module guide

Signed-off-by: Shaveta Leekha <shaveta@freescale.com>
11 years agoboard/freescale/common: IDT8T49N222A configuration code
Shaveta Leekha [Tue, 2 Jul 2013 09:05:47 +0000 (14:35 +0530)]
board/freescale/common: IDT8T49N222A configuration code

Add code for configuring IDT8T49N222A device for various output refclks
    - The IDT8T49N222A is a low phase noise Frequency Translator / Synthesizer with
      alarm and monitoring functions suitable for networking and
      communications applications. It is able to generate wide range of output
      frequencies.
    - In B4860QDS, it has been used to generate different refclks to SerDes modules
    - Programming of these devices are performed by I2C interface.

Signed-off-by: Shaveta Leekha <shaveta@freescale.com>
Acked-by: York Sun <yorksun@freescale.com>
11 years agoboard/bsc9132qds: Configure DSP DDR controller
Priyanka Jain [Tue, 2 Jul 2013 03:52:23 +0000 (09:22 +0530)]
board/bsc9132qds: Configure DSP DDR controller

BSC9132 SoC has two separate DDR controllers for PowerPC side and DSP side
DDR. They are mapped to PowerPC and DSP CCSR space respectively.
BSC9132QDS has two on-board MC34716EP DDR3 memory one connected to PowerPC
and other to DSP side controller.

Configure DSP DDR controller similar to PowerPC side DDR controller as
memories are exactly similar.

Signed-off-by: Manish Jaggi <manish.jaggi@freescale.com>
Signed-off-by: Priyanka Jain <Priyanka.Jain@freescale.com>
Acked-by: York Sun <yorksun@freescale.com>
11 years agoboard/bsc9132qds: Add DSP side tlb and laws
Priyanka Jain [Tue, 2 Jul 2013 03:51:04 +0000 (09:21 +0530)]
board/bsc9132qds: Add DSP side tlb and laws

BSC9132QDS is a Freescale Reference Design Board for BSC9132 SoC which is a
integrated device that contains two powerpc e500v2 cores and two DSP
starcores.

To support DSP starcore
-Creating LAW and TLB for DSP-CCSR space.
-Creating LAW for DSP-core subsystem M2 and M3 memory
-Creating LAW for 1GB DDR which is connected exclusively to DSP-cores

Signed-off-by: Manish Jaggi <manish.jaggi@freescale.com>
Signed-off-by: Priyanka Jain <Priyanka.Jain@freescale.com>
Acked-by: York Sun <yorksun@freescale.com>
11 years agopowerpc/srio-pcie-boot: Avoid the NOR_BOOT macro when boot from SRIO/PCIE
Liu Gang [Fri, 28 Jun 2013 09:58:37 +0000 (17:58 +0800)]
powerpc/srio-pcie-boot: Avoid the NOR_BOOT macro when boot from SRIO/PCIE

When a board (slave) boots from SRIO/PCIE, it would get the instructions
from a remote board (master) by SRIO/PCIE interface, and the slave's
u-boot image should be built with the

SYS_TEXT_BASE=0xFFF80000;

So the u-boot of the slave should avoid the NOR_BOOT branch at the
booting stage.

For example, when a P2041RDB boots from SRIO/PCIE, it will set TLB
entry 15 from base address "CONFIG_SYS_MONITOR_BASE & 0xffc00000",
and with the 4M size as the boot window in NOR_BOOT branch. Because
the CONFIG_SYS_MONITOR_BASE = CONFIG_SYS_TEXT_BASE = 0xFFF80000, so
the TLB entry will be from base address 0xffc00000 and with 4M size.

Then the u-boot will set TLB entry 14 from base address
"CONFIG_SYS_INIT_RAM_ADDR", and with the 16K size as the initial
stack window. For the P2041RDB platform, the CONFIG_SYS_INIT_RAM_ADDR
= 0xffd00000. So the TLB entry 14 and 15 will be in confliction.

There will be right TLB entries configurations when avoid the
NOR_BOOT branch and set the boot window from 0xfff00000 with 1M
size space.

Signed-off-by: Liu Gang <Gang.Liu@freescale.com>
11 years agop1020rdb-pd: platform support
Haijun.Zhang [Fri, 28 Jun 2013 02:47:09 +0000 (10:47 +0800)]
p1020rdb-pd: platform support

Add new board p1020RDB-PD. P1020RDB-PD board was update from P1020RDB.
DDR changed from DDR2 1G to DDR3 2G.
NAND: 128 MiB
Flash: 64 MiB

Also change P1020RDB to P1020RDB-PC to distinguish from P1020RDB board.

Signed-off-by: Jerry Huang <Chang-Ming.Huang@freescale.com>
Signed-off-by: Haijun Zhang <Haijun.Zhang@freescale.com>
CC: Scott Wood <scottwood@freescale.com>
Acked-by: York Sun <yorksun@freescale.com>
11 years agopowerpc/mpc85xx: Workaround for A-005812
York Sun [Tue, 25 Jun 2013 18:37:49 +0000 (11:37 -0700)]
powerpc/mpc85xx: Workaround for A-005812

Erratum A-005812 Incorrect reservation clearing in Write Shadow mode can
result in invalid atomic operations. For u-boot, this erratum only impacts
SoCs running in write shadow mode.

Signed-off-by: York Sun <yorksun@freescale.com>
11 years agopowerpc/mpc8xxx: Add memory reset control
York Sun [Tue, 25 Jun 2013 18:37:48 +0000 (11:37 -0700)]
powerpc/mpc8xxx: Add memory reset control

JEDEC spec requires the clocks to be stable before deasserting reset
signal for RDIMMs. Clocks start when any chip select is enabled and
clock control register is set. This patch also adds the interface to
toggle memory reset signal if needed by the boards.

Signed-off-by: York Sun <yorksun@freescale.com>
11 years agopowerpc/mpc8xxx: Add x4 DDR device support
York Sun [Tue, 25 Jun 2013 18:37:47 +0000 (11:37 -0700)]
powerpc/mpc8xxx: Add x4 DDR device support

On selected platforms, x4 DDR devices can be supported. Using x4 devices may
lower the performance, but generally they are available for higher density.

Tested on MT36JSF2G72PZ-1G9E1 RDIMM.

Signed-off-by: York Sun <yorksun@freescale.com>
11 years agopowerpc/t4240qds: Adjust DDR timing for RDIMM
York Sun [Tue, 25 Jun 2013 18:37:46 +0000 (11:37 -0700)]
powerpc/t4240qds: Adjust DDR timing for RDIMM

RDIMM has different timing. Tested RDIMM is MT18JSF1G72PDZ-1G9E1 for
dual rank. Single- and quad-rank are not tested due to availability.

Signed-off-by: York Sun <yorksun@freescale.com>
11 years agopowerpc/mpc8xxx: Set inactive csn_bnds to 0xffffffff
York Sun [Tue, 25 Jun 2013 18:37:45 +0000 (11:37 -0700)]
powerpc/mpc8xxx: Set inactive csn_bnds to 0xffffffff

When chip select interleaving is enabled, cs0_bnds is used for address
binding. Other csn_bnds are not used. When two controllers interleaving is
enabled, cs0_bnds of both controllers are used, other csn_bnds are not.
However, the unused csn_bnds may be used internally for calculating
addresses for calibration. Setting those registers to 0 may confuse
controllers in some cases. Instead, setting them to 0xffffffff together
with normal LAWs will guarantee the address is not mapped to DDR.

Signed-off-by: York Sun <yorksun@freescale.com>
11 years agopowerpc/T4240EMU: Add T4240EMU target
York Sun [Thu, 27 Jun 2013 17:48:29 +0000 (10:48 -0700)]
powerpc/T4240EMU: Add T4240EMU target

Add emulator support for T4240. Emulator has limited peripherals and
interfaces. Difference between emulator and T4240QDS includes:
ECC for DDR is disabled due the procedure to load images
No board FPGA (QIXIS)
NOR flash has 32-bit port for higher loading speed
IFC and I2C timing don't really matter, so set them fast
No ethernet

Signed-off-by: York Sun <yorksun@freescale.com>
11 years agopowerpc/corenet: Move RCW print to cpu.c
York Sun [Tue, 25 Jun 2013 18:37:43 +0000 (11:37 -0700)]
powerpc/corenet: Move RCW print to cpu.c

The RCW print is common for all corenet platforms. Not necessary to ducplicate
in each board file.

Signed-off-by: York Sun <yorksun@freescale.com>
11 years agopowerpc/t4qds: cleanup board header file
York Sun [Tue, 25 Jun 2013 18:37:42 +0000 (11:37 -0700)]
powerpc/t4qds: cleanup board header file

CONFIG_PHYS_64BIT is always defined for t4qds. Removed unused #ifdef.

Signed-off-by: York Sun <yorksun@freescale.com>
11 years agompc85xx: Base emulator support
York Sun [Tue, 25 Jun 2013 18:37:41 +0000 (11:37 -0700)]
mpc85xx: Base emulator support

Prepare for emulator support for mpc85xx parts.
Disable DDR training and skip wrlvl_cntl_2 and wrlvl_cntl_3 registers.
These two registers improve stability but not supported by emulator.
Add CONFIG_FSL_TBCLK_EXTRA_DIV for possible adjustment to time base.

Signed-off-by: York Sun <yorksun@freescale.com>
11 years agodrivers/fm: Fix compiling error if FW location is not defined
York Sun [Tue, 25 Jun 2013 18:37:40 +0000 (11:37 -0700)]
drivers/fm: Fix compiling error if FW location is not defined

FMAN firmware can be in NOR flash, NAND flash, SPI flash, MMC or even
remote. In case none of them is defined, set it to null.

Signed-off-by: York Sun <yorksun@freescale.com>
11 years agopowerpc/corenet: Move CONFIG_FSL_CORENET out of board header file
York Sun [Tue, 25 Jun 2013 18:37:39 +0000 (11:37 -0700)]
powerpc/corenet: Move CONFIG_FSL_CORENET out of board header file

Move CONFIG_FSL_CORENET define to config_mpc85xx.h. It is not board
specific feature and belongs to SoC header.

Signed-off-by: York Sun <yorksun@freescale.com>
11 years agopowerpc/t4: Correct LIODN assignment for SRIO
Liu Gang [Tue, 25 Jun 2013 10:12:14 +0000 (18:12 +0800)]
powerpc/t4: Correct LIODN assignment for SRIO

For T4 platform, the SRIO LIODN registers are in SRIO address space
and not in GUTs.

Signed-off-by: Liu Gang <Gang.Liu@freescale.com>
11 years agopowerpc/b4860: Correct LIODN assignment for SRIO
Liu Gang [Tue, 25 Jun 2013 10:12:13 +0000 (18:12 +0800)]
powerpc/b4860: Correct LIODN assignment for SRIO

For B4, the SRIO LIODN registers are in SRIO address space and not
in GUTs.

Signed-off-by: Liu Gang <Gang.Liu@freescale.com>
11 years agopowerpc/srio: Update the SRIO LIODN registers and ID table macro
Liu Gang [Tue, 25 Jun 2013 10:12:12 +0000 (18:12 +0800)]
powerpc/srio: Update the SRIO LIODN registers and ID table macro

For some PowerPC platforms, LIODN registers for SRIO ports are
in SRIO register address space. So the ccsr_rio structure should
be updated for those LIODN registers.

In addition, add a new macro "SET_SRIO_LIODN_BASE" to create
the SRIO LIODN ID table based on the SRIO LIODN register address.

Signed-off-by: Liu Gang <Gang.Liu@freescale.com>
Acked-by: York Sun <yorksun@freescale.com>
11 years agopowerpc/85xx: Add TWR-P10xx board support
Xie Xiaobo [Mon, 24 Jun 2013 07:01:30 +0000 (15:01 +0800)]
powerpc/85xx: Add TWR-P10xx board support

TWR-P1025 Specification:
-----------------------
Memory subsystem:
   512MB DDR3 (on board DDR)
   64Mbyte 16bit NOR flash
   One microSD Card slot

Ethernet:
   eTSEC1: Connected to Atheros AR8035 GETH PHY
   eTSEC3: Connected to Atheros AR8035 GETH PHY

UART:
   Two UARTs are routed to the FDTI dual USB to RS232 convertor

USB: Two USB2.0 Type A ports

I2C:
   AT24C01B 1K Board EEPROM (8 bit address)

QUICC Engine:
   Connected to DP83849i PHY supply two 10/100M ethernet ports
   QE UART for RS485 or RS232

PCIE:
   One mini-PCIE slot

Signed-off-by: Michael Johnston <michael.johnston@freescale.com>
Signed-off-by: Xie Xiaobo <X.Xie@freescale.com>
[yorksun: Fixup include/configs/p1_twr.h]
Signed-off-by: York Sun <yorksun@freescale.com>
11 years agonds32: fix the missing COBJS-y change
ken kuo [Mon, 5 Aug 2013 17:00:54 +0000 (01:00 +0800)]
nds32: fix the missing COBJS-y change

There is a missing in previous
commit 951344b778d6ac67b94011d942a5a55da7202027
(nds32: Convert Makefiles to use COBJS-y style)
will cause compile error.

Signed-off-by: Kuan-Yu Kuo <ken.kuoky@gmail.com>
Cc: Macpaul Lin <macpaul@gmail.com>
Cc: Andes <uboot@andestech.com>
Signed-off-by: Andes <uboot@andestech.com>
11 years agonds32: introduce DMA allocation API
ken kuo [Mon, 5 Aug 2013 17:00:53 +0000 (01:00 +0800)]
nds32: introduce DMA allocation API

U-Boot does not compile for the adp-ag101 boards since
commit a8f9cd1893bef05b92f63242228607b45821c4a7
(net: update FTGMAC100 for MMU/D-cache support)

The driver assumes that the DMA allocation API are provided by all
architectures. This is not the case for nds32 and it causes a
build error. This patch adds DMA allocation API to avoid the errors.

Signed-off-by: Kuan-Yu Kuo <ken.kuoky@gmail.com>
Cc: Macpaul Lin <macpaul@gmail.com>
Cc: Andes <uboot@andestech.com>
Signed-off-by: Andes <uboot@andestech.com>
11 years agonds32: Change of NDS32 Custodian
Andes [Sat, 3 Aug 2013 13:59:22 +0000 (21:59 +0800)]
nds32: Change of NDS32 Custodian

Signed-off-by: Andes <uboot@andestech.com>
Cc: Macpaul Lin <macpaul@gmail.com>
Cc: Kuan-Yu Kuo <ken.kuoky@gmail.com>
11 years agomicroblaze: Call spi_init function
Michal Simek [Thu, 8 Aug 2013 13:28:11 +0000 (18:58 +0530)]
microblaze: Call spi_init function

Initialization spi.

Signed-off-by: Michal Simek <monstr@monstr.eu>
Acked-by: Stephan Linz <linz@li-pro.net>
Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
11 years agozynq: Enable CONFIG_ZYNQ_SPI
Jagannadha Sutradharudu Teki [Tue, 6 Aug 2013 19:42:06 +0000 (01:12 +0530)]
zynq: Enable CONFIG_ZYNQ_SPI

Tested spi on zynq board with sst flash by enabling
CONFIG_ZYNQ_SPI.

sf probe 1:1 0 0
SF: Detected SST25WF080 with page size 4 KiB, total 1 MiB

Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
Acked-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
11 years agosf: sst: Add support for SST25WF080
Jagannadha Sutradharudu Teki [Mon, 29 Jul 2013 18:18:00 +0000 (23:48 +0530)]
sf: sst: Add support for SST25WF080

Add support for SST25WF080 SPI flash.

Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
11 years agospi: Add zynq spi controller driver
Jagannadha Sutradharudu Teki [Mon, 29 Jul 2013 18:15:16 +0000 (23:45 +0530)]
spi: Add zynq spi controller driver

Zynq spi controller driver supports 2 buses and
3 chipselects on each bus.

Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
Acked-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
11 years agocmd_sf: let "sf update" erase last sector as a whole
Gerlando Falauto [Wed, 3 Jul 2013 18:33:57 +0000 (20:33 +0200)]
cmd_sf: let "sf update" erase last sector as a whole

make "sf update" work with unaligned `len' parameter, by deleting the
whole last sector before writing, so to allow for:

 sf update ${load_addr_r} 0 ${filesize}

Signed-off-by: Gerlando Falauto <gerlando.falauto@keymile.com>
Cc: Valentin Longchamp <valentin.longchamp@keymile.com>
Cc: Holger Brunck <holger.brunck@keymile.com>
Acked-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>
11 years agosf: Fix code cleanups
Jagannadha Sutradharudu Teki [Mon, 29 Jul 2013 17:13:57 +0000 (22:43 +0530)]
sf: Fix code cleanups

- CHECK: Alignment should match open parenthesis
- trailing whitespace

Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
11 years agocmd_sf|env_sf: Fix code cleanup
Jagannadha Sutradharudu Teki [Mon, 29 Jul 2013 16:42:52 +0000 (22:12 +0530)]
cmd_sf|env_sf: Fix code cleanup

- line over 80 characters
- add tabs
- CHECK: Alignment should match open parenthesis

Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
11 years agosf: Fix code cleanup
Jagannadha Sutradharudu Teki [Mon, 29 Jul 2013 16:46:41 +0000 (22:16 +0530)]
sf: Fix code cleanup

- line over 80 characters.
- CHECK: Alignment should match open parenthesis

Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
11 years agosf: stmicro: Fix code cleanup
Jagannadha Sutradharudu Teki [Fri, 24 May 2013 19:43:47 +0000 (01:13 +0530)]
sf: stmicro: Fix code cleanup

- line over 80 characters
- foo * bar -> foo *bar
- removed unnecessary for single statement blocks.

Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
11 years agosf: sst: Fix code cleanup
Jagannadha Sutradharudu Teki [Mon, 27 May 2013 19:40:04 +0000 (01:10 +0530)]
sf: sst: Fix code cleanup

- line over 80 characters
- add spaces
- add tabs

Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
11 years agosf: eon|spansion|ramtron: Fix code cleanup
Jagannadha Sutradharudu Teki [Sat, 25 May 2013 16:33:39 +0000 (22:03 +0530)]
sf: eon|spansion|ramtron: Fix code cleanup

- line over 80 characters
- insert the expression in same line

Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
11 years agospi: mpc8xxx_spi: Use DIV_ROUND_UP instead of open-coded
Axel Lin [Fri, 12 Jul 2013 09:42:15 +0000 (17:42 +0800)]
spi: mpc8xxx_spi: Use DIV_ROUND_UP instead of open-coded

Use DIV_ROUND_UP to simplify the code.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
11 years agospi: fsl_espi: Use DIV_ROUND_UP instead of open-coded
Axel Lin [Fri, 12 Jul 2013 09:41:08 +0000 (17:41 +0800)]
spi: fsl_espi: Use DIV_ROUND_UP instead of open-coded

Use DIV_ROUND_UP to simplify the code.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
11 years agoMerge branch 'master' of git://git.denx.de/u-boot-i2c
Tom Rini [Tue, 6 Aug 2013 13:49:06 +0000 (09:49 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-i2c

11 years agoi2c: soft: Fix typo in CONFIG_SYS_I2C_SOFT_SPEED
Marek Vasut [Thu, 1 Aug 2013 10:32:20 +0000 (12:32 +0200)]
i2c: soft: Fix typo in CONFIG_SYS_I2C_SOFT_SPEED

In case only the CONFIG_SYS_I2C_SPEED is set in configuration file,
the CONFIG_SYS_I2C_SOFT_SPEED is defined as CONFIG_SYS_I2C_SPEED.
The CONFIG_SYS_I2C_SOFT_SPEED is then used throughout the driver.

Unfortunatelly, due to a typo in the driver, instead of defining
CONFIG_SYS_I2C_SOFT_SPEED, an CONFIG_SYS_SOFT_I2C_SPEED was defined
and therefore the driver failed to compile. The same applies for
CONFIG_SYS_I2C_SOFT_SLAVE , where the swap happens as well.

This patch fixes the issue.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Heiko Schocher <hs@denx.de>
11 years agodts/Makefile: pass -undef -D__DTS__ to cpp
Stephen Warren [Wed, 24 Jul 2013 17:09:24 +0000 (10:09 -0700)]
dts/Makefile: pass -undef -D__DTS__ to cpp

This brings U-Boot's cpp invocation into line with the way the Linux
kernel invokes cpp on device trees. Consistency will be useful to ensure
*.dts is portable between the two.

-undef also has the added advantage of not defining "linux", so DT
property names such as "linux,keymap" don't get mangled.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Simon Glass <sjg@chromium.org>
11 years agodts/Makefile: don't use cpp -P
Stephen Warren [Wed, 24 Jul 2013 17:09:23 +0000 (10:09 -0700)]
dts/Makefile: don't use cpp -P

Recent dtc supports #line directives in the input source code, and even
uses them to generate useful line numbers in any messages it emits. Stop
passing -P to cpp, since there's no need any more.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Simon Glass <sjg@chromium.org>
11 years agoconfig: don't define CONFIG_ARCH_DEVICE_TREE
Stephen Warren [Wed, 24 Jul 2013 17:09:22 +0000 (10:09 -0700)]
config: don't define CONFIG_ARCH_DEVICE_TREE

Now that nothing uses CONFIG_ARCH_DEVICE_TREE, stop defining it.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Simon Glass <sjg@chromium.org>
11 years agodts/Makefile: don't define ARCH_CPU_DTS, BOARD_DTS
Stephen Warren [Wed, 24 Jul 2013 17:09:21 +0000 (10:09 -0700)]
dts/Makefile: don't define ARCH_CPU_DTS, BOARD_DTS

Now that nothing uses the defines ARCH_CPU_DTS, BOARD_DTS, stop defining
them.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Simon Glass <sjg@chromium.org>
11 years agodt: don't use ARCH_CPU_DTS
Stephen Warren [Wed, 24 Jul 2013 17:09:20 +0000 (10:09 -0700)]
dt: don't use ARCH_CPU_DTS

Now that we assume dtc supports the -i option, we don't need to use
ARCH_CPU_DTS in *.dts{,i}; we simply specify the include filename
directly, and dtc will find it.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Simon Glass <sjg@chromium.org>
11 years agodts/Makefile: unify cpp/dtc include paths
Stephen Warren [Wed, 24 Jul 2013 17:09:19 +0000 (10:09 -0700)]
dts/Makefile: unify cpp/dtc include paths

*.dts may use #include (via cpp) or /include/ (via dtc; assuming a newer
dtc). The choice is up to the creator of the DT. Create a common variable
DTC_INCDIRS that lists the paths searched by include statements, and
update cpp and dtc invocation to use them.

For cpp, also specify -nostdinc to ensure the same set of paths is
available to both type of include statement.

For dtc, create a new DTC_FLAGS variable to hold all the flags passed to
dtc.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Simon Glass <sjg@chromium.org>
11 years agodts/Makefile: simplify dtc invocation
Stephen Warren [Wed, 24 Jul 2013 17:09:18 +0000 (10:09 -0700)]
dts/Makefile: simplify dtc invocation

The invocation of dtc is significantly more complex that it could be,
in order to work around an issue on old versions of dtc, which print
a message to stdout every time they run.

Remove this workaround, on the assumption that people have or will
upgrade to a newer version of dtc. This simplifies the build rule
significantly.

Related, split the invocation of cpp and dtc into separate commands
rather than a pipeline, so that if either fail, it is detected. This has
the nice benefit of saving off the result of the pre-processing step,
allowing it to be easily inspected.

Assuming a new enough dtc (which an earlier patch enforces), dtc will
parse #line directives in its input file, and generate correct file and
line numbers in error messages, even though cpp is unconditionally
applied to its input file.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Simon Glass <sjg@chromium.org>
11 years agoxilinx: move microblaze-generic .dts to standard location
Stephen Warren [Wed, 24 Jul 2013 17:09:17 +0000 (10:09 -0700)]
xilinx: move microblaze-generic .dts to standard location

Aside from microblaze, all other SoCs/boards/vendors store their DT files
in board/$vendor/dts/$soc-$board.dts. Move microblaze-generic.dts to this
location for consistency.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Simon Glass <sjg@chromium.org>
Acked-by: Michal Simek <monstr@monstr.eu>
11 years agoValidate dtc is new enough
Stephen Warren [Wed, 24 Jul 2013 17:09:16 +0000 (10:09 -0700)]
Validate dtc is new enough

Subsequent patches assume that dtc supports various recent features.
These are available in dtc 1.4.0. Validate that dtc is at least that
version.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Simon Glass <sjg@chromium.org>
11 years agoMerge branch 'master' of git://git.denx.de/u-boot-usb
Tom Rini [Thu, 1 Aug 2013 13:19:28 +0000 (09:19 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-usb

11 years agoMerge git://git.denx.de/u-boot-arm
Stefano Babic [Wed, 31 Jul 2013 09:30:38 +0000 (11:30 +0200)]
Merge git://git.denx.de/u-boot-arm

Conflicts:
board/freescale/mx6qsabrelite/Makefile
board/freescale/mx6qsabrelite/mx6qsabrelite.c
include/configs/mx6qsabrelite.h

Signed-off-by: Stefano Babic <sbabic@denx.de>
11 years agospi: bfin_spi: Use DIV_ROUND_UP instead of open-coded
Axel Lin [Fri, 12 Jul 2013 09:39:41 +0000 (17:39 +0800)]
spi: bfin_spi: Use DIV_ROUND_UP instead of open-coded

Use DIV_ROUND_UP to simplify the code.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Scott Jiang <scott.jiang.linux@gmail.com>
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
11 years agoblackfin: Fix using gd->baudrate before setting its value
Axel Lin [Mon, 1 Jul 2013 05:16:17 +0000 (13:16 +0800)]
blackfin: Fix using gd->baudrate before setting its value

Current code uses gd->baudrate before setting its value.
Besides, I got below build warning which is introduced by
commit ddb5c5be "blackfin: add baudrate to bdinfo".

board.c:235:3: warning: passing argument 1 of 'simple_strtoul' makes pointer from integer without a cast [enabled by default]
include/vsprintf.h:27:7: note: expected 'const char *' but argument is of type 'unsigned int'

This patch ensures we get the baudrate setting before using it.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
11 years agoblackfin: gpio: Use proper mask for comparing function
Axel Lin [Fri, 28 Jun 2013 06:45:06 +0000 (14:45 +0800)]
blackfin: gpio: Use proper mask for comparing function

The function return from P_FUNCT2MUX(per) takes 2 bits, however
for BF537_FAMILY with offset != 1 the function is 1 bit.

Also has small refactor for better readability.
In portmux_setup(), it looks odd having "muxreg &= ~(3 << 1);"
while in current code we do muxreg |= (function << offset);.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
11 years agogpio: adi_gpio2: Unreserve gpio in special_gpio_free()
Axel Lin [Wed, 26 Jun 2013 02:10:04 +0000 (10:10 +0800)]
gpio: adi_gpio2: Unreserve gpio in special_gpio_free()

In special_gpio_free(), call unreserve() rather than reserve() to release gpio.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
11 years agoblackfin: gpio: Unreserve gpio in special_gpio_free()
Axel Lin [Wed, 26 Jun 2013 02:09:16 +0000 (10:09 +0800)]
blackfin: gpio: Unreserve gpio in special_gpio_free()

In special_gpio_free(), call unreserve() rather than reserve() to release gpio.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
11 years agogpio: omap5-uevm: Configure the tca6424 gpio expander
Dan Murphy [Thu, 11 Jul 2013 18:10:28 +0000 (13:10 -0500)]
gpio: omap5-uevm: Configure the tca6424 gpio expander

Configure the tca6424 gpio expander
This allows use of the debug and tri color LEDs.

Signed-off-by: Dan Murphy <dmurphy@ti.com>
11 years agogpio: tca642x: Add the tca642x gpio expander driver
Dan Murphy [Thu, 11 Jul 2013 18:10:27 +0000 (13:10 -0500)]
gpio: tca642x: Add the tca642x gpio expander driver

Add the tca642x gpio expander driver

Datasheet:
http://www.ti.com/product/tca6424a

Signed-off-by: Dan Murphy <dmurphy@ti.com>
11 years agoam335x_evm: Add am335x_boneblack variant
Justin Waters [Thu, 11 Jul 2013 13:55:03 +0000 (09:55 -0400)]
am335x_evm: Add am335x_boneblack variant

The BeagleBone Black differs from the other AM335x boards in a few
significant ways, so it makes sense to create a custom configuration
for it. In particular, it uses eMMC instead of NAND flash.

Signed-off-by: Justin Waters <justin.waters@timesys.com>
11 years agoam335x_evm: Add support for eMMC environment
Justin Waters [Thu, 11 Jul 2013 13:55:02 +0000 (09:55 -0400)]
am335x_evm: Add support for eMMC environment

Some boards, such as the BeagleBone Black, have an eMMC chip intstead
of NAND. We can use the eMMC boot partition to store the environment,
since it isn't used for anything else. This allows us to have a
configurable environment on those boards.

Signed-off-by: Justin Waters <justin.waters@timesys.com>
11 years agoAdd additional MLO images to .gitignore
Justin Waters [Thu, 11 Jul 2013 13:55:01 +0000 (09:55 -0400)]
Add additional MLO images to .gitignore

This rule catches images such as MLO.byteswap

Signed-off-by: Justin Waters <justin.waters@timesys.com>
11 years agoam335x_evm: Rework bootcmd to handle two MMC devs
Justin Waters [Thu, 11 Jul 2013 13:55:00 +0000 (09:55 -0400)]
am335x_evm: Rework bootcmd to handle two MMC devs

The BeagleBone Black can boot from either the MMC card
or eMMC chip on board. We should try both interfaces.

This modification also allows a graceful fallback if
a device exists but boot images are not present on it.

Changes for v2:

* Fix boot partition - it should always show up as mmcblk0p2
* Fix missing FDT load

Signed-off-by: Justin Waters <justin.waters@timesys.com>
11 years agoam335x_evm: Add command line editing
Justin Waters [Thu, 11 Jul 2013 13:54:59 +0000 (09:54 -0400)]
am335x_evm: Add command line editing

Many modern U-Boot ports enable command line editing and
a history buffer. The am335x_evm configuration is fairly
comprehensive as it is, so a few extra kb should not be
noticable, and it adds a very convenient feature.

Signed-off-by: Justin Waters <justin.waters@timesys.com>
11 years agoam335x_evm: Make NAND support modular
Justin Waters [Thu, 11 Jul 2013 13:54:58 +0000 (09:54 -0400)]
am335x_evm: Make NAND support modular

Give the user the ability to disable NAND support by defining
CONFIG_NO_NAND. This will allow custom hardware to easily support
this configuration.

Signed-off-by: Justin Waters <justin.waters@timesys.com>
[trini: Make apply on top of other series]
Signed-off-by: Tom Rini <trini@ti.com>
11 years agonet, phy, cpsw: fix gigabit register access
Heiko Schocher [Tue, 23 Jul 2013 13:32:36 +0000 (15:32 +0200)]
net, phy, cpsw: fix gigabit register access

accessing a lan9303 switch with the cpsw driver results in wrong
speed detection, as the switch sets the BMSR_ERCAP in BMSR
register, and follow read of the MII_STAT1000 register fails, as
the switch does not support it. Current code did not check,
if a phy_read() fails ... fix this.

Signed-off-by: Heiko Schocher <hs@denx.de>
Cc: Joe Hershberger <joe.hershberger@gmail.com>
Acked-by: Mugunthan V N <mugunthanvnm@ti.com>
Signed-off-by: Tom Rini <trini@ti.com>
11 years agoboard/ti/am335x/README: Document NOR programming
Tom Rini [Thu, 18 Jul 2013 19:13:05 +0000 (15:13 -0400)]
board/ti/am335x/README: Document NOR programming

The Beaglebone White may be populated with a memory cape that has a NOR
module.  Document how to program it.

Signed-off-by: Tom Rini <trini@ti.com>
11 years agoam335x_evm: Add support to boot from NOR.
Steve Kipisz [Thu, 18 Jul 2013 19:13:04 +0000 (15:13 -0400)]
am335x_evm: Add support to boot from NOR.

NOR requires that s_init be within the first 4KiB of the image so that
we can perform the rest of the required pinmuxing to talk with the rest
of NOR that we are found on.  When NOR_BOOT is set we save our
environment in NOR at 512KiB and a redundant copy at 768KiB.  We avoid
using SPL for this case and u-boot.bin is written directly to the start
of NOR.

We enclose the DMM-related parts of arch/arm/cpu/armv7/am33xx/emif4.c
with TI81xx checks as at this time U-Boot does not discard unused
sections in the main build and this code relies on functions specific to
(and only provided in) ti81xx-related code.

Cc: Albert ARIBAUD <albert.u.boot@aribaud.net>
Signed-off-by: Steve Kipisz <s-kipisz2@ti.com>
Signed-off-by: Tom Rini <trini@ti.com>
11 years agoam335x_evm: Add support for the NOR module on the memory cape
Steve Kipisz [Thu, 18 Jul 2013 19:13:03 +0000 (15:13 -0400)]
am335x_evm: Add support for the NOR module on the memory cape

This patch adds support for the NOR module that attaches
to the memory cape for a Beaglebone board. This does not
add booting support; only support so that you can boot from
SD/MMC and see the NOR module so that it can be programmed.

Signed-off-by: Steve Kipisz <s-kipisz2@ti.com>
[trini: Clean up config changes slightly]
Signed-off-by: Tom Rini <trini@ti.com>
11 years agoam33xx: Correct gpmc_cfg->irqstatus/enable
Tom Rini [Thu, 18 Jul 2013 19:13:02 +0000 (15:13 -0400)]
am33xx: Correct gpmc_cfg->irqstatus/enable

Based on our usage of the GPMC, either with NOR or NAND we do not need
to be setting the irqstatus or irqenable bits and should clear them like
we have historically.

Signed-off-by: Tom Rini <trini@ti.com>
11 years agoam335x_evm: Rework board_is_foo() checks
Tom Rini [Thu, 18 Jul 2013 19:13:01 +0000 (15:13 -0400)]
am335x_evm: Rework board_is_foo() checks

We rework the various board_is_foo() checks to take a pointer to
struct am335x_baseboard_id rather than using a local copy in board.c.
This allows us to make use of the same checks in mux.c as well as fixing
problems when this code could be running from read-only memory.

Reviewed-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: Tom Rini <trini@ti.com>
11 years agoam335x_evm: Update SPI_BOOT support, add MTDPARTS info
Tom Rini [Thu, 18 Jul 2013 19:12:59 +0000 (15:12 -0400)]
am335x_evm: Update SPI_BOOT support, add MTDPARTS info

- Style cleanup (# define -> #define)
- Due to ROM issues, redudant loading isn't feasible, so drop.
- Given extra space, increase max size of U-Boot to 512KiB
- Correct env size to match usage (we had not re-defined ENV_SIZE).
- Given extra space, keep env size as 128KiB, add redundant environment.

Reviewed-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: Tom Rini <trini@ti.com>
11 years agoam335x_evm: Drop useless CONFIG_ENV_IS_NOWHERE
Tom Rini [Thu, 18 Jul 2013 19:12:58 +0000 (15:12 -0400)]
am335x_evm: Drop useless CONFIG_ENV_IS_NOWHERE

We always set a CONFIG_ENV_IS_...somewhere... so drop the initial define
of NOWHERE.

Reviewed-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: Tom Rini <trini@ti.com>
11 years agoboard/ti/am335x/README: Document NAND programming
Tom Rini [Wed, 17 Jul 2013 16:24:30 +0000 (12:24 -0400)]
board/ti/am335x/README: Document NAND programming

The AM335x GP EVM ships with NAND.  Document programming of the chip
including the redundant locations that the ROM will check.

Signed-off-by: Tom Rini <trini@ti.com>
11 years agocfi_flash: Add prototypes of overridable functions
Masahiro Yamada [Thu, 6 Jun 2013 07:54:04 +0000 (16:54 +0900)]
cfi_flash: Add prototypes of overridable functions

This commit adds some prototypes into include/mtd/cfi_flash.h.
These functions are defined with a weak attribute in
drivers/mtd/cfi_flash.c.
This means they can be overrided by board-specific ones
if necessary.

When defining such functions under board/ directory or
somewhere, cfi_flash.h should be included.
This makes sure that board-specfic cfi functions
are defined in a correct prototype.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Signed-off-by: Stefan Roese <sr@denx.de>
11 years agoehci-hcd: fix memory leak in lowlevel init
Nikita Kiryanov [Mon, 29 Jul 2013 10:27:40 +0000 (13:27 +0300)]
ehci-hcd: fix memory leak in lowlevel init

usb_lowlevel_init() allocates a new periodic_list each time it is invoked,
without freeing the original list. Since it is initialized later on in the code,
just reuse the first-allocated list in future invocations of usb_lowlevel_init.

Cc: Marek Vasut <marex@denx.de>
Cc: Igor Grinberg <grinberg@compulab.co.il>
Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
11 years agousb_hub: fix power cycling logic
Nikita Kiryanov [Mon, 29 Jul 2013 10:27:39 +0000 (13:27 +0300)]
usb_hub: fix power cycling logic

When power cycling the hub ports, a misbehaving port will prevent all ports
from being powered on because we quit at the first sign of trouble.

Skip problematic ports instead of failing the entire power on.

Cc: Marek Vasut <marex@denx.de>
Cc: Igor Grinberg <grinberg@compulab.co.il>
Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
11 years agousb: ehci-omap: Don't softreset USB High-speed Host (UHH) Module
Roger Quadros [Mon, 22 Jul 2013 08:14:37 +0000 (11:14 +0300)]
usb: ehci-omap: Don't softreset USB High-speed Host (UHH) Module

Fixes NFS root problems with Beagle (3530 ES1.0) when used with
external USB-ethernet adapter and "USB start" command used within
u-boot.

Soft resetting the UHH module causes instability issues on
all OMAPs so we just avoid it.

See OMAP36xx Errata
  i571: USB host EHCI may stall when entering smart-standby mode
  i660: USBHOST Configured In Smart-Idle Can Lead To a Deadlock

On OMAP4/5, soft-resetting the UHH module can put it into
Smart-Idle mode and lead to a deadlock.

On OMAP3 this doesn't seem to be the case but still instabilities
are observed on beagle (3530 ES1.0) if soft-reset is used.
 e.g. NFS root failures with Linux kernel.

Signed-off-by: Roger Quadros <rogerq@ti.com>
11 years agodfu: Implementation of target reset after communication with dfu-util's -R switch
Lukasz Majewski [Thu, 18 Jul 2013 11:19:14 +0000 (13:19 +0200)]
dfu: Implementation of target reset after communication with dfu-util's -R switch

This patch extends dfu code to support transmission with -R switch
specified at dfu-util.

When -R is specified, the extra USB_REQ_DFU_DETACH request is sent after
successful data transmission. Then dfu resources are released and reset
command is issued.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
11 years agousb: mv_udc: Add bounce buffer
Marek Vasut [Wed, 10 Jul 2013 01:16:43 +0000 (03:16 +0200)]
usb: mv_udc: Add bounce buffer

The requests sent to the controller are not properly cache aligned
most of the time, thus implement a simple bounce buffer to avoid
problem with cache.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Lei Wen <leiwen@marvell.com>
Cc: Otavio Salvador <otavio@ossystems.com.br>
Cc: Stefano Babic <sbabic@denx.de>
11 years agousb: mv_udc: Add proper cache management
Marek Vasut [Wed, 10 Jul 2013 01:16:42 +0000 (03:16 +0200)]
usb: mv_udc: Add proper cache management

Implement functions to flush/invalidate dcache over QH and qTDs
and make use of them where appropriate. Also use them to replace
the old incorrect cache management attempt. This is the first step
towards making this driver work with data cache enabled.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Lei Wen <leiwen@marvell.com>
Cc: Otavio Salvador <otavio@ossystems.com.br>
Cc: Stefano Babic <sbabic@denx.de>
11 years agousb: mv_udc: Implement better qTD item accessor
Marek Vasut [Wed, 10 Jul 2013 01:16:41 +0000 (03:16 +0200)]
usb: mv_udc: Implement better qTD item accessor

The code for retrieving qTD item for particular endpoint is hard
to understand, moreover it's duplicated all over the driver. Move
the code into single nice and documented function.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Lei Wen <leiwen@marvell.com>
Cc: Otavio Salvador <otavio@ossystems.com.br>
Cc: Stefano Babic <sbabic@denx.de>
11 years agousb: mv_udc: Improve allocation of qTD items
Marek Vasut [Wed, 10 Jul 2013 01:16:40 +0000 (03:16 +0200)]
usb: mv_udc: Improve allocation of qTD items

Allocate the qTD items all at once instead of allocating them
separately. Moreover, make sure each qTD is properly aligned
to 32-bytes boundary and that cache can be safely flushed over
each qTD touple.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Lei Wen <leiwen@marvell.com>
Cc: Otavio Salvador <otavio@ossystems.com.br>
Cc: Stefano Babic <sbabic@denx.de>
11 years agousb: mv_udc: Implement better QH accessor
Marek Vasut [Wed, 10 Jul 2013 01:16:39 +0000 (03:16 +0200)]
usb: mv_udc: Implement better QH accessor

The code for retrieving QH for particular endpoint is hard to understand,
moreover it's duplicated all over the driver. Move the code into single
nice and documented function.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Lei Wen <leiwen@marvell.com>
Cc: Otavio Salvador <otavio@ossystems.com.br>
Cc: Stefano Babic <sbabic@denx.de>
11 years agousb: mv_udc: Add cacheline length check
Marek Vasut [Wed, 10 Jul 2013 01:16:38 +0000 (03:16 +0200)]
usb: mv_udc: Add cacheline length check

Check the length of system cacheline at compile-time and fail
if the system uses too long cachelines.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Lei Wen <leiwen@marvell.com>
Cc: Otavio Salvador <otavio@ossystems.com.br>
Cc: Stefano Babic <sbabic@denx.de>
11 years agousb: mv_udc: Properly align the endpoint QH and qTD list
Marek Vasut [Wed, 10 Jul 2013 01:16:37 +0000 (03:16 +0200)]
usb: mv_udc: Properly align the endpoint QH and qTD list

The endpoint QH list has to be aligned to 10-bit boundary. We also have
to make sure the list is aligned on a cacheline boundary. Make sure it
is. Furthermore, check if the memory allocation for the QH list didn't
fail. Moveover, improve the comment about the QH list structure.

Finally, the qTD item list has to be aligned only to 5-bit boundary, not
10-bit as it is now, fix this as well.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Lei Wen <leiwen@marvell.com>
Cc: Otavio Salvador <otavio@ossystems.com.br>
Cc: Stefano Babic <sbabic@denx.de>
11 years agousb: mv_udc: Move QH and qTD into mv_drv
Marek Vasut [Wed, 10 Jul 2013 01:16:36 +0000 (03:16 +0200)]
usb: mv_udc: Move QH and qTD into mv_drv

Both the endpoint queue head and the endpoint item list is a controller
specific thing. Move them both into controller private data.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Lei Wen <leiwen@marvell.com>
Cc: Otavio Salvador <otavio@ossystems.com.br>
Cc: Stefano Babic <sbabic@denx.de>
11 years agousb: mv_udc: Init mv_drv.gadget.ops statically
Marek Vasut [Wed, 10 Jul 2013 01:16:35 +0000 (03:16 +0200)]
usb: mv_udc: Init mv_drv.gadget.ops statically

There is no need to init this field at runtime, so init it statically.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Lei Wen <leiwen@marvell.com>
Cc: Otavio Salvador <otavio@ossystems.com.br>
Cc: Stefano Babic <sbabic@denx.de>
11 years agousb: mv_udc: Remove QH_MAXNUM macro
Marek Vasut [Wed, 10 Jul 2013 01:16:34 +0000 (03:16 +0200)]
usb: mv_udc: Remove QH_MAXNUM macro

The QH_MAXNUM is used in absolutelly incorrect manner and is not
even needed. Remove it and correctly replace it's occurance with
2 * NUM_ENDPOINTS .

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Lei Wen <leiwen@marvell.com>
Cc: Otavio Salvador <otavio@ossystems.com.br>
Cc: Stefano Babic <sbabic@denx.de>
11 years agousb: mv_udc: Clean up the initial variable check
Marek Vasut [Wed, 10 Jul 2013 01:16:33 +0000 (03:16 +0200)]
usb: mv_udc: Clean up the initial variable check

Clean up the code that checks the validity of a USB gadget driver
in usb_gadget_register_driver(). Moreover, limit the speed of the
driver to either FULL or HIGH, this is more precise and once we
have xHCI support, also more correct.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Lei Wen <leiwen@marvell.com>
Cc: Otavio Salvador <otavio@ossystems.com.br>
Cc: Stefano Babic <sbabic@denx.de>
11 years agousb: mv_udc: Make use of struct ehci_ctrl
Marek Vasut [Wed, 10 Jul 2013 01:16:32 +0000 (03:16 +0200)]
usb: mv_udc: Make use of struct ehci_ctrl

The usb_lowlevel_init() call already fills and passes back struct
ehci_ctrl , which readily contains correctly determined address of
the port register block address computed from values from controller
configuration registers. Leverage this and make use of this value
as this makes the code mode universal, but also gets us rid of the
CONFIG_USB_REG_BASE configuration option.

Moreover, this patch cleans up the usb_gadget_register_driver() call
a little by correcting the error handling. Note the usb_lowlevel_init()
and mvudc_probe() are now called in reversed order, but this has no
impact on the code.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Lei Wen <leiwen@marvell.com>
Cc: Otavio Salvador <otavio@ossystems.com.br>
Cc: Stefano Babic <sbabic@denx.de>
11 years agousb: ehci: Split out struct ehci_ctrl definition
Marek Vasut [Wed, 10 Jul 2013 01:16:31 +0000 (03:16 +0200)]
usb: ehci: Split out struct ehci_ctrl definition

Move the struct ehci_ctrl defition from ehci-hcd.c into ehci.h
so it can be re-used by drivers. In particular, the mv_udc driver
can benefit from this move.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Lei Wen <leiwen@marvell.com>
Cc: Otavio Salvador <otavio@ossystems.com.br>
Cc: Stefano Babic <sbabic@denx.de>
11 years agousb: mv_udc: Clean up the EP initialization
Marek Vasut [Wed, 10 Jul 2013 01:16:30 +0000 (03:16 +0200)]
usb: mv_udc: Clean up the EP initialization

Move the constant values that are programmed into mv_ep.ep into
separate static const structure so they can be memcpy()'d when
the initialization happens.

Moveover, we only every init NUM_ENDPOINTS, not 2 * NUM_ENDPOINTS,
so fix this bug as well.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Lei Wen <leiwen@marvell.com>
Cc: Otavio Salvador <otavio@ossystems.com.br>
Cc: Stefano Babic <sbabic@denx.de>
11 years agousb: mv_udc: Move endpoint array into driver data
Marek Vasut [Wed, 10 Jul 2013 01:16:29 +0000 (03:16 +0200)]
usb: mv_udc: Move endpoint array into driver data

The endpoints are operated on a per-controller basis, move the
endpoint array into controller's private data. Also shuffle the
struct mv_ep structure definition just above the definition of
the struct mv_drv so they're well grouped together.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Lei Wen <leiwen@marvell.com>
Cc: Otavio Salvador <otavio@ossystems.com.br>
Cc: Stefano Babic <sbabic@denx.de>
11 years agousb: mv_udc: Clean up mv_udc.h
Marek Vasut [Wed, 10 Jul 2013 01:16:28 +0000 (03:16 +0200)]
usb: mv_udc: Clean up mv_udc.h

Do a coding-style cleanup of this file and throw away useless
defined values. These values were likely a result of a copy-paste
job.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Lei Wen <leiwen@marvell.com>
Cc: Otavio Salvador <otavio@ossystems.com.br>
Cc: Stefano Babic <sbabic@denx.de>
11 years agousb: mv_udc: Unbreak the mv_udc driver
Marek Vasut [Wed, 10 Jul 2013 01:16:27 +0000 (03:16 +0200)]
usb: mv_udc: Unbreak the mv_udc driver

The mv_udc driver is broken for a while and doesn't even compile.
This patch fixes the issues and gets the driver into working state
again. This driver was tested on Freescale i.MX233/i.MX28 .

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Lei Wen <leiwen@marvell.com>
Cc: Otavio Salvador <otavio@ossystems.com.br>
Cc: Stefano Babic <sbabic@denx.de>
11 years agomxc_ipuv3: fix memory alignment of framebuffer
Eric Nelson [Sat, 27 Jul 2013 00:53:45 +0000 (17:53 -0700)]
mxc_ipuv3: fix memory alignment of framebuffer

The frame-buffer on i.MX boards needs to be aligned for DMA.

Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
11 years agoimx: nitrogen6x: mx6qsabrelite: Add support for DVI monitors
Robert Winkler [Tue, 23 Jul 2013 22:07:56 +0000 (15:07 -0700)]
imx: nitrogen6x: mx6qsabrelite: Add support for DVI monitors

A little background is probably appropriate for this patch.

Since "the beginning" of usage of the SABRE Lite and Nitrogen6x
boards, DVI detection has been somewhat broken.

Some (most) DVI monitors don't produce the "HPD" bit in
the PHY_STAT0 register, but do show proper toggling of the
RX_SENSE0..3 bits.

Creating a new the bit-mask to include all five bits and
modifying the 'hdmidet' command and internal detection
routines allows these monitors to function properly in U-Boot.

A related patch to our kernels allows things to work under
Linux:
        https://github.com/boundarydevices/linux-imx6/commit/7d8752905c118af9063738a533227de0b2f6ecd4

Signed-off-by: Robert Winkler <robert.winkler@boundarydevices.com>
Acked-by: Stefano Babic <sbabic@denx.de>
11 years agoimx: Add documentation for imx specific commands
Robert Winkler [Thu, 25 Jul 2013 00:57:06 +0000 (17:57 -0700)]
imx: Add documentation for imx specific commands

CONFIG_CMD_HDMIDETECT
CONFIG_CMD_BMODE

Signed-off-by: Robert Winkler <robert.winkler@boundarydevices.com>
Acked-by: Otavio Salvador <otavio@ossystems.com.br>
11 years agomx6qsabresd: Add splash screen support via HDMI
Pardeep Kumar Singla [Thu, 25 Jul 2013 17:12:14 +0000 (12:12 -0500)]
mx6qsabresd: Add splash screen support via HDMI

Signed-off-by: Pardeep Kumar Singla <b45784@freescale.com>
11 years agomx6: Factor out common HDMI setup code
Pardeep Kumar Singla [Thu, 25 Jul 2013 17:12:13 +0000 (12:12 -0500)]
mx6: Factor out common HDMI setup code

Instead of duplicating HDMI setup code for every mx6 board, factor out the common code

Signed-off-by: Pardeep Kumar Singla <b45784@freescale.com>
Acked-By: Eric Nelson <eric.nelson@boundarydevices.com>