platform/kernel/u-boot.git
9 years agopowerpc: mpc8xx: remove hermes board support
Masahiro Yamada [Fri, 21 Nov 2014 02:26:11 +0000 (11:26 +0900)]
powerpc: mpc8xx: remove hermes board support

This board sprinkles #ifdef(CONFIG_HERMES) over various global files
such as include/common.h, common/board_r.c, common/cmd_bdinfo.c.
Let's zap such an ill-behaved board.

It has not been converted to generic board yet and mpc8xx is old
enough.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Wolfgang Denk <wd@denx.de>
Acked-by: Wolfgang Denk <wd@denx.de>
9 years agocmd_fuse: return CMD_RET_FAILURE on error
Hector Palacios [Thu, 20 Nov 2014 08:27:42 +0000 (09:27 +0100)]
cmd_fuse: return CMD_RET_FAILURE on error

Fuse drivers, like the mxs_ocotp.c, may return negative error codes but
the commands are only allowed to return CMD_RET_* enum values to the
shell, otherwise the following error appears:

"exit not allowed from main input shell."

Signed-off-by: Hector Palacios <hector.palacios@digi.com>
Reviewed-by: Benoît Thébaudeau <benoit.thebaudeau.dev@gmail.com>
9 years agoARM: rpi: support an environment
Stephen Warren [Thu, 20 Nov 2014 03:41:04 +0000 (20:41 -0700)]
ARM: rpi: support an environment

Enable ENV_IS_IN_FAT so that the environment can be stored persistently.
It's stored in the FAT partition that the RPi firmware requires. On most
RPis, this is on the SD card (which must be present in order for the
system to boot). On the CM this is on the built-in eMMC device.

Since we now have a persistent environment, there's no need to load
uEnv.txt at boot; we only did that to work around the lack of persistent
environment.

Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
9 years agoARM: rpi: rename rpi_b to rpi
Stephen Warren [Thu, 20 Nov 2014 03:41:03 +0000 (20:41 -0700)]
ARM: rpi: rename rpi_b to rpi

The U-Boot port runs on a variety of RPi models, not just the B. So,
rename the port to something slightly more generic.

Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
9 years agoARM: rpi_b: detect board revision
Stephen Warren [Wed, 19 Nov 2014 04:40:21 +0000 (21:40 -0700)]
ARM: rpi_b: detect board revision

Detect the board revision early during boot, and print the decoded
model name.

Eventually, this information can be used for tasks such as:
- Allowing/preventing USB device mode; some models have a USB device on-
  board so only host mode makes sense. Others connect the SoC directly
  to the USB connector, so device-mode might make sense.
- The on-board USB hub/Ethernet requires different GPIOs to enable it,
  although luckily the default appears to be fine so far.
- The compute module contains an on-board eMMC device, so we could store
  the environment there. Other models use an SD card and so don't support
  saving the environment (unless we store it in a file on the FAT boot
  partition...)

Set $fdtfile based on this information. At present, the mainline Linux
kernel doesn't contain a separate DTB for most models, but I hope that
will change soon.

Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
9 years agospl: if MMCSD_MODE_RAW fails, try MMCSD_MODE_FS, if available
Guillaume GARDET [Tue, 18 Nov 2014 09:44:46 +0000 (10:44 +0100)]
spl: if MMCSD_MODE_RAW fails, try MMCSD_MODE_FS, if available

In SPL MMC, boot modes are exclusive. So, if MMCSD_MODE_RAW fails, the board hangs. This patch allows to
try MMCSD_MODE_FS then, if available.

It has been tested on a pandaboard (rev. A3).

Signed-off-by: Guillaume GARDET <guillaume.gardet@free.fr>
Cc: Tom Rini <trini@ti.com>
9 years agoMAINTAINERS: add me as a maintainer of UBI
Heiko Schocher [Tue, 18 Nov 2014 08:08:45 +0000 (09:08 +0100)]
MAINTAINERS: add me as a maintainer of UBI

Add me for UBI custodian.

Signed-off-by: Heiko Schocher <hs@denx.de>
Acked-by: Stefan Roese <sr@denx.de>
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
9 years agonet: bootp: as CONFIG_BOOTP_SERVERIP is defined, keep bootfile not changed
Wu, Josh [Tue, 18 Nov 2014 05:07:08 +0000 (13:07 +0800)]
net: bootp: as CONFIG_BOOTP_SERVERIP is defined, keep bootfile not changed

Currenly when CONFIG_BOOTP_SERVERIP is defined, the SERVERIP is not changed
when receive the BOOTP packet. But BOOTFILE is changed via BOOTP packet.

As we will load the BOOTFILE from SERVERIP, if the BOOTFILE is modified
by bootp packet but SERVERIP is not, that is not make sense.

This patch make SERVERIP and BOOTFILE be consistent. If we define the
CONFIG_BOOTP_SERVERIP, then SERVERIP and BOOTFILE will not changed by
BOOTP packet. Only IP address is changed.

Signed-off-by: Josh Wu <josh.wu@atmel.com>
9 years agoget_maintainer.pl: fix source tree detection
Daniel Schwierzeck [Sun, 16 Nov 2014 19:30:11 +0000 (20:30 +0100)]
get_maintainer.pl: fix source tree detection

get_maintainer.pl always fails with following message:
./scripts/get_maintainer.pl: The current directory does not appear to be a linux kernel source tree.

This was caused by commit:

commit 548b310c68ac99a0330d8b56c797c09ff0742d1e
Author: Masahiro Yamada <yamada.m@jp.panasonic.com>
Date:   Thu Oct 30 15:50:15 2014 +0900

    Remove the CREDITS file

    This file is not maintained these days.

    We use MAINTAINERS for the maintainership of the supported boards.
    For dead boards, we have some clues in doc/README.scrapyard and
    also imperishable history in git-log.

Remove CREDITS from source tree detection to fix this.

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agoFix console functions for U-Boot API
Simon Glass [Fri, 14 Nov 2014 03:51:12 +0000 (20:51 -0700)]
Fix console functions for U-Boot API

Commit 709ea54 made a subtle change to the way the U-Boot API jump table
is set up. So at present putc(), getc(), tstc() and puts() do not work
correctly from functions that use the U-Boot API.

Previously these were set to the stdio functions, but these now take a
parameter specifying which stdio device to use. Instead, we should change
them to use the global functions which do not have a parameter.

This is a slight change in behaviour. The functions will now output to
all selected stdio devices - for example putc() will output a character to
all devices selected by stdout. However in most cases there is only one,
and it isn't necessarily incorrect behaviour anyway.

The API version is not changed since it is compatible with what was there
before.

Reported-by: Martin Dorwig <dorwig@tektronik.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agospl: MMC U-Boot image load from raw partition
Paul Kocialkowski [Sat, 8 Nov 2014 22:14:56 +0000 (23:14 +0100)]
spl: MMC U-Boot image load from raw partition

Raw images of U-Boot can be stored inside MMC partitions, so it makes sense to
read the partition table, looking for a partition number instead of using
a fixed sector address.

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
Reviewed-by: Tom Rini <trini@ti.com>
[trini: Only add mmc_load_image_raw_partition() when
CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION to avoid warning, add missing
conversion in spl_mmc_load_image()]
Signed-off-by: Tom Rini <trini@ti.com>
9 years agoi2c: Correct spelling error
Mark Tomlinson [Mon, 1 Dec 2014 19:49:19 +0000 (08:49 +1300)]
i2c: Correct spelling error

