]> git.karo-electronics.de Git - karo-tx-uboot.git/log
karo-tx-uboot.git
10 years agoam335x_evm: Remove SPI SPL from NOR support target
Tom Rini [Mon, 10 Mar 2014 19:31:24 +0000 (15:31 -0400)]
am335x_evm: Remove SPI SPL from NOR support target

When using the am335x_evm_nor target one is generally expecting to be
used in an environment when you want to program the NOR and not a
"deployment" type target.  In addition this only supports the Beaglebone
White with the memory cape and NOR module installed, which precludes the
presence of SPI flash.  Drop SPI as we were getting close to the binary
limit in some cases and slightly over with other toolchains.

Signed-off-by: Tom Rini <trini@ti.com>
10 years agodrivers/spi/omap3: Bug fix of premature write transfer completion
Vasili Galka [Sun, 9 Mar 2014 13:56:52 +0000 (15:56 +0200)]
drivers/spi/omap3: Bug fix of premature write transfer completion

The logic determining SPI "write" transfer completion was faulty. At
certain conditions (e.g. slow SPI clock freq) the transfers were
interrupted before completion. Both EOT and TXS flags of channel
status registeer shall be checked to ensure that all data was
transferred. Tested on AM3359 chip.

Signed-off-by: Vasili Galka <vasili@visionmap.com>
10 years agoam33xx: Rework #ifdef's around s_init for clarity
Tom Rini [Wed, 5 Mar 2014 19:57:47 +0000 (14:57 -0500)]
am33xx: Rework #ifdef's around s_init for clarity

The s_init function is only called on SPL or XIP cases, so lets only
build it for them.  This makes the #if logic within the function a bit
clearer as to when we are or are not calling things, and makes it easier
to see that for example preloader_console_init isn't ever called in the
non-XIP full U-Boot case.

Signed-off-by: Tom Rini <trini@ti.com>
10 years agoPrepare v2014.04-rc2 v2014.04-rc2
Tom Rini [Mon, 10 Mar 2014 21:21:06 +0000 (17:21 -0400)]
Prepare v2014.04-rc2

