Commit Graph

2158 Commits

Author SHA1 Message Date
Peter Tyser
2f21ce4d54 fsl/85xx, 86xx: Sync up DMA code
The following changes were made to sync up the DMA code between the 85xx
and 86xx architectures which will make it easier to break out common
8xxx DMA code:

85xx:
- Don't set STRANSINT and SPCIORDER fields in SATR register.  These bits
  only have an affect when the SBPATMU bit is set.
- Write 0xffffffff instead of 0xfffffff to clear errors in the DMA
  status register.  We may as well clear all 32 bits of the register...

86xx:
- Add CONFIG_SYS_MPC86xx_DMA_ADDR define to address DMA registers
- Add clearing of errors in the DMA status register when initializing
  the controller
- Clear the channel start bit in the DMA mode register after a transfer

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2009-06-12 17:17:58 -05:00
Peter Tyser
b1f12650d3 fsl: Create common fsl_dma.h for 85xx and 86xx cpus
Break out DMA structures for the Freescale MPC85xx and MPC86xx cpus to
reduce a large amount of code duplication

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2009-06-12 17:17:45 -05:00
Haiying Wang
8e55258f14 qe: Pass in uec_info struct through uec_initialize
The uec driver contains code to hard code configuration information for the uec
ethernet controllers. This patch creates an array of uec_info structures, which
are then parsed by the corresponding driver instance to determine configuration.
It also creates function uec_standard_init() to initialize all UEC interfaces
for 83xx and 85xx.

Signed-off-by: Haiying Wang <Haiying.Wang@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2009-06-12 17:17:02 -05:00
Haiying Wang
b3d7f20f43 85xx: Add QE clk support
Signed-off-by: Haiying Wang <Haiying.Wang@freescale.com>
Acked-by: Timur Tabi <Timur@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2009-06-12 17:16:59 -05:00
Kumar Gala
71b358cc26 85xx: Added MPC8535/E identifiers
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2009-06-12 17:16:26 -05:00
Kumar Gala
22419d7797 85xx: Always attempt ethernet device tree fixup
Its reasonable that we may have ethernet devices but dont have drivers
or support enabled for them in u-boot and want the device tree fixed up.
Unconditionally calling the ethernet fixup is fine since if we dont have
ethernet nodes that match (or aliases) we will not attempt to do
anything.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Acked-by: Timur Tabi <timur@freescale.com>
2009-06-12 17:16:26 -05:00
Stefan Roese
c60dc8527d mpc512x: Fix problem with I2C access before relocation
This is needed for the upcoming esd MECP5123 board port which uses
I2C EEPROM for environment storage.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Reinhard Arlt <reinhard.arlt@esd-electronics.com>
Acked-by: Heiko Schocher<hs@denx.de>
2009-06-12 20:47:18 +02:00
Vivek Mahajan
4ef01010aa mpc83xx: USB: Reorganized its support
The following patch reorganizes/reworks the USB support for mpc83xx
as under:-

  * Moves the 83xx USB clock init from drivers/usb/host/ehci-fsl.c to
    cpu/mpx83xx/cpu_init.c

  * Board specific usb_phy_type is read from the environment

  * Adds USB EHCI specific structure in include/usb/ehci-fsl.h

  * Copyrights revamped in most of the following files

Signed-off-by: Vivek Mahajan <vivek.mahajan@freescale.com>
Signed-off-by: Remy Bohmer <linux@bohmer.net>
2009-06-12 20:47:17 +02:00
Peter Tyser
2c7920afaf 83xx: Replace CONFIG_MPC83[0-9]X with MPC83[0-9]x
Use the standard lowercase "x" capitalization that other Freescale
architectures use for CPU defines to prevent confusion and errors

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
2009-06-12 20:47:17 +02:00
Peter Tyser
0f89860494 83xx: Replace CONFIG_MPC83XX with CONFIG_MPC83xx
Use the standard lowercase "xx" capitalization that other Freescale
architectures use for CPU defines to prevent confusion and errors

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
2009-06-12 20:47:17 +02:00
Stefan Roese
ba4feae90c mpc512x: Use serial_setbrg() in serial_init() to not duplicate the code
This patch removes the duplicated code for baudrate generator configuration
in the PSC serial_init() implementation by calling serial_setbrg() instead
of duplicating the code.