"diconnect" and "disconnet" should both be "disconnect".

Signed-off-by: Mark Tomlinson <mark.tomlinson@alliedtelesis.co.nz>
9 years agoi2c: Fix deselection of muxes
Mark Tomlinson [Mon, 1 Dec 2014 19:49:18 +0000 (08:49 +1300)]
i2c: Fix deselection of muxes

Due to an uninitialised variable, when muxes were deselected, any value
could be written to the mux control register. On the PCA9548, this could
result in multiple channels being selected, thus enabling multiple
pull-up resistors, and much bus capacitance.

The fix is simply to initialise the written value to zero.

Signed-off-by: Mark Tomlinson <mark.tomlinson@alliedtelesis.co.nz>
9 years agoARM: UniPhier: merge UniPhier config headers into a single file
Masahiro Yamada [Fri, 5 Dec 2014 15:03:22 +0000 (00:03 +0900)]
ARM: UniPhier: merge UniPhier config headers into a single file

Some configurations have been moved to Kconfig and the difference
among the config headers of UniPhier SoC variants is getting smaller
and smaller.  Now is a good time to merge them into a single file.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
9 years agoARM: UniPhier: move support card select to Kconfig
Masahiro Yamada [Fri, 5 Dec 2014 15:03:21 +0000 (00:03 +0900)]
ARM: UniPhier: move support card select to Kconfig

There are two kinds of expansion boards which are often used for
the UniPhier platform and they are only exclusively selectable.
It can be better described by the "choice" menu of Kconfig.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
9 years agoARM: UniPhier: move CONFIG_UNIPHIER_SMP to Kconfig
Masahiro Yamada [Fri, 5 Dec 2014 15:03:20 +0000 (00:03 +0900)]
ARM: UniPhier: move CONFIG_UNIPHIER_SMP to Kconfig

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
9 years agoARM: UniPhier: use boot_is_swapped() macro for readability
Masahiro Yamada [Fri, 5 Dec 2014 15:03:19 +0000 (00:03 +0900)]
ARM: UniPhier: use boot_is_swapped() macro for readability

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
9 years agoARM: UniPhier: disable autostart by default
Masahiro Yamada [Fri, 5 Dec 2014 15:03:18 +0000 (00:03 +0900)]
ARM: UniPhier: disable autostart by default

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
9 years agoflash: do not fail even if flash_size is zero
Masahiro Yamada [Fri, 5 Dec 2014 03:20:58 +0000 (12:20 +0900)]
flash: do not fail even if flash_size is zero

CONFIG_SYS_MAX_FLASH_BANKS_DETECT allows to determine the number of
flash banks at run-time, that is, there is a possibility that no flash
bank is found.  Even in such cases, it makes sense to continue the
boot process without any flash device.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Stefan Roese <sr@denx.de>
9 years agoARM: UniPhier: remove Denali NAND controller fixup code
Masahiro Yamada [Fri, 28 Nov 2014 06:19:32 +0000 (15:19 +0900)]
ARM: UniPhier: remove Denali NAND controller fixup code

This ugly work-around code is unnecessary since commit f09eb52b3ffc
(mtd: denali: set some registers after nand_scan_ident()).

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
9 years agopowerpc/hydra: fix judging condition of RGMII selection
Minghuan Lian [Mon, 24 Nov 2014 10:20:46 +0000 (18:20 +0800)]
powerpc/hydra: fix judging condition of RGMII selection

BRDCFG1_EMI1_SEL_MASK has been changed to 0x78, which contains
selection bits and connected status bit. So the Corresponding mux
value of RGMII is changed to BRDCFG1_EMI1_SEL_RGMII | BRDCFG1_EMI1_EN.

Signed-off-by: Minghuan Lian <Minghuan.Lian@freescale.com>
Signed-off-by: Shaohui Xie <Shaohui.Xie@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
9 years agopowerpc/hydra: Update MDIO mux fixups
Chunhe Lan [Tue, 18 Nov 2014 03:11:54 +0000 (11:11 +0800)]
powerpc/hydra: Update MDIO mux fixups

The new device trees use a more generic interface for
supporting muxing mdio buses. The mux property is thus
specified in "reg", rather than "fsl,hydra-mdio-muxval".

In order to support using old device trees, we keep the
old fixup in there. Linux will therefore see the both
properties, but will ignore fsl,hydra-mdio-muxval.

Signed-off-by: Chunhe Lan <Chunhe.Lan@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
9 years agopowerpc/t4240rdb: enable eSDHC 3.3V support
Xiaobo Xie [Tue, 18 Nov 2014 01:12:24 +0000 (09:12 +0800)]
powerpc/t4240rdb: enable eSDHC 3.3V support

The SD supply Voltage was 3.3V on T4240RDB, so enabled 3.3V support for eSDHC.

Signed-off-by: Xie Xiaobo <X.Xie@freescale.com>
Signed-off-by: Wujie Qiu <B49553@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
9 years agopowerpc/mpc85xx: use correct dma compatible for several SoCs
Tudor Laurentiu [Thu, 20 Nov 2014 10:09:31 +0000 (12:09 +0200)]
powerpc/mpc85xx: use correct dma compatible for several SoCs

Newer qoriq socs have an updated dma ip block with a
different compatible. Let's make sure we use the proper
string so that the dmas get their liodn.
In order to have the means to specify the compatible
string, the liodn setting macros were updated to receive
a new parameter for it.
The following SoCs were changed to use the new compatible:
 T1023/4, T1040, T2080/1, T4240, B4860.

Signed-off-by: Laurentiu Tudor <Laurentiu.Tudor@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
9 years agoboard/t1024qds: add retimer support on t1024qds
Shengzhou Liu [Mon, 24 Nov 2014 09:18:28 +0000 (17:18 +0800)]
board/t1024qds: add retimer support on t1024qds

Initialize retimer for XFI on t1024qds.

Signed-off-by: Shengzhou Liu <Shengzhou.Liu@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
9 years agot1024qds: increase IO drive strength
Shengzhou Liu [Mon, 24 Nov 2014 09:12:00 +0000 (17:12 +0800)]
t1024qds: increase IO drive strength

Increase IO drive strength to fix FCS error on RGMII ports
on T1024QDS.

Signed-off-by: Shengzhou Liu <Shengzhou.Liu@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
9 years agonet/phy: enable serdes auto-negotiation for vsc8514 phy
Shengzhou Liu [Mon, 24 Nov 2014 09:11:59 +0000 (17:11 +0800)]
net/phy: enable serdes auto-negotiation for vsc8514 phy

VSC8514 QSGMII PHY requires enabling auto-negotiation,
otherwise it wouldn't work.

Signed-off-by: Shengzhou Liu <Shengzhou.Liu@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
9 years agoboard/t1024qds: update pin multiplexing
Shengzhou Liu [Mon, 24 Nov 2014 09:11:58 +0000 (17:11 +0800)]
board/t1024qds: update pin multiplexing

Add multiplexing support among SPI flash, TDM riser card and SDXC.
it routes SPI pins to SPI flash by default.
Route SPI pins to SD slot if "adaptor=sdxc" is set in hwconfig.
Route SPI pins to TDM riser card and do fixup for dts if "pin_mux=tdm"
is set in hwconfig.