Signed-off-by: Tom Rini <trini@ti.com>
10 years agoMerge branch 'master' of git://git.denx.de/u-boot-arm
Tom Rini [Mon, 10 Mar 2014 18:22:54 +0000 (14:22 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-arm

10 years agoMerge branch 'master' of git://git.denx.de/u-boot-usb
Tom Rini [Mon, 10 Mar 2014 18:06:51 +0000 (14:06 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-usb

10 years agousb: create common header virtual root hub descriptors
Stephen Warren [Fri, 14 Feb 2014 04:15:18 +0000 (21:15 -0700)]
usb: create common header virtual root hub descriptors

Many USB host controller drivers contain almost identical copies of the
same virtual root hub descriptors. Put these into a common file to avoid
duplication.

Note that there were some very minor differences between the descriptors
in the various files, such as:

- USB 1.0 vs. USB 1.1
- Manufacturer/Device ID
- Max packet size
- String content

I assume these aren't relevant.

Cc: Thomas Lange <thomas@corelatus.se>
Cc: Shinya Kuribayashi <skuribay@pobox.com>
Cc: Gary Jennejohn <garyj@denx.de>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Eric Millbrandt <emillbrandt@coldhaus.com>
Cc: Pierre Aubert <p.aubert@staubli.com>
Cc: Stefan Roese <sr@denx.de>
Cc: Daniel Hellstrom <daniel@gaisler.com>
Cc: Denis Peter <d.peter@mpl.ch>
Cc: Rodolfo Giometti <giometti@linux.it>
Cc: Zhang Wei <wei.zhang@freescale.com>
Cc: Mateusz Zalega <m.zalega@samsung.com>
Cc: Remy Bohmer <linux@bohmer.net>
Cc: Markus Klotzbuecher <mk@denx.de>
Cc: Minkyu Kang <mk7.kang@samsung.com>
Cc: Gary Jennejohn <garyj@denx.de>
Cc: C Nauman <cnauman@diagraph.com>
Cc: David Müller <d.mueller@elsoft.ch>
Cc: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Cc: Thomas Abraham <t-abraham@ti.com>
Cc: Tom Rini <trini@ti.com>
Cc: Andrew Murray <amurray@embedded-bits.co.uk>
Cc: Matej Frančeškin <matej.franceskin@comtrade.com>
Cc: Cliff Cai <cliff.cai@analog.com>
Cc: Bryan Wu <cooloney@gmail.com>
Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
10 years agousb: ehci: fully align interrupt QHs/QTDs
Stephen Warren [Thu, 6 Feb 2014 20:13:06 +0000 (13:13 -0700)]
usb: ehci: fully align interrupt QHs/QTDs

These data structures are passed to cache-flushing routines, and hence
must be conform to both the USB the cache-flusing alignment requirements.
That means aligning to USB_DMA_MINALIGN. This is important on systems
where cache lines are >32 bytes.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
10 years agoush: ehci: initialize altnext pointers in QH
Stephen Warren [Fri, 7 Feb 2014 16:53:50 +0000 (09:53 -0700)]
ush: ehci: initialize altnext pointers in QH

Section 4.10.2 "Advance Queue" of ehci-specification-for-usb.pdf
specifies how an EHCI controller loads a new QTD for processing if the
QH is not already marked as active. It states:

=====
If the field Bytes to Transfer is not zero and the T-bit in the Alternate
Next qTD Pointer is set to zero, then the host controller uses the
Alternate Next qTD Pointer. Otherwise, the host controller uses the Next
qTD Pointer. If Next qTD Pointer’s T-bit is set to a one, then the host
controller exits this state and uses the horizontal pointer to the next
schedule data structure.
=====

Hence, we must ensure that the alternate next QTD pointer's T-bit
(TERMINATE) is set, so the EHCI controller knows to use the next QTD
pointer.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
10 years ago.gitignore: ignore include/config/*
Masahiro Yamada [Mon, 10 Mar 2014 01:47:19 +0000 (10:47 +0900)]
.gitignore: ignore include/config/*

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
10 years agokbuild: fix a bug of make rule of version_autogenerated.h
Masahiro Yamada [Mon, 10 Mar 2014 01:42:27 +0000 (10:42 +0900)]
kbuild: fix a bug of make rule of version_autogenerated.h

include/generated/version_autogenerated.h was not correctly
generated on the parallel build (with -j option).

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Reported-by: Andreas Bießmann <andreas.devel@googlemail.com>
10 years agocfb_console: align fields in gzipped .bmp files
Eric Nelson [Sat, 8 Mar 2014 14:55:52 +0000 (07:55 -0700)]
cfb_console: align fields in gzipped .bmp files

.bmp files contain 32-bit integers aligned at offsets of +2, +6,
et cetera within the bmp_header structure (see include/bmp_layout.h).

Support for gzip-compressed .bmp files is present in the cfb_console
display subsystem by uncompressing them prior to use.

This patch forces the in-memory header to be aligned properly
for these compressed images by extracting them to a 2-byte
offset in the memory returned by malloc. Since malloc will always
return a 4-byte aligned value, this forces the .bmp header
fields to be naturally aligned on 4-byte addresses.

Refer to these files for more details:
doc/README.displaying-bmps

Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
10 years agoahci: wait longer for link.
Ian Campbell [Fri, 7 Mar 2014 01:20:58 +0000 (01:20 +0000)]
ahci: wait longer for link.

I have observed timeouts on a cubietruck.

The increase to 40ms is completely arbitrary and Works For Me(tm). I
couldn't find a good reference for how long you are supposed to wait,
although googling around it seems like tens of ms rather than single
digits is more common. I don't think there is any harm in waiting a bit
longer.

Signed-off-by: Ian Campbell <ijc@hellion.org.uk>
10 years agohighbank: use scsi_init hook
Ian Campbell [Fri, 7 Mar 2014 01:20:57 +0000 (01:20 +0000)]
highbank: use scsi_init hook

Signed-off-by: Ian Campbell <ijc@hellion.org.uk>
Acked-by: Rob Herring <robh@kernel.org>
10 years agoahci-plat: Provide a weak scsi_init hook
Ian Campbell [Fri, 7 Mar 2014 01:20:56 +0000 (01:20 +0000)]
ahci-plat: Provide a weak scsi_init hook

This allow the platform to register the platform ahci device.

Signed-off-by: Ian Campbell <ijc@hellion.org.uk>
10 years agom68k: Remove M5271EVB and idmr board support
Masahiro Yamada [Fri, 21 Feb 2014 00:55:16 +0000 (09:55 +0900)]
m68k: Remove M5271EVB and idmr board support

CONFIG_SYS_HZ must be always 1000, but M5271EVB.h defines it
as 1000000 and idmr.h defines it as (50000000 / 64).

When compiling these two boards, a warning message is displayed:

  time.c:14:2: warning: #warning "CONFIG_SYS_HZ must be 1000
  and should not be defined by platforms" [-Wcpp]

There are no board maintainers for them so this commit just
deletes them.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Jason Jin <Jason.jin@freescale.com>
10 years agoarm: atmel: sama5d3: add nand spl boot support
Bo Shen [Mon, 3 Mar 2014 06:47:17 +0000 (14:47 +0800)]
arm: atmel: sama5d3: add nand spl boot support

Add NAND SPL boot support with hardware PMECC.

Signed-off-by: Bo Shen <voice.shen@atmel.com>
Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
10 years agomtd: nand: atmel: prepare for nand spl boot support
Bo Shen [Mon, 3 Mar 2014 06:47:16 +0000 (14:47 +0800)]
mtd: nand: atmel: prepare for nand spl boot support

Prepare for nand spl boot support. It supports nand software ECC and
hardware PMECC.
This patch is take <drivers/mtd/nand/nand_spl_simple.c> as reference.

Signed-off-by: Bo Shen <voice.shen@atmel.com>
Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
10 years agoarm: atmel: sama5d3: add spi spl boot support
Bo Shen [Mon, 3 Mar 2014 06:47:15 +0000 (14:47 +0800)]
arm: atmel: sama5d3: add spi spl boot support

Add SPI SPL boot support for sama5d3xek board.

Signed-off-by: Bo Shen <voice.shen@atmel.com>
Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
10 years agoARM: atmel: add sama5d3 Xplained board support
Bo Shen [Sun, 9 Feb 2014 07:52:39 +0000 (15:52 +0800)]
ARM: atmel: add sama5d3 Xplained board support

Add sama5d3 Xplained board support which use Atmel SAMA5D36 SoC.
Now it supports boot from NAND flash and SD/MMC card.
Features support:
  - NAND flash
  - SD/MMC card
  - Two USB hosts
  - Ethernet (one GMAC, one EMAC)

Signed-off-by: Bo Shen <voice.shen@atmel.com>
[reorder boards.cfg]
Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
10 years agoat91 gpio: fix typo in compatibility macro
Andreas Henriksson [Thu, 30 Jan 2014 18:20:07 +0000 (19:20 +0100)]
at91 gpio: fix typo in compatibility macro

It's called _pio_ in the version that was added to git.
Apparently it got renamed without updating the macros before it was
applied, c.f.
http://u-boot.10912.n7.nabble.com/U-Boot-PATCH-3-9-V3-add-a-new-AT91-GPIO-driver-td75922.html

Signed-off-by: Andreas Henriksson <andreas.henriksson@endian.se>
Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
10 years agoat91sam9263ek: add mmc support
Andreas Henriksson [Mon, 27 Jan 2014 18:18:59 +0000 (19:18 +0100)]
at91sam9263ek: add mmc support

Add support for using the Atmel MCI driver on at91sam9263ek.
This change is modeled after the existing at91sam9260ek support.

Please note that this hooks up slot1 (MCI1) for SD. Not both.

Tested with at91bootstrap and u-boot on dataflash in slot 0
and fat-formatted 8GB SDHC in slot 1 on first revision
at91sam9263ek (which must use dataflash in slot0 to boot).

CONFIG_ATMEL_MCI_PORTB not tested.

Signed-off-by: Andreas Henriksson <andreas.henriksson@endian.se>
[remove empty line]
Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
10 years agoMerge branch 'master' of git://git.denx.de/u-boot-mpc85xx
Tom Rini [Sat, 8 Mar 2014 01:54:22 +0000 (20:54 -0500)]
Merge branch 'master' of git://git.denx.de/u-boot-mpc85xx

10 years agopowerpc/t104xrdb: Update DDR initialization related settings
Priyanka Jain [Wed, 26 Feb 2014 04:08:37 +0000 (09:38 +0530)]
powerpc/t104xrdb: Update DDR initialization related settings

Update following DDR related settings for T1040RDB, T1042RDB_PI
-Correct number of chip selects to two as t1040 supports
 two Chip selects.
-Update board_specific_parameters udimm structure with settings
 derived via calibration.
-Update ddr_raw_timing sructure corresponding to DIMM.
-Set ODT to off. Typically on FSL board, ODT is set to 75 ohm,
 but on T104xRDB, on setting this , DDR instability is observed.
 Board-level debugging is in progress.

Verified the updated settings to be working fine with dual-ranked
Micron, MT18KSF51272AZ-1G6 DIMM at data rate 1600MT/s.

Signed-off-by: Priyanka Jain <Priyanka.Jain@freescale.com>
Signed-off-by: York Sun <yorksun@freescale.com>
10 years agopowerpc/t1040qds: Add Video - HDMI support
Priyanka Jain [Wed, 26 Feb 2014 10:41:53 +0000 (16:11 +0530)]
powerpc/t1040qds: Add Video - HDMI support

T1040 has internal display interface unit (DIU) for driving video.
T1040QDS supports video mode via
-LCD using TI enconder
-HDMI type interface via HDMI encoder

Chrontel, CH7301C encoder which is I2C programmable is used as
HDMI connector on T1040QDS.
This patch add support to
-enable Video interface for T1040QDS
-route qixis multiplexing to enable DIU-HDMI interface on board
-program DIU pixel clock gerenartor for T1040
-program HDMI encoder via I2C on board

Signed-off-by: Priyanka Jain <Priyanka.Jain@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
10 years agopowerpc/mpc85xx: Add SCFG_PIXCLKCR register support for T1040
Priyanka Jain [Thu, 30 Jan 2014 10:09:58 +0000 (15:39 +0530)]
powerpc/mpc85xx: Add SCFG_PIXCLKCR register support for T1040

T1040 SoC has SCFG (Supplement Configuration) Block which provides
chip specific configuration and status support. The base address of
SCFG block in T1040 is 0xfc000.
SCFG contains SCFG_PIXCLKCR (DIU pixel clock control register)
at offset 0x28.

Add definition of
-SCFG block
-SCFG_PIXCLKCR register
-Bits definition of SCFG_PIXCLK register

Signed-off-by: Priyanka Jain <Priyanka.Jain@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
10 years agopowerpc/t2080rdb: Add T2080PCIe-RDB board support
Shengzhou Liu [Wed, 5 Mar 2014 07:04:48 +0000 (15:04 +0800)]
powerpc/t2080rdb: Add T2080PCIe-RDB board support

T2080PCIe-RDB is a Freescale Reference Design Board that hosts the T2080 SoC.
It works in two mode: standalone mode and PCIe endpoint mode.

T2080PCIe-RDB Feature Overview
------------------------------
Processor:
 - T2080 SoC integrating four 64-bit dual-threads e6500 cores up to 1.8GHz
DDR Memory:
 - Single memory controller capable of supporting DDR3 and DDR3-LP devices
 - 72bit 4GB DDR3-LP SODIMM in slot
Ethernet interfaces:
 - Two 10M/100M/1G RGMII ports on-board
 - Two 10Gbps SFP+ ports on-board
 - Two 10Gbps Base-T ports on-board
Accelerator:
 - DPAA components consist of FMan, BMan, QMan, PME, DCE and SEC
SerDes 16 lanes configuration:
 - SerDes-1 Lane A-B: to two 10G XFI fiber (MAC9 & MAC10)
 - SerDes-1 Lane C-D: to two 10G Base-T (MAC1 & MAC2)
 - SerDes-1 Lane E-H: to PCIe Goldfinger (PCIe4 x4, Gen3)
 - SerDes-2 Lane A-D: to PCIe Slot (PCIe1 x4, Gen2)
 - SerDes-2 Lane E-F: to C293 secure co-processor (PCIe2 x2)
 - SerDes-2 Lane G-H: to SATA1 & SATA2
IFC/Local Bus:
 - NOR:  128MB 16-bit NOR flash
 - NAND: 512MB 8-bit NAND flash
 - CPLD: for system controlling with programable header on-board
eSPI:
 - 64MB N25Q512 SPI flash
USB:
 - Two USB2.0 ports with internal PHY (both Type-A)
PCIe:
 - One PCIe x4 gold-finger
 - One PCIe x4 connector
 - One PCIe x2 end-point device (C293 Crypto co-processor)
SATA:
 - Two SATA 2.0 ports on-board
SDHC:
 - support a TF-card on-board
I2C:
 - Four I2C controllers.
UART:
 - Dual 4-pins UART serial ports

Signed-off-by: Shengzhou Liu <Shengzhou.Liu@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
10 years agopowerpc/t208xqds: fixup for t208xqds
Shengzhou Liu [Thu, 6 Mar 2014 07:07:39 +0000 (15:07 +0800)]
powerpc/t208xqds: fixup for t208xqds

Change QIXIS timing parameter CONFIG_SYS_CS3_FTIM2 to 8 from 0.
Fix EMI2 for t2080qds, which was caused by adding t2081qds.

Signed-off-by: Shengzhou Liu <Shengzhou.Liu@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
10 years agobootstage: powerpc: support fdt stash and reporting
Mela Custodio [Wed, 19 Feb 2014 15:16:57 +0000 (00:16 +0900)]
bootstage: powerpc: support fdt stash and reporting

This implements stashing of bootstage timing data to FDT and automatic
timing reporting. To enable define CONFIG_BOOTSTAGE_FDT and
CONFIG_BOOTSTAGE_REPORT respectively.

Signed-off-by: Rommel G Custodio <sessyargc+u-boot@gmail.com>
Reviewed-by: York Sun <yorksun@freescale.com>
10 years agopowerpc/usb: Workaround for erratum-A006261
Suresh Gupta [Wed, 26 Feb 2014 08:59:12 +0000 (14:29 +0530)]
powerpc/usb: Workaround for erratum-A006261

USB spec says that the minimum disconnect threshold should be
over 525 mV. However, internal USB PHY threshold value is below
this specified value. Due to this some devices disconnect at
run-time. Hence, phy settings are tweaked to increased disconnect
threshold to be above 525mV by using this workaround.

Signed-off-by: Suresh Gupta <suresh.gupta@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
10 years agopowerpc/b4860: Add workaround for errata A006384 and A006475
Shaveta Leekha [Wed, 26 Feb 2014 10:38:22 +0000 (16:08 +0530)]
powerpc/b4860: Add workaround for errata A006384 and A006475

SerDes PLLs may not lock reliably at 5 G VCO configuration(A006384)
and at cold temperatures(A006475), workaround recalibrate the
PLLs with some SerDes configuration

Both these errata are only applicable for b4 rev1.
So, make workaround for these errata conditional,
depending upon soc version.

Signed-off-by: Shaveta Leekha <shaveta@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
10 years agoB4860qds: Set SerDes2 refclk2 at to 156.25MHz for XFI to work
Shaveta Leekha [Wed, 26 Feb 2014 10:37:51 +0000 (16:07 +0530)]
B4860qds: Set SerDes2 refclk2 at to 156.25MHz for XFI to work

Change setting of SerDes2 refclk2 to have the default value as it is
coming on board that is 156.25MHz, for XFI to work.
Also change PLL_NUM variable to the one defined in config_mpc85xx.h
for B4860 and B4420.

Signed-off-by: Shaveta Leekha <shaveta@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
10 years agoB4860/B4420: Add PLL_NUM define for B4420/B4860 to use SerDes2 Refclks re-configuration
Shaveta Leekha [Wed, 26 Feb 2014 10:37:37 +0000 (16:07 +0530)]
B4860/B4420: Add PLL_NUM define for B4420/B4860 to use SerDes2 Refclks re-configuration

B4860 has two PLL per SerDes whereas B4420 has one PLL per SerDes,
add their defines in arch/powerpc/include/asm/config_mpc85xx.h

Signed-off-by: Shaveta Leekha <shaveta@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
10 years ago85xx/b4860: Alternate serdes protocols for B4860/B4420
poonam aggrwal [Mon, 17 Feb 2014 03:08:58 +0000 (08:38 +0530)]
85xx/b4860: Alternate serdes protocols for B4860/B4420

On B4860 and B4420, some serdes protocols can be used with LC VCO as
well as Ring VCO options.

Addded Alternate options with LC VCO for such protocols.
For example protocol 0x2a on srds 1 becomes 0x29 if it is LC VCO.

The alternate option has the same functionality as the original option;
the only difference being LC VCO rather than Ring VCO.

Signed-off-by: Poonam Aggrwal <poonam.aggrwal@freescale.com>
Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
10 years agoboard/b4860qds: Add support to make PCIe SATA work on B4860QDS
Shaveta Leekha [Wed, 26 Feb 2014 10:36:56 +0000 (16:06 +0530)]
board/b4860qds: Add support to make PCIe SATA work on B4860QDS

1) SerDes2 Refclks have been set properly to make
     PCIe SATA to work as it work on SerDes refclk of 100MHz
  2) Mask the SerDes's device reset request before changing
     the Refclks for SerDes1 and SerDes2 for PLL locks to
     happen properly, device reset request bit unmasked
     after SerDes refclks configuration

Signed-off-by: Shaveta Leekha <shaveta@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
10 years agoboard/b4860qds: Add support to make Aurora work on B4860QDS
Shaveta Leekha [Wed, 26 Feb 2014 10:36:30 +0000 (16:06 +0530)]
board/b4860qds: Add support to make Aurora work on B4860QDS

1) Add new SerDes1 protocols having Aurora in them
2) Add VSC cross point connections for Aurora to work with
   CPRI and SGMIIs
3) Configure VSC crossbar switch to connect SerDes1
   lanes to aurora on board, by checking SerDes1 protocols
4) SerDes1 Refclks have been set properly to make
   Aurora, CPRI and SGMIIs to work together properly

Signed-off-by: Shaveta Leekha <shaveta@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
10 years agokbuild: move "checkgcc4" to PowerPC archprepare
Masahiro Yamada [Wed, 5 Mar 2014 08:49:23 +0000 (17:49 +0900)]
kbuild: move "checkgcc4" to PowerPC archprepare

"checkgcc4" is used only for PowerPC.
Move it to arch/powerpc/config.mk.

To make sure gcc is new enough before beginning build,
run "checkgcc4" during "archprepare".

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
10 years agokbuild: move "checkthumb" to ARM archprepare
Masahiro Yamada [Wed, 5 Mar 2014 08:49:22 +0000 (17:49 +0900)]
kbuild: move "checkthumb" to ARM archprepare

"checkthumb" makes sense only for ARM architecture.
Move it to arch/arm/config.mk.

To make sure gcc supports THUMB mode before beginning build,
run "checkthumb" during "archprepare".

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
10 years agopowerpc: mpc8260: consolidate CONFIG_MPC8260 and CONFIG_8260
Masahiro Yamada [Wed, 5 Mar 2014 08:40:10 +0000 (17:40 +0900)]
powerpc: mpc8260: consolidate CONFIG_MPC8260 and CONFIG_8260

Before this commit, CONFIG_MPC8260 and CONFIG_8260
were used mixed-up.

All boards with mpc8260 cpu defined both of them:
  - CONFIG_MPC8260 was defined in board config headers
      and include/common.h
  - CONFIG_8260 was defined arch/powerpc/cpu/mpc8260/config.mk

We do not need to have both of them.
This commit keeps only CONFIG_MPC8260.

This commit does:
 - Delete CONFIG_8260 and CONFIG_MPC8260 definition
   in config headers and include/common.h
 - Rename CONFIG_8260 to CONFIG_MPC8260
    in arch/powerpc/cpu/mpc8260/config.mk.
 - Rename #ifdef CONFIG_8260 to #ifdef CONFIG_MPC8260

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Wolfgang Denk <wd@denx.de>
10 years agomips: move CONFIG_MIPS{32, 64} definition to config.mk
Masahiro Yamada [Wed, 5 Mar 2014 08:25:37 +0000 (17:25 +0900)]
mips: move CONFIG_MIPS{32, 64} definition to config.mk

All mips32 boards define CONFIG_MIPS32 in config headers
except malta boards which define it in boards.cfg.
We can consolidate them by defining it in
arch/mips/cpu/mips32/config.mk.

CONFIG_MIPS64 definition can be moved to
arch/mips/cpu/mips64/config.mk as well.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Acked-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
10 years agokbuild: improve Kbuild speed
Masahiro Yamada [Wed, 5 Mar 2014 07:59:40 +0000 (16:59 +0900)]
kbuild: improve Kbuild speed

Kbuild brought about many advantages for us but a significant
performance regression was reported by Simon Glass.

After some discussions and analysis, it turned out
its main cause is in $(call cc-option,...).

Historically, U-Boot parses all config.mk
(arch/*/config.mk and board/*/config.mk)
every time descending into subdirectories.
That means cc-options are evaluated over and over again.

$(call cc-option,...) is useful but costly.
So we want to evaluate them only in ./Makefile
and spl/Makefile and export compiler flags.

This commit changes the build system as follows:

  - Modify scripts/Makefile.build to not include config.mk
    Instead, add $(PLATFORM_CPPFLAGS) to asflags-y, ccflags-y,
    cppflags-y.

  - Export many variables
    Going forward, Kbuild will not parse config.mk files
    when it descends into subdirectories.
    If we want to set variables in config.mk and use them
    in subdirectories, they must be exported.

    This is the list of variables to get exported:
      PLATFORM_CPPFLAGS
      CPUDIR
      BOARDDIR
      OBJCOPYFLAGS
      LDFLAGS
      LDFLAGS_FINAL
        (used in nand_spl/board/*/*/Makefile)
      CONFIG_STANDALONE_LOAD_ADDR
        (used in examples/standalone/Makefile)
      SYM_PREFIX
        (used in examples/standalone/Makefile)
      RELFLAGS
        (used in examples/standalone/Makefile)

  - Delete CPPFLAGS
    This variable has been replaced with PLATFORM_CPPFLAGS

  - Copy gcclibdir from example/standalone/Makefile
    to arch/sparc/config.mk
    The reference in CONFIG_STANDALONE_LOAD_ADDR must be
    resolved before it is exported.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Reported-by: Simon Glass <sjg@chromium.org>
Acked-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org> [on Sandbox]
Tested-by: Stephen Warren <swarren@nvidia.com> [on Tegra]
10 years agoconfig.mk: specify the exact path to standalone linker script
Masahiro Yamada [Wed, 5 Mar 2014 07:59:39 +0000 (16:59 +0900)]
config.mk: specify the exact path to standalone linker script

We want to change the build system to include config.mk
only from ./Makefile and spl/Makefile.
We must prepare for that in this commit.

$(src) is a moving target and not handy for our purpose.
We must replace it with a fixed path.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
10 years agokbuild: add CONFIG_ prefix to USE_PRIVATE_LIBGCC
Masahiro Yamada [Wed, 5 Mar 2014 07:59:38 +0000 (16:59 +0900)]
kbuild: add CONFIG_ prefix to USE_PRIVATE_LIBGCC

Before this commit, USE_PRIVATE_LIBGCC was defined in
arch-specific config.mk and referenced in
arch/$(ARCH)/lib/Makefile.

We are not happy about parsing config.mk again and again.
We have to keep the same behavior with a different way.

By adding "CONFIG_" prefix, this macro appears
in include/autoconf.mk, include/spl-autoconf.mk.
(And treating USE_PRIVATE_LIBGCC as CONFIG macro
is reasonable enough.)

Tegra SoC family defined USE_PRIVATE_LIBGCC as "yes"
in arch/arm/cpu/arm720t/tegra*/config.mk,
whereas did not define it in arch/arm/cpu/armv7/tegra*/config.mk.

It means Tegra enables PRIVATE_LIBGCC only for SPL.
We can describe the same behavior by adding

  #ifdef CONFIG_SPL_BUILD
  # define CONFIG_USE_PRIVATE_LIBGCC
  #endif

to include/configs/tegra-common.h.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Tom Warren <twarren@nvidia.com>
Cc: Simon Glass <sjg@chromium.org>
Acked-by: Stephen Warren <swarren@nvidia.com>
10 years agokbuild, blackfin: Add CONFIG_CC_OPTIMIZE_LIBS_FOR_SPEED
Masahiro Yamada [Wed, 5 Mar 2014 07:59:37 +0000 (16:59 +0900)]
kbuild, blackfin: Add CONFIG_CC_OPTIMIZE_LIBS_FOR_SPEED

Many (but not all) of Blackfin boards give -O2 option
to compile under lib/ directory.
That means lib/ should be speed-optimized,
whereas other parts should be size-optimized.

We want to keep the same behavior,
but do not want to parse board/*/config.mk again and again.
We've got no choice but to invent a new method.

CONFIG_CC_OPTIMIZE_LIBS_FOR_SPEED, if it is enabled,
gives -O2 flag only for building under lib/ directory.

Dirty codes which I had marked as "FIX ME"
in board/${BOARD}/config.mk have been deleted.
Instead, CONFIG_CC_OPTIMIZE_LIBS_FOR_SPEED has been
defined in include/configs/${BOARD}.h.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Sonic Zhang <sonic.zhang@analog.com>
10 years agocmd_nvedit: Make 'env import -c' require size parameter
Tom Rini [Tue, 4 Mar 2014 20:52:35 +0000 (15:52 -0500)]
cmd_nvedit: Make 'env import -c' require size parameter

When importing a checksummed area we need to be told how big the area in
question is so that we know that will match the size of the area which
the checksum is generated against.

Reported-by: Pierre AUBERT <p.aubert@staubli.com>
Signed-off-by: Tom Rini <trini@ti.com>
10 years agoCosmetic: Typo fixes
Vasili Galka [Tue, 4 Mar 2014 15:24:09 +0000 (17:24 +0200)]
Cosmetic: Typo fixes

Signed-off-by: Vasili Galka <vasili@visionmap.com>
10 years agoppc4xx: Remove 4xx NAND booting support
Stefan Roese [Tue, 4 Mar 2014 14:34:35 +0000 (15:34 +0100)]
ppc4xx: Remove 4xx NAND booting support

As ppc4xx currently only supports the deprecated nand_spl infrastructure
and nobody seems to have time / resources to port this over to the newer
SPL infrastructure, lets remove NAND booting completely.

This should not affect the "normal", non NAND-booting ppc4xx platforms
that are currently supported.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Tirumala Marri <tmarri@apm.com>
Cc: Matthias Fuchs <matthias.fuchs@esd.eu>
Cc: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Tom Rini <trini@ti.com>
Tested-by: Matthias Fuchs <matthias.fuchs@esd.eu>
10 years agonet/phy: Correct AR8021 phy_mask
Haijun.Zhang [Tue, 4 Mar 2014 07:56:12 +0000 (15:56 +0800)]
net/phy: Correct AR8021 phy_mask

There was wrong phy_mask for AR8021 device,
so the AR8021 can't be probed correctly.
Changed it from 0x4fffff to 0x4ffff0.

Signed-off-by: Haijun Zhang <Haijun.Zhang@freescale.com>
10 years agoxilinx: delete meaningless .gitignore files
Masahiro Yamada [Tue, 4 Mar 2014 02:36:51 +0000 (11:36 +0900)]
xilinx: delete meaningless .gitignore files

config.tmp is never generated

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Michal Simek <michal.simek@xilinx.com>
Acked-by: Michal Simek <michal.simek@xilinx.com>
10 years agounit-test: make "test -e" test independent of $CWD
Stephen Warren [Sun, 2 Mar 2014 05:18:00 +0000 (22:18 -0700)]
unit-test: make "test -e" test independent of $CWD

The unit-test for hush's "test -e" currently relies upon being run in
the U-Boot build directory, because it tests for the existence of a file
that exists in that directory.

Fix this by explicitly creating the file we use for the existence test,
and deleting it afterwards so that multiple successive unit-test
invocations succeed. This required adding an os.c function to erase
files.

Reported-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
10 years agohush: fix some quoted variable expansion issues
Stephen Warren [Sun, 2 Mar 2014 05:16:10 +0000 (22:16 -0700)]
hush: fix some quoted variable expansion issues

The following shell command fails:

if test -z "$x"; then echo "zero"; else echo "non-zero"; fi

(assuming $x does not exist, it prints "non-zero" rather than "zero").

... since "$x" expands to nothing, and the argument is completely
dropped, causing too few to be passed to -z, causing cmd_test() to
error out early.

This is because when variable expansions are processed by make_string(),
the expanded results are concatenated back into a new string. However,
no quoting is applied when doing so, so any empty variables simply don't
generate any parameter when the combined string is parsed again.

Fix this by explicitly replacing quoting any argument that was originally
quoted when re-generating a string from the already-parsed argument list.

This also fixes loss of whitespace in commands such as:

setenv space " "
setenv var " 1${space}${space} 2 "
echo ">>${var}<<"

Reported-by: Russell King <linux@arm.linux.org.uk>
Acked-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
10 years agounit-test: clean up evironment after Hush tests
Stephen Warren [Fri, 28 Feb 2014 05:01:28 +0000 (22:01 -0700)]
unit-test: clean up evironment after Hush tests

Delete the temporary variables that are used to save unit-test results
from the environment after running the test. This prevents polluting
the environment, or growing it too much.

Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
Acked-by: Simon Glass <sjg@chromium.org>
10 years agonet: asix: don't pad odd-length TX packets
Stephen Warren [Thu, 27 Feb 2014 20:27:02 +0000 (13:27 -0700)]
net: asix: don't pad odd-length TX packets

For Ethernet/USB RX packets, the ASIX HW pads odd-sized packets so that
they have an even size. Currently, asix_recv() does remove this padding,
and asic_send() adds equivalent padding in the TX path. However, the HW
does not appear to need this packing for TX packets in practical testing
with "ASIX Elec. Corp. AX88x72A 000001" Vendor: 0x0b95 Product 0x7720
Version 0.1. The Linux kernel does no such padding for the TX path.

Remove the padding from the TX path:

* For consistency with the Linux kernel.
* NVIDIA has a Tegra simulator which validates that the length of USB
  packets sent to an ASIX device matches the packet length value inside
  the packet data. Having U-Boot and the kernel do the same thing when
  creating the TX packets simplifies the simulator's validation.

Cc: Lucas Stach <dev@lynxeye.de>
Cc: Marek Vasut <marex@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Simon Glass <sjg@chromium.org>
Acked-by: Marek Vasut <marex@denx.de>
Tested-by: Marek Vasut <marex@denx.de>
Tested-by: Gerhard Sittig <gsi@denx.de>
10 years agoMerge branch 'u-boot-tegra/master' into 'u-boot-arm/master'
Albert ARIBAUD [Fri, 7 Mar 2014 13:32:42 +0000 (14:32 +0100)]
Merge branch 'u-boot-tegra/master' into 'u-boot-arm/master'

10 years agoOMAP3: igep00x0: Enable required clocks for GPIO that are used.
Enric Balletbo i Serra [Sat, 25 Jan 2014 21:52:22 +0000 (22:52 +0100)]
OMAP3: igep00x0: Enable required clocks for GPIO that are used.

Enable required clocks for GPIO to fix a boot issue introduced by commit
f33b9bd3984fb11e1d8566a866adc5957b1e1c9d (arm: omap3: Enable clocks for
peripherals only if they are used).

Without this patch the u-boot freezes after the following messages

  OMAP36XX/37XX-GP ES1.2, CPU-OPP2, L3-200MHz, Max CPU Clock 1 Ghz
  IGEPv2 + LPDDR/NAND
  I2C:   ready
  DRAM:  512 MiB
  NAND:  512 MiB
  MMC:   OMAP SD/MMC: 0

Diving into the issue, the sequence that produces the u-boot freezes is

  setup_net_chip
   |--> gpio_direction_out
         |--> _set_gpio_dataout
               |--> __raw_writel

To avoid this we just need enable the clocks for GPIOs that are used, but it
would be interesting implement a mechanism to protect these situations and
make sure that the clock is enabled when we request a GPIO.

Signed-off-by: Enric Balletbo i Serra <eballetbo@gmail.com>
10 years agoboard/BuR/common: fix phy addresses
Hannes Petermaier [Thu, 6 Mar 2014 06:03:24 +0000 (07:03 +0100)]
board/BuR/common: fix phy addresses

B&R boards are using Phy Addresses 'one' and 'two', prior this was
defined through #define PHYADDR 1 within a header file.
Now this is addresses are given with device-driver structure.

Signed-off-by: Hannes Petermaier <oe5hpm@oevsv.at>
10 years agoARM: tegra: implement bootcmd_pxe
Stephen Warren [Wed, 5 Feb 2014 16:24:59 +0000 (09:24 -0700)]
ARM: tegra: implement bootcmd_pxe

This retrieves a PXE config file over the network, and executes it. This
allows an extlinux config file  to be retrieved over the network and
executed, whereas the existing bootcmd_dhcp retrieves a U-Boot script.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
10 years agoARM: tegra: rework boot scripts
Stephen Warren [Wed, 5 Feb 2014 16:24:58 +0000 (09:24 -0700)]
ARM: tegra: rework boot scripts

Update the common Tegra boot scripts in the default environment to

a) Make use of the new "test -e" shell command to avoid some error
   messages.

b) Allow booting using the sysboot command and extlinux.conf. This
   allows easy creation of boot menus, and provides a simple interface
   for distros to parameterize/configure the boot process.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
10 years agoARM: tegra: convert tegra to use distro defaults
Stephen Warren [Wed, 5 Feb 2014 16:24:57 +0000 (09:24 -0700)]
ARM: tegra: convert tegra to use distro defaults

Modify all Tegra boards to include the "distro defaults" header, so that
all the config options distros expect are enabled. Remove any #defines
that enable the same options from the Tegra files.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
10 years agoARM: tegra: set CONFIG_SYS_USB_EHCI_MAX_ROOT_PORTS
Stephen Warren [Mon, 10 Feb 2014 20:11:53 +0000 (13:11 -0700)]
ARM: tegra: set CONFIG_SYS_USB_EHCI_MAX_ROOT_PORTS

Tegra's EHCI controllers only have a single PORTSC register. Configure
U-Boot to know this. This prevents e.g. ehci_shutdown() from touching
non-existent registers.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
10 years agoARM: tegra: simplify halt_avp()
Stephen Warren [Mon, 3 Feb 2014 21:03:27 +0000 (14:03 -0700)]
ARM: tegra: simplify halt_avp()

In order to completely halt the AVP processor, we should simply write
FLOW_MODE_STOP without any extra options that allow wakeup. Amend the
code to do this.

I believe that enabling FIQ_1 and IRQ_1 allow the CPU to be awoken by
interrupts. We don't want this; if later SW wishes to use the AVP, it
should be reset and booted from scratch.

Related, the bits that were previously IRQ_1 and FIQ_1 have a slightly
different definition starting with Tegra114, so the values we're
writing don't entirely make sense there anyway.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
10 years agoARM: tegra: fix NV_PA_CSITE_BASE for Tegra124
Stephen Warren [Mon, 3 Feb 2014 21:03:26 +0000 (14:03 -0700)]
ARM: tegra: fix NV_PA_CSITE_BASE for Tegra124

Tegra124 moved the CSITE block's base address. Fix U-Boot to use
the correct address.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
10 years agoARM: tegra: fix pmc_pwrgate_timer_mult register definition
Stephen Warren [Mon, 3 Feb 2014 21:03:25 +0000 (14:03 -0700)]
ARM: tegra: fix pmc_pwrgate_timer_mult register definition

Register pmc_pwrgate_timer_mult has a different layout on Tegra114 and
Tegra124. Reflect this in pmc.h.

Also, simply write the whole of the register in start_cpu() rather than
doing a read-modify-write; the register is simple enough that the code
can easily construct the entire desired value.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
10 years agoARM: tegra: move CONFIG_TEGRAnn
Stephen Warren [Mon, 3 Feb 2014 21:03:24 +0000 (14:03 -0700)]
ARM: tegra: move CONFIG_TEGRAnn

<asm/arch-tegra/tegra.h> needs to use CONFIG_TEGRA* to conditionalize
some definitions, since some modules moved between generations. Move
the definition of CONFIG_TEGRAnn to a header that's included earlier,
so that it's set by the time tegra.h needs to use it.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
10 years agoMerge branch 'master' of git://git.denx.de/u-boot-nand-flash
Tom Rini [Wed, 5 Mar 2014 02:23:42 +0000 (21:23 -0500)]
Merge branch 'master' of git://git.denx.de/u-boot-nand-flash

10 years agomtd: nand: omap: move omap_elm.h from arch/arm/include/asm to drivers/mtd/nand
pekon gupta [Fri, 22 Nov 2013 11:23:30 +0000 (16:53 +0530)]
mtd: nand: omap: move omap_elm.h from arch/arm/include/asm to drivers/mtd/nand

omap_elm.h is a generic header used by OMAP ELM driver for all TI platfoms.
Hence this file should be present in generic folder instead of architecture
specific include folder.
Build tested using: ./MAKEALL -s am33xx -s omap3 -s omap4 -s omap5

Signed-off-by: Pekon Gupta <pekon@ti.com>
10 years agomtd: nand: omap: move omap_gpmc.h from arch/arm/include/asm to drivers/mtd/nand
pekon gupta [Fri, 22 Nov 2013 11:23:29 +0000 (16:53 +0530)]
mtd: nand: omap: move omap_gpmc.h from arch/arm/include/asm to drivers/mtd/nand

omap_gpmc.h is a generic header used by OMAP NAND driver for all TI platfoms.
Hence this file should be present in generic folder instead of architecture
specific include folder.
Build tested using: ./MAKEALL -s am33xx -s omap3 -s omap4 -s omap5

Signed-off-by: Pekon Gupta <pekon@ti.com>
10 years agomtd: nand: omap: merge duplicate GPMC data from different arch-xx headers into common...
pekon gupta [Fri, 22 Nov 2013 11:23:28 +0000 (16:53 +0530)]
mtd: nand: omap: merge duplicate GPMC data from different arch-xx headers into common omap_gpmc.h

Each SoC platform (AM33xx, OMAP3, OMAP4, OMAP5) has its own copy of GPMC related
defines and declarations scattered in SoC platform specific header files
like include/asm/arch-xx/cpu.h
However, GPMC hardware remains same across all platforms thus this patch merges
GPMC data scattered across different arch-xx specific header files into single
header file include/asm/arch/omap_gpmc.h

Build tested using: ./MAKEALL -s am33xx -s omap3 -s omap4 -s omap5

Signed-off-by: Pekon Gupta <pekon@ti.com>
10 years agomtd: nand: omap: remove unused #defines from common omap_gpmc.h
pekon gupta [Fri, 22 Nov 2013 11:23:27 +0000 (16:53 +0530)]
mtd: nand: omap: remove unused #defines from common omap_gpmc.h

OMAP NAND driver can detect Page-size and OOB-size of NAND device from ONFI
params or nand_id[] table. And based on that it defines ECC layout.
This patch
1) removes following board configs used for defining NAND ECC layout
- GPMC_NAND_ECC_LP_x16_LAYOUT (for large page x16 NAND)
- GPMC_NAND_ECC_LP_x8_LAYOUT  (for large page x8 NAND)
- GPMC_NAND_ECC_SP_x16_LAYOUT (for small page x16 NAND)
- GPMC_NAND_ECC_SP_x8_LAYOUT  (for small page x8 NAND)

2) removes unused #defines in common omap_gpmc.h depending on above configs

Build tested using: ./MAKEALL -s am33xx -s omap3 -s omap4 -s omap5

Signed-off-by: Pekon Gupta <pekon@ti.com>
10 years agomtd: nand: omap: remove redundant platform specific header: arch-xx/omap_gpmc.h
pekon gupta [Fri, 22 Nov 2013 11:23:26 +0000 (16:53 +0530)]
mtd: nand: omap: remove redundant platform specific header: arch-xx/omap_gpmc.h

Currently there are two sets of omap_gpmc.h header files
(a) arch/arm/include/asm/omap_gpmc.h
 common header file for all platforms, containing defines and declarations used
 by GPMC NAND driver.

(b) arch/arm/include/asm/arch-xx/omap_gpmc.h
 SoC platform specific header file containing defines like ECC layout.

This patch removes platform specific arch-xx/omap_gpmc.c because:
 - GPMC hardware engine is common for all SoC platforms hence only (a) is enough
 - ECC layout is now defined in omap_nand.c driver itself based on ecc-scheme
   selected. Hence all ECC layout declarations in (b) are redundant.

Build tested using: ./MAKEALL -s am33xx -s omap3 -s omap4 -s omap5

Signed-off-by: Pekon Gupta <pekon@ti.com>
10 years agoMerge branch 'master' of git://git.denx.de/u-boot-mips
Tom Rini [Tue, 4 Mar 2014 23:13:06 +0000 (18:13 -0500)]
Merge branch 'master' of git://git.denx.de/u-boot-mips

10 years agomalta: correct tcl script path in README.malta
James Hogan [Tue, 4 Mar 2014 14:48:42 +0000 (14:48 +0000)]
malta: correct tcl script path in README.malta

README.malta referred to board/malta, but malta has now been moved
within board/imgtec/, so correct the path.

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Cc: Daniel Schwierzeck <daniel.schwierzeck@googlemail.com>
Cc: Paul Burton <paul.burton@imgtec.com>
10 years agoMIPS: fix types u64 and __u64 to unsigned long long
Daniel Schwierzeck [Tue, 4 Mar 2014 22:01:11 +0000 (23:01 +0100)]
MIPS: fix types u64 and __u64 to unsigned long long

Linux MIPS uses asm-generic/int-ll64.h in asm/types.h.
Thus u64 and __u64 are defined as unsigned long long. Port this
over to U-Boot.

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
10 years agoarc: arcangel4: set board entry <none> to fix a build error
Masahiro Yamada [Mon, 3 Mar 2014 10:03:18 +0000 (19:03 +0900)]
arc: arcangel4: set board entry <none> to fix a build error

There are no source files in board/synopsys/arcangel4/
directory.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Alexey Brodkin <Alexey.Brodkin@synopsys.com>
10 years agokbuild: allow empty board directories
Masahiro Yamada [Mon, 3 Mar 2014 10:03:17 +0000 (19:03 +0900)]
kbuild: allow empty board directories

U-Boot has compelled all boards to have
board/${BOARD}/ or board/${VENDOR}/${BOARD}/ directory.

Sometimes it does not seem suitable for some boards,
for example Sandbox. (Is it a board?)

And arcangel4 board has nothing to compile
under the board directory.

This commit makes the build system more flexible:
If '<none>' is given to the 6th column (=Board name) of boards.cfg,
Kbuild will not descend into the board directory.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
10 years agokbuild: tools: fix a bug that always builds Denx logo
Masahiro Yamada [Mon, 3 Mar 2014 09:40:56 +0000 (18:40 +0900)]
kbuild: tools: fix a bug that always builds Denx logo

LOGO_BMP was never overwritten by board-specific or
vendor-specific logos.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Reported-by: Bo Shen <voice.shen@atmel.com>
Tested-by: Bo Shen <voice.shen@atmel.com>
10 years agokbuild: add "cross_tools" target to build tools for the target
Masahiro Yamada [Mon, 3 Mar 2014 02:06:19 +0000 (11:06 +0900)]
kbuild: add "cross_tools" target to build tools for the target

Programs in tools/ directory are usually built for the host.
But some of them (mkimage, dumpimge, gen_eth_addr, etc.) are
useful on the target OS too.

Actually, prior to Kbuild, U-Boot could build tools for
the target like follows:

  $ make <target_board>_config
  $ export CROSS_COMPILE=<cross_gcc_prefix>
  $ make HOSTCC=${CROSS_COMPILE}gcc HOSTSTRIP=${CROSS_COMPILE}strip tools

In Kbuild, we can no longer replace HOSTCC at the command line.

In order to get back that feature, this commit adds "cross-tools" target.

Usage:

  Build tools for the host
  $ make CROSS_COMPILE=<cross_gcc_prefix> tools

  Build tools for the target
  $ make CROSS_COMPILE=<cross_gcc_prefix> cross_tools

Besides, "make cross_tools" strip tools programs because we
generally expect smaller storages on embedded systems.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Reported-by: Heiko Schocher <hs@denx.de>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Tom Rini <trini@ti.com>
Tested-by: Heiko Schocher <hs@denx.de>
Acked-by: Heiko Schocher <hs@denx.de>
10 years agokbuild: fix "tools-all" target
Masahiro Yamada [Mon, 3 Mar 2014 02:06:18 +0000 (11:06 +0900)]
kbuild: fix "tools-all" target

The top Makefile must export HOST_TOOLS_ALL to use it
in tools/Makefile.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Tested-by: Heiko Schocher <hs@denx.de>
Acked-by: Heiko Schocher <hs@denx.de>
10 years agoboard: config.mk: delete unused sinclude directive
Masahiro Yamada [Fri, 28 Feb 2014 11:12:34 +0000 (20:12 +0900)]
board: config.mk: delete unused sinclude directive

config.tmp is not there.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
10 years agoboard: .gitignore: ignore board-specific generated files
Masahiro Yamada [Fri, 28 Feb 2014 10:59:16 +0000 (19:59 +0900)]
board: .gitignore: ignore board-specific generated files

Ignore
  - board/cray/L1/bootscript.{c|image}
  - board/matrix_vision/mvblm7/bootscript.img
  - board/maxtir_vision/mvsmr/bootscript.img

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Andre Schwarz <andre.schwarz@matrix-vision.de>
10 years agoboard: gaisler: delete unnecessary include path
Masahiro Yamada [Fri, 28 Feb 2014 10:42:26 +0000 (19:42 +0900)]
board: gaisler: delete unnecessary include path

The same outputs are generated with or without -I$(TOPDIR)/board.
I cannot understand why it is necessary. Remove.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Daniel Hellstrom <daniel@gaisler.com>
10 years agokbuild: fix CROSS_COMPILE settings in config.mk
Masahiro Yamada [Fri, 28 Feb 2014 05:33:30 +0000 (14:33 +0900)]
kbuild: fix CROSS_COMPILE settings in config.mk

The syntax
  CROSS_COMIPLE ?= <cross_compiler_prefix>
does not work because config.mk is parsed after
exporting CROSS_COMPILE.

Like Linux Kernel's arch/$(ARCH)/Makefile,
we must write as follows:

  ifeq ($(CROSS_COMPILE),)
  CROSS_COMPILE := <cross_compiler_prefix>
  endif

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
10 years agokbuild: consolidate PLATFORM_LIBS
Masahiro Yamada [Thu, 27 Feb 2014 13:40:34 +0000 (22:40 +0900)]
kbuild: consolidate PLATFORM_LIBS

We had switched to Kbuild so now we can specify
PLATFORM_LIBS/PLATFORM_LIBGCC with relative path.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Tom Rini <trini@ti.com>
Acked-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
10 years agoscripts: update checkpatch.pl to latest upstream version
Tom Rini [Thu, 27 Feb 2014 13:27:28 +0000 (08:27 -0500)]
scripts: update checkpatch.pl to latest upstream version

Update to v3.14-rc4's version of checkpatch.pl.  In doing so we drop the
changes to top_of_kernel_tree() as we pass in --no-tree and drop our
changes about MAINTAINERS as that's for reporting checkpatch.pl problems
itself (and upstream has said they'll reword this section to be
clearer).

Signed-off-by: Tom Rini <trini@ti.com>
10 years agoAdd 64-bit data support for memory commands
York Sun [Thu, 27 Feb 2014 01:03:19 +0000 (17:03 -0800)]
Add 64-bit data support for memory commands

Add 64-bit data for memory commands, such as md, mw, mm, cmp. The new
size ".q " is introduced.

For 64-bit architecture, 64-bit data is enabled by default, by detecting
compiler __LP64__. It is optional for other architectures.

Signed-off-by: York Sun <yorksun@freescale.com>
10 years agodm: Remove old driver model documentation
Simon Glass [Wed, 26 Feb 2014 22:59:27 +0000 (15:59 -0700)]
dm: Remove old driver model documentation

This documentation pertains to the planned implementation of driver model
in U-Boot for each subsystem, but it has not been superseded. It is
probably better to have this documentation in the source code for each
subsystem where possible, so that docbook will pick it up. Where this does
not make sense, new documentation can be placed in some suitable file in
doc/driver-model.

Signed-off-by: Simon Glass <sjg@chromium.org>
10 years agodm: Enable gpio command to support driver model
Simon Glass [Wed, 26 Feb 2014 22:59:26 +0000 (15:59 -0700)]
dm: Enable gpio command to support driver model

Now that named GPIO banks are supported, along with a way of obtaining
the status of a GPIO (input or output), we can provide an enhanced
GPIO command for driver model. Where the driver provides its own operation
for obtaining the GPIO state, this is used, otherwise a generic version
is sufficient.

Signed-off-by: Simon Glass <sjg@chromium.org>
10 years agosandbox: Convert GPIOs to use driver model
Simon Glass [Wed, 26 Feb 2014 22:59:25 +0000 (15:59 -0700)]
sandbox: Convert GPIOs to use driver model

Convert sandbox over to use driver model GPIOs.

Signed-off-by: Simon Glass <sjg@chromium.org>
10 years agodm: Add GPIO support and tests
Simon Glass [Wed, 26 Feb 2014 22:59:24 +0000 (15:59 -0700)]
dm: Add GPIO support and tests

Add driver model support for GPIOs. Since existing GPIO drivers do not use
driver model, this feature must be enabled by CONFIG_DM_GPIO. After all
GPO drivers are converted over we can perhaps remove this config.

Tests are provided for the sandbox implementation, and are a sufficient
sanity check for basic operation.

The GPIO uclass understands the concept of named banks of GPIOs, with each
GPIO device providing a single bank. Within each bank the GPIOs are numbered
using an offset from 0 to n-1. For example a bank named 'b' with 20
offsets will provide GPIOs named b0 to b19.

Anonymous GPIO banks are also supported, and are just numbered without any
prefix.

Each time a GPIO driver is added to the uclass, the GPIOs are renumbered
accordinging, so there is always a global GPIO numbering order.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Marek Vasut <marex@denx.de>
Signed-off-by: Pavel Herrmann <morpheus.ibis@gmail.com>
Signed-off-by: Viktor Křivák <viktor.krivak@gmail.com>
Signed-off-by: Tomas Hlavacek <tmshlvck@gmail.com>
10 years agodm: Add a demonstration/example driver
Simon Glass [Wed, 26 Feb 2014 22:59:23 +0000 (15:59 -0700)]
dm: Add a demonstration/example driver

As an example of how to write a uclass and a driver, provide a demo version
of each, accessible through the 'demo' command.

To use these with driver model, define CONFIG_CMD_DEMO and CONFIG_DM_DEMO.

The two demo drivers are enabled with CONFIG_DM_DEMO_SIMPLE and
CONFIG_DM_DEMO_SHAPE.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Marek Vasut <marex@denx.de>
Signed-off-by: Pavel Herrmann <morpheus.ibis@gmail.com>
Signed-off-by: Viktor Křivák <viktor.krivak@gmail.com>
Signed-off-by: Tomas Hlavacek <tmshlvck@gmail.com>
10 years agodm: Add a 'dm' command for testing
Simon Glass [Wed, 26 Feb 2014 22:59:22 +0000 (15:59 -0700)]
dm: Add a 'dm' command for testing

This command is not required for driver model operation, but can be useful
for testing. It provides simple dumps of internal data structures.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Marek Vasut <marex@denx.de>
Signed-off-by: Pavel Herrmann <morpheus.ibis@gmail.com>
Signed-off-by: Viktor Křivák <viktor.krivak@gmail.com>
Signed-off-by: Tomas Hlavacek <tmshlvck@gmail.com>
10 years agodm: Add basic tests
Simon Glass [Wed, 26 Feb 2014 22:59:21 +0000 (15:59 -0700)]
dm: Add basic tests

Add some tests of driver model functionality. Coverage includes:

- basic init
- binding of drivers to devices using platform_data
- automatic probing of devices when referenced
- availability of platform data to devices
- lifecycle from bind to probe to remove to unbind
- renumbering within a uclass when devices are probed/removed
- calling driver-defined operations
- deactivation of drivers when removed
- memory leak across creation and destruction of drivers/uclasses
- uclass init/destroy methods
- automatic probe/remove of children/parents when needed

This function is enabled for sandbox, using CONFIG_DM_TEST.

Signed-off-by: Simon Glass <sjg@chromium.org>
10 years agodm: Set up driver model after relocation
Simon Glass [Wed, 26 Feb 2014 22:59:20 +0000 (15:59 -0700)]
dm: Set up driver model after relocation

Make driver model available after relocation, by setting up data structures
and scanning for devices using compiled-in platform_data and (when available)
the device tree.

Signed-off-by: Simon Glass <sjg@chromium.org>
10 years agosandbox: config: Enable driver model
Simon Glass [Wed, 26 Feb 2014 22:59:19 +0000 (15:59 -0700)]
sandbox: config: Enable driver model

Use driver model in sandbox to permit running of driver model unit test.

Signed-off-by: Simon Glass <sjg@chromium.org>
10 years agodm: Add base driver model support
Simon Glass [Wed, 26 Feb 2014 22:59:18 +0000 (15:59 -0700)]
dm: Add base driver model support

Add driver model functionality for generic board.

This includes data structures and base code for registering devices and
uclasses (groups of devices with the same purpose, e.g. all I2C ports will
be in the same uclass).

The feature is enabled with CONFIG_DM.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Marek Vasut <marex@denx.de>
Signed-off-by: Pavel Herrmann <morpheus.ibis@gmail.com>
Signed-off-by: Viktor Křivák <viktor.krivak@gmail.com>
Signed-off-by: Tomas Hlavacek <tmshlvck@gmail.com>
10 years agodm: Add README for driver model
Simon Glass [Wed, 26 Feb 2014 22:59:17 +0000 (15:59 -0700)]
dm: Add README for driver model

This adds a README to help with understanding of this series.

Signed-off-by: Simon Glass <sjg@chromium.org>
10 years agoyaffs: Remove private list implementation
Simon Glass [Wed, 26 Feb 2014 22:59:16 +0000 (15:59 -0700)]
yaffs: Remove private list implementation

U-Boot already has a list implementation, and files which include both
that and the yaffs implementation will get errors:

In file included from ydirectenv.h:80:0,
                 from yportenv.h:81,
                 from yaffs_guts.h:19,
                 from yaffs_allocator.h:19,
                 from yaffs_allocator.c:14:
yaffs_list.h:32:8: error: redefinition of ‘struct list_head’
 struct list_head {
        ^

Remove the yaffs implementation.

Signed-off-by: Simon Glass <sjg@chromium.org>
10 years agoAdd cmd_process_error() to report and process errors
Simon Glass [Wed, 26 Feb 2014 22:59:15 +0000 (15:59 -0700)]
Add cmd_process_error() to report and process errors

U-Boot now uses errors defined in include/errno.h which are negative
integers. Commands which fail need to report the error and return 1
to indicate failure. Add this functionality in cmd_process_error().

For now this merely reports the error number. It would be possible
also to produce a helpful error message by storing the error strings
in U-Boot.

Signed-off-by: Simon Glass <sjg@chromium.org>
10 years agosandbox: Build a device tree file for sandbox
Simon Glass [Wed, 26 Feb 2014 22:59:14 +0000 (15:59 -0700)]
sandbox: Build a device tree file for sandbox

Add support for building a device tree for sandbox's CONFIG_OF_HOSTFILE
option to make it easier to use device tree with sandbox.

This adjusts the Makefile to build a u-boot.dtb file which can be passed
to sandbox U-Boot with:

   ./u-boot -d u-boot.dtb

Signed-off-by: Simon Glass <sjg@chromium.org>
10 years agosizes.h - consolidate for all architectures
Alexey Brodkin [Wed, 26 Feb 2014 13:47:58 +0000 (17:47 +0400)]
sizes.h - consolidate for all architectures

Copied from Linux sources "include/linux/sizes.h" commit
413541dd66d51f791a0b169d9b9014e4f56be13c

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Cc: Vineet Gupta <vgupta@synopsys.com>
Cc: Tom Rini <trini@ti.com>
Cc: Stefan Roese <sr@denx.de>
Cc: Albert Aribaud <albert.u.boot@aribaud.net>
Acked-by: Tom Rini <trini@ti.com>
Acked-by: Stefan Roese <sr@denx.de>
[trini: Add bcm Kona platforms to the patch]
Signed-off-by: Tom Rini <trini@ti.com>