Signed-off-by: Stefan Roese <sr@denx.de>
2009-06-12 20:47:17 +02:00
Stefan Roese
b8c1d6a54f mpc512x: Fix PSC divisor calculation for baudrate setting
The wrong input frequency was used in serial_setbrg(). This patch fixes
this by using ips_clk as input frequency for the PSC baudrate generator.

Signed-off-by: Stefan Roese <sr@denx.de>
2009-06-12 20:47:17 +02:00
Wolfgang Denk
3b74e7ec58 MPC512x: remove include/mpc512x.h
Move needed definitions (register descriptions etc.) from
include/mpc512x.h  into  include/asm-ppc/immap_512x.h.

Instead of using a #define'd register offset, use a function that
provides the PATA controller's base address.

All the rest of include/mpc512x.h are register offset definitions
which can be eliminated by proper use of C structures.

There are only a few register offsets remaining that are needed in
cpu/mpc512x/start.S; for these we provide cpu/mpc512x/asm-offsets.h
which is intended as a temporary workaround only. In a later patch
this file will be removed, too, and then auto-generated from the
respective C structs.

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: John Rigby <jcrigby@gmail.com>
2009-06-12 20:47:16 +02:00
Wolfgang Denk
843efb1192 MPC512x: use I/O accessors instead of pointer accesses
This commit changes the MPC512x code to use I/O accessor calls (i.e.
out_*() and in_*()) instead of using deprecated pointer accesses.

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: John Rigby <jcrigby@gmail.com>
2009-06-12 20:47:16 +02:00
Wolfgang Denk
19dc7e1792 MPC512x: add more hardware description to immap_512x.h
- add GPIO module description
- add Address Latch Timing Register description
- add IO Control Memory Map
- add FEC Memory Map

Also change board/freescale/mpc5121ads/mpc5121ads.c and
cpu/mpc512x/iopin.c as needed.

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: John Rigby <jcrigby@gmail.com>
2009-06-12 20:47:16 +02:00
Wolfgang Denk
debf874155 cpu/mpc512x/diu.c: fix warning: assignment from incompatible pointer type
Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: John Rigby <jcrigby@gmail.com>
2009-06-12 20:47:16 +02:00
Wolfgang Denk
8b25126319 cpu/mpc512x/pci.c: minor coding style cleanup
Get rid of variable declaration in the middle of the code.

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: John Rigby <jcrigby@gmail.com>
2009-06-12 20:47:16 +02:00
Wolfgang Denk
de26ef99bd mpc512x: Move common files to share them by several boards
We will soon see several new MPC521x based boards added.  This patch
moves files that are not board specific to a common directory so they
can be shared by all such ports.  It also splits off common IDE code
into a new file, cpu/mpc512x/ide.c .

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: John Rigby <jcrigby@gmail.com>
2009-06-12 20:47:16 +02:00
Wolfgang Denk
03e069dc0a mpc512x: change cpu/mpc512x/Makefile to use Kconfig style
Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: John Rigby <jcrigby@gmail.com>
2009-06-12 20:47:16 +02:00
Wolfgang Denk
a89c33db96 General help message cleanup
Many of the help messages were not really helpful; for example, many
commands that take no arguments would not print a correct synopsis
line, but "No additional help available." which is not exactly wrong,
but not helpful either.

Commit ``Make "usage" messages more helpful.'' changed this
partially. But it also became clear that lots of "Usage" and "Help"
messages (fields "usage" and "help" in struct cmd_tbl_s respective)
were actually redundant.

This patch cleans this up - for example:

Before:
	=> help dtt
	dtt - Digital Thermometer and Thermostat

	Usage:
	dtt         - Read temperature from digital thermometer and thermostat.

After:
	=> help dtt
	dtt - Read temperature from Digital Thermometer and Thermostat

	Usage:
	dtt