Signed-off-by: Shengzhou Liu <Shengzhou.Liu@freescale.com>
Signed-off-by: Xie Xiaobo <X.Xie@freescale.com>
Signed-off-by: Zhao Qiang <B45475@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
9 years agonet/fman: update 10GEC to fit new SoC
Shengzhou Liu [Mon, 24 Nov 2014 09:11:57 +0000 (17:11 +0800)]
net/fman: update 10GEC to fit new SoC

fm_standard_init() initializes each 10G port by FM_TGEC_INFO_INITIALIZER.
but it needs different implementation of FM_TGEC_INFO_INITIALIZER on different SoCs.
on SoCs earlier(e.g. T4240, T2080), the notation between 10GEC and MAC as below:
10GEC1->MAC9, 10GEC2->MAC10, 10GEC3->MAC1, 10GEC4->MAC2
on SoCs later(e.g. T1024, etc), the notation between 10GEC and MAC as below:
10GEC1->MAC1, 10GEC2->MAC2

so we introduce CONFIG_FSL_FM_10GEC_REGULAR_NOTATION to fit the new SoCs on
which 10GEC enumeration is consistent with MAC enumeration.

Signed-off-by: Shengzhou Liu <Shengzhou.Liu@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
9 years agopowerpc/t1024rdb: Add T1024 RDB board support
Shengzhou Liu [Mon, 24 Nov 2014 09:11:56 +0000 (17:11 +0800)]
powerpc/t1024rdb: Add T1024 RDB board support

T1024RDB is a Freescale Reference Design Board that hosts the T1024 SoC.

T1024RDB board Overview
-----------------------
- T1024 SoC integrating two 64-bit e5500 cores up to 1.4GHz
- CoreNet fabric supporting coherent and noncoherent transactions with
  prioritization and bandwidth allocation
- 32-/64-bit DDR3L SDRAM memory controller with ECC and interleaving support
- Accelerator: DPAA components consist of FMan, BMan, QMan, DCE and SEC
- Ethernet interfaces:
  - Two 10M/100M/1G RGMII ports on-board
  - one 10Gbps XFI interface
- PCIe: Three PCIe controllers: one PCIe Slot and two Mini-PCIe connectors.
- SerDes: 4 lanes up to 10.3125GHz
- IFC: 128MB NOR Flash, 512MB NAND Flash and CPLD
- eSPI: 64MB N25Q512 SPI flash.
- Deep Sleep power implementaion (wakeup from GPIO/Timer/Ethernet/USB)
- USB: Two  Type-A USB2.0 ports with internal PHY
- eSDHC: Support SD, SDHC, SDXC and MMC/eMMC
- I2C: Four I2C controllers
- UART: Two UART serial ports

Signed-off-by: Shengzhou Liu <Shengzhou.Liu@freescale.com>
[York Sun: Fix ft_board_setup() type, fix MAINTAINERS for SECURE_BOOT
   Fix Kconfig by adding SUPPORT_SPL]
Reviewed-by: York Sun <yorksun@freescale.com>
9 years agopowerpc/t1024qds: Add T1024 QDS board support
Shengzhou Liu [Mon, 24 Nov 2014 09:11:55 +0000 (17:11 +0800)]
powerpc/t1024qds: Add T1024 QDS board support

T1024QDS is a high-performance computing evaluation, development and
test platform for T1024 QorIQ Power Architecture processor.

T1024QDS board Overview
-----------------------
- T1024 SoC integrating two 64-bit e5500 cores up to 1.4GHz
- CoreNet fabric supporting coherent and noncoherent transactions with
  prioritization and bandwidth allocation
- 32-/64-bit DDR3L/DDR4 SDRAM memory controller with ECC and interleaving support
- Accelerator: DPAA components consist of FMan, BMan, QMan, DCE and SEC
- Ethernet interfaces:
  - Two 10M/100M/1G RGMII ports on-board
  - Three 1G/2.5Gbps SGMII ports
  - Four 1Gbps QSGMII ports
  - one 10Gbps XFI or 10Base-KR interface
- SerDes: 4 lanes up to 10.3125GHz Supporting SGMII/QSGMII, XFI, PCIe, SATA and Aurora
- PCIe: Three PCI Express controllers with five PCIe slots.
- IFC: 128MB NOR Flash, 2GB NAND Flash, PromJet debug port and Qixis FPGA
- Video: DIU supports video up to 1280x1024x32 bpp.
  - Chrontel CH7201 for HDMI connection.
  - TI DS90C387R for direct LCD connection.
  - Raw (not encoded) video connector for testing or other encoders.
- QUICC Engine block
  - 32-bit RISC controller for flexible support of the communications peripherals
  - Serial DMA channel for receive and transmit on all serial channels
  - Two universal communication controllers, supporting TDM, HDLC, and UART
- Deep Sleep power implementaion (wakeup from GPIO/Timer/Ethernet/USB)
- eSPI: Three SPI flash devices.
- SATA: one SATA 2.O.
- USB: Two USB2.0 ports with internal PHY (one Type-A + one micro Type mini-AB)
- eSDHC: Support SD, SDHC, SDXC and MMC/eMMC.
- I2C: Four I2C controllers.
- UART: Two UART on board.

Signed-off-by: Shengzhou Liu <Shengzhou.Liu@freescale.com>
[York Sun: Fix ft_board_setup() type, fix MAINTAINERS for SECURE_BOOT
   Fix Kconfig by adding SUPPORT_SPL]
Reviewed-by: York Sun <yorksun@freescale.com>
9 years agopowerpc/mpc85xx: Add T1024/T1023 SoC support
Shengzhou Liu [Mon, 24 Nov 2014 09:11:54 +0000 (17:11 +0800)]
powerpc/mpc85xx: Add T1024/T1023 SoC support

Add support for Freescale T1024/T1023 SoC.

The T1024 SoC includes the following function and features:
- Two 64-bit Power architecture e5500 cores, up to 1.4GHz
- private 256KB L2 cache each core and shared 256KB CoreNet platform cache (CPC)
- 32-/64-bit DDR3L/DDR4 SDRAM memory controller with ECC and interleaving support
- Data Path Acceleration Architecture (DPAA) incorporating acceleration
- Four MAC for 1G/2.5G/10G network interfaces (RGMII, SGMII, QSGMII, XFI)
- High-speed peripheral interfaces
  - Three PCI Express 2.0 controllers
- Additional peripheral interfaces
  - One SATA 2.0 controller
  - Two USB 2.0 controllers with integrated PHY
  - Enhanced secure digital host controller (SD/eSDHC/eMMC)
  - Enhanced serial peripheral interface (eSPI)
  - Four I2C controllers
  - Four 2-pin UARTs or two 4-pin UARTs
  - Integrated Flash Controller supporting NAND and NOR flash
- Two 8-channel DMA engines
- Multicore programmable interrupt controller (PIC)
- LCD interface (DIU) with 12 bit dual data rate
- QUICC Engine block supporting TDM, HDLC, and UART
- Deep Sleep power implementaion (wakeup from GPIO/Timer/Ethernet/USB)
- Support for hardware virtualization and partitioning enforcement
- QorIQ Platform's Trust Architecture 2.0

Differences between T1024 and T1023:
  Feature         T1024  T1023
  QUICC Engine:   yes    no
  DIU:            yes    no
  Deep Sleep:     yes    no
  I2C controller: 4      3
  DDR:            64-bit 32-bit
  IFC:            32-bit 28-bit

Signed-off-by: Shengzhou Liu <Shengzhou.Liu@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
9 years agodriver/ddr/fsl: Add workaround for faulty SPD
York Sun [Sat, 15 Nov 2014 01:17:50 +0000 (17:17 -0800)]
driver/ddr/fsl: Add workaround for faulty SPD

