Commit Graph

377 Commits

Author SHA1 Message Date
Ben Warren 89973f8a82 Introduce netdev.h header file and remove externs
This addresses all drivers whose initializers have already
been moved to board_eth_init()/cpu_eth_init().

Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2008-09-02 21:18:16 -07:00
Andy Fleming 5a8a163ac3 Add pixis_set_sgmii command
The 8544DS and 8572DS platforms support an optional SGMII riser card to
expose ethernet over an SGMII interface.  Once the card is in, it is also
necessary to configure the board such that it uses the card, rather than
the on-board ethernet ports.  This can either be done by flipping dip switches
on the motherboard, or by modifying registers in the pixis.  Either way
requires a reboot.

This adds a command to allow users to choose which ports are routed through
the SGMII card, and which through the onboard ports.  It also allows users
to revert to the current switch settings.

This code does not work on the 8572, as the PIXIS is different.

Signed-off-by: Andy Fleming <afleming@freescale.com>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2008-09-02 21:18:15 -07:00
Andy Fleming 216f2a7156 Add SGMII support for the 8544 DS
The 8544 DS has an optional SGMII Riser card, which uses different PHY
addresses.  Check if we are in SGMII mode, and invoke the SGMII Riser
setup code if so.

Signed-off-by: Andy Fleming <afleming@freescale.com>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2008-09-02 21:18:15 -07:00
Andy Fleming 652f7c2eef Add support for Freescale SGMII Riser Card
The 8544DS and 8572DS systems have an optional SGMII riser card which
exposes new ethernet ports which are connected to the eTSECs via an
SGMII interface.  The SGMII PHYs for this board are offset from the standard
PHY addresses, so this code modifies the passed in tsec_info structure to
use the SGMII PHYs on the card, instead.

Signed-off-by: Andy Fleming <afleming@freescale.com>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2008-09-02 21:18:15 -07:00
TsiChung Liew f78ced3028 ColdFire: Multiple fixes for MCF5445x platforms
Add FEC pin set and mii reset in __mii_init(). Change
legacy flash vendor from 2 to AMD LEGACY (0xFFF0),
change cfi_offset to 0, and change CFG_FLASH_CFI to
CONFIG_FLASH_CFI_LEGACY. Correct M54451EVB and
M54455EVB env settings in configuration file.

Signed-off-by: TsiChung Liew <Tsi-Chung.Liew@freescale.com>
2008-08-28 09:16:54 -06:00
Wolfgang Denk 0ba6bfef06 Merge branch 'master' of git://git.denx.de/u-boot-mpc85xx 2008-08-28 00:26:52 +02:00
Kumar Gala 9490a7f1a9 mpc85xx: Add support for the MPC8536DS reference board
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Srikanth Srinivasan <srikanth.srinivasan@freescale.com>
Signed-off-by: Dejan Minic <minic@freescale.com>
Signed-off-by: Jason Jin <Jason.jin@freescale.com>
Signed-off-by: Dave Liu <daveliu@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-08-27 11:43:54 -05:00
Kumar Gala 129ba616b3 mpc85xx: Add support for the MPC8572DS reference board
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-08-27 11:43:53 -05:00
Kumar Gala 1167a2fd56 FSL DDR: Convert MPC8544DS to new DDR code.
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-08-27 11:43:50 -05:00
Jon Loeliger e6f5b35b41 FSL DDR: Convert MPC8568MDS to new DDR code.
Signed-off-by: Jon Loeliger <jdl@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-08-27 11:43:50 -05:00
Jon Loeliger e31d2c1e2b FSL DDR: Convert MPC8548CDS to new DDR code.
Signed-off-by: Jon Loeliger <jdl@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-08-27 11:43:50 -05:00
Jon Loeliger aa11d85cf3 FSL DDR: Convert MPC8541CDS to new DDR code.
Signed-off-by: Jon Loeliger <jdl@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-08-27 11:43:50 -05:00
Jon Loeliger 2b40edb10d FSL DDR: Convert MPC8555ADS to new DDR code.
Signed-off-by: Jon Loeliger <jdl@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-08-27 11:43:49 -05:00
Jon Loeliger 8b625114e8 FSL DDR: Convert MPC8560ADS to new DDR code.
Signed-off-by: Jon Loeliger <jdl@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-08-27 11:43:49 -05:00
Kumar Gala 9617c8d49a FSL DDR: Convert MPC8540ADS to new DDR code.
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-08-27 11:43:48 -05:00
Ben Warren 65d3d99c28 Moved initialization of ULI526X Ethernet driver to board code.
The only board using this driver is the Freescale MPC8610HPCD board.
Removed initialization for the driver from net/eth.c

Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2008-08-26 22:17:45 -07:00
Jon Loeliger 39aa1a7348 FSL DDR: Convert MPC8610HPCD to new DDR code.
Signed-off-by: Jon Loeliger <jdl@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-08-27 02:06:03 +02:00
Kumar Gala 6a8e569293 FSL DDR: Convert MPC8641HPCN to new DDR code.
Signed-off-by: Jon Loeliger <jdl@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-08-27 02:06:02 +02:00
Randy Vinson 20220d22b9 mpc7448hpc2: Fix PCI I/O space mapping.
PCI I/O space is currently mapped 1:1 at 0xFA000000. Linux requires
PCI I/O space to start at 0 on the PCI bus. This patch maps PCI I/O
space such that 0xFA000000 in the processor's address space maps to 0
on the PCI I/O bus.

Signed-off-by Randy Vinson <rvinson@mvista.com>
Acked-by: Roy Zang <tie-fei.zang@freescale.com>
2008-08-26 23:23:49 +02:00
Ira W. Snyder 447ad5768a MPC8349EMDS: Add PCI Agent (PCISLAVE) support
Add the ability for the MPC8349EMDS to run in PCI Agent mode, acting as a
PCI card rather than a host computer.

Signed-off-by: Ira W. Snyder <iws@ovro.caltech.edu>
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
2008-08-25 17:04:36 -05:00
Ira W. Snyder 162338e1fc MPC8349EMDS: use 83XX_GENERIC_PCI setup code
Change the MPC8349EMDS board to use the generic PCI initialization code
for the mpc83xx cpu.

Signed-off-by: Ira W. Snyder <iws@ovro.caltech.edu>
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
2008-08-25 17:04:24 -05:00
Kim Phillips ce0eb70333 Merge branch 'next' 2008-08-25 17:02:10 -05:00
Kumar Gala fcd69a1a57 Clean up usage of icache_disable/dcache_disable
There is no point in disabling the icache on 7xx/74xx/86xx parts and not
also flushing the icache.  All callers of invalidate_l1_instruction_cache()
call icache_disable() right after.  Make it so icache_disable() calls
invalidate_l1_instruction_cache() for us.

Also, dcache_disable() already calls dcache_flush() so there is no point
in the explicit calls of dcache_flush().

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-08-19 00:57:28 +02:00
TsiChung Liew 4cb4e654ca ColdFire: Multiple fixes for M5282EVB
Incorrect CFG_HZ value, change 1000000 to 1000.
Rename #waring to #warning. RAMBAR1 uses twice
in start.S, rename the later to FLASHBAR. Insert
nop for DRAM setup. And, env_offset in linker file.

