]> git.sur5r.net Git - u-boot/log
u-boot
12 years agoBOOT: Add "bootz" command to boot Linux zImage on ARM
Marek Vasut [Wed, 14 Mar 2012 21:52:45 +0000 (21:52 +0000)]
BOOT: Add "bootz" command to boot Linux zImage on ARM

This command boots Linux zImage from where the zImage is loaded to. Passing
initrd and fdt is supported.

Tested on i.MX28 based DENX M28EVK
Tested on PXA270 based Voipac PXA270.

NOTE: This currently only supports ARM, but other architectures can be easily
added by defining bootz_setup().

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Tom Warren <TWarren@nvidia.com>
Cc: albert.u.boot@aribaud.net
Cc: afleming@gmail.com,
Cc: Simon Glass <sjg@chromium.org>,
Cc: Stephen Warren <swarren@nvidia.com>
Cc: Nicolas Pitre <nico@fluxnic.net>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Detlev Zundel <dzu@denx.de>
12 years agomx28evk: fix build error
Anatolij Gustschin [Fri, 30 Mar 2012 05:45:27 +0000 (05:45 +0000)]
mx28evk: fix build error

Fix:
drivers/mmc/libmmc.o: In function `mxsmmc_send_cmd':
/home/ag/git/u-boot/drivers/mmc/mxsmmc.c:210: undefined reference to `mxs_dma_desc_append'
/home/ag/git/u-boot/drivers/mmc/mxsmmc.c:211: undefined reference to `mxs_dma_go'
drivers/mmc/libmmc.o: In function `mxsmmc_initialize':
/home/ag/git/u-boot/drivers/mmc/mxsmmc.c:306: undefined reference to `mxs_dma_desc_alloc'

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Fabio Estevam <fabio.estevam@freescale.com>
12 years agopci: declare pciauto functions in header
Linus Walleij [Sun, 25 Mar 2012 12:13:15 +0000 (12:13 +0000)]
pci: declare pciauto functions in header

The FSL PCI driver uses local prototypes for
pciauto_[pre|post]scan_setup_bridge(), this does not seem right,
so move them to the <pci.h> file.

Fixed a small extern declaration too, this is harmless but distracts
the view since all other prototypes are explicitly external.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
12 years agopci: get rid of local prototypes
Linus Walleij [Sun, 25 Mar 2012 12:13:05 +0000 (12:13 +0000)]
pci: get rid of local prototypes

two boards were redeclaring pciauto_region_allocate() in their local
scope for no obvious reason, the function is in <pci.h> anyway,
this is probably just copying artifacts and old cruft.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
12 years agoAdd support for loading and saving the environment to a FAT partition
Maximilian Schwerin [Mon, 12 Mar 2012 23:57:50 +0000 (23:57 +0000)]
Add support for loading and saving the environment to a FAT partition

The following must be defined:

CONFIG_ENV_IS_IN_FAT
Enable this saving environment to FAT.

FAT_ENV_INTERFACE
Interface the FAT resides on (e.g. mmc).

FAT_ENV_DEVICE
The interface device number (e.g. 0 for mmc0)

FAT_ENV_PART
The device part (e.g. 1 for mmc0:1)

FAT_ENV_FILE
The filename of the environment file.

Author:    Maximilian Schwerin <mvs@tigris.de>

Removed dead DEBUG comment.
Signed-off-by: Wolfgang Denk <wd@denx.de>
12 years agoMAKEALL: Add -m/-M option to determine maintainers
Marek Vasut [Mon, 5 Mar 2012 15:10:51 +0000 (15:10 +0000)]
MAKEALL: Add -m/-M option to determine maintainers

The -m option tries to find the board in MAINTAINERS file and figure out the
email. The -M option lists boards including their maintainers emails and all
affiliated emails. There are multiple strategies used to retrieve these emails:

1) Check board/<boardname> with git log and use three most recent emails
2) Check board/<boardname> with git log and use three most used emails
3) Try finding board in MAINTAINERS file and retrieve all emails from there

The result is then sorted and unique results are retrieved and reported.

For -m option, only strategy 3) is used.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Wolfgang Denk <wd@denx.de>
12 years agocmd_log: print log->v2.con value in the "log info" command
Heiko Schocher [Tue, 14 Feb 2012 22:21:07 +0000 (22:21 +0000)]
cmd_log: print log->v2.con value in the "log info" command

print in the "log info" command, if "log_version = 2" also the
value from "log->v2.con".

Signed-off-by: Heiko Schocher <hs@denx.de>
Acked-by: Detlev Zundel <dzu@denx.de>
12 years agocommand, log: Coding Style cleanup
Heiko Schocher [Tue, 14 Feb 2012 22:21:06 +0000 (22:21 +0000)]
command, log: Coding Style cleanup

Signed-off-by: Heiko Schocher <hs@denx.de>
Acked-by: Detlev Zundel <dzu@denx.de>
12 years agocommand, log: print with "log show" a full logbuffer
Heiko Schocher [Thu, 16 Feb 2012 01:02:21 +0000 (01:02 +0000)]
command, log: print with "log show" a full logbuffer

If the logbuffer contains LOGBUFF_LEN chars, they never got
printed with the "log show" command, because chars get
printed with the following for loop:

for (i = 0; i < (size & LOGBUFF_MASK); i++) {

with size = LOGBUFF_LEN and LOGBUFF_MASK = (LOGBUFF_LEN-1)
for loop never executed ...

Fix this.

Signed-off-by: Heiko Schocher <hs@denx.de>
Acked-by: Detlev Zundel <dzu@denx.de>
Fixed merge conflict.
Signed-off-by: Wolfgang Denk <wd@denx.de>
12 years agodrivers/mmc/mmc.c: Fix build warning
Anatolij Gustschin [Wed, 28 Mar 2012 21:24:32 +0000 (21:24 +0000)]
drivers/mmc/mmc.c: Fix build warning

Fix:
mmc.c: In function 'mmc_bounce_buffer_start':
mmc.c:132:13: warning: no return statement in function returning
non-void [-Wreturn-type]

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Cc: Andy Fleming <afleming@gmail.com>
Cc: Marek Vasut <marex@denx.de>
Acked-by: Marek Vasut <marex@denx.de>
12 years agodrivers/mmc/tegra2_mmc.c: fix GCC 4.6 warning
Anatolij Gustschin [Wed, 28 Mar 2012 03:40:00 +0000 (03:40 +0000)]
drivers/mmc/tegra2_mmc.c: fix GCC 4.6 warning

Fix:
tegra2_mmc.c: In function 'mmc_send_cmd':
tegra2_mmc.c:230:3: warning: 'mask' may be used uninitialized in this
function [-Wuninitialized]

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Cc: Doug Anderson <dianders@chromium.org>
Cc: Tom Warren <twarren@nvidia.com>
12 years agoMerge branch 'master' of /home/wd/git/u-boot/custodians
Wolfgang Denk [Fri, 30 Mar 2012 18:17:11 +0000 (20:17 +0200)]
Merge branch 'master' of /home/wd/git/u-boot/custodians

* 'master' of /home/wd/git/u-boot/custodians:
  lzma: fix printf warnings
  Remove CONFIG_SYS_EXTBDINFO from snapper9260.h
  cmd_pxe.c: fix strict-aliasing warnings
  net: smc91111: use mdelay()
  doc: Fix some typos in different files
  disk/part.c: Fix device enumeration through API
  mkenvimage: Really set the redundant byte when applicable
  mkenvimage: Don't try to detect comments in the input file
  mkenvimage: Use mmap() when reading from a regular file
  mkenvimage: Read/Write from/to stdin/out by default or if the filename is "-"
  mkenvimage: More error handling
  mkenvimage: Correct an include and add a missing one
  mkenvimage: correct and clarify comments and error messages
  MAKEALL: display SPL size if present
  ARMV7/Vexpress: add missing get_ticks() and get_tbclk()
  mkenvimage: fix usage message
  cmd_fat: add FAT write command
  fs/fat/fat_write.c: Fix GCC 4.6 warnings
  FAT write: Fix compile errors

12 years agoMerge branch 'agust@denx.de' of git://git.denx.de/u-boot-staging
Wolfgang Denk [Fri, 30 Mar 2012 18:17:02 +0000 (20:17 +0200)]
Merge branch 'agust@denx.de' of git://git.denx.de/u-boot-staging

* 'agust@denx.de' of git://git.denx.de/u-boot-staging:
  lzma: fix printf warnings
  Remove CONFIG_SYS_EXTBDINFO from snapper9260.h
  cmd_pxe.c: fix strict-aliasing warnings
  net: smc91111: use mdelay()
  doc: Fix some typos in different files
  disk/part.c: Fix device enumeration through API
  mkenvimage: Really set the redundant byte when applicable
  mkenvimage: Don't try to detect comments in the input file
  mkenvimage: Use mmap() when reading from a regular file
  mkenvimage: Read/Write from/to stdin/out by default or if the filename is "-"
  mkenvimage: More error handling
  mkenvimage: Correct an include and add a missing one
  mkenvimage: correct and clarify comments and error messages
  MAKEALL: display SPL size if present
  ARMV7/Vexpress: add missing get_ticks() and get_tbclk()
  mkenvimage: fix usage message
  cmd_fat: add FAT write command
  fs/fat/fat_write.c: Fix GCC 4.6 warnings
  FAT write: Fix compile errors

12 years agopost: remove #warning for kirkwood CPUs
Valentin Longchamp [Fri, 30 Mar 2012 03:29:28 +0000 (03:29 +0000)]
post: remove #warning for kirkwood CPUs

Since commit 96f5c4b the needed functions (get_ticks() and get_tbclk() )
are defined for kirkwood CPUs as well. This warning is then not relevant
anymore.

Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
cc: Holger Brunck <holger.brunck@keymile.com>
cc: Prafulla Wadaskar <prafulla@marvell.com>
cc: Albert Aribaud <albert.u.boot@aribaud.net>

12 years agoMerge branch 'master' of git://git.denx.de/u-boot-arm
Wolfgang Denk [Fri, 30 Mar 2012 16:09:08 +0000 (18:09 +0200)]
Merge branch 'master' of git://git.denx.de/u-boot-arm

* 'master' of git://git.denx.de/u-boot-arm: (146 commits)
  arm: Use common .lds file where possible
  arm: add a common .lds link script
  arm: Remove unneeded setting of LDCSRIPT
  Define CPUDIR for the .lds link script
  arm: Remove zipitz2 link script
  Allow arch directory to contain .lds without requiring Makefile
  OMAP: Remove omap1610inn-based boards
  arch/arm/cpu/armv7/omap-common/clocks-common.c: Fix build warnings
  board/ti/beagle/beagle.c: Fix build warnings
  sdrc.c: Fix typo in do_sdrc_init() for SPL
  tegra: i2c: Add I2C driver
  tegra: fdt: i2c: Add extra I2C bindings for U-Boot
  tegra: i2c: Select I2C ordering for Seaboard
  tegra: i2c: Enable I2C on Seaboard
  tegra: i2c: Select number of controllers for Tegra2 boards
  tegra: i2c: Initialise I2C on Nvidia boards
  tegra: Enhance clock support to handle 16-bit clock divisors
  fdt: Add function to allow aliases to refer to multiple nodes
  tegra: Rename NV_PA_PMC_BASE to TEGRA2_PMC_BASE
  tegra: fdt: Enable FDT support for Ventana
  tegra: fdt: Enable FDT support for Seaboard
  tegra: usb: Enable USB on Seaboard
  tegra: usb: Add common USB defines for tegra2 boards
  tegra: usb: Add USB support to nvidia boards
  arm: Check for valid FDT after console is up
  fdt: Avoid early panic() when there is no FDT present
  tegra: usb: Add support for Tegra USB peripheral
  tegra: fdt: Add function to return peripheral/clock ID
  usb: Add support for txfifo threshold
  tegra: usb: fdt: Add USB definitions for Tegra2 Seaboard
  tegra: usb: fdt: Add additional device tree definitions for USB ports
  tegra: fdt: Add clock bindings for Tegra2 Seaboard
  tegra: fdt: Add clock bindings
  tegra: fdt: Add additional USB binding
  fdt: Add tegra-usb bindings file from linux
  fdt: Add staging area for device tree binding documentation
  tegra: fdt: Add device tree file for Tegra2 Seaboard from kernel
  tegra: fdt: Add Tegra2x device tree file from kernel
  arm: fdt: Add skeleton device tree file from kernel
  fdt: Add basic support for decoding GPIO definitions
  fdt: Add functions to access phandles, arrays and bools
  fdt: Tidy up a few fdtdec problems
  fdt: Add tests for fdtdec
  fdt: Add fdtdec_find_aliases() to deal with alias nodes
  arm: Tegra2: Fix ELDK42 gcc failure with inline asm stack pointer load
  net: fec_mxc: allow use with cache enabled
  net: force PKTALIGN to ARCH_DMA_MINALIGN
  i.MX28: Enable caches by default
  i.MX28: Make use of the bounce buffer
  i.MX28: Do data transfers via DMA in MMC driver
  MMC: Implement generic bounce buffer
  i.MX28: Add cache support to MXS NAND driver
  i.MX28: Add cache support into the APBH DMA driver
  ARM926EJS: Implement cache operations
  board/vpac270/onenand.c: Fix build errors
  nhk8815: fix build errors
  atmel-boards: add missing atmel_mci.h
  ARM: highbank: setup env from boot source register
  ARM: highbank: change env config to use nvram
  ARM: highbank: add reset support
  ARM: highbank: Add boot counter support
  ARM: highbank: change TEXT_BASE to 0x8000
  ARM: highbank: fix us_to_tick calculation
  ARM: highbank: add missing get_tbclk
  ARM: highbank: fix warning for calxedaxgmac_initialize
  net: calxedaxgmac: fix build due to missing __aligned definition
  EXYNOS: Add structure for Exynos4 DMC
  EXYNOS: SMDK5250: Support all 4 UARTs
  ARM: fix s3c2410 timer code
  ARM: davinci: fixes for cam_enc_4xx board
  omap3_spi: receive transmit mode
  calimain, enbw_cmc: Fix typo in comments
  Davinci: ea20: use gpio framework to access gpios
  OMAP3: mt_ventoux: sets its own mtdparts
  OMAP3: mt_ventoux: updated timing for FPGA
  twl4030: fix potential power supply handling issues
  NAND: TI: fix warnings in omap_gpmc.c
  cam_enc_4xx: Rename 'images' to 'imgs'
  arm: Add Prep subcommand support to bootm
  OMAP3: twister: add support to boot Linux from SPL
  SPL: call cleanup_before_linux() before booting Linux
  OMAP3: SPL: do not call I2C init if no I2C is set.
  Add cache functions to SPL for armv7
  devkit8000: Implement and activate direct OS boot
  omap/spl: change output of spl_parse_image_header
  omap-common/spl: Add linux boot to SPL
  devkit8000/spl: init GPMC for dm9000 in SPL
  omap-common: Add NAND SPL linux booting
  devkit8000: add config for spl command
  Add cmd_spl command
  mx53ard: Initialize return code with error
  mx53: Make PLL2 to be the parent of UART clock
  configs: imx: Use CONFIG_SF_DEFAULT_CS
  mx28evk: Provide default values for SPI bus and chip select
  USB: ehci-mx6: Add proper IO accessors
  mx6: Read silicon revision from register
  i.MX28: Drop __naked function from spl_mem_init
  mxs_spi: Return proper timeout error
  i.MX28: Make the stabilization delays shorter
  pmic_i2c: Return error in case of invalid pmic_i2c_tx_num
  mx6: Remove duplicate definition of ANATOP_BASE_ADDR
  mx6: Fix reset cause for Power On Reset case
  i.MX6: mx6qsabrelite: add MACH_TYPE_MX6Q_SABRELITE
  i.MX6: mx6q_sabrelite: add CONFIG_REVISION_TAG
  i.MX28: Enable additional DRAM address bits
  mx6q: mx6qsabrelite: setup_spi() should be called in board_init to allow use for environment
  mx31: add "ARM11P power gating" to get_reset_cause
  mx31pdk: Fix CONFIG_SYS_MEMTEST_END
  efikamx: Fix CONFIG_SYS_MEMTEST_END
  mx53smd: Fix CONFIG_SYS_MEMTEST_END
  mx53evk: Fix CONFIG_SYS_MEMTEST_END
  mx51evk: Fix CONFIG_SYS_MEMTEST_END
  i.MX6: mx6qsabrelite: add ext2 support
  imximage: Remove overwriting of flash_offset
  IXP: Fix GPIO_INT_ACT_LOW_SET()
  IXP: Fix NAND build warning on PDNB3 and SCPU
  IXP: Move PDNB3 and SCPU from Makefile to boards.cfg
  IXP: Squash warnings in IXP NPE
  IXP: Fix missing MACH_TYPE_{ACTUX?,PNB3,DVLHOST}
  IXP: Make IXP buildable with arm-linux- toolchains
  Examples: Properly append LDFLAGS to LD command
  SPL: Enable YMODEM support on BeagleBone and AM335x EVM
  SPL: Add YMODEM over UART load support
  SPL: Add README.omap3
  README: document more SPL config options
  spl.c: Use __noreturn decorator
  config.mk: Check for -fstack-usage support
  config.mk: Make cc-option create a file under include/generated
  ...

12 years agoMerge branch 'master' of git://git.denx.de/u-boot-microblaze
Wolfgang Denk [Fri, 30 Mar 2012 16:01:39 +0000 (18:01 +0200)]
Merge branch 'master' of git://git.denx.de/u-boot-microblaze

* 'master' of git://git.denx.de/u-boot-microblaze:
  microblaze: Enable phylib and mii support

12 years agoarm: Use common .lds file where possible
Simon Glass [Mon, 20 Feb 2012 20:17:52 +0000 (20:17 +0000)]
arm: Use common .lds file where possible

Each cpu directory currently has its own .lds file. This is only needed
in most cases because the start.o file is in a different subdir.

Now that we can factor out this difference, we can move most cpus over
to the common .lds file.

Signed-off-by: Simon Glass <sjg@chromium.org>
12 years agoarm: add a common .lds link script
Simon Glass [Thu, 23 Feb 2012 03:28:41 +0000 (03:28 +0000)]
arm: add a common .lds link script

Most ARM CPUs use a very similar link script. This adds a basic
script that can be used by most CPUs.

Two new symbols are introduced which are intended to eventually be
defined on all architectures to make things easier for generic relocation
and reduce special-case code for each architecture:

__image_copy_start is the start of the text area (equivalent to the
existing _start on ARM). It marks the start of the region which must be
copied to a new location during relocation. This symbol is called
__text_start on x86 and microblaze.

__image_copy_end is the end of the region which must be copied to a new
location during relocation. It is normally equal to the start of the BSS
region, but this can vary in some cases (SPL?). Making this an explicit
symbol on its own removes any ambiguity and permits common code to always
do the right thing.

This new script makes use of CPUDIR, now defined by both Makefile and
spl/Makefile, to find the directory containing the start.o object file,
which is always placed first in the image.

To permit MMU setup prior to relocation (as used by pxa) we add an area
to the link script which contains space for this. This is taken
from commit 7f4cfcf. CPUs can put the contents in there using their
start.S file. BTW, shouldn't that area be 16KB-aligned?

Signed-off-by: Simon Glass <sjg@chromium.org>
12 years agoarm: Remove unneeded setting of LDCSRIPT
Simon Glass [Mon, 21 Nov 2011 10:49:41 +0000 (10:49 +0000)]
arm: Remove unneeded setting of LDCSRIPT

This is set by the top level Makefile anyway, so drop it. This does
have the effect of changing the order - now the board link script will
have preference over the CPU one. But this seems more correct anyway.

Signed-off-by: Simon Glass <sjg@chromium.org>
12 years agoDefine CPUDIR for the .lds link script
Simon Glass [Mon, 21 Nov 2011 10:49:40 +0000 (10:49 +0000)]
Define CPUDIR for the .lds link script

Most link scripts differ only in the directory containing the start.o
file. Make this a #define to remove this last difference.

(Note that if start.o were disallowed outside the CPU start directory then
we wouldn't even need this. But that is a separate discussion.)

Signed-off-by: Simon Glass <sjg@chromium.org>
12 years agoarm: Remove zipitz2 link script
Simon Glass [Mon, 21 Nov 2011 10:49:39 +0000 (10:49 +0000)]
arm: Remove zipitz2 link script

This link script doesn't appear to do anything useful or unique, so
drop it, and rely on the CPU one.

Signed-off-by: Simon Glass <sjg@chromium.org>
12 years agoAllow arch directory to contain .lds without requiring Makefile
Simon Glass [Mon, 21 Nov 2011 10:49:37 +0000 (10:49 +0000)]
Allow arch directory to contain .lds without requiring Makefile

The Makefile for a CPU is in arch/($ARCH)/cpu/$(CPU). We want to support
having an .lds file in arch/$(ARCH)/cpu without requiring an additional
Makefile there. This change makes it clear that we expect a Makefile in
the same directory as the link script except in this case.

Signed-off-by: Simon Glass <sjg@chromium.org>
12 years agoOMAP: Remove omap1610inn-based boards
Tom Rini [Wed, 28 Mar 2012 06:26:18 +0000 (06:26 +0000)]
OMAP: Remove omap1610inn-based boards

The CS_AUTOBOOT configurations have been broken for a long time.
Kshitij Gupta is no longer at TI making these broken and orphaned
boards, so remove.

Signed-off-by: Tom Rini <trini@ti.com>
12 years agoarch/arm/cpu/armv7/omap-common/clocks-common.c: Fix build warnings
Anatolij Gustschin [Tue, 27 Mar 2012 23:13:43 +0000 (23:13 +0000)]
arch/arm/cpu/armv7/omap-common/clocks-common.c: Fix build warnings

Fix:
clocks-common.c: In function 'setup_non_essential_dplls':
clocks-common.c:323:6: warning: variable 'sys_clk_khz' set but not used
[-Wunused-but-set-variable]
clocks-common.c: In function 'setup_non_essential_dplls':
clocks-common.c:323:6: warning: variable 'sys_clk_khz' set but not used
[-Wunused-but-set-variable]

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Cc: Tom Rini <trini@ti.com>
12 years agoboard/ti/beagle/beagle.c: Fix build warnings
Anatolij Gustschin [Tue, 27 Mar 2012 23:05:07 +0000 (23:05 +0000)]
board/ti/beagle/beagle.c: Fix build warnings

Fix:
beagle.c:257:13: warning: function declaration isn't a prototype
[-Wstrict-prototypes]
beagle.c:257:13: warning: function declaration isn't a prototype
[-Wstrict-prototypes]

Also make beagle_dvi_pup() checkpatch clean, fix:
ERROR: open brace '{' following function declarations go on the
next line

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Cc: Tom Rini <trini@ti.com>
12 years agosdrc.c: Fix typo in do_sdrc_init() for SPL
Tom Rini [Fri, 16 Mar 2012 07:55:32 +0000 (07:55 +0000)]
sdrc.c: Fix typo in do_sdrc_init() for SPL

We need to setup CS0 and CS1 not CS0 and CS0 again.

Signed-off-by: Tom Rini <trini@ti.com>
12 years agotegra: i2c: Add I2C driver
Yen Lin [Tue, 6 Mar 2012 19:00:23 +0000 (19:00 +0000)]
tegra: i2c: Add I2C driver

Add basic i2c driver for Tegra2 with 8- and 16-bit address support.
The driver requires CONFIG_OF_CONTROL to obtain its configuration
from the device tree.

(Simon Glass: sjg@chromium.org modified for upstream)

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Heiko Schocher <hs@denx.de>
Acked-by: Stephen Warren <swarren@wwwdotorg.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
12 years agotegra: fdt: i2c: Add extra I2C bindings for U-Boot
Simon Glass [Tue, 6 Mar 2012 19:00:22 +0000 (19:00 +0000)]
tegra: fdt: i2c: Add extra I2C bindings for U-Boot

Add U-Boot's peripheral clock information to the Tegra20 device tree file.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Stephen Warren <swarren@wwwdotorg.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
12 years agotegra: i2c: Select I2C ordering for Seaboard
Simon Glass [Wed, 29 Feb 2012 07:31:27 +0000 (07:31 +0000)]
tegra: i2c: Select I2C ordering for Seaboard

Select the port ordering for I2C on Seaboard.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
12 years agotegra: i2c: Enable I2C on Seaboard
Simon Glass [Fri, 3 Feb 2012 15:14:00 +0000 (15:14 +0000)]
tegra: i2c: Enable I2C on Seaboard

This enables I2C on Seaboard.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Heiko Schocher <hs@denx.de>
Signed-off-by: Tom Warren <twarren@nvidia.com>
12 years agotegra: i2c: Select number of controllers for Tegra2 boards
Simon Glass [Fri, 3 Feb 2012 15:13:59 +0000 (15:13 +0000)]
tegra: i2c: Select number of controllers for Tegra2 boards

The Tegra 2x SOC has four ports, so define TEGRA_I2C_NUM_CONTROLLERS
in the shared config file.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Heiko Schocher <hs@denx.de>
Signed-off-by: Tom Warren <twarren@nvidia.com>
12 years agotegra: i2c: Initialise I2C on Nvidia boards
Simon Glass [Fri, 3 Feb 2012 15:13:57 +0000 (15:13 +0000)]
tegra: i2c: Initialise I2C on Nvidia boards

This enables I2C on all Nvidia boards including Seaboard and
Harmony.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Heiko Schocher <hs@denx.de>
Signed-off-by: Tom Warren <twarren@nvidia.com>
12 years agotegra: Enhance clock support to handle 16-bit clock divisors
Simon Glass [Fri, 3 Feb 2012 15:13:54 +0000 (15:13 +0000)]
tegra: Enhance clock support to handle 16-bit clock divisors

I2C ports have a 16-bit clock divisor. Add code to handle this special
case so that I2C speeds below 150KHz are supported.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
12 years agofdt: Add function to allow aliases to refer to multiple nodes
Simon Glass [Fri, 3 Feb 2012 15:13:53 +0000 (15:13 +0000)]
fdt: Add function to allow aliases to refer to multiple nodes

Some devices can deal with multiple compatible properties. The devices
need to know which nodes to bind to which features. For example an
I2C driver which supports two different controller types will want to
know which type it is dealing with in each case.

The new fdtdec_add_aliases_for_id() function deals with this by allowing
the driver to search for additional compatible nodes for a different ID.
It can then detect the new ones and perform appropriate processing.

Another option considered was to return a tuple (node offset, compat id)
and have the function be passed a list of compatible IDs. This is more
overhead for the common case though. We may add such a function later if
more drivers in U-Boot require it.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
12 years agotegra: Rename NV_PA_PMC_BASE to TEGRA2_PMC_BASE
Simon Glass [Fri, 3 Feb 2012 15:13:52 +0000 (15:13 +0000)]
tegra: Rename NV_PA_PMC_BASE to TEGRA2_PMC_BASE

Change this name to fit with the current convention in the Tegra
header file.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
12 years agotegra: fdt: Enable FDT support for Ventana
Tom Warren [Tue, 6 Mar 2012 17:10:33 +0000 (17:10 +0000)]
tegra: fdt: Enable FDT support for Ventana

This switches Ventana over to use FDT for run-time config instead of
CONFIG options.

At present Ventana does not have its own device tree file - it just uses
the Seaboard one.

Signed-off-by: Tom Warren <twarren@nvidia.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
12 years agotegra: fdt: Enable FDT support for Seaboard
Simon Glass [Mon, 27 Feb 2012 10:52:53 +0000 (10:52 +0000)]
tegra: fdt: Enable FDT support for Seaboard

This switches Seaboard over to use FDT for run-time config instead of
CONFIG options. USB is the only user at present.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
12 years agotegra: usb: Enable USB on Seaboard
Simon Glass [Mon, 27 Feb 2012 10:52:52 +0000 (10:52 +0000)]
tegra: usb: Enable USB on Seaboard

Seaboard has a top port which is USB host or device, and a side port which
is host only.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
12 years agotegra: usb: Add common USB defines for tegra2 boards
Simon Glass [Mon, 27 Feb 2012 10:52:51 +0000 (10:52 +0000)]
tegra: usb: Add common USB defines for tegra2 boards

All Tegra2 boards should include tegra2-common. This adds the required
USB config to that file.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
12 years agotegra: usb: Add USB support to nvidia boards
Simon Glass [Mon, 27 Feb 2012 10:52:50 +0000 (10:52 +0000)]
tegra: usb: Add USB support to nvidia boards

This adds basic USB support for port 0. The other port is not supported
yet.

Tegra2 (SeaBoard) # usb start
(Re)start USB...
USB:   Register 10011 NbrPorts 1
USB EHCI 1.00
scanning bus for devices... 5 USB Device(s) found
       scanning bus for storage devices... 1 Storage Device(s) found
Tegra2 (SeaBoard) # ext2load usb 0:3 10000000 /boot/vmlinuz
Loading file "/boot/vmlinuz" from usb device 0:3 (ROOT-A)
2932976 bytes read

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
12 years agoarm: Check for valid FDT after console is up
Simon Glass [Wed, 28 Mar 2012 10:08:25 +0000 (10:08 +0000)]
arm: Check for valid FDT after console is up

When using CONFIG_OF_CONTROL, add a check that we have a valid FDT
and panic() if not. This must be done after the console is ready.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
12 years agofdt: Avoid early panic() when there is no FDT present
Simon Glass [Wed, 28 Mar 2012 10:08:24 +0000 (10:08 +0000)]
fdt: Avoid early panic() when there is no FDT present

CONFIG_OF_CONTROL requires a valid device tree. However, we cannot call
panic() before the console is set up since the message does not appear,
and we get a silent failure.

Remove the panic from fdtdec_check_fdt() and provide a new function to
prepare the fdt for use. This will be called after the console is ready.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
12 years agotegra: usb: Add support for Tegra USB peripheral
Simon Glass [Mon, 27 Feb 2012 10:52:49 +0000 (10:52 +0000)]
tegra: usb: Add support for Tegra USB peripheral

This adds basic support for the Tegra2 USB controller. Board files should
call board_usb_init() to set things up.

Configuration is performed through the FDT, with aliases used to set the
order of the ports, like this fragment:

        aliases {
/* This defines the order of our USB ports */
                usb0 = "/usb@0xc5008000";
                usb1 = "/usb@0xc5000000";
        };

drivers/usb/host files ONLY: Acked-by: Remy Bohmer <linux@bohmer.net>
Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
12 years agotegra: fdt: Add function to return peripheral/clock ID
Simon Glass [Tue, 6 Mar 2012 17:10:27 +0000 (17:10 +0000)]
tegra: fdt: Add function to return peripheral/clock ID

A common requirement is to find the clock ID for a peripheral. This is the
second cell of the 'clocks' property (the first being the phandle itself).

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Stephen Warren <swarren@wwwdotorg.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
12 years agousb: Add support for txfifo threshold
Simon Glass [Mon, 27 Feb 2012 10:52:47 +0000 (10:52 +0000)]
usb: Add support for txfifo threshold

CONFIG_USB_EHCI_TXFIFO_THRESH enables setting of the txfilltuning
field in the EHCI controller on reset.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Remy Bohmer <linux@bohmer.net>
Signed-off-by: Tom Warren <twarren@nvidia.com>
12 years agotegra: usb: fdt: Add USB definitions for Tegra2 Seaboard
Simon Glass [Mon, 27 Feb 2012 10:52:46 +0000 (10:52 +0000)]
tegra: usb: fdt: Add USB definitions for Tegra2 Seaboard

We set up two USB ports, one of which can be host or device.
For some reason the kernel version does enable both ports.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
12 years agotegra: usb: fdt: Add additional device tree definitions for USB ports
Simon Glass [Mon, 27 Feb 2012 10:52:45 +0000 (10:52 +0000)]
tegra: usb: fdt: Add additional device tree definitions for USB ports

This adds clock references to the USB part of the device tree for U-Boot,
and marks USB1 as supporting legacy mode (which we disable in the driver).

The USB timing information may vary between boards sometimes, but for
now we hard-code it in C. This is because all current T2x boards use
the same values, we will deal with T3x later and we first need to agree
on the format for this timing information in the fdt and may in fact
decide that it has no place there.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
12 years agotegra: fdt: Add clock bindings for Tegra2 Seaboard
Simon Glass [Tue, 28 Feb 2012 08:07:49 +0000 (08:07 +0000)]
tegra: fdt: Add clock bindings for Tegra2 Seaboard

Add the definition of the oscillator clock frequency and the 32KHz clock.
The latter is provided by a PMIC on I2C which we don't actually use at
present, but we expect this definition to be used in the kernel and want
to keep our .dts the same.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
12 years agotegra: fdt: Add clock bindings
Simon Glass [Mon, 27 Feb 2012 10:52:43 +0000 (10:52 +0000)]
tegra: fdt: Add clock bindings

This adds a basic binding for the oscillator and peripheral clocks. The
second cell is the clock number, defined as the bit number within the clock
enable register if the peripheral clock.

This uses the RFC clock bindings from Grant Likely so may change later:

https://lkml.org/lkml/2011/12/12/498

It is taken from Stephen Warren's patch here:

http://patchwork.ozlabs.org/patch/141359/

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
12 years agotegra: fdt: Add additional USB binding
Simon Glass [Tue, 28 Feb 2012 08:07:47 +0000 (08:07 +0000)]
tegra: fdt: Add additional USB binding

This adds a property to indicate a port which can switch between host and device
mode.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
12 years agofdt: Add tegra-usb bindings file from linux
Simon Glass [Mon, 27 Feb 2012 10:52:41 +0000 (10:52 +0000)]
fdt: Add tegra-usb bindings file from linux

This file is taken from the Linux mailing list.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
12 years agofdt: Add staging area for device tree binding documentation
Simon Glass [Mon, 27 Feb 2012 10:52:40 +0000 (10:52 +0000)]
fdt: Add staging area for device tree binding documentation

Add a directory to hold device tree binding files, to permit easy review
of this material in U-Boot patches.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
12 years agotegra: fdt: Add device tree file for Tegra2 Seaboard from kernel
Simon Glass [Mon, 27 Feb 2012 10:52:39 +0000 (10:52 +0000)]
tegra: fdt: Add device tree file for Tegra2 Seaboard from kernel

This was taken from commit b48c54e2 at:
git://git.kernel.org/pub/scm/linux/kernel/git/olof/tegra.git

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
12 years agotegra: fdt: Add Tegra2x device tree file from kernel
Simon Glass [Mon, 27 Feb 2012 10:52:38 +0000 (10:52 +0000)]
tegra: fdt: Add Tegra2x device tree file from kernel

This was taken from commit b48c54e2 at:
git://git.kernel.org/pub/scm/linux/kernel/git/olof/tegra.git

config.mk is updated to provide this file to boards through the
built-in mechanism:

/include/ ARCH_CPU_DTS

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
12 years agoarm: fdt: Add skeleton device tree file from kernel
Simon Glass [Mon, 27 Feb 2012 10:52:37 +0000 (10:52 +0000)]
arm: fdt: Add skeleton device tree file from kernel

This was taken from commit b48c54e2 at:
git://git.kernel.org/pub/scm/linux/kernel/git/olof/tegra.git

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
12 years agofdt: Add basic support for decoding GPIO definitions
Simon Glass [Mon, 27 Feb 2012 10:52:36 +0000 (10:52 +0000)]
fdt: Add basic support for decoding GPIO definitions

This adds some support into fdtdec for reading GPIO definitions from
the fdt. We permit up to FDT_GPIO_MAX GPIOs in the system. Each GPIO
is of the form:

gpio-function-name = <phandle gpio_num flags>;

where:

phandle is a pointer to the GPIO node
gpio_num is the number of the GPIO (0 to 223)
flags is a flag, as follows:

   bit    meaning
   0      0=polarity normal, 1=active low (inverted)

An example is:

enable-propounder-gpios = <&gpio 43 0>;

which means that GPIO 43 is used to enable the propounder (setting the
GPIO high), or that you can detect that the propounder is enabled by
checking if the GPIO is high (the fdt does not indicate input/output).

Two main functions are provided:

fdtdec_decode_gpio() reads a GPIO property from an fdt node and decodes it
into a structure.

fdtdec_setup_gpio() sets up the GPIO by calling gpio_request for you.

Both functions can cope with the property being missing, which is taken to
mean that that GPIO function is not available or is not needed.

[For reference, from Stephen Warren <swarren@nvidia.com>. It may be that
we add this extra complexity later if needed:

The correct way to parse such a GPIO property in general is:

* Read the first cell.
* Find the node referenced by the phandle (the controller).
* Ensure property gpio-controller is present in the controller node.
* Read property #gpio-cells from the controller node.
* Extract #gpio-cells from the original property.
* Keep processing more cells from the original property; there may be
multiple GPIOs listed.

According to the binding documentation in the Linux kernel, Samsung
Exynos4 doesn't use this format, and while all other chips do have a
flags cell, about 50% of the controllers indicate the cell is unused.
]

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
12 years agofdt: Add functions to access phandles, arrays and bools
Simon Glass [Mon, 27 Feb 2012 10:52:35 +0000 (10:52 +0000)]
fdt: Add functions to access phandles, arrays and bools

Add a function to look up a property which is a phandle in a node, and
another to read a fixed-length integer array from an fdt property.
Also add a function to read boolean properties, although there is no
actual boolean type in U-Boot.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Gerald Van Baren <vanbaren@cideas.com>
Acked-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
12 years agofdt: Tidy up a few fdtdec problems
Simon Glass [Mon, 27 Feb 2012 10:52:34 +0000 (10:52 +0000)]
fdt: Tidy up a few fdtdec problems

This fixes five trivial issues in fdtdec.c:
1. fdtdec_get_is_enabled() doesn't really need a default value
2. The fdt must be word-aligned, since otherwise it will fail on ARM
3. The compat_names[] array is missing its first element. This is needed
only because the first fdt_compat_id is defined to be invalid.
4. Added a header prototype for fdtdec_next_compatible()
5. Change fdtdec_next_alias() to only increment its 'upto' parameter
on success, to make the display error messages in the caller easier.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Gerald Van Baren <vanbaren@cideas.com>
Acked-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
12 years agofdt: Add tests for fdtdec
Simon Glass [Tue, 17 Jan 2012 08:20:51 +0000 (08:20 +0000)]
fdt: Add tests for fdtdec

The fdtdec_find_aliases_for_id() function is complicated enough that
it really should have some tests. This does not necessarily need to be
committed to U-Boot, but it might be useful.

(note there are a few minor inconsistencies with this patch which will be
cleaned up when the USB series is applied)

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
12 years agofdt: Add fdtdec_find_aliases() to deal with alias nodes
Simon Glass [Tue, 17 Jan 2012 08:20:50 +0000 (08:20 +0000)]
fdt: Add fdtdec_find_aliases() to deal with alias nodes

Stephen Warren pointed out that we should use nodes whether or not they
have an alias in the /aliases section. The aliases section specifies the
order so far as it can, but is not essential. Operating without alisses
is useful when the enumerated order of nodes does not matter (admittedly
rare in U-Boot).

This is considerably more complex, and it is important to keep this
complexity out of driver code. This patch creates a function
fdtdec_find_aliases() which returns an ordered list of node offsets
for a particular compatible ID, taking account of alias nodes.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
12 years agoarm: Tegra2: Fix ELDK42 gcc failure with inline asm stack pointer load
Tom Warren [Fri, 17 Feb 2012 06:01:21 +0000 (06:01 +0000)]
arm: Tegra2: Fix ELDK42 gcc failure with inline asm stack pointer load

The 4.2.2 gcc in the ELDK42 release doesn't like the direct SP
load using a constant in tegra2_start. Change it to use a load
thru another reg using mov sp, %0 : : "r"(CONST).

Tested on my Seaboard T20-A03, U-Boot loads and runs OK. Also
compiled all tegra2 builds with both gcc 4.2.2 and 4.4.1 OK.

Signed-off-by: Tom Warren <twarren@nvidia.com>
Acked-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
12 years agonet: fec_mxc: allow use with cache enabled
Eric Nelson [Thu, 15 Mar 2012 18:33:25 +0000 (18:33 +0000)]
net: fec_mxc: allow use with cache enabled

Ensure that transmit and receive buffers are cache-line aligned.
Invalidate cache for each packet as received, update receive buffer
descriptors one cache line at a time, flush cache before transmitting.

Original patch by Marek:
 http://lists.denx.de/pipermail/u-boot/2012-February/117695.html

Signed-off-by: Eric Nelson <eric.nelson at boundarydevices.com>
Acked-by: Marek Vasut <marex@denx.de>
Tested-by: Marek Vasut <marex@denx.de>
12 years agonet: force PKTALIGN to ARCH_DMA_MINALIGN
Eric Nelson [Thu, 15 Mar 2012 18:33:24 +0000 (18:33 +0000)]
net: force PKTALIGN to ARCH_DMA_MINALIGN

This will prevent the need for architectures whose DMA alignment
is greater than 32 to have bounce buffers.

Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
12 years agoi.MX28: Enable caches by default
Marek Vasut [Thu, 15 Mar 2012 18:33:23 +0000 (18:33 +0000)]
i.MX28: Enable caches by default

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
12 years agoi.MX28: Make use of the bounce buffer
Marek Vasut [Thu, 15 Mar 2012 18:33:22 +0000 (18:33 +0000)]
i.MX28: Make use of the bounce buffer

This allows i.MX28 MMC host to fully utilize DMA transfers and caches, greatly
improving speed.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <festevam@gmail.com>
12 years agoi.MX28: Do data transfers via DMA in MMC driver
Marek Vasut [Thu, 15 Mar 2012 18:33:21 +0000 (18:33 +0000)]
i.MX28: Do data transfers via DMA in MMC driver

This utilizes the newly introduced bounce buffers in the MMC layer.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Andy Fleming <afleming@gmail.com>
Cc: Fabio Estevam <festevam@gmail.com>
12 years agoMMC: Implement generic bounce buffer
Marek Vasut [Thu, 15 Mar 2012 18:41:35 +0000 (18:41 +0000)]
MMC: Implement generic bounce buffer

This implements generic bounce buffer at the end of MMC command submission
chain. Therefore if unaligned data are passed, they are copied. This stuff
should be pushed down into the MMC subsystem to squash all places generating
these unaligned data.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Andy Fleming <afleming@gmail.com>
12 years agoi.MX28: Add cache support to MXS NAND driver
Marek Vasut [Thu, 15 Mar 2012 18:33:19 +0000 (18:33 +0000)]
i.MX28: Add cache support to MXS NAND driver

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
12 years agoi.MX28: Add cache support into the APBH DMA driver
Marek Vasut [Thu, 15 Mar 2012 18:33:18 +0000 (18:33 +0000)]
i.MX28: Add cache support into the APBH DMA driver

The desc_append() now flushes descriptors into RAM.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
12 years agoARM926EJS: Implement cache operations
Marek Vasut [Thu, 15 Mar 2012 18:33:17 +0000 (18:33 +0000)]
ARM926EJS: Implement cache operations

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
Acked-by: Stefano Babic <sbabic@denx.de>
12 years agoboard/vpac270/onenand.c: Fix build errors
Anatolij Gustschin [Wed, 28 Mar 2012 05:38:42 +0000 (05:38 +0000)]
board/vpac270/onenand.c: Fix build errors

Building for vpac270_ond_256 configuration fails:

arch/arm/lib/libarm.o: In function `icache_disable':
/home/ag/git/u-boot/arch/arm/lib/cache-cp15.c:156: multiple
definition of `icache_disable'
board/vpac270/libvpac270.o:/home/ag/git/u-boot/board/vpac270/onenand.c:65:
first defined here
arch/arm/lib/libarm.o: In function `dcache_disable':
/home/ag/git/u-boot/arch/arm/lib/cache-cp15.c:188: multiple
definition of `dcache_disable'
board/vpac270/libvpac270.o:/home/ag/git/u-boot/board/vpac270/onenand.c:66:
first defined here
make[1]: *** [/home/ag/git/u-boot/spl/u-boot-spl] Error 1

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Cc: Marek Vasut <marek.vasut@gmail.com>
Acked-by: Marek Vasut <marex@denx.de>
12 years agonhk8815: fix build errors
Anatolij Gustschin [Wed, 28 Mar 2012 02:56:30 +0000 (02:56 +0000)]
nhk8815: fix build errors

Fix:
common/libcommon.o: In function `cread_line':
/home/ag/git/u-boot/common/main.c:695: undefined reference to `get_ticks'
/home/ag/git/u-boot/common/main.c:695: undefined reference to `get_tbclk'
/home/ag/git/u-boot/common/main.c:698: undefined reference to `get_ticks'

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Cc: Alessandro Rubini <rubini@unipv.it>
Acked-by: Marek Vasut <marex@denx.de>
Acked-by: Alessandro Rubini <rubini@unipv.it>
12 years agoatmel-boards: add missing atmel_mci.h
Andreas Bießmann [Tue, 13 Mar 2012 05:01:51 +0000 (05:01 +0000)]
atmel-boards: add missing atmel_mci.h

commit 72fa467988e7944407a634ddc4bc6a2df685c04c moved atmel_mci_init() into
include/atmel_mci.h. Some AT91 boards are also using this interface and need
to include atmel_mci.h now.

This patch fixes MAKEALL complaints like this:

---8<---
Configuring for ethernut5 - Board: ethernut5, Options: AT91SAM9XE
ethernut5.c: In function 'board_mmc_init':
ethernut5.c:235:2: warning: implicit declaration of function 'atmel_mci_init' [-Wimplicit-function-declaration]
--->8---

Signed-off-by: Andreas Bießmann <biessmann@corscience.de>
CC: Albert Aribaud <albert.u.boot@aribaud.net>
CC: Reinhard Meyer <u-boot@emk-elektronik.de>
CC: egnite GmbH <info@egnite.de>
12 years agoARM: highbank: setup env from boot source register
Rob Herring [Wed, 1 Feb 2012 16:57:57 +0000 (16:57 +0000)]
ARM: highbank: setup env from boot source register

Add support to read the boot src register and set bootcmd env from the
selected bootcmdX env setting.

Based on Linkstation boot choice selection.

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
12 years agoARM: highbank: change env config to use nvram
Jason Hobbs [Wed, 1 Feb 2012 16:57:56 +0000 (16:57 +0000)]
ARM: highbank: change env config to use nvram

Update the highbank config to use env from NVRAM. Also remove extra env
settings as they are not used unless the default env is used.

Signed-off-by: Jason Hobbs <jason.hobbs@calxeda.com>
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
12 years agoARM: highbank: add reset support
Rob Herring [Wed, 1 Feb 2012 16:57:55 +0000 (16:57 +0000)]
ARM: highbank: add reset support

Implement reset for highbank platform. Reset is triggered via a wfi
instruction, so enabling armv7 for the compiler is necessary.

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
12 years agoARM: highbank: Add boot counter support
Rob Herring [Wed, 1 Feb 2012 16:57:54 +0000 (16:57 +0000)]
ARM: highbank: Add boot counter support

Add boot counter support using an sysreg which is persistent across reset.

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
12 years agoARM: highbank: change TEXT_BASE to 0x8000
Rob Herring [Wed, 1 Feb 2012 16:57:53 +0000 (16:57 +0000)]
ARM: highbank: change TEXT_BASE to 0x8000

Make some space at the beginning of RAM so the FDT can be loaded to a
known fixed address at 0x1000.

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
12 years agoARM: highbank: fix us_to_tick calculation
Rob Herring [Wed, 1 Feb 2012 16:57:52 +0000 (16:57 +0000)]
ARM: highbank: fix us_to_tick calculation

udelay calls were off due to failing to convert us to ns. Fix this and drop
the unnecessary shifts since NS_PER_TICK is only 7ns.

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
12 years agoARM: highbank: add missing get_tbclk
Rob Herring [Tue, 21 Feb 2012 12:52:27 +0000 (12:52 +0000)]
ARM: highbank: add missing get_tbclk

The get_tbclk function was missing and the recent commit "common: add
possibility for readline_into_buffer timeout" makes it required.

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
12 years agoARM: highbank: fix warning for calxedaxgmac_initialize
Rob Herring [Tue, 21 Feb 2012 12:52:26 +0000 (12:52 +0000)]
ARM: highbank: fix warning for calxedaxgmac_initialize

Add include of netdev.h to pick-up declaration of calxedaxgmac_initialize.

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
12 years agonet: calxedaxgmac: fix build due to missing __aligned definition
Rob Herring [Wed, 1 Feb 2012 12:58:49 +0000 (12:58 +0000)]
net: calxedaxgmac: fix build due to missing __aligned definition

Include linux/compiler.h to fix build error due to missing __aligned
definition.

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
12 years agolzma: fix printf warnings
Mike Frysinger [Sat, 7 Jan 2012 23:14:35 +0000 (23:14 +0000)]
lzma: fix printf warnings

Fix size_t printf format warnings:

LzmaTools.c: In function 'lzmaBuffToBuffDecompress':
LzmaTools.c:110:5: warning: format '%x' expects type 'unsigned int',
                            but argument 2 has type 'SizeT'
LzmaTools.c:111:5: warning: format '%x' expects type 'unsigned int',
                            but argument 2 has type 'SizeT'

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
12 years agoEXYNOS: Add structure for Exynos4 DMC
Chander Kashyap [Fri, 2 Mar 2012 03:25:34 +0000 (03:25 +0000)]
EXYNOS: Add structure for Exynos4 DMC

Add exynos4_dmc structure in dmc.h for exynos4 dram controllor(DMC).

Signed-off-by: Chander Kashyap <chander.kashyap@linaro.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
12 years agoEXYNOS: SMDK5250: Support all 4 UARTs
Doug Anderson [Mon, 13 Feb 2012 07:38:05 +0000 (07:38 +0000)]
EXYNOS: SMDK5250: Support all 4 UARTs

This properly configures the mux to enable all UARTs.

This also fixes things so that we don't configure balls XUCTSN_1 and
XURTSN_1 as UART1 configuration (RTS/CTS), since they aren't
connected.

Signed-off-by: Doug Anderson <dianders@chromium.org>
Acked-by: Chander kashyap <chander.kashyap@linaro.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
12 years agoARM: fix s3c2410 timer code
David Müller (ELSOFT AG) [Thu, 22 Dec 2011 01:16:37 +0000 (01:16 +0000)]
ARM: fix s3c2410 timer code

This patch fixes the s3c24x0 timer code to work with the ARM
relocation feature.

Signed-off-by: David Mueller <d.mueller@elsoft.ch>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
12 years agoARM: davinci: fixes for cam_enc_4xx board
Heiko Schocher [Wed, 7 Mar 2012 04:10:00 +0000 (04:10 +0000)]
ARM: davinci: fixes for cam_enc_4xx board

- change CONFIG_ENV_RANGE to contain 2 nand erase blocks,
  one for bad block reserve.
- remove from the envvariable "img_writeramdisk" the
  ubifsmount command, as it is not needed.
- erase the hole mtd partition containing u-boot
- save environment variable "dvn_app_vers" and "dvn_boot_vers"
  only after installing the new image.
changes requested from Marek Vasut:
- arm, davinci: fix eldk-4.2 warnings for cam_enc_4xx board
  - get rid of run_command2 usage
    needed since patch:
    commit 009dde1955583e306cf904c864068f3acb0db499
    Author: Simon Glass <sjg@chromium.org>
    Date:   Tue Feb 14 19:59:20 2012 +0000

    Rename run_command2() to run_command()
    is now in mainline.
  - add CONFIG_SPL_LIBGENERIC_SUPPORT support
  - remove CONFIG_CMD_PXE support
  - fix warning:
    cam_enc_4xx.c: In function 'menu_handle':
    cam_enc_4xx.c:609: warning: dereferencing type-punned pointer
    will break strict-aliasing rules
  - fix error:
    arm-linux-ld: u-boot-spl: Not enough room for program headers,
    try linking with -N

Signed-off-by: Heiko Schocher <hs@denx.de>
Cc: Marek Vasut <marex@denx.de>
Cc: Tom Rini <tom.rini@gmail.com>
Cc: Fletzer Martin <Martin.Fletzer@ait.ac.at>
Cc: Wolfgang Denk <wd@denx.de>
12 years agoomap3_spi: receive transmit mode
jacopo mondi [Wed, 2 Mar 2011 05:13:22 +0000 (05:13 +0000)]
omap3_spi: receive transmit mode

Implementation of receive-transmit mode for
omap3 MCSPI.

Introduces full duplex communication, needed by
some spi devices (such as enc28j60).

Signed-off-by: jacopo mondi <mondi@cs.unibo.it> <j.mondi@voltaelectronics.com>
12 years agocalimain, enbw_cmc: Fix typo in comments
Christian Riesch [Sun, 25 Mar 2012 22:01:49 +0000 (22:01 +0000)]
calimain, enbw_cmc: Fix typo in comments

Signed-off-by: Christian Riesch <christian.riesch@omicron.at>
Cc: Heiko Schocher <hs@denx.de>
Cc: Tom Rini <trini@ti.com>
12 years agoDavinci: ea20: use gpio framework to access gpios
Stefano Babic [Wed, 5 Oct 2011 03:08:24 +0000 (03:08 +0000)]
Davinci: ea20: use gpio framework to access gpios

Drop direct access to SOC's registers and use
the function of the GPIO driver for da8xx.

[Tom: Remove gpio[68]_base as it's now unused]

Signed-off-by: Stefano Babic <sbabic@denx.de>
CC: Bastian Ruppert <Bastian.Ruppert@Sewerin.de>
CC: dzu@denx.de
CC: Sandeep Paulraj <s-paulraj@ti.com>
Signed-off-by: Tom Rini <trini@ti.com>
12 years agoOMAP3: mt_ventoux: sets its own mtdparts
Stefano Babic [Wed, 21 Mar 2012 00:14:25 +0000 (00:14 +0000)]
OMAP3: mt_ventoux: sets its own mtdparts

Signed-off-by: Stefano Babic <sbabic@denx.de>
Cc: Tom Rini <trini@ti.com>
12 years agoOMAP3: mt_ventoux: updated timing for FPGA
Stefano Babic [Wed, 21 Mar 2012 00:14:24 +0000 (00:14 +0000)]
OMAP3: mt_ventoux: updated timing for FPGA

Fix chipselect timing for FPGA

Signed-off-by: Stefano Babic <sbabic@denx.de>
Cc: Tom Rini <trini@ti.com>
12 years agotwl4030: fix potential power supply handling issues
Grazvydas Ignotas [Mon, 19 Mar 2012 03:37:40 +0000 (03:37 +0000)]
twl4030: fix potential power supply handling issues

twl4030_pmrecv_vsel_cfg currently first sets up device group (effectively
enabling the supply), and only then sets vsel (selects voltage). This could
lead to wrong voltage for a short time, or even long time if second i2c
write fails.

Fix this by writing vsel first and device group after that. Also
introduce error checking to not enable the supply if we failed to set
the voltage, and start logging errors as power supply problems are
usually important.

Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
12 years agoNAND: TI: fix warnings in omap_gpmc.c
Stefano Babic [Wed, 21 Mar 2012 23:56:17 +0000 (23:56 +0000)]
NAND: TI: fix warnings in omap_gpmc.c

The following warnings are reported for boards using SOFT ECC.

omap_gpmc.c:33:30: warning: 'hw_nand_oob' defined but not used
omap_gpmc.c:78:13: warning: 'omap_hwecc_init' defined but not used
omap_gpmc.c:116:12: warning: 'omap_correct_data' defined but not used
omap_gpmc.c:182:12: warning: 'omap_calculate_ecc' defined but not used
omap_gpmc.c:208:13: warning: 'omap_enable_hwecc' defined but not used

Signed-off-by: Stefano Babic <sbabic@denx.de>
Cc: Tom Rini <trini@ti.com>
Cc: Scott Wood <scottwood@freescale.com>
12 years agocam_enc_4xx: Rename 'images' to 'imgs'
Tom Rini [Thu, 15 Mar 2012 04:01:46 +0000 (04:01 +0000)]
cam_enc_4xx: Rename 'images' to 'imgs'

To avoid a conflict with common/cmd_bootm.c's 'images' (which is
exposed as part of the Linux SPL series), rename the board-specific
'images' to 'imgs'.

Cc: Heiko Schocher <hs@denx.de>
Signed-off-by: Tom Rini <trini@ti.com>
Acked-by: Heiko Schocher <hs@denx.de>
Tested-by: Heiko Schocher <hs@denx.de>
12 years agoarm: Add Prep subcommand support to bootm
Simon Schwarz [Thu, 15 Mar 2012 04:01:45 +0000 (04:01 +0000)]
arm: Add Prep subcommand support to bootm

Adds prep subcommand to bootm implementation of ARM. When bootm is called
with the subcommand prep the function stops right after ATAGS creation and
before announce_and_cleanup.

This is used in command "cmd_spl export"

Signed-off-by: Simon Schwarz <simonschwarzcor@gmail.com>
Acked-by: Stefano Babic <sbabic@denx.de>
Tested-by: Stefano Babic <sbabic@denx.de>
Signed-off-by: Tom Rini <trini@ti.com>
12 years agoOMAP3: twister: add support to boot Linux from SPL
Stefano Babic [Thu, 15 Mar 2012 04:01:44 +0000 (04:01 +0000)]
OMAP3: twister: add support to boot Linux from SPL

Signed-off-by: Stefano Babic <sbabic@denx.de>
CC: Tom Rini <tom.rini@gmail.com>
CC: Wolfgang Denk <wd@denx.de>
CC: Simon Schwarz <simonschwarzcor@gmail.com>
12 years agoSPL: call cleanup_before_linux() before booting Linux
Stefano Babic [Thu, 15 Mar 2012 04:01:43 +0000 (04:01 +0000)]
SPL: call cleanup_before_linux() before booting Linux

Signed-off-by: Stefano Babic <sbabic@denx.de>
CC: Tom Rini <tom.rini@gmail.com>
CC: Wolfgang Denk <wd@denx.de>
CC: Simon Schwarz <simonschwarzcor@gmail.com>
12 years agoOMAP3: SPL: do not call I2C init if no I2C is set.
Stefano Babic [Thu, 15 Mar 2012 04:01:42 +0000 (04:01 +0000)]
OMAP3: SPL: do not call I2C init if no I2C is set.

Call i2c initialization in spl_board_init only if I2C
is configured for the board.

Signed-off-by: Stefano Babic <sbabic@denx.de>
CC: Tom Rini <tom.rini@gmail.com>
CC: Wolfgang Denk <wd@denx.de>
CC: Simon Schwarz <simonschwarzcor@gmail.com>
12 years agoAdd cache functions to SPL for armv7
Stefano Babic [Thu, 15 Mar 2012 04:01:41 +0000 (04:01 +0000)]
Add cache functions to SPL for armv7

Signed-off-by: Stefano Babic <sbabic@denx.de>
CC: Tom Rini <tom.rini@gmail.com>
CC: Wolfgang Denk <wd@denx.de>
CC: Simon Schwarz <simonschwarzcor@gmail.com>