]> git.kernelconcepts.de Git - karo-tx-uboot.git/log
karo-tx-uboot.git
10 years agoserial: sh: Add support R8A7790
Nobuhiro Iwamatsu [Tue, 23 Jul 2013 04:58:20 +0000 (13:58 +0900)]
serial: sh: Add support R8A7790

This adds the preset value to register, and setup of baudrate.

Signed-off-by: Kouei Abe <kouei.abe.cp@renesas.com>
Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
10 years agosh: boards: Change clock definition of SCIF and TMU
Nobuhiro Iwamatsu [Wed, 21 Aug 2013 07:11:21 +0000 (16:11 +0900)]
sh: boards: Change clock definition of SCIF and TMU

This changes clock definition of SCIF from CONFIG_SYS_CLK_FREQ to
CONFIG_SH_SCIF_CLK_FREQ, and clock definition of TMU from CONFIG_SYS_CLK_FREQ to
CONFIG_SH_TMU_CLK_FREQ for boards.

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
CC: Albert Aribaud <albert.u.boot@aribaud.net>
10 years agoserial: sh: Change definition of clock of SCIF
Nobuhiro Iwamatsu [Tue, 20 Aug 2013 01:31:53 +0000 (10:31 +0900)]
serial: sh: Change definition of clock of SCIF

The former SH/SCIF driver had calculated baudrate based on CONFIG_SYS_CLK_FREQ.
The newest SH/SCIF needs calculation of the clock for SCIF.
This patch defines clock CONFIG_SH_SCIF_CLK_FREQ for SCIF and changes it to
CONFIG_SH_SCIF_CLK_FREQ from CONFIG_SYS_CLK_FREQ.

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
CC: Albert Aribaud <albert.u.boot@aribaud.net>
10 years agosh: timer: Change definition of clock of TMU
Nobuhiro Iwamatsu [Tue, 20 Aug 2013 02:40:24 +0000 (11:40 +0900)]
sh: timer: Change definition of clock of TMU

The former SH/TMU driver had calculated timer based on CONFIG_SYS_CLK_FREQ.
The newest SH/TMU newly needs calculation of the clock for TMU.
This patch defines clock CONFIG_SH_TMU_CLK_FREQ for TMU and changes it to
CONFIG_SH_TMU_CLK_FREQ from CONFIG_SYS_CLK_FREQ.

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
10 years agosh: cache: Change cache API to defines as U-Boot
Nobuhiro Iwamatsu [Wed, 21 Aug 2013 23:43:47 +0000 (08:43 +0900)]
sh: cache: Change cache API to defines as U-Boot

A chache API of SH is developped by reference in linux kernel.
And API was the same as the linux kernel.
This patch change cache API to defines as U-Boot.

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
10 years agosh: timer: Remove static global variable
Nobuhiro Iwamatsu [Tue, 20 Aug 2013 05:33:15 +0000 (14:33 +0900)]
sh: timer: Remove static global variable

"static u16 bit" is not necessary to use this as static global variable.
This patch fixes this.

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
10 years agosh: timer: Mask bit of timer prescaler
Nobuhiro Iwamatsu [Tue, 23 Jul 2013 04:57:24 +0000 (13:57 +0900)]
sh: timer: Mask bit of timer prescaler

timer_init function sets timer prescaler bit.
The previous code so did not mask this bit, this function was to overwrite
the bit. This will fix this problem.

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
10 years agoPCIe:change the method to get the address of a requested capability in configuration...
Zhao Qiang [Sat, 12 Oct 2013 05:46:33 +0000 (13:46 +0800)]
PCIe:change the method to get the address of a requested capability in configuration space.

Previously, the address of a requested capability is define like that
"#define PCI_DCR 0x78"
But, the addresses of capabilities is different with regard to PCIe revs.
So this method is not flexible.

Now a function to get the address of a requested capability is added and used.
It can get the address dynamically by capability ID.
The step of this function:
1. Read Status register in PCIe configuration space to confirm that
   Capabilities List is valid.
2. Find the address of Capabilities Pointer Register.
3. Find the address of requested capability from the first capability.

Signed-off-by: Zhao Qiang <B45475@freescale.com>
10 years agoboards/c29xpcie: Update TLB and LAW size for IFC NAND, CPLD
Prabhakar Kushwaha [Tue, 24 Sep 2013 10:28:35 +0000 (15:58 +0530)]
boards/c29xpcie: Update TLB and LAW size for IFC NAND, CPLD

 NAND,CPLD AMASK register is programmed for 64K size.

so Update TLB & LAW size accordingly.

Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com>
10 years agopowerpc/mpc85xx: Add workaround for erratum A006379
York Sun [Mon, 16 Sep 2013 19:49:31 +0000 (12:49 -0700)]
powerpc/mpc85xx: Add workaround for erratum A006379

Erratum A006379 says CPCHDBCR0 bit field [10:14] has incorrect default
value after POR. The workaround is to set this field before enabling
CPC to 0x1e.

Erratum A006379 applies to
T4240 rev 1.0
B4860 rev 1.0, 2.0

Signed-off-by: York Sun <yorksun@freescale.com>
10 years agopowerpc/p1010rdb: add p1010rdb-pb support with updating p1010rdb-pa
Shengzhou Liu [Fri, 13 Sep 2013 06:46:03 +0000 (14:46 +0800)]
powerpc/p1010rdb: add p1010rdb-pb support with updating p1010rdb-pa

- Rename old P1010RDB board as P1010RDB-PA.
- Add support for new P1010RDB-PB board.
- Some optimization.

For more details, see board/freescale/p1010rdb/README.

Signed-off-by: Shengzhou Liu <Shengzhou.Liu@freescale.com>
[York Sun: fix conflicts in boards.cfg]
Acked-by: York Sun <yorksun@freescale.com>
10 years agoboard/p1010rdb: add pin mux and sdhc support in any boot
Shengzhou Liu [Fri, 13 Sep 2013 06:46:02 +0000 (14:46 +0800)]
board/p1010rdb: add pin mux and sdhc support in any boot

Since pins multiplexing, SDHC shares signals with IFC, with this patch:
To enable SDHC in case of NOR/NAND/SPI boot
   a) For temporary use case in runtime without reboot system
      run 'mux sdhc' in u-boot to validate SDHC with invalidating IFC.
   b) For long-term use case
      set 'esdhc' in hwconfig and save it.
To enable IFC in case of SD boot
   a) For temporary use case in runtime without reboot system
      run 'mux ifc' in u-boot to validate IFC with invalidating SDHC.
   b) For long-term use case
      set 'ifc' in hwconfig and save it.

Signed-off-by: Shengzhou Liu <Shengzhou.Liu@freescale.com>
10 years agopowerpc/eeprom: update MAX_NUM_PORTS to adapt non-256-bytes EEPROM
Shengzhou Liu [Fri, 13 Sep 2013 06:46:01 +0000 (14:46 +0800)]
powerpc/eeprom: update MAX_NUM_PORTS to adapt non-256-bytes EEPROM