Signed-off-by: TsiChung Liew <Tsi-Chung.Liew@freescale.com>
2008-08-14 12:31:56 -06:00
TsiChung Liew 10db3a17a2 ColdFire: Move m5282evb from board to board/freescale
Signed-off-by: TsiChung Liew <Tsi-Chung.Liew@freescale.com>
2008-08-14 12:31:56 -06:00
TsiChung Liew 56df091d39 ColdFire: Move m5272c3 from board to board/freescale
Signed-off-by: TsiChung Liew <Tsi-Chung.Liew@freescale.com>
2008-08-14 12:31:56 -06:00
TsiChung Liew 659e9bad62 ColdFire: Move m5271evb from board to board/freescale
Signed-off-by: TsiChung Liew <Tsi-Chung.Liew@freescale.com>
2008-08-14 12:31:56 -06:00
TsiChung Liew 05316f8ece ColdFire: Add M54451EVB platform support for MCF5445x
Signed-off-by: TsiChung Liew <Tsi-Chung.Liew@freescale.com>
2008-08-14 12:31:56 -06:00
TsiChung Liew 9f75155145 ColdFire: Implement SBF feature for M5445EVB
Signed-off-by: TsiChung Liew <Tsi-Chung.Liew@freescale.com>
2008-08-14 12:31:55 -06:00
TsiChung Liew b2d022d1ac ColdFire: Use CFI Flash driver for M54455EVB
Remove non-common flash driver in
board/freescale/m54455evb/flash.c. The non-cfi flash will
use CONFIG_FLASH_CFI_LEGACY to configure the flash
attribute.

Signed-off-by: TsiChung Liew <Tsi-Chung.Liew@freescale.com>
2008-08-14 12:30:10 -06:00
TsiChung Liew 6d33c6acfa ColdFire: Add M5253DEMO platform support for MCF5253
Signed-off-by: TsiChung Liew <Tsi-Chung.Liew@freescale.com>
2008-08-14 12:30:10 -06:00
TsiChung Liew d361307e73 ColdFire: Fix M5253EVB dram bring up issue
Signed-off-by: TsiChung Liew <Tsi-Chung.Liew@freescale.com>
2008-08-14 12:30:10 -06:00
Wolfgang Denk 28ac671910 Merge branch 'master' of git://git.denx.de/u-boot-nand-flash 2008-08-14 11:26:22 +02:00
Scott Wood f64cb652a8 m5373evb: Update NAND driver to new API.
Signed-off-by: Scott Wood <scottwood@freescale.com>
2008-08-13 17:53:48 -05:00
Jean-Christophe PLAGNIOL-VILLARD f5acb9fd9b mx31: move freescale's mx31 boards to vendor board dir
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-08-13 01:40:09 +02:00
Scott Wood e4c0950854 NAND boot: MPC8313ERDB support
Note that with older board revisions, NAND boot may only work after a
power-on reset, and not after a warm reset.  I don't have a newer board
to test on; if you have a board with a 33MHz crystal, please let me know
if it works after a warm reset.

Signed-off-by: Scott Wood <scottwood@freescale.com>
2008-08-12 11:31:31 -05:00
William Juul cfa460adfd Update MTD to that of Linux 2.6.22.1
A lot changed in the Linux MTD code, since it was last ported from
Linux to U-Boot. This patch takes U-Boot NAND support to the level
of Linux 2.6.22.1 and will enable support for very large NAND devices
(4KB pages) and ease the compatibility between U-Boot and Linux
filesystems.

This patch is tested on two custom boards with PPC and ARM
processors running YAFFS in U-Boot and Linux using gcc-4.1.2
cross compilers.

MAKEALL ppc/arm has some issues:
 * DOC/OneNand/nand_spl is not building (I have not tried porting
   these parts, and since I do not have any HW and I am not familiar
   with this code/HW I think its best left to someone else.)

Except for the issues mentioned above, I have ported all drivers
necessary to run MAKEALL ppc/arm without errors and warnings. Many
drivers were trivial to port, but some were not so trivial. The
following drivers must be examined carefully and maybe rewritten to
some degree:
 cpu/ppc4xx/ndfc.c
 cpu/arm926ejs/davinci/nand.c
 board/delta/nand.c
 board/zylonite/nand.c

Signed-off-by: William Juul <william.juul@tandberg.com>
Signed-off-by: Stig Olsen <stig.olsen@tandberg.com>
Signed-off-by: Scott Wood <scottwood@freescale.com>
2008-08-12 11:31:15 -05:00
Kumar Gala c11528083e mpc85xx: workaround old binutils bug
The recent change to move the .bss outside of the image gives older
binutils (ld from eldk4.1/binutils-2.16) some headache:

ppc_85xx-ld: u-boot: Not enough room for program headers (allocated 3, need 4)
ppc_85xx-ld: final link failed: Bad value

We workaround it by being explicit about the program headers and not
assigning the .bss to a program header.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-08-10 22:41:12 +02:00
TsiChung Liew 35d3bd3cc3 Fix compilation error for MCF5275
Rename OBJ to COBJ in board/platform/Makefile

Signed-off-by: TsiChung Liew <Tsi-Chung.Liew@freescale.com>
2008-08-01 12:33:59 +02:00
Kumar Gala f0ff885ca6 mpc85xx: Update linker scripts for Freescale boards
* Move to using absolute addressing always.  Makes the scripts a bit more
  portable and common
* Moved .bss after the end of the image.  These allows us to have more
  room in the resulting binary image for code and data.
