Compare commits

...

144 Commits

Author SHA1 Message Date
3d35d87d54 Prepare 2009.08
Update CHANGELOG

Signed-off-by: Wolfgang Denk <wd@denx.de>
2009-08-31 19:57:42 +02:00
632a6dd0b6 Add common code dir for Matrix Vision boards.
This fixes current build failure.

Signed-off-by: Andre Schwarz <andre.schwarz@matrix-vision.de>

mvblm7.c: fix warning: implicit declaration of function
'mv_reset_environment'

Signed-off-by: Wolfgang Denk <wd@denx.de>
2009-08-31 19:55:24 +02:00
52f6c34c85 bugfix CONFIG_SYS_CONSOLE_INFO_QUIET
The "console: unify printing current devices" patch goofed:
CONFIG_SYS_CONSOLE_INFO_QUIET is supposed to *REMOVE* boot
time noise, not add it.  Said patch changed the #ifndefs
to #ifdef; this one restores them to the proper sense.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
2009-08-30 21:00:21 +02:00
28887d831b Use common code for Matrix Vision boards
Clean up existing boards (mvBC-P/MPC5200 and mvBL-M7/MPC8343) by
using common code.

Signed-off-by: Andr Schwarz <andre.schwarz@matrix-vision.de>
2009-08-28 00:31:23 +02:00
05f91a65ab mpc83xx: mpc8349itx - accommodate larger kernel sizes & unzero the bootdelay
apparently the ITX was missed last round.

Also make bootdelay consistent with other boards, so as to give on the
opportunity to fix mistakenly set bootcmd without having checked for an
bootdelay zero setting first.

Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
2009-08-26 21:28:55 -05:00
cc861f7127 mpc83xx: match dtb filename references to their dts equivalents in the linux kernel
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
2009-08-26 21:28:55 -05:00
85f9823cd7 Merge branch 'master' of git://git.denx.de/u-boot-ppc4xx 2009-08-25 22:54:01 +02:00
3d447d135c Merge branch 'master' of git://git.denx.de/u-boot-blackfin 2009-08-25 22:51:40 +02:00
68e74567cf ppc4xx: Fix ECC Correction bug with SMC ordering for NDFC driver
Fix ECC Correction bug where the byte offset location were double
flipped causing correction routine to toggle the wrong byte location
in the ECC segment. The ndfc_calculate_ecc routine change the order
of getting the ECC code.
        /* The NDFC uses Smart Media (SMC) bytes order */
        ecc_code[0] = p[2];
        ecc_code[1] = p[1];
        ecc_code[2] = p[3];
But in the Correction algorithm when calculating the byte offset
location, the s1 is used as the upper part of the address. Which
again reverse the order making the final byte offset address
location incorrect.
	byteoffs = (s1 << 0) & 0x80;
	.
	.
	byteoffs |= (s0 >> 4) & 0x08;
The order is change to read it in straight and let the correction
function to revert it to SMC order.

Signed-off-by: Feng Kan <fkan@amcc.com>
Acked-by: Victor Gallardo <vgallardo@amcc.com>
Acked-by: Prodyut Hazarika <phazarika@amcc.com>
Signed-off-by: Stefan Roese <sr@denx.de>
2009-08-25 17:41:42 +02:00
30fc5cd311 include/s3c24x0.h: fix S3C24X0_SPI_CHANNEL declaration
The SPI controller on the S3C24X0 has 8 bit registers, not 32 bit.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Wolfgang Denk <wd@denx.de>
2009-08-25 12:22:38 +02:00
e637385e69 Blackfin: fix typos in gpio comments
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-08-23 17:33:41 -04:00
c2fbcb6ae8 Blackfin: cm-bf527/cm-bf537: increase flash sectors
Newer revisions of these boards have slightly larger flashes, so increase
the configured number of sectors so that U-Boot works on all revisions.

Signed-off-by: Harald Krapfenbauer <Harald.Krapfenbauer@bluetechnix.at>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-08-23 17:33:40 -04:00
a794f59a75 sh/rsk7203: add missing include net.h
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2009-08-23 22:43:33 +02:00
6ac9f47977 start a linker script helper file
Start a common header file for common linker script code (such as
workarounds for older linkers) rather than doing this in the build system.

As fallout, we no longer execute the linker every time config.mk is
included by a build file (which can easily be 70+ times), but rather only
execute it once.

This also fixes a bug in the major version checking by creating a macro to
easily compare versions and keep people from making the same common
mistake (forgetting to check major and minor together).

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-08-23 22:33:33 +02:00
2ed0869d30 Blackfin: use common code to preprocess linker script
Now that the common code preprocesses the linker script, the Blackfin code
no longer needs to do it.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-08-23 22:25:05 +02:00
4d3758c835 .gitignore: ignore generated u-boot.lds
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-08-23 22:23:48 +02:00
79b91de958 include/mmc.h: Fix typo in IS_SD() macro
Signed-off-by: Albin Tonnerre <albin.tonnerre@free-electrons.com>
2009-08-23 22:11:30 +02:00
963f2f6117 Prepare 2009.08-rc3
Update CHANGELOG, minor Coding Style cleanup.

Signed-off-by: Wolfgang Denk <wd@denx.de>
2009-08-22 23:27:26 +02:00
d52785d7f5 Merge branch 'master' of /home/wd/git/u-boot/custodians 2009-08-22 00:24:54 +02:00
5b2da6a309 qemu-mips: Fix Qemu website
Signed-off-by: Michal Simek <monstr@monstr.eu>
Signed-off-by: Michal Simek <michal.simek@petalogix.com>
Acked-by: Shinya Kuribayashi <skuribay@pobox.com>
2009-08-22 00:20:20 +02:00
79f516bccc mpc83xx: accommodate larger kernel sizes by default
linux mpc83xx_defconfig kernels are getting bigger, accommodate for
their growth by adjusting default load and fdt addresses.

Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
2009-08-21 17:11:44 -05:00
8eceeb7fd6 mpc83xx: mpc8377erdb - change DDR settings to those from latest bsp
when using Linus' 83xx_defconfig, the mpc8377rdb would hang at boot
at either:

NET: Registered protocol family 16

or the

io scheduler cfq registered

message.  Fixing up these DDR settings appears to fix the problem.

Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
2009-08-21 17:11:44 -05:00
27c5248dd4 mpc83xx: tqm8349 - remove pci & flash window conflict
commit 9993e196da "mpc83xx: convert all
remaining boards over to 83XX_GENERIC_PCI" remapped pci windows on
tqm834x to make it more consistent with the other 83xx boards.  During
that time however, the author failed to realize that FLASH_BASE was
occupying the same range as what PCI1_MEM_BASE was being assigned.

Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
Tested-by: Wolfgang Denk <wd@denx.de>
2009-08-21 17:11:44 -05:00
6d2c26ac83 mpc83xx: add missing CSCONFIG_ODT_WR_CFG for 832x CPUs
Signed-off-by: Heiko Schocher <hs@denx.de>
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
2009-08-21 17:10:35 -05:00
193b4cb3f6 mpc83xx: mpc8349 - delete unused SYS_MID_FLASH_JUMP
This was introduced with the MPC8349EMDS board, and then copied to
a couple other boards by nature of being the reference implementation.

  u-boot$git grep CONFIG_SYS_MID_FLASH_JUMP
  include/configs/MPC8349EMDS.h:#define CONFIG_SYS_MID_FLASH_JUMP 0x7F000000
  include/configs/sbc8349.h:#define CONFIG_SYS_MID_FLASH_JUMP     0x7F000000
  include/configs/vme8349.h:#define CONFIG_SYS_MID_FLASH_JUMP     0x7F000000
  u-boot$

It currently isn't used, so delete it before it spreads further.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
2009-08-21 17:10:04 -05:00
c0d660fbbe mpc83xx: sbc8349 - make enabling PCI more user friendly
Prior to this commit, to enable PCI, you had to go manually
edit the board config header, which isn't really user friendly.
This adds the typical PCI make targets to the toplevel Makefile
in accordance with what is being done with other boards.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
2009-08-21 17:09:21 -05:00
a3c5057a6c eeprom_m95xxx: remove unused variable i
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2009-08-21 23:36:19 +02:00
8cf19b9fec jffs2: some fixes to summary support
This patch fixes some issues with JFFS2 summary support in U-Boot.
1/ Summary support made compilation configurable (as summary support
considered expiremental even in Linux).
2/ Summary code can do unaligned 16-bit and 32-bit memory accesses.
We need to get data byte by byte to exclude data aborts.
3/ Make summary scan in two passes so we can safely fall back to full
scan if we found unsupported entry in the summary.

Signed-off-by: Ilya Yanok <yanok@emcraft.com>
2009-08-21 23:29:35 +02:00
11906936e1 arm: rd6281a: Fixed NAND specific warning
It is recommended to define the macro CONFIG_SYS_64BIT_VSPRINTF
for NAND specific warning removal, same is done in this patch

Signed-off-by: Prafulla Wadaskar <prafulla@marvell.com>
2009-08-21 23:26:09 +02:00
b5ffb19333 TRAB: make independent of specific libgcc helper routines
The TRAB board references local libgcc helper routines
(lib_arm/div0.o and lib_arm/_umodsi3.o) which cause build problems
when we try to use the normal, compiler provided libgcc instead.
Removing these references allows to build both with and without the
local libgcc helper routines.

Signed-off-by: Wolfgang Denk <wd@denx.de>
2009-08-21 23:25:22 +02:00
1aada9cd64 Fix all linker scripts for older binutils versions (pre-2.16)
Commit f62fb99941 fixed handling of all rodata sections by using a
wildcard combined with calls to ld's builtin functions SORT_BY_ALIGNMENT()
and SORT_BY_NAME().  Unfortunately these functions were only
introduced with biunutils version 2.16, so the modification broke
building with all tool chains using older binutils.

This patch makes it work again.  This is done by omitting the use of
these functions for such old tool chains.  This will result in
slightly larger target binaries, as the rodata sections are no longer
in optimal order alignment-wise which reauls in unused gaps, but the
effect was found to be insignificant - especially compared to the fact
that you cannot build U-Boot at all in the current state.

As ld seems to have no support for conditionals we run the linker
script through the C preprocessor which can be easily used to remove
the unwanted function calls.

Note that the C preprocessor must be run with the "-ansi" (or a
"-std=") option to make sure all the system-specific predefined
macros outside the reserved namespace are suppressed. Otherise, cpp
might for example substitute "powerpc" to "1", thus corrupting for
example "OUTPUT_ARCH(powerpc)" etc.

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Mike Frysinger <vapier@gentoo.org>
2009-08-21 23:13:34 +02:00
f772acf8a5 ARM: compiler options cleanup - improve tool chain support
For some time there have been repeated reports about build problems
with some ARM (cross) tool chains.  Especially issues about
(in)compatibility with the tool chain provided runtime support
library libgcc.a caused to add and support a private implementation
of such runtime support code in U-Boot.  A closer look at the code
indicated that some of these issues are actually home-made.  This
patch attempts to clean up some of the most obvious problems and make
building of U-Boot with different tool chains easier:

- Even though all ARM systems basicy used the same compiler options
  to select a specific ABI from the tool chain, the code for this was
  distributed over all cpu/*/config.mk files.  We move this one level
  up into lib_arm/config.mk instead.

- So far, we only checked if "-mapcs-32" was supported by the tool
  chain; if yes, this was used, if not, "-mabi=apcs-gnu" was
  selected, no matter if the tool chain actually understood this
  option.  There was no support for EABI conformant tool chains.
  This patch implements the following logic:

  1) If the tool chain supports
	"-mabi=aapcs-linux -mno-thumb-interwork"
     we use these options (EABI conformant tool chain).
  2) Otherwise, we check first if
	"-mapcs-32"
     is supported, and then check for
	"-mabi=apcs-gnu"
     If one test succeeds, we use the first found option.
  3) In case 2), we also test if "-mno-thumb-interwork", and use
     this if the test succeeds. [For "-mabi=aapcs-linux" we set
     "-mno-thumb-interwork" mandatorily.]

  This way we use a similar logic for the compile options as the
  Linux kernel does.

- Some EABI conformant tool chains cause external references to
  utility functions like raise(); such functions are provided in the
  new file lib_arm/eabi_compat.c

  Note that lib_arm/config.mk gets parsed several times, so we must
  make sure to add eabi_compat.o only once to the linker list.

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Cc: Dirk Behme <dirk.behme@googlemail.com>
Cc: Magnus Lilja <lilja.magnus@gmail.com>
Cc: Tom Rix <Tom.Rix@windriver.com>
Cc: Prafulla Wadaskar <prafulla@marvell.com>
Acked-by: Sergey Kubushyn <ksi@koi8.net>
Tested-by: Magnus Lilja <lilja.magnus@gmail.com>
Tested-by: Andrzej Wolski <awolski@poczta.fm>
Tested-by: Gaye Abdoulaye Walsimou <walsimou@walsimou.com>
Tested-by: Tom Rix <Tom.Rix@windriver.com>
Tested-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2009-08-21 23:11:53 +02:00
b9cce2c773 Merge branch 'master' of /home/wd/git/u-boot/custodians 2009-08-21 23:04:03 +02:00
db81c0d276 Merge branch 'master' of git://git.denx.de/u-boot-net 2009-08-21 23:03:58 +02:00
f81c3d7232 Merge branch 'master' of /home/wd/git/u-boot/custodians 2009-08-21 22:56:01 +02:00
269610f6ba NAND boot: fix nand_load overlap issue
The code copy data from NAND flash block by block, so when
the data length isn't a whole-number multiple of the block
size, it will overlap the rest space.

Signed-off-by: Mingkai Hu <Mingkai.hu@freescale.com>
Signed-off-by: Scott Wood <scottwood@freescale.com>
2009-08-21 22:55:47 +02:00
1fc1d9aed0 add WATCHDOG_RESET() on nand write and read
Signed-off-by: giulio.benetti@micronovasrl.com
Acked-by: Wolfgang Denk <wd@denx.de>
Signed-off-by: Scott Wood <scottwood@freescale.com>
2009-08-21 22:55:21 +02:00
b1e849f220 tsec: Wait for auto-negotiation to complete without link
Previously, waiting for auto-negotiation would only occur if a valid
link had been detected.  Problems arose when attempting to use a
tsec immediately after bootup but before link was achieved, eg:
=> dhcp
Auto-neg error, defaulting to 10BT/HD
eTSEC1: No link.
Auto-neg error, defaulting to 10BT/HD
eTSEC2: No link.
=>

With this patch applied the same operation as above resulted in:
=> dhcp
Waiting for PHY auto negotiation to complete. done
Enet starting in 1000BT/FD
Speed: 1000, full duplex

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2009-08-21 10:35:30 -07:00
477fa6378f arm: kirkwood: See to it that sent data is 8-byte aligned
U-boot might use non-8-byte-aligned addresses for sending data, which
the kwgbe_send doesn't accept (bootp does this for me). This patch
copies the data to be sent to a malloced temporary buffer if it is
non-aligned.

Signed-off-by: Simon Kagstrom <simon.kagstrom@netinsight.net>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2009-08-21 09:57:33 -07:00
cad713bf75 Wait for the link to come up on kirkwood network init
This patch makes the device wait for up to 5 seconds for the link to
come up, similar to what many of the other network drivers do. This
avoids confusing situations where, e.g., a tftp fails when initiated
early after U-boot has started (before the link has come up).

Signed-off-by: Simon Kagstrom <simon.kagstrom@netinsight.net>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2009-08-21 09:57:33 -07:00
bb1ca3b27f arm:kirkwood Define kirkwood phy address magic number
Signed-off-by: Simon Kagstrom <simon.kagstrom@netinsight.net>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2009-08-21 09:57:33 -07:00
f81ecb5d33 e1000: fix PCI memory addressing
The Intel E1000 driver was making assumptions about the relationship between
some virtual, physical, and PCI addresses.

Also fix some bad usage of the DEBUGOUT macro

Signed-off-by: Timur Tabi <timur@freescale.com>
Acked-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2009-08-21 09:57:33 -07:00
b644006e1a jffs2: clean the cache in case of malloc fails in build_lists
We should call jffs2_clean_cache() if we return from jffs2_build_lists()
with an error to prevent usage of incomplete lists. Also we should
free() a local buffer to prevent memory leaks.

Signed-off-by: Ilya Yanok <yanok@emcraft.com>
2009-08-18 21:30:58 +02:00
7ff66bb0be ppc: trigger WDT before starting Linux
Signed-off-by: Heiko Schocher <hs@denx.de>
2009-08-18 21:30:34 +02:00
2bcbd429f4 Merge branch 'master' of git://git.denx.de/u-boot-mpc85xx 2009-08-18 13:57:04 +02:00
9af019f579 Merge branch 'master' of git://git.denx.de/u-boot-ppc4xx 2009-08-18 13:53:54 +02:00
918319c705 Update the mtd driver name in bootargs for at91-based boards
The name of the atmel nand driver in the kernel changed from at91_nand
to atmel_nand back in June 2008, but the at91-based boards config files
still refer to at91_nand. This patch updates them with the new name

Signed-off-by: Albin Tonnerre <albin.tonnerre@free-electrons.com>
2009-08-18 13:51:51 +02:00
8fa656aa52 omap3: Fixed a problem with hwecc
In commit 187af954cf there
was a typo that offset all the ecc registers by 4 bytes, fixed that.

Signed-off-by: Ben Goska <goskab@onid.oregonstate.edu>
Acked-by: Dirk Behme <dirk.behme@googlemail.com>
2009-08-18 13:51:30 +02:00
514bab6609 ppc4xx: Fix "chip_config" command for AMCC Arches
This patch fixes the "chip_config" command for I2C bootstrap EEPROM
configuration. First it changes the I2C bootstrap EEPROM address to
0x54 as this is used on Arches (instead of 0x52 on Canyonlands/
Glacier). Additionally, the NAND bootstrap settings are removed
for Arches since Arches doesn't support NAND-booting.

Signed-off-by: Stefan Roese <sr@denx.de>
2009-08-18 09:16:33 +02:00
4af34177b6 Monahans: avoid floating point calculations
Current code for the Monahans CPU defined OSCR_CLK_FREQ as 3.250 (MHz)
which caused floating point operations to be used. This resulted in
unresolved references to some FP related libgcc functions when using
U-Boot's private libgcc functions.

Change the code to use fixed point math only.

Signed-off-by: Wolfgang Denk <wd@denx.de>
2009-08-17 23:53:41 +02:00
e393e2e9bc 85xx: Fix addrmap to include memory
When we init the addrmap based on the TLB we will not end up getting
the TLB that covers memory if we are using SPD.  The reason is we
haven't relocated at the point that we setup the memory TLB and thus it
will not get setup in the addrmap.

Instead we can just walk over the TLB array after we've relocated and
see all the TLBs that have been set and use that information to populate
the initial addrmap.  By doing this we insure that we get the TLB
entries that cover memory.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2009-08-14 17:42:05 -05:00
7dedefdf74 flash: Fix CFI buffer size bug
Fix bug introduced by 9c048b5234.

The cfi_flash.c driver cast the flash buffer size to a uchar in
flash_write_cfibuffer(). On some flash parts, (tested on Numonyx
part PC32F512M29EWH), the buffer size is 1KB. Remove the cast to
uchar to enable buffer sizes to be larger.

Signed-off-by: John Schmoller <jschmoller@xes-inc.com>
Signed-off-by: Stefan Roese <sr@denx.de>
2009-08-13 09:28:20 +02:00
f6e3a1fa92 trab: rename spi_init()
The local board-specific spi_init() function conflicts with the common SPI
layer, so rename it to something board-specific.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-08-13 09:20:41 +02:00
253cb831f5 zlib: add watchdog reset call
This patch adds watchdog reset call to allow its invokation during decompression
phase. This control was present on old zlib version and here it is
backported for those relevant routines. This patch is sent as a zlib separate
one beacuse it was not tested due to specific board lack.
zlib patches will be unified just in one when this will be validated through
tests.

Signed-off-by: Giuseppe Condorelli <giuseppe.condorelli@st.com>
2009-08-11 22:15:18 +02:00
dce3d79710 zlib: updated to v.1.2.3
This patch updates zlib to the latest stable version.
Only relevant zlib parts were ported to u-boot tree, as already did for the
current zlib (0.95). New zlib guarantees a faster inflate performances
other then others improvements as explained at www.zlib.net.
It also includes Alessandro Rubini's patches to allow 0 as destination pointer
and to call watchdog reset if required by architecture.

Signed-off-by: Giuseppe Condorelli <giuseppe.condorelli@st.com>
Reviewed-by: Angelo Castello <angelo.castello@st.com>
Reviewed-by: Alessandro Rubini <rubini-list@gnudd.com>
2009-08-11 22:14:29 +02:00
3426d65daa dtt, lm81: move unneccessary printf into a debug printf
Signed-off-by: Heiko Schocher <hs@denx.de>
2009-08-11 21:59:08 +02:00
9e4623a0ad Merge branch 'master' of git://git.denx.de/u-boot-mpc83xx 2009-08-11 21:49:15 +02:00
f1da206041 Merge branch 'master' of git://git.denx.de/u-boot-video 2009-08-11 21:47:42 +02:00
f45c07dbd1 Merge branch 'master' of git://git.denx.de/u-boot-net 2009-08-11 21:44:55 +02:00
54e399f110 MIMC200: reduce LCD pixclock
The initial pixclock for the MIMC200 board is wrong (and causes
screen corruption due to DMA underruns).

This patch simply reduces the pixel clock to fix the problem.

Signed-off-by: Mark Jackson <mpfj@mimc.co.uk>
2009-08-11 13:58:26 +02:00
1443cd7e54 UEC FIXED PHY: Determine fixed-phy port using UEC interface name.
Fixed a misunderstanding in the original implementation, 'devnum' that
was used in the cpu/ppc4xx/4xx_enet.c implementation was NOT the
PHY's SMI address, rather it was the number of the MAC interface on
the CPU. The equivalent of this for uec_phy will be the UEC number
stored in mii_info->dev->name. Usage example is updated for uec.

Signed-off-by: Richard Retanubun <RichardRetanubun@RuggedCom.com>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2009-08-10 16:07:54 -07:00
1a9519373b Assigned a static SMI address to all UECs TBIPA address.
It is set to 0x1F by default and can be overwritten on the board
header file by defining CONFIG_UTBIPAR_INIT_TBIPA. This allows
the CPU to simply "reserve" one SMI address instead of using
a different one for each UEC.

Signed-off-by: Richard Retanubun <RichardRetanubun@RuggedCom.com>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2009-08-10 15:55:42 -07:00
9fd38a01cb net: kirkwood: updates: used eth_setenv_enetaddr api
eth_setenv_enetaddr is avaible by upper layer
using this saves 204 bytes on total image size

used Local OUI instead of Marvell OUI for
random MAC address generation logic

Signed-off-by: Prafulla Wadaskar <prafulla@marvell.com>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2009-08-10 14:58:13 -07:00
ecbd2078a1 Fix E1000 build warning on AP1000 board
Fix E1000 build warning on AP1000 board
 Fix the build warning on AP1000 board:
 e1000.c:131: warning: 'e1000_read_eeprom' used but never defined
 e1000.c:2012: warning: 'e1000_set_phy_mode' defined but not used

Signed-off-by: Roy Zang <tie-fei.zang@freescale.com>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2009-08-10 14:53:54 -07:00
b3af1d698b ARM: Davinci DM355: Enabling DM9000 on DM355 EVM
Due to recent changes to the NET support on U-boot, DM9000
is no longer detected on the DM355 EVM.
This minor update enables DM9000 on the DM355 EVM.
Tested on the DM355 EVM

Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2009-08-10 14:53:53 -07:00
08c2df33f1 net: phy: bugfixes: mv88E61xx compiler warnings fixed
1. mv88E61xx driver compiler warnings fixed
2. idstr if-else statements changed to switch() construct
   and added default case too.
   This fixed idstr may be uninitialized warning

Signed-off-by: Prafulla Wadaskar <prafulla@marvell.com>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2009-08-10 14:53:52 -07:00
750326e5d5 arm: A320: driver for FTMAC100 ethernet controller
This patch adds an FTMAC100 ethernet driver for Faraday A320 evaluation board.

Signed-off-by: Po-Yu Chuang <ratbert@faraday-tech.com>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2009-08-10 14:53:52 -07:00
f90dc43fd6 85xx: Removed BEDBUG support from FSL 85xx boards
For some reason the MPC8544 enabled BEDBUG if PCI was enabled and that
got copied int the MPC8536, MPC8572 and P2020 DS boards.  The BEDBUG
support has never been made to work completely on e500/85xx so we
just disable it to save space and match the other FSL 85xx boards.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2009-08-10 16:40:55 -05:00
eb1a4d0a47 Prepare 2009.08-rc2
Update CHANGELOG

Signed-off-by: Wolfgang Denk <wd@denx.de>
2009-08-10 10:39:12 +02:00
53cc18c71b Minor coding style cleanup.
Signed-off-by: Wolfgang Denk <wd@denx.de>
2009-08-10 10:38:34 +02:00
d371708a1b net/tftp.c: fix warning: pointer targets differ in signedness
tftp.c:294: warning: pointer targets in passing argument 1 of 'strlen'
differ in signedness

This was only visible for the utx8245 board which seems to have DEBUG
enabled.

Signed-off-by: Wolfgang Denk <wd@denx.de>
2009-08-10 09:59:10 +02:00
3ed9e943fd ARM Cortex A8: Remove bogus config.mk entries
Remove bogus config.mk entry, fix newline and remove redundant
omap3/config.mk

Signed-off-by: Dirk Behme <dirk.behme@googlemail.com>
2009-08-10 00:13:22 +02:00
cd3dcba142 OMAP3: Fix missing GPMC_CONFIG_CS0_BASE
Applying two indepenent OMAP3 patches resulted in missing
GPMC_CONFIG_CS0_BASE. Patch "omap3: embedd gpmc_cs into gpmc
config struct" removes GPMC_CONFIG_CS0_BASE, independent patch
"omap3: bug fix for NOR boot support" introduces it's usage.
Re-introduce GPMC_CONFIG_CS0_BASE.

Signed-off-by: Dirk Behme <dirk.behme@googlemail.com>
2009-08-10 00:12:43 +02:00
ba3dbaf281 mxc-mmc: sdhc host driver for MX2 and MX3 proccessor
This is a port of Linux driver for SDHC host controller hardware
found on Freescale's MX2 and MX3 processors. Uses new generic MMC
framework (CONFIG_GENERIC_MMC) and it looks like there are some
problems with a framework (at least on LE cpus). Some of these
problems are addressed in the following patches.

Signed-off-by: Ilya Yanok <yanok@emcraft.com>
2009-08-09 23:47:38 +02:00
642d7b63c3 kirkwood/gpio.h: remove duplicate definition
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
2009-08-09 23:46:45 +02:00
3ac374c0f0 Add driver for the ST M95xxx SPI EEPROM
This chip is used in a number of boards manufactured by Calao-Systems
which should be supported soon. This driver provides the necessary
spi_read and spi_write functions necessary to communicate with the chip.

Signed-off-by: Albin Tonnerre <albin.tonnerre@free-electrons.com>
2009-08-09 23:45:14 +02:00
30951960ba arm: Sheevaplug: Fixed NAND specific warning
It is recommended to define the macro CONFIG_SYS_64BIT_VSPRINTF
for NAND specific warning removal, same is done in this patch

Signed-off-by: Prafulla Wadaskar <prafulla@marvell.com>
2009-08-09 23:44:52 +02:00
317734966e Dual-license IBM code contributions
It was brought to our attention that U-Boot contains code derived from the
IBM OpenBIOS source code originally provided with some of the older PowerPC
4xx development boards.  As a result, the original license of this code has
been carried in the various files for a number of years in the U-Boot project.

IBM is dual-licensing the IBM code contributions already present in U-Boot
under either the terms of the GNU General Public License version 2, or the
original code license already present.

Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
2009-08-09 23:15:33 +02:00
cfd700be9f fdt: Fix fdt_pci_dma_ranges handling of 64-bit ranges
If the size of a region equal to 4G it can't be represnted in a 32-bit
BAR so we should have marked that case as MEM64.

Additionally bump the number of inbound windows up to 4 to handle the
fact that Freescale PPCs that have an implicit window for CCSRBAR.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2009-08-09 23:13:56 +02:00
59b4d7471c ARM EABI: add new helper functions resp. function names
The ARM EABI defines new names for GCC helper functions,
and GCC seems to need some new functions as well.

This patch is a minimal-invasive approach to fix problems with EABI
conformant tool chains (to be used with "USE_PRIVATE_LIBGCC=yes").

Signed-off-by: Wolfgang Denk <wd@denx.de>
Tested-by: Dirk Behme <dirk.behme@googlemail.com>
2009-08-09 23:08:59 +02:00
197324d7d9 hush: Fix bogus free() call
An off-by-one error in hush.c resulted in an unintentional free() call
every time a command was executed

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
2009-08-09 23:02:42 +02:00
ff27650bb2 digsy_mtc: Update default environment
Signed-off-by: Detlev Zundel <dzu@denx.de>
2009-08-09 23:01:41 +02:00
0b40bd439a digsy_mtc: Add delay in SPI transfers to the companion controller.
While at it, remove initialization of variables which will be set
before usage in all cases.

Signed-off-by: Detlev Zundel <dzu@denx.de>
2009-08-09 23:01:07 +02:00
0bf00750e0 digsy_mtc: minor fixes for mtc command help
Add mtc state subcommand description to the
help of mtc command.

Remove some newlines in description of commands
for proper help formating.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
2009-08-09 23:00:08 +02:00
5cc6908418 digsy_mtc: Add mtc state command.
Signed-off-by: Grzegorz Bernacki <gjb@semihalf.com>
2009-08-09 22:59:27 +02:00
716655288a Partition support: remove newline from partition name
Remove bogus newline character that got added to the .name field of
the disk_partition_t structure.

Signed-off-by: Wolfgang Denk <wd@denx.de>
2009-08-09 22:52:38 +02:00
3f1649fb0d Fix LZMA string.h header inclusion issue and remove unused variables.
Signed-off-by: Luigi 'Comio' Mantellini <luigi.mantellini@idf-hit.com>
2009-08-09 22:51:53 +02:00
1c6232f1e2 bus_vcxk.c: fix warning: unused variable 'lineptr'
Signed-off-by: Jens Scharsig <esw@bus-elektronik.de>
2009-08-09 22:49:16 +02:00
18304f7675 env: kill off default_environment_size
The only environment type that uses this variable is spi flash, and that is
only because it is reimplementing the common set_default_env() function.
So fix the spi flash code and kill off the default_environment_size in the
process.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-08-09 22:41:42 +02:00
bedd8403f7 export SPI functions to standalone apps
While we're here, fix the broken #ifdef handling in _exports.h.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-08-09 22:34:51 +02:00
81813cb01f Merge branch 'master' of git://git.denx.de/u-boot-net 2009-08-08 12:08:09 +02:00
3b9043a7c0 omap3: bug fix for NOR boot support
This patch provides bug fix, when omap3 uses nor boot.

Signed-off-by: Penda Naveen Kumar<pnaveen@ti.com>
Acked-by: Dirk Behme <dirk.behme@googlemail.com>
2009-08-08 11:59:40 +02:00
61c68ae0b4 Fix examples for OMAP3 boards...
The attached patch corrects an error in the examples/Makefile which
causes the applications in the examples directory to hang on OMAP3
based boards. The current Makefile sets -Ttext during linking to
0x0c100000 which is outside of addressable SDRAM memory. The script
corrects the existing ifeq...else...endif logic to look at the VENDOR
tag rather than the CPU tag.

The patch affects the following configs: omap3_beagle_config,
omap3_overo_config, omap3_evm_config, omap3_pandora_config,
omap3_zoom1_config and omap3_zoom2_config.

Signed-off-by: Michael Evans <horse_dung@hotmail.com>

Edited commit message.
Signed-off-by: Wolfgang Denk <wd@denx.de>
2009-08-08 11:57:22 +02:00
a3d1421dfd omap3: use only fixed-size types inside ctrl_structs
replace variable types in ctrl_structs for omap3 by those with
fixed size (u8, u16, u32).
Additional ifndef-protection is needed by examples which do not
compile when including asm/types.h

Signed-off-by: Matthias Ludwig <mludwig@ultratronik.de>
Signed-off-by: Dirk Behme <dirk.behme@googlemail.com>
2009-08-08 11:36:29 +02:00
894113529e omap3: replace all instances of gpmc config struct by one global
Signed-off-by: Matthias Ludwig <mludwig@ultratronik.de>
Signed-off-by: Dirk Behme <dirk.behme@googlemail.com>
2009-08-08 11:34:11 +02:00
97a099eaa4 omap3: remove typedefs for configuration structs
Signed-off-by: Matthias Ludwig <mludwig@ultratronik.de>
Signed-off-by: Dirk Behme <dirk.behme@googlemail.com>
2009-08-08 11:33:23 +02:00
aa0707897c Add Intel E1000 PCIE card support
Based on Intel PRO/1000 Network Driver 7.3.20-k2
  Add Intel E1000 PCIE card support. The following cards are added:
  INTEL_82571EB_COPPER
  INTEL_82571EB_FIBER,
  INTEL_82571EB_SERDES
  INTEL_82571EB_QUAD_COPPER
  INTEL_82571PT_QUAD_COPPER
  INTEL_82571EB_QUAD_FIBER
  INTEL_82571EB_QUAD_COPPER_LOWPROFILE
  INTEL_82571EB_SERDES_DUAL
  INTEL_82571EB_SERDES_QUAD
  INTEL_82572EI_COPPER
  INTEL_82572EI_FIBER
  INTEL_82572EI_SERDES
  INTEL_82572EI
  INTEL_82573E
  INTEL_82573E_IAMT
  INTEL_82573L
  INTEL_82546GB_QUAD_COPPER_KSP3
  INTEL_80003ES2LAN_COPPER_DPT
  INTEL_80003ES2LAN_SERDES_DPT
  INTEL_80003ES2LAN_COPPER_SPT
  INTEL_80003ES2LAN_SERDES_SPT

 82571EB_COPPER dual ports,
 82572EI single port,
 82572EI_COPPER single port PCIE cards
 and
 82545EM_COPPER,
 82541GI_LF
 pci cards are tested on both  P2020 board
 and MPC8544DS board.

 Signed-off-by: Roy Zang <tie-fei.zang@freescale.com>

Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2009-08-08 02:26:05 -07:00
86848a74c3 net: sync env ethaddr to device enetaddr in eth_init()
In the previous enetaddr refactoring, the assumption with commit 56b555a644
was that the eth layer would handle the env -> device enetaddr syncing.
This was not the case as eth_initialize() is called only once and the sync
occurs there.  So make sure the eth_init() function does the env -> device
sync with every network init.

Reported-by: Andrzej Wolski <awolski@poczta.fm>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2009-08-07 17:39:23 -07:00
0ebf04c607 minor debug cleanups in ./net
Minor ./net cleanups - no functional changes
  - change #ifdef DEBUG printf(); #endif to just debug()
  - changed __FUNCTION__ to __func__
  - got rid of extra whitespace between function and opening brace
  - removed unnecessary braces on if statements

 gcc dead code elimination should make this functionally/size equivalent
 when DEBUG is not defined. (confirmed on Blackfin, with gcc 4.3.3).

 Signed-off-by: Robin Getz <rgetz@blackfin.uclinux.org>

Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2009-08-07 17:32:16 -07:00
187af954cf omap3: embedd gpmc_cs into gpmc config struct
Embedd chip select configuration into struct for gpmc config
instead of having it completely separated as suggested by
Wolfgang Denk on
http://lists.denx.de/pipermail/u-boot/2009-May/052247.html

Signed-off-by: Matthias Ludwig <mludwig@ultratronik.de>
2009-08-07 23:31:51 +02:00
cb32ed1fc2 Merge branch 'next' of git://git.denx.de/u-boot-coldfire 2009-08-04 21:54:11 +02:00
06bffc6ea5 rm9200 lowevel_init: don't touch reserved/readonly registers
For some reason the AT91rm9200 lowlevel init writes to a bunch of
reserved or read-only addresses.  All the boards seem to define the
value-to-be-written values as zero ... but they shouldn't actually
be writing *anything* there.

No documented erratum justifies these accesses.  It looks like maybe
some pre-release BDI-2000 setup code has been carried along by cargo
cult programming since at least late 2004 (per GIT history).

Here's a patch disabling what seems to be bogosity.  Tested on a
csb337; there were no behavioral changes.

Signed-off-by: David Brownell <david-b@pacbell.net>

on RM9200ek
Tested-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2009-08-03 09:26:26 +02:00
301b7db88f pxa: Fix typo in GCDR(x)
Fix a typo in the GCDR(x) macro. It's a good thing no one was using it.

Signed-off-by: David Hunter <hunterd42@gmail.com>
2009-08-01 16:06:26 +02:00
3c448e6482 Add AT91SAM9260 to at91's lowlevel_init.S
Needed for AT91SAM9260 NOR Boot on Eukrea's CPU9260.

Signed-off-by: Eric Benard <eric@eukrea.com>
2009-08-01 11:45:05 +02:00
56bdfa9612 ppc4xx: Remove check for PPC460EX from CompactCenter
Signed-off-by: Dirk Eibach <eibach@gdsys.de>
Signed-off-by: Stefan Roese <sr@denx.de>
2009-07-30 14:15:25 +02:00
c3fa4f0c86 ppc4xx: Add support for PPC460EX/460GT rev B chip to AMCC Canyonlands
This patch is based on a diff created by Phong Vo from AMCC.

Signed-off-by: Phong Vo <pvo@amcc.com>
Signed-off-by: Stefan Roese <sr@denx.de>
2009-07-30 07:22:18 +02:00
89bcc48750 ppc4xx: Add basic support for AMCC PPC460EX/460GT rev B chips
This patch is based on a diff created by Phong Vo from AMCC.

Signed-off-by: Phong Vo <pvo@amcc.com>
Signed-off-by: Stefan Roese <sr@denx.de>
2009-07-30 07:22:18 +02:00
82a7edc7ea ppc4xx: Canyonlands-NAND-boot: Support 2 Crucial 512MByte SODIMM's
Some Canyonlands boards are equipped with different SODIMM's. This is no
problem with the "normal" NOR booting Canyonlands U-Boot, since it
automatically detects the SODIMM's via SPD data and correctly configures
them. But the NAND booting version is different. Here we only have 4k
of image size to completely setup the hardware, including DDR2 setup.
So we need to use a fixed DDR2 setup here. This doesn't work for different
SODIMM's right now.

Currently only this Crucial SODIMM is support:
CT6464AC667.8FB (dual ranked)

Now some boards are shipped with this SODIMM:
CT6464AC667.4FE (single ranked)

This patch now supports both SODIMM's by configuring first for the dual
ranked DIMM. A quick shows, if this module is really installed. If this test
fails, the DDR2 controller is re-configured for the single
ranked SODIMM.

Tested with those SODIMM's:

CT6464AC667.8FB (dual ranked)
CT6464AC667.4FE (single ranked)

Signed-off-by: Stefan Roese <sr@denx.de>
2009-07-30 07:22:18 +02:00
27dd5f8e10 ppc4xx: amcc: Move "kernel_addr_r" etc to higher locations (> 16MB)
This patch moves the load addresses for kernel, fdt and ramdisk to higher
addresses (>= 16MB). This enables booting of bigger kernel images (e.g.
lockdep enabled).

Signed-off-by: Stefan Roese <sr@denx.de>
2009-07-30 07:22:18 +02:00
6942efc2be ppc4xx: amcc: Set CONFIG_SYS_BOOTMAPSZ to 16MB for big kernels
This patch changes CONFIG_SYS_BOOTMAPSZ from 8MB to 16MB which is the
initial TLB on 40x PPC's in the Linux kernel. With this change even bigger
Linux kernels (> 8MB) can be booted.

This patch also sets CONFIG_SYS_BOOTM_LEN to 16MB (default 8MB) to enable
decompression of bigger images.

Signed-off-by: Stefan Roese <sr@denx.de>
2009-07-30 07:22:18 +02:00
901be89a27 83xx, kmeter1, fix: update in the DTS the correct size for the first flash
When updating the "reg" in the "/localbus/flash@f0000000,0" node
size was wrong updated for the first flash, because the total
size was filled in, instead of the right size for it.

Signed-off-by: Heiko Schocher <hs@denx.de>
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
2009-07-29 18:46:23 -05:00
108f56b056 Merge branch 'master' of git://git.denx.de/u-boot-i2c 2009-07-30 00:36:25 +02:00
4c2e3da82d Update Freescale copyrights to remove "All Rights Reserved"
"All Rights Reserved" conflicts with the GPL.

Signed-off-by: Kumar Gala <kumar.gala@freescale.com>
2009-07-29 09:59:22 +02:00
bb4291e625 arm nomadik: add i2c
Signed-off-by: Alessandro Rubini <rubini@unipv.it>
Acked-by: Andrea Gallo <andrea.gallo@stericsson.com>
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2009-07-29 09:57:47 +02:00
60cbfbfd0f arm nomadik: add gpio support
Signed-off-by: Alessandro Rubini <rubini@unipv.it>
Acked-by: Andrea Gallo <andrea.gallo@stericsson.com>
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2009-07-29 09:57:46 +02:00
549b98306d OMAP3 Remove twl4030 defines
These defines have been subplanted by the equivelent defines in
include/twl4030.h

Signed-off-by: Tom Rix <Tom.Rix@windriver.com>
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Acked-by: Heiko Schocher <hs@denx.de>
2009-07-29 09:57:45 +02:00
fccc0fcaaa OMAP3 Move twl4030 mmc function
Because twl4030 now has its own device files, move and rename
twl4030_mmc_config.

twl4030_mmc_config initializes the twl4030 power setting to
the mmc device.  Because it is in the twl4030 power domain, move
it out of drivers/mmc/omap3_mmc.c and into drivers/power/twl4030.c.

The function was renamed to twl4030_power_mmc_init because all
the functions in this file are to have the format

twl4030_power_<device>_<action>

In this case the suffix is mmc_init so
device : mmc
action : init

Signed-off-by: Tom Rix <Tom.Rix@windriver.com>
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Acked-by: Heiko Schocher <hs@denx.de>
2009-07-29 09:57:43 +02:00
2c15513010 OMAP3 Move twl4030 power and led functions
Because twl4030 now has its own device files, move exiting
omap3 power_init_r to a new location.

power_init_r is the only function in board/omap3/common.
It initializes the twl4030 power for the board and enables
the led.

The power part of the the function is moved to twl4030_power_init in
drivers/power/twl4030.c The power compilation is conditional on the
existing config variable CONFIG_TWL4030_POWER.

The led part is moved to twl4030_led_init in the new file
drivers/misc/twl4030_led.c  The led compilation is conditional on
the new config variable CONFIG_TWL4030_LED

The directory board/omap3/common was removed because power_init_r
was the only function in it.

Signed-off-by: Tom Rix <Tom.Rix@windriver.com>
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Acked-by: Heiko Schocher <hs@denx.de>
2009-07-29 09:57:30 +02:00
d7b0781e2b Merge branch 'master' of git://git.denx.de/u-boot-ppc4xx 2009-07-29 09:25:52 +02:00
03a14104f1 Merge branch 'master' of git://git.denx.de/u-boot-mpc83xx 2009-07-29 09:15:36 +02:00
3cb7a4805f TQM8xx* boards: set larger SMC Rx buffer len
Commit 2b3f12c2 added support for configurable SMC Rx buffer length on
8xx systems. Enable this feature on TQM8xx* based boards.

This fixes the problem that pasting text in the middle of a line
(i. e. inserting in edit mode) did not work - only the first two
characters got inserted, the rest was lost.

Signed-off-by: Wolfgang Denk <wd@denx.de>
2009-07-28 22:39:04 +02:00
4b7511478b Fix ext2load return code
Make the ext2load command return 0 on success (instead of the file
length).

Also fix output format (get rid of random newlines) and some coding
style issues (long lines etc.).

Signed-off-by: Wolfgang Denk <wd@denx.de>
2009-07-28 22:38:53 +02:00
56fdaadc12 ext2: fix inode size and calculations
Signed-off-by: unsik Kim <donari75@gmail.com>
Signed-off-by: Bernhard Weirich <bernhard.weirich@riedel.net>
Signed-off-by: Wolfgang Denk <wd@denx.de>
Tested-by: Wolfgang Denk <wd@denx.de>
2009-07-28 22:38:17 +02:00
cd7826359e TWL4030 Add power reset button
The Zoom2 power reset button is on the top right side of the
main board.  Press and hold for about to 8 seconds to completely
reset the board.

Some of the beta boards have a hardware problem that prevents
using this feature.  If is difficult to further characterize the
boards that fail.  So disable resetting for all beta boards.

The Zoom1 reset button is the red circle on the top right,
front of the board.  Press and hold the button for 8 seconds to
completely reset the board.

After analyzing beagle, it was determined that other boards
that use the twl4030 for power managment can also make use
this function.

The resetting is done by the power management part of the twl4030.
Since there is no existing drivers/power, add one.

The compilation of power/twl4030.h is controlled by the config
variable CONFIG_TWL4030_POWER

Signed-off-by: Tom Rix <Tom.Rix@windriver.com>
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Acked-by: Heiko Schocher <hs@denx.de>
2009-07-28 08:56:31 +02:00
8966eb4c1c TWL4030 Add initial support
The TWL4030 supplies many peripherals for OMAP3 boards. These include
power management, usb and, keyboard.

The product description is found here:

http://focus.ti.com/docs/prod/folders/print/tps65950.html

Product reference document, tps65950.pdf, is found here:

http://www.ti.com/lit/gpn/tps65950

Signed-off-by: Tom Rix <Tom.Rix@windriver.com>
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Acked-by: Heiko Schocher <hs@denx.de>
2009-07-28 08:55:39 +02:00
7f79dfb48b OMAP I2C Fix the sampling clock.
This problem is seen on Zoom1 and Zoom2 in the startup and
when i2c probe is used

Before :

In:    serial
Out:   serial
Err:   serial
timed out in wait_for_bb: I2C_STAT=1000
timed out in wait_for_bb: I2C_STAT=1000
timed out in wait_for_bb: I2C_STAT=1000
timed out in wait_for_pin: I2C_STAT=1000
I2C read: I/O error
timed out in wait_for_bb: I2C_STAT=1000
timed out in wait_for_bb: I2C_STAT=1000
Die ID #327c00020000000004013ddd05026013
Hit any key to stop autoboot:  0
OMAP3 Zoom1# i2c probe
Valid chip addresses:timed out in wait_for_bb: I2C_STAT=1000
 02 03 04 05 06 07 08 09 0A 0B 0C 0D <snip>

After :

In:    serial
Out:   serial
Err:   serial
Die ID #327c00020000000004013ddd05026013
Hit any key to stop autoboot:  0
OMAP3 Zoom1# i2c probe
Valid chip addresses: 48 49 4A 4B

The addresses are for the twl4030.

The prescalar that converts the function clock to the sampling
clock is hardcoded to 0.  The reference manual recommends 7
if the function clock is 96MHz.

Instead of just changing the hardcoded values, the prescalar
is calculated from the value I2C_IP_CLK.

The i2c #defines are in kHz.  The speed passed into the
i2c init routine is in Hz.  To be consistent, change the
defines to be in Hz.

The timing calculations are based on what is done in the
linux 2.6.30 kernel in drivers/i2c/buses/i2c_omap.c as
apposed to what is done in TRM.

The major variables in the timing caculations are
specified as #defines that can be overriden as required.

The variables and their defaults are

I2C_IP_CLK				SYSTEM_CLOCK_96
I2C_INTERNAL_SAMPLING_CLK		19200000
I2C_FASTSPEED_SCLL_TRIM			6
I2C_FASTSPEED_SCLH_TRIM			6
I2C_HIGHSPEED_PHASE_ONE_SCLL_TRIM	I2C_FASTSPEED_SCLL_TRIM
I2C_HIGHSPEED_PHASE_ONE_SCLH_TRIM	I2C_FASTSPEED_SCLH_TRIM
I2C_HIGHSPEED_PHASE_TWO_SCLL_TRIM	I2C_FASTSPEED_SCLL_TRIM
I2C_HIGHSPEED_PHASE_TWO_SCLH		I2C_FASTSPEED_SCLH_TRIM

This was runtime verified on Zoom1, Zoom2, Beagle and Overo.
The 400kHz and 3.4M cases were verifed on test Zoom1,
Zoom2, Beagle and Overo configurations.

Testing for omap2 will be done in a second step as Nishanth
and Jean-Christophe commented.

Signed-off-by: Tom Rix <Tom.Rix@windriver.com>
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Acked-by: Heiko Schocher <hs@denx.de>
2009-07-28 08:52:33 +02:00
4ce5a72851 arm, i2c: added support for the TWSI I2C Interface
Signed-off-by: Heiko Schocher <hs@denx.de>
2009-07-28 08:20:58 +02:00
042d01c72e ppc4xx: Fix problem with NOR range assignment in Canyonlands ft_board_setup
This patch fixes the problem, that the current fdt board fixup code only
set's one range, the one for NOR. By this it's overwriting the already
correctly configured values done in __ft_board_setup(). Just remove this
now unneeded NOR fixup and all the ranges are correctly defined.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Dirk Eibach <eibach@gdsys.de>
Cc: Felix Radensky <felix@embedded-sol.com>
2009-07-28 07:26:07 +02:00
11a1604f8d ppc4xx: Add some NAND-booting bootstrap entries to Kilauea chip_config cmd
This patch adds some I2C bootstrap setting for NAND booting to the Kilauea
chip_config command ("533-nand" and "600-nand").

Additionally some incorrectly indented lines are fixed.

Signed-off-by: Stefan Roese <sr@denx.de>
2009-07-28 07:24:01 +02:00
5b34691ff8 ppc4xx: Kilauea: Fix SDRAM init in NAND booting version
DDR2 Auto-calibration needs to be disabled on the NAND booting PPC4xx
targets. Otherwise the configured fixed init values for some DDR2
controller registers (e.g. RQDC) are not initialized at all resulting
in a non working SDRAM.

Signed-off-by: Stefan Roese <sr@denx.de>
2009-07-28 07:23:54 +02:00
f3ed3c9b74 ppc4xx: Fix Arches DDR2 initialization
Testing on AMCC Arches with the latest U-Boot version yielded that DDR2
initialization is currently broken. U-Boot hangs upon relocation to SDRAM
or crashes with random traps. This patch fixes this problem. Arches now
uses a different WRDTR and CLKTR default setting than Canyonlands/Glacier.

Signed-off-by: Stefan Roese <sr@denx.de>
2009-07-28 07:22:46 +02:00
ab4c62c1ba ppc4xx: Add GDsys CompactCenter board support.
Board support for the Guntermann & Drunck CompactCenter and
DevCon-Center.
Based on the AMCC Canyonlands board support by Stefan Roese.

Signed-off-by: Dirk Eibach <eibach@gdsys.de>
Signed-off-by: Stefan Roese <sr@denx.de>
2009-07-28 07:20:34 +02:00
c2e49f706b mpc83xx: Add esd VME8349 board support
This patch adds support for the esd VME8349 board equipped with the
MPC8349. It's a VME PMC carrier board equipped with the Tundra
TSI148 VME-bridge.

Signed-off-by: Reinhard Arlt <reinhard.arlt@esd-electronics.com>
Signed-off-by: Stefan Roese <sr@denx.de>
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
2009-07-27 18:36:36 -05:00
fe613cdd4e sbc8349: combine HRCW flash and u-boot image flash
Up to this point in time, the sbc8349 board was storing the u-boot
image in flash 2x.  One for the HRCW value at the beginning of
flash (0xff80_0000), and once close to the end of flash (0xfff8_0000)
for the actual image that got executed.

This moves the TEXT_BASE to be the beginning of flash, which makes
the second copy of the image redundant, and frees up the flash
from the end of the environment storage to the end of the flash
device itself.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
2009-07-27 18:35:53 -05:00
be9b56df02 mpc83xx: CONFIG_83XX_GENERIC_PCI is now synonymous with CONFIG_PCI; remove the former
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
2009-07-27 10:17:54 -05:00
052c089165 ColdFire: Update bootargs
Add a bootargs for M53017EVB and update bootargs
for M54451EVB

Signed-off-by: TsiChung Liew <tsicliew@gmail.com>
2009-07-14 09:46:42 -05:00
6e8d58d366 Command for accessing serial flash update
Change strtoul number base of argv 3 from 0 to 16

Signed-off-by: TsiChung Liew <tsicliew@gmail.com>
2009-07-14 09:46:39 -05:00
ee0a846246 ColdFire: Add DSPI support for MCF5227x and MCF5445x
Remove individual CPU specific DSPI driver.
Add required feature for the common DSPI driver in cpu_init and
in platform configuration file.

Signed-off-by: TsiChung Liew <tsicliew@gmail.com>
2009-07-14 09:46:34 -05:00
dec61c7851 Coldfire: Consolidate DSPI driver
Unify both MCF5227x and MCF5445x DSPI driver in CPU to
driver/spi folder for common use.

Signed-off-by: TsiChung Liew <tsicliew@gmail.com>
2009-07-14 09:46:09 -05:00
11d88b26a6 ColdFire: Remove compiler warning messages
Remove unused variables and printf type mismatch in
lib_m68k/board.c

Signed-off-by: TsiChung Liew <tsicliew@gmail.com>
2009-07-14 09:27:24 -05:00
4567c7bff2 ColdFire: Fix M53017EVB flash size
Increase the flash size from 8MB to 16MB

Signed-off-by: TsiChung Liew <tsicliew@gmail.com>
2009-07-14 09:27:20 -05:00
bf9a521529 ColdFire: Add M5208EVB and MCF520x CPU support
Signed-off-by: TsiChung Liew <tsicliew@gmail.com>
2009-07-14 09:27:17 -05:00
709b384b64 ColdFire: Update for M54451EVB
Update serial boot DRAM's Internal RAM, vector table and DRAM in
start.S, serial flash's read status command over SPI and NOR
flash.

Signed-off-by: TsiChung Liew <tsicliew@gmail.com>
2009-07-14 09:27:14 -05:00
bbf6bbffca ColdFire: Update configuration file to use flash buffer write
Update M52277EVB, M53017EVB and M54455EVB platform configuration
file to use flash buffer write

Signed-off-by: TsiChung Liew <tsicliew@gmail.com>
2009-07-14 09:27:10 -05:00
344 changed files with 16776 additions and 5059 deletions

1
.gitignore vendored
View File

@ -27,6 +27,7 @@
/u-boot.ldr
/u-boot.ldr.hex
/u-boot.ldr.srec
/u-boot.lds
/u-boot-onenand.bin
/u-boot-flexonenand.bin

1850
CHANGELOG

File diff suppressed because it is too large Load Diff

View File

@ -32,6 +32,8 @@ Reinhard Arlt <reinhard.arlt@esd-electronics.com>
mecp5200 MPC5200
pf5200 MPC5200
vme8349 MPC8349
CPCI750 PPC750FX/GX
Yuli Barcohen <yuli@arabellasw.com>
@ -135,6 +137,8 @@ Jon Diekema <jon.diekema@smiths-aerospace.com>
Dirk Eibach <eibach@gdsys.de>
compactcenter PPC460EX
devconcenter PPC460EX
dlvision PPC405EP
gdppc440etx PPC440EP/GR
neo PPC405EP

View File

@ -184,6 +184,7 @@ LIST_4xx=" \
canyonlands \
canyonlands_nand \
CMS700 \
compactcenter \
CPCI2DP \
CPCI405 \
CPCI4052 \
@ -194,6 +195,7 @@ LIST_4xx=" \
csb272 \
csb472 \
DASA_SIM \
devconcenter \
dlvision \
DP405 \
DU405 \
@ -364,6 +366,7 @@ LIST_83xx=" \
sbc8349 \
SIMPC8313_LP \
TQM834x \
vme8349 \
"
@ -774,6 +777,7 @@ LIST_coldfire=" \
EB+MCF-EV123 \
EB+MCF-EV123_internal \
idmr \
M5208EVBE \
M52277EVB \
M5235EVB \
M5249EVB \

View File

@ -24,7 +24,7 @@
VERSION = 2009
PATCHLEVEL = 08
SUBLEVEL =
EXTRAVERSION = -rc1
EXTRAVERSION =
ifneq "$(SUBLEVEL)" ""
U_BOOT_VERSION = $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
else
@ -221,6 +221,7 @@ LIBS += drivers/net/phy/libphy.a
LIBS += drivers/net/sk98lin/libsk98lin.a
LIBS += drivers/pci/libpci.a
LIBS += drivers/pcmcia/libpcmcia.a
LIBS += drivers/power/libpower.a
LIBS += drivers/spi/libspi.a
ifeq ($(CPU),mpc83xx)
LIBS += drivers/qe/qe.a
@ -266,6 +267,14 @@ endif
PLATFORM_LIBS += $(PLATFORM_LIBGCC)
export PLATFORM_LIBS
# Special flags for CPP when processing the linker script.
# Pass the version down so we can handle backwards compatibility
# on the fly.
LDPPFLAGS += \
-include $(TOPDIR)/include/u-boot/u-boot.lds.h \
$(shell $(LD) --version | \
sed -ne 's/GNU ld version \([0-9][0-9]*\)\.\([0-9][0-9]*\).*/-DLD_MAJOR=\1 -DLD_MINOR=\2/p')
ifeq ($(CONFIG_NAND_U_BOOT),y)
NAND_SPL = nand_spl
U_BOOT_NAND = $(obj)u-boot-nand.bin
@ -325,11 +334,13 @@ GEN_UBOOT = \
cd $(LNDIR) && $(LD) $(LDFLAGS) $$UNDEF_SYM $(__OBJS) \
--start-group $(__LIBS) --end-group $(PLATFORM_LIBS) \
-Map u-boot.map -o u-boot
$(obj)u-boot: depend $(SUBDIRS) $(OBJS) $(LIBBOARD) $(LIBS) $(LDSCRIPT)
$(obj)u-boot: depend $(SUBDIRS) $(OBJS) $(LIBBOARD) $(LIBS) $(LDSCRIPT) $(obj)u-boot.lds
$(GEN_UBOOT)
ifeq ($(CONFIG_KALLSYMS),y)
smap=`$(call SYSTEM_MAP,u-boot) | awk '$$2 ~ /[tTwW]/ {printf $$1 $$3 "\\\\000"}'` ; \
$(CC) $(CFLAGS) -DSYSTEM_MAP="\"$${smap}\"" -c common/system_map.c -o $(obj)common/system_map.o
smap=`$(call SYSTEM_MAP,u-boot) | \
awk '$$2 ~ /[tTwW]/ {printf $$1 $$3 "\\\\000"}'` ; \
$(CC) $(CFLAGS) -DSYSTEM_MAP="\"$${smap}\"" \
-c common/system_map.c -o $(obj)common/system_map.o
$(GEN_UBOOT) $(obj)common/system_map.o
endif
@ -348,6 +359,9 @@ $(SUBDIRS): depend
$(LDSCRIPT): depend
$(MAKE) -C $(dir $@) $(notdir $@)
$(obj)u-boot.lds: $(LDSCRIPT)
$(CPP) $(CPPFLAGS) $(LDPPFLAGS) -ansi -D__ASSEMBLY__ -P - <$^ >$@
$(NAND_SPL): $(TIMESTAMP_FILE) $(VERSION_FILE) $(obj)include/autoconf.mk
$(MAKE) -C nand_spl/board/$(BOARDDIR) all
@ -1282,6 +1296,14 @@ CATcenter_33_config: unconfig
CMS700_config: unconfig
@$(MKCONFIG) $(@:_config=) ppc ppc4xx cms700 esd
# Compact-Center & DevCon-Center use different U-Boot images
compactcenter_config \
devconcenter_config: unconfig
@mkdir -p $(obj)include
@echo "#define CONFIG_$$(echo $(subst ,,$(@:_config=)) | \
tr '[:lower:]' '[:upper:]')" >$(obj)include/config.h
@$(MKCONFIG) -n $@ -a compactcenter ppc ppc4xx compactcenter gdsys
CPCI2DP_config: unconfig
@$(MKCONFIG) $(@:_config=) ppc ppc4xx cpci2dp esd
@ -1984,6 +2006,9 @@ ZPC1900_config: unconfig
## Coldfire
#########################################################################
M5208EVBE_config : unconfig
@$(MKCONFIG) $(@:_config=) m68k mcf52x2 m5208evbe freescale
M52277EVB_config \
M52277EVB_spansion_config \
M52277EVB_stmicro_config : unconfig
@ -2088,18 +2113,15 @@ M5373EVB_config : unconfig
@$(MKCONFIG) -a M5373EVB m68k mcf532x m5373evb freescale
M54451EVB_config \
M54451EVB_spansion_config \
M54451EVB_stmicro_config : unconfig
@case "$@" in \
M54451EVB_config) FLASH=SPANSION;; \
M54451EVB_spansion_config) FLASH=SPANSION;; \
M54451EVB_config) FLASH=NOR;; \
M54451EVB_stmicro_config) FLASH=STMICRO;; \
esac; \
if [ "$${FLASH}" = "SPANSION" ] ; then \
echo "#define CONFIG_SYS_SPANSION_BOOT" >> $(obj)include/config.h ; \
if [ "$${FLASH}" = "NOR" ] ; then \
echo "TEXT_BASE = 0x00000000" > $(obj)board/freescale/m54451evb/config.tmp ; \
cp $(obj)board/freescale/m54451evb/u-boot.spa $(obj)board/freescale/m54451evb/u-boot.lds ; \
$(XECHO) "... with SPANSION boot..." ; \
$(XECHO) "... with NOR boot..." ; \
fi; \
if [ "$${FLASH}" = "STMICRO" ] ; then \
echo "#define CONFIG_CF_SBF" >> $(obj)include/config.h ; \
@ -2366,8 +2388,23 @@ MPC837XERDB_config: unconfig
MVBLM7_config: unconfig
@$(MKCONFIG) $(@:_config=) ppc mpc83xx mvblm7 matrix_vision
sbc8349_config: unconfig
@$(MKCONFIG) $(@:_config=) ppc mpc83xx sbc8349
sbc8349_config \
sbc8349_PCI_33_config \
sbc8349_PCI_66_config: unconfig
@mkdir -p $(obj)include
@if [ "$(findstring _PCI_,$@)" ] ; then \
$(XECHO) -n "... PCI HOST at " ; \
echo "#define CONFIG_PCI" >>$(obj)include/config.h ; \
fi ; \
if [ "$(findstring _33_,$@)" ] ; then \
$(XECHO) -n "33MHz... " ; \
echo "#define PCI_33M" >>$(obj)include/config.h ; \
fi ; \
if [ "$(findstring _66_,$@)" ] ; then \
$(XECHO) -n "66MHz... " ; \
echo "#define PCI_66M" >>$(obj)include/config.h ; \
fi ;
@$(MKCONFIG) -a sbc8349 ppc mpc83xx sbc8349
SIMPC8313_LP_config \
SIMPC8313_SP_config: unconfig
@ -2387,6 +2424,8 @@ SIMPC8313_SP_config: unconfig
TQM834x_config: unconfig
@$(MKCONFIG) $(@:_config=) ppc mpc83xx tqm834x tqc
vme8349_config: unconfig
@$(MKCONFIG) $(@:_config=) ppc mpc83xx vme8349 esd
#########################################################################
## MPC85xx Systems
@ -3642,10 +3681,12 @@ clean:
$(obj)board/trab/trab_fkt $(obj)board/voiceblue/eeprom \
$(obj)board/armltd/{integratorap,integratorcp}/u-boot.lds \
$(obj)lib_blackfin/u-boot.lds \
$(obj)u-boot.lds \
$(obj)cpu/blackfin/bootrom-asm-offsets.[chs]
@rm -f $(obj)include/bmp_logo.h
@rm -f $(obj)nand_spl/{u-boot-spl,u-boot-spl.map,System.map}
@rm -f $(obj)nand_spl/{u-boot.lds,u-boot-spl,u-boot-spl.map,System.map}
@rm -f $(obj)onenand_ipl/onenand-{ipl,ipl.bin,ipl-2k.bin,ipl-4k.bin,ipl.map}
@rm -f $(obj)onenand_ipl/u-boot.lds
@rm -f $(TIMESTAMP_FILE) $(VERSION_FILE)
@find $(OBJTREE) -type f \
\( -name 'core' -o -name '*.bak' -o -name '*~' \

View File

@ -40,6 +40,24 @@ DECLARE_GLOBAL_DATA_PTR;
#define BOARD_GLACIER 3
#define BOARD_ARCHES 4
/*
* Override the default functions in cpu/ppc4xx/44x_spd_ddr2.c with
* board specific values.
*/
#if defined(CONFIG_ARCHES)
u32 ddr_wrdtr(u32 default_val) {
return (SDRAM_WRDTR_LLWP_1_CYC | SDRAM_WRDTR_WTR_0_DEG | 0x823);
}
#else
u32 ddr_wrdtr(u32 default_val) {
return (SDRAM_WRDTR_LLWP_1_CYC | SDRAM_WRDTR_WTR_180_DEG_ADV | 0x823);
}
u32 ddr_clktr(u32 default_val) {
return (SDRAM_CLKTR_CLKP_90_DEG_ADV);
}
#endif
#if defined(CONFIG_ARCHES)
/*
* FPGA read/write helper macros
@ -76,13 +94,23 @@ static inline void board_cpld_write(int offset, int data)
out_8((void *)(CONFIG_SYS_CPLD_ADDR), offset);
out_8((void *)(CONFIG_SYS_CPLD_DATA), data);
}
#else
static int pvr_460ex(void)
{
u32 pvr = get_pvr();
if ((pvr == PVR_460EX_RA) || (pvr == PVR_460EX_SE_RA) ||
(pvr == PVR_460EX_RB))
return 1;
return 0;
}
#endif /* defined(CONFIG_ARCHES) */
int board_early_init_f(void)
{
#if !defined(CONFIG_ARCHES)
u32 sdr0_cust0;
u32 pvr = get_pvr();
#endif
/*
@ -157,7 +185,7 @@ int board_early_init_f(void)
mtdcr(AHB_TOP, 0x8000004B);
mtdcr(AHB_BOT, 0x8000004B);
if ((pvr == PVR_460EX_RA) || (pvr == PVR_460EX_SE_RA)) {
if (pvr_460ex()) {
/*
* Configure USB-STP pins as alternate and not GPIO
* It seems to be neccessary to configure the STP pins as GPIO
@ -216,17 +244,16 @@ int get_cpu_num(void)
int checkboard(void)
{
char *s = getenv("serial#");
u32 pvr = get_pvr();
if ((pvr == PVR_460GT_RA) || (pvr == PVR_460GT_SE_RA)) {
printf("Board: Glacier - AMCC PPC460GT Evaluation Board");
gd->board_type = BOARD_GLACIER;
} else {
if (pvr_460ex()) {
printf("Board: Canyonlands - AMCC PPC460EX Evaluation Board");
if (in_8((void *)(CONFIG_SYS_BCSR_BASE + 3)) & CONFIG_SYS_BCSR3_PCIE)
gd->board_type = BOARD_CANYONLANDS_PCIE;
else
gd->board_type = BOARD_CANYONLANDS_SATA;
} else {
printf("Board: Glacier - AMCC PPC460GT Evaluation Board");
gd->board_type = BOARD_GLACIER;
}
switch (gd->board_type) {
@ -286,18 +313,6 @@ int checkboard(void)
}
#endif /* !defined(CONFIG_ARCHES) */
/*
* Override the default functions in cpu/ppc4xx/44x_spd_ddr2.c with
* board specific values.
*/
u32 ddr_wrdtr(u32 default_val) {
return (SDRAM_WRDTR_LLWP_1_CYC | SDRAM_WRDTR_WTR_180_DEG_ADV | 0x823);
}
u32 ddr_clktr(u32 default_val) {
return (SDRAM_CLKTR_CLKP_90_DEG_ADV);
}
#if defined(CONFIG_NAND_U_BOOT)
/*
* NAND booting U-Boot version uses a fixed initialization, since the whole
@ -492,7 +507,6 @@ int misc_init_r(void)
{
u32 sdr0_srst1 = 0;
u32 eth_cfg;
u32 pvr = get_pvr();
u8 val;
/*
@ -507,7 +521,7 @@ int misc_init_r(void)
/* Set the for 2 RGMII mode */
/* GMC0 EMAC4_0, GMC0 EMAC4_1, RGMII Bridge 0 */
eth_cfg &= ~SDR0_ETH_CFG_GMC0_BRIDGE_SEL;
if ((pvr == PVR_460EX_RA) || (pvr == PVR_460EX_SE_RA))
if (pvr_460ex())
eth_cfg |= SDR0_ETH_CFG_GMC1_BRIDGE_SEL;
else
eth_cfg &= ~SDR0_ETH_CFG_GMC1_BRIDGE_SEL;
@ -579,23 +593,8 @@ extern void __ft_board_setup(void *blob, bd_t *bd);
void ft_board_setup(void *blob, bd_t *bd)
{
u32 val[4];
int rc;
__ft_board_setup(blob, bd);
/* Fixup NOR mapping */
val[0] = CONFIG_SYS_NOR_CS; /* chip select number */
val[1] = 0; /* always 0 */
val[2] = CONFIG_SYS_FLASH_BASE_PHYS_L; /* we fixed up this address */
val[3] = gd->bd->bi_flashsize;
rc = fdt_find_and_setprop(blob, "/plb/opb/ebc", "ranges",
val, sizeof(val), 1);
if (rc) {
printf("Unable to update property NOR mapping, err=%s\n",
fdt_strerror(rc));
}
if (gd->board_type == BOARD_CANYONLANDS_SATA) {
/*
* When SATA is selected we need to disable the first PCIe

View File

@ -33,13 +33,6 @@ struct ppc4xx_config ppc4xx_config_val[] = {
0x40, 0x08, 0x23, 0x50, 0x0d, 0x05, 0x00, 0x00
}
},
{
"600-nand", "NAND CPU: 600 PLB: 200 OPB: 100 EBC: 100",
{
0x86, 0x80, 0xce, 0x1f, 0x79, 0x90, 0x01, 0xa0,
0xa0, 0xe8, 0x23, 0x58, 0x0d, 0x05, 0x00, 0x00
}
},
{
"800-nor", "NOR CPU: 800 PLB: 200 OPB: 100 EBC: 100",
{
@ -47,13 +40,6 @@ struct ppc4xx_config ppc4xx_config_val[] = {
0x40, 0x08, 0x23, 0x50, 0x0d, 0x05, 0x00, 0x00
}
},
{
"800-nand", "NAND CPU: 800 PLB: 200 OPB: 100 EBC: 100",
{
0x86, 0x80, 0xba, 0x14, 0x99, 0x90, 0x01, 0xa0,
0xa0, 0xe8, 0x23, 0x58, 0x0d, 0x05, 0x00, 0x00
}
},
{
"1000-nor", "NOR CPU:1000 PLB: 200 OPB: 100 EBC: 100",
{
@ -61,13 +47,6 @@ struct ppc4xx_config ppc4xx_config_val[] = {
0x40, 0x08, 0x23, 0x50, 0x0d, 0x05, 0x00, 0x00
}
},
{
"1000-nand", "NAND CPU:1000 PLB: 200 OPB: 100 EBC: 100",
{
0x86, 0x82, 0x96, 0x19, 0xb9, 0x90, 0x01, 0xa0,
0xa0, 0xe8, 0x23, 0x58, 0x0d, 0x05, 0x00, 0x00
}
},
{
"1066-nor", "NOR CPU:1066 PLB: 266 OPB: 88 EBC: 88",
{
@ -75,6 +54,28 @@ struct ppc4xx_config ppc4xx_config_val[] = {
0x40, 0x08, 0x23, 0x50, 0x0d, 0x05, 0x00, 0x00
}
},
#if !defined(CONFIG_ARCHES)
{
"600-nand", "NAND CPU: 600 PLB: 200 OPB: 100 EBC: 100",
{
0x86, 0x80, 0xce, 0x1f, 0x79, 0x90, 0x01, 0xa0,
0xa0, 0xe8, 0x23, 0x58, 0x0d, 0x05, 0x00, 0x00
}
},
{
"800-nand", "NAND CPU: 800 PLB: 200 OPB: 100 EBC: 100",
{
0x86, 0x80, 0xba, 0x14, 0x99, 0x90, 0x01, 0xa0,
0xa0, 0xe8, 0x23, 0x58, 0x0d, 0x05, 0x00, 0x00
}
},
{
"1000-nand", "NAND CPU:1000 PLB: 200 OPB: 100 EBC: 100",
{
0x86, 0x82, 0x96, 0x19, 0xb9, 0x90, 0x01, 0xa0,
0xa0, 0xe8, 0x23, 0x58, 0x0d, 0x05, 0x00, 0x00
}
},
{
"1066-nand", "NAND CPU:1066 PLB: 266 OPB: 88 EBC: 88",
{
@ -82,6 +83,7 @@ struct ppc4xx_config ppc4xx_config_val[] = {
0xa0, 0xe8, 0x23, 0x58, 0x0d, 0x05, 0x00, 0x00
}
},
#endif
};
int ppc4xx_config_count = ARRAY_SIZE(ppc4xx_config_val);

View File

@ -25,6 +25,8 @@
#include <common.h>
#include <asm/ppc4xx_config.h>
/* NAND booting versions differ in bytes: 6, 8, 9, 11, 12 */
struct ppc4xx_config ppc4xx_config_val[] = {
{
"333-nor","NOR CPU: 333 PLB: 166 OPB: 83 EBC: 83",
@ -49,10 +51,17 @@ struct ppc4xx_config ppc4xx_config_val[] = {
},
{
"533-nor", "NOR CPU: 533 PLB: 177 OPB: 88 EBC: 88",
{
0x8e, 0x43, 0x60, 0x13, 0x98, 0x00, 0x0a, 0x00,
0x40, 0x08, 0x23, 0x50, 0x00, 0x05, 0x00, 0x00
}
{
0x8e, 0x43, 0x60, 0x13, 0x98, 0x00, 0x0a, 0x00,
0x40, 0x08, 0x23, 0x50, 0x00, 0x05, 0x00, 0x00
}
},
{
"533-nand", "NOR CPU: 533 PLB: 177 OPB: 88 EBC: 88",
{
0x8e, 0x43, 0x60, 0x13, 0x98, 0x00, 0x0f, 0x00,
0xa0, 0x68, 0x23, 0x58, 0x0d, 0x05, 0x00, 0x00
}
},
{
"600-nor", "NOR CPU: 600 PLB: 200 OPB: 100 EBC: 100",
@ -61,6 +70,13 @@ struct ppc4xx_config ppc4xx_config_val[] = {
0x40, 0x08, 0x23, 0x50, 0x00, 0x05, 0x00, 0x00
}
},
{
"600-nand", "NOR CPU: 600 PLB: 200 OPB: 100 EBC: 100",
{
0x8d, 0x02, 0x34, 0x13, 0x98, 0x00, 0x0f, 0x00,
0xa0, 0x68, 0x23, 0x58, 0x0d, 0x05, 0x00, 0x00
}
},
{
"666-nor", "NOR CPU: 666 PLB: 222 OPB: 111 EBC: 111",
{

View File

@ -51,9 +51,9 @@ u##size flash_read##size(void *addr) \
return __raw_read##sfx(gpio_cfi_flash_swizzle(addr)); \
}
MAKE_FLASH(8, b) /* flash_write8() flash_read8() */
MAKE_FLASH(16, w) /* flash_write16() flash_write16() */
MAKE_FLASH(32, l) /* flash_write32() flash_write32() */
MAKE_FLASH(64, q) /* flash_write64() flash_write64() */
MAKE_FLASH(16, w) /* flash_write16() flash_read16() */
MAKE_FLASH(32, l) /* flash_write32() flash_read32() */
MAKE_FLASH(64, q) /* flash_write64() flash_read64() */
void gpio_cfi_flash_init(void)
{

View File

@ -49,9 +49,9 @@ u##size flash_read##size(void *addr) \
return __raw_read##sfx(gpio_cfi_flash_swizzle(addr)); \
}
MAKE_FLASH(8, b) /* flash_write8() flash_read8() */
MAKE_FLASH(16, w) /* flash_write16() flash_write16() */
MAKE_FLASH(32, l) /* flash_write32() flash_write32() */
MAKE_FLASH(64, q) /* flash_write64() flash_write64() */
MAKE_FLASH(16, w) /* flash_write16() flash_read16() */
MAKE_FLASH(32, l) /* flash_write32() flash_read32() */
MAKE_FLASH(64, q) /* flash_write64() flash_read64() */
void gpio_cfi_flash_init(void)
{

View File

@ -1,5 +1,9 @@
/*------------------------------------------------------------------------------+ */
/* */
/* This source code is dual-licensed. You may use it under the terms */
/* of the GNU General Public License version 2, or under the license */
/* below. */
/* */
/* This source code has been made available to you by IBM on an AS-IS */
/* basis. Anyone receiving this source is licensed under IBM */
/* copyrights to use it in any way he or she deems fit, including */

View File

@ -1,4 +1,6 @@
/******************************************************************************
* This source code is dual-licensed. You may use it under the terms of the
* GNU General Public License version 2, or under the license below.
*
* This source code has been made available to you by IBM on an AS-IS
* basis. Anyone receiving this source is licensed under IBM

View File

@ -1,4 +1,6 @@
/******************************************************************************
* This source code is dual-licensed. You may use it under the terms of the
* GNU General Public License version 2, or under the license below.
*
* This source code has been made available to you by IBM on an AS-IS
* basis. Anyone receiving this source is licensed under IBM

View File

@ -23,7 +23,8 @@
#include <asm/arch/emif_defs.h>
#include <asm/arch/nand_defs.h>
#include "../common/misc.h"
#include <net.h>
#include <netdev.h>
DECLARE_GLOBAL_DATA_PTR;
@ -79,6 +80,13 @@ int board_init(void)
return 0;
}
#ifdef CONFIG_DRIVER_DM9000
int board_eth_init(bd_t *bis)
{
return dm9000_initialize(bis);
}
#endif
#ifdef CONFIG_NAND_DAVINCI
static void nand_dm355evm_select_chip(struct mtd_info *mtd, int chip)

View File

@ -193,7 +193,7 @@ static unsigned long get_delta(unsigned long start)
static void wait_us(unsigned long us)
{
unsigned long start = OSCR;
us *= OSCR_CLK_FREQ;
us = DIV_ROUND_UP(us * OSCR_CLK_FREQ, 1000);
while (get_delta(start) < us) {
/* do nothing */
@ -214,9 +214,11 @@ static unsigned long dfc_wait_event(unsigned long event)
if(!event)
return 0xff000000;
else if(event & (NDSR_CS0_CMDD | NDSR_CS0_BBD))
timeout = CONFIG_SYS_NAND_PROG_ERASE_TO * OSCR_CLK_FREQ;
timeout = DIV_ROUND_UP(CONFIG_SYS_NAND_PROG_ERASE_TO
* OSCR_CLK_FREQ, 1000);
else
timeout = CONFIG_SYS_NAND_OTHER_TO * OSCR_CLK_FREQ;
timeout = DIV_ROUND_UP(CONFIG_SYS_NAND_OTHER_TO
* OSCR_CLK_FREQ, 1000);
while(1) {
ndsr = NDSR;

View File

@ -44,6 +44,19 @@ static const char *led_names[] = {
""
};
static int msp430_xfer(const void *dout, void *din)
{
int err;
err = spi_xfer(NULL, MTC_TRANSFER_SIZE, dout, din,
SPI_XFER_BEGIN | SPI_XFER_END);
/* The MSP chip needs time to ready itself for the next command */
udelay(1000);
return err;
}
static void mtc_calculate_checksum(tx_msp_cmd *packet)
{
int i;
@ -59,7 +72,7 @@ static int do_mtc_led(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
{
tx_msp_cmd pcmd;
rx_msp_cmd prx;
int err = 0;
int err;
int i;
if (argc < 2) {
@ -102,8 +115,7 @@ static int do_mtc_led(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
pcmd.cmd_val2 = 0;
mtc_calculate_checksum(&pcmd);
err = spi_xfer(NULL, MTC_TRANSFER_SIZE, &pcmd, &prx,
SPI_XFER_BEGIN | SPI_XFER_END);
err = msp430_xfer(&pcmd, &prx);
return err;
}
@ -112,7 +124,7 @@ static int do_mtc_key(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
{
tx_msp_cmd pcmd;
rx_msp_cmd prx;
int err = 0;
int err;
memset(&pcmd, 0, sizeof(pcmd));
memset(&prx, 0, sizeof(prx));
@ -120,8 +132,7 @@ static int do_mtc_key(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
pcmd.cmd = CMD_GET_VIM;
mtc_calculate_checksum(&pcmd);
err = spi_xfer(NULL, MTC_TRANSFER_SIZE, &pcmd, &prx,
SPI_XFER_BEGIN | SPI_XFER_END);
err = msp430_xfer(&pcmd, &prx);
if (!err) {
/* function returns '0' if key is pressed */
@ -135,7 +146,7 @@ static int do_mtc_digout(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
{
tx_msp_cmd pcmd;
rx_msp_cmd prx;
int err = 0;
int err;
uchar channel_mask = 0;
if (argc < 3) {
@ -155,8 +166,7 @@ static int do_mtc_digout(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
pcmd.user_out = channel_mask;
mtc_calculate_checksum(&pcmd);
err = spi_xfer(NULL, MTC_TRANSFER_SIZE, &pcmd, &prx,
SPI_XFER_BEGIN | SPI_XFER_END);
err = msp430_xfer(&pcmd, &prx);
return err;
}
@ -165,7 +175,7 @@ static int do_mtc_digin(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
{
tx_msp_cmd pcmd;
rx_msp_cmd prx;
int err = 0;
int err;
uchar channel_num = 0;
if (argc < 2) {
@ -185,8 +195,7 @@ static int do_mtc_digin(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
pcmd.cmd = CMD_GET_VIM;
mtc_calculate_checksum(&pcmd);
err = spi_xfer(NULL, MTC_TRANSFER_SIZE, &pcmd, &prx,
SPI_XFER_BEGIN | SPI_XFER_END);
err = msp430_xfer(&pcmd, &prx);
if (!err) {
/* function returns '0' when digin is on */
@ -213,8 +222,8 @@ static int do_mtc_appreg(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
pcmd.cmd_val2 = 0; /* =0 means read appreg */
mtc_calculate_checksum(&pcmd);
err = spi_xfer(NULL, MTC_TRANSFER_SIZE, &pcmd, &prx,
SPI_XFER_BEGIN | SPI_XFER_END);
err = msp430_xfer(&pcmd, &prx);
if (!err) {
sprintf(buf, "%d", prx.ack2);
setenv("appreg", buf);
@ -227,7 +236,7 @@ static int do_mtc_version(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
{
tx_msp_cmd pcmd;
rx_msp_cmd prx;
int err = 0;
int err;
memset(&pcmd, 0, sizeof(pcmd));
memset(&prx, 0, sizeof(prx));
@ -235,8 +244,7 @@ static int do_mtc_version(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
pcmd.cmd = CMD_FW_VERSION;
mtc_calculate_checksum(&pcmd);
err = spi_xfer(NULL, MTC_TRANSFER_SIZE, &pcmd, &prx,
SPI_XFER_BEGIN | SPI_XFER_END);
err = msp430_xfer(&pcmd, &prx);
if (!err) {
printf("FW V%d.%d.%d / HW %d\n",
@ -246,6 +254,33 @@ static int do_mtc_version(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
return err;
}
static int do_mtc_state(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
{
tx_msp_cmd pcmd;
rx_msp_cmd prx;
int err;
memset(&pcmd, 0, sizeof(pcmd));
memset(&prx, 0, sizeof(prx));
pcmd.cmd = CMD_WD_WDSTATE;
pcmd.cmd_val2 = 1;
mtc_calculate_checksum(&pcmd);
err = msp430_xfer(&pcmd, &prx);
if (!err) {
printf("State %02Xh\n", prx.state);
printf("Input %02Xh\n", prx.input);
printf("UserWD %02Xh\n", prx.ack2);
printf("Sys WD %02Xh\n", prx.ack3);
printf("WD Timout %02Xh\n", prx.ack0);
printf("eSysState %02Xh\n", prx.ack1);
}
return err;
}
static int do_mtc_help(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
cmd_tbl_t cmd_mtc_sub[] = {
@ -256,17 +291,19 @@ cmd_tbl_t cmd_mtc_sub[] = {
" - state: off red green orange\n"
" - blink: blink interval in 100ms steps (1 - 10; 0 = static)\n"),
U_BOOT_CMD_MKENT(key, 0, 1, do_mtc_key,
"returns state of user key\n", ""),
"returns state of user key", ""),
U_BOOT_CMD_MKENT(version, 0, 1, do_mtc_version,
"returns firmware version of supervisor uC\n", ""),
"returns firmware version of supervisor uC", ""),
U_BOOT_CMD_MKENT(appreg, 0, 1, do_mtc_appreg,
"reads appreg value and stores in environment variable 'appreg'\n", ""),
"reads appreg value and stores in environment variable 'appreg'", ""),
U_BOOT_CMD_MKENT(digin, 1, 1, do_mtc_digin,
"returns state of digital input",
"<channel_num> - get state of digital input (1 or 2)\n"),
U_BOOT_CMD_MKENT(digout, 2, 1, do_mtc_digout,
"sets digital outputs",
"<on|off> <on|off>- set state of digital output 1 and 2\n"),
U_BOOT_CMD_MKENT(state, 0, 1, do_mtc_state,
"displays state", ""),
U_BOOT_CMD_MKENT(help, 4, 1, do_mtc_help, "get help",
"[command] - get help for command\n"),
};
@ -333,7 +370,7 @@ int cmd_mtc(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
}
U_BOOT_CMD(mtc, 5, 1, cmd_mtc,
"mtc - special commands for digsyMTC\n",
"special commands for digsyMTC",
"[subcommand] [args...]\n"
"Subcommands list:\n"
"led [ledname] [state] [blink] - set state of leds\n"
@ -346,5 +383,6 @@ U_BOOT_CMD(mtc, 5, 1, cmd_mtc,
" 'appreg'\n"
"digin [channel] - returns state of digital input (1 or 2)\n"
"digout <on|off> <on|off> - sets state of two digital outputs\n"
"state - displays state\n"
"help [subcommand] - get help for subcommand\n"
);

View File

@ -27,6 +27,7 @@
#define CMD_MTC_H
#define CMD_WD_PARA 0x02
#define CMD_WD_WDSTATE 0x04
#define CMD_FW_VERSION 0x10
#define CMD_GET_VIM 0x30
#define CMD_SET_LED 0x40

View File

@ -1,5 +1,9 @@
/*------------------------------------------------------------------------------+ */
/* */
/* This source code is dual-licensed. You may use it under the terms */
/* of the GNU General Public License version 2, or under the license */
/* below. */
/* */
/* This source code has been made available to you by IBM on an AS-IS */
/* basis. Anyone receiving this source is licensed under IBM */
/* copyrights to use it in any way he or she deems fit, including */

View File

@ -1,5 +1,9 @@
/*------------------------------------------------------------------------------+ */
/* */
/* This source code is dual-licensed. You may use it under the terms */
/* of the GNU General Public License version 2, or under the license */
/* below. */
/* */
/* This source code has been made available to you by IBM on an AS-IS */
/* basis. Anyone receiving this source is licensed under IBM */
/* copyrights to use it in any way he or she deems fit, including */

View File

@ -0,0 +1,54 @@
#
# (C) Copyright 2006
# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
#
# Copyright (c) 2009 esd gmbh hannover germany.
#
# See file CREDITS for list of people who contributed to this
# project.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 2 of
# the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
# MA 02111-1307 USA
#
include $(TOPDIR)/config.mk
LIB = $(obj)lib$(BOARD).a
COBJS-y += $(BOARD).o caddy.o
COBJS-$(CONFIG_PCI) += pci.o
COBJS := $(COBJS-y)
SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
OBJS := $(addprefix $(obj),$(COBJS))
SOBJS := $(addprefix $(obj),$(SOBJS))
$(LIB): $(obj).depend $(OBJS)
$(AR) $(ARFLAGS) $@ $(OBJS)
clean:
rm -f $(SOBJS) $(OBJS)
distclean: clean
rm -f $(LIB) core *.bak $(obj).depend
#########################################################################
# defines $(obj).depend target
include $(SRCTREE)/rules.mk
sinclude $(obj).depend
#########################################################################

194
board/esd/vme8349/caddy.c Normal file
View File

@ -0,0 +1,194 @@
/*
* caddy.c -- esd VME8349 support for "missing" access modes in TSI148.
* Copyright (c) 2009 esd gmbh.
*
* Reinhard Arlt <reinhard.arlt@esd-electronics.com>
*
* See file CREDITS for list of people who contributed to this
* project.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*/
#include <common.h>
#include <ioports.h>
#include <mpc83xx.h>
#include <asm/mpc8349_pci.h>
#include <pci.h>
#include <asm/mmu.h>
#include <asm/io.h>
#include "caddy.h"
static struct caddy_interface *caddy_interface;
void generate_answer(struct caddy_cmd *cmd, uint32_t status, uint32_t *result)
{
struct caddy_answer *answer;
uint32_t ptr;
answer = &caddy_interface->answer[caddy_interface->answer_in];
memset((void *)answer, 0, sizeof(struct caddy_answer));
answer->answer = cmd->cmd;
answer->issue = cmd->issue;
answer->status = status;
memcpy(answer->par, result, 5 * sizeof(result[0]));
ptr = caddy_interface->answer_in + 1;
ptr = ptr & (ANSWER_SIZE - 1);
if (ptr != caddy_interface->answer_out)
caddy_interface->answer_in = ptr;
}
int do_caddy(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
{
unsigned long base_addr;
uint32_t ptr;
struct caddy_cmd *caddy_cmd;
uint32_t result[5];
uint16_t data16;
uint8_t data8;
uint32_t status;
pci_dev_t dev;
void *pci_ptr;
if (argc < 2) {
puts("Missing parameter\n");
return 1;
}
base_addr = simple_strtoul(argv[1], NULL, 16);
caddy_interface = (struct caddy_interface *) base_addr;
memset((void *)caddy_interface, 0, sizeof(struct caddy_interface));
memcpy((void *)&caddy_interface->magic[0], &CADDY_MAGIC, 16);
while (ctrlc() == 0) {
if (caddy_interface->cmd_in != caddy_interface->cmd_out) {
memset(result, 0, 5 * sizeof(result[0]));
status = 0;
caddy_cmd = &caddy_interface->cmd[caddy_interface->cmd_out];
pci_ptr = (void *)CONFIG_SYS_PCI1_IO_PHYS +
(caddy_cmd->addr & 0x001fffff);
switch (caddy_cmd->cmd) {
case CADDY_CMD_IO_READ_8:
result[0] = in_8(pci_ptr);
break;
case CADDY_CMD_IO_READ_16:
result[0] = in_be16(pci_ptr);
break;
case CADDY_CMD_IO_READ_32:
result[0] = in_be32(pci_ptr);
break;
case CADDY_CMD_IO_WRITE_8:
data8 = caddy_cmd->par[0] & 0x000000ff;
out_8(pci_ptr, data8);
break;
case CADDY_CMD_IO_WRITE_16:
data16 = caddy_cmd->par[0] & 0x0000ffff;
out_be16(pci_ptr, data16);
break;
case CADDY_CMD_IO_WRITE_32:
out_be32(pci_ptr, caddy_cmd->par[0]);
break;
case CADDY_CMD_CONFIG_READ_8:
dev = PCI_BDF(caddy_cmd->par[0],
caddy_cmd->par[1],
caddy_cmd->par[2]);
status = pci_read_config_byte(dev,
caddy_cmd->addr,
&data8);
result[0] = data8;
break;
case CADDY_CMD_CONFIG_READ_16:
dev = PCI_BDF(caddy_cmd->par[0],
caddy_cmd->par[1],
caddy_cmd->par[2]);
status = pci_read_config_word(dev,
caddy_cmd->addr,
&data16);
result[0] = data16;
break;
case CADDY_CMD_CONFIG_READ_32:
dev = PCI_BDF(caddy_cmd->par[0],
caddy_cmd->par[1],
caddy_cmd->par[2]);
status = pci_read_config_dword(dev,
caddy_cmd->addr,
&result[0]);
break;
case CADDY_CMD_CONFIG_WRITE_8:
dev = PCI_BDF(caddy_cmd->par[0],
caddy_cmd->par[1],
caddy_cmd->par[2]);
data8 = caddy_cmd->par[3] & 0x000000ff;
status = pci_write_config_byte(dev,
caddy_cmd->addr,
data8);
break;
case CADDY_CMD_CONFIG_WRITE_16:
dev = PCI_BDF(caddy_cmd->par[0],
caddy_cmd->par[1],
caddy_cmd->par[2]);
data16 = caddy_cmd->par[3] & 0x0000ffff;
status = pci_write_config_word(dev,
caddy_cmd->addr,
data16);
break;
case CADDY_CMD_CONFIG_WRITE_32:
dev = PCI_BDF(caddy_cmd->par[0],
caddy_cmd->par[1],
caddy_cmd->par[2]);
status = pci_write_config_dword(dev,
caddy_cmd->addr,
caddy_cmd->par[3]);
break;
default:
status = 0xffffffff;
break;
}
generate_answer(caddy_cmd, status, &result[0]);
ptr = caddy_interface->cmd_out + 1;
ptr = ptr & (CMD_SIZE - 1);
caddy_interface->cmd_out = ptr;
}
caddy_interface->heartbeat++;
}
return 0;
}
U_BOOT_CMD(
caddy, 2, 0, do_caddy,
"Start Caddy server.",
"Start Caddy server with Data structure a given addr\n"
);

77
board/esd/vme8349/caddy.h Normal file
View File

@ -0,0 +1,77 @@
/*
* caddy.c -- esd VME8349 support for "missing" access modes in TSI148.
* Copyright (c) 2009 esd gmbh.
*
* Reinhard Arlt <reinhard.arlt@esd-electronics.com>
*
* See file CREDITS for list of people who contributed to this
* project.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*/
#ifndef __CADDY_H__
#define __CADDY_H__
#define CMD_SIZE 1024
#define ANSWER_SIZE 1024
#define CADDY_MAGIC "esd vme8349 V1.0"
enum caddy_cmds {
CADDY_CMD_IO_READ_8,
CADDY_CMD_IO_READ_16,
CADDY_CMD_IO_READ_32,
CADDY_CMD_IO_WRITE_8,
CADDY_CMD_IO_WRITE_16,
CADDY_CMD_IO_WRITE_32,
CADDY_CMD_CONFIG_READ_8,
CADDY_CMD_CONFIG_READ_16,
CADDY_CMD_CONFIG_READ_32,
CADDY_CMD_CONFIG_WRITE_8,
CADDY_CMD_CONFIG_WRITE_16,
CADDY_CMD_CONFIG_WRITE_32,
};
struct caddy_cmd {
uint32_t cmd;
uint32_t issue;
uint32_t addr;
uint32_t par[5];
};
struct caddy_answer {
uint32_t answer;
uint32_t issue;
uint32_t status;
uint32_t par[5];
};
struct caddy_interface {
uint8_t magic[16];
uint32_t cmd_in;
uint32_t cmd_out;
uint32_t heartbeat;
uint32_t reserved1;
struct caddy_cmd cmd[CMD_SIZE];
uint32_t answer_in;
uint32_t answer_out;
uint32_t reserved2;
uint32_t reserved3;
struct caddy_answer answer[CMD_SIZE];
};
#endif /* of __CADDY_H__ */

View File

@ -1,6 +1,6 @@
#
# (C) Copyright 2002
# Gary Jennejohn, DENX Software Engineering, <garyj@denx.de>
# (C) Copyright 2006
# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
#
# See file CREDITS for list of people who contributed to this
# project.
@ -20,17 +20,9 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
# MA 02111-1307 USA
#
PLATFORM_RELFLAGS += -fno-strict-aliasing -fno-common -ffixed-r8 \
-msoft-float
# Make ARMv5 to allow more compilers to work, even though its v7a.
PLATFORM_CPPFLAGS += -march=armv5
# =========================================================================
#
# Supply options according to compiler version
# VME8349E
#
# =========================================================================
PLATFORM_CPPFLAGS +=$(call cc-option)
PLATFORM_CPPFLAGS +=$(call cc-option,-mno-thumb-interwork,)
PLATFORM_RELFLAGS +=$(call cc-option,-mshort-load-bytes,\
$(call cc-option,-malignment-traps,))
TEXT_BASE = 0xFFF00000

119
board/esd/vme8349/pci.c Normal file
View File

@ -0,0 +1,119 @@
/*
* pci.c -- esd VME8349 PCI board support.
* Copyright (c) 2006 Wind River Systems, Inc.
* Copyright (C) 2006-2009 Freescale Semiconductor, Inc.
*
* Based on MPC8349 PCI support but w/o PIB related code.
*
* See file CREDITS for list of people who contributed to this
* project.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*/
#include <asm/mmu.h>
#include <asm/io.h>
#include <common.h>
#include <mpc83xx.h>
#include <pci.h>
#include <i2c.h>
#include <asm/fsl_i2c.h>
DECLARE_GLOBAL_DATA_PTR;
static struct pci_region pci1_regions[] = {
{
bus_start: CONFIG_SYS_PCI1_MEM_BASE,
phys_start: CONFIG_SYS_PCI1_MEM_PHYS,
size: CONFIG_SYS_PCI1_MEM_SIZE,
flags: PCI_REGION_MEM | PCI_REGION_PREFETCH
},
{
bus_start: CONFIG_SYS_PCI1_IO_BASE,
phys_start: CONFIG_SYS_PCI1_IO_PHYS,
size: CONFIG_SYS_PCI1_IO_SIZE,
flags: PCI_REGION_IO
},
{
bus_start: CONFIG_SYS_PCI1_MMIO_BASE,
phys_start: CONFIG_SYS_PCI1_MMIO_PHYS,
size: CONFIG_SYS_PCI1_MMIO_SIZE,
flags: PCI_REGION_MEM
},
};
/*
* pci_init_board()
*
* NOTICE: PCI2 is not supported. There is only one
* physical PCI slot on the board.
*
*/
void
pci_init_board(void)
{
volatile immap_t *immr = (volatile immap_t *)CONFIG_SYS_IMMR;
volatile clk83xx_t *clk = (volatile clk83xx_t *)&immr->clk;
volatile law83xx_t *pci_law = immr->sysconf.pcilaw;
struct pci_region *reg[] = { pci1_regions };
u8 reg8;
int monarch = 0;
i2c_set_bus_num(1);
/* Read the PCI_M66EN jumper setting */
if ((i2c_read(CONFIG_SYS_I2C_8574_ADDR2, 0, 0, &reg8, 1) == 0) ||
(i2c_read(0x38 , 0, 0, &reg8, 1) == 0)) {
if (reg8 & 0x40) {
clk->occr = 0xff000000; /* 66 MHz PCI */
printf("PCI: 66MHz\n");
} else {
clk->occr = 0xffff0003; /* 33 MHz PCI */
printf("PCI: 33MHz\n");
}
if (((reg8 & 0x01) == 0) || ((reg8 & 0x02) == 0))
monarch = 1;
} else {
clk->occr = 0xffff0003; /* 33 MHz PCI */
printf("PCI: 33MHz (I2C read failed)\n");
}
udelay(2000);
/*
* Assert/deassert PCI reset
*/
setbits_be32(&immr->gpio[0].dat, 0x00800000);
setbits_be32(&immr->gpio[0].dir, 0x00800000);
setbits_be32(&immr->gpio[1].dir, 0x08800000);
udelay(200);
setbits_be32(&immr->gpio[1].dat, 0x08000000);
udelay(200);
setbits_be32(&immr->gpio[1].dat, 0x08800000);
udelay(600000);
clrbits_be32(&immr->gpio[1].dat, 0x00100000);
/* Configure PCI Local Access Windows */
pci_law[0].bar = CONFIG_SYS_PCI1_MEM_PHYS & LAWBAR_BAR;
pci_law[0].ar = LAWAR_EN | LAWAR_SIZE_1G;
pci_law[1].bar = CONFIG_SYS_PCI1_IO_PHYS & LAWBAR_BAR;
pci_law[1].ar = LAWAR_EN | LAWAR_SIZE_4M;
udelay(2000);
if (monarch == 0)
mpc83xx_pci_init(1, reg, 0);
}

140
board/esd/vme8349/vme8349.c Normal file
View File

@ -0,0 +1,140 @@
/*
* vme8349.c -- esd VME8349 board support
*
* Copyright (c) 2008-2009 esd gmbh.
*
* (C) Copyright 2006
* Wolfgang Denk, DENX Software Engineering, wd@denx.de.
*
* Reinhard Arlt <reinhard.arlt@esd-electronics.com>
* Based on board/mpc8349emds/mpc8349emds.c (and previous 834x releases.)
*
* See file CREDITS for list of people who contributed to this
* project.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*/
#include <common.h>
#include <ioports.h>
#include <mpc83xx.h>
#include <asm/mpc8349_pci.h>
#if defined(CONFIG_OF_LIBFDT)
#include <libfdt.h>
#endif
#include <asm/io.h>
#include <asm/mmu.h>
void ddr_enable_ecc(unsigned int dram_size);
int fixed_sdram(void)
{
volatile immap_t *im = (immap_t *)CONFIG_SYS_IMMR;
u32 msize = 0;
u32 ddr_size;
u32 ddr_size_log2;
msize = CONFIG_SYS_DDR_SIZE;
for (ddr_size = msize << 20, ddr_size_log2 = 0;
(ddr_size > 1);
ddr_size = ddr_size>>1, ddr_size_log2++) {
if (ddr_size & 1)
return -1;
}
im->sysconf.ddrlaw[0].bar = CONFIG_SYS_DDR_SDRAM_BASE & 0xfffff000;
im->sysconf.ddrlaw[0].ar = LAWAR_EN | ((ddr_size_log2 - 1) &
LAWAR_SIZE);
#if (CONFIG_SYS_DDR_SIZE == 512)
im->ddr.csbnds[0].csbnds = 0x0000001f;
#else
#warning Currently any DDR size other than 512MiB is not supported
#endif
im->ddr.cs_config[0] = CONFIG_SYS_DDR_CONFIG | 0x00330000;
/* currently we use only one CS, so disable the other banks */
im->ddr.csbnds[1].csbnds = 0x00000000;
im->ddr.csbnds[2].csbnds = 0x00000000;
im->ddr.csbnds[3].csbnds = 0x00000000;
im->ddr.cs_config[1] = 0;
im->ddr.cs_config[2] = 0;
im->ddr.cs_config[3] = 0;
im->ddr.timing_cfg_0 = CONFIG_SYS_DDR_TIMING_0;
im->ddr.timing_cfg_1 = CONFIG_SYS_DDR_TIMING_1;
im->ddr.timing_cfg_2 = CONFIG_SYS_DDR_TIMING_2;
im->ddr.timing_cfg_3 = CONFIG_SYS_DDR_TIMING_3;
im->ddr.sdram_cfg = CONFIG_SYS_DDR_SDRAM_CFG;
im->ddr.sdram_cfg2 = CONFIG_SYS_DDR_SDRAM_CFG2;
im->ddr.sdram_mode = CONFIG_SYS_DDR_MODE;
im->ddr.sdram_mode2 = CONFIG_SYS_DDR_MODE2;
im->ddr.sdram_interval = CONFIG_SYS_DDR_INTERVAL;
sync();
udelay(200);
/* enable DDR controller */
im->ddr.sdram_cfg |= SDRAM_CFG_MEM_EN;
return msize;
}
phys_size_t initdram(int board_type)
{
volatile immap_t *im = (immap_t *)CONFIG_SYS_IMMR;
u32 msize = 0;
if ((im->sysconf.immrbar & IMMRBAR_BASE_ADDR) != (u32)im)
return -1;
/* DDR SDRAM - Main SODIMM */
im->sysconf.ddrlaw[0].bar = CONFIG_SYS_DDR_BASE & LAWBAR_BAR;
msize = fixed_sdram();
#if defined(CONFIG_DDR_ECC) && !defined(CONFIG_ECC_INIT_VIA_DDRCONTROLLER)
/*
* Initialize and enable DDR ECC.
*/
ddr_enable_ecc(msize * 1024 * 1024);
#endif
/* Now check memory size (after ECC is initialized) */
msize = get_ram_size(0, msize);
/* return total bus SDRAM size(bytes) -- DDR */
return msize * 1024 * 1024;
}
int checkboard(void)
{
puts("Board: esd VME8349\n");
return 0;
}
#if defined(CONFIG_OF_BOARD_SETUP)
void ft_board_setup(void *blob, bd_t *bd)
{
ft_cpu_setup(blob, bd);
#ifdef CONFIG_PCI
ft_pci_setup(blob, bd);
#endif
}
#endif

View File

@ -1,4 +1,6 @@
/*----------------------------------------------------------------------+
* This source code is dual-licensed. You may use it under the terms of
* the GNU General Public License version 2, or under the license below.
*
* This source code has been made available to you by IBM on an AS-IS
* basis. Anyone receiving this source is licensed under IBM

View File

@ -0,0 +1,44 @@
#
# (C) Copyright 2000-2003
# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
#
# See file CREDITS for list of people who contributed to this
# project.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 2 of
# the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
# MA 02111-1307 USA
#
include $(TOPDIR)/config.mk
LIB = $(obj)lib$(BOARD).a
COBJS = $(BOARD).o
SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
OBJS := $(addprefix $(obj),$(COBJS))
SOBJS := $(addprefix $(obj),$(SOBJS))
$(LIB): $(obj).depend $(OBJS)
$(AR) $(ARFLAGS) $@ $(OBJS)
#########################################################################
# defines $(obj).depend target
include $(SRCTREE)/rules.mk
sinclude $(obj).depend
#########################################################################

View File

@ -0,0 +1,25 @@
#
# (C) Copyright 2000-2003
# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
# Coldfire contribution by Bernhard Kuhn <bkuhn@metrowerks.com>
#
# See file CREDITS for list of people who contributed to this
# project.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 2 of
# the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
# MA 02111-1307 USA
#
TEXT_BASE = 0

View File

@ -0,0 +1,94 @@
/*
* (C) Copyright 2000-2003
* Wolfgang Denk, DENX Software Engineering, wd@denx.de.
*
* Copyright (C) 2004-2008 Freescale Semiconductor, Inc.
* TsiChung Liew (Tsi-Chung.Liew@freescale.com)
*
* See file CREDITS for list of people who contributed to this
* project.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*/
#include <config.h>
#include <common.h>
#include <asm/immap.h>
DECLARE_GLOBAL_DATA_PTR;
int checkboard(void)
{
puts("Board: ");
puts("Freescale M5208EVBe\n");
return 0;
};
phys_size_t initdram(int board_type)
{
volatile sdram_t *sdram = (volatile sdram_t *)(MMAP_SDRAM);
u32 dramsize, i;
dramsize = CONFIG_SYS_SDRAM_SIZE * 0x100000;
for (i = 0x13; i < 0x20; i++) {
if (dramsize == (1 << i))
break;
}
i--;
sdram->cs0 = (CONFIG_SYS_SDRAM_BASE | i);
#ifdef CONFIG_SYS_SDRAM_BASE1
sdram->cs1 = (CONFIG_SYS_SDRAM_BASE | i);
#endif
sdram->cfg1 = CONFIG_SYS_SDRAM_CFG1;
sdram->cfg2 = CONFIG_SYS_SDRAM_CFG2;
udelay(500);
/* Issue PALL */
sdram->ctrl = (CONFIG_SYS_SDRAM_CTRL | 2);
asm("nop");
/* Perform two refresh cycles */
sdram->ctrl = CONFIG_SYS_SDRAM_CTRL | 4;
sdram->ctrl = CONFIG_SYS_SDRAM_CTRL | 4;
asm("nop");
/* Issue LEMR */
sdram->mode = CONFIG_SYS_SDRAM_MODE;
asm("nop");
sdram->mode = CONFIG_SYS_SDRAM_EMOD;
asm("nop");
sdram->ctrl = (CONFIG_SYS_SDRAM_CTRL | 2);
asm("nop");
sdram->ctrl = (CONFIG_SYS_SDRAM_CTRL & ~0x80000000) | 0x10000F00;
asm("nop");
udelay(100);
return dramsize;
};
int testdram(void)
{
/* TODO: XXX XXX XXX */
printf("DRAM test not implemented!\n");
return (0);
}

View File

@ -0,0 +1,142 @@
/*
* (C) Copyright 2000
* Wolfgang Denk, DENX Software Engineering, wd@denx.de.
*
* See file CREDITS for list of people who contributed to this
* project.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*/
OUTPUT_ARCH(m68k)
/* Do we need any of these for elf?
__DYNAMIC = 0; */
SECTIONS
{
/* Read-only sections, merged into text segment: */
. = + SIZEOF_HEADERS;
.interp : { *(.interp) }
.hash : { *(.hash) }
.dynsym : { *(.dynsym) }
.dynstr : { *(.dynstr) }
.rel.text : { *(.rel.text) }
.rela.text : { *(.rela.text) }
.rel.data : { *(.rel.data) }
.rela.data : { *(.rela.data) }
.rel.rodata : { *(.rel.rodata) }
.rela.rodata : { *(.rela.rodata) }
.rel.got : { *(.rel.got) }
.rela.got : { *(.rela.got) }
.rel.ctors : { *(.rel.ctors) }
.rela.ctors : { *(.rela.ctors) }
.rel.dtors : { *(.rel.dtors) }
.rela.dtors : { *(.rela.dtors) }
.rel.bss : { *(.rel.bss) }
.rela.bss : { *(.rela.bss) }
.rel.plt : { *(.rel.plt) }
.rela.plt : { *(.rela.plt) }
.init : { *(.init) }
.plt : { *(.plt) }
.text :
{
/* WARNING - the following is hand-optimized to fit within */
/* the sector layout of our flash chips! XXX FIXME XXX */
cpu/mcf52x2/start.o (.text)
cpu/mcf52x2/libmcf52x2.a (.text)
lib_m68k/libm68k.a (.text)
common/dlmalloc.o (.text)
. = DEFINED(env_offset) ? env_offset : .;
common/env_embedded.o (.text)
*(.text)
*(.fixup)
*(.got1)
}
_etext = .;
PROVIDE (etext = .);
.rodata :
{
*(.rodata)
*(.rodata1)
}
.fini : { *(.fini) } =0
.ctors : { *(.ctors) }
.dtors : { *(.dtors) }
/* Read-write section, merged into data segment: */
. = (. + 0x00FF) & 0xFFFFFF00;
_erotext = .;
PROVIDE (erotext = .);
.reloc :
{
__got_start = .;
*(.got)
__got_end = .;
_GOT2_TABLE_ = .;
*(.got2)
_FIXUP_TABLE_ = .;
*(.fixup)
}
__got2_entries = (_FIXUP_TABLE_ - _GOT2_TABLE_) >>2;
__fixup_entries = (. - _FIXUP_TABLE_)>>2;
.data :
{
*(.data)
*(.data1)
*(.sdata)
*(.sdata2)
*(.dynamic)
CONSTRUCTORS
}
_edata = .;
PROVIDE (edata = .);
. = .;
__u_boot_cmd_start = .;
.u_boot_cmd : { *(.u_boot_cmd) }
__u_boot_cmd_end = .;
. = .;
__start___ex_table = .;
__ex_table : { *(__ex_table) }
__stop___ex_table = .;
. = ALIGN(256);
__init_begin = .;
.text.init : { *(.text.init) }
.data.init : { *(.data.init) }
. = ALIGN(256);
__init_end = .;
__bss_start = .;
.bss (NOLOAD) :
{
_sbss = .;
*(.sbss) *(.scommon)
*(.dynbss)
*(.bss)
*(COMMON)
. = ALIGN(4);
_ebss = .;
}
_end = . ;
PROVIDE (end = .);
}

View File

@ -56,10 +56,13 @@ SECTIONS
/* the sector layout of our flash chips! XXX FIXME XXX */
cpu/mcf5445x/start.o (.text)
lib_m68k/traps.o (.text)
lib_m68k/interrupts.o (.text)
cpu/mcf5445x/libmcf5445x.a (.text)
lib_m68k/libm68k.a (.text)
common/cmd_flash.o (.text)
common/dlmalloc.o (.text)
lib_generic/zlib.o (.text)
common/main.o (.text)
common/image.o (.text)
lib_generic/libgeneric.a (.text)
. = DEFINED(env_offset) ? env_offset : .;
common/env_embedded.o (.text)

View File

@ -1,5 +1,5 @@
#
# Copyright (C) Freescale Semiconductor, Inc. 2006. All rights reserved.
# Copyright (C) Freescale Semiconductor, Inc. 2006.
#
# See file CREDITS for list of people who contributed to this
# project.

View File

@ -1,5 +1,5 @@
#
# Copyright (C) Freescale Semiconductor, Inc. 2006. All rights reserved.
# Copyright (C) Freescale Semiconductor, Inc. 2006.
#
# See file CREDITS for list of people who contributed to this
# project.

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) Freescale Semiconductor, Inc. 2006. All rights reserved.
* Copyright (C) Freescale Semiconductor, Inc. 2006.
*
* See file CREDITS for list of people who contributed to this
* project.

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2009 Freescale Semiconductor, Inc. All rights reserved.
* Copyright (C) 2009 Freescale Semiconductor, Inc.
*
* See file CREDITS for list of people who contributed to this
* project.

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2009 Freescale Semiconductor, Inc. All rights reserved.
* Copyright (C) 2009 Freescale Semiconductor, Inc.
*
* See file CREDITS for list of people who contributed to this
* project.

View File

@ -1,5 +1,5 @@
#
# Copyright (C) 2009 Freescale Semiconductor, Inc. All rights reserved.
# Copyright (C) 2009 Freescale Semiconductor, Inc.
#
# See file CREDITS for list of people who contributed to this
# project.

View File

@ -0,0 +1,53 @@
#
# (C) Copyright 2008
# Stefan Roese, DENX Software Engineering, sr@denx.de.
#
# See file CREDITS for list of people who contributed to this
# project.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 2 of
# the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
# MA 02111-1307 USA
#
include $(TOPDIR)/config.mk
LIB = $(obj)lib$(BOARD).a
COBJS-y := $(BOARD).o
COBJS-$(CONFIG_CMD_CHIP_CONFIG) += chip_config.o
SOBJS := init.o
COBJS := $(COBJS-y)
SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
OBJS := $(addprefix $(obj),$(COBJS))
SOBJS := $(addprefix $(obj),$(SOBJS))
$(LIB): $(OBJS) $(SOBJS)
$(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS)
clean:
rm -f $(SOBJS) $(OBJS)
distclean: clean
rm -f $(LIB) core *.bak $(obj).depend
#########################################################################
# defines $(obj).depend target
include $(SRCTREE)/rules.mk
sinclude $(obj).depend
#########################################################################

View File

@ -0,0 +1,87 @@
/*
* (C) Copyright 2008-2009
* Stefan Roese, DENX Software Engineering, sr@denx.de.
*
* See file CREDITS for list of people who contributed to this
* project.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*/
#include <common.h>
#include <asm/ppc4xx_config.h>
struct ppc4xx_config ppc4xx_config_val[] = {
{
"600-nor", "NOR CPU: 600 PLB: 200 OPB: 100 EBC: 100",
{
0x86, 0x80, 0xce, 0x1f, 0x79, 0x80, 0x00, 0xa0,
0x40, 0x08, 0x23, 0x50, 0x0d, 0x05, 0x00, 0x00
}
},
{
"600-nand", "NAND CPU: 600 PLB: 200 OPB: 100 EBC: 100",
{
0x86, 0x80, 0xce, 0x1f, 0x79, 0x90, 0x01, 0xa0,
0xa0, 0xe8, 0x23, 0x58, 0x0d, 0x05, 0x00, 0x00
}
},
{
"800-nor", "NOR CPU: 800 PLB: 200 OPB: 100 EBC: 100",
{
0x86, 0x80, 0xba, 0x14, 0x99, 0x80, 0x00, 0xa0,
0x40, 0x08, 0x23, 0x50, 0x0d, 0x05, 0x00, 0x00
}
},
{
"800-nand", "NAND CPU: 800 PLB: 200 OPB: 100 EBC: 100",
{
0x86, 0x80, 0xba, 0x14, 0x99, 0x90, 0x01, 0xa0,
0xa0, 0xe8, 0x23, 0x58, 0x0d, 0x05, 0x00, 0x00
}
},
{
"1000-nor", "NOR CPU:1000 PLB: 200 OPB: 100 EBC: 100",
{
0x86, 0x82, 0x96, 0x19, 0xb9, 0x80, 0x00, 0xa0,
0x40, 0x08, 0x23, 0x50, 0x0d, 0x05, 0x00, 0x00
}
},
{
"1000-nand", "NAND CPU:1000 PLB: 200 OPB: 100 EBC: 100",
{
0x86, 0x82, 0x96, 0x19, 0xb9, 0x90, 0x01, 0xa0,
0xa0, 0xe8, 0x23, 0x58, 0x0d, 0x05, 0x00, 0x00
}
},
{
"1066-nor", "NOR CPU:1066 PLB: 266 OPB: 88 EBC: 88",
{
0x86, 0x80, 0xb3, 0x01, 0x9d, 0x80, 0x00, 0xa0,
0x40, 0x08, 0x23, 0x50, 0x0d, 0x05, 0x00, 0x00
}
},
{
"1066-nand", "NAND CPU:1066 PLB: 266 OPB: 88 EBC: 88",
{
0x86, 0x80, 0xb3, 0x01, 0x9d, 0x90, 0x01, 0xa0,
0xa0, 0xe8, 0x23, 0x58, 0x0d, 0x05, 0x00, 0x00
}
},
};
int ppc4xx_config_count = ARRAY_SIZE(ppc4xx_config_val);

View File

@ -0,0 +1,289 @@
/*
* (C) Copyright 2009
* Dirk Eibach, Guntermann & Drunck GmbH, eibach@gdsys.de
*
* Based on board/amcc/canyonlands/canyonlands.c
* (C) Copyright 2008
* Stefan Roese, DENX Software Engineering, sr@denx.de.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*/
#include <common.h>
#include <ppc440.h>
#include <libfdt.h>
#include <fdt_support.h>
#include <i2c.h>
#include <asm/processor.h>
#include <asm/io.h>
#include <asm/mmu.h>
#include <asm/4xx_pcie.h>
#include <asm/gpio.h>
extern flash_info_t flash_info[CONFIG_SYS_MAX_FLASH_BANKS];
DECLARE_GLOBAL_DATA_PTR;
#define CONFIG_SYS_BCSR3_PCIE 0x10
int board_early_init_f(void)
{
/*
* Setup the interrupt controller polarities, triggers, etc.
*/
mtdcr(uic0sr, 0xffffffff); /* clear all */
mtdcr(uic0er, 0x00000000); /* disable all */
mtdcr(uic0cr, 0x00000005); /* ATI & UIC1 crit are critical */
mtdcr(uic0pr, 0xffffffff); /* per ref-board manual */
mtdcr(uic0tr, 0x00000000); /* per ref-board manual */
mtdcr(uic0vr, 0x00000000); /* int31 highest, base=0x000 */
mtdcr(uic0sr, 0xffffffff); /* clear all */
mtdcr(uic1sr, 0xffffffff); /* clear all */
mtdcr(uic1er, 0x00000000); /* disable all */
mtdcr(uic1cr, 0x00000000); /* all non-critical */
mtdcr(uic1pr, 0xffffffff); /* per ref-board manual */
mtdcr(uic1tr, 0x00000000); /* per ref-board manual */
mtdcr(uic1vr, 0x00000000); /* int31 highest, base=0x000 */
mtdcr(uic1sr, 0xffffffff); /* clear all */
mtdcr(uic2sr, 0xffffffff); /* clear all */
mtdcr(uic2er, 0x00000000); /* disable all */
mtdcr(uic2cr, 0x00000000); /* all non-critical */
mtdcr(uic2pr, 0xffffffff); /* per ref-board manual */
mtdcr(uic2tr, 0x00000000); /* per ref-board manual */
mtdcr(uic2vr, 0x00000000); /* int31 highest, base=0x000 */
mtdcr(uic2sr, 0xffffffff); /* clear all */
mtdcr(uic3sr, 0xffffffff); /* clear all */
mtdcr(uic3er, 0x00000000); /* disable all */
mtdcr(uic3cr, 0x00000000); /* all non-critical */
mtdcr(uic3pr, 0xffffffff); /* per ref-board manual */
mtdcr(uic3tr, 0x00000000); /* per ref-board manual */
mtdcr(uic3vr, 0x00000000); /* int31 highest, base=0x000 */
mtdcr(uic3sr, 0xffffffff); /* clear all */
/*
* Configure PFC (Pin Function Control) registers
* enable GPIO 49-63
* UART0: 4 pins
*/
mtsdr(SDR0_PFC0, 0x00007fff);
mtsdr(SDR0_PFC1, 0x00040000);
/* Enable PCI host functionality in SDR0_PCI0 */
mtsdr(SDR0_PCI0, 0xe0000000);
mtsdr(SDR0_SRST1, 0); /* Pull AHB out of reset default=1 */
/* Setup PLB4-AHB bridge based on the system address map */
mtdcr(AHB_TOP, 0x8000004B);
mtdcr(AHB_BOT, 0x8000004B);
/*
* Configure USB-STP pins as alternate and not GPIO
* It seems to be neccessary to configure the STP pins as GPIO
* input at powerup (perhaps while USB reset is asserted). So
* we configure those pins to their "real" function now.
*/
gpio_config(16, GPIO_OUT, GPIO_ALT1, GPIO_OUT_1);
gpio_config(19, GPIO_OUT, GPIO_ALT1, GPIO_OUT_1);
/* Trigger board component reset */
out_le16((void *)CONFIG_SYS_IO_BASE, 0xffff);
out_le16((void *)CONFIG_SYS_IO_BASE + 0x100, 0xffff);
udelay(50);
out_le16((void *)CONFIG_SYS_IO_BASE, 0xffbf);
out_le16((void *)CONFIG_SYS_IO_BASE + 0x100, 0xffbf);
udelay(50);
out_le16((void *)CONFIG_SYS_IO_BASE, 0xffff);
out_le16((void *)CONFIG_SYS_IO_BASE + 0x100, 0xffff);
return 0;
}
int get_cpu_num(void)
{
int cpu = NA_OR_UNKNOWN_CPU;
return cpu;
}
int checkboard(void)
{
char *s = getenv("serial#");
#ifdef CONFIG_DEVCONCENTER
printf("Board: DevCon-Center");
#else
printf("Board: CompactCenter");
#endif
if (s != NULL) {
puts(", serial# ");
puts(s);
}
putc('\n');
return 0;
}
/*
* pci_target_init
*
* The bootstrap configuration provides default settings for the pci
* inbound map (PIM). But the bootstrap config choices are limited and
* may not be sufficient for a given board.
*/
#if defined(CONFIG_PCI) && defined(CONFIG_SYS_PCI_TARGET_INIT)
void pci_target_init(struct pci_controller *hose)
{
/*
* Disable everything
*/
out_le32((void *)PCIX0_PIM0SA, 0); /* disable */
out_le32((void *)PCIX0_PIM1SA, 0); /* disable */
out_le32((void *)PCIX0_PIM2SA, 0); /* disable */
out_le32((void *)PCIX0_EROMBA, 0); /* disable expansion rom */
/*
* Map all of SDRAM to PCI address 0x0000_0000. Note that the 440
* strapping options to not support sizes such as 128/256 MB.
*/
out_le32((void *)PCIX0_PIM0LAL, CONFIG_SYS_SDRAM_BASE);
out_le32((void *)PCIX0_PIM0LAH, 0);
out_le32((void *)PCIX0_PIM0SA, ~(gd->ram_size - 1) | 1);
out_le32((void *)PCIX0_BAR0, 0);
/*
* Program the board's subsystem id/vendor id
*/
out_le16((void *)PCIX0_SBSYSVID, CONFIG_SYS_PCI_SUBSYS_VENDORID);
out_le16((void *)PCIX0_SBSYSID, CONFIG_SYS_PCI_SUBSYS_DEVICEID);
out_le16((void *)PCIX0_CMD, in16r(PCIX0_CMD) | PCI_COMMAND_MEMORY);
}
#endif /* defined(CONFIG_PCI) && defined(CONFIG_SYS_PCI_TARGET_INIT) */
#if defined(CONFIG_PCI)
/*
* is_pci_host
*
* This routine is called to determine if a pci scan should be
* performed. With various hardware environments (especially cPCI and
* PPMC) it's insufficient to depend on the state of the arbiter enable
* bit in the strap register, or generic host/adapter assumptions.
*
* Rather than hard-code a bad assumption in the general 440 code, the
* 440 pci code requires the board to decide at runtime.
*
* Return 0 for adapter mode, non-zero for host (monarch) mode.
*/
int is_pci_host(struct pci_controller *hose)
{
/* Board is always configured as host. */
return 1;
}
#endif /* CONFIG_PCI */
int board_early_init_r(void)
{
/*
* CompactCenter has 64MBytes, DevCon-Center 128MBytes of NOR FLASH
* (Spansion 29GL512), but the boot EBC mapping only supports a maximum
* of 16MBytes (4.ff00.0000 - 4.ffff.ffff).
* To solve this problem, the FLASH has to get remapped to another
* EBC address which accepts bigger regions:
*
* 0xfn00.0000 -> 4.cn00.0000
*/
u32 bxcr_bw = (CONFIG_SYS_FLASH_SIZE == 128 << 20) ?
EBC_BXCR_BS_128MB : EBC_BXCR_BS_64MB;
/* Remap the NOR FLASH to 0xcn00.0000 ... 0xcfff.ffff */
mtebc(pb0cr, CONFIG_SYS_FLASH_BASE_PHYS_L
| bxcr_bw
| EBC_BXCR_BU_RW
| EBC_BXCR_BW_16BIT);
/* Remove TLB entry of boot EBC mapping */
remove_tlb(CONFIG_SYS_BOOT_BASE_ADDR, 16 << 20);
/* Add TLB entry for 0xfn00.0000 -> 0x4.cn00.0000 */
program_tlb(CONFIG_SYS_FLASH_BASE_PHYS, CONFIG_SYS_FLASH_BASE,
CONFIG_SYS_FLASH_SIZE, TLB_WORD2_I_ENABLE);
/*
* Now accessing of the whole 64Mbytes of NOR FLASH at virtual address
* 0xfc00.0000 is possible
*/
/*
* Clear potential errors resulting from auto-calibration.
* If not done, then we could get an interrupt later on when
* exceptions are enabled.
*/
set_mcsr(get_mcsr());
return 0;
}
int misc_init_r(void)
{
u32 sdr0_srst1 = 0;
u32 eth_cfg;
/*
* Set EMAC mode/configuration (GMII, SGMII, RGMII...).
* This is board specific, so let's do it here.
*/
mfsdr(SDR0_ETH_CFG, eth_cfg);
/* disable SGMII mode */
eth_cfg &= ~(SDR0_ETH_CFG_SGMII2_ENABLE |
SDR0_ETH_CFG_SGMII1_ENABLE |
SDR0_ETH_CFG_SGMII0_ENABLE);
/* Set the for 2 RGMII mode */
/* GMC0 EMAC4_0, GMC0 EMAC4_1, RGMII Bridge 0 */
eth_cfg &= ~SDR0_ETH_CFG_GMC0_BRIDGE_SEL;
eth_cfg |= SDR0_ETH_CFG_GMC1_BRIDGE_SEL;
mtsdr(SDR0_ETH_CFG, eth_cfg);
/*
* The AHB Bridge core is held in reset after power-on or reset
* so enable it now
*/
mfsdr(SDR0_SRST1, sdr0_srst1);
sdr0_srst1 &= ~SDR0_SRST1_AHB;
mtsdr(SDR0_SRST1, sdr0_srst1);
return 0;
}
#if defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP)
extern void __ft_board_setup(void *blob, bd_t *bd);
void ft_board_setup(void *blob, bd_t *bd)
{
__ft_board_setup(blob, bd);
fdt_find_and_setprop(blob, "/plb/pciex@d00000000", "status",
"disabled", sizeof("disabled"), 1);
fdt_find_and_setprop(blob, "/plb/sata@bffd1000", "status",
"disabled", sizeof("disabled"), 1);
}
#endif /* defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP) */

View File

@ -0,0 +1,41 @@
#
# (C) Copyright 2008
# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
#
# See file CREDITS for list of people who contributed to this
# project.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 2 of
# the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
# MA 02111-1307 USA
#
#
# G&D CompactCenter
#
sinclude $(OBJTREE)/board/$(BOARDDIR)/config.tmp
ifndef TEXT_BASE
TEXT_BASE = 0xFFFA0000
endif
PLATFORM_CPPFLAGS += -DCONFIG_440=1
ifeq ($(debug),1)
PLATFORM_CPPFLAGS += -DDEBUG
endif
ifeq ($(dbcr),1)
PLATFORM_CPPFLAGS += -DCONFIG_SYS_INIT_DBCR=0x8cff0000
endif

View File

@ -0,0 +1,97 @@
/*
* (C) Copyright 2009
* Dirk Eibach, Guntermann & Drunck GmbH, eibach@gdsys.de
*
* Based on board/amcc/canyonlands/init.S
* (C) Copyright 2008
* Stefan Roese, DENX Software Engineering, sr@denx.de.
*
* See file CREDITS for list of people who contributed to this
* project.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*/
#include <ppc_asm.tmpl>
#include <config.h>
#include <asm-ppc/mmu.h>
/**************************************************************************
* TLB TABLE
*
* This table is used by the cpu boot code to setup the initial tlb
* entries. Rather than make broad assumptions in the cpu source tree,
* this table lets each board set things up however they like.
*
* Pointer to the table is returned in r1
*
*************************************************************************/
.section .bootpg,"ax"
.globl tlbtab
tlbtab:
tlbtab_start
/*
* BOOT_CS (FLASH) must be first. Before relocation SA_I can be off to
* use the speed up boot process. It is patched after relocation to
* enable SA_I
*/
tlbentry(CONFIG_SYS_BOOT_BASE_ADDR, SZ_16M, CONFIG_SYS_BOOT_BASE_ADDR,
4, AC_R|AC_W|AC_X|SA_G) /* TLB 0 */
/*
* TLB entries for SDRAM are not needed on this platform.
* They are dynamically generated in the SPD DDR(2) detection
* routine.
*/
#ifdef CONFIG_SYS_INIT_RAM_DCACHE
/* TLB-entry for init-ram in dcache (SA_I must be turned off!) */
tlbentry(CONFIG_SYS_INIT_RAM_ADDR, SZ_4K, CONFIG_SYS_INIT_RAM_ADDR,
0, AC_R|AC_W|AC_X|SA_G)
#endif
tlbentry(CONFIG_SYS_PCI_BASE, SZ_256M, 0x00000000, 0xC,
AC_R|AC_W|SA_G|SA_I)
tlbentry(CONFIG_SYS_PCI_MEMBASE, SZ_256M, 0x20000000, 0xC,
AC_R|AC_W|SA_G|SA_I)
/* TLB-entry for NVRAM */
tlbentry(CONFIG_SYS_NVRAM_BASE, SZ_1M, CONFIG_SYS_NVRAM_BASE, 4,
AC_R|AC_W|SA_G|SA_I)
/* TLB-entry for UART */
tlbentry(CONFIG_SYS_UART_BASE, SZ_16K, CONFIG_SYS_UART_BASE, 4,
AC_R|AC_W|SA_G|SA_I)
/* TLB-entry for IO */
tlbentry(CONFIG_SYS_IO_BASE, SZ_16K, CONFIG_SYS_IO_BASE, 4,
AC_R|AC_W|SA_G|SA_I)
/* TLB-entry for OCM */
tlbentry(CONFIG_SYS_OCM_BASE, SZ_1M, 0x00000000, 4,
AC_R|AC_W|AC_X|SA_I)
/* TLB-entry for Local Configuration registers => peripherals */
tlbentry(CONFIG_SYS_LOCAL_CONF_REGS, SZ_16M, CONFIG_SYS_LOCAL_CONF_REGS,
4, AC_R|AC_W|AC_X|SA_G|SA_I)
/* AHB: Internal USB Peripherals (USB, SATA) */
tlbentry(CONFIG_SYS_AHB_BASE, SZ_1M, 0xbff00000, 4,
AC_R|AC_W|AC_X|SA_G|SA_I)
tlbtab_end

View File

@ -0,0 +1,144 @@
/*
* (C) Copyright 2008
* Wolfgang Denk, DENX Software Engineering, wd@denx.de.
*
* See file CREDITS for list of people who contributed to this
* project.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*/
OUTPUT_ARCH(powerpc)
/* Do we need any of these for elf?
__DYNAMIC = 0; */
SECTIONS
{
.resetvec 0xFFFFFFFC :
{
*(.resetvec)
} = 0xffff
.bootpg 0xFFFFF000 :
{
cpu/ppc4xx/start.o (.bootpg)
} = 0xffff
/* Read-only sections, merged into text segment: */
. = + SIZEOF_HEADERS;
.interp : { *(.interp) }
.hash : { *(.hash) }
.dynsym : { *(.dynsym) }
.dynstr : { *(.dynstr) }
.rel.text : { *(.rel.text) }
.rela.text : { *(.rela.text) }
.rel.data : { *(.rel.data) }
.rela.data : { *(.rela.data) }
.rel.rodata : { *(.rel.rodata) }
.rela.rodata : { *(.rela.rodata) }
.rel.got : { *(.rel.got) }
.rela.got : { *(.rela.got) }
.rel.ctors : { *(.rel.ctors) }
.rela.ctors : { *(.rela.ctors) }
.rel.dtors : { *(.rel.dtors) }
.rela.dtors : { *(.rela.dtors) }
.rel.bss : { *(.rel.bss) }
.rela.bss : { *(.rela.bss) }
.rel.plt : { *(.rel.plt) }
.rela.plt : { *(.rela.plt) }
.init : { *(.init) }
.plt : { *(.plt) }
.text :
{
/* WARNING - the following is hand-optimized to fit within */
/* the sector layout of our flash chips! XXX FIXME XXX */
cpu/ppc4xx/start.o (.text)
board/gdsys/compactcenter/init.o (.text)
*(.text)
*(.fixup)
*(.got1)
}
_etext = .;
PROVIDE (etext = .);
.rodata :
{
*(.rodata)
*(.rodata1)
*(.rodata.str1.4)
}
.fini : { *(.fini) } =0
.ctors : { *(.ctors) }
.dtors : { *(.dtors) }
/* Read-write section, merged into data segment: */
. = (. + 0x00FF) & 0xFFFFFF00;
_erotext = .;
PROVIDE (erotext = .);
.reloc :
{
*(.got)
_GOT2_TABLE_ = .;
*(.got2)
_FIXUP_TABLE_ = .;
*(.fixup)
}
__got2_entries = (_FIXUP_TABLE_ - _GOT2_TABLE_) >>2;
__fixup_entries = (. - _FIXUP_TABLE_)>>2;
.data :
{
*(.data)
*(.data1)
*(.sdata)
*(.sdata2)
*(.dynamic)
CONSTRUCTORS
}
_edata = .;
PROVIDE (edata = .);
. = .;
__u_boot_cmd_start = .;
.u_boot_cmd : { *(.u_boot_cmd) }
__u_boot_cmd_end = .;
. = .;
__start___ex_table = .;
__ex_table : { *(__ex_table) }
__stop___ex_table = .;
. = ALIGN(256);
__init_begin = .;
.text.init : { *(.text.init) }
.data.init : { *(.data.init) }
. = ALIGN(256);
__init_end = .;
__bss_start = .;
.bss (NOLOAD) :
{
*(.sbss) *(.scommon)
*(.dynbss)
*(.bss)
*(COMMON)
. = ALIGN(4);
}
_end = . ;
PROVIDE (end = .);
}

View File

@ -1,5 +1,9 @@
/*------------------------------------------------------------------------+ */
/* */
/* This source code is dual-licensed. You may use it under the terms */
/* of the GNU General Public License version 2, or under the license */
/* below. */
/* */
/* This source code has been made available to you by IBM on an AS-IS */
/* basis. Anyone receiving this source is licensed under IBM */
/* copyrights to use it in any way he or she deems fit, including */

View File

@ -228,6 +228,7 @@ void ft_blob_update (void *blob, bd_t *bd)
len);
info = flash_get_info(CONFIG_SYS_FLASH_BASE);
size = info->size;
flash_reg[2] = cpu_to_be32 (size);
flash_reg[4] = flash_reg[2];
info = flash_get_info(CONFIG_SYS_FLASH_BASE_1);

View File

@ -12,7 +12,7 @@
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
@ -29,21 +29,21 @@ endif
LIB = $(obj)lib$(VENDOR).a
COBJS-$(CONFIG_OMAP3_BEAGLE) += power.o
COBJS-$(CONFIG_OMAP3_OVERO) += power.o
COBJS-$(CONFIG_OMAP3_PANDORA) += power.o
COBJS-$(CONFIG_OMAP3_ZOOM1) += power.o
COBJS-$(CONFIG_OMAP3_ZOOM2) += power.o
COBJS-y = mv_common.o
COBJS := $(COBJS-y)
SRCS := $(COBJS:.o=.c)
OBJS := $(addprefix $(obj),$(COBJS))
all: $(LIB)
SRCS := $(SOBJS:.o=.S) $(COBJS-y:.o=.c)
OBJS := $(addprefix $(obj),$(COBJS-y))
SOBJS := $(addprefix $(obj),$(SOBJS))
$(LIB): $(obj).depend $(OBJS)
$(AR) $(ARFLAGS) $@ $(OBJS)
clean:
rm -f $(SOBJS) $(OBJS)
distclean: clean
rm -f $(LIB) core *.bak $(obj).depend
#########################################################################
# defines $(obj).depend target

View File

@ -0,0 +1,126 @@
/*
* (C) Copyright 2008
* Andre Schwarz, Matrix Vision GmbH, andre.schwarz@matrix-vision.de
*
* See file CREDITS for list of people who contributed to this
* project.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*/
#include <common.h>
#include <malloc.h>
#include <environment.h>
#include <fpga.h>
#include <asm/io.h>
DECLARE_GLOBAL_DATA_PTR;
static char* entries_to_keep[] = {
"serial#", "ethaddr", "eth1addr", "model_info", "sensor_cnt",
"fpgadatasize", "ddr_size", "use_dhcp", "use_static_ipaddr",
"static_ipaddr", "static_netmask", "static_gateway",
"syslog", "watchdog", "netboot", "evo8serialnumber" };
#define MV_MAX_ENV_ENTRY_LENGTH 64
#define MV_KEEP_ENTRIES ARRAY_SIZE(entries_to_keep)
void mv_reset_environment(void)
{
int i;
char *s[MV_KEEP_ENTRIES];
char entries[MV_KEEP_ENTRIES][MV_MAX_ENV_ENTRY_LENGTH];
printf("\n*** RESET ENVIRONMENT ***\n");
memset(entries, 0, MV_KEEP_ENTRIES * MV_MAX_ENV_ENTRY_LENGTH);
for (i = 0; i < MV_KEEP_ENTRIES; i++) {
s[i] = getenv(entries_to_keep[i]);
if (s[i]) {
printf("save '%s' : %s\n", entries_to_keep[i], s[i]);
strncpy(entries[i], s[i], MV_MAX_ENV_ENTRY_LENGTH);
}
}
gd->env_valid = 0;
env_relocate();
for (i = 0; i < MV_KEEP_ENTRIES; i++) {
if (s[i]) {
printf("restore '%s' : %s\n", entries_to_keep[i], s[i]);
setenv(entries_to_keep[i], s[i]);
}
}
saveenv();
}
int mv_load_fpga(void)
{
int result;
size_t data_size = 0;
void *fpga_data = NULL;
char *datastr = getenv("fpgadata");
char *sizestr = getenv("fpgadatasize");
if (getenv("skip_fpga")) {
printf("found 'skip_fpga' -> FPGA _not_ loaded !\n");
return -1;
}
printf("loading FPGA\n");
if (datastr)
fpga_data = (void *)simple_strtoul(datastr, NULL, 16);
if (sizestr)
data_size = (size_t)simple_strtoul(sizestr, NULL, 16);
if (!data_size) {
printf("fpgadatasize invalid -> FPGA _not_ loaded !\n");
return -1;
}
result = fpga_load(0, fpga_data, data_size);
if (!result)
show_boot_progress(0);
return result;
}
u8 *dhcp_vendorex_prep(u8 *e)
{
char *ptr;
/* DHCP vendor-class-identifier = 60 */
if ((ptr = getenv("dhcp_vendor-class-identifier"))) {
*e++ = 60;
*e++ = strlen(ptr);
while (*ptr)
*e++ = *ptr++;
}
/* DHCP_CLIENT_IDENTIFIER = 61 */
if ((ptr = getenv("dhcp_client_id"))) {
*e++ = 61;
*e++ = strlen(ptr);
while (*ptr)
*e++ = *ptr++;
}
return e;
}
u8 *dhcp_vendorex_proc(u8 *popt)
{
return NULL;
}

View File

@ -0,0 +1,25 @@
/*
* Copyright 2008 Matrix Vision GmbH
*
* See file CREDITS for list of people who contributed to this
* project.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*/
extern int mv_load_fpga(void);
extern void mv_reset_environment(void);

View File

@ -39,6 +39,7 @@
#include <asm/io.h>
#include "fpga.h"
#include "mvbc_p.h"
#include "../common/mv_common.h"
#define SDRAM_MODE 0x00CD0000
#define SDRAM_CONTROL 0x504F0000
@ -134,23 +135,6 @@ void mvbc_init_gpio(void)
printf("sint_gpioe : 0x%08x\n", gpio->sint_gpioe);
}
void reset_environment(void)
{
char *s, sernr[64];
printf("\n*** RESET ENVIRONMENT ***\n");
memset(sernr, 0, sizeof(sernr));
s = getenv("serial#");
if (s) {
printf("found serial# : %s\n", s);
strncpy(sernr, s, 64);
}
gd->env_valid = 0;
env_relocate();
if (s)
setenv("serial#", sernr);
}
int misc_init_r(void)
{
char *s = getenv("reset_env");
@ -166,7 +150,7 @@ int misc_init_r(void)
return 0;
}
printf(" === FACTORY RESET ===\n");
reset_environment();
mv_reset_environment();
saveenv();
return -1;
@ -206,19 +190,28 @@ void flash_afterinit(ulong size)
void pci_mvbc_fixup_irq(struct pci_controller *hose, pci_dev_t dev)
{
unsigned char line = 0xff;
char *s = getenv("pci_latency");
u32 base;
u8 val = 0;
if (s)
val = simple_strtoul(s, NULL, 16);
if (PCI_BUS(dev) == 0) {
switch (PCI_DEV (dev)) {
case 0xa: /* FPGA */
line = 3;
pci_hose_read_config_dword(hose, dev, PCI_BASE_ADDRESS_0, &base);
printf("found FPA - enable arbitration\n");
printf("found FPGA - enable arbitration\n");
writel(0x03, (u32*)(base + 0x80c0));
writel(0xf0, (u32*)(base + 0x8080));
if (val)
pci_hose_write_config_byte(hose, dev, PCI_LATENCY_TIMER, val);
break;
case 0xb: /* LAN */
line = 2;
if (val)
pci_hose_write_config_byte(hose, dev, PCI_LATENCY_TIMER, val);
break;
case 0x1a:
break;
@ -234,85 +227,31 @@ struct pci_controller hose = {
fixup_irq:pci_mvbc_fixup_irq
};
int mvbc_p_load_fpga(void)
{
size_t data_size = 0;
void *fpga_data = NULL;
char *datastr = getenv("fpgadata");
char *sizestr = getenv("fpgadatasize");
if (datastr)
fpga_data = (void *)simple_strtoul(datastr, NULL, 16);
if (sizestr)
data_size = (size_t)simple_strtoul(sizestr, NULL, 16);
return fpga_load(0, fpga_data, data_size);
}
extern void pci_mpc5xxx_init(struct pci_controller *);
void pci_init_board(void)
{
char *s;
int load_fpga = 1;
mvbc_p_init_fpga();
s = getenv("skip_fpga");
if (s) {
printf("found 'skip_fpga' -> FPGA _not_ loaded !\n");
load_fpga = 0;
}
if (load_fpga) {
printf("loading FPGA ... ");
mvbc_p_load_fpga();
printf("done\n");
}
mv_load_fpga();
pci_mpc5xxx_init(&hose);
}
u8 *dhcp_vendorex_prep(u8 *e)
{
char *ptr;
/* DHCP vendor-class-identifier = 60 */
if ((ptr = getenv("dhcp_vendor-class-identifier"))) {
*e++ = 60;
*e++ = strlen(ptr);
while (*ptr)
*e++ = *ptr++;
}
/* DHCP_CLIENT_IDENTIFIER = 61 */
if ((ptr = getenv("dhcp_client_id"))) {
*e++ = 61;
*e++ = strlen(ptr);
while (*ptr)
*e++ = *ptr++;
}
return e;
}
u8 *dhcp_vendorex_proc (u8 *popt)
{
return NULL;
}
void show_boot_progress(int val)
{
struct mpc5xxx_gpio *gpio = (struct mpc5xxx_gpio*)MPC5XXX_GPIO;
switch(val) {
case 0: /* FPGA ok */
setbits_be32(&gpio->simple_dvo, 0x80);
setbits_be32(&gpio->simple_dvo, LED_G0);
break;
case 1:
setbits_be32(&gpio->simple_dvo, 0x40);
case 65:
setbits_be32(&gpio->simple_dvo, LED_G1);
break;
case 12:
setbits_be32(&gpio->simple_dvo, 0x20);
setbits_be32(&gpio->simple_dvo, LED_Y);
break;
case 15:
setbits_be32(&gpio->simple_dvo, 0x10);
setbits_be32(&gpio->simple_dvo, LED_R);
break;
default:
break;

View File

@ -23,7 +23,7 @@
#define SIMPLE_DDR (LED_G0 | LED_G1 | LED_Y | LED_R | \
FPGA_DIN | FPGA_CCLK | FPGA_CONFIG | WD_WDI)
#define SIMPLE_DVO (FPGA_CONFIG)
#define SIMPLE_ODE (FPGA_CONFIG)
#define SIMPLE_ODE (FPGA_CONFIG | LED_G0 | LED_G1 | LED_Y | LED_R)
#define SIMPLE_GPIOEN (LED_G0 | LED_G1 | LED_Y | LED_R | \
FPGA_DIN | FPGA_CCLK | FPGA_CONF_DONE | FPGA_CONFIG |\
WD_WDI | COP_PRESENT)

View File

@ -5,7 +5,7 @@ setenv bootdtb bootm \${kernel_boot} \${mv_initrd_addr_ram} \${mv_dtb_addr_ram}
setenv ramkernel setenv kernel_boot \${loadaddr}
setenv flashkernel setenv kernel_boot \${mv_kernel_addr}
setenv cpird cp \${mv_initrd_addr} \${mv_initrd_addr_ram} \${mv_initrd_length}
setenv bootfromflash run flashkernel cpird ramparam addcons e1000para bootdtb
setenv bootfromflash run flashkernel cpird ramparam addcons e1000para addprofile bootdtb
setenv getdtb tftp \${mv_dtb_addr_ram} \${dtb_name}
setenv cpdtb cp \${mv_dtb_addr} \${mv_dtb_addr_ram} 0x2000
setenv rundtb fdt addr \${mv_dtb_addr_ram}\;fdt boardsetup
@ -16,12 +16,16 @@ setenv addcons setenv bootargs \${bootargs} console=ttyPSC\${console_nr},\${baud
else
setenv addcons setenv bootargs \${bootargs} console=tty0
fi
setenv e1000para setenv bootargs \${bootargs} e1000.TxDescriptors=1500 e1000.SmartPowerDownEnable=1
setenv e1000para setenv bootargs \${bootargs} e1000.TxDescriptors=256 e1000.SmartPowerDownEnable=1
setenv set_static_ip setenv ipaddr \${static_ipaddr}
setenv set_static_nm setenv netmask \${static_netmask}
setenv set_static_gw setenv gatewayip \${static_gateway}
setenv set_ip setenv ip \${ipaddr}::\${gatewayip}:\${netmask}
setenv ramparam setenv bootargs root=/dev/ram0 ro rootfstype=squashfs
if test ${oprofile} = yes;
then
setenv addprofile setenv bootargs \${bootargs} profile=\${profile}
fi
if test ${autoscr_boot} != no;
then
if test ${netboot} = yes;
@ -31,7 +35,7 @@ then
then
echo "=== bootp succeeded -> netboot ==="
run set_ip
run getdtb rundtb bootfromnet ramparam addcons e1000para bootdtb
run getdtb rundtb bootfromnet ramparam addcons e1000para addprofile bootdtb
else
echo "=== netboot failed ==="
fi

View File

@ -1,5 +1,5 @@
#
# Copyright (C) Freescale Semiconductor, Inc. 2006. All rights reserved.
# Copyright (C) Freescale Semiconductor, Inc. 2006.
#
# See file CREDITS for list of people who contributed to this
# project.

View File

@ -1,5 +1,5 @@
#
# Copyright (C) Freescale Semiconductor, Inc. 2006. All rights reserved.
# Copyright (C) Freescale Semiconductor, Inc. 2006.
#
# See file CREDITS for list of people who contributed to this
# project.

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) Freescale Semiconductor, Inc. 2006. All rights reserved.
* Copyright (C) Freescale Semiconductor, Inc. 2006.
*
* (C) Copyright 2008
* Andre Schwarz, Matrix Vision GmbH, andre.schwarz@matrix-vision.de
@ -34,6 +34,7 @@
#include <libfdt.h>
#endif
#include "../common/mv_common.h"
#include "mvblm7.h"
int fixed_sdram(void)
@ -42,8 +43,15 @@ int fixed_sdram(void)
u32 msize = 0;
u32 ddr_size;
u32 ddr_size_log2;
char *s = getenv("ddr_size");
msize = CONFIG_SYS_DDR_SIZE;
if (s) {
u32 env_ddr_size = simple_strtoul(s, NULL, 10);
if (env_ddr_size == 512)
msize = 512;
}
for (ddr_size = msize << 20, ddr_size_log2 = 0;
(ddr_size > 1);
ddr_size = ddr_size >> 1, ddr_size_log2++) {
@ -63,14 +71,19 @@ int fixed_sdram(void)
im->ddr.sdram_cfg = CONFIG_SYS_DDR_SDRAM_CFG;
im->ddr.sdram_cfg2 = CONFIG_SYS_DDR_SDRAM_CFG2;
im->ddr.sdram_mode = CONFIG_SYS_DDR_MODE;
im->ddr.sdram_mode2 = CONFIG_SYS_DDR_MODE2;
im->ddr.sdram_interval = CONFIG_SYS_DDR_INTERVAL;
im->ddr.sdram_clk_cntl = CONFIG_SYS_DDR_CLK_CNTL;
im->ddr.sdram_clk_cntl = CONFIG_SYS_DDR_SDRAM_CLK_CNTL;
udelay(300);
asm("sync;isync");
udelay(600);
im->ddr.sdram_cfg |= SDRAM_CFG_MEM_EN;
return CONFIG_SYS_DDR_SIZE;
asm("sync;isync");
udelay(500);
return msize;
}
phys_size_t initdram(int board_type)
@ -88,6 +101,17 @@ phys_size_t initdram(int board_type)
return msize * 1024 * 1024;
}
int misc_init_r(void)
{
char *s = getenv("reset_env");
if (s) {
mv_reset_environment();
}
return 0;
}
int checkboard(void)
{
puts("Board: Matrix Vision mvBlueLYNX-M7\n");
@ -95,35 +119,6 @@ int checkboard(void)
return 0;
}
u8 *dhcp_vendorex_prep(u8 *e)
{
char *ptr;
/* DHCP vendor-class-identifier = 60 */
ptr = getenv("dhcp_vendor-class-identifier");
if (ptr) {
*e++ = 60;
*e++ = strlen(ptr);
while (*ptr)
*e++ = *ptr++;
}
/* DHCP_CLIENT_IDENTIFIER = 61 */
ptr = getenv("dhcp_client_id");
if (ptr) {
*e++ = 61;
*e++ = strlen(ptr);
while (*ptr)
*e++ = *ptr++;
}
return e;
}
u8 *dhcp_vendorex_proc(u8 *popt)
{
return NULL;
}
#ifdef CONFIG_HARD_SPI
int spi_cs_is_valid(unsigned int bus, unsigned int cs)
{

View File

@ -8,14 +8,13 @@
#define FPGA_DIN 0x20000000
#define FPGA_STATUS 0x10000000
#define FPGA_CONF_DONE 0x08000000
#define MMC_CS 0x04000000
#define WD_WDI 0x00400000
#define WD_TS 0x00200000
#define MAN_RST 0x00100000
#define MV_GPIO_DAT (WD_TS)
#define MV_GPIO_OUT (FPGA_CONFIG|FPGA_DIN|FPGA_CCLK|WD_TS|WD_WDI|MMC_CS)
#define MV_GPIO_OUT (FPGA_CONFIG|FPGA_DIN|FPGA_CCLK|MVBLM7_MMC_CS)
#define MV_GPIO_ODE (FPGA_CONFIG|MAN_RST)
#endif

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) Freescale Semiconductor, Inc. 2006. All rights reserved.
* Copyright (C) Freescale Semiconductor, Inc. 2006.
*
* (C) Copyright 2008
* Andre Schwarz, Matrix Vision GmbH, andre.schwarz@matrix-vision.de
@ -32,24 +32,10 @@
#include <fpga.h>
#include "mvblm7.h"
#include "fpga.h"
#include "../common/mv_common.h"
DECLARE_GLOBAL_DATA_PTR;
int mvblm7_load_fpga(void)
{
size_t data_size = 0;
void *fpga_data = NULL;
char *datastr = getenv("fpgadata");
char *sizestr = getenv("fpgadatasize");
if (datastr)
fpga_data = (void *)simple_strtoul(datastr, NULL, 16);
if (sizestr)
data_size = (size_t)simple_strtoul(sizestr, NULL, 16);
return fpga_load(0, fpga_data, data_size);
}
static struct pci_region pci_regions[] = {
{
bus_start: CONFIG_SYS_PCI1_MEM_BASE,
@ -73,10 +59,8 @@ static struct pci_region pci_regions[] = {
void pci_init_board(void)
{
char *s;
int i;
int warmboot;
int load_fpga;
volatile immap_t *immr;
volatile pcictrl83xx_t *pci_ctrl;
volatile gpio83xx_t *gpio;
@ -84,32 +68,23 @@ void pci_init_board(void)
volatile law83xx_t *pci_law;
struct pci_region *reg[] = { pci_regions };
load_fpga = 1;
immr = (immap_t *) CONFIG_SYS_IMMR;
clk = (clk83xx_t *) &immr->clk;
pci_ctrl = immr->pci_ctrl;
pci_law = immr->sysconf.pcilaw;
gpio = (volatile gpio83xx_t *)&immr->gpio[0];
s = getenv("skip_fpga");
if (s) {
printf("found 'skip_fpga' -> FPGA _not_ loaded !\n");
load_fpga = 0;
}
gpio->dat = MV_GPIO_DAT;
gpio->odr = MV_GPIO_ODE;
if (load_fpga)
gpio->dir = MV_GPIO_OUT;
else
gpio->dir = MV_GPIO_OUT & ~(FPGA_DIN|FPGA_CCLK);
gpio->dir = MV_GPIO_OUT;
printf("SICRH / SICRL : 0x%08x / 0x%08x\n", immr->sysconf.sicrh,
immr->sysconf.sicrl);
mvblm7_init_fpga();
if (load_fpga)
mvblm7_load_fpga();
mv_load_fpga();
gpio->dir = MV_GPIO_OUT & ~(FPGA_DIN|FPGA_CCLK);
/* Enable PCI_CLK_OUTPUTs 0 and 1 with 1:1 clocking */
clk->occr = 0xc0000000;

View File

@ -38,7 +38,7 @@
vidinfo_t panel_info = {
.vl_col = 480, /* Number of columns */
.vl_row = 272, /* Number of rows */
.vl_clk = 10000000, /* pixel clock in ps */
.vl_clk = 5000000, /* pixel clock in ps */
.vl_sync = ATMEL_LCDC_INVCLK_INVERTED |
ATMEL_LCDC_INVLINE_INVERTED |
ATMEL_LCDC_INVFRAME_INVERTED,

View File

@ -1,4 +1,6 @@
/*-----------------------------------------------------------------------------+
| This source code is dual-licensed. You may use it under the terms of
| the GNU General Public License version 2, or under the license below.
|
| This source code has been made available to you by IBM on an AS-IS
| basis. Anyone receiving this source is licensed under IBM

View File

@ -1,4 +1,6 @@
/*------------------------------------------------------------------------------+
* This source code is dual-licensed. You may use it under the terms of
* the GNU General Public License version 2, or under the license below.
*
* This source code has been made available to you by IBM on an AS-IS
* basis. Anyone receiving this source is licensed under IBM

View File

@ -1,4 +1,6 @@
/*------------------------------------------------------------------------------+
* This source code is dual-licensed. You may use it under the terms of
* the GNU General Public License version 2, or under the license below.
*
* This source code has been made available to you by IBM on an AS-IS
* basis. Anyone receiving this source is licensed under IBM

View File

@ -50,8 +50,8 @@ all: $(obj).depend $(LIB) $(obj)eeprom.srec $(obj)eeprom.bin \
$(LIB): $(OBJS) $(SOBJS)
$(AR) $(ARFLAGS) $@ $^
$(obj)eeprom.srec: $(obj)eeprom.o $(obj)eeprom_start.o
cd $(lnk) && $(LD) -T $(LDSCRIPT) -g -Ttext $(LOAD_ADDR) \
$(obj)eeprom.srec: $(obj)eeprom.o $(obj)eeprom_start.o $(obj)u-boot.lds
cd $(lnk) && $(LD) -T $(obj)u-boot.lds -g -Ttext $(LOAD_ADDR) \
-o $(<:.o=) -e eeprom eeprom.o eeprom_start.o \
-L$(obj)../../examples/standalone -lstubs \
-L$(obj)../../lib_generic -lgeneric \
@ -78,10 +78,13 @@ $(obj)crcit.o: crcit.c
$(obj)crc32.o: $(SRCTREE)/lib_generic/crc32.c
$(HOSTCC) $(HOSTCFLAGS) -DUSE_HOSTCC -o $@ -c $<
$(obj)u-boot.lds: $(LDSCRIPT)
$(CPP) $(CPPFLAGS) $(LDPPFLAGS) -ansi -D__ASSEMBLY__ -P - <$^ >$@
clean:
rm -f $(SOBJS) $(OBJS) $(obj)eeprom $(obj)eeprom.srec \
$(obj)eeprom.bin $(obj)crcek $(obj)crcek.srec \
$(obj)crcek.bin
$(obj)crcek.bin $(obj)u-boot.lds
distclean: clean
rm -f $(LIB) core *.bak $(obj).depend

View File

@ -30,6 +30,7 @@
* MA 02111-1307 USA
*/
#include <common.h>
#include <twl4030.h>
#include <asm/io.h>
#include <asm/arch/mux.h>
#include <asm/arch/sys_proto.h>
@ -102,10 +103,11 @@ void beagle_identify(void)
*/
int misc_init_r(void)
{
gpio_t *gpio5_base = (gpio_t *)OMAP34XX_GPIO5_BASE;
gpio_t *gpio6_base = (gpio_t *)OMAP34XX_GPIO6_BASE;
struct gpio *gpio5_base = (struct gpio *)OMAP34XX_GPIO5_BASE;
struct gpio *gpio6_base = (struct gpio *)OMAP34XX_GPIO6_BASE;
power_init_r();
twl4030_power_init();
twl4030_led_init();
/* Configure GPIOs to output */
writel(~(GPIO23 | GPIO10 | GPIO8 | GPIO2 | GPIO1), &gpio6_base->oe);

View File

@ -1,74 +0,0 @@
/*
* (C) Copyright 2004-2008
* Texas Instruments, <www.ti.com>
*
* Author :
* Sunil Kumar <sunilsaini05@gmail.com>
* Shashi Ranjan <shashiranjanmca05@gmail.com>
*
* Derived from Beagle Board and 3430 SDP code by
* Richard Woodruff <r-woodruff2@ti.com>
* Syed Mohammed Khasim <khasim@ti.com>
*
*
* See file CREDITS for list of people who contributed to this
* project.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*/
#include <common.h>
#include <asm/arch/sys_proto.h>
#include <i2c.h>
/******************************************************************************
* Routine: power_init_r
* Description: Configure power supply
*****************************************************************************/
void power_init_r(void)
{
unsigned char byte;
#ifdef CONFIG_DRIVER_OMAP34XX_I2C
i2c_init(CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE);
#endif
/*
* Configure OMAP3 supply voltages in power management
* companion chip.
*/
/* set VAUX3 to 2.8V */
byte = DEV_GRP_P1;
i2c_write(PWRMGT_ADDR_ID4, VAUX3_DEV_GRP, 1, &byte, 1);
byte = VAUX3_VSEL_28;
i2c_write(PWRMGT_ADDR_ID4, VAUX3_DEDICATED, 1, &byte, 1);
/* set VPLL2 to 1.8V */
byte = DEV_GRP_ALL;
i2c_write(PWRMGT_ADDR_ID4, VPLL2_DEV_GRP, 1, &byte, 1);
byte = VPLL2_VSEL_18;
i2c_write(PWRMGT_ADDR_ID4, VPLL2_DEDICATED, 1, &byte, 1);
/* set VDAC to 1.8V */
byte = DEV_GRP_P1;
i2c_write(PWRMGT_ADDR_ID4, VDAC_DEV_GRP, 1, &byte, 1);
byte = VDAC_VSEL_18;
i2c_write(PWRMGT_ADDR_ID4, VDAC_DEDICATED, 1, &byte, 1);
/* enable LED */
byte = LEDBPWM | LEDAPWM | LEDBON | LEDAON;
i2c_write(PWRMGT_ADDR_ID3, LEDEN, 1, &byte, 1);
}

View File

@ -92,18 +92,17 @@ void set_muxconf_regs(void)
*/
static void setup_net_chip(void)
{
gpio_t *gpio3_base = (gpio_t *)OMAP34XX_GPIO3_BASE;
gpmc_csx_t *gpmc_cs5_base = (gpmc_csx_t *)GPMC_CONFIG_CS5_BASE;
ctrl_t *ctrl_base = (ctrl_t *)OMAP34XX_CTRL_BASE;
struct gpio *gpio3_base = (struct gpio *)OMAP34XX_GPIO3_BASE;
struct ctrl *ctrl_base = (struct ctrl *)OMAP34XX_CTRL_BASE;
/* Configure GPMC registers */
writel(NET_GPMC_CONFIG1, &gpmc_cs5_base->config1);
writel(NET_GPMC_CONFIG2, &gpmc_cs5_base->config2);
writel(NET_GPMC_CONFIG3, &gpmc_cs5_base->config3);
writel(NET_GPMC_CONFIG4, &gpmc_cs5_base->config4);
writel(NET_GPMC_CONFIG5, &gpmc_cs5_base->config5);
writel(NET_GPMC_CONFIG6, &gpmc_cs5_base->config6);
writel(NET_GPMC_CONFIG7, &gpmc_cs5_base->config7);
writel(NET_GPMC_CONFIG1, &gpmc_cfg->cs[5].config1);
writel(NET_GPMC_CONFIG2, &gpmc_cfg->cs[5].config2);
writel(NET_GPMC_CONFIG3, &gpmc_cfg->cs[5].config3);
writel(NET_GPMC_CONFIG4, &gpmc_cfg->cs[5].config4);
writel(NET_GPMC_CONFIG5, &gpmc_cfg->cs[5].config5);
writel(NET_GPMC_CONFIG6, &gpmc_cfg->cs[5].config6);
writel(NET_GPMC_CONFIG7, &gpmc_cfg->cs[5].config7);
/* Enable off mode for NWE in PADCONF_GPMC_NWE register */
writew(readw(&ctrl_base ->gpmc_nwe) | 0x0E00, &ctrl_base->gpmc_nwe);

View File

@ -29,6 +29,7 @@
* MA 02111-1307 USA
*/
#include <common.h>
#include <twl4030.h>
#include <asm/io.h>
#include <asm/arch/mux.h>
#include <asm/arch/sys_proto.h>
@ -58,7 +59,8 @@ int board_init(void)
*/
int misc_init_r(void)
{
power_init_r();
twl4030_power_init();
twl4030_led_init();
dieid_num_r();

View File

@ -30,6 +30,7 @@
* MA 02111-1307 USA
*/
#include <common.h>
#include <twl4030.h>
#include <asm/io.h>
#include <asm/arch/mux.h>
#include <asm/arch/sys_proto.h>
@ -59,12 +60,13 @@ int board_init(void)
*/
int misc_init_r(void)
{
gpio_t *gpio1_base = (gpio_t *)OMAP34XX_GPIO1_BASE;
gpio_t *gpio4_base = (gpio_t *)OMAP34XX_GPIO4_BASE;
gpio_t *gpio5_base = (gpio_t *)OMAP34XX_GPIO5_BASE;
gpio_t *gpio6_base = (gpio_t *)OMAP34XX_GPIO6_BASE;
struct gpio *gpio1_base = (struct gpio *)OMAP34XX_GPIO1_BASE;
struct gpio *gpio4_base = (struct gpio *)OMAP34XX_GPIO4_BASE;
struct gpio *gpio5_base = (struct gpio *)OMAP34XX_GPIO5_BASE;
struct gpio *gpio6_base = (struct gpio *)OMAP34XX_GPIO6_BASE;
power_init_r();
twl4030_power_init();
twl4030_led_init();
/* Configure GPIOs to output */
writel(~(GPIO14 | GPIO15 | GPIO16 | GPIO23), &gpio1_base->oe);

View File

@ -31,6 +31,7 @@
* MA 02111-1307 USA
*/
#include <common.h>
#include <twl4030.h>
#include <asm/io.h>
#include <asm/arch/mux.h>
#include <asm/arch/sys_proto.h>
@ -60,8 +61,17 @@ int board_init(void)
*/
int misc_init_r(void)
{
power_init_r();
twl4030_power_init();
twl4030_led_init();
dieid_num_r();
/*
* Board Reset
* The board is reset by holding the red button on the
* top right front face for eight seconds.
*/
twl4030_power_reset_init();
return 0;
}

View File

@ -32,6 +32,7 @@
#ifdef CONFIG_STATUS_LED
#include <status_led.h>
#endif
#include <twl4030.h>
#include <asm/io.h>
#include <asm/arch/gpio.h>
#include <asm/arch/mem.h>
@ -49,8 +50,8 @@
* The details of the setting of the serial gpmc setup are not available.
* The values were provided by another party.
*/
extern void enable_gpmc_config(u32 *gpmc_config, gpmc_csx_t *gpmc_cs_base,
u32 base, u32 size);
void enable_gpmc_cs_config(u32 *gpmc_config, struct gpmc_cs *cs, u32 base,
u32 size);
static u32 gpmc_serial_TL16CP754C[GPMC_MAX_REG] = {
0x00011000,
@ -122,19 +123,14 @@ void zoom2_identify(void)
int board_init (void)
{
DECLARE_GLOBAL_DATA_PTR;
gpmc_csx_t *serial_cs_base;
u32 *gpmc_config;
gpmc_init (); /* in SRAM or SDRAM, finish GPMC */
/* Configure console support on zoom2 */
gpmc_config = gpmc_serial_TL16CP754C;
serial_cs_base = (gpmc_csx_t *) (GPMC_CONFIG_CS0_BASE +
(3 * GPMC_CONFIG_WIDTH));
enable_gpmc_config(gpmc_config,
serial_cs_base,
SERIAL_TL16CP754C_BASE,
GPMC_SIZE_16M);
enable_gpmc_cs_config(gpmc_config, &gpmc_cfg->cs[4],
SERIAL_TL16CP754C_BASE, GPMC_SIZE_16M);
/* board id for Linux */
gd->bd->bi_arch_number = MACH_TYPE_OMAP_ZOOM2;
@ -154,8 +150,22 @@ int board_init (void)
int misc_init_r(void)
{
zoom2_identify();
power_init_r();
twl4030_power_init();
twl4030_led_init();
dieid_num_r();
/*
* Board Reset
* The board is reset by holding the the large button
* on the top right side of the main board for
* eight seconds.
*
* There are reported problems of some beta boards
* continously resetting. For those boards, disable resetting.
*/
if (ZOOM2_REVISION_PRODUCTION <= zoom2_get_revision())
twl4030_power_reset_init();
return 0;
}

View File

@ -2,7 +2,7 @@ By Vlad Lungu vlad.lungu@windriver.com 2007-Oct-01
----------------------------------------
Qemu is a full system emulator. See
http://fabrice.bellard.free.fr/qemu
http://www.nongnu.org/qemu/
Limitations & comments
----------------------

View File

@ -21,6 +21,7 @@
*/
#include <common.h>
#include <net.h>
#include <netdev.h>
#include <asm/io.h>
#include <asm/processor.h>

View File

@ -24,4 +24,4 @@
# SBC8349E
#
TEXT_BASE = 0xFFF00000
TEXT_BASE = 0xFF800000

View File

@ -4,6 +4,9 @@
* (www.eurodsn.de). It's based on the original IBM source code, so
* this follows:
*
* This source code is dual-licensed. You may use it under the terms of the
* GNU General Public License version 2, or under the license below.
*
* This source code has been made available to you by IBM on an AS-IS
* basis. Anyone receiving this source is licensed under IBM
* copyrights to use it in any way he or she deems fit, including

View File

@ -27,6 +27,7 @@
#include <common.h>
#include <asm/io.h>
#include <asm/arch/gpio.h>
DECLARE_GLOBAL_DATA_PTR;
@ -61,9 +62,20 @@ int board_init(void)
return 0;
}
int misc_init_r(void)
int board_late_init(void)
{
setenv("verify", "n");
/* Set the two I2C gpio lines to be gpio high */
nmk_gpio_set(__SCL, 1); nmk_gpio_set(__SDA, 1);
nmk_gpio_dir(__SCL, 1); nmk_gpio_dir(__SDA, 1);
nmk_gpio_af(__SCL, GPIO_GPIO); nmk_gpio_af(__SDA, GPIO_GPIO);
/* Reset the I2C port expander, on GPIO77 */
nmk_gpio_af(77, GPIO_GPIO);
nmk_gpio_dir(77, 1);
nmk_gpio_set(77, 0);
udelay(10);
nmk_gpio_set(77, 1);
return 0;
}

View File

@ -51,9 +51,9 @@ u##size flash_read##size(void *addr) \
return __raw_read##sfx(gpio_cfi_flash_swizzle(addr)); \
}
MAKE_FLASH(8, b) /* flash_write8() flash_read8() */
MAKE_FLASH(16, w) /* flash_write16() flash_write16() */
MAKE_FLASH(32, l) /* flash_write32() flash_write32() */
MAKE_FLASH(64, q) /* flash_write64() flash_write64() */
MAKE_FLASH(16, w) /* flash_write16() flash_read16() */
MAKE_FLASH(32, l) /* flash_write32() flash_read32() */
MAKE_FLASH(64, q) /* flash_write64() flash_read64() */
void gpio_cfi_flash_init(void)
{

View File

@ -49,7 +49,6 @@ $(obj)trab_fkt.srec: $(OBJS_FKT) $(LIB)
$(LD) -g -Ttext $(LOAD_ADDR) -o $(<:.o=) -e trab_fkt $^ $(LIB) \
-L$(obj)../../examples/standalone -lstubs \
-L$(obj)../../lib_generic -lgeneric \
$(obj)../../lib_arm/div0.o \
$(PLATFORM_LIBS)
$(OBJCOPY) -O srec $(<:.o=) $@

View File

@ -106,7 +106,7 @@ extern int i2c_write (uchar, uint, int , uchar* , int);
extern int i2c_read (uchar, uint, int , uchar* , int);
extern void tsc2000_reg_init (void);
extern s32 tsc2000_contact_temp (void);
extern void spi_init(void);
extern void tsc2000_spi_init(void);
/* function declarations */
int do_dip (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
@ -175,7 +175,7 @@ int do_burn_in (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
led_init ();
global_vars_init ();
test_function_table_init ();
spi_init ();
tsc2000_spi_init ();
if (global_vars_write_to_eeprom () != 0) {
printf ("%s: error writing global_vars to eeprom\n",
@ -336,7 +336,7 @@ int do_contact_temp (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
return 1;
}
spi_init ();
tsc2000_spi_init ();
contact_temp = tsc2000_contact_temp();
printf ("%d degree C * 100\n", contact_temp) ;
@ -859,7 +859,7 @@ int do_temp_log (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
delay = simple_strtoul(argv[1], NULL, 10);
}
spi_init ();
tsc2000_spi_init ();
while (1) {
#if defined(CONFIG_CMD_DATE)

View File

@ -729,7 +729,7 @@ int do_dac (char **argv)
int brightness;
/* initialize SPI */
spi_init ();
tsc2000_spi_init ();
if (((brightness = simple_strtoul (argv[2], NULL, 10)) < 0) ||
(brightness > 255)) {

View File

@ -42,7 +42,7 @@
*/
#define MAX_DEVIATION 18 /* unit: DIGITs of adc; 18 DIGIT = 0.5 <20>C */
void spi_init(void)
void tsc2000_spi_init(void)
{
S3C24X0_GPIO * const gpio = S3C24X0_GetBase_GPIO();
S3C24X0_SPI * const spi = S3C24X0_GetBase_SPI();

View File

@ -121,7 +121,7 @@ void tsc2000_set_range (unsigned int);
void tsc2000_reg_init (void);
s32 tsc2000_contact_temp (void);
void spi_wait_transmit_done (void);
void spi_init(void);
void tsc2000_spi_init(void);
int tsc2000_interpolate(long value, long data[][2], long *result);
void adc_wait_conversion_done(void);

View File

@ -33,7 +33,6 @@ SECTIONS
.text :
{
cpu/arm920t/start.o (.text)
lib_arm/_umodsi3.o (.text)
lib_generic/zlib.o (.text)
lib_generic/crc32.o (.text)
lib_generic/string.o (.text)

View File

@ -44,8 +44,8 @@ all: $(obj).depend $(LIB) $(obj)eeprom.srec $(obj)eeprom.bin
$(LIB): $(OBJS) $(SOBJS)
$(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS)
$(obj)eeprom.srec: $(obj)eeprom.o $(obj)eeprom_start.o
cd $(lnk) && $(LD) -T $(LDSCRIPT) -g -Ttext $(LOAD_ADDR) \
$(obj)eeprom.srec: $(obj)eeprom.o $(obj)eeprom_start.o $(obj)u-boot.lds
cd $(lnk) && $(LD) -T $(obj)u-boot.lds -g -Ttext $(LOAD_ADDR) \
-o $(<:.o=) -e eeprom eeprom.o eeprom_start.o \
-L$(obj)../../examples/standalone -lstubs \
-L$(obj)../../lib_generic -lgeneric \
@ -55,11 +55,14 @@ $(obj)eeprom.srec: $(obj)eeprom.o $(obj)eeprom_start.o
$(obj)eeprom.bin: $(obj)eeprom.srec
$(OBJCOPY) -I srec -O binary $< $@ 2>/dev/null
$(obj)u-boot.lds: $(LDSCRIPT)
$(CPP) $(CPPFLAGS) $(LDPPFLAGS) -ansi -D__ASSEMBLY__ -P - <$^ >$@
clean:
rm -f $(SOBJS) $(OBJS) $(obj)eeprom \
$(obj)eeprom.srec $(obj)eeprom.bin \
$(obj)eeprom.o $(obj)eeprom_start.o
$(obj)eeprom.o $(obj)eeprom_start.o \
$(obj)u-boot.lds
distclean: clean
rm -f $(LIB) core *.bak $(obj).depend

View File

@ -1,4 +1,6 @@
/******************************************************************************
* This source code is dual-licensed. You may use it under the terms of the
* GNU General Public License version 2, or under the license below.
*
* This source code has been made available to you by IBM on an AS-IS
* basis. Anyone receiving this source is licensed under IBM

View File

@ -198,7 +198,7 @@ static unsigned long get_delta(unsigned long start)
static void wait_us(unsigned long us)
{
unsigned long start = OSCR;
us *= OSCR_CLK_FREQ;
us = DIV_ROUND_UP(us * OSCR_CLK_FREQ, 1000);
while (get_delta(start) < us) {
/* do nothing */
@ -219,9 +219,11 @@ static unsigned long dfc_wait_event(unsigned long event)
if(!event)
return 0xff000000;
else if(event & (NDSR_CS0_CMDD | NDSR_CS0_BBD))
timeout = CONFIG_SYS_NAND_PROG_ERASE_TO * OSCR_CLK_FREQ;
timeout = DIV_ROUND_UP(CONFIG_SYS_NAND_PROG_ERASE_TO
* OSCR_CLK_FREQ, 1000);
else
timeout = CONFIG_SYS_NAND_OTHER_TO * OSCR_CLK_FREQ;
timeout = DIV_ROUND_UP(CONFIG_SYS_NAND_OTHER_TO
* OSCR_CLK_FREQ, 1000);
while(1) {
ndsr = NDSR;

View File

@ -67,51 +67,50 @@ int do_ext2ls (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
if (argc < 3) {
cmd_usage(cmdtp);
return(1);
return 1;
}
dev = (int)simple_strtoul (argv[2], &ep, 16);
dev_desc = get_dev(argv[1],dev);
if (dev_desc == NULL) {
printf ("\n** Block device %s %d not supported\n", argv[1], dev);
return(1);
return 1;
}
if (*ep) {
if (*ep != ':') {
puts ("\n** Invalid boot device, use `dev[:part]' **\n");
return(1);
return 1;
}
part = (int)simple_strtoul(++ep, NULL, 16);
}
if (argc == 4) {
filename = argv[3];
}
if (argc == 4)
filename = argv[3];
PRINTF("Using device %s %d:%d, directory: %s\n", argv[1], dev, part, filename);
if ((part_length = ext2fs_set_blk_dev(dev_desc, part)) == 0) {
printf ("** Bad partition - %s %d:%d **\n", argv[1], dev, part);
ext2fs_close();
return(1);
return 1;
}
if (!ext2fs_mount(part_length)) {
printf ("** Bad ext2 partition or disk - %s %d:%d **\n", argv[1], dev, part);
ext2fs_close();
return(1);
return 1;
}
if (ext2fs_ls (filename)) {
printf ("** Error ext2fs_ls() **\n");
ext2fs_close();
return(1);
return 1;
};
ext2fs_close();
return(0);
return 0;
}
U_BOOT_CMD(
@ -140,11 +139,11 @@ int do_ext2load (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
switch (argc) {
case 3:
addr_str = getenv("loadaddr");
if (addr_str != NULL) {
if (addr_str != NULL)
addr = simple_strtoul (addr_str, NULL, 16);
} else {
else
addr = CONFIG_SYS_LOAD_ADDR;
}
filename = getenv ("bootfile");
count = 0;
break;
@ -166,24 +165,24 @@ int do_ext2load (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
default:
cmd_usage(cmdtp);
return(1);
return 1;
}
if (!filename) {
puts ("\n** No boot file defined **\n");
return(1);
puts ("** No boot file defined **\n");
return 1;
}
dev = (int)simple_strtoul (argv[2], &ep, 16);
dev_desc = get_dev(argv[1],dev);
if (dev_desc==NULL) {
printf ("\n** Block device %s %d not supported\n", argv[1], dev);
return(1);
printf ("** Block device %s %d not supported\n", argv[1], dev);
return 1;
}
if (*ep) {
if (*ep != ':') {
puts ("\n** Invalid boot device, use `dev[:part]' **\n");
return(1);
puts ("** Invalid boot device, use `dev[:part]' **\n");
return 1;
}
part = (int)simple_strtoul(++ep, NULL, 16);
}
@ -193,50 +192,53 @@ int do_ext2load (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
if (part != 0) {
if (get_partition_info (dev_desc, part, &info)) {
printf ("** Bad partition %d **\n", part);
return(1);
return 1;
}
if (strncmp((char *)info.type, BOOT_PART_TYPE, sizeof(info.type)) != 0) {
printf ("\n** Invalid partition type \"%.32s\""
printf ("** Invalid partition type \"%.32s\""
" (expect \"" BOOT_PART_TYPE "\")\n",
info.type);
return(1);
return 1;
}
PRINTF ("\nLoading from block device %s device %d, partition %d: "
"Name: %.32s Type: %.32s File:%s\n",
argv[1], dev, part, info.name, info.type, filename);
printf ("Loading file \"%s\" "
"from %s device %d:%d (%.32s)\n",
filename,
argv[1], dev, part, info.name);
} else {
PRINTF ("\nLoading from block device %s device %d, File:%s\n",
argv[1], dev, filename);
printf ("Loading file \"%s\" from %s device %d\n",
filename, argv[1], dev);
}
if ((part_length = ext2fs_set_blk_dev(dev_desc, part)) == 0) {
printf ("** Bad partition - %s %d:%d **\n", argv[1], dev, part);
ext2fs_close();
return(1);
return 1;
}
if (!ext2fs_mount(part_length)) {
printf ("** Bad ext2 partition or disk - %s %d:%d **\n", argv[1], dev, part);
printf ("** Bad ext2 partition or disk - %s %d:%d **\n",
argv[1], dev, part);
ext2fs_close();
return(1);
return 1;
}
filelen = ext2fs_open(filename);
if (filelen < 0) {
printf("** File not found %s\n", filename);
ext2fs_close();
return(1);
return 1;
}
if ((count < filelen) && (count != 0)) {
filelen = count;
}
if (ext2fs_read((char *)addr, filelen) != filelen) {
printf("\n** Unable to read \"%s\" from %s %d:%d **\n", filename, argv[1], dev, part);
printf("** Unable to read \"%s\" from %s %d:%d **\n",
filename, argv[1], dev, part);
ext2fs_close();
return(1);
return 1;
}
ext2fs_close();
@ -244,11 +246,11 @@ int do_ext2load (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
/* Loading ok, update default load address */
load_addr = addr;
printf ("\n%d bytes read\n", filelen);
printf ("%d bytes read\n", filelen);
sprintf(buf, "%X", filelen);
setenv("filesize", buf);
return(filelen);
return 0;
}
U_BOOT_CMD(

View File

@ -48,7 +48,7 @@ static int do_spi_flash_probe(int argc, char *argv[])
goto usage;
}
if (argc >= 4) {
mode = simple_strtoul(argv[3], &endp, 0);
mode = simple_strtoul(argv[3], &endp, 16);
if (*argv[3] == 0 || *endp != 0)
goto usage;
}

View File

@ -534,7 +534,7 @@ int console_init_f(void)
void stdio_print_current_devices(void)
{
#ifdef CONFIG_SYS_CONSOLE_INFO_QUIET
#ifndef CONFIG_SYS_CONSOLE_INFO_QUIET
/* Print information */
puts("In: ");
if (stdio_devices[stdin] == NULL) {

View File

@ -139,11 +139,6 @@ uchar default_environment[] = {
"\0"
};
#if defined(CONFIG_ENV_IS_IN_NAND) /* Environment is in Nand Flash */ \
|| defined(CONFIG_ENV_IS_IN_SPI_FLASH)
int default_environment_size = sizeof(default_environment);
#endif
void env_crc_update (void)
{
env_ptr->crc = crc32(0, env_ptr->data, ENV_SIZE);

View File

@ -35,7 +35,6 @@ extern int write_dataflash (unsigned long addr_dest, unsigned long addr_src,
unsigned long size);
extern int AT91F_DataflashInit (void);
extern uchar default_environment[];
/* extern int default_environment_size; */
uchar env_get_char_spec (int index)

View File

@ -83,7 +83,6 @@ static ulong end_addr_new = CONFIG_ENV_ADDR_REDUND + CONFIG_ENV_SECT_SIZE - 1;
#endif /* CONFIG_ENV_ADDR_REDUND */
extern uchar default_environment[];
extern int default_environment_size;
uchar env_get_char_spec (int index)

View File

@ -29,7 +29,6 @@
/* references to names in env_common.c */
extern uchar default_environment[];
extern int default_environment_size;
char * env_name_spec = "MG_DISK";

View File

@ -59,7 +59,6 @@
/* references to names in env_common.c */
extern uchar default_environment[];
extern int default_environment_size;
char * env_name_spec = "NAND";

View File

@ -34,7 +34,6 @@ DECLARE_GLOBAL_DATA_PTR;
env_t *env_ptr = NULL;
extern uchar default_environment[];
extern int default_environment_size;
void env_relocate_spec (void)

View File

@ -58,7 +58,6 @@ env_t *env_ptr = (env_t *)CONFIG_ENV_ADDR;
char * env_name_spec = "NVRAM";
extern uchar default_environment[];
extern int default_environment_size;
#ifdef CONFIG_AMIGAONEG3SE
uchar env_get_char_spec (int index)

View File

@ -47,7 +47,6 @@ DECLARE_GLOBAL_DATA_PTR;
/* references to names in env_common.c */
extern uchar default_environment[];
extern int default_environment_size;
char * env_name_spec = "SPI Flash";
env_t *env_ptr;
@ -143,16 +142,7 @@ err_probe:
err_crc:
puts("*** Warning - bad CRC, using default environment\n\n");
if (default_environment_size > CONFIG_ENV_SIZE) {
gd->env_valid = 0;
puts("*** Error - default environment is too large\n\n");
return;
}
memset(env_ptr, 0, sizeof(env_t));
memcpy(env_ptr->data, default_environment, default_environment_size);
env_ptr->crc = crc32(0, env_ptr->data, ENV_SIZE);
gd->env_valid = 1;
set_default_env();
}
int env_init(void)

View File

@ -38,4 +38,12 @@ void jumptable_init (void)
gd->jt[XF_i2c_write] = (void *) i2c_write;
gd->jt[XF_i2c_read] = (void *) i2c_read;
#endif
#ifdef CONFIG_CMD_SPI
gd->jt[XF_spi_init] = (void *) spi_init;
gd->jt[XF_spi_setup_slave] = (void *) spi_setup_slave;
gd->jt[XF_spi_free_slave] = (void *) spi_free_slave;
gd->jt[XF_spi_claim_bus] = (void *) spi_claim_bus;
gd->jt[XF_spi_release_bus] = (void *) spi_release_bus;
gd->jt[XF_spi_xfer] = (void *) spi_xfer;
#endif
}

View File

@ -625,7 +625,7 @@ int fdt_resize(void *blob)
}
#ifdef CONFIG_PCI
#define CONFIG_SYS_PCI_NR_INBOUND_WIN 3
#define CONFIG_SYS_PCI_NR_INBOUND_WIN 4
#define FDT_PCI_PREFETCH (0x40000000)
#define FDT_PCI_MEM32 (0x02000000)
@ -655,7 +655,7 @@ int fdt_pci_dma_ranges(void *blob, int phb_off, struct pci_controller *hose) {
size = (u64)hose->regions[r].size;
dma_range[0] = 0;
if (size > 0x100000000ull)
if (size >= 0x100000000ull)
dma_range[0] |= FDT_PCI_MEM64;
else
dma_range[0] |= FDT_PCI_MEM32;

View File

@ -2002,7 +2002,7 @@ static int free_pipe(struct pipe *pi, int indent)
#ifndef __U_BOOT__
globfree(&child->glob_result);
#else
for (a = child->argc;a >= 0;a--) {
for (a = 0; a < child->argc; a++) {
free(child->argv[a]);
}
free(child->argv);

View File

@ -86,7 +86,7 @@ ifdef ARCH
sinclude $(TOPDIR)/lib_$(ARCH)/config.mk # include architecture dependend rules
endif
ifdef CPU
sinclude $(TOPDIR)/cpu/$(CPU)/config.mk # include CPU specific rules
sinclude $(TOPDIR)/cpu/$(CPU)/config.mk # include CPU specific rules
endif
ifdef SOC
sinclude $(TOPDIR)/cpu/$(CPU)/$(SOC)/config.mk # include SoC specific rules
@ -166,7 +166,7 @@ endif
AFLAGS := $(AFLAGS_DEBUG) -D__ASSEMBLY__ $(CPPFLAGS)
LDFLAGS += -Bstatic -T $(LDSCRIPT) $(PLATFORM_LDFLAGS)
LDFLAGS += -Bstatic -T $(obj)u-boot.lds $(PLATFORM_LDFLAGS)
ifneq ($(TEXT_BASE),)
LDFLAGS += -Ttext $(TEXT_BASE)
endif

View File

@ -30,6 +30,4 @@ PLATFORM_CPPFLAGS += -march=armv5
# Supply options according to compiler version
#
# =========================================================================
PLATFORM_CPPFLAGS +=$(call cc-option,-mapcs-32,-mabi=apcs-gnu)
PLATFORM_CPPFLAGS +=$(call cc-option,-mno-thumb-interwork,)
PLATFORM_RELFLAGS +=$(call cc-option,-mshort-load-bytes,$(call cc-option,-malignment-traps,))

View File

@ -30,6 +30,4 @@ PLATFORM_CPPFLAGS += -march=armv5t
# Supply options according to compiler version
#
# =========================================================================
PLATFORM_CPPFLAGS +=$(call cc-option,-mapcs-32,-mabi=apcs-gnu)
PLATFORM_CPPFLAGS +=$(call cc-option,-mno-thumb-interwork,)
PLATFORM_RELFLAGS +=$(call cc-option,-mshort-load-bytes,$(call cc-option,-malignment-traps,))

Some files were not shown because too many files have changed in this diff Show More