Commit Graph

15773 Commits

Author SHA1 Message Date
Eric Nelson
08c61a589b mxc_spi: move machine specifics into CPU headers
Move (E)CSPI register declarations into the imx-regs.h files for each supported CPU

Introduce two new macros to control conditional setup
     MXC_CSPI - Used for processors with the Configurable Serial Peripheral Interface (MX3x)
     MXC_ECSPI - For processors with Enhanced Configurable... (MX5x, MX6x)

Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
Acked-by: Dirk Behme <dirk.behme@de.bosch.com>
Acked-by: Stefano Babic <sbabic@denx.de>
Acked-by: Jason Liu <jason.hui@linaro.org>
Tested-by: Jason Liu <jason.hui@linaro.org>
2012-02-27 21:19:23 +01:00
Eric Nelson
4b3a30e9ae mx6q: define GPIO macros for translating between ordinals and port:index
The interface to the mxc_gpio driver uses integer (ordinal) values to
refer to all GPIOs on the i.MX processors. The registers themselves
and much of the i.MX documentation are banked in groups of 32, and these
macros allow the use of the port:index numbering for clarity.

GPIO_NUMBER() converts to ordinal value from port:index
GPIO_PORT() returns the port of an ordinal value
GPIO_INDEX() returns the index or offset of the ordinal.

Discussion on the mailing list at
	http://lists.denx.de/pipermail/u-boot/2012-January/116927.html

Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
2012-02-27 21:19:23 +01:00
Stefano Babic
63b1e004f5 MX27: add missing get_tbclk()
Signed-off-by: Stefano Babic <sbabic@denx.de>
2012-02-27 21:19:23 +01:00
Marek Vasut
ff250f3ed8 MX28: Fix get_timer() / get_tbclk() issue
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Detlev Zundel <dzu@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Fabio Estevam <festevam@gmail.com>
2012-02-27 21:19:23 +01:00
Matthias Fuchs
61698fd563 mx28: fix SPL code to make USB booting work
This patch fixes booting i.MX28 CPUs via USB download.
In this mode the CPU's bootrom implements a USB HID device that
accepts a bootstream.

When downloading the bootstream via USB, first the SPL code is
received and executed. Then the u-boot image is received and
called.

The USB bootmode is interrupt driven.

This patch fixes two things:

1) The ARM's fast interrupt mode is disabled when the SPL code
has been run. So save and restore the CPSR register.

2) Save and restore c1 control register: the exception vector
location needs to be set back to bootrom space to make the USB
interrupts work again. The SPL code needs to change this
option for the ram size probing.

Signed-off-by: Matthias Fuchs <matthias.fuchs@esd.eu>
Acked-by: Marek Vasut <marek.vasut@gmail.com>
2012-02-27 21:19:23 +01:00
Marek Vasut
534dbd1219 i.MX28: Fix VDDIO and VDDA setup
The DC power STS shouldn't be checked if booting off 5V supply.

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Detlev Zundel <dzu@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Robert Deliën <robert@delien.nl>
Cc: Fabio Estevam <festevam@gmail.com>
Cc: Matthias Fuchs <matthias.fuchs@esd.eu>
2012-02-27 21:19:23 +01:00
Stefano Babic
782bb0d236 MX5/MX6: add missing get_ticks() and get_tbclk()
commit f31a911fe (arm, post: add missing post_time_ms for arm)
enables get_ticks and get_tbclk for all arm based boards,
MX5/MX6 have not yet implemented.

Signed-off-by: Stefano Babic <sbabic@denx.de>
CC: Dirk Behme <dirk.behme@de.bosch.com>
CC: Jason Liu <jason.hui@linaro.org>
CC: Marek Vasut <marek.vasut@gmail.com>
2012-02-27 21:19:23 +01:00
Stefano Babic
60ebcffbf1 MX31: add missing get_tbclk()
Signed-off-by: Stefano Babic <sbabic@denx.de>
CC: Helmut Raiger <helmut.raiger@hale.at>
2012-02-27 21:19:23 +01:00
Stefano Babic
31bb50f815 MX35: add missing get_ticks() and get_tbclk()
commit f31a911fe (arm, post: add missing post_time_ms for arm)
enables get_ticks and get_tbclk for all arm based boards,
MX5/MX6 have not yet implemented.

Signed-off-by: Stefano Babic <sbabic@denx.de>
2012-02-27 21:19:23 +01:00
Matthias Fuchs
ed97abed27 mx28evk: add SPI support
This patch adds SPI support for the MX28EVK. Support for
an optionally installed SPI flash is also added. An example
configuration for redundant envrionment from SPI flash is also
added but disabled by default.