* Removed .text object files that aren't really needed
* Make sure _end is 4-byte aligned as the .bss init code expects this.
  (Its possible that the end of .bss isn't 4-byte aligned)

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-07-31 11:33:23 +02:00
Anton Vorontsov 021f6df6e9 83xx: mpc8315erdb: fix silly thinko in fdt_tsec1_fixup
The thinko was quite silly indeed, I messed with !ptr. Normally this
would trigger some fault, but in U-Boot NULL pointer is equal to phys
0, so the code was working still, just didn't actually test mpc8315erdb
environment variable value. Heh.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
2008-07-16 14:16:44 -05:00
Anton Vorontsov 25f5f0d49a 83xx: mpc8315erdb: add support for switching between ULPI/UTMI USB PHYs
Freescale ships MPC8315E-RDB boards either with TSEC1 and USB UTMI
support, or without TSEC1 but with USB ULPI PHY support in addition.
With this patch user can specify desired USB PHY.

Also, it seems that we can't distinguish the two boards in software, so
user have to set `mpc8315erdb' environment variable to either 'tsec1'
(TSEC1 enabled) or `ulpi' (board with ULPI PHY, TSEC1 disabled), so that
Linux will not probe for TSEC1.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
2008-07-16 14:16:44 -05:00
Wolfgang Denk 699f051255 Prepare v1.3.4-rc1: Code cleanup, update CHANGELOG, sort Makefile
Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-07-15 22:22:44 +02:00
Wolfgang Denk 508548371e Merge branch 'master' of git://git.denx.de/u-boot-mpc86xx 2008-07-15 21:39:07 +02:00
Timur Tabi e2d31fb345 Update Freescale sys_eeprom.c to handle CCID formats
Update the sys_eeprom.c file to handle both NXID and CCID EEPROM formats.  The
NXID format replaces the older CCID format, but it's important to support both
since most boards out there still use the CCID format.  This change is in
preparation for using one file to handle both formats.  This will also unify
EEPROM support for all Freescale 85xx and 86xx boards.

Also update the 86xx board header files to use the standard CFG_I2C_EEPROM_ADDR
instead of ID_EEPROM_ADDR.

Signed-off-by: Timur Tabi <timur@freescale.com>
2008-07-15 10:59:27 -05:00
Kumar Gala 630d9bfcb5 MPC8544DS: Add ATI Video card support
Add support for using a PCIe ATI Video card on PCIe2.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-07-14 20:21:11 -05:00
Kumar Gala e5852787f0 MPC8544DS: Report board id, board version and fpga version.
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-07-14 20:15:22 -05:00
Andy Fleming ab5cda9f88 Remove LBC_CACHE_BASE from 8544 DS
The 8544 DS doesn't have any cacheable Local Bus memories set up.  By mapping
space for some anyway, we were allowing speculative loads into unmapped space,
which would cause an exception (annoying, even if ultimately harmless).
Removing LBC_CACHE_BASE, and using LBC_NONCACHE_BASE for the LBC LAW solves the
problem.

Signed-off-by: Andy Fleming <afleming@freescale.com>
2008-07-14 11:21:33 -05:00
Wolfgang Denk 0740ac26f4 Merge branch 'master' of git://git.denx.de/u-boot-coldfire 2008-07-13 14:44:04 +02:00
Wolfgang Denk bde6358762 Fix some more printf() format issues.
Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-07-11 22:56:11 +02:00
Wolfgang Denk 184f1b404a Fixed some out-of-tree build issues
Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-07-11 22:55:31 +02:00
TsiChung Liew ab4860b255 ColdFire: Fix power up issue for MCF5235
Signed-off-by: TsiChung Liew <Tsi-Chung.Liew@freescale.com>
2008-07-11 10:45:58 -06:00
Wolfgang Denk 9b55a25369 Fix some more print() format errors.
Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-07-11 01:16:00 +02:00
Jon Loeliger 859f24350e Merge commit 'wd/master' 2008-07-10 12:05:32 -05:00
Matvejchikov Ilya 0e6989b9fa FDT memory and pci node fixes for MPC8260ADS
Signed-off-by: Matvejchikov Ilya <matvejchikov@gmail.com>
2008-07-09 23:57:59 +02:00
Wolfgang Denk c8a3b109f0 Cleanup out-or-tree building for some boards (.depend)
Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-07-02 23:49:18 +02:00
Wolfgang Denk a30cc5a340 Cleanup: fix out-of-tree building for some boards
Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-07-02 23:38:50 +02:00
Wolfgang Denk 461fa68d20 Cleanup: replace hard-wired $(AR) 'crv' settings by $(ARFLAGS)
Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-07-02 23:00:14 +02:00
Ben Warren f8cc312bbe Move conditional compilation of MPC8XXX SPI driver to Makefile
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2008-07-01 21:02:11 +02:00
Wolfgang Grandegger b4fe1a7109 MPC8360ERDK: adapt NAND interface for the re-written FSL NAND UPM driver
This patch is based on the following patch sent a few minutes ago:
"NAND FSL UPM: driver re-write using the hwcontrol callback"
It is untested, of course. Anton, could you please give it a try.

Signed-off-by: Wolfgang Grandegger <wg@grandegger.com>
Acked-by: Anton Vorontsov <avorontsov@ru.mvista.com>
2008-06-19 22:54:45 +02:00
Kumar Gala a036b04436 MPC8610HPCD: Report board id, board version and fpga version.
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-06-19 08:32:18 -05:00
Kumar Gala 7de8c21f14 MPC8641HPCN: Report board id, board version and fpga version.
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-06-19 08:32:13 -05:00
Becky Bruce 9973e3c614 Change initdram() return type to phys_size_t
This patch changes the return type of initdram() from long int to phys_size_t.
This is required for a couple of reasons: long int limits the amount of dram
to 2GB, and u-boot in general is moving over to phys_size_t to represent the
size of physical memory.  phys_size_t is defined as an unsigned long on almost
all current platforms.

This patch *only* changes the return type of the initdram function (in
include/common.h, as well as in each board's implementation of initdram).  It
does not actually modify the code inside the function on any of the platforms;
platforms which wish to support more than 2GB of DRAM will need to modify
their initdram() function code.

Build tested with MAKEALL for ppc, arm, mips, mips-el. Booted on powerpc
MPC8641HPCN.

Signed-off-by: Becky Bruce <becky.bruce@freescale.com>
2008-06-12 08:50:18 +02:00
Wolfgang Denk cdeb62e20d Merge branch 'master' of git://www.denx.de/git/u-boot-fdt 2008-06-11 22:30:47 +02:00
Wolfgang Denk 5ea67393b8 Merge branch 'master' of git://www.denx.de/git/u-boot-mpc85xx
Conflicts:

	include/asm-ppc/fsl_lbc.h

Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-06-11 21:33:16 +02:00
Kumar Gala 859a86a25c 85xx/86xx: Move to dynamic mgmt of LAWs
With the new LAW interface (set_next_law) we can move to letting the
system allocate which LAWs are used for what purpose.  This makes life
a bit easier going forward with the new DDR code.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Andy Fleming <afleming@freescale.com>
Acked-by: Jon Loeliger <jdl@freescale.com>
Acked-by: Becky Bruce <becky.bruce@freescale.com>
2008-06-11 01:52:23 -05:00
Kumar Gala ddde74a159 85xx: remove dummy board_early_init_f
A number of board ports have empty version of board_early_init_f
for no reason since we control its via CONFIG_BOARD_EARLY_INIT_F.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-06-11 00:36:02 -05:00
Kumar Gala 978e81604c 85xx: Remove unused and unconfigured memory test code.
Remove unused and unconfigured DDR test code from FSL 85xx boards.
Besides, other common code exists.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-06-11 00:35:52 -05:00
Gerald Van Baren fec6d9ee7c Remove the deprecated CONFIG_OF_FLAT_TREE
Use CONFIG_OF_LIBFDT instead to support flattened device trees.  It is
cleaner, has better functionality, and is better supported.

Signed-off-by: Gerald Van Baren <vanbaren@cideas.com>
2008-06-09 21:13:35 -04:00
Gerald Van Baren 589c04271d Convert mpc7448hpc2 to CONFIG_OF_LIBFDT
This was configured to use the deprecated CONFIG_OF_FLAT_TREE, change
to CONFIG_OF_LIBFDT.

WARNING: This conversion is untested because I do not have a board to
test it on.

NOTE: The FDT blob (DTS) must have an /aliases/ethernet0 and (optionally)
/aliases/ethernet1 property for the ethernet to work.

Signed-off-by: Gerald Van Baren <vanbaren@cideas.com>
2008-06-09 21:13:24 -04:00
Jon Loeliger 1a247ba7fa Merge commit 'wd/master' 2008-06-06 10:48:31 -05:00
Haavard Skinnemoen d255bb0e78 SPI API improvements
This patch gets rid of the spi_chipsel table and adds a handful of new
functions that makes the SPI layer cleaner and more flexible.

Instead of the spi_chipsel table, each board that wants to use SPI
gets to implement three hooks:
  * spi_cs_activate(): Activates the chipselect for a given slave
  * spi_cs_deactivate(): Deactivates the chipselect for a given slave
  * spi_cs_is_valid(): Determines if the given bus/chipselect
    combination can be activated.

Not all drivers may need those extra functions however. If that's the
case, the board code may just leave them out (assuming they know what
the driver needs) or rely on the linker to strip them out (assuming
--gc-sections is being used.)

To set up communication parameters for a given slave, the driver needs
to call spi_setup_slave(). This returns a pointer to an opaque
spi_slave struct which must be passed as a parameter to subsequent SPI
calls. This struct can be freed by calling spi_free_slave(), but most
driver probably don't want to do this.

Before starting one or more SPI transfers, the driver must call
spi_claim_bus() to gain exclusive access to the SPI bus and initialize
the hardware. When all transfers are done, the driver must call
spi_release_bus() to make the bus available to others, and possibly
shut down the SPI controller hardware.

spi_xfer() behaves mostly the same as before, but it now takes a
spi_slave parameter instead of a spi_chipsel function pointer. It also
got a new parameter, flags, which is used to specify chip select
behaviour. This may be extended with other flags in the future.

This patch has been build-tested on all powerpc and arm boards
involved. I have not tested NIOS since I don't have a toolchain for it
installed, so I expect some breakage there even though I've tried
fixing up everything I could find by visual inspection.

I have run-time tested this on AVR32 ATNGW100 using the atmel_spi and
DataFlash drivers posted as a follow-up. I'd like some help testing
other boards that use the existing SPI API.

But most of all, I'd like some comments on the new API. Is this stuff
usable for everyone? If not, why?

Changed in v4:
  - Build fixes for various boards, drivers and commands
  - Provide common struct spi_slave definition that can be extended by
    drivers
  - Pass a struct spi_slave * to spi_cs_activate and spi_cs_deactivate
  - Make default bus and mode build-time configurable
  - Override default SPI bus ID and mode on mx32ads and imx31_litekit.

Changed in v3:
  - Add opaque struct spi_slave for controller-specific data associated
    with a slave.
  - Add spi_claim_bus() and spi_release_bus()
  - Add spi_free_slave()
  - spi_setup() is now called spi_setup_slave() and returns a
    struct spi_slave
  - soft_spi now supports four SPI modes (CPOL|CPHA)
  - Add bus parameter to spi_setup_slave()
  - Convert the new i.MX32 SPI driver
  - Convert the new MC13783 RTC driver

Changed in v2:
  - Convert the mpc8xxx_spi driver and the mpc8349emds board to the
    new API.

Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
Tested-by: Guennadi Liakhovetski <lg@denx.de>
2008-06-03 20:28:50 +02:00
York Sun a48ff68d23 Replace DPRINTF with debug
Remove DPRINTF macro and replace it with generic debug macro.

Signed-off-by: York Sun <yorksun@freescale.com>
2008-05-21 00:54:36 +02:00
York Sun 3b80c5f574 Move pixel clock setting to board file
The clock divider has different format in 5121 and 8610. This patch moves it to
board specific code.

Signed-off-by: York Sun <yorksun@freescale.com>
2008-05-21 00:54:36 +02:00
Wolfgang Denk 53677ef18e Big white-space cleanup.
This commit gets rid of a huge amount of silly white-space issues.
Especially, all sequences of SPACEs followed by TAB characters get
removed (unless they appear in print statements).

Also remove all embedded "vim:" and "vi:" statements which hide
indentation problems.

Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-05-21 00:14:08 +02:00
Jon Loeliger 2c289e320d mpc86xx: Removed unused and unconfigured memory test code.
Besides, other common code exists.

Signed-off-by: Jon Loeliger <jdl@freescale.com>
2008-05-19 09:47:25 -05:00
Andy Fleming 66f5fa9263 85xx: Limit CPU2 workaround to parts that have the errata
Signed-off-by: Ebony Zhu <ebony.zhu@freescale.com>
Signed-off-by: Andy Fleming <afleming@freescale.com>
2008-05-07 16:54:31 -05:00
Kumar Gala 4d77f5102d MPC8610HPCD: Drop -O2 from the build flags
Make the flags use -Os like all other boards

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-05-03 20:49:10 +02:00
Kumar Gala 45239cf415 85xx/86xx: Rename ext_refrec to timing_cfg_3 to match docs
All the 85xx and 86xx UM describe the register as timing_cfg_3
not as ext_refrec.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-04-29 11:44:29 -05:00
Ed Swarthout f97abbfb47 MPC8544DS: decode pcie3 end-point configuration correctly.
Signed-off-by: Ed Swarthout <Ed.Swarthout@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-04-26 00:25:30 +02:00
Jason Wessel 3d36be0300 Remove all the search paths from the .lds files.
The cross compiler is responsible for providing the correct libraries
and the logic to find the linking libraries.

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
2008-04-17 23:57:32 -07:00
Wolfgang Denk 1aeed8d71a Coding Style cleanup; update CHANGELOG
Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-04-13 09:59:26 -07:00
Dave Liu 5fb5a689d8 mpc83xx: Fix the bug of serdes initialization
Currently the serdes will not be initializated due to the
partid's error.

Signed-off-by: Dave Liu <daveliu@freescale.com>
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
2008-04-11 17:46:18 -05:00
Jean-Christophe PLAGNIOL-VILLARD 1ac4f320bf mpc837xerdb: Fix warning: implicit declaration of function 'fdt_fixup_dr_usb'
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
2008-04-11 17:46:17 -05:00
Wolfgang Denk 2c78febd11 Merge branch 'master' of git://www.denx.de/git/u-boot-coldfire 2008-04-08 00:10:17 +02:00
TsiChung Liew bae61eefe1 ColdFire: Add dspi and serial flash support for MCF5445x
Signed-off-by: TsiChung Liew <Tsi-Chung.Liew@freescale.com>
Acked-by: John Rigby <jrigby@freescale.com>
2008-03-31 15:10:29 -06:00
Matthew Fettke 545c8e0a7c ColdFire: Added M5275EVB support.
Signed-off-by: Matthew Fettke <mfettke@videon-central.com>
Signed-off-by: TsiChung Liew <Tsi-Chung.Liew@freescale.com>
Acked-by: John Rigby <jrigby@freescale.com>
2008-03-31 15:10:11 -06:00
TsiChung Liew 77878f16ce ColdFire: Fix second memory Chipselect for M5475EVB
Signed-off-by: TsiChung Liew <Tsi-Chung.Liew@freescale.com>
Acked-by: John Rigby <jrigby@freescale.com>
2008-03-31 15:17:10 -05:00
Michael Barkowski 5b2793a3f3 mpc8323erdb: fix EEPROM page size and get MAC from EEPROM
This patch fixes eeprom page size so that you can now write more than
64 bytes at a time.

It also makes the board take MAC addresses, if found, from EEPROM.

User should place up to 4 addresses at offset 0x7f00, for
eth{,1,2,3}addr.  Any unused addresses should be zero.  This group of
four six-byte values should have it's CRC at the end.  crc32 and
eeprom commands can be used to accomplish this.

If CRC fails, MAC addresses come from the environment.  If CRC
succeeds, the environment is overwritten at startup.

Signed-off-by: Michael Barkowski <michael.barkowski@freescale.com>
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
2008-03-28 16:02:27 -05:00
Kim Phillips e5c4ade4db mpc83xx: cleanup System Part and Revision ID Register (SPRIDR) code
in the spirit of commit 1ced121600,
85xx's "Update SVR numbers to expand support", simplify SPRIDR processing
and processor ID display.  Add REVID_{MAJ,MIN}OR macros to make
REVID dependent code simpler.  Also added PARTID_NO_E and IS_E_PROCESSOR
convenience macros.

Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
2008-03-28 16:01:06 -05:00
Dave Liu 6f8c85e8d1 mpc83xx: initialize serdes for MPC837xEMDS boards
This patch is stolen from Anton Vorontsov's patch
for mpc837xerdb boards.

The reference clk and xcorevdd voltage of serdes1/2
is same between mpc837xemds and mpc837xerdb.

8377E: LYNX1- 2 SATA	LYNX2- 2 PCIE
8378E: LYNX1- 2 SGMII	LYNX2- 2 PCIE
8379E: LYNX1- 2 SATA	LYNX2- 2 SATA

Signed-off-by: Dave Liu <daveliu@freescale.com>
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
2008-03-28 14:11:51 -05:00
Jon Loeliger 25eedb2c19 FSL: Clean up board/freescale/common/Makefile
Each file that can be built here now follows some
CONFIG_ option so that they are appropriately built
or not, as needed.  And CONFIG_ defines were added
to various board config files to make sure that happens.

The other board/freescale/*/Makefiles no longer need
to reach up and over into ../common to build their
individually needed files any more.

Boards that are CDS specific were renamed with cds_ prefix.

Signed-off-by: Jon Loeliger <jdl@freescale.com>
2008-03-26 11:43:04 -05:00
Kumar Gala f69766e4b5 85xx: Add the concept of CFG_CCSRBAR_PHYS
When we go to 36-bit physical addresses we need to keep the concept of
the physical CCSRBAR address seperate from the virtual one.

For the majority of boards CFG_CCSBAR_PHYS == CFG_CCSRBAR

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-03-26 11:43:03 -05:00
Anton Vorontsov 18e69a35ef 83xx/fdt_support: let user specifiy FSL USB Dual-Role controller role
Linux understands "host" (default), "peripheral" and "otg" (broken).
Though, U-Boot doesn't restrict dr_mode variable to these values (think
of renames in future).

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
2008-03-25 19:19:39 -05:00
Anton Vorontsov d47d49cc37 mpc83xx: MPC8360E-RDK: configure pario pins for AD7843 and FHCI
This patch adds qe pario pins configuration for AD7843 ADC/Touchscreen
controller and FHCI (QE USB).

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
2008-03-25 19:16:47 -05:00
Anton Vorontsov 7ad9594909 mpc83xx: MPC8360E-RDK: add support for NAND
Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
2008-03-25 19:16:46 -05:00
Anton Vorontsov 2bd7460e92 83xx: initialize serdes for MPC837XRDB boards
On the MPC8377ERDB: 2 SATA and 2 PCI-E.
On the MPC8378ERDB: 2 PCI-E
On the MPC8379ERDB: 4 SATA

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
2008-03-25 19:16:45 -05:00
Timur Tabi 89c7784ed9 83xx: Add Vitesse VSC7385 firmware uploading
Update the MPC8349E-mITX, MPC8313E-RDB, and MPC837XE-RDB board files to upload
the Vitesse VSC7385 firmware.  Changed CONFIG_VSC7385 to CONFIG_VSC7385_ENET.
Cleaned up the board header files to make selecting the VSC7385 easier to
control.

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
2008-03-25 19:16:43 -05:00
Jon Loeliger aa3511e422 FSL: Move board/mpc8266ads under board/freescale
Signed-off-by: Jon Loeliger <jdl@freescale.com>
2008-03-25 23:00:40 +01:00
Jon Loeliger 7f1d846e5c FSL: Move board/mpc7448hpc2 under board/freescale
Signed-off-by: Jon Loeliger <jdl@freescale.com>
2008-03-25 23:00:36 +01:00
Jon Loeliger b7e24d283e FSL: Move board/mpc8260ads under board/freescale
Signed-off-by: Jon Loeliger <jdl@freescale.com>
2008-03-25 23:00:00 +01:00
Jon Loeliger a30a549a35 Remove erroneous or extra spd.h #includers.
Many of the spd.h #includers don't need it,
and wanted to have spd_sdram() declared instead.
Since they didn't get that, some also had open
coded extern declarations of it instead or as well.
Fix it all up by using spd_sdram.h where needed.

Signed-off-by: Jon Loeliger <jdl@freescale.com>
2008-03-05 00:17:43 +01:00
Jon Loeliger a551cee99a 86xx: Fix GUR PCI config registers properly.
Back in commit 975a083a5e where
I tried to "8610HPCD: Fix typos in two PCI setup registers", I
botched it due to not realizing that 8610 and 8641 had different
Global Utility Register defintions, one of which was like 85xx,
and the other wasn't.  Correct this problem by introducing two
symbols, one for each 86xx SoC, but neither of which is named
anything like 85xx.

My bad.  Lovely Wednesday with git bisect.  You know.

Signed-off-by: Jon Loeliger <jdl@freescale.com>
2008-02-20 14:45:09 -06:00
Jon Loeliger 975a083a5e 8610HPCD: Fix typos in two PCI setup registers.
The two symbols MPC86xx_PORDEVSR_IO_SEL and MPC86xx_PORBMSR_HA
were erroneously present as 85xx names and values, leftover from
the clone wars.  Fix this by removing the 85xx cruft from the
86xx codebase.

Signed-off-by: Jon Loeliger <jdl@freescale.com>
2008-02-19 12:31:08 -06:00
Jon Loeliger 13f5433f70 86xx: Convert sbc8641d to use libfdt.
This is the proper fix for a missing closing brace in the function
ft_cpu_setup() noticed by joe.hamman <at> embeddedspecialties.com.
The ft_cpu_setup() function in mpc8641hpcn.c should have been
removed earlier as it was under the obsolete CONFIG_OF_FLAT_TREE,
but was missed.  Only, the sbc8641d was nominally still using it.
It all got ripped out, and the funcality that was in ft_board_setup()
was refactored to remove the CPU portions into the new file
cpu/mpc86xx/fdt.c instead.  Make sbc8641d use this now.

Based loosely on an original patch from joe.hamman@embeddedspecialties.com

Signed-off-by: Jon Loeliger <jdl@freescale.com>
2008-02-18 14:01:56 -06:00
Jon Loeliger 3f2ac8f928 86xx: Fix compilation warning in sys_eprom.c
sys_eeprom.c:82:9: warning: unknown escape sequence '\/'

Signed-off-by: Jon Loeliger <jdl@freescale.com>
2008-02-14 13:58:53 -06:00
Becky Bruce 9cd32426f2 86xx: Remove old-style law setup code
This includes mpc8610hpcd, mpc8641hpcn, and sbc8641d.

Signed-off-by: Becky Bruce <becky.bruce@freescale.com>
2008-01-24 12:12:40 -06:00
Becky Bruce 031976f636 86xx: Convert mpc8610hpcd to new law setup method.
Signed-off-by: Becky Bruce <becky.bruce@freescale.com>
2008-01-24 12:12:33 -06:00
Becky Bruce 4933b91f8a 86xx: Support new law setup method and convert mpc8641
Adds the support code in cpu/mpc86xx for the new law setup code
recently created fsl_law.c, and changes the MPC8641HPCN config
to use this code.

Signed-off-by: Becky Bruce <becky.bruce@freescale.com>
2008-01-24 12:12:30 -06:00
Wolfgang Denk e57ed96bac Merge branch 'master' of git://www.denx.de/git/u-boot-coldfire 2008-01-23 14:23:13 +01:00
Wolfgang Denk ed3afca32e Merge branch 'master' of git://www.denx.de/git/u-boot-mpc86xx 2008-01-23 14:18:18 +01:00
Wolfgang Denk 39166b5c9e Merge branch 'master' of git://www.denx.de/git/u-boot-mpc85xx 2008-01-23 13:56:55 +01:00
TsiChungLiew 1aee111135 ColdFire: MCF547x_8x - Add M547xEVB and M548xEVB board
Signed-off-by: TsiChungLiew <Tsi-Chung.Liew@freescale.com>
Signed-off by: John Rigby <jrigby@freescale.com>
2008-01-17 14:59:42 -06:00
TsiChungLiew 1552af70ec ColdFire: Add MCF5227x cpu and M52277EVB support-1
Signed-off-by: TsiChungLiew <Tsi-Chung.Liew@freescale.com>
Signed-off by: John Rigby <jrigby@freescale.com>
2008-01-17 14:59:41 -06:00
TsiChungLiew 1ac559d4aa ColdFire: Add M5373EVB platform support - 1
Signed-off-by: TsiChungLiew <Tsi-Chung.Liew@freescale.com>
Signed-off by: John Rigby <jrigby@freescale.com>
2008-01-17 14:59:40 -06:00
TsiChungLiew 320d61991f ColdFire: Update FlexBus CS for MCF532x
Definition update and change from 16bit to 32bit

Signed-off-by: TsiChungLiew <Tsi-Chung.Liew@freescale.com>
Signed-off by: John Rigby <jrigby@freescale.com>
2008-01-17 14:59:40 -06:00
Kim Phillips 2956acd5ef codingstyle cleanup for spi driver
..and rm unused CONFIG_FSL_SPI define

Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
2008-01-17 14:01:59 -06:00
Haiying Wang d59feffb42 FSL: Fix common EEPROM_data structure definition
- Fix EEPROM_data structure definition according to System EEPROM Data Format.
- Read MAC addresses from EEPROM to ethXaddr before saving ethXaddr to
  bd->bi_ethaddr.

Signed-off-by: Haiying Wang <Haiying.Wang@freescale.com>
2008-01-17 12:26:56 -06:00
Ben Warren 80ddd22626 Implement hard SPI driver on MPC8349EMDS
This patch implements the fsl_spi driver on the MPC8349EMDS evaluation board.
This board has an ST M25P40 4Mbit EEPROM on its SPI bus

Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
2008-01-17 11:02:33 -06:00
Kumar Gala 73aa9ac2b4 85xx: Convert MPC8568 MDS to new TLB setup
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-01-17 02:08:53 -06:00
Kumar Gala 0db37dc2ee 85xx: Convert MPC8541/MPC8555/MPC8548 CDS to new TLB setup
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-01-17 02:08:24 -06:00
Kumar Gala 219a81b98d 85xx: Convert MPC8540/MPC8560 ADS to new TLB setup
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-01-17 02:06:53 -06:00
Kumar Gala 0f7a3dc95c 85xx: Convert MPC8544 DS to new TLB setup
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-01-17 02:05:35 -06:00
Kumar Gala c8c41d4a80 85xx: Use proper defines for PCI addresses
We should be using the _MEM_PHYS for LAW and TLB setup and not _MEM_BASE.
While _MEM_BASE & _MEM_PHYS are normally the same, _MEM_BASE should only
be used for configuring the PCI ATMU.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-01-16 23:21:56 -06:00
Kumar Gala 4d3521cc79 85xx: convert remaining 85xx boards over to use new LAW init code
Converted ATUM8548, MPC8568 MDS, MPC8540 EVAL, and TQM85xx boards over
to use new LAW init code.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-01-16 23:21:56 -06:00
Kumar Gala 2cfaa1aa1a 85xx: convert MPC8541/MPC8555/MPC8548 CDS over to use new LAW init code
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-01-16 23:21:55 -06:00
Kumar Gala 7232a2724c 85xx: convert MPC8540/MPC8560 ADS over to use new LAW init code
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-01-16 23:21:55 -06:00
Kumar Gala 4bcae9c92a 85xx: convert MPC8544 DS over to use new LAW init code
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-01-16 23:21:55 -06:00
Wolfgang Denk 4c9e98ace7 Merge branch 'master' of git://www.denx.de/git/u-boot-mpc86xx 2008-01-16 22:06:51 +01:00
Kim Phillips 5e918a98c2 Add support for the MPC837xERDB
MPC837xERDB board support includes:
* DDR2 330MHz hardcoded (soldered on the board)
* Local Bus NOR Flash
* I2C, UART and RTC
* eTSEC RGMII (TSEC0 - RTL8211B with MII;
*	       TSEC1 - VSC7385 local bus, hardcoded, requires seperate firmware
*		       load)

Signed-off-by: Kevin Lam <kevin.lam@freescale.com>
Signed-off-by: Joe D'Abbraccio <joe.d'abbraccio@freescale.com>
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
2008-01-16 12:32:39 -06:00
James Yang 16c3cde050 FSL: Generalize PIXIS reset command parsing.
Before, the order of arguments to the pixis_reset
command needed to be supplied in a hard-coded order.
Generalize the command parsing to allow any order.

Signed-off-by: James Yang <james.yang@freescale.com>
Acked-by: Jon Loeliger <jdl@freescale.com>
2008-01-16 12:08:54 -06:00
Jon Loeliger ad8f8687b7 FSL: Convert board/freescale/common/Makefile to use CONFIG_
Convert the board/freescale/common/Makefile to use
CONFIG_* options to select which files to conditionally
compile into the board/freescale/common library rather
than conditionally compiling entire files.

Now handles::
    CONFIG_FSL_PIXIS
    CONFIG_FSL_DIU_FB
    CONFIG_PQ_MDS_PIB

CONFIG_ID_EEPROM is introduced until CFG_ID_EEPROM is gone.

Signed-off-by: Jon Loeliger <jdl@freescale.com>
2008-01-16 12:05:05 -06:00
Kim Phillips 363eea9ff7 mpc83xx: clean up mpc8360emds.c warnings
mpc8360emds.c: In function 'ft_board_setup':
mpc8360emds.c:327: warning: assignment makes pointer from integer without a cast
mpc8360emds.c:329: warning: passing argument 2 of 'fdt_getprop' makes integer from pointer without a cast
mpc8360emds.c:334: warning: passing argument 2 of 'fdt_setprop' makes integer from pointer without a cast
mpc8360emds.c:341: warning: assignment makes pointer from integer without a cast
mpc8360emds.c:343: warning: passing argument 2 of 'fdt_getprop' makes integer from pointer without a cast
mpc8360emds.c:348: warning: passing argument 2 of 'fdt_setprop' makes integer from pointer without a cast

Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
2008-01-16 12:00:50 -06:00
Kim Phillips f09880ea72 mpc83xx: fix phy-connection-type fixup code
use tree passed to us in local blob, not global fdt.

Also use fdt_path_offset to convert to relative offset, since absolute
reference is needed to check for rgmii-id mode string value.

Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
2008-01-16 12:00:50 -06:00
Kumar Gala 2b4c952be7 mpc83xx: fix mpc8313/mpc8315/mpc8349itx Makefiles for silent build (with -s)
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
2008-01-16 12:00:50 -06:00
Dave Liu 8bd522ce4a mpc83xx: Add the support for MPC8315ERDB board
The features list:
- Boot from NOR Flash
- DDR2 266MHz hardcoded configuration
- Local bus NOR Flash R/W operation
- I2C, UART, MII and RTC
- eTSEC0/1 support
- PCI host

Signed-off-by: Dave Liu <daveliu@freescale.com>
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
2008-01-16 12:00:49 -06:00
Wolfgang Denk 89967841e3 MPC8544DS: fix board Makefile for silent build (with -s)
Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-01-13 19:57:08 +01:00
Wolfgang Denk 64134f0112 Fix linker scripts: add NOLOAD atribute to .bss/.sbss sections
With recent toolchain versions, some boards would not build because
or errors like this one (here for ocotea board when building with
ELDK 4.2 beta):
ppc_4xx-ld: section .bootpg [fffff000 -> fffff23b] overlaps section .bss [fffee900 -> fffff8ab]

For many boards, the .bss section is big enough that it wraps around
at the end of the address space (0xFFFFFFFF), so the problem will not
be visible unless you use a 64 bit tool chain for development. On
some boards however, changes to the code size (due to different
optimizations) we bail out with section overlaps like above.

The fix is to add the NOLOAD attribute to the .bss and .sbss
sections, telling the linker that .bss does not consume any space in
the image.

Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-01-12 20:31:39 +01:00
Wolfgang Denk 14c14db193 Merge branch 'master' of git://www.denx.de/git/u-boot-mpc83xx 2008-01-12 00:04:01 +01:00
Anton Vorontsov fab6f556bb mpc83xx: add support for the MPC8360E-RDK
This is MPC8360E based board with:
- 256MB fixed SDRAM;
- 8MB Intel Strata NOR flash;
- StMICRO 64MiB NAND flash;
- two 10/100/1000 ethernet ports connected via Broadcom
  BCM5481 PHYs;
- two 10/100 ethernet ports connected via National
  DP83848 PHYs;
- one PCI and one miniPCI slots;
- four serial ports (two NS16550-compatible, two UCCs);
- four USB ports working through MPC8360E "FHCI" USB controller;
- Fujitsu MB86277 graphics controller;
- Analog to Digital Converter/Touchscreen controller, AD7843
  connected to SPI.

Features not supported in this patch are:
- StMICRO 64MiB NAND flash (patch sent);
- MINT framebuffer initialization (patch is pending);
- Fetching production information from the EEPROM via I2C;
- FHCI USB;
- Two slow UCCs used as RS-485 UARTs.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
2008-01-10 20:52:58 -06:00
Jon Loeliger bb66f56136 Merge commit 'wd/master' 2008-01-10 14:28:18 -06:00
Anton Vorontsov 64d4bcb087 MPC8568E-MDS: set up QE pario for UART1
To use UART1 on the MPC8568E-MDS, QE pario pins PC[0:3] should
be set up appropriately.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
2008-01-09 16:25:03 -06:00
Anton Vorontsov ad162249cb MPC8568E-MDS: reset UCCs to use them reliably
In order to use GETH1 and GETH2 on the MPC8568E-MDS, we should reset
UCCs.

p.s Similar code exists in the Linux kernel board file (for capability
reasons with older U-Boots), but should be removed some day.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
2008-01-09 16:25:03 -06:00
Kumar Gala 2146cf5682 Reworked FSL Book-E TLB macros to be more readable
The old macros made it difficult to know what WIMGE and perm bits
were set for a TLB entry.  Actually use the bit masks for these items
since they are only a single bit.

Also moved the macros into mmu.h out of e500.h since they aren't specific
to e500.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-01-09 16:25:03 -06:00
Jon Loeliger 1df170f8b2 Convert MPC8610HPCD to use libfdt.
Assumes the presence of the aliases node in the DTS to
locate the pci and serial nodes for fixups.

Use consistent fdtaddr and fdtfile in environment variables.

Signed-off-by: Jon Loeliger <jdl@freescale.com>
2008-01-09 10:47:31 -06:00
Jon Loeliger c9974ab0a4 8610: Fix lingering compile warnings.
Turn off DEBUG.

Signed-off-by: Jon Loeliger <jdl@freescale.com>
2008-01-09 10:47:30 -06:00
Wolfgang Denk 435dc8fcdb Coding Style cleanup, update CHANGELOG
Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-01-09 11:36:21 +01:00
Kim Phillips 6775c68683 mpc83xx: fix missed pci_hose -> hose conversion for new libfdt code
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
2008-01-08 09:59:49 -06:00
Kim Phillips 94fab25f5f mpc83xx: rm remaining FLAT_TREE code
..in board pci.c files

Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
2008-01-08 09:56:42 -06:00
Kim Phillips b3458d2cd5 mpc83xx: remove FLAT_TREE code
need to rm it from pci code, too!

Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
2008-01-08 09:56:42 -06:00
Kim Phillips 5b8bc606c6 mpc83xx: convert to using do_fixup_*()
convert to using simpler mpc85xx style fdt update code; streamline by
eliminating macros OF_SOC, OF_CPU, etc. which allows us to rm
the old school FLAT_TREE code from 83xx (since the sbc8349 was just
converted over to using libfdt).

Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
2008-01-08 09:56:42 -06:00
Kim Phillips f602082b4b mpc83xx: supress compiler warning
mpc8360emds.c: In function ‘ft_board_setup’:
mpc8360emds.c:335: warning: assignment discards qualifiers from pointer target type
mpc8360emds.c:345: warning: assignment discards qualifiers from pointer target type

Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
2008-01-08 09:55:41 -06:00
Kim Phillips c16e44fa83 mpc83xx: fix remaining fdt_find_node_by_path references
rename to fdt_path_offset

Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
2008-01-08 09:55:40 -06:00
Kim Phillips 24f868433b mpc83xx: mpc8360 rev.2.1 erratum 2: replace rgmii-id with rgmii-rxid
u-boot itself uses GMII mode on the 8360.  Fix up UCC phy-connection-type
properties in the device tree so the PHY gets configured for internal delay on
RX only by the OS, as prescribed by mpc8360 rev. 2.1 pb mds erratum #2.

Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
2008-01-08 09:55:40 -06:00
Dave Liu 19580e660c mpc83xx: Add the support of MPC837xEMDS board
The MPC837xEMDS board support:
* DDR2 400MHz hardcoded and SPD init
* Local bus NOR Flash
* I2C, UART, MII and RTC
* eTSEC RGMII
* PCI host

Signed-off-by: Dave Liu <daveliu@freescale.com>
2008-01-08 09:55:39 -06:00
Anton Vorontsov 651d96f7e4 MPC8360E-MDS: configure and enable second UART
Despite user manual, BCSR9.7 is negated (high) on HRST, so
UART2 is disabled. Fix that and configure QE pins properly.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
2008-01-08 09:55:39 -06:00
Jon Loeliger 5c740711f0 8610: Move include of config.h earlier.
Include config.h earlier in the set of #includes
so as to avoid a incidental and duplicate definition
of CFG_CACHELINE_SIZE.

Signed-off-by: Jon Loeliger
2008-01-03 10:41:04 -06:00
Jon Loeliger ea9f7395ec Convert MPC8641HPCN to use libfdt.
Assumes the presence of the aliases node in the DTS to
locate the ethernet, pci and serial nodes for fixups.

Use consistent fdtaddr and fdtfile in environment variables.

Signed-off-by: Jon Loeliger <jdl@freescale.com>
2008-01-03 10:27:03 -06:00
Jon Loeliger 2c3536425d Merge commit 'wd/master' 2008-01-03 09:46:55 -06:00
Kumar Gala 415a613bab Move the MPC8541/MPC8555/MPC8548 CDS board under board/freescale.
Minor path corrections needed to ensure buildability.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-12-11 22:34:20 -06:00
Kumar Gala c2d943ffbf Move the MPC8540 ADS board under board/freescale.
Minor path corrections needed to ensure buildability.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-12-11 22:34:20 -06:00
Kumar Gala 870ceac5b3 Move the MPC8560 ADS board under board/freescale.
Minor path corrections needed to ensure buildability.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-12-11 22:34:20 -06:00
Kumar Gala acbca876fb Move the MPC8568 MDS board under board/freescale.
Minor path corrections needed to ensure buildability.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-12-11 22:34:20 -06:00
Kumar Gala a853d56c59 Use standard LAWAR_TRGT_IF_* defines for LAW setup on 85xx
We already had defines for LAWAR_TRGT_IF_* that we should use
rather than creating new ones.  Also, added some missing defines for
PCIE targets.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-12-11 22:34:20 -06:00
Kumar Gala 04db400892 Stop using immap_t on 85xx
In the future the offsets to various blocks may not be in same location.
Move to using CFG_MPC85xx_*_ADDR as the base of the registers
instead of getting it via &immap.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-12-11 22:34:20 -06:00
Kumar Gala f59b55a5b8 Stop using immap_t for guts offset on 85xx
In the future the offsets to various blocks may not be in same location.
Move to using CFG_MPC85xx_GUTS_ADDR as the base of the guts registers
instead of getting it via &immap->im_gur.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-12-11 22:34:19 -06:00
Kumar Gala addce57e2e Update MPC8544DS to use libfdt
Updated the MPC8544DS config to use libfdt and assume use of aliases for
ethernet, pci, and serial for the various fixups that are done.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-12-11 22:34:19 -06:00
Jon Loeliger f743931f9b Merge commit 'wd/master' 2007-12-06 11:27:32 -06:00
Kumar Gala 8d04f02f62 Update libfdt from device tree compiler (dtc)
Update libfdt to commit 8eaf5e358366017aa2e846c5038d1aa19958314e from
the device tree compiler (dtc) project.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-11-21 14:04:05 -06:00
Jon Loeliger 74f89faa9d Move 8610 DIU interface structure definitions to header file.
These two structures are still needed during the
initialization and setup of the DIU hardware.
So move them to the fsl_diu_fb.h file for now.
Official "blah".

Noticed-by: York Sun <yorksun@freescale.com>
Signed-off-by: Jon Loeliger <jdl@freescale.com>
2007-11-20 15:00:53 -06:00
Jon Loeliger 890e9413c0 Merge commit 'remotes/wd/master' 2007-11-20 14:34:57 -06:00
Wolfgang Denk 409ecdc0bb Fix compiler warnings for PPC systems. Update CHANGELOG.
Signed-off-by: Wolfgang Denk <wd@denx.de>
2007-11-18 16:36:27 +01:00
Wolfgang Denk a75e1a3dda Merge branch 'master' of git://www.denx.de/git/u-boot-coldfire 2007-11-17 02:28:26 +01:00
Jason Jin db74b3c1c9 Unify pixis_reset altbank across board families
Basically, refactor the CFG_PIXIS_VBOOT_MASK values
into the separate board config files.

Signed-off-by: Jason Jin <Jason.jin@freescale.com>
Signed-off-by: Jon Loeliger <jdl@freescale.com>
2007-11-17 00:57:51 +01:00
TsiChungLiew 225a24b5e0 ColdFire: MCF5445x - Update correct RAMBAR and missing linker files
Signed-off-by: TsiChungLiew <Tsi-Chung.Liew@freescale.com>
2007-11-07 18:00:54 -06:00
Jon Loeliger f1cd7aabbb Merge branch 'mpc8610' 2007-11-07 14:17:05 -06:00
York Sun 070ba56115 8610: Add console frame buffer support to FSL 8610 DIU driver.
Add cfb console support to FSL 8610 DIU driver.
Inspect board version from PIXIS to obtain correct pixel format.

Use #define CONFIG_VIDEO in config file to enable fb console.

To switch monitor, set monitor variable to
0 - DVI, 1 - Single link LVDS, 2 - Double link LVDS
followed by "diufb init".

Preserve logo bitmap at the top of the fb console.

Signed-off-by: York Sun <yorksun@freescale.com>
Signed-off-by: Jon Loeliger <jdl@freescale.com>
2007-11-07 14:09:09 -06:00
York Sun a877880c69 8610: Add 8610 DIU display driver
1280x1024 and 1024x768 @ 32 bpp are supported now.
DVI, Single-link LVDS, Double-link LVDS are all supported.

Environmental variable "monitor" is used to specify monitor port.

A new command "diufb" is introduced to reinitialize monitor
and display a BMP file in the memory. So far, 1-bit, 4-bit,
8-bit and 24-bit BMP formats are supported.

    diufb init
        - initialize the diu driver
    Enable the port specified in the environmental variable "monitor"

    diufb addr
        - display bmp file in memory.
    The bmp image should be no bigger than the resolution, 1280x1024
    for DVI and double-link LVDS, 1024x768 for single-link LVDS.

Note, this driver allocate memory but doesn't free it after use
It is written on purpose -- to avoid a failure of reallocation
due to memory fragement.

ECC of DDR is disabled for DIU performance. L2 data cache is also disabled.

Signed-off-by: York Sun <yorksun@freescale.com>
Signed-off-by: Jon loeliger <jdl@freescale.com>
2007-11-07 14:09:09 -06:00
York Sun 52e5ddfecd FSL: Add a freescale bitmap logo.
This Freescale logo is a 340 x 128 x 4bpp BMP file
that can be displayed by the DIU Framebuffer driver.

Signed-off-by: York Sun <yorksun@freescale.com>
Signed-off-by: Jon Loeliger <jdl@freescale.com>
2007-11-07 14:09:08 -06:00
Jason Jin 9f23ca334a Unify pixis_reset altbank across board families
Basically, refactor the CFG_PIXIS_VBOOT_MASK values
into the separate board config files.

Signed-off-by: Jason Jin <Jason.jin@freescale.com>
Signed-off-by: Jon Loeliger <jdl@freescale.com>
2007-11-07 14:08:45 -06:00
Jon Loeliger 3cac27c1d4 Merge commit 'remotes/wd/master' 2007-11-02 15:22:01 -05:00
TsiChungLiew e8ee8f3ade ColdFire 54455: Fix correct boot location for atmel and intel
Signed-off-by: TsiChungLiew <Tsi-Chung.Liew@freescale.com>
2007-10-25 17:16:22 -05:00
Tony Li d2646554f5 mpc83xx: pq-mds-pib.c typo error
Correct to val8 from val.

Signed-off-by: Tony Li <tony.li@freescale.com>
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
2007-10-18 10:05:34 -05:00
Jon Loeliger 3dd2db53ce Initial mpc8610hpcd board files.
Signed-off-by: Ed Swarthout <Ed.Swarthout@freescale.com>
Signed-off-by: Mahesh Jade <mahesh.jade@freescale.com>
Signed-off-by: Jason Jin <Jason.jin@freescale.com>
Signed-off-by: Jon Loeliger <jdl@freescale.com>
2007-10-17 15:01:33 -05:00
Liew Tsi Chung-r5aahp dcb8863029 ColdFire: fix build error becasue of bad type of mii_init()
Signed-off-by: TsiChungLiew <Tsi-Chung.Liew@freescale.com>
2007-09-15 21:04:27 +02:00
Liew Tsi Chung-r5aahp 314d5b6ce5 ColdFire: Fix build error caused by pixis.c
Moved the #include <asm/cache.h> inside the #ifdef CONFIG_FSL_PIXIS.

Signed-off-by: TsiChungLiew <Tsi-Chung.Liew@freescale.com>
2007-09-15 21:03:09 +02:00
Wolfgang Denk 1218abf1b5 Fix cases where DECLARE_GLOBAL_DATA_PTR was not declared as global
Signed-off-by: Wolfgang Denk <wd@denx.de>
2007-09-15 20:48:41 +02:00
Kumar Gala 56a9270521 Fix ULI RTC support on MPC8544 DS
The RTC on the M1575 ULI chipset requires a dummy read before
we are able to talk to the RTC.  We accomplish this by adding a
second memory region to the PHB the ULI is on and read from it.

The second region is added to maintain compatiabilty with Linux's
view of the PCI memory map.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-09-04 16:00:48 -05:00
Ed Swarthout f75e89e9b5 ft_board_setup update 85xx/86xx of pci/pcie bus-range property.
pcie is now differentiated from pci.  Add 8641 bus-range updates.

Signed-off-by: Ed Swarthout <Ed.Swarthout@freescale.com>
2007-09-04 16:00:41 -05:00
Kim Phillips 7608d75f9c support board vendor-common makefiles
if a board/$(VENDOR)/common/Makefile exists, build it.

also add the first such case, board/freescale/common/Makefile, to
handle building board-shared EEPROM, PIXIS, and MDS-PIB code, as
dictated by board configuration.

thusly get rid of alternate build dir errors such as:

FATAL: can't create /work/wd/tmp/u-boot-ppc/board/freescale/mpc8360emds/../common/pq-mds-pib.o: No such file or directory

by putting the common/ mkdir command in its proper place (the common
Makefile). Common bits from existing individual board Makefiles have
been removed.

Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
2007-08-29 02:15:46 +02:00
Wolfgang Denk 909627dca4 Merge with /home/wd/git/u-boot/custodian/u-boot-coldfire 2007-08-18 21:56:57 +02:00
Wolfgang Denk 8f22b671eb Merge with /home/wd/git/u-boot/custodian/u-boot-mpc85xx 2007-08-18 21:50:01 +02:00
Stefan Roese 8280f6a1c4 Coding style cleanup
Signed-off-by: Stefan Roese <sr@denx.de>
2007-08-18 14:33:02 +02:00
TsiChungLiew 4a442d3186 ColdFire: Add M5235EVB Platform for MCF523x
Signed-off-by: TsiChungLiew <Tsi-Chung.Liew@freescale.com>
2007-08-17 11:36:29 -06:00
Kim Phillips e58fe95784 mpc83xx: move freescale boards to boards/freescale
includes build fixes.

Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
2007-08-16 23:12:31 -05:00
Kim Phillips 5aa4ad8d8e mpc83xx: suppress unused variable 'val8' warning
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
2007-08-16 23:12:26 -05:00
Kim Phillips bbea46f76f mpc83xx: implement board_add_ram_info
add board_add_ram_info, to make memory diagnostic output more
consistent. u-boot banner output now looks like:

DRAM:  256 MB (DDR1, 64-bit, ECC on)

and for boards with SDRAM on the local bus, a line such as this is
added:

SDRAM: 64 MB (local bus)

also replaced some magic numbers with their equivalent define names.

Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
2007-08-16 23:12:24 -05:00
Tony Li 14778585d1 mpc83xx: Split PIB init code from pci.c and add Qoc3 ATM card support
The patch split the PIB init code from pci.c to a single file board/freescale/common/pq-mds-pib.c
And add Qoc3 ATM card support for MPC8360EMDS and MPC832XEMDS board.

Signed-off-by Tony Li <tony.li@freescale.com>
2007-08-16 23:12:11 -05:00
TsiChungLiew 8ae158cd87 ColdFire: Add M54455EVB for MCF5445x
Signed-off-by: TsiChungLiew <Tsi-Chung.Liew@freescale.com>
2007-08-16 17:43:23 -06:00
TsiChungLiew a1436a8426 ColdFire: Add M5253EVBE platform for MCF52x2
Signed-off-by: TsiChungLiew <Tsi-Chung.Liew@freescale.com>
2007-08-16 17:43:21 -06:00