Some UDIMMs have faulty SPD with wrong mapping for DQ[36-39].
Using raw card spec in case this error is detected.

Signed-off-by: York Sun <yorksun@freescale.com>
9 years agopowerpc/mpc85xx: Update LIODN entries for T1040
Priyanka Jain [Tue, 18 Nov 2014 05:23:49 +0000 (10:53 +0530)]
powerpc/mpc85xx: Update LIODN entries for T1040

Signed-off-by: Priyanka Jain <Priyanka.Jain@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
9 years agopowerpc/t2080: updating rcw for silicon v1.1
Shengzhou Liu [Fri, 14 Nov 2014 02:31:22 +0000 (10:31 +0800)]
powerpc/t2080: updating rcw for silicon v1.1

T2080 v1.1 requires different MEM_PLL_RAT from previous v1.0,
and also update core frequency to 1.8GHz for v1.1.
We reserve the support for T2080 v1.0 and enable v1.1 by default.

Signed-off-by: Shengzhou Liu <Shengzhou.Liu@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
9 years agoB4860QDS: Enable enet port as per fsl_b4860_serdes2 string in hwconfig
Suresh Gupta [Thu, 13 Nov 2014 03:28:09 +0000 (11:28 +0800)]
B4860QDS: Enable enet port as per fsl_b4860_serdes2 string in hwconfig

In B4860QDS board SerDes2 lanes EFGH either go to SFP or AMC riser card
slot2 so either DTSEC3/DTSEC4 or TGEC1/TGEC2 should be accessible. This
Patch enables DTSEC3/DTSEC4 or TGEC1/TGEC2 on bases of user specified
string fsl_b4860_serdes2:sfp_amc=amc or fsl_b4860_serdes2:sfp_amc=sfp
respectively in hwconfig.

Signed-off-by: Suresh Gupta <suresh.gupta@freescale.com>
Signed-off-by: Shaohui Xie <Shaohui.Xie@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
9 years agopowerpc/b4860qds: add workaround for XFI
Shaohui Xie [Thu, 13 Nov 2014 03:27:49 +0000 (11:27 +0800)]
powerpc/b4860qds: add workaround for XFI

XFI does not work stable on current board, it's due to heat sink issue,
to make it work stable the board needs additional heat sink, enable two
XFI lanes only. Right now we do not have such an erratum for the issue,
so use a define CONFIG_SYS_FSL_B4860QDS_XFI_ERR to identify it.
The workaround will only be used in XFI protocols and only if the
hwconfig indicates that XFI is prefered.

A new VSC3308 config function is used instead of re-use the original
function, to avoid making the function complex and ugly.

Signed-off-by: Shaohui Xie <Shaohui.Xie@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
9 years agoB4860QDS: Enable SFP or AMC on basis of hwconfig string
Suresh Gupta [Thu, 13 Nov 2014 03:27:32 +0000 (11:27 +0800)]
B4860QDS: Enable SFP or AMC on basis of hwconfig string

SerDes2 lanes EFGH either go to SFP or AMC riser card slot2.
By default AMC will be configured even if no hwconfig is specified.

To enable XFI via SFP use the below hwconfig:
fsl_b4860_serdes2:sfp_amc=sfp

Signed-off-by: Suresh Gupta <suresh.gupta@freescale.com>
Signed-off-by: Poonam Aggrwal <poonam.aggrwal@ffeescale.com>
Signed-off-by: Shaohui Xie <Shaohui.Xie@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
9 years agopowerpc/b4860qds: dtb fixup for xfi
Shaohui Xie [Thu, 13 Nov 2014 03:27:12 +0000 (11:27 +0800)]
powerpc/b4860qds: dtb fixup for xfi

Since xfi has no phy, we delete the property "phy-handle" and use
a "fixed-link" property for a xfi port.

Signed-off-by: Shaohui Xie <Shaohui.Xie@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
9 years agopowerpc/b4860qds: add xfi support
Shaohui Xie [Thu, 13 Nov 2014 03:26:19 +0000 (11:26 +0800)]
powerpc/b4860qds: add xfi support

We need following changes to make xfi work on B4:
1. set cross-point switch VSC3308 to use sfp config when running xfi;
2. add 10G interface check for xfi;
3. set phy address for xfi so the 10G ports can be registered by mdio;

Signed-off-by: Shaohui Xie <Shaohui.Xie@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
9 years agoB4860: Add alternate LC VCO serdes protocols support in board file
Shaveta Leekha [Wed, 12 Nov 2014 10:30:44 +0000 (16:00 +0530)]
B4860: Add alternate LC VCO serdes protocols support in board file

Add the support of newly added LC VCO SerDes protocols
for configuration of IDT and VSC crossbar

Signed-off-by: Shaveta Leekha <shaveta@freescale.com>
Signed-off-by: Poonam Aggrwal <poonam.aggrwal@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
9 years agoB4860QDS: SGMII related updates
Shaveta Leekha [Wed, 12 Nov 2014 10:30:22 +0000 (16:00 +0530)]
B4860QDS: SGMII related updates

- Enable SGMII support for 0x8d Serdes 2 protocol.
    - Correct Phy address for DTSECx for 0x8d/0xb2 Serdes 2 protocol.
    - Updated debug statement
    - Add Alternate LC VCO protocols(0x8d-->0x8c, 0xb2-->0xb1)
    - Rename onboard PHY address defines for more readability
    - Add these new Defines in B4860QDS.h file

Signed-off-by: Shaveta Leekha <shaveta@freescale.com>
Signed-off-by: Poonam Aggrwal <poonam.aggrwal@freescale.com>
Signed-off-by: Suresh Gupta <suresh.gupta@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
9 years ago85xx/b4860: Add alternate serdes protocols for B4860/B4420
Shaveta Leekha [Wed, 12 Nov 2014 10:32:25 +0000 (16:02 +0530)]
85xx/b4860: Add alternate serdes protocols for B4860/B4420

Addded Alternate options with LC VCO for following protocols:
0x02 --> 0x01
0x08 --> 0x07
0x18 --> 0x17
0x1E --> 0x1D
0x49 --> 0x48
0x6F --> 0x6E
0x9A --> 0x99
0x9E --> 0x9D

Signed-off-by: Shaveta Leekha <shaveta@freescale.com>
Signed-off-by: Poonam Aggrwal <poonam.aggrwal@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
9 years agopowerpc/b4860: Enable law creation of MAPLE
Shaveta Leekha [Wed, 12 Nov 2014 08:53:26 +0000 (14:23 +0530)]
powerpc/b4860: Enable law creation of MAPLE

B4860, B4440, B4420 and B4220 have MAPLE, so enable law creation
for them only. Remove static LAW creation for MAPLE.

Signed-off-by: Shaveta Leekha <shaveta@freescale.com>
Signed-off-by: Sandeep Singh <Sandeep@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
9 years agopowerpc/t104x: Convert to use generic board code
vijay rai [Tue, 18 Nov 2014 06:51:13 +0000 (12:21 +0530)]
powerpc/t104x: Convert to use generic board code

Convert T1040QDS and T1040RDB to use generic board code.

Signed-off-by: Vijay Rai <vijay.rai@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
9 years agonet/phy: Add support for CS4315/CS4340 PHY
Shengzhou Liu [Mon, 10 Nov 2014 10:32:29 +0000 (18:32 +0800)]
net/phy: Add support for CS4315/CS4340 PHY

Add support for Cortina CS4315/CS4340 10G PHY.
- This driver loads CS43xx firmware from NOR/NAND/SPI/SD device
  to initialize Cortina PHY.
- Cortina PHY has non-standard offset of PHY ID registers, thus
  we define own get_phy_id() to override default get_phy_id().
- To define macro CONFIG_PHY_CORTINA will enable this driver.

Signed-off-by: Shengzhou Liu <Shengzhou.Liu@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
9 years agodriver/ddr/fsl: Adjust timing_cfg_0 to better support two DDR slots
York Sun [Fri, 7 Nov 2014 20:14:36 +0000 (12:14 -0800)]
driver/ddr/fsl: Adjust timing_cfg_0 to better support two DDR slots

Increase write-to-write and read-to-read turnaround time for two-slot DDR
configurations. Previously only quad-rank and two dual-rank configurations
have this additional turnaround time. A recent test on two single-rank
DIMMs shows the shorter additional turnaround time is also needed.

Signed-off-by: York Sun <yorksun@freescale.com>
9 years agopowerpc/c29xpcie: Enable configs to use generic board code
Chunhe Lan [Fri, 7 Nov 2014 07:39:56 +0000 (15:39 +0800)]
powerpc/c29xpcie: Enable configs to use generic board code

Add configs:
  o CONFIG_SYS_GENERIC_BOARD
  o CONFIG_DISPLAY_BOARDINFO
in C29XPCIE config header file to use U-boot generic
board code.

Signed-off-by: Chunhe Lan <Chunhe.Lan@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
9 years agopowerpc/p1023rdb: Enable configs to use generic board code
Chunhe Lan [Fri, 7 Nov 2014 07:15:49 +0000 (15:15 +0800)]
powerpc/p1023rdb: Enable configs to use generic board code

Add configs:
  o CONFIG_SYS_GENERIC_BOARD
  o CONFIG_DISPLAY_BOARDINFO
in P1023RDB config header file to use U-boot generic
board code.

Signed-off-by: Chunhe Lan <Chunhe.Lan@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
9 years agompc85xx/p1022ds: convert to generic board
Tang Yuantian [Fri, 7 Nov 2014 06:46:18 +0000 (14:46 +0800)]
mpc85xx/p1022ds: convert to generic board

Signed-off-by: Tang Yuantian <Yuantian.Tang@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
9 years agopowerpc, muas3001: remove CONFIG_SYS_RAMBOOT
Heiko Schocher [Thu, 6 Nov 2014 14:20:52 +0000 (15:20 +0100)]
powerpc, muas3001: remove CONFIG_SYS_RAMBOOT

cppcheck reports:

[board/muas3001/muas3001.c:270]: (error) Uninitialized variable: psize

remove the CONFIG_SYS_RAMBOOT define to prevent this error report.

Signed-off-by: Heiko Schocher <hs@denx.de>
Reported-by: Wolfgang Denk <wd@denx.de>
Reviewed-by: York Sun <yorksun@freescale.com>
9 years agokm/km82xx: remove CONFIG_SYS_RAMBOOT
Holger Brunck [Thu, 6 Nov 2014 13:54:18 +0000 (14:54 +0100)]
km/km82xx: remove CONFIG_SYS_RAMBOOT

This define is never set in our setup, so we can remove it safely. The
former code causes cppcheck to complain about:
[board/keymile/km82xx/km82xx.c:311]: (error) Uninitialized variable:
psize

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
cc: Valentin Longchamp <valentin.longchamp@keymile.com>
cc: Wolfgang Denk <wd@denx.de>
Reviewed-by: York Sun <yorksun@freescale.com>
9 years agoboard/freescale: use generic board architecture for p1010rdb
Ying Zhang [Thu, 6 Nov 2014 05:05:08 +0000 (13:05 +0800)]
board/freescale: use generic board architecture for p1010rdb

Use generic board architecture for p1010rdb, tested with NOR
boot on p1010rdb-pb.

Signed-off-by: Ying Zhang <b40530@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
9 years agopowerpc/P5040DS: enable SATA support
Shaohui Xie [Tue, 4 Nov 2014 11:53:30 +0000 (19:53 +0800)]
powerpc/P5040DS: enable SATA support

The define CONFIG_FSL_SATA_V2 is missing, so SATA is not available
in U-boot.

Signed-off-by: Shaohui Xie <Shaohui.Xie@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
9 years agoboard/freescale: use generic board architecture for p1025-twr
Ying Zhang [Tue, 4 Nov 2014 07:10:46 +0000 (15:10 +0800)]
board/freescale: use generic board architecture for p1025-twr

Use generic board architecture for p1025-twr, tested with NOR
boot and NAND boot on p1025-twr.

Signed-off-by: Ying Zhang <b40530@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
9 years agopowerpc/t208xqds: VID support
Ying Zhang [Fri, 31 Oct 2014 10:06:18 +0000 (18:06 +0800)]
powerpc/t208xqds: VID support

The fuse status register provides the values from on-chip
voltage ID efuses programmed at the factory.
These values define the voltage requirements for
the chip. u-boot reads FUSESR and translates the values
into the appropriate commands to set the voltage output
value of an external voltage regulator.

Signed-off-by: Ying Zhang <b40530@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
9 years agopowerpc/mpc85xx: modify erratum A007186
Zhao Qiang [Thu, 30 Oct 2014 06:07:39 +0000 (14:07 +0800)]
powerpc/mpc85xx: modify erratum A007186

T2080 v1.0 has this errata while v1.1 has fixed
this errata by hardware, add a new function has_errata_a007186
to check the SVR_SOC_VER, SVR_MAJ and SVR_MIN first,
if the sil has errata a007186, then run the errata code,
if not, doesn't run the code.

Signed-off-by: Zhao Qiang <B45475@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
9 years agoboard/t104xrdb: Conditional workaround of errata A-008044
Prabhakar Kushwaha [Wed, 29 Oct 2014 17:03:55 +0000 (22:33 +0530)]
board/t104xrdb: Conditional workaround of errata A-008044

Workaround of Errata A-008044 was implemented without errata number and it is
enabled by default. Errata A-008044 is only valid for T1040 Rev 1.0.

So put errata number and make it conditional.

Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
9 years agopowerpc/mpc85xx:Put errata number for T104x NAND boot issue
Prabhakar Kushwaha [Wed, 29 Oct 2014 17:03:09 +0000 (22:33 +0530)]
powerpc/mpc85xx:Put errata number for T104x NAND boot issue

When device is configured to load RCW from NAND flash IFC_A[16:31] are driven
low after RCW loading. Hence Devices connected on IFC_CS[1:7] and using
IFC_A[16:31] lines are not accessible.

Workaround is already in-place.
Put the errata number to adhere errata handling framework.

Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
9 years agopowerpc/t1040qds: Update DDR option
York Sun [Mon, 27 Oct 2014 18:45:11 +0000 (11:45 -0700)]
powerpc/t1040qds: Update DDR option

Enable interactive debugging by default. Remove DDR controller interleaving
because this SoC only has one controller. Use auto chip-select interleaving
to detect number of ranks.

Signed-off-by: York Sun <yorksun@freescale.com>
CC: Poonam Aggrwal <poonam.aggrwal@freescale.com>
9 years agompc85xx/t2080: Fix parsing DDR ratio for new revision
York Sun [Mon, 27 Oct 2014 18:31:33 +0000 (11:31 -0700)]
mpc85xx/t2080: Fix parsing DDR ratio for new revision

T2080 rev 1.1 changes MEM_RAT in RCW, which requires new parsing for ratio,
the same way as T4240 rev 2.0.

Signed-off-by: York Sun <yorksun@freescale.com>
CC: Shengzhou Liu <Shengzhou.Liu@freescale.com>
9 years agompc85xx/t208xqds: Adjust DDR timing parameters
York Sun [Mon, 27 Oct 2014 18:31:32 +0000 (11:31 -0700)]
mpc85xx/t208xqds: Adjust DDR timing parameters

Adjust timing for dual-rank UDIMM, verified on M3CQ-8GHS3C0E for speed of
1066, 1333, 1600, 1866MT/s. The 1866 timing is copied to 2133 timing in
case such DIMM comes available.

Also update single-rank 1866 timing. Enable interactive debugging as well.

Signed-off-by: York Sun <yorksun@freescale.com>
CC: Shengzhou Liu <Shengzhou.Liu@freescale.com>
9 years agopowerpc/t2080: add serdes2 protocol 0x2e
Shengzhou Liu [Mon, 27 Oct 2014 02:08:16 +0000 (10:08 +0800)]
powerpc/t2080: add serdes2 protocol 0x2e

Add serdes2 protocol 0x2e.

Signed-off-by: Shengzhou Liu <Shengzhou.Liu@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
9 years agoFreescale t104x: Do not exclude SGMII
Joakim Tjernlund [Fri, 24 Oct 2014 14:49:02 +0000 (16:49 +0200)]
Freescale t104x: Do not exclude SGMII

fman_port_enet_if() tests if FM1_DTSEC2 or FM1_DTSEC4 uses
RGMII or MII and if not returns PHY_INTERFACE_MODE_NONE.
This excludes testing for SGMII further down.

Remove the unconditional "else return PHY_INTERFACE_MODE_NONE"
so SGMII can be tested too.

Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
Reviewed-by: York Sun <yorksun@freescale.com>
9 years agocommon: spl: Add interactive DDR debugger support for SPL image
Alison Wang [Wed, 3 Dec 2014 07:00:44 +0000 (15:00 +0800)]
common: spl: Add interactive DDR debugger support for SPL image

To support interactive DDR debugger, cli_simple.o, cli.o, cli_readline.o,
command.o, s_record.o, xyzModem.o and cmd_disk.o are all needed for
drivers/ddr/fsl/interactive.c.

In current common/Makefile, the above .o files are only produced when
CONFIG_SPL_BUILD is disabled.

For LS102xA, interactive DDR debugger is needed in SD/NAND boot too, and
I enabled CONFIG_FSL_DDR_INTERACTIVE. But according to the current
common/Makfile, all the above .o files are not produced in SPL part
because CONFIG_SPL_BUILD is enabled in SPL part, the following error
will be shown,

drivers/ddr/fsl/built-in.o: In function `fsl_ddr_interactive':
/home/wangh/layerscape/u-boot/drivers/ddr/fsl/interactive.c:1871:
undefined reference to `cli_readline_into_buffer'
/home/wangh/layerscape/u-boot/drivers/ddr/fsl/interactive.c:1873:
undefined reference to `cli_simple_parse_line'
make[1]: *** [spl/u-boot-spl] Error 1
make: *** [spl/u-boot-spl] Error 2

So this patch fixed this issue and the above .o files will be produced
no matter CONFIG_SPL_BUILD is enabled or disabled.

Signed-off-by: Alison Wang <alison.wang@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
9 years agons16550.c: Fix for ns16550 driver hanging on OMAP4
Gregoire Gentil [Mon, 10 Nov 2014 19:04:10 +0000 (11:04 -0800)]
ns16550.c: Fix for ns16550 driver hanging on OMAP4

The same problem that is seen on some OMAP3 is also seen on some OMAP4
so include them in the test in order to prevent some hangs during SPL.

[trini: Re-word commit message, make apply cleanly]
Signed-off-by: Tom Rini <trini@ti.com>
9 years agoarm, am335x: siemens boards add FIT support
Heiko Schocher [Tue, 18 Nov 2014 10:51:06 +0000 (11:51 +0100)]
arm, am335x: siemens boards add FIT support

add FIT support and set "boardid" from factoryset records
"DEV/id" and "COMP/ver". "boardid" is used for selecting
which fit configuration gets booted on the board.

Signed-off-by: Heiko Schocher <hs@denx.de>
9 years agoarm, am335x, siemens: read COMP/ver from factoryset
Heiko Schocher [Tue, 18 Nov 2014 10:51:05 +0000 (11:51 +0100)]
arm, am335x, siemens: read COMP/ver from factoryset

Signed-off-by: Heiko Schocher <hs@denx.de>
9 years agoarm, am335x, siemens: fix factoryset interpretation
Heiko Schocher [Tue, 18 Nov 2014 10:51:04 +0000 (11:51 +0100)]
arm, am335x, siemens: fix factoryset interpretation

a record could contain other records, so after an ">" (begin mark)
there not always come an end mark "<", instead a ">" is possible.
Take care of this.

Signed-off-by: Heiko Schocher <hs@denx.de>
9 years agomtd: nand: omap_gpmc: Always use ready/busy pin
Stefan Roese [Thu, 13 Nov 2014 02:43:39 +0000 (03:43 +0100)]
mtd: nand: omap_gpmc: Always use ready/busy pin

The functions to detect the state of the ready / busy signal is already
available but only used in the SPL case. Lets use it always, also for the
main U-Boot. As all boards should have this HW connection.

Testing on Siemens Draco (am335x) showed a small perfomance gain by using
this ready pin to detect the NAND chip state. Here the values tested on
Draco with Hynix 4GBit NAND:

Without NAND ready pin:

U-Boot# time nand read 80400000 0 400000

NAND read: device 0 offset 0x0, size 0x400000
4194304 bytes read: OK

time: 2.947 seconds, 2947 ticks

With NAND ready pin:

U-Boot# time nand read 80400000 0 400000

NAND read: device 0 offset 0x0, size 0x400000
4194304 bytes read: OK

time: 2.795 seconds, 2795 ticks

So an increase of approx. 5%.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Tom Rini <trini@ti.com>
Cc: Scott Wood <scottwood@freescale.com>
Cc: Roger Meier <r.meier@siemens.com>
Cc: Samuel Egli <samuel.egli@siemens.com>
9 years agoarm: am33xx: Handle NAND+I2C boot-device the same way as NAND
Stefan Roese [Wed, 12 Nov 2014 10:57:33 +0000 (11:57 +0100)]
arm: am33xx: Handle NAND+I2C boot-device the same way as NAND

Re-map NAND&I2C boot-device to the "normal" NAND boot-device.
Otherwise the SPL boot IF can't handle this device correctly.
Somehow booting with Hynix 4GBit NAND H27U4G8 on Siemens
Draco leads to this boot-device passed to SPL from the BootROM.

With this change, Draco boots just fine into main U-Boot.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Tom Rini <trini@ti.com>
Cc: Roger Meier <r.meier@siemens.com>
Cc: Samuel Egli <samuel.egli@siemens.com>
9 years agoARM: OMAP5: DRA7xx: Fix misleading comments in mux_data.h
Lubomir Popov [Mon, 10 Nov 2014 16:34:10 +0000 (18:34 +0200)]
ARM: OMAP5: DRA7xx: Fix misleading comments in mux_data.h

The comments on the QSPI pad assignments erronously swapped
the qspi1_d0 and qspi1_d1 functionality and could cause
confusion. QSPI1_D[0] is in fact muxed on pad U1 (gpmc_a16),
and QSPI1_D[1] - on pad P3 (gpmc_a17). Fixing comments.

Signed-off-by: Lubomir Popov <l-popov@ti.com>
Reviewed-by: Tom Rini <trini@ti.com>
9 years agoARM: OMAP5: DRA7xx: Enable 8-bit eMMC access on the dra7xx_evm
Lubomir Popov [Mon, 10 Nov 2014 16:14:18 +0000 (18:14 +0200)]
ARM: OMAP5: DRA7xx: Enable 8-bit eMMC access on the dra7xx_evm

Tested on a Vayu EVM Rev.E2 with DRA752 ES1.1

Signed-off-by: Lubomir Popov <l-popov@ti.com>
Reviewed-by: Tom Rini <trini@ti.com>
9 years agoomap_hsmmc: Board-specific TWL4030 MMC power initializations
Paul Kocialkowski [Sat, 8 Nov 2014 19:55:47 +0000 (20:55 +0100)]
omap_hsmmc: Board-specific TWL4030 MMC power initializations

Boards using the TWL4030 regulator may not all use the LDOs the same way
(e.g. MMC2 power can be controlled by another LDO than VMMC2).
This delegates TWL4030 MMC power initializations to board-specific functions,
that may still call twl4030_power_mmc_init for the default behavior.

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
Reviewed-by: Tom Rini <trini@ti.com>
[trini: Fix omap3_evm warning, add twl4030.h]
Signed-off-by: Tom Rini <trini@ti.com>
9 years agommc: sh_mmcif: Add support rmobile
Nobuhiro Iwamatsu [Wed, 3 Dec 2014 08:57:48 +0000 (17:57 +0900)]
mmc: sh_mmcif: Add support rmobile

Renesas R-Mobile/R-Car ARM SoC of MMC has the same IP that are supported by
sh_mmcif. This adds support R-Mobile/R-Car ARM SoC with the setting of the
clock support.

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
9 years agommc: sh_mmcif: Change maximum and minimum value of MMC clock
Nobuhiro Iwamatsu [Wed, 3 Dec 2014 08:57:01 +0000 (17:57 +0900)]
mmc: sh_mmcif: Change maximum and minimum value of MMC clock

Maximum value and the minimum value of clock for sh_mmcif instead by
base of MMC clock. This removes fixed clock, make the changes to be calculated
according to environment.

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
9 years agommc: sh_mmcif: Use DIV_ROUND_UP and fls instead of calculation loop
Nobuhiro Iwamatsu [Wed, 3 Dec 2014 08:57:00 +0000 (17:57 +0900)]
mmc: sh_mmcif: Use DIV_ROUND_UP and fls instead of calculation loop

Use DIV_ROUND_UP and fls to simplify the code.

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
9 years agoarm: rmobile: rcar: Stop clock prior to booting kernel
Nobuhiro Iwamatsu [Tue, 2 Dec 2014 07:52:24 +0000 (16:52 +0900)]
arm: rmobile: rcar: Stop clock prior to booting kernel

This stops clock except INTC-RT, MSIF, INTC-SYS, IRQC and SCIF before
kernel boots.

Signed-off-by: Hisashi Nakamura <hisashi.nakamura.ak@renesas.com>
Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
9 years agoarm: rmobile: rcar: Add structure for infomation of module control register
Nobuhiro Iwamatsu [Tue, 2 Dec 2014 07:52:23 +0000 (16:52 +0900)]
arm: rmobile: rcar: Add structure for infomation of module control register

The infomation of module control register for R-Car ARM SoC (r8a7790, r8a7791,
r8a7793 and r8a7794) are almost the same, they can be combined into one
structure. This provides structure that summarizes infomation of module control
register and default register values.
And this structure is the module control use of the kernel at boot time.

Signed-off-by: Hisashi Nakamura <hisashi.nakamura.ak@renesas.com>
Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
9 years agoarm: rmobile: rcar: Add infomation of bits for module control register
Nobuhiro Iwamatsu [Tue, 2 Dec 2014 07:52:22 +0000 (16:52 +0900)]
arm: rmobile: rcar: Add infomation of bits for module control register

This adds infomation of bits for module control register. This is used
to control modules on ARM R-Car SoCs.

Signed-off-by: Hisashi Nakamura <hisashi.nakamura.ak@renesas.com>
Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
9 years agoarm: rmobile: rcar: Add mstp_setclrbits and mstp_setclrbits_le32
Nobuhiro Iwamatsu [Tue, 2 Dec 2014 07:52:21 +0000 (16:52 +0900)]
arm: rmobile: rcar: Add mstp_setclrbits and mstp_setclrbits_le32

This addes macro for set and clear bit control for module control register.
This is used when user want to disable the function of the devices
corresponding to register.

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
9 years agoarm: rmobile: rcar: Move arch_preboot_os function to rcar-gen2-common/common.c
Nobuhiro Iwamatsu [Tue, 2 Dec 2014 07:52:20 +0000 (16:52 +0900)]
arm: rmobile: rcar: Move arch_preboot_os function to rcar-gen2-common/common.c

The arch_preboot_os function used in boards using R-Car ARM SoC (r8a7790,
r8a7791, r8a7793 and r8a7794) is common.
This makes rcar-gen2-common/common.c file providing common function for
R-Car ARM SoC, and moves this function to this file.

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
9 years agoarm: rmobile: rcar: Move control macro of mstp to arch-rmobile/rcar-mstp.h
Nobuhiro Iwamatsu [Tue, 2 Dec 2014 07:52:19 +0000 (16:52 +0900)]
arm: rmobile: rcar: Move control macro of mstp to arch-rmobile/rcar-mstp.h

Control macro of mstp is common in R-Car ARM SoC (r8a7790, r8a7791,
r8a7793 and r8a7794). This moves these to arch-rmobile/rcar-mstp.h

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
9 years agoarm: rmobile: rcar: Move module control register to header file of SoC
Nobuhiro Iwamatsu [Tue, 2 Dec 2014 07:52:18 +0000 (16:52 +0900)]
arm: rmobile: rcar: Move module control register to header file of SoC

Module control registers of R-Car ARM SoC (r8a7790, r8a7791, r8a7793 and
r8a7794) are same address. This moves these to header file of SoC.

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
9 years agoMMC SD fs boot partition config coding style and proper description
Paul Kocialkowski [Sat, 8 Nov 2014 22:14:55 +0000 (23:14 +0100)]
MMC SD fs boot partition config coding style and proper description

CONFIG_SYS_MMC_SD_FS_BOOT_PARTITION ought to be called
CONFIG_SYS_MMCSD_FS_BOOT_PARTITION to keep it consistent with other config
options such as: CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR.

In addition, it is not related to raw mode booting but to fs mode instead.

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
Reviewed-by: Tom Rini <trini@ti.com>
9 years agotwl4030: device-index-specific MMC power initializations, common ramp-up delay
Paul Kocialkowski [Sat, 8 Nov 2014 19:55:46 +0000 (20:55 +0100)]
twl4030: device-index-specific MMC power initializations, common ramp-up delay

Not every device has multiple MMC slots available, so it makes sense to enable
only the required LDOs for the available slots. Generic code in omap_hsmmc will
enable both VMMC1 and VMMC2, in doubt.

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
Reviewed-by: Tom Rini <trini@ti.com>
9 years agommc: Board-specific MMC power initializations
Paul Kocialkowski [Sat, 8 Nov 2014 19:55:45 +0000 (20:55 +0100)]
mmc: Board-specific MMC power initializations

Some devices may use non-standard combinations of regulators to power MMC:
this allows these devices to provide a board-specific MMC power init function
to set everything up in their own way.

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
Reviewed-by: Tom Rini <trini@ti.com>
9 years agobeagle_x15: add board support for Beagle x15
Felipe Balbi [Mon, 10 Nov 2014 20:02:44 +0000 (14:02 -0600)]
beagle_x15: add board support for Beagle x15

BeagleBoard-X15 is the next generation Open Source
Hardware BeagleBoard based on TI's AM5728 SoC
featuring dual core 1.5GHZ A15 processor. The
platform features 2GB DDR3L (w/dual 32bit busses),
eSATA, 3 USB3.0 ports, integrated HDMI (1920x108@60),
separate LCD port, video In port, 4GB eMMC, uSD,
Analog audio in/out, dual 1G Ethernet.

For more information, refer to:
http://www.elinux.org/Beagleboard:BeagleBoard-X15

Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
Reviewed-by: Tom Rini <trini@ti.com>
9 years agoarm: omap: add support for am57xx devices
Felipe Balbi [Thu, 6 Nov 2014 14:28:51 +0000 (08:28 -0600)]
arm: omap: add support for am57xx devices

just add a few ifdefs around because this
device is very similar to dra7xxx.

Signed-off-by: Felipe Balbi <balbi@ti.com>
Reviewed-by: Tom Rini <trini@ti.com>
9 years agoarm: omap_common: expose tps659038 and dra7xx_dplls
Felipe Balbi [Thu, 6 Nov 2014 14:28:50 +0000 (08:28 -0600)]
arm: omap_common: expose tps659038 and dra7xx_dplls

expose those two definitions so they can be
used by another board which we're adding in upcoming
patches.

Signed-off-by: Felipe Balbi <balbi@ti.com>
Reviewed-by: Tom Rini <trini@ti.com>
9 years agoarm: omap5: sdram: mark emif_get_ext_phy_ctrl_const_regs __weak
Felipe Balbi [Thu, 6 Nov 2014 14:28:49 +0000 (08:28 -0600)]
arm: omap5: sdram: mark emif_get_ext_phy_ctrl_const_regs __weak

this will allow for boards to overwrite those
in case memory setup is different.

Signed-off-by: Felipe Balbi <balbi@ti.com>
Reviewed-by: Tom Rini <trini@ti.com>
9 years agoarm: omap5: make hw_init_data weak
Felipe Balbi [Thu, 6 Nov 2014 14:28:48 +0000 (08:28 -0600)]
arm: omap5: make hw_init_data weak

this way we can let boards overwrite based
on what they need.

Signed-off-by: Felipe Balbi <balbi@ti.com>
Reviewed-by: Tom Rini <trini@ti.com>
9 years agoconfigs: omap5_common : Boot rootfs from sd card by default
Franklin S Cooper Jr [Thu, 6 Nov 2014 14:28:47 +0000 (08:28 -0600)]
configs: omap5_common : Boot rootfs from sd card by default

* Since the emmc isn't always programed trying to load the fs from the
  emmc causes boot failures/kernel panic.

* The current bootcmd is set to:
  bootcmd=run findfdt; run mmcboot;setenv mmcdev 1; setenv bootpart 1:2; \
  setenv mmcroot /dev/mmcblk0p2 rw; run mmcboot;

My guess is the env variables should be set so that sd card boot
(dt,kernel,fs) is the default and then fallback to emmc if it fails (no
sd card detected)

The current bootcmd attempts to set mmcroot to the sd card rootfs but
that code doesn't run due to mmcboot being ran early on.

Signed-off-by: Franklin Cooper Jr. <fcooper@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Reviewed-by: Tom Rini <trini@ti.com>
9 years agoarm: omap-common: emif: allow to map memory without interleaving
Felipe Balbi [Thu, 6 Nov 2014 14:28:46 +0000 (08:28 -0600)]
arm: omap-common: emif: allow to map memory without interleaving

If we want to have two sections, one on each EMIF, without
interleaving, current code wouldn't enable emif2. Fix that
problem.

Signed-off-by: Felipe Balbi <balbi@ti.com>
Reviewed-by: Tom Rini <trini@ti.com>
9 years agousb: phy: omap_usb_phy: fix build breakage
Felipe Balbi [Thu, 6 Nov 2014 14:28:45 +0000 (08:28 -0600)]
usb: phy: omap_usb_phy: fix build breakage

there's no such function usb3_phy_power(),
it's likely that author meant to call,
usb_phy_power() instead, but that's already
called properly from xhci-omap.c.

Signed-off-by: Felipe Balbi <balbi@ti.com>
Reviewed-by: Tom Rini <trini@ti.com>
9 years agoarm: dra7xx: prcm: add missing registers
Felipe Balbi [Thu, 6 Nov 2014 14:28:44 +0000 (08:28 -0600)]
arm: dra7xx: prcm: add missing registers

some boards might want to use USB1 for host,
without fiddling those registers it'll be
impossible.

Signed-off-by: Felipe Balbi <balbi@ti.com>
Reviewed-by: Tom Rini <trini@ti.com>
9 years agoarm: omap5: tps659038: rename regulator defines
Felipe Balbi [Thu, 6 Nov 2014 14:28:43 +0000 (08:28 -0600)]
arm: omap5: tps659038: rename regulator defines

Those regulators don't have any coupling with
what they supply, so remove the suffixes in order
to not confuse anybody.

Signed-off-by: Felipe Balbi <balbi@ti.com>
Reviewed-by: Tom Rini <trini@ti.com>
9 years agoarm: omap5: don't enable misc_init_r by default
Felipe Balbi [Thu, 6 Nov 2014 14:28:42 +0000 (08:28 -0600)]
arm: omap5: don't enable misc_init_r by default

Out of all OMAP5-like boards, only one of them
needs CONFIG_MISC_INIT_R, so it's best to enable
that for that particular board only, instead of
enabling for all boards unconditionally.

Signed-off-by: Felipe Balbi <balbi@ti.com>
Reviewed-by: Tom Rini <trini@ti.com>
9 years agoMerge branch 'sandbox' of git://git.denx.de/u-boot-x86
Tom Rini [Thu, 4 Dec 2014 14:24:05 +0000 (09:24 -0500)]
Merge branch 'sandbox' of git://git.denx.de/u-boot-x86

9 years agoRevert "image-fdt: boot_get_fdt() return value when no DTB exists"
Tom Rini [Wed, 3 Dec 2014 18:19:34 +0000 (13:19 -0500)]
Revert "image-fdt: boot_get_fdt() return value when no DTB exists"

It has been found that this change breaks the case of an appended device
tree file, so for the problem in question some other solution must be
found.

This reverts commit c6150aaf2f2745141a7c2ceded58d7efbfeace7d.

Reported-by: Bill Pringlemeir <bpringlemeir@nbsps.com>
Reported-by: Pantelis Antoniou <panto@antoniou-consulting.com>
Confirmed-by: Bill Pringlemeir <bpringlemeir@nbsps.com>
Signed-off-by: Tom Rini <trini@ti.com>