Signed-off-by: Wolfgang Denk <wd@denx.de>
2009-06-12 20:47:16 +02:00
Mike Frysinger
ecb1dc8922 Add support for Linux-like kallsysms
The kernel stores address<->symbol names in it so things can be decoded at
runtime.  Do it in U-Boot, and we get nice symbol decoding when crashing.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-06-12 20:45:48 +02:00
Tom Rix
708cfb74b7 OMAP3 Turn on the GPIO bank clocks
The function and interface clocks for each GPIO bank, except the first, must
be explicitly turned on.  These are controlled by the config level defines
CONFIG_OMAP3_GPIO_n where n is from 2 to 6.

Signed-off-by: Tom Rix <Tom.Rix@windriver.com>
Acked-by: Dirk Behme <dirk.behme@googlemail.com>
2009-06-12 20:45:47 +02:00
Jean-Christophe PLAGNIOL-VILLARD
b2403589b4 at91: move cpu info print to cpu
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2009-06-12 20:45:46 +02:00
Jean-Christophe PLAGNIOL-VILLARD
5bb59b3c90 at91: extract reset from timer
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2009-06-12 20:39:53 +02:00
Jean-Christophe PLAGNIOL-VILLARD
61cf851b09 omap24xx: rename reset file
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2009-06-12 20:39:53 +02:00
Jean-Christophe PLAGNIOL-VILLARD
3ea201b016 lh7a40x: move serial driver to drivers/serial
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2009-06-12 20:39:53 +02:00
Jean-Christophe PLAGNIOL-VILLARD
379be585eb pxa: move serial driver to drivers/serial
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2009-06-12 20:39:52 +02:00
Jean-Christophe PLAGNIOL-VILLARD
ad7e8aac69 arm: remove cpu_init
move s3c44b0 to arch_cpu_init and as noone use cpu_init remove it

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2009-06-12 20:39:52 +02:00
Jean-Christophe PLAGNIOL-VILLARD
c358d9c3f1 arm: unify interrupt init
all arm init the IRQ stack the same way
so unify it in lib_arm/interrupts.c and then call arch specific interrupt init

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2009-06-12 20:39:52 +02:00
Jean-Christophe PLAGNIOL-VILLARD
10a451cd57 arm: unify linker script
all arm boards except a few use the same cpu linker script
so move it to cpu/$(CPU)

that could be overwrite in following order
SOC
BOARD
via the corresponding config.mk

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2009-06-12 20:39:52 +02:00
Jean-Christophe PLAGNIOL-VILLARD
9475c63c78 afeb9260: fix macb device init
uses PA10, PA11 for ETX2 and ETX3.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2009-06-12 20:39:52 +02:00
Stefan Roese
1bbae2b816 ppc4xx: Remove PCI async bootup message if PCI is not used
Signed-off-by: Stefan Roese <sr@denx.de>
2009-06-12 20:39:52 +02:00
Thomas Lange
2ae0f35fd6 ARM DaVinci: Reset with watchdog enabled
Once the Davinci watchdog has been enabled, the timeout
value cannot be changed. If the timeout in use is long,
it can take a long time for card to reset. By writing
an invalid service key, we can trigger an immediate reset.

Signed-off-by: Thomas Lange <thomas@corelatus.se>
2009-06-12 20:39:51 +02:00
Jean-Christophe PLAGNIOL-VILLARD
1699da6297 at91: regroup IP hw init in one file per soc
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2009-06-12 20:39:51 +02:00
Tom Rix
0c872ecd01 OMAP3 Port kernel omap gpio interface.
Port version 2.6.27 of the linux kernel's omap gpio interface to u-boot.
The orignal source is in linux/arch/arm/plat-omap/gpio.c

See doc/README.omap3 for instructions on use.

Signed-off-by: Tom Rix <Tom.Rix@windriver.com>
2009-06-12 20:39:50 +02:00
Sandeep Paulraj
53925acf1b ARM DaVinci:Consolidate common u-boot.lds
The u-boot.lds is common for all DaVinci boards. The patch removes
multiple instances and moves the u-boot.lds to /cpu/arm926ejs/davinci
folder. This addresses one of the comments i received while submitting
patches for DM3xx

Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
2009-06-12 20:39:49 +02:00
Tom Rix
68a531fd46 OMAP Consolidate common u-boot.lds to cpu layer.
The u-boot.lds file is common for all omap boards.
Move a cleaned up version to the cpu layer and add makefile logic to use it.