This patch has been tested on a MX28EVK Rev. D with an installed
SST25VF032B 32Mbit SPI flash.

Signed-off-by: Matthias Fuchs <matthias.fuchs@esd.eu>
Acked-by: Fabio Estevam <fabio.estevam@freescale.com>
2012-02-27 21:19:22 +01:00
Matthias Fuchs
598aa2bbfb mx28evk: add USB support
This patch enables USB host support on the MX28EVK board.

Signed-off-by: Matthias Fuchs <matthias.fuchs@esd.eu>
Tested-by: Fabio Estevam <fabio.estevam@freescale.com>
2012-02-27 21:19:22 +01:00
Matthias Fuchs
9588d94219 mx28evk: add RTC support
This patch adds support for the MX28 internal RTC
and enables u-boot's date command.

Signed-off-by: Matthias Fuchs <matthias.fuchs@esd.eu>
Tested-by: Fabio Estevam <fabio.estevam@freescale.com>
2012-02-27 21:19:22 +01:00
Wolfgang Denk
54e96680cb Merge branch 'master' of git://git.denx.de/u-boot-microblaze
* 'master' of git://git.denx.de/u-boot-microblaze:
  microblaze: Enable TFTP put command
  microblaze: avoid interrupt race conditions
  microblaze: fix build failure due to undefined reference to `get_ticks'
2012-02-26 22:17:40 +01:00
Stephan Linz
4eb29cf043 microblaze: Enable TFTP put command
Signed-off-by: Stephan Linz <linz@li-pro.net>
2012-02-23 12:17:08 +01:00
Stephan Linz
0f883267a8 microblaze: avoid interrupt race conditions
The interrupt acknowledge action have to run after the
registered interrupt handler. So we have a chance to
bear out the corresponding interrupt request in the
corresponding controller hardware.

With this reordering, we optain a proper interrupt
handling for level triggered interrupt sources -- for
example the new axi_timer v1.02.a introduced in ISE 13.2.

Signed-off-by: Stephan Linz <linz@li-pro.net>
Acked-by: Michal Simek <monstr@monstr.eu>
2012-02-23 12:16:04 +01:00
Stephan Linz
b9f0b73052 microblaze: fix build failure due to undefined reference to `get_ticks'
after commit "common: add possibility for readline_into_buffer
timeout" (sha1:9c34831) was applied. The Microblaze generic build
fails with error below:

common/libcommon.o: In function `cread_line':
/devel/u-boot/common/main.c:717: undefined reference to `get_ticks'
/devel/u-boot/common/main.c:717: undefined reference to `get_tbclk'
/devel/u-boot/common/main.c:720: undefined reference to `get_ticks'

Signed-off-by: Stephan Linz <linz@li-pro.net>
Acked-by: Michal Simek <monstr@monstr.eu>
2012-02-23 12:15:14 +01:00
Tom Rini
cec487a435 Revert "ARM: I2C: I2C Multi byte address support"
This reverts commits 2faa76196a as
this has introduced some large problems on all other platforms and have
more changes in them than the commit message implies.

Cc: Heiko Schocher <hs@denx.de>
Cc: Patil, Rachna <rachna@ti.com>
Signed-off-by: Tom Rini <trini@ti.com>
2012-02-21 07:28:47 +01:00
Tom Rini
c2459a405b Revert "ARM: AM33XX: Add AM33XX I2C driver support"
This reverts commit 498cbdfe62 as we need
to revert the i2c changes that add the support for the platform.

Cc: Heiko Schocher <hs@denx.de>
Cc: Patil, Rachna <rachna@ti.com>
Signed-off-by: Tom Rini <trini@ti.com>
2012-02-21 07:28:29 +01:00
Wolfgang Denk
2acca35ce4 Merge branch 'master' of git://git.denx.de/u-boot-mmc
* 'master' of git://git.denx.de/u-boot-mmc:
  mmc: make mmc_send_status() more reliable
  mmc: fix card busy polling
  Tegra: mmc: Fixed handling of interrupts in timeouts.
  omap_hsmmc: Wait for CMDI to be clear
2012-02-17 23:54:46 +01:00
Wolfgang Denk
7dda0c3759 Merge branch 'master' of git://git.denx.de/u-boot-mpc85xx
* 'master' of git://git.denx.de/u-boot-mpc85xx:
  powerpc/8xxx:Add MPH controller support in USB device-tree fixup
  powerpc/8xxx: Cleanup USB device-tree fixup
2012-02-17 23:54:17 +01:00
Wolfgang Denk
dbe20fc797 Merge branch 'trini@ti.com' of git://git.denx.de/u-boot-staging
* 'trini@ti.com' of git://git.denx.de/u-boot-staging:
  usb_ether: fix typo
  cmd_eeprom: typo
  doc: complete, typos
2012-02-17 23:52:52 +01:00
Wolfgang Denk
e390e87091 Merge branch 'master' of git://git.denx.de/u-boot-x86
* 'master' of git://git.denx.de/u-boot-x86:
  x86: Convert board_init_f_r to a processing loop
  x86: Split init functions out of board.c
  x86: Move relocation code out of board.c
  x86: Move setup_pcat_compatibility() out of board.c
  x86: Move do_go_exec() out of board.c
  CHECKPATCH: arch/x86/lib/*
  x86: Tweak IDT and GDT for alignment and readability
  x86: Allow cache before copy to RAM
  x86: Create weak init_cache() and default enable_caches() functions
  x86: Set GD_FLG_RELOC after entering in-RAM copy of U-Boot
  x86: Use fs for global data
  x86: Rework relocation calculations
  x86: Simplify Flash-to-RAM code execution transition
  x86: Rework Global Descriptor Table loading
  x86: Remove GDR related magic numbers
  x86: Speed up copy-to-RAM and clear BSS operations
  x86: Import glibc memcpy implementation
2012-02-17 23:47:29 +01:00
Jan Kloetzke
d617c426a6 mmc: make mmc_send_status() more reliable
Align the card status polling with the Linux kernel and retry the
command at least five times. Also some cards apparently mishandle the
status bits, so make sure to check the card state too.

Signed-off-by: Jan Kloetzke <jan.kloetzke@dspg.com>
Cc: Andy Fleming <afleming@gmail.com>
2012-02-15 17:42:22 -06:00
Jan Kloetzke
93ad0d18c0 mmc: fix card busy polling
A MMC/SD card may always go into the programming state (and hence be
busy) after a block write. Therefore always check the card state, even
after single block writes. On the other hand there is no need to check
the card status after a read.

Also make sure that errors during busy polling are propagated upwards.

Signed-off-by: Jan Kloetzke <jan.kloetzke@dspg.com>
Cc: Andy Fleming <afleming@gmail.com>
2012-02-15 17:42:22 -06:00
Tom Warren
cf39cf5597 Tegra: mmc: Fixed handling of interrupts in timeouts.
We are seeing occasional timeouts in the Tegra mmc code when
we are reading from external MMC cards. These don't seem to be
detrimental if they are handled properly.  This CL properly
clears the "normal interrupt status register" (norintsts) in
error conditions.  If we don't do this, when we come back into
mmc_send_cmd() the register will still contain status from the
last transaction.

Signed-off-by: Doug Anderson <dianders@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
2012-02-15 17:42:22 -06:00
Tom Rini
a7778f8fbe omap_hsmmc: Wait for CMDI to be clear
Before we can send a command we need both the DATI (command inhibit on
mmc_dat line) bit and CMDI (command inhibit on mmc_cmd line) are clear.
The previous behavior of only checking on DATI was insufficient on some
cards and incorrect behavior in any case.  This makes the code check
for both bits being clear and makes the error print more clear as
to what happened.  DATI_CMDDIS is removed as it was unused elsewhere
in the code and stood for 'DATI is set, cmds are disabled still'.

Fix originally spotted by Peter Bigot.

Tested-by: Peter A. Bigot <bigotp@acm.org>
Tested-by: Robert Nelson <robertcnelson@gmail.com>
Signed-off-by: Tom Rini <trini@ti.com>
Tested-by: Andreas Müller <schnitzeltony@googlemail.com>
2012-02-15 17:42:22 -06:00
ramneek mehresh
79f49120ba powerpc/8xxx:Add MPH controller support in USB device-tree fixup
Add support for fixing usb mode and phy type for
MPH(Multi Port Host) USB controllers in device-tree nodes.
Required for socs like P3060, P5020, etc having MPH USB controller

Signed-off-by: Ramneek Mehresh <ramneek.mehresh@freescale.com>
2012-02-15 16:50:14 -06:00
ramneek mehresh
5a52977f28 powerpc/8xxx: Cleanup USB device-tree fixup
Some code cleanup done for USB device-tree fixup:
	- handling error value returned from fdt_fixup_usb_mode_phy_type()
	- using ARRAY_SIZE macro
	- using snprintf instead of sprintf

Signed-off-by: Ramneek Mehresh <ramneek.mehresh@freescale.com>
2012-02-15 16:50:14 -06:00
Peter Meerwald
d1f862f97e usb_ether: fix typo
Signed-off-by: Peter Meerwald <p.meerwald@bct-electronic.com>
Acked-by: Mike Frysinger <vapier@gentoo.org>
2012-02-14 11:02:46 -07:00
Peter Meerwald
e506a00691 cmd_eeprom: typo
Signed-off-by: Peter Meerwald <p.meerwald@bct-electronic.com>
Acked-by: Mike Frysinger <vapier@gentoo.org>
2012-02-14 11:02:46 -07:00
Peter Meerwald
00309c67ab doc: complete, typos
mention repeatable to README.commands and fix some typos

Signed-off-by: Peter Meerwald <p.meerwald@bct-electronic.com>
Acked-by: Mike Frysinger <vapier@gentoo.org>
Tested-by: Marek Vasut <marek.vasut@gmail.com>
2012-02-14 11:02:46 -07:00
Wolfgang Denk
e9d44b35be Merge branch 'sf' of git://git.denx.de/u-boot-blackfin
* 'sf' of git://git.denx.de/u-boot-blackfin:
  README: Add description of SPI Flash (SF) command configuration
  sf command: allow default bus and chip selects
  sf: eeprom_m95xxx: set a sane default timeout
  sf: eeprom_m95xxx: fix up style
2012-02-13 23:15:25 +01:00
Wolfgang Denk
06576b2efc Merge branch 'master' of git://git.denx.de/u-boot-blackfin
* 'master' of git://git.denx.de/u-boot-blackfin:
  Blackfin: pata_bfin: fix printf warning
  Blackfin: bfin_nand: mark local func static
  linkage.h: move from blackfin to common includes
  Blackfin: br4: new board port
  Blackfin: add in/out le32 variants
  post: add blackfin to the post_time_ms list
  Blackfin: bf537-stamp: drop board reset workaround
  Blackfin: pr1: new board port
2012-02-13 23:13:22 +01:00
Eric Nelson
f61ec45eb5 README: Add description of SPI Flash (SF) command configuration
Acked-by: Jason Liu <jason.hui@linaro.org>
Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-02-12 15:18:29 -05:00
Eric Nelson
c1173bd075 sf command: allow default bus and chip selects
This patch allows a board configuration file to provide default bus
and chip-selects for SPI flash so that first argument to the 'sf' command
is optional.

On boards that use the mxc_spi driver and a GPIO for chip select, this allows
a much simpler command line:
	U-Boot> sf probe
instead of
	U-Boot> sf probe 0x5300

Tested-by: Jason Liu <jason.hui@linaro.org>
Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-02-12 15:18:29 -05:00
Mike Frysinger
8b463dab93 sf: eeprom_m95xxx: set a sane default timeout
Every board currently defines this to the same value, so just default
to that to avoid having to make everyone do the same thing.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-02-12 15:18:28 -05:00
Mike Frysinger
a1f77b696d sf: eeprom_m95xxx: fix up style
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-02-12 15:18:28 -05:00
Mike Frysinger
44f67f7848 Blackfin: pata_bfin: fix printf warning
pata_bfin.c: In function 'bfin_ata_identify':
pata_bfin.c:887:2: warning: format '%x' expects type 'unsigned int',
	but argument 2 has type 'lbaint_t'

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-02-12 15:03:26 -05:00
Mike Frysinger
3f54108be9 Blackfin: bfin_nand: mark local func static
This devready func is only used in this driver, so mark it static.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-02-12 15:03:26 -05:00
Macpaul Lin
273d11eae5 linkage.h: move from blackfin to common includes
1. Add linkage.h support from blackfin to common include,
   which is a reduced version from Linux.
2. Add architecture part support of linkage.h into blackfin
3. Fix include path of in blackfin related to linkage.h
   due to header file movement.

Signed-off-by: Macpaul Lin <macpaul@andestech.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-02-12 15:03:26 -05:00
Dimitar Penev
051a5f30f1 Blackfin: br4: new board port
This adds support for the BR4 Appliance.  It is a quad channel ISDN BRI
board based on Blackfin BF537 CPU.

Signed-off-by: Dimitar Penev <dpn@switchfin.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-02-12 15:03:25 -05:00
Mike Frysinger
dae2242ada Blackfin: add in/out le32 variants
These are rarely used, but the post code does currently, so add small
redirect hacks for that.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-02-12 15:03:25 -05:00
Mike Frysinger
23f1dded5e post: add blackfin to the post_time_ms list
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-02-12 15:03:25 -05:00
Mike Frysinger
1a95d89f69 Blackfin: bf537-stamp: drop board reset workaround
The bf537-stamp shouldn't need this SPI flash workaround.  It was added
by accident a long time ago through a convoluted series of steps which
originated from a customer board (not the bf537-stamp).  So drop it to
keep people from incorrectly adding it to their own boards.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-02-12 15:03:25 -05:00
Dimitar Penev
939b150ae5 Blackfin: pr1: new board port
This add support for the PR1 Appliance - Asterisk based ISDN PRI PBX.
This board is Blackfin BF537 based.  The schematics are not fully opened.

Signed-off-by: Dimitar Penev <dpn@switchfin.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-02-12 15:03:25 -05:00
Christian Riesch
9a3aae22ed arm, davinci: Add support for the Calimain board from OMICRON electronics
This patch adds support for the Calimain board from
OMICRON electronics GmbH. The board features a Texas Instruments AM1808
SoC, 128 MB DDR2 memory, and 64 MB NOR flash memory connected to CS2 and
CS3.

Signed-off-by: Christian Riesch <christian.riesch@omicron.at>
2012-02-12 10:11:33 +01:00
Sughosh Ganu
6b873dcabd Changes to move hawkboard to the new spl infrastructure
This patch moves hawkboard to the new spl infrastructure from the
older nand_spl one.

Removed the hawkboard_nand_config build option -- The spl code now
gets compiled with hawkboard_config, after building the main u-boot
image, using the CONFIG_SPL_TEXT_BASE. Modified the README.hawkboard
to reflect the same.

Signed-off-by: Sughosh Ganu <urwithsughosh@gmail.com>
Signed-off-by: Heiko Schocher <hs@denx.de>
Cc: Heiko Schocher <hs@denx.de>
Cc: Christian Riesch <christian.riesch@omicron.at>
Cc: Sudhakar Rajashekhara <sudhakar.raj@ti.com>
Cc: Tom Rini <trini@ti.com>
Acked-by: Christian Riesch <christian.riesch@omicron.at>
2012-02-12 10:11:33 +01:00
Christian Riesch
d735a99d3b arm, arm926ejs: Enable icache only if CONFIG_SYS_ICACHE_OFF is not defined
Signed-off-by: Christian Riesch <christian.riesch@omicron.at>
Cc: Albert Aribaud <albert.u.boot@aribaud.net>
Cc: Tom Rini <trini@ti.com>
Acked-by: Heiko Schocher <hs@denx.de>
Tested-by: Heiko Schocher <hs@denx.de>
2012-02-12 10:11:33 +01:00
Christian Riesch
b67d8816fd arm, arm926ejs: Add option CONFIG_SYS_EXCEPTION_VECTORS_HIGH
The V bit of the c1 register of CP15 should not be cleared on DA850
SoCs since they have no valid memory at 0x00000000. This patch
introduces a configuration option CONFIG_SYS_EXCEPTION_VECTORS_HIGH
that allows setting the correct value for the V bit.

Signed-off-by: Christian Riesch <christian.riesch@omicron.at>
Reported-by: Sughosh Ganu <urwithsughosh@gmail.com>
Cc: Albert Aribaud <albert.u.boot@aribaud.net>
Cc: Tom Rini <trini@ti.com>
Cc: Sughosh Ganu <urwithsughosh@gmail.com>
Cc: Heiko Schocher <hs@denx.de>
2012-02-12 10:11:33 +01:00
Sughosh Ganu
da104e04ec arm, arm926ejs: Flush the data cache before disabling it
The current implementation invalidates the data cache before turning it
off and causes problems on the hawkboard. See the discussion in
http://lists.denx.de/pipermail/u-boot/2012-January/115212.html

According to the ARM926EJ-S Technical Reference Manual, the cache should
be flushed instead.

Also fix the comments to match code.

Signed-off-by: Sughosh Ganu <urwithsughosh@gmail.com>

Rebased and corrected commit message.

Signed-off-by: Christian Riesch <christian.riesch@omicron.at>
Cc: Albert Aribaud <albert.u.boot@aribaud.net>
Cc: Tom Rini <trini@ti.com>
Acked-by: Heiko Schocher <hs@denx.de>
Tested-by: Heiko Schocher <hs@denx.de>
2012-02-12 10:11:33 +01:00