Some boards use System EEPROM with 128-bytes instead of 256-bytes.
Since we regard 256-bytes EEPROM as standard EEPROM with default
value for MAX_NUM_PORTS. For those non-256-bytes EEPROM, we can
redefine MAX_NUM_PORTS in board-specific file to override the
default MAX_NUM_PORTS.

This patch doesn't impact on previous existing boards.

Signed-off-by: Shengzhou Liu <Shengzhou.Liu@freescale.com>
10 years agopowerpc/p1010rdb: remove unused cpld_show
Shengzhou Liu [Fri, 13 Sep 2013 06:46:00 +0000 (14:46 +0800)]
powerpc/p1010rdb: remove unused cpld_show

Function cpld_show() was for debug and not called, so clean it.

Signed-off-by: Shengzhou Liu <Shengzhou.Liu@freescale.com>
10 years agopowerpc/t1040qds: Add T1040QDS board
Prabhakar Kushwaha [Thu, 12 Sep 2013 05:41:28 +0000 (11:11 +0530)]
powerpc/t1040qds: Add T1040QDS board

T1040QDS is a high-performance computing evaluation, development and
test platform supporting the T1040 QorIQ Power Architecture™ processor.

 T1040QDS board Overview
 -----------------------
 - Four e5500 cores, each with a private 256 KB L2 cache
 - 256 KB shared L3 CoreNet platform cache (CPC)
 - Interconnect CoreNet platform
 - 32-/64-bit DDR3L/DDR4 SDRAM memory controller with ECC and interleaving
   support
 - Data Path Acceleration Architecture (DPAA) incorporating acceleration
 for the following functions:
    -  Packet parsing, classification, and distribution
    -  Queue management for scheduling, packet sequencing, and congestion
     management
    -  Cryptography Acceleration
    - RegEx Pattern Matching Acceleration
    - IEEE Std 1588 support
    - Hardware buffer management for buffer allocation and deallocation
 - Ethernet interfaces
    - Integrated 8-port Gigabit Ethernet switch
    - Four 1 Gbps Ethernet controllers
 - SERDES Connections, 8 lanes supporting:
      — PCI Express: supporting Gen 1 and Gen 2;
      — SGMII
      — QSGMII
      — SATA 2.0
      — Aurora debug with dedicated connectors
 - DDR Controller 32-/64-bit DDR3L/DDR4 SDRAM memory controller with ECC and
   Interleaving
 -IFC/Local Bus
     - NAND flash: 8-bit, async, up to 2GB.
     - NOR: 8-bit or 16-bit, non-multiplexed, up to 512MB
     - GASIC: Simple (minimal) target within Qixis FPGA
     - PromJET rapid memory download support
 - Ethernet
     - Two on-board RGMII 10/100/1G ethernet ports.
     - PHY #0 remains powered up during deep-sleep
 - QIXIS System Logic FPGA
 - Clocks
     - System and DDR clock (SYSCLK, “DDRCLK”)
     - SERDES clocks
 - Power Supplies
 - Video
     - DIU supports video at up to 1280x1024x32bpp
 - USB
     - Supports two USB 2.0 ports with integrated PHYs
     — Two type A ports with 5V@1.5A per port.
     — Second port can be converted to OTG mini-AB
 - SDHC
     - SDHC port connects directly to an adapter card slot, featuring:
     - Supporting SD slots for: SD, SDHC (1x, 4x, 8x) and/or MMC
     — Supporting eMMC memory devices
 - SPI
    -  On-board support of 3 different devices and sizes
 - Other IO
    - Two Serial ports
    - ProfiBus port
    - Four I2C ports

Signed-off-by: Poonam Aggrwal <poonam.aggrwal@freescale.com>
Signed-off-by: Priyanka Jain <Priyanka.Jain@freescale.com>
Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com>
[York Sun: fix conflict in boards.cfg]
Acked-by-by: York Sun <yorksun@freescale.com>
10 years agopowerpc: Fix CamelCase warnings in DDR related code
Priyanka Jain [Wed, 25 Sep 2013 05:11:19 +0000 (10:41 +0530)]
powerpc: Fix CamelCase warnings in DDR related code

Some DDR related structures present in fsl_ddr_dimm_params.h, fsl_ddr_sdram.h, ddr_spd.h
has various parameters with embedded acronyms capitalized that trigger the CamelCase
warning in checkpatch.pl

Convert those variable names to smallcase naming convention and modify all files
which are using these structures with modified structures.

Signed-off-by: Priyanka Jain <Priyanka.Jain@freescale.com>
10 years agopowerpc/tool/pbl: fix pbl image compiling process
Shaohui Xie [Wed, 11 Sep 2013 06:48:29 +0000 (14:48 +0800)]
powerpc/tool/pbl: fix pbl image compiling process

Previous process of compiling a PBL boot image is:
1: make <board_name_config>
2: make u-boot.pbl

for example:
make T4240QDS_SDCARD_config
make u-boot.pbl

Now the process is:
1: make <board_name>

for example:
make T4240QDS_SDCARD

Also, updated README.pblimage.

Signed-off-by: Shaohui Xie <Shaohui.Xie@freescale.com>
10 years agopowerpc/B4860: enable PBL tool for B4860
Shaohui Xie [Sun, 22 Sep 2013 01:56:02 +0000 (09:56 +0800)]
powerpc/B4860: enable PBL tool for B4860

Use a default RCW of protocol 0x2A_0x98, and a PBI configure file which
uses CPC1 as 512KB SRAM, then PBL tool can be used on B4860 to build a
pbl boot image.

Signed-off-by: Shaohui Xie <Shaohui.Xie@freescale.com>
10 years agopowerpc/t4240: updated rcw_cfg to align with default hardware configuration
Shaohui Xie [Wed, 11 Sep 2013 04:58:34 +0000 (12:58 +0800)]
powerpc/t4240: updated rcw_cfg to align with default hardware configuration

Default configuration has been changed, the most important one is DDR
ref_clock which is changed from 66.67MHz to 133.33MHz. so the ratio need to
change from 24x to 12x to keep the DDR frequency. There are also some
other optimise to align with default configuration.

Signed-off-by: Shaohui Xie <Shaohui.Xie@freescale.com>
10 years agopowerpc/usb: Mention usb1 before usb2 inside default hwconfig string
ramneek mehresh [Tue, 10 Sep 2013 12:07:45 +0000 (17:37 +0530)]
powerpc/usb: Mention usb1 before usb2 inside default hwconfig string

For USB device-tree fix-up to work properly, its necessary to
mention USB1 options before that of USB2 inside default hwconfig
string

Signed-off-by: Ramneek Mehresh <ramneek.mehresh@freescale.com>
10 years agoboard/bsc9131rdb: Update IFC timings for NAND flash
Prabhakar Kushwaha [Tue, 10 Sep 2013 12:03:12 +0000 (17:33 +0530)]
board/bsc9131rdb: Update IFC timings for NAND flash

Current IFC timings for NAND flash are not able to support existing
K9F1G08U0B and new K9F1G08U0D flash.

so Update the timings to support both.

Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com>
10 years agopowerpc: p1_p2_rdb_pc: add TPL for p1_p2_rdb_pc nand boot
Ying Zhang [Fri, 6 Sep 2013 09:30:58 +0000 (17:30 +0800)]
powerpc: p1_p2_rdb_pc: add TPL for p1_p2_rdb_pc nand boot

Enable TPL for p1_p2_rdb_pc nand boot.

Signed-off-by: Ying Zhang <b40530@freescale.com>
10 years agopowerpc : p1_p2_rdb_pc : Enable p1_p2_rdb_pc to start from eSPI with SPL
Ying Zhang [Fri, 6 Sep 2013 09:30:57 +0000 (17:30 +0800)]
powerpc : p1_p2_rdb_pc : Enable p1_p2_rdb_pc to start from eSPI with SPL

Enable p1_p2_rdb_pc to start from eSPI with SPL.

Signed-off-by: Ying Zhang <b40530@freescale.com>
10 years agopowerpc: p1_p2_rdb_pc: Enable p1_p2_rdb_pc to boot from SD Card with SPL
Ying Zhang [Fri, 6 Sep 2013 09:30:56 +0000 (17:30 +0800)]
powerpc: p1_p2_rdb_pc: Enable p1_p2_rdb_pc to boot from SD Card with SPL

Enable p1_p2_rdb_pc to start from eSDHC with SPL.

Signed-off-by: Ying Zhang <b40530@freescale.com>
10 years agoSGMII:fix PHY addresses for QSGMII Riser Card working in SGMII mode
Zhao Qiang [Wed, 4 Sep 2013 02:11:27 +0000 (10:11 +0800)]
SGMII:fix PHY addresses for QSGMII Riser Card working in SGMII mode

Fix PHY addresses for QSGMII Riser Card working in
SGMII mode on board P3041/P5020/P4080/P5040/B4860.

QSGMII Riser Card can work in SGMII mode, but
having the different PHY addresses.
So the following steps should be done:
1. Confirm whether QSGMII Riser Card is used.
2. If yes, set the proper PHY address.
Generally, the function is_qsgmii_riser_card() is
for step 1, and set_sgmii_phy() for step 2.

However, there are still some special situations,
take P5040 and B4860 as examples, the PHY addresses
need to be changed when serdes protocol is changed,
so it is necessary to confirm the protocol before
setting PHY addresses.

Signed-off-by: Zhao Qiang <B45475@freescale.com>
10 years agoCorenet/p5040/SGMII:fix the problem for SGMII5/6
Zhao Qiang [Wed, 4 Sep 2013 02:11:26 +0000 (10:11 +0800)]
Corenet/p5040/SGMII:fix the problem for SGMII5/6

SGMII5/6 and SGMII7/8 are not on the same slot on P5040
according to the serdes protocol.
So it is not proper to organize SGMII5/6 and SGMII7/8
on one bus and SGMII5/6 can't work.
So a new bus SUPER_HYDRA_FM3_SGMII_MDIO is added for
SGMII5/6

Signed-off-by: Zhao Qiang <B45475@freescale.com>
10 years agopowerpc/mpc85xx:Avoid fix clk groups for Cluster & HW accelerator
Prabhakar Kushwaha [Tue, 3 Sep 2013 05:50:15 +0000 (11:20 +0530)]
powerpc/mpc85xx:Avoid fix clk groups for Cluster & HW accelerator

CHASSIS2 architecture never fix clock groups for Cluster and hardware
  accelerator like PME, FMA. These are SoC defined. SoC defines :-
    - NUM of PLLs present in the system
    - Clusters and their Clock group
    - hardware accelerator and their clock group
      if no clock group, then platform clock divider for FMAN, PME

Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com>
10 years agopowerpc/mpc85xx:Update processor defines for T1040
Prabhakar Kushwaha [Tue, 3 Sep 2013 05:49:54 +0000 (11:19 +0530)]
powerpc/mpc85xx:Update processor defines for T1040

T1040 SoC has
    - DDR controller ver 5.0
    - 2 PLLs
    - 8 IFC Chip select
    - FMAN Muram 192K
    - No Srio
    - Sec controller ver 5.0
    - Max CPU update for its personalities

So, update the defines accordingly.

Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com>
10 years agopowerpc/mpc85xx:Make L2 cache type independent of CHASSIS2
Prabhakar Kushwaha [Thu, 29 Aug 2013 07:40:38 +0000 (13:10 +0530)]
powerpc/mpc85xx:Make L2 cache type independent of CHASSIS2

CHASSIS2 architecture never defines type of L2 cache present in SoC.
 it is dependent upon the core present in the SoC.
 for example,
    - e6500 core has L2 cluster (Kibo)
    - e5500 core has Backside L2 Cache

Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com>
10 years agopowerpc/c29xpcie: modify DDR parameter to make DDR more stable
Po Liu [Wed, 21 Aug 2013 06:23:42 +0000 (14:23 +0800)]
powerpc/c29xpcie: modify DDR parameter to make DDR more stable

DDR parameters clk_adjust were changed. This can make the DDR
run more stable. The new value were gotten by the DDR testing
tool.

Signed-off-by: Po Liu <Po.Liu@freescale.com>
10 years agopowerpc:c29xpcie: make ifc timing parameter flexible
Po Liu [Wed, 21 Aug 2013 06:22:18 +0000 (14:22 +0800)]
powerpc:c29xpcie: make ifc timing parameter flexible

This patch re-config the NOR flash timing parameters which could make
the ifc timing more flexible for NOR flash.
The new parameters could fix the problem of hanging at "Flash:"
occasionally when booting the board.

Signed-off-by: Po Liu <Po.Liu@freescale.com>
10 years agopowerpc: add CONFIG_SECURE_BOOT condition into fsl_secure_boot.h
Po Liu [Wed, 21 Aug 2013 06:20:21 +0000 (14:20 +0800)]
powerpc: add CONFIG_SECURE_BOOT condition into fsl_secure_boot.h

This patch is for board config file not to add CONFIG_SECURE_BOOT
condition for include the asm/fsl_secure_boot.h.

Signed-off-by: Po Liu <Po.Liu@freescale.com>
10 years agoPrepare v2013.10 v2013.10
Tom Rini [Wed, 16 Oct 2013 17:08:12 +0000 (13:08 -0400)]
Prepare v2013.10

Signed-off-by: Tom Rini <trini@ti.com>
10 years agomicroblaze: Fix watchdog initialization
Michal Simek [Wed, 16 Oct 2013 07:06:32 +0000 (09:06 +0200)]
microblaze: Fix watchdog initialization

The patch:
"blackfin: Move blackfin watchdog driver out of the blackfin arch folder."
(sha1: e9a389a18477c1c57a0b30e9ea8f4d38c6e26e63)
changed hw_watchdog_init() prototype which didn't match
with Microblaze one.
This patch fixes the driver and Microblaze initialization.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
10 years agocommon: fsl: Fix broken SPDX-License-Identifier change
Michal Simek [Wed, 16 Oct 2013 07:06:31 +0000 (09:06 +0200)]
common: fsl: Fix broken SPDX-License-Identifier change

This bug was introduced by:
"Add GPL-2.0+ SPDX-License-Identifier to source files"
(sha1: 1a4596601fd395f3afb8f82f3f840c5e00bdd57a)

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
10 years agomtd: fix warnings due to 64-bit partition support
Scott Wood [Tue, 15 Oct 2013 22:41:27 +0000 (17:41 -0500)]
mtd: fix warnings due to 64-bit partition support

commit 39ac34473f3c96e77cbe03a49141771ed1639486 ("cmd_mtdparts: use 64
bits for flash size, partition size & offset") introduced warnings
in a couple places due to printf formats or pointer casting.

This patch fixes the warnings pointed out here:
http://lists.denx.de/pipermail/u-boot/2013-October/164981.html

Signed-off-by: Scott Wood <scottwood@freescale.com>
Cc: York Sun <yorksun@freescale.com>
Cc: Stefan Roese <sr@denx.de>
Cc: Paul Burton <paul.burton@imgtec.com>
Cc: Tom Rini <trini@ti.com>
10 years agospi: mxc_spi: Fix double incrementing read pointer for unaligned buffers
Timo Herbrecher [Tue, 15 Oct 2013 18:35:09 +0000 (00:05 +0530)]
spi: mxc_spi: Fix double incrementing read pointer for unaligned buffers

If dout buffer is not 32 bit-aligned or data to transmit is not multiple
of 32 bit the read data pointer is already incremented on single byte reads.

Signed-off-by: Timo Herbrecher <t.herbrecher@gateware.de>
Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
10 years agosf: probe: Add missing Atmel at25df321 flash
Bo Shen [Thu, 10 Oct 2013 05:07:37 +0000 (13:07 +0800)]
sf: probe: Add missing Atmel at25df321 flash

As the spi flash transfer to multiple parts, it is forgot to add
Atmel AT25DF321 spi flash support, which broken several Atmel EK
boards which this chip. So, add it

Signed-off-by: Bo Shen <voice.shen@atmel.com>
Reviewed-by: Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>
10 years agospi: Add GPL-2.0+ SPDX-License-Identifier for missing files
Jagannadha Sutradharudu Teki [Mon, 14 Oct 2013 08:01:24 +0000 (13:31 +0530)]
spi: Add GPL-2.0+ SPDX-License-Identifier for missing files

Added GPL-2.0+ SPDX-License-Identifier for missed spi
source files.

Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
10 years agosf: Add GPL-2.0+ SPDX-License-Identifier for missing ones
Jagannadha Sutradharudu Teki [Thu, 10 Oct 2013 17:02:55 +0000 (22:32 +0530)]
sf: Add GPL-2.0+ SPDX-License-Identifier for missing ones

Added GPL-2.0+ SPDX-License-Identifier for missed sf
source files.

Signed-off-by: Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>
Signed-off-by: Bo Shen <voice.shen@atmel.com>
10 years agosf: Minor cleanups.
Jagannadha Sutradharudu Teki [Thu, 10 Oct 2013 16:44:09 +0000 (22:14 +0530)]
sf: Minor cleanups.

- Add comments.
- Renamed few macros.
- Add tabs.

Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
Signed-off-by: Bo Shen <voice.shen@atmel.com>
10 years agosf_ops: Unify bank_sel calculation code
Jagannadha Sutradharudu Teki [Tue, 8 Oct 2013 17:56:47 +0000 (23:26 +0530)]
sf_ops: Unify bank_sel calculation code

Unified the bank_sel calculation code for erase and
write ops.

Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
10 years agobuildman: Use env to pick the python from $PATH
Jagannadha Sutradharudu Teki [Sat, 28 Sep 2013 17:38:14 +0000 (23:08 +0530)]
buildman: Use env to pick the python from $PATH

python used in buildman doesn't need to be placed in
/usr/bin/python, So use env to ensure that the interpreter
will pick the python from environment.

Usefull with several versions of python's installed on system.

Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
Acked-by: Simon Glass <sjg@chromium.org>
10 years agoMerge branch 'buildman' of git://git.denx.de/u-boot-x86
Tom Rini [Tue, 15 Oct 2013 00:19:56 +0000 (20:19 -0400)]
Merge branch 'buildman' of git://git.denx.de/u-boot-x86

10 years agocmd_sandbox.c: Update for do_(load|save) not taking a number base
Tom Rini [Thu, 10 Oct 2013 14:46:22 +0000 (10:46 -0400)]
cmd_sandbox.c: Update for do_(load|save) not taking a number base

Signed-off-by: Tom Rini <trini@ti.com>
10 years agoPrevent null pointer dereference originating in cmd_pxe.c
Steven Falco [Mon, 7 Oct 2013 13:51:48 +0000 (09:51 -0400)]
Prevent null pointer dereference originating in cmd_pxe.c

Pass a valid cmdtp into do_tftpb(), do_ext2load(), and do_get_fat(), to
avoid possible crashes due to null pointer dereferencing.

Commit d7884e047d08447dfd1374e9fa2fdf7ab36e56f5 does not go far enough.
There is still at least one call chain that can result in a crash.

The do_tftpb(), do_ext2load(), and do_get_fat() functions expect a valid
cmdtp.  Passing in NULL is particularly bad in the do_tftpb() case,
because eventually boot_get_kernel() will be called with a NULL cmdtp:

do_tftpb() -> netboot_common() -> bootm_maybe_autostart() -> do_bootm()
-> do_bootm_states() -> bootm_find_os() -> boot_get_kernel()

Around line 991 in cmd_bootm.c, boot_get_kernel() will dereference the
null pointer, and the board will crash.

Signed-off-by: Steven A. Falco <stevenfalco@gmail.com>
10 years agoCoding Style cleanup: drop some excessive empty lines
Wolfgang Denk [Fri, 4 Oct 2013 15:43:26 +0000 (17:43 +0200)]
Coding Style cleanup: drop some excessive empty lines

Signed-off-by: Wolfgang Denk <wd@denx.de>
10 years agoCoding Style cleanup: remove trailing empty lines
Wolfgang Denk [Fri, 4 Oct 2013 15:43:25 +0000 (17:43 +0200)]
Coding Style cleanup: remove trailing empty lines

Signed-off-by: Wolfgang Denk <wd@denx.de>
10 years agoCoding Style cleanup: replace leading SPACEs by TABs
Wolfgang Denk [Fri, 4 Oct 2013 15:43:24 +0000 (17:43 +0200)]
Coding Style cleanup: replace leading SPACEs by TABs

Signed-off-by: Wolfgang Denk <wd@denx.de>
[trini: Drop changes for PEP 4 following python tools]
Signed-off-by: Tom Rini <trini@ti.com>
10 years agoCoding Style cleanup: remove trailing white space
Wolfgang Denk [Mon, 7 Oct 2013 11:07:26 +0000 (13:07 +0200)]
Coding Style cleanup: remove trailing white space

Signed-off-by: Wolfgang Denk <wd@denx.de>
10 years agoARM: omap4-panda: Add MAC address creation for panda
Dan Murphy [Thu, 10 Oct 2013 13:54:23 +0000 (08:54 -0500)]
ARM: omap4-panda: Add MAC address creation for panda

Add a MAC address create based on the OMAP die ID registers.
Then poplulate the ethaddr enviroment variable so that the device
tree alias can be updated prior to boot.

Signed-off-by: Dan Murphy <dmurphy@ti.com>
10 years agopmic: max77686: fix the wrong offset
Jaehoon Chung [Mon, 30 Sep 2013 05:23:37 +0000 (14:23 +0900)]
pmic: max77686: fix the wrong offset

0x1D is reserved. So BUCK3DVS1 is started from 0x1e.

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
10 years agoenv_mmc: fix buffer allocation for armv7
Markus Niebel [Fri, 4 Oct 2013 13:48:03 +0000 (15:48 +0200)]
env_mmc: fix buffer allocation for armv7

commit d196bd880347373237d73e0d115b4d51c68cf2ad adds
redundand environment to mmc. The usage of malloc in
env_relocate_spec triggers cache errors on armv7.

Tested on a not mainlined i.MX53 board:

Board: TQMa53
I2C:   ready
DRAM:  512 MiB
MMC:   FSL_SDHC: 0, FSL_SDHC: 1
ERROR: v7_dcache_inval_range - start address is not aligned - 0x8f57c2d8
ERROR: v7_dcache_inval_range - stop address is not aligned - 0x8f57e2d8
ERROR: v7_dcache_inval_range - start address is not aligned - 0x8f57e2e0
ERROR: v7_dcache_inval_range - stop address is not aligned - 0x8f5802e0
Using default environment

Signed-off-by: Markus Niebel <Markus.Niebel@tqs.de>
10 years agoenv: dataflash: fix env_init issue
Bo Shen [Tue, 8 Oct 2013 08:30:21 +0000 (16:30 +0800)]
env: dataflash: fix env_init issue

As the SPI controller is not initialized before env_init(), it causes
reading env in dataflash failed. So, although saveenv() successfully,
it shows warning information when reboot the system as following:

  *** Warning - bad CRC, using default environment

Let the env_relocate() to check env CRC and import it.

Signed-off-by: Bo Shen <voice.shen@atmel.com>
10 years agoARM: omap4: Update sdram setting for panda rev A6
Dan Murphy [Wed, 9 Oct 2013 18:53:58 +0000 (13:53 -0500)]
ARM: omap4: Update sdram setting for panda rev A6

OMAP4 panda rev A6 is a 4430 es2.3 IC with an updated memory
part.

The panda rev A6 uses Elpida 2x4Gb memory and no longer uses Micron
so the timings needs to be updated

Signed-off-by: Dan Murphy <dmurphy@ti.com>
10 years agoam335x_evm.h: Make 'am335x_boneblack' use redundant environment
Tom Rini [Thu, 10 Oct 2013 14:25:18 +0000 (10:25 -0400)]
am335x_evm.h: Make 'am335x_boneblack' use redundant environment

Signed-off-by: Tom Rini <trini@ti.com>
10 years ago.gitignore: add auto-generated /include/[s|t]pl-autoconf.mk
Daniel Schwierzeck [Sun, 13 Oct 2013 15:08:02 +0000 (17:08 +0200)]
.gitignore: add auto-generated /include/[s|t]pl-autoconf.mk

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
10 years agoSPDX: document dual license notation
Wolfgang Denk [Tue, 8 Oct 2013 19:53:45 +0000 (21:53 +0200)]
SPDX: document dual license notation

In [1] we discussed how we should deal with dual (or, more generally,
multiple) licensed files.  Add this to  Licenses/README  so it's
properly documented.

[1] http://thread.gmane.org/gmane.comp.boot-loaders.u-boot/166518

Signed-off-by: Wolfgang Denk <wd@denx.de>
[trini: Add the word 'list' to the end of the line, per Stephen Warren's
feedback]
Signed-off-by: Tom Rini <trini@ti.com>
10 years agoMerge branch 'master' of git://git.denx.de/u-boot-arm
Tom Rini [Mon, 14 Oct 2013 15:20:32 +0000 (11:20 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-arm

10 years agoMerge branch 'master' of git://git.denx.de/u-boot-nand-flash
Tom Rini [Mon, 14 Oct 2013 13:37:51 +0000 (09:37 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-nand-flash

10 years agoMerge branch 'u-boot-samsung/master' into 'u-boot-arm/master'
Albert ARIBAUD [Fri, 11 Oct 2013 12:47:25 +0000 (14:47 +0200)]
Merge branch 'u-boot-samsung/master' into 'u-boot-arm/master'

10 years agobuildman: don't fail --list-toolchains when toolchains fail
Stephen Warren [Wed, 9 Oct 2013 20:28:09 +0000 (14:28 -0600)]
buildman: don't fail --list-toolchains when toolchains fail

When a toolchain invocation fails, an exception is thrown but not caught
which then aborts the entire toolchain detection process. To solve this,
request that exceptions not be thrown, since the toolchain init code
already error-checks the command result. This solves e.g.:

         - found '/usr/bin/winegcc'
Traceback (most recent call last):
...
Exception: Error running '/usr/bin/winegcc --version'

Change-Id: I579c72ab3b021e38b14132893c3375ea257c74f0
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
(formatted to 80cols)

10 years agousb: Prevent using reserved registers on DM36x usb
Andrew Murray [Sun, 29 Sep 2013 17:02:22 +0000 (18:02 +0100)]
usb: Prevent using reserved registers on DM36x usb

The musb driver defines and uses MUSB_CSR0_H_DIS_PING, however this
bit is reserved on the DM36x. Thus this patch ensures that the
reserved bit is not accesssed.

It has been observed that some USB devices will fail to enumerate
with errors such as 'error in inquiry' without this patch.

See http://www.ti.com/litv/pdf/sprufh9a for details.

Cc: Marek Vasut <marex@denx.de>
Cc: Tom Rini <trini@ti.com>
Signed-off-by: Andrew Murray <amurray@embedded-bits.co.uk>
Acked-by: Marek Vasut <marex@denx.de>
10 years agoomap5_common: Re-work mmc boot to try SD and eMMC, correct root device
Tom Rini [Wed, 9 Oct 2013 14:59:33 +0000 (10:59 -0400)]
omap5_common: Re-work mmc boot to try SD and eMMC, correct root device

OMAP5 boards may have both eMMC (on MMC2) and an SD slot (on MMC1).  We
Update the default bootcmd to match what happens on AM335x where we try
SD first, and then eMMC.  In this case however, the hardware layout used
for powering both of these means that in the kernel eMMC shall be found
first as it is powered by a fixed regulator and SD found second as SD is
powered via the palmas which will result in deferred probing.

Tested-by: Aparna Balasubramanian <aparnab@ti.com>
Signed-off-by: Tom Rini <trini@ti.com>
10 years agocmd_ubi: add write.part command, to write a volume in multiple parts
Paul Burton [Wed, 4 Sep 2013 14:16:59 +0000 (15:16 +0100)]
cmd_ubi: add write.part command, to write a volume in multiple parts

This allows you to write data to an UBI volume when the amount of memory
available to write that data from is less than the total size of the
data. For example, you may split a root filesystem UBIFS image into
parts, provide the total size of the image to the first write.part
command and then use multiple write.part commands to write the
subsequent parts of the volume. This results in a sequence of commands
akin to:

  ext4load mmc 0:1 0x80000000 rootfs.ubifs.0
  ubi write.part 0x80000000 root 0x08000000 0x18000000
  ext4load mmc 0:1 0x80000000 rootfs.ubifs.1
  ubi write.part 0x80000000 root 0x08000000
  ext4load mmc 0:1 0x80000000 rootfs.ubifs.2
  ubi write.part 0x80000000 root 0x08000000

This would write 384MiB of data to the UBI volume 'root' whilst only
requiring 128MiB of said data to be held in memory at a time.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Acked-by: Stefan Roese <sr@denx.de>
10 years agocmd_ubi: use int64_t volume size for 'ubi create'
Paul Burton [Wed, 4 Sep 2013 14:16:58 +0000 (15:16 +0100)]
cmd_ubi: use int64_t volume size for 'ubi create'

int64_t matches the bytes field in struct ubi_mkvol_req to which the
size is assigned. With the prior signed 32 bit integer, volumes were
restricted to being less than 2GiB in size.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Acked-by: Stefan Roese <sr@denx.de>
10 years agocmd_mtdparts: use 64 bits for flash size, partition size & offset
Paul Burton [Wed, 4 Sep 2013 14:16:57 +0000 (15:16 +0100)]
cmd_mtdparts: use 64 bits for flash size, partition size & offset

This matches the 64 bit size in struct mtd_info and allows the mtdparts
command to function correctly with a flash >= 4GiB. Format specifiers
for size & offset are given the ll length, matching its use in
drivers/mtd in absence of something like inttypes.h/PRIx64.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Acked-by: Stefan Roese <sr@denx.de>
10 years agomtd: driver _read() returns max_bitflips; mtd_read() returns -EUCLEAN
Paul Burton [Wed, 4 Sep 2013 14:16:56 +0000 (15:16 +0100)]
mtd: driver _read() returns max_bitflips; mtd_read() returns -EUCLEAN

Linux modified the MTD driver interface in commit edbc4540 (with the
same name as this commit). The effect is that calls to mtd_read will
not return -EUCLEAN if the number of ECC-corrected bit errors is below
a certain threshold, which defaults to the strength of the ECC. This
allows -EUCLEAN to stop indicating "some bits were corrected" and begin
indicating "a large number of bits were corrected, the data held in
this region of flash may be lost soon". UBI makes use of this and when
-EUCLEAN is returned from mtd_read it will move data to another block
of flash. Without adopting this interface change UBI on U-boot attempts
to move data between blocks every time a single bit is corrected using
the ECC, which is a very common occurance on some devices.

For some devices where bit errors are common enough, UBI can get stuck
constantly moving data around because each block it attempts to use has
a single bit error. This condition is hit when wear_leveling_worker
attempts to move data from one PEB to another in response to an
-EUCLEAN/UBI_IO_BITFLIPS error. When this happens ubi_eba_copy_leb is
called to perform the data copy, and after the data is written it is
read back to check its validity. If that read returns UBI_IO_BITFLIPS
(in response to an MTD -EUCLEAN) then ubi_eba_copy_leb returns 1 to
wear_leveling worker, which then proceeds to schedule the destination
PEB for erasure. This leads to erase_worker running on the PEB, and
following a successful erase wear_leveling_worker is called which
begins this whole cycle all over again. The end result is that (without
UBI debug output enabled) the boot appears to simply hang whilst in
reality U-boot busily works away at destroying a block of the NAND
flash. Debug output from this situation:

  UBI DBG: ensure_wear_leveling: schedule scrubbing
  UBI DBG: wear_leveling_worker: scrub PEB 1027 to PEB 4083
  UBI DBG: ubi_io_read_vid_hdr: read VID header from PEB 1027
  UBI DBG: ubi_io_read: read 4096 bytes from PEB 1027:4096
  UBI DBG: ubi_eba_copy_leb: copy LEB 0:0, PEB 1027 to PEB 4083
  UBI DBG: ubi_eba_copy_leb: read 1040384 bytes of data
  UBI DBG: ubi_io_read: read 1040384 bytes from PEB 1027:8192
  UBI: fixable bit-flip detected at PEB 1027
  UBI DBG: ubi_io_write_vid_hdr: write VID header to PEB 4083
  UBI DBG: ubi_io_write: write 4096 bytes to PEB 4083:4096
  UBI DBG: ubi_io_read_vid_hdr: read VID header from PEB 4083
  UBI DBG: ubi_io_read: read 4096 bytes from PEB 4083:4096
  UBI DBG: ubi_io_write: write 4096 bytes to PEB 4083:8192
  UBI DBG: ubi_io_read: read 4096 bytes from PEB 4083:8192
  UBI: fixable bit-flip detected at PEB 4083
  UBI DBG: schedule_erase: schedule erasure of PEB 4083, EC 55, torture 0
  UBI DBG: erase_worker: erase PEB 4083 EC 55
  UBI DBG: sync_erase: erase PEB 4083, old EC 55
  UBI DBG: do_sync_erase: erase PEB 4083
  UBI DBG: sync_erase: erased PEB 4083, new EC 56
  UBI DBG: ubi_io_write_ec_hdr: write EC header to PEB 4083
  UBI DBG: ubi_io_write: write 4096 bytes to PEB 4083:0
  UBI DBG: ensure_wear_leveling: schedule scrubbing
  UBI DBG: wear_leveling_worker: scrub PEB 1027 to PEB 4083
  ...

This patch adopts the interface change as in Linux commit edbc4540 in
order to avoid such situations. Given that none of the drivers under
drivers/mtd return -EUCLEAN, this should only affect those using
software ECC. I have tested that it works on a board which is
currently out of tree, but which I hope to be able to begin
upstreaming soon.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Acked-by: Stefan Roese <sr@denx.de>
10 years agokm/scripts: fix ramfs
Andreas Huber [Thu, 4 Jul 2013 13:37:34 +0000 (15:37 +0200)]
km/scripts: fix ramfs

'actual_bank' is not used anymore, instead boot_bank is used.

Signed-off-by: Andreas Huber <andreas.huber@keymile.com>
10 years agopowerpc/km: drop unused CONFIG_SYS_DTT_LOW_TEMP
Holger Brunck [Thu, 4 Jul 2013 13:37:33 +0000 (15:37 +0200)]
powerpc/km: drop unused CONFIG_SYS_DTT_LOW_TEMP

This define is not used in u-boot code, we can drop this define safely.

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
10 years agokm/common: switch on CMD_GREPENV
Holger Brunck [Thu, 4 Jul 2013 13:37:32 +0000 (15:37 +0200)]
km/common: switch on CMD_GREPENV

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
10 years agopowerpc/83xx: remove staticness for qe_iop_conf_tab
Holger Brunck [Thu, 4 Jul 2013 13:37:31 +0000 (15:37 +0200)]
powerpc/83xx: remove staticness for qe_iop_conf_tab

commit a5510058 powerpc/83xx/km: make local functions and structs static

removed the staticness also from this struct. But this struct is needed
in arch/powerpc/cpu/mpc83xx/cpu_init.c and declared as extern.

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
10 years agoMerge branch 'next' of git://git.denx.de/u-boot-mpc83xx
Tom Rini [Wed, 9 Oct 2013 14:06:40 +0000 (10:06 -0400)]
Merge branch 'next' of git://git.denx.de/u-boot-mpc83xx

10 years agoda850evm.h: Always set CONFIG_CMD_SF, move to by CONFIG_SPI_FLASH
Tom Rini [Tue, 8 Oct 2013 19:08:38 +0000 (15:08 -0400)]
da850evm.h: Always set CONFIG_CMD_SF, move to by CONFIG_SPI_FLASH

When we have CONFIG_SPI_FLASH set we now require CONFIG_CMD_SF.

Signed-off-by: Tom Rini <trini@ti.com>
10 years agoRevert "am335x_evm.h: If mmcdev and bootpart switch to mmcdev 1, so should mmcroot."
Tom Rini [Tue, 8 Oct 2013 15:09:17 +0000 (11:09 -0400)]
Revert "am335x_evm.h: If mmcdev and bootpart switch to mmcdev 1, so should mmcroot."

Upon further inspection and review and chatting with kernel folks, what
happens here is that what mmcblk# a device gets is based on probe order.
So a system with an SD card inserted with place eMMC on mmcblk1, but
without an SD card, it will be on mmcblk0.  So U-boot can only provide a
best guess.  In this case, if no SD card is present, we would want to
pass mmcblk0p2 still.  If an SD card is present, it woudl be able to
provide a uEnv.txt that would be loaded (even if the kernel is NOT
there) which can still update mmcroot variable.

This reverts commit 827512fb1154c05c6eb1e2259e936df55c98a535.

Cc: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Tom Rini <trini@ti.com>
10 years agoMerge branch 'master' of git://git.denx.de/u-boot-arm
Tom Rini [Tue, 8 Oct 2013 13:51:48 +0000 (09:51 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-arm

10 years agoMerge branch 'master' of git://git.denx.de/u-boot-spi
Tom Rini [Tue, 8 Oct 2013 13:03:15 +0000 (09:03 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-spi

10 years agospi: exynos: Support word transfers
Rajeshwari Shinde [Tue, 8 Oct 2013 10:50:06 +0000 (16:20 +0530)]
spi: exynos: Support word transfers

Since SPI register access is so expensive, it is worth transferring data
a word at a time if we can. This complicates the driver unfortunately.

Use the byte-swapping feature to avoid having to convert to/from big
endian in software.

This change increases speed from about 2MB/s to about 4.5MB/s.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Rajeshwari S Shinde <rajeshwari.s@samsung.com>
Reviewed-by: Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>
10 years agospi: exynos: Minimise access to SPI FIFO level
Rajeshwari Shinde [Tue, 8 Oct 2013 10:50:05 +0000 (16:20 +0530)]
spi: exynos: Minimise access to SPI FIFO level

Accessing SPI registers is slow, but access to the FIFO level register
in particular seems to be extraordinarily expensive (I measure up to
600ns). Perhaps it is required to synchronise with the SPI byte output
logic which might run at 1/8th of the 40MHz SPI speed (just a guess).

Reduce access to this register by filling up and emptying FIFOs
more completely, rather than just one word each time around the inner
loop.

Since the rxfifo value will now likely be much greater that what we read
before we fill the txfifo, we only fill the txfifo halfway. This is
because if the txfifo is empty, but the rxfifo has data in it, then writing
too much data to the txfifo may overflow the rxfifo as data arrives.

This speeds up SPI flash reading from about 1MB/s to about 2MB/s on snow.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Rajeshwari S Shinde <rajeshwari.s@samsung.com>
Reviewed-by: Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>
10 years agospi: exynos: Support a delay after deactivate
Rajeshwari Shinde [Tue, 8 Oct 2013 10:50:04 +0000 (16:20 +0530)]
spi: exynos: Support a delay after deactivate

For devices that need some time to react after a spi transaction
finishes, add the ability to set a delay.

Implement this as a delay on the first/next transaction to avoid
any delay in the fairly common case where a SPI transaction is
followed by other processing.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Rajeshwari S Shinde <rajeshwari.s@samsung.com>
Reviewed-by: Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>
10 years agoexynos: Export timer_get_us() to get microsecond timer
Rajeshwari Shinde [Tue, 8 Oct 2013 10:50:03 +0000 (16:20 +0530)]
exynos: Export timer_get_us() to get microsecond timer

This function, if implemented by the board, provides a microsecond
timer. The granularity may be larger than 1us if hardware does not
support this.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Rajeshwari S Shinde <rajeshwari.s@samsung.com>
Reviewed-by: Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>
10 years agoFix number base handling of "load" command
Wolfgang Denk [Sat, 5 Oct 2013 19:07:25 +0000 (21:07 +0200)]
Fix number base handling of "load" command

As documented, almost all U-Boot commands expect numbers to be entered
in hexadecimal input format. (Exception: for historical reasons, the
"sleep" command takes its argument in decimal input format.)

This rule was broken for the "load" command; for details please see
especially commits 045fa1e "fs: add filesystem switch libary,
implement ls and fsload commands" and 3f83c87 "fs: fix number base
behaviour change in fatload/ext*load".  In the result, the load
command would always require an explicit "0x" prefix for regular
(i. e. base 16 formatted) input.

Change this to use the standard notation of base 16 input format.
While strictly speaking this is a change of the user interface, we
hope that it will not cause trouble.  Stephen Warren comments (see
[1]):

        I suppose you can change the behaviour if you want; anyone
        writing "0x..." for their values presumably won't be
        affected, and if people really do assume all values in U-Boot
        are in hex, presumably nobody currently relies upon using
        non-prefixed values with the generic load command, since it
        doesn't work like that right now.

[1] http://article.gmane.org/gmane.comp.boot-loaders.u-boot/171172

Acked-by: Tom Rini <trini@ti.com>
Acked-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Wolfgang Denk <wd@denx.de>
10 years agosocfpga: Adding pin mux handoff files
Chin Liang See [Wed, 11 Sep 2013 16:26:10 +0000 (11:26 -0500)]
socfpga: Adding pin mux handoff files

Adding the generated pin mux configuration by Preloader
Generator tool

Signed-off-by: Chin Liang See <clsee@altera.com>
Reviewed-by: Pavel Machek <pavel@denx.de>
Acked-by: Dinh Nguyen <dinguyen@altera.com>
Cc: Wolfgang Denk <wd@denx.de>
CC: Pavel Machek <pavel@denx.de>
Cc: Dinh Nguyen <dinguyen@altera.com>
Cc: Tom Rini <trini@ti.com>
Cc: Albert Aribaud <albert.u.boot@aribaud.net>
10 years agosocfpga: Adding System Manager driver
Chin Liang See [Wed, 11 Sep 2013 16:24:48 +0000 (11:24 -0500)]
socfpga: Adding System Manager driver

Adding System Manager driver which will configure the
pin mux for real hardware Cyclone V development kit
(not Virtual Platform)

Signed-off-by: Chin Liang See <clsee@altera.com>
Reviewed-by: Pavel Machek <pavel@denx.de>
Acked-by: Dinh Nguyen <dinguyen@altera.com>
Cc: Wolfgang Denk <wd@denx.de>
CC: Pavel Machek <pavel@denx.de>
Cc: Dinh Nguyen <dinguyen@altera.com>
Cc: Tom Rini <trini@ti.com>
Cc: Albert Aribaud <albert.u.boot@aribaud.net>
10 years agoomap1510inn: arm925t: remove support
Albert ARIBAUD [Mon, 23 Sep 2013 17:11:38 +0000 (19:11 +0200)]
omap1510inn: arm925t: remove support

omap1510inn is orphan and has been for years now.
Reove it and, as it was the only arm925t target,
also remove arm925t support.
Update doc/README.scrapyard accordingly.

Signed-off-by: Albert ARIBAUD <albert.u.boot@aribaud.net>
10 years agodoc: SPI: Update SPI status track
Jagannadha Sutradharudu Teki [Mon, 7 Oct 2013 12:03:20 +0000 (17:33 +0530)]
doc: SPI: Update SPI status track

Updated SPI/status.txt, with memory_map and TODO.

Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
10 years agosf: ramtron: Remove page_size print
Jagannadha Sutradharudu Teki [Mon, 7 Oct 2013 11:51:20 +0000 (17:21 +0530)]
sf: ramtron: Remove page_size print

There is no page_size for ramtron flashes,
so just print the detected flash and it's size.

Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
10 years agosf: Minor cleanups
Jagannadha Sutradharudu Teki [Mon, 7 Oct 2013 14:04:56 +0000 (19:34 +0530)]
sf: Minor cleanups

- Add spaces, tabs
- Commenting.
- Rearrange code.
- Add static qualifier for missing func.
- Remove memory_map from ramtron.c
- Ramtron: spi_flash_internal.h -> sf_internal.h

Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
10 years agoREADME: qspi usecase and testing documentation.
Poddar, Sourav [Mon, 7 Oct 2013 10:23:04 +0000 (15:53 +0530)]
README: qspi usecase and testing documentation.

Contains documentation and testing details for qspi flash
interface.

Signed-off-by: Sourav Poddar <sourav.poddar@ti.com>
Reviewed-by: Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>
10 years agodra7xx_evm: add SPL API, QSPI, and serial flash support
Matt Porter [Mon, 7 Oct 2013 10:23:03 +0000 (15:53 +0530)]
dra7xx_evm: add SPL API, QSPI, and serial flash support

Enables support for SPI SPL, QSPI and Spansion serial flash device
on the EVM. Configures pin muxes for QSPI mode.

Signed-off-by: Matt Porter <matt.porter@linaro.org>
Signed-off-by: Sourav Poddar <sourav.poddar@ti.com>
Reviewed-by: Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>
10 years agospi: add TI QSPI driver
Matt Porter [Mon, 7 Oct 2013 10:23:02 +0000 (15:53 +0530)]
spi: add TI QSPI driver

Adds a SPI master driver for the TI QSPI peripheral.
- Added quad read support.
- Added memory mapped support.

Signed-off-by: Matt Porter <matt.porter@linaro.org>
Signed-off-by: Sourav Poddar <sourav.poddar@ti.com>
Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
10 years agosf: Add memory mapped read support
Poddar, Sourav [Mon, 7 Oct 2013 10:23:01 +0000 (15:53 +0530)]
sf: Add memory mapped read support

Qspi controller can have a memory mapped port which can be used for
data read. Added support to enable memory mapped port read.

This patch enables the following:
- It enables exchange of memory map address between mtd and qspi
through the introduction of "memory_map" flag.
- Add support to communicate to the driver that memory mapped
 transfer is to be started through introduction of new flags like
"SPI_XFER_MEM_MAP" and "SPI_XFER_MEM_MAP_END".

This will enable the spi controller to do memory mapped configurations
if required.

Signed-off-by: Sourav Poddar <sourav.poddar@ti.com>
Reviewed-by: Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>
10 years agoarmv7: hw_data: change clock divider setting.
Poddar, Sourav [Mon, 7 Oct 2013 10:23:00 +0000 (15:53 +0530)]
armv7: hw_data: change clock divider setting.

Clock requirement for qspi clk is 192 Mhz.
According to the below formulae,

f dpll = f ref * 2 * m /(n + 1)
clockoutx2_Hmn = f dpll / (hmn+ 1)

fref = 20 Mhz, m = 96, n = 4 gives f dpll = 768 Mhz
For clockoutx2_Hmn to be 768, hmn + 1 should be 4.

Signed-off-by: Sourav Poddar <sourav.poddar@ti.com>
Reviewed-by: Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>
10 years agoomap5: add qspi support
Matt Porter [Mon, 7 Oct 2013 10:22:59 +0000 (15:52 +0530)]
omap5: add qspi support

Add QSPI definitions and clock configuration support.

Signed-off-by: Matt Porter <matt.porter@linaro.org>
Signed-off-by: Sourav Poddar <sourav.poddar@ti.com>
Reviewed-by: Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>
10 years agosf: probe: Add support for EN25S64
Priyanka Jain [Thu, 3 Oct 2013 15:37:00 +0000 (21:07 +0530)]
sf: probe: Add support for EN25S64

Add support for EON EN25S64 SPI flash.

Signed-off-by: Priyanka Jain <Priyanka.Jain@freescale.com>
Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
10 years agodoc: SPI: Add status.txt for tracking SPI subsys status
Jagannadha Sutradharudu Teki [Thu, 26 Sep 2013 10:25:52 +0000 (15:55 +0530)]
doc: SPI: Add status.txt for tracking SPI subsys status

doc/SPI/status.txt added to track the u-boot SPI subsystem status.

Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
10 years agosf: Rename spi_flash files
Jagannadha Sutradharudu Teki [Thu, 26 Sep 2013 10:30:15 +0000 (16:00 +0530)]
sf: Rename spi_flash files

Renamed:
spi_flash.c -> sf.c
spi_flash_internal.h -> sf_internal.h
spi_flash_ops.c -> sf_ops.c
spi_flash_probe.c -> sf_probe.c

Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
10 years agospi: spi cleanups
Jagannadha Sutradharudu Teki [Wed, 25 Sep 2013 10:17:36 +0000 (15:47 +0530)]
spi: spi cleanups

- Rearranged multi-line comment style.
- Add tabs.
- Add spaces.

Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
10 years agosf: spi_flash cleanups
Jagannadha Sutradharudu Teki [Wed, 2 Oct 2013 14:08:49 +0000 (19:38 +0530)]
sf: spi_flash cleanups

More cleanups on spi_flash side:
- Removed unneeded comments.
- Rearranged macros in proper location.
- Rearranged func declerations
- Renamed few function names.
- Added License headers.

Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
10 years agosf: Remove spi_flash_do_alloc references
Jagannadha Sutradharudu Teki [Wed, 7 Aug 2013 16:06:25 +0000 (21:36 +0530)]
sf: Remove spi_flash_do_alloc references

Added a support for common probe, hence removed removed
spi_flash_do_alloc reference.

Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>