Signed-off-by: Tom Rix <Tom.Rix@windriver.com>
2009-06-12 20:39:49 +02:00
Jean-Christophe PLAGNIOL-VILLARD
2907798926 arm920/926/926: remove non needed header
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2009-06-12 20:39:49 +02:00
David Brownell
7a4f511b59 davinci: display correct clock info
Move the clock-rate dumping code into the cpu/.../davinci area
where it should have been, enabled by CONFIG_DISPLAY_CPUINFO,
updating the format and showing the DSP clock (where relevant).

Switch boards to use the cpuinfo() hook for this stuff.

Remove a few now-obsolete PLL #defines.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-06-12 20:39:49 +02:00
Jean-Christophe PLAGNIOL-VILLARD
b54384e3ba arm: timer and interrupt init rework
actually the timer init use the interrupt_init as init callback
which make the interrupt and timer implementation difficult to follow

so now rename it as int timer_init(void) and use interrupt_init for interrupt

btw also remane the corresponding file to the functionnality implemented

as ixp arch implement two timer - one based on interrupt - so all the timer
related code is moved to timer.c

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2009-06-12 20:39:48 +02:00
Jean-Christophe PLAGNIOL-VILLARD
5b4bebe1d2 OMAP3: Reorganize Makefile style
Reformat COBJS handling.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Dirk Behme <dirk.behme@googlemail.com>
2009-06-12 20:39:48 +02:00
Jean-Christophe PLAGNIOL-VILLARD
b196698271 OMAP3: Remove dublicated interrupt code
Remove duplicated interrupt code. Original, identical code can be found
in lib_arm/interrupts.c

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Dirk Behme <dirk.behme@googlemail.com>
2009-06-12 20:39:48 +02:00
Jean-Christophe PLAGNIOL-VILLARD
ac7260a419 at91rm9200: move reset code to reset.c
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2009-06-12 20:39:48 +02:00
Jean-Christophe PLAGNIOL-VILLARD
2c75c78d94 ixp/interrupts: Move conditional compilation to Makefile
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2009-06-12 20:39:48 +02:00
Jean-Christophe PLAGNIOL-VILLARD
8fc3bb4b06 arm: cleanup remaining CONFIG_INIT_CRITICAL
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2009-06-12 20:39:48 +02:00
Jean-Christophe PLAGNIOL-VILLARD
c20e28f49a arm946es: remove non used timer
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2009-06-12 20:39:48 +02:00
David Brownell
f1d944e30e davinci: add basic dm355/dm350/dm335 support
Add some basic declarations for DaVinci DM355/DM350/DM335 support,
keyed on CONFIG_SOC_DM355.  (DM35X isn't quite right because the
DM357 is very different; while the DM355 is like a DM355 without
the MPEG/JPEG coprocessor).

These have different peripherals than the DM6446, and some of
the peripherals are at different addresses.  Notably for U-Boot,
there's no EMAC, and the NAND controller address is different

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-06-12 20:39:48 +02:00
David Brownell
bd36fdc146 davinci: fix dm644x buglets
Fix two buglets in the dm644x support:  don't set two must-be-zero
bits in the UART management register; and only include the I2C hooks
if the I2C driver is being included.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-06-12 20:39:48 +02:00
David Brownell
f79043681f davinci: split out some dm644x-specific bits from psc
Split out DaVinci DM6446-specific bits from more generic bits:

 - Add a CONFIG_SOC_DM644X.  All current boards use DM6446 chips;
   DM6443 and DM6441 chips differ in available peripherals.

 - Move most DM644X-specific bits from psc.c to a new dm644x.c file,
   which is conditionally built.  It provides device-specific setup.

Plus minor coding style and comment updates with respect to the PSC.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-06-12 20:39:48 +02:00
David Brownell
48ef572955 davinci: cpu-specific build uses conditional make syntax
Update cpu/arm926ejs/davinci/Makefile to use COBJ-y type syntax.
Add the first conditional: for EMAC driver support.  Not all
chips have an EMAC; and boards might not use it, anyway.

This doesn't touch PHY configuration; that should eventually
become conditional too.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-06-12 20:39:47 +02:00