]> git.ipfire.org Git - people/ms/u-boot.git/commitdiff
Merge branch 'master' into next
authorWolfgang Denk <wd@denx.de>
Mon, 7 Dec 2009 21:47:17 +0000 (22:47 +0100)
committerWolfgang Denk <wd@denx.de>
Mon, 7 Dec 2009 21:47:17 +0000 (22:47 +0100)
Conflicts:
lib_generic/zlib.c

Signed-off-by: Wolfgang Denk <wd@denx.de>
367 files changed:
MAINTAINERS
MAKEALL
Makefile
board/Marvell/sheevaplug/kwbimage.cfg
board/amcc/acadia/config.mk
board/amcc/acadia/u-boot.lds [deleted file]
board/amcc/bamboo/bamboo.c
board/amcc/bamboo/config.mk
board/amcc/bamboo/u-boot.lds [deleted file]
board/amcc/bubinga/u-boot.lds [deleted file]
board/amcc/canyonlands/canyonlands.c
board/amcc/canyonlands/config.mk
board/amcc/canyonlands/u-boot.lds [deleted file]
board/amcc/ebony/ebony.c
board/amcc/ebony/u-boot.lds [deleted file]
board/amcc/katmai/Makefile
board/amcc/katmai/chip_config.c [new file with mode: 0644]
board/amcc/katmai/cmd_katmai.c [deleted file]
board/amcc/katmai/katmai.c
board/amcc/katmai/u-boot.lds [deleted file]
board/amcc/kilauea/config.mk
board/amcc/kilauea/kilauea.c
board/amcc/kilauea/u-boot.lds [deleted file]
board/amcc/luan/luan.c
board/amcc/luan/u-boot.lds [deleted file]
board/amcc/makalu/makalu.c
board/amcc/makalu/u-boot.lds [deleted file]
board/amcc/ocotea/ocotea.c
board/amcc/ocotea/u-boot.lds [deleted file]
board/amcc/redwood/u-boot.lds [deleted file]
board/amcc/sequoia/config.mk
board/amcc/sequoia/sequoia.c
board/amcc/sequoia/u-boot.lds [deleted file]
board/amcc/taihu/u-boot.lds [deleted file]
board/amcc/taishan/taishan.c
board/amcc/taishan/u-boot.lds [deleted file]
board/amcc/walnut/u-boot.lds [deleted file]
board/amcc/yosemite/u-boot.lds [deleted file]
board/amcc/yosemite/yosemite.c
board/amcc/yucca/u-boot.lds [deleted file]
board/amcc/yucca/yucca.c
board/amirix/ap1000/config.mk
board/armltd/integrator/timer.c
board/cm5200/cm5200.c
board/cray/L1/u-boot.lds [deleted file]
board/csb272/u-boot.lds [deleted file]
board/csb472/u-boot.lds [deleted file]
board/dave/PPChameleonEVB/u-boot.lds [deleted file]
board/davinci/common/misc.c
board/davinci/common/misc.h
board/davinci/da830evm/Makefile [new file with mode: 0644]
board/davinci/da830evm/config.mk [new file with mode: 0644]
board/davinci/da830evm/da830evm.c [new file with mode: 0644]
board/davinci/dm6467evm/dm6467evm.c
board/eNET/config.mk
board/eNET/eNET.c
board/eNET/eNET_start16.S
board/eNET/u-boot.lds
board/eric/Makefile
board/eric/u-boot.lds [deleted file]
board/esd/adciop/u-boot.lds [deleted file]
board/esd/apc405/u-boot.lds [deleted file]
board/esd/ar405/u-boot.lds [deleted file]
board/esd/ash405/u-boot.lds [deleted file]
board/esd/canbt/u-boot.lds [deleted file]
board/esd/cms700/u-boot.lds [deleted file]
board/esd/cpci2dp/u-boot.lds [deleted file]
board/esd/cpci405/u-boot.lds [deleted file]
board/esd/cpciiser4/u-boot.lds [deleted file]
board/esd/dasa_sim/config.mk
board/esd/dp405/u-boot.lds [deleted file]
board/esd/du405/u-boot.lds [deleted file]
board/esd/du440/du440.c
board/esd/du440/du440.h
board/esd/du440/u-boot.lds [deleted file]
board/esd/hh405/u-boot.lds [deleted file]
board/esd/hub405/u-boot.lds [deleted file]
board/esd/ocrtc/u-boot.lds [deleted file]
board/esd/pci405/u-boot.lds [deleted file]
board/esd/plu405/Makefile
board/esd/plu405/plu405.c
board/esd/plu405/u-boot.lds [deleted file]
board/esd/pmc405/u-boot.lds [deleted file]
board/esd/pmc405de/u-boot.lds [deleted file]
board/esd/pmc440/config.mk
board/esd/pmc440/pmc440.c
board/esd/pmc440/u-boot.lds [deleted file]
board/esd/voh405/u-boot.lds [deleted file]
board/esd/vom405/u-boot.lds [deleted file]
board/esd/wuh405/u-boot.lds [deleted file]
board/exbitgen/u-boot.lds [deleted file]
board/faraday/a320evb/Makefile [new file with mode: 0644]
board/faraday/a320evb/a320evb.c [new file with mode: 0644]
board/faraday/a320evb/config.mk [new file with mode: 0644]
board/faraday/a320evb/lowlevel_init.S [new file with mode: 0644]
board/freescale/mpc8313erdb/sdram.c
board/g2000/u-boot.lds [deleted file]
board/gdsys/dlvision/u-boot.lds [deleted file]
board/gdsys/gdppc440etx/gdppc440etx.c
board/gdsys/gdppc440etx/u-boot.lds [deleted file]
board/gdsys/intip/intip.c
board/gdsys/intip/u-boot.lds [deleted file]
board/gdsys/neo/u-boot.lds [deleted file]
board/gen860t/gen860t.c
board/ipek01/Makefile [new file with mode: 0644]
board/ipek01/config.mk [new file with mode: 0644]
board/ipek01/ipek01.c [new file with mode: 0644]
board/jse/Makefile
board/jse/u-boot.lds [deleted file]
board/korat/korat.c
board/korat/u-boot.lds [deleted file]
board/kup/common/kup.c
board/lwmon5/lwmon5.c
board/lwmon5/u-boot.lds [deleted file]
board/ml2/Makefile
board/ml2/config.mk
board/mpl/mip405/Makefile
board/mpl/mip405/mip405.c
board/mpl/mip405/u-boot.lds [deleted file]
board/mpl/pip405/Makefile
board/mpl/pip405/u-boot.lds [deleted file]
board/mpl/vcma9/vcma9.c
board/mpl/vcma9/vcma9.h
board/netstal/hcu4/hcu4.c
board/netstal/hcu4/u-boot.lds [deleted file]
board/netstal/hcu5/hcu5.c
board/netstal/hcu5/u-boot.lds [deleted file]
board/netstal/mcu25/mcu25.c
board/netstal/mcu25/u-boot.lds [deleted file]
board/netta/netta.c
board/pcs440ep/pcs440ep.c
board/prodrive/alpr/alpr.c
board/prodrive/alpr/u-boot.lds [deleted file]
board/prodrive/p3p440/p3p440.c
board/prodrive/p3p440/u-boot.lds [deleted file]
board/quad100hd/u-boot.lds [deleted file]
board/sacsng/sacsng.c
board/samsung/smdk2400/smdk2400.c
board/samsung/smdk2410/smdk2410.c
board/samsung/smdk6400/lowlevel_init.S
board/samsung/smdk6400/smdk6400.c
board/sandburst/common/sb_common.c
board/sandburst/karef/u-boot.lds [deleted file]
board/sandburst/metrobox/u-boot.lds [deleted file]
board/sbc2410x/sbc2410x.c
board/sbc405/u-boot.lds [deleted file]
board/socrates/socrates.c
board/ssv/adnpesc1/adnpesc1.c
board/trab/cmd_trab.c
board/trab/rs485.c
board/trab/rs485.h
board/trab/trab.c
board/trab/trab_fkt.c
board/trab/tsc2000.c
board/trab/vfd.c
board/uc100/uc100.c
board/w7o/u-boot.lds [deleted file]
board/xes/xpedite1000/u-boot.lds [deleted file]
board/xes/xpedite1000/xpedite1000.c
board/xilinx/ml300/config.mk
board/zeus/u-boot.lds [deleted file]
common/Makefile
common/cmd_bootm.c
common/cmd_echo.c [new file with mode: 0644]
common/cmd_exit.c [new file with mode: 0644]
common/cmd_help.c [new file with mode: 0644]
common/cmd_nand.c
common/cmd_test.c [new file with mode: 0644]
common/cmd_version.c [new file with mode: 0644]
common/command.c
common/dlmalloc.c
common/env_onenand.c
common/exports.c
common/image.c
config.mk
cpu/arm1136/mx31/timer.c
cpu/arm1136/omap24xx/timer.c
cpu/arm1176/cpu.c
cpu/arm1176/s3c64xx/cpu_init.S
cpu/arm1176/s3c64xx/reset.S
cpu/arm1176/s3c64xx/speed.c
cpu/arm1176/s3c64xx/timer.c
cpu/arm1176/start.S
cpu/arm720t/interrupts.c
cpu/arm920t/a320/Makefile [new file with mode: 0644]
cpu/arm920t/a320/ftsmc020.c [new file with mode: 0644]
cpu/arm920t/a320/reset.S [new file with mode: 0644]
cpu/arm920t/a320/timer.c [new file with mode: 0644]
cpu/arm920t/at91rm9200/timer.c
cpu/arm920t/imx/timer.c
cpu/arm920t/ks8695/timer.c
cpu/arm920t/s3c24x0/interrupts.c
cpu/arm920t/s3c24x0/speed.c
cpu/arm920t/s3c24x0/timer.c
cpu/arm920t/s3c24x0/usb.c
cpu/arm920t/s3c24x0/usb_ohci.c
cpu/arm920t/start.S
cpu/arm925t/timer.c
cpu/arm926ejs/at91/timer.c
cpu/arm926ejs/davinci/cpu.c
cpu/arm926ejs/davinci/psc.c
cpu/arm926ejs/davinci/timer.c
cpu/arm926ejs/kirkwood/timer.c
cpu/arm926ejs/mx27/timer.c
cpu/arm926ejs/nomadik/timer.c
cpu/arm926ejs/omap/timer.c
cpu/arm926ejs/versatile/timer.c
cpu/arm_cortexa8/omap3/mem.c
cpu/arm_cortexa8/omap3/sys_info.c
cpu/arm_cortexa8/omap3/timer.c
cpu/arm_cortexa8/s5pc1xx/timer.c
cpu/at32ap/Makefile
cpu/at32ap/hsdramc.c
cpu/at32ap/interrupts.c
cpu/blackfin/interrupts.c
cpu/i386/Makefile
cpu/i386/cpu.c
cpu/i386/exceptions.c [deleted file]
cpu/i386/interrupts.c
cpu/i386/sc520/sc520_timer.c
cpu/i386/start.S
cpu/ixp/start.S
cpu/ixp/timer.c
cpu/lh7a40x/timer.c
cpu/mcf547x_8x/slicetimer.c
cpu/mpc85xx/u-boot-nand.lds
cpu/ppc4xx/4xx_pci.c
cpu/ppc4xx/4xx_pcie.c
cpu/ppc4xx/cmd_chip_config.c
cpu/ppc4xx/config.mk
cpu/ppc4xx/cpu.c
cpu/ppc4xx/i2c.c
cpu/ppc4xx/u-boot.lds [moved from board/pcs440ep/u-boot.lds with 71% similarity]
cpu/pxa/timer.c
cpu/s3c44b0/timer.c
cpu/sa1100/timer.c
doc/README.davinci [new file with mode: 0644]
drivers/i2c/Makefile
drivers/i2c/bfin-twi_i2c.c
drivers/i2c/omap24xx_i2c.c
drivers/i2c/pca9564_i2c.c [new file with mode: 0644]
drivers/i2c/s3c24x0_i2c.c
drivers/i2c/soft_i2c.c
drivers/mmc/omap3_mmc.c
drivers/mtd/nand/davinci_nand.c
drivers/mtd/nand/fsl_elbc_nand.c
drivers/mtd/nand/nand_base.c
drivers/mtd/nand/nand_bbt.c
drivers/mtd/nand/s3c2410_nand.c
drivers/mtd/nand/s3c64xx.c
drivers/mtd/onenand/onenand_base.c
drivers/mtd/onenand/onenand_bbt.c
drivers/mtd/onenand/onenand_uboot.c
drivers/rtc/ftrtc010.c
drivers/rtc/m41t94.c
drivers/rtc/s3c24x0_rtc.c
drivers/serial/s3c64xx.c
drivers/serial/serial_s3c24x0.c
drivers/serial/serial_s5pc1xx.c
drivers/usb/host/ohci-hcd.c
drivers/usb/host/s3c64xx-hcd.c
drivers/video/cfb_console.c
drivers/video/mb862xx.c
examples/api/Makefile
examples/api/libgenwrap.c
include/4xx_i2c.h
include/asm-arm/arch-a320/a320.h [new file with mode: 0644]
include/asm-arm/arch-a320/ftpmu010.h [new file with mode: 0644]
include/asm-arm/arch-a320/ftsdmc020.h [new file with mode: 0644]
include/asm-arm/arch-a320/ftsmc020.h [new file with mode: 0644]
include/asm-arm/arch-a320/fttmr010.h [new file with mode: 0644]
include/asm-arm/arch-davinci/hardware.h
include/asm-arm/arch-davinci/i2c_defs.h
include/asm-arm/arch-omap24xx/i2c.h
include/asm-arm/arch-omap3/cpu.h
include/asm-arm/arch-omap3/i2c.h
include/asm-arm/arch-omap3/mem.h
include/asm-arm/arch-s3c24x0/s3c2400.h [moved from include/s3c2400.h with 98% similarity]
include/asm-arm/arch-s3c24x0/s3c2410.h [moved from include/s3c2410.h with 98% similarity]
include/asm-arm/arch-s3c24x0/s3c24x0.h [new file with mode: 0644]
include/asm-arm/arch-s3c24x0/s3c24x0_cpu.h [new file with mode: 0644]
include/asm-arm/arch-s3c64xx/s3c6400.h [moved from include/s3c6400.h with 100% similarity]
include/asm-arm/arch-s3c64xx/s3c64x0.h [moved from include/s3c64x0.h with 100% similarity]
include/asm-arm/mach-types.h
include/asm-blackfin/delay.h
include/asm-i386/interrupt.h
include/asm-i386/u-boot-i386.h
include/asm-ppc/4xx_pci.h
include/common.h
include/configs/DU440.h
include/configs/PLU405.h
include/configs/PMC440.h
include/configs/VCMA9.h
include/configs/a320evb.h [new file with mode: 0644]
include/configs/alpr.h
include/configs/apollon.h
include/configs/da830evm.h [new file with mode: 0644]
include/configs/devkit8000.h
include/configs/eNET.h
include/configs/imx27lite.h
include/configs/ipek01.h [new file with mode: 0644]
include/configs/katmai.h
include/configs/korat.h
include/configs/lwmon5.h
include/configs/omap3_beagle.h
include/configs/omap3_evm.h
include/configs/omap3_overo.h
include/configs/omap3_pandora.h
include/configs/omap3_sdp3430.h
include/configs/omap3_zoom1.h
include/configs/omap3_zoom2.h
include/configs/sbc2410x.h
include/configs/sc3.h
include/configs/sc520_cdp.h
include/configs/sc520_spunk.h
include/configs/sequoia.h
include/configs/smdk2400.h
include/configs/smdk2410.h
include/configs/smdk6400.h
include/configs/socrates.h
include/configs/trab.h
include/configs/yucca.h
include/exports.h
include/image.h
include/linux/lzo.h
include/linux/mtd/mtd-abi.h
include/linux/mtd/nand.h
include/linux/mtd/onenand.h
include/linux/mtd/onenand_regs.h
include/linux/mtd/partitions.h
include/mb862xx.h
include/onenand_uboot.h
include/pca9564.h [new file with mode: 0644]
include/ppc405.h
include/ppc440.h
include/s3c24x0.h [deleted file]
lib_generic/Makefile
lib_generic/crc32.c
lib_generic/lzo/lzo1x_decompress.c
lib_generic/time.c [new file with mode: 0644]
lib_generic/zlib.c
lib_i386/Makefile
lib_i386/bios.S
lib_i386/bios_pci.S
lib_i386/bios_setup.c
lib_i386/board.c
lib_i386/interrupts.c
lib_i386/pcat_interrupts.c
lib_i386/pcat_timer.c
lib_i386/realmode.c
lib_i386/timer.c
lib_m68k/time.c
lib_microblaze/time.c
lib_mips/time.c
lib_nios/time.c
lib_nios2/time.c
lib_ppc/time.c
lib_sh/time.c
lib_sh/time_sh2.c
lib_sparc/time.c
mkconfig
post/post.c
rules.mk
tools/Makefile
tools/easylogo/Makefile
tools/gdb/Makefile
tools/imls/Makefile

index 59599b8bc04bc83c9bc6988f776c3d159585aae8..9734b1d0958954b896b73d849b16bf66276ed547 100644 (file)
@@ -201,6 +201,8 @@ Frank Gottschling <fgottschling@eltec.de>
 
 Wolfgang Grandegger <wg@denx.de>
 
+       ipek01          MPC5200
+
        CCM             MPC855
 
        PN62            MPC8240
@@ -543,6 +545,10 @@ Rick Bronson <rick@efn.org>
 
        AT91RM9200DK    at91rm9200
 
+Po-Yu Chuang <ratbert@faraday-tech.com>
+
+       a320evb         FA526 (ARM920T-like) (a320 SoC)
+
 George G. Davis <gdavis@mvista.com>
 
        assabet         SA1100
@@ -712,6 +718,10 @@ Andrea Scian <andrea.scian@dave-tech.it>
 
        B2              ARM7TDMI (S3C44B0X)
 
+Nick Thompson <nick.thompson@gefanuc.com>
+
+       da830evm        ARM926EJS (DA830/OMAP-L137)
+
 Albin Tonnerre <albin.tonnerre@free-electrons.com>
 
        sbc35_a9g20     ARM926EJS (AT91SAM9G20 SoC)
diff --git a/MAKEALL b/MAKEALL
index d63c5c21679d99431de9c30e1505163721fc795d..6ee5c499950a36a3c15b5546e4e78b221dcb838e 100755 (executable)
--- a/MAKEALL
+++ b/MAKEALL
@@ -63,6 +63,7 @@ LIST_5xxx="           \
        icecube_5100    \
        icecube_5200    \
        inka4x0         \
+       ipek01          \
        lite5200b       \
        mcc200          \
        mecp5200        \
@@ -538,6 +539,7 @@ LIST_ARM7="         \
 #########################################################################
 
 LIST_ARM9="                    \
+       a320evb                 \
        ap920t                  \
        ap922_XA10              \
        ap926ejs                \
@@ -548,6 +550,7 @@ LIST_ARM9="                 \
        cp926ejs                \
        cp946es                 \
        cp966                   \
+       da830evm                \
        imx27lite               \
        lpd7a400                \
        mv88f6281gtw_ge         \
index 10abadfffaff81e987fb75dbf76156ae9c3a97a3..f5a55c703f706cd39499837fe6e42fd61291663f 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -606,6 +606,9 @@ jupiter_config:     unconfig
 inka4x0_config:        unconfig
        @$(MKCONFIG) inka4x0 ppc mpc5xxx inka4x0
 
+ipek01_config: unconfig
+       @$(MKCONFIG) -a ipek01 ppc mpc5xxx ipek01
+
 lite5200b_config       \
 lite5200b_PM_config    \
 lite5200b_LOWBOOT_config:      unconfig
@@ -2693,6 +2696,9 @@ shannon_config    :       unconfig
 ## ARM92xT Systems
 #########################################################################
 
+a320evb_config :       unconfig
+       @$(MKCONFIG) $(@:_config=) arm arm920t a320evb faraday a320
+
 #########################################################################
 ## Atmel AT91RM9200 Systems
 #########################################################################
@@ -2927,6 +2933,9 @@ cp922_XA10_config \
 cp1026_config: unconfig
        @board/armltd/integrator/split_by_variant.sh cp $@
 
+da830evm_config:       unconfig
+       @$(MKCONFIG) $(@:_config=) arm arm926ejs da830evm davinci davinci
+
 davinci_dvevm_config : unconfig
        @$(MKCONFIG) $(@:_config=) arm arm926ejs dvevm davinci davinci
 
index 6c47d6267b992d7db3bf1c781ba6a4c9f49068bf..3b9c53f57f2e99acb43b52683d5611faf80c6a77 100644 (file)
@@ -74,11 +74,11 @@ DATA 0xFFD0140C 0x00000a33  #  DDR Timing (High)
 # bit12-11: TW2W
 # bit31-13: zero required
 
-DATA 0xFFD01410 0x00000099     #  DDR Address Control
-# bit1-0:   01, Cs0width=x16
-# bit3-2:   10, Cs0size=512Mb
-# bit5-4:   01, Cs1width=x16
-# bit7-6:   10, Cs1size=512Mb
+DATA 0xFFD01410 0x000000cc     #  DDR Address Control
+# bit1-0:   00, Cs0width=x8
+# bit3-2:   11, Cs0size=1Gb
+# bit5-4:   00, Cs1width=x8
+# bit7-6:   11, Cs1size=1Gb
 # bit9-8:   00, Cs2width=nonexistent
 # bit11-10: 00, Cs2size =nonexistent
 # bit13-12: 00, Cs3width=nonexistent
index 290415c9d0318f13802efe17223892cfd0c57668..01db41c37319476f515157b610eddb7fb47063a9 100644 (file)
@@ -34,3 +34,7 @@ endif
 ifeq ($(debug),1)
 PLATFORM_CPPFLAGS += -DDEBUG
 endif
+
+ifdef CONFIG_NAND_U_BOOT
+LDSCRIPT := $(TOPDIR)/board/$(BOARDDIR)/u-boot-nand.lds
+endif
diff --git a/board/amcc/acadia/u-boot.lds b/board/amcc/acadia/u-boot.lds
deleted file mode 100644 (file)
index d37200d..0000000
+++ /dev/null
@@ -1,134 +0,0 @@
-/*
- * (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(powerpc)
-/* Do we need any of these for elf?
-   __DYNAMIC = 0;    */
-SECTIONS
-{
-  .resetvec 0xFFFFFFFC :
-  {
-    *(.resetvec)
-  } = 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)
-
-    *(.text)
-    *(.got1)
-  }
-  _etext = .;
-  PROVIDE (etext = .);
-  .rodata    :
-  {
-    *(.eh_frame)
-    *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
-  }
-  .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 = .);
-}
index 2598f2cf41d703abeb210c487144bc098b9e9b3a..c90f86b8d802748afef24e4abb924609726af846 100644 (file)
@@ -466,166 +466,6 @@ phys_size_t initdram (int board_type)
 #endif
 }
 
-/*************************************************************************
- *  pci_pre_init
- *
- *  This routine is called just prior to registering the hose and gives
- *  the board the opportunity to check things. Returning a value of zero
- *  indicates that things are bad & PCI initialization should be aborted.
- *
- *     Different boards may wish to customize the pci controller structure
- *     (add regions, override default access routines, etc) or perform
- *     certain pre-initialization actions.
- *
- ************************************************************************/
-#if defined(CONFIG_PCI)
-int pci_pre_init(struct pci_controller *hose)
-{
-       unsigned long addr;
-
-       /*-------------------------------------------------------------------------+
-         | Set priority for all PLB3 devices to 0.
-         | Set PLB3 arbiter to fair mode.
-         +-------------------------------------------------------------------------*/
-       mfsdr(SD0_AMP1, addr);
-       mtsdr(SD0_AMP1, (addr & 0x000000FF) | 0x0000FF00);
-       addr = mfdcr(PLB3_ACR);
-       mtdcr(PLB3_ACR, addr | 0x80000000);
-
-       /*-------------------------------------------------------------------------+
-         | Set priority for all PLB4 devices to 0.
-         +-------------------------------------------------------------------------*/
-       mfsdr(SD0_AMP0, addr);
-       mtsdr(SD0_AMP0, (addr & 0x000000FF) | 0x0000FF00);
-       addr = mfdcr(PLB4_ACR) | 0xa0000000;    /* Was 0x8---- */
-       mtdcr(PLB4_ACR, addr);
-
-       /*-------------------------------------------------------------------------+
-         | Set Nebula PLB4 arbiter to fair mode.
-         +-------------------------------------------------------------------------*/
-       /* Segment0 */
-       addr = (mfdcr(PLB0_ACR) & ~PLB0_ACR_PPM_MASK) | PLB0_ACR_PPM_FAIR;
-       addr = (addr & ~PLB0_ACR_HBU_MASK) | PLB0_ACR_HBU_ENABLED;
-       addr = (addr & ~PLB0_ACR_RDP_MASK) | PLB0_ACR_RDP_4DEEP;
-       addr = (addr & ~PLB0_ACR_WRP_MASK) | PLB0_ACR_WRP_2DEEP;
-       mtdcr(PLB0_ACR, addr);
-
-       /* Segment1 */
-       addr = (mfdcr(PLB1_ACR) & ~PLB1_ACR_PPM_MASK) | PLB1_ACR_PPM_FAIR;
-       addr = (addr & ~PLB1_ACR_HBU_MASK) | PLB1_ACR_HBU_ENABLED;
-       addr = (addr & ~PLB1_ACR_RDP_MASK) | PLB1_ACR_RDP_4DEEP;
-       addr = (addr & ~PLB1_ACR_WRP_MASK) | PLB1_ACR_WRP_2DEEP;
-       mtdcr(PLB1_ACR, addr);
-
-       return 1;
-}
-#endif /* defined(CONFIG_PCI) */
-
-/*************************************************************************
- *  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)
-{
-       /*--------------------------------------------------------------------------+
-        * Set up Direct MMIO registers
-        *--------------------------------------------------------------------------*/
-       /*--------------------------------------------------------------------------+
-         | PowerPC440 EP PCI Master configuration.
-         | Map one 1Gig range of PLB/processor addresses to PCI memory space.
-         |   PLB address 0xA0000000-0xDFFFFFFF ==> PCI address 0xA0000000-0xDFFFFFFF
-         |   Use byte reversed out routines to handle endianess.
-         | Make this region non-prefetchable.
-         +--------------------------------------------------------------------------*/
-       out32r(PCIL0_PMM0MA, 0x00000000);       /* PMM0 Mask/Attribute - disabled b4 setting */
-       out32r(PCIL0_PMM0LA, CONFIG_SYS_PCI_MEMBASE);   /* PMM0 Local Address */
-       out32r(PCIL0_PMM0PCILA, CONFIG_SYS_PCI_MEMBASE);        /* PMM0 PCI Low Address */
-       out32r(PCIL0_PMM0PCIHA, 0x00000000);    /* PMM0 PCI High Address */
-       out32r(PCIL0_PMM0MA, 0xE0000001);       /* 512M + No prefetching, and enable region */
-
-       out32r(PCIL0_PMM1MA, 0x00000000);       /* PMM0 Mask/Attribute - disabled b4 setting */
-       out32r(PCIL0_PMM1LA, CONFIG_SYS_PCI_MEMBASE2); /* PMM0 Local Address */
-       out32r(PCIL0_PMM1PCILA, CONFIG_SYS_PCI_MEMBASE2);       /* PMM0 PCI Low Address */
-       out32r(PCIL0_PMM1PCIHA, 0x00000000);    /* PMM0 PCI High Address */
-       out32r(PCIL0_PMM1MA, 0xE0000001);       /* 512M + No prefetching, and enable region */
-
-       out32r(PCIL0_PTM1MS, 0x00000001);       /* Memory Size/Attribute */
-       out32r(PCIL0_PTM1LA, 0);        /* Local Addr. Reg */
-       out32r(PCIL0_PTM2MS, 0);        /* Memory Size/Attribute */
-       out32r(PCIL0_PTM2LA, 0);        /* Local Addr. Reg */
-
-       /*--------------------------------------------------------------------------+
-        * Set up Configuration registers
-        *--------------------------------------------------------------------------*/
-
-       /* Program the board's subsystem id/vendor id */
-       pci_write_config_word(0, PCI_SUBSYSTEM_VENDOR_ID,
-                             CONFIG_SYS_PCI_SUBSYS_VENDORID);
-       pci_write_config_word(0, PCI_SUBSYSTEM_ID, CONFIG_SYS_PCI_SUBSYS_ID);
-
-       /* Configure command register as bus master */
-       pci_write_config_word(0, PCI_COMMAND, PCI_COMMAND_MASTER);
-
-       /* 240nS PCI clock */
-       pci_write_config_word(0, PCI_LATENCY_TIMER, 1);
-
-       /* No error reporting */
-       pci_write_config_word(0, PCI_ERREN, 0);
-
-       pci_write_config_dword(0, PCI_BRDGOPT2, 0x00000101);
-
-}
-#endif                         /* defined(CONFIG_PCI) && defined(CONFIG_SYS_PCI_TARGET_INIT) */
-
-/*************************************************************************
- *  pci_master_init
- *
- ************************************************************************/
-#if defined(CONFIG_PCI) && defined(CONFIG_SYS_PCI_MASTER_INIT)
-void pci_master_init(struct pci_controller *hose)
-{
-       unsigned short temp_short;
-
-       /*--------------------------------------------------------------------------+
-         | Write the PowerPC440 EP PCI Configuration regs.
-         |   Enable PowerPC440 EP to be a master on the PCI bus (PMM).
-         |   Enable PowerPC440 EP to act as a PCI memory target (PTM).
-         +--------------------------------------------------------------------------*/
-       pci_read_config_word(0, PCI_COMMAND, &temp_short);
-       pci_write_config_word(0, PCI_COMMAND,
-                             temp_short | PCI_COMMAND_MASTER |
-                             PCI_COMMAND_MEMORY);
-}
-#endif                         /* defined(CONFIG_PCI) && defined(CONFIG_SYS_PCI_MASTER_INIT) */
-
-/*************************************************************************
- *  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.
- *
- *
- ************************************************************************/
-#if defined(CONFIG_PCI)
-int is_pci_host(struct pci_controller *hose)
-{
-       /* Bamboo is always configured as host. */
-       return (1);
-}
-#endif                         /* defined(CONFIG_PCI) */
-
 /*----------------------------------------------------------------------------+
   | is_powerpc440ep_pass1.
   +----------------------------------------------------------------------------*/
index a37636a0a1452e44047a28b6ca89e98797b68787..72b6bc0c09a7d284ab6e5f315b562e087a2c8e38 100644 (file)
@@ -36,3 +36,7 @@ endif
 ifeq ($(dbcr),1)
 PLATFORM_CPPFLAGS += -DCONFIG_SYS_INIT_DBCR=0x8cff0000
 endif
+
+ifdef CONFIG_NAND_U_BOOT
+LDSCRIPT := $(TOPDIR)/board/$(BOARDDIR)/u-boot-nand.lds
+endif
diff --git a/board/amcc/bamboo/u-boot.lds b/board/amcc/bamboo/u-boot.lds
deleted file mode 100644 (file)
index bcde534..0000000
+++ /dev/null
@@ -1,143 +0,0 @@
-/*
- * (C) Copyright 2002
- * 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/amcc/bamboo/init.o   (.text)
-    board/amcc/bamboo/bamboo.o (.text)
-
-    *(.text)
-    *(.got1)
-  }
-  _etext = .;
-  PROVIDE (etext = .);
-  .rodata    :
-  {
-    *(.eh_frame)
-    *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
-  }
-  .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 = .);
-}
diff --git a/board/amcc/bubinga/u-boot.lds b/board/amcc/bubinga/u-boot.lds
deleted file mode 100644 (file)
index d37200d..0000000
+++ /dev/null
@@ -1,134 +0,0 @@
-/*
- * (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(powerpc)
-/* Do we need any of these for elf?
-   __DYNAMIC = 0;    */
-SECTIONS
-{
-  .resetvec 0xFFFFFFFC :
-  {
-    *(.resetvec)
-  } = 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)
-
-    *(.text)
-    *(.got1)
-  }
-  _etext = .;
-  PROVIDE (etext = .);
-  .rodata    :
-  {
-    *(.eh_frame)
-    *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
-  }
-  .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 = .);
-}
index 91fae1917dd12fdbd7587b60fec8410e41707e00..13a0daced774ae24ebeb579df73f0fb4633998f7 100644 (file)
@@ -326,141 +326,17 @@ phys_size_t initdram(int board_type)
 }
 #endif
 
-/*
- *  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 *)PCIL0_PIM0SA, 0); /* disable */
-       out_le32((void *)PCIL0_PIM1SA, 0); /* disable */
-       out_le32((void *)PCIL0_PIM2SA, 0); /* disable */
-       out_le32((void *)PCIL0_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 *)PCIL0_PIM0LAL, CONFIG_SYS_SDRAM_BASE);
-       out_le32((void *)PCIL0_PIM0LAH, 0);
-       out_le32((void *)PCIL0_PIM0SA, ~(gd->ram_size - 1) | 1);
-       out_le32((void *)PCIL0_BAR0, 0);
-
-       /*
-        * Program the board's subsystem id/vendor id
-        */
-       out_le16((void *)PCIL0_SBSYSVID, CONFIG_SYS_PCI_SUBSYS_VENDORID);
-       out_le16((void *)PCIL0_SBSYSID, CONFIG_SYS_PCI_SUBSYS_DEVICEID);
-
-       out_le16((void *)PCIL0_CMD, in16r(PCIL0_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)
+int board_pcie_first(void)
 {
-       /* Board is always configured as host. */
-       return (1);
-}
-
-static struct pci_controller pcie_hose[2] = {{0},{0}};
-
-void pcie_setup_hoses(int busno)
-{
-       struct pci_controller *hose;
-       int i, bus;
-       int ret = 0;
-       char *env;
-       unsigned int delay;
-       int start;
-
-       /*
-        * assume we're called after the PCIX hose is initialized, which takes
-        * bus ID 0 and therefore start numbering PCIe's from 1.
-        */
-       bus = busno;
-
        /*
         * Canyonlands with SATA enabled has only one PCIe slot
         * (2nd one).
         */
        if (gd->board_type == BOARD_CANYONLANDS_SATA)
-               start = 1;
-       else
-               start = 0;
-
-       for (i = start; i <= 1; i++) {
+               return 1;
 
-               if (is_end_point(i))
-                       ret = ppc4xx_init_pcie_endport(i);
-               else
-                       ret = ppc4xx_init_pcie_rootport(i);
-               if (ret == -ENODEV)
-                       continue;
-               if (ret) {
-                       printf("PCIE%d: initialization as %s failed\n", i,
-                              is_end_point(i) ? "endpoint" : "root-complex");
-                       continue;
-               }
-
-               hose = &pcie_hose[i];
-               hose->first_busno = bus;
-               hose->last_busno = bus;
-               hose->current_busno = bus;
-
-               /* setup mem resource */
-               pci_set_region(hose->regions + 0,
-                              CONFIG_SYS_PCIE_MEMBASE + i * CONFIG_SYS_PCIE_MEMSIZE,
-                              CONFIG_SYS_PCIE_MEMBASE + i * CONFIG_SYS_PCIE_MEMSIZE,
-                              CONFIG_SYS_PCIE_MEMSIZE,
-                              PCI_REGION_MEM);
-               hose->region_count = 1;
-               pci_register_hose(hose);
-
-               if (is_end_point(i)) {
-                       ppc4xx_setup_pcie_endpoint(hose, i);
-                       /*
-                        * Reson for no scanning is endpoint can not generate
-                        * upstream configuration accesses.
-                        */
-               } else {
-                       ppc4xx_setup_pcie_rootpoint(hose, i);
-                       env = getenv ("pciscandelay");
-                       if (env != NULL) {
-                               delay = simple_strtoul(env, NULL, 10);
-                               if (delay > 5)
-                                       printf("Warning, expect noticable delay before "
-                                              "PCIe scan due to 'pciscandelay' value!\n");
-                               mdelay(delay * 1000);
-                       }
-
-                       /*
-                        * Config access can only go down stream
-                        */
-                       hose->last_busno = pci_hose_scan(hose);
-                       bus = hose->last_busno + 1;
-               }
-       }
+       return 0;
 }
 #endif /* CONFIG_PCI */
 
index 551a8175563bf9499385b248529909e19d7d21bc..7a5866550c60935d2e34d6d644433441a44ab1b6 100644 (file)
@@ -39,3 +39,7 @@ endif
 ifeq ($(dbcr),1)
 PLATFORM_CPPFLAGS += -DCONFIG_SYS_INIT_DBCR=0x8cff0000
 endif
+
+ifdef CONFIG_NAND_U_BOOT
+LDSCRIPT := $(TOPDIR)/board/$(BOARDDIR)/u-boot-nand.lds
+endif
diff --git a/board/amcc/canyonlands/u-boot.lds b/board/amcc/canyonlands/u-boot.lds
deleted file mode 100644 (file)
index 22fb8b8..0000000
+++ /dev/null
@@ -1,141 +0,0 @@
-/*
- * (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/amcc/canyonlands/init.o      (.text)
-
-    *(.text)
-    *(.got1)
-  }
-  _etext = .;
-  PROVIDE (etext = .);
-  .rodata    :
-  {
-    *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
-  }
-  .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       :
-  {
-   *(.sbss) *(.scommon)
-   *(.dynbss)
-   *(.bss)
-   *(COMMON)
-   . = ALIGN(4);
-  }
-
-  _end = . ;
-  PROVIDE (end = .);
-}
index 0ca1accec8d86dc9f9b9ec15034101614714758b..923dbca718d55f01596b2f9e91223bd77bcf478c 100644 (file)
@@ -164,96 +164,3 @@ long int fixed_sdram(void)
        return (128 * 1024 * 1024);     /* 128 MB                           */
 }
 #endif                         /* !defined(CONFIG_SPD_EEPROM) */
-
-/*************************************************************************
- *  pci_pre_init
- *
- *  This routine is called just prior to registering the hose and gives
- *  the board the opportunity to check things. Returning a value of zero
- *  indicates that things are bad & PCI initialization should be aborted.
- *
- *     Different boards may wish to customize the pci controller structure
- *     (add regions, override default access routines, etc) or perform
- *     certain pre-initialization actions.
- *
- ************************************************************************/
-#if defined(CONFIG_PCI)
-int pci_pre_init(struct pci_controller *hose)
-{
-       unsigned long strap;
-
-       /*--------------------------------------------------------------------------+
-        * The ebony board is always configured as the host & requires the
-        * PCI arbiter to be enabled.
-        *--------------------------------------------------------------------------*/
-       strap = mfdcr(CPC0_STRP1);
-       if ((strap & 0x00100000) == 0) {
-               printf("PCI: CPC0_STRP1[PAE] not set.\n");
-               return 0;
-       }
-
-       return 1;
-}
-#endif /* defined(CONFIG_PCI) */
-
-/*************************************************************************
- *  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
-        *--------------------------------------------------------------------------*/
-       out32r(PCIL0_PIM0SA, 0);        /* disable */
-       out32r(PCIL0_PIM1SA, 0);        /* disable */
-       out32r(PCIL0_PIM2SA, 0);        /* disable */
-       out32r(PCIL0_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.
-        *--------------------------------------------------------------------------*/
-       out32r(PCIL0_PIM0LAL, CONFIG_SYS_SDRAM_BASE);
-       out32r(PCIL0_PIM0LAH, 0);
-       out32r(PCIL0_PIM0SA, ~(gd->ram_size - 1) | 1);
-
-       out32r(PCIL0_BAR0, 0);
-
-       /*--------------------------------------------------------------------------+
-        * Program the board's subsystem id/vendor id
-        *--------------------------------------------------------------------------*/
-       out16r(PCIL0_SBSYSVID, CONFIG_SYS_PCI_SUBSYS_VENDORID);
-       out16r(PCIL0_SBSYSID, CONFIG_SYS_PCI_SUBSYS_DEVICEID);
-
-       out16r(PCIL0_CMD, in16r(PCIL0_CMD) | PCI_COMMAND_MEMORY);
-}
-#endif                         /* defined(CONFIG_PCI) && defined(CONFIG_SYS_PCI_TARGET_INIT) */
-
-/*************************************************************************
- *  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.
- *
- *
- ************************************************************************/
-#if defined(CONFIG_PCI)
-int is_pci_host(struct pci_controller *hose)
-{
-       /* The ebony board is always configured as host. */
-       return (1);
-}
-#endif                         /* defined(CONFIG_PCI) */
diff --git a/board/amcc/ebony/u-boot.lds b/board/amcc/ebony/u-boot.lds
deleted file mode 100644 (file)
index 4cb2e6c..0000000
+++ /dev/null
@@ -1,141 +0,0 @@
-/*
- * (C) Copyright 2002
- * 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/amcc/ebony/init.o    (.text)
-
-    *(.text)
-    *(.got1)
-  }
-  _etext = .;
-  PROVIDE (etext = .);
-  .rodata    :
-  {
-    *(.eh_frame)
-    *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
-  }
-  .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 = .);
-}
index 318016d2ceba110bf812c80a4b9f661c09cb85b7..168bab5d2f1cb39d91ed10fba8bf8ef54746fc64 100644 (file)
@@ -25,9 +25,11 @@ include $(TOPDIR)/config.mk
 
 LIB    = $(obj)lib$(BOARD).a
 
-COBJS  = $(BOARD).o cmd_katmai.o
+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))
diff --git a/board/amcc/katmai/chip_config.c b/board/amcc/katmai/chip_config.c
new file mode 100644 (file)
index 0000000..efaf378
--- /dev/null
@@ -0,0 +1,55 @@
+/*
+ * (C) Copyright 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[] = {
+       {
+               "400-133","CPU: 400 PLB: 133 OPB:  66 EBC:  66",
+               { 0x86, 0x78, 0xc2, 0xc6, 0x05, 0xa5, 0x04, 0xe1 }
+       },
+       {
+               "500-166","CPU: 500 PLB: 166 OPB:  83 EBC:  83",
+               { 0x87, 0x78, 0xf2, 0xc6, 0x05, 0xa5, 0x04, 0xe1 }
+       },
+       {
+               "533-133","CPU: 533 PLB: 133 OPB:  66 EBC:  66",
+               { 0x87, 0x79, 0x02, 0x52, 0x05, 0xa5, 0x04, 0xe1 }
+       },
+       {
+               "667-133","CPU: 667 PLB: 133 OPB:  66 EBC:  66",
+               { 0x87, 0x79, 0x42, 0x56, 0x05, 0xa5, 0x04, 0xe1 }
+       },
+       {
+               "667-166","CPU: 667 PLB: 166 OPB:  83 EBC:  83",
+               { 0x87, 0x79, 0x42, 0x06, 0x05, 0xa5, 0x04, 0xe1 }
+       },
+       {
+               "800-160","CPU: 800 PLB: 160 OPB:  53 EBC:  17",
+               { 0x86, 0x79, 0x81, 0xa7, 0x07, 0xa5, 0x04, 0xe1 }
+       },
+};
+
+int ppc4xx_config_count = ARRAY_SIZE(ppc4xx_config_val);
diff --git a/board/amcc/katmai/cmd_katmai.c b/board/amcc/katmai/cmd_katmai.c
deleted file mode 100644 (file)
index 335d30c..0000000
+++ /dev/null
@@ -1,218 +0,0 @@
-/*
- * (C) Copyright 2007
- * 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 <command.h>
-#include <i2c.h>
-#include <asm/byteorder.h>
-
-#define        CONFIG_STRESS           /* enable 667 MHz CPU freq selection */
-#define DEBUG
-
-static int do_bootstrap(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
-{
-       uchar   chip;
-       ulong   data;
-       int     nbytes;
-       extern char console_buffer[];
-
-       char sysClock[4];
-       char cpuClock[4];
-       char plbClock[4];
-       char pcixClock[4];
-
-       if (argc < 3) {
-               cmd_usage(cmdtp);
-               return 1;
-       }
-
-       if (strcmp(argv[2], "prom0") == 0)
-               chip = IIC0_BOOTPROM_ADDR;
-       else
-               chip = IIC0_ALT_BOOTPROM_ADDR;
-
-       /* on Katmai SysClk is always 33MHz */
-       strcpy(sysClock, "33");
-
-       do {
-#ifdef CONFIG_STRESS
-               printf("enter cpu clock frequency 400, 500, 533, 667 MHz or quit to abort\n");
-#else
-               printf("enter cpu clock frequency 400, 500, 533 MHz or quit to abort\n");
-#endif
-               nbytes = readline (" ? ");
-
-               if (strcmp(console_buffer, "quit") == 0)
-                       return 0;
-
-               if ((strcmp(console_buffer, "400") != 0) &&
-                   (strcmp(console_buffer, "500") != 0) &&
-                   (strcmp(console_buffer, "533") != 0)
-#ifdef CONFIG_STRESS
-                   && (strcmp(console_buffer, "667") != 0)
-#endif
-                       ) {
-                       nbytes = 0;
-               }
-
-               strcpy(cpuClock, console_buffer);
-
-       } while (nbytes == 0);
-
-       if (strcmp(cpuClock, "500") == 0)
-               strcpy(plbClock, "166");
-       else if (strcmp(cpuClock, "533") == 0)
-               strcpy(plbClock, "133");
-       else {
-               do {
-                       if (strcmp(cpuClock, "400") == 0)
-                               printf("enter plb clock frequency 100, 133 MHz or quit to abort\n");
-
-#ifdef CONFIG_STRESS
-                       if (strcmp(cpuClock, "667") == 0)
-                               printf("enter plb clock frequency 133, 166 MHz or quit to abort\n");
-
-#endif
-                       nbytes = readline (" ? ");
-
-                       if (strcmp(console_buffer, "quit") == 0)
-                               return 0;
-
-                       if (strcmp(cpuClock, "400") == 0) {
-                               if ((strcmp(console_buffer, "100") != 0) &&
-                                   (strcmp(console_buffer, "133") != 0))
-                                       nbytes = 0;
-                       }
-#ifdef CONFIG_STRESS
-                       if (strcmp(cpuClock, "667") == 0) {
-                               if ((strcmp(console_buffer, "133") != 0) &&
-                                   (strcmp(console_buffer, "166") != 0))
-                                       nbytes = 0;
-                       }
-#endif
-                       strcpy(plbClock, console_buffer);
-
-               } while (nbytes == 0);
-       }
-
-       do {
-               printf("enter Pci-X clock frequency 33, 66, 100 or 133 MHz or quit to abort\n");
-               nbytes = readline (" ? ");
-
-               if (strcmp(console_buffer, "quit") == 0)
-                       return 0;
-
-               if ((strcmp(console_buffer, "33") != 0) &&
-                   (strcmp(console_buffer, "66") != 0) &&
-                   (strcmp(console_buffer, "100") != 0) &&
-                   (strcmp(console_buffer, "133") != 0)) {
-                       nbytes = 0;
-               }
-               strcpy(pcixClock, console_buffer);
-
-       } while (nbytes == 0);
-
-       printf("\nsys clk   = %s MHz\n", sysClock);
-       printf("cpu clk   = %s MHz\n", cpuClock);
-       printf("plb clk   = %s MHz\n", plbClock);
-       printf("Pci-X clk = %s MHz\n", pcixClock);
-
-       do {
-               printf("\npress [y] to write I2C bootstrap \n");
-               printf("or [n] to abort.  \n");
-               printf("Don't forget to set board switches \n");
-               printf("according to your choice before re-starting \n");
-               printf("(refer to 440spe_uboot_kit_um_1_01.pdf) \n");
-
-               nbytes = readline (" ? ");
-               if (strcmp(console_buffer, "n") == 0)
-                       return 0;
-
-       } while (nbytes == 0);
-
-       if (strcmp(sysClock, "33") == 0) {
-               if ((strcmp(cpuClock, "400") == 0) &&
-                   (strcmp(plbClock, "100") == 0))
-                       data = 0x8678c206;
-
-               if ((strcmp(cpuClock, "400") == 0) &&
-                   (strcmp(plbClock, "133") == 0))
-                       data = 0x8678c2c6;
-
-               if ((strcmp(cpuClock, "500") == 0))
-                       data = 0x8778f2c6;
-
-               if ((strcmp(cpuClock, "533") == 0))
-                       data = 0x87790252;
-#ifdef CONFIG_STRESS
-               if ((strcmp(cpuClock, "667") == 0) &&
-                   (strcmp(plbClock, "133") == 0))
-                       data = 0x87794256;
-
-               if ((strcmp(cpuClock, "667") == 0) &&
-                   (strcmp(plbClock, "166") == 0))
-                       data = 0x87794206;
-#endif
-       }
-#ifdef DEBUG
-       printf(" pin strap0 to write in i2c  = %lx\n", data);
-#endif /* DEBUG */
-
-       if (i2c_write(chip, 0, 1, (uchar *)&data, 4) != 0)
-               printf("Error writing strap0 in %s\n", argv[2]);
-
-       if (strcmp(pcixClock, "33") == 0)
-               data = 0x000007E1;
-
-       if (strcmp(pcixClock, "66") == 0)
-               data = 0x000006E1;
-
-       if (strcmp(pcixClock, "100") == 0)
-               data = 0x000005E1;
-
-       if (strcmp(pcixClock, "133") == 0)
-               data = 0x000004E1;
-
-       if (strcmp(plbClock, "166") == 0)
-/*             data |= 0x05950000; */  /* this set's DDR2 clock == PLB clock */
-               data |= 0x05A50000;     /* this set's DDR2 clock == 2 * PLB clock */
-       else
-               data |= 0x05A50000;
-
-#ifdef DEBUG
-       printf(" pin strap1 to write in i2c  = %lx\n", data);
-#endif /* DEBUG */
-
-       udelay(1000);
-       if (i2c_write(chip, 4, 1, (uchar *)&data, 4) != 0)
-               printf("Error writing strap1 in %s\n", argv[2]);
-
-       return 0;
-}
-
-U_BOOT_CMD(
-       bootstrap,      3,      1,      do_bootstrap,
-       "program the serial device strap",
-       "wrclk [prom0|prom1] - program the serial device strap"
-);
index 908f1a5953c423ec457ecc7784fe358e44879a6a..54e2a39aa14dd2cc9122b025619af8ba819ef996 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * (C) Copyright 2007-2008
+ * (C) Copyright 2007-2009
  * Stefan Roese, DENX Software Engineering, sr@denx.de.
  *
  * See file CREDITS for list of people who contributed to this
@@ -260,98 +260,8 @@ u32 ddr_clktr(u32 default_val) {
        return (SDRAM_CLKTR_CLKP_90_DEG_ADV);
 }
 
-/*************************************************************************
- *  pci_pre_init
- *
- *  This routine is called just prior to registering the hose and gives
- *  the board the opportunity to check things. Returning a value of zero
- *  indicates that things are bad & PCI initialization should be aborted.
- *
- *     Different boards may wish to customize the pci controller structure
- *     (add regions, override default access routines, etc) or perform
- *     certain pre-initialization actions.
- *
- ************************************************************************/
-#if defined(CONFIG_PCI)
-int pci_pre_init(struct pci_controller * hose )
-{
-       unsigned long strap;
-
-       /*-------------------------------------------------------------------+
-        *      The katmai board is always configured as the host & requires the
-        *      PCI arbiter to be enabled.
-        *-------------------------------------------------------------------*/
-       mfsdr(SDR0_SDSTP1, strap);
-       if( (strap & SDR0_SDSTP1_PAE_MASK) == 0 ) {
-               printf("PCI: SDR0_STRP1[%08lX] - PCI Arbiter disabled.\n",strap);
-               return 0;
-       }
-
-       return 1;
-}
-#endif /* defined(CONFIG_PCI) */
-
-/*************************************************************************
- *  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
-        *-------------------------------------------------------------------*/
-       out32r( PCIL0_PIM0SA, 0 ); /* disable */
-       out32r( PCIL0_PIM1SA, 0 ); /* disable */
-       out32r( PCIL0_PIM2SA, 0 ); /* disable */
-       out32r( PCIL0_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.
-        *-------------------------------------------------------------------*/
-       out32r( PCIL0_PIM0LAL, CONFIG_SYS_SDRAM_BASE );
-       out32r( PCIL0_PIM0LAH, 0 );
-       out32r( PCIL0_PIM0SA, ~(gd->ram_size - 1) | 1 );
-       out32r( PCIL0_BAR0, 0 );
-
-       /*-------------------------------------------------------------------+
-        * Program the board's subsystem id/vendor id
-        *-------------------------------------------------------------------*/
-       out16r( PCIL0_SBSYSVID, CONFIG_SYS_PCI_SUBSYS_VENDORID );
-       out16r( PCIL0_SBSYSID, CONFIG_SYS_PCI_SUBSYS_DEVICEID );
-
-       out16r( PCIL0_CMD, in16r(PCIL0_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)
-{
-       /* The katmai board is always configured as host. */
-       return 1;
-}
-
-static int katmai_pcie_card_present(int port)
+int board_pcie_card_present(int port)
 {
        u32 val;
 
@@ -367,91 +277,8 @@ static int katmai_pcie_card_present(int port)
                return 0;
        }
 }
-
-static struct pci_controller pcie_hose[3] = {{0},{0},{0}};
-
-void pcie_setup_hoses(int busno)
-{
-       struct pci_controller *hose;
-       int i, bus;
-       int ret = 0;
-       char *env;
-       unsigned int delay;
-
-       /*
-        * assume we're called after the PCIX hose is initialized, which takes
-        * bus ID 0 and therefore start numbering PCIe's from 1.
-        */
-       bus = busno;
-       for (i = 0; i <= 2; i++) {
-               /* Check for katmai card presence */
-               if (!katmai_pcie_card_present(i))
-                       continue;
-
-               if (is_end_point(i))
-                       ret = ppc4xx_init_pcie_endport(i);
-               else
-                       ret = ppc4xx_init_pcie_rootport(i);
-               if (ret == -ENODEV)
-                       continue;
-               if (ret) {
-                       printf("PCIE%d: initialization as %s failed\n", i,
-                              is_end_point(i) ? "endpoint" : "root-complex");
-                       continue;
-               }
-
-               hose = &pcie_hose[i];
-               hose->first_busno = bus;
-               hose->last_busno = bus;
-               hose->current_busno = bus;
-
-               /* setup mem resource */
-               pci_set_region(hose->regions + 0,
-                              CONFIG_SYS_PCIE_MEMBASE + i * CONFIG_SYS_PCIE_MEMSIZE,
-                              CONFIG_SYS_PCIE_MEMBASE + i * CONFIG_SYS_PCIE_MEMSIZE,
-                              CONFIG_SYS_PCIE_MEMSIZE,
-                              PCI_REGION_MEM);
-               hose->region_count = 1;
-               pci_register_hose(hose);
-
-               if (is_end_point(i)) {
-                       ppc4xx_setup_pcie_endpoint(hose, i);
-                       /*
-                        * Reson for no scanning is endpoint can not generate
-                        * upstream configuration accesses.
-                        */
-               } else {
-                       ppc4xx_setup_pcie_rootpoint(hose, i);
-                       env = getenv ("pciscandelay");
-                       if (env != NULL) {
-                               delay = simple_strtoul(env, NULL, 10);
-                               if (delay > 5)
-                                       printf("Warning, expect noticable delay before "
-                                              "PCIe scan due to 'pciscandelay' value!\n");
-                               mdelay(delay * 1000);
-                       }
-
-                       /*
-                        * Config access can only go down stream
-                        */
-                       hose->last_busno = pci_hose_scan(hose);
-                       bus = hose->last_busno + 1;
-               }
-       }
-}
 #endif /* defined(CONFIG_PCI) */
 
-#ifdef CONFIG_POST
-/*
- * Returns 1 if keys pressed to start the power-on long-running tests
- * Called from board_init_f().
- */
-int post_hotkeys_pressed(void)
-{
-       return (ctrlc());
-}
-#endif
-
 int board_eth_init(bd_t *bis)
 {
        cpu_eth_init(bis);
diff --git a/board/amcc/katmai/u-boot.lds b/board/amcc/katmai/u-boot.lds
deleted file mode 100644 (file)
index f2231c2..0000000
+++ /dev/null
@@ -1,138 +0,0 @@
-/*
- * (C) Copyright 2004
- * 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      :
-  {
-    cpu/ppc4xx/start.o         (.text)
-    board/amcc/katmai/init.o   (.text)
-
-    *(.text)
-    *(.got1)
-  }
-  _etext = .;
-  PROVIDE (etext = .);
-  .rodata    :
-  {
-    *(.eh_frame)
-    *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
-  }
-  .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 = .);
-}
index f5800ebe8269101d6407e74fcabfb44f2b6d47bf..b3d3f227f34532ef3287a2b62984e6f1212b7f2b 100644 (file)
@@ -30,3 +30,7 @@ endif
 ifeq ($(debug),1)
 PLATFORM_CPPFLAGS += -DDEBUG
 endif
+
+ifdef CONFIG_NAND_U_BOOT
+LDSCRIPT := $(TOPDIR)/board/$(BOARDDIR)/u-boot-nand.lds
+endif
index 5cd822a7fa6b9b63dc7fd50b8284e00023bbf8b5..8ce244555acfdde7cb9c891368807860c948c082 100644 (file)
@@ -252,15 +252,19 @@ int board_emac_count(void)
                return 2;
 }
 
-static int board_pcie_count(void)
+/*
+ * Override the weak default implementation and return the
+ * last PCIe slot number (max number - 1).
+ */
+int board_pcie_last(void)
 {
        /*
         * 405EXr only has one EMAC interface, 405EX has two
         */
        if (is_405exr())
-               return 1;
+               return 1 - 1;
        else
-               return 2;
+               return 2 - 1;
 }
 
 int checkboard (void)
@@ -280,100 +284,3 @@ int checkboard (void)
 
        return (0);
 }
-
-/*************************************************************************
- *  pci_pre_init
- *
- *  This routine is called just prior to registering the hose and gives
- *  the board the opportunity to check things. Returning a value of zero
- *  indicates that things are bad & PCI initialization should be aborted.
- *
- *      Different boards may wish to customize the pci controller structure
- *      (add regions, override default access routines, etc) or perform
- *      certain pre-initialization actions.
- *
- ************************************************************************/
-#if defined(CONFIG_PCI)
-int pci_pre_init(struct pci_controller * hose )
-{
-       return 0;
-}
-#endif  /* defined(CONFIG_PCI) */
-
-#ifdef CONFIG_PCI
-static struct pci_controller pcie_hose[2] = {{0},{0}};
-
-void pcie_setup_hoses(int busno)
-{
-       struct pci_controller *hose;
-       int i, bus;
-       int ret = 0;
-       bus = busno;
-       char *env;
-       unsigned int delay;
-
-       for (i = 0; i < board_pcie_count(); i++) {
-
-               if (is_end_point(i))
-                       ret = ppc4xx_init_pcie_endport(i);
-               else
-                       ret = ppc4xx_init_pcie_rootport(i);
-               if (ret == -ENODEV)
-                       continue;
-               if (ret) {
-                       printf("PCIE%d: initialization as %s failed\n", i,
-                              is_end_point(i) ? "endpoint" : "root-complex");
-                       continue;
-               }
-
-               hose = &pcie_hose[i];
-               hose->first_busno = bus;
-               hose->last_busno = bus;
-               hose->current_busno = bus;
-
-               /* setup mem resource */
-               pci_set_region(hose->regions + 0,
-                              CONFIG_SYS_PCIE_MEMBASE + i * CONFIG_SYS_PCIE_MEMSIZE,
-                              CONFIG_SYS_PCIE_MEMBASE + i * CONFIG_SYS_PCIE_MEMSIZE,
-                              CONFIG_SYS_PCIE_MEMSIZE,
-                              PCI_REGION_MEM);
-               hose->region_count = 1;
-               pci_register_hose(hose);
-
-               if (is_end_point(i)) {
-                       ppc4xx_setup_pcie_endpoint(hose, i);
-                       /*
-                        * Reson for no scanning is endpoint can not generate
-                        * upstream configuration accesses.
-                        */
-               } else {
-                       ppc4xx_setup_pcie_rootpoint(hose, i);
-                       env = getenv ("pciscandelay");
-                       if (env != NULL) {
-                               delay = simple_strtoul(env, NULL, 10);
-                               if (delay > 5)
-                                       printf("Warning, expect noticable delay before "
-                                              "PCIe scan due to 'pciscandelay' value!\n");
-                               mdelay(delay * 1000);
-                       }
-
-                       /*
-                        * Config access can only go down stream
-                        */
-                       hose->last_busno = pci_hose_scan(hose);
-                       bus = hose->last_busno + 1;
-               }
-       }
-}
-#endif
-
-#if defined(CONFIG_POST)
-/*
- * Returns 1 if keys pressed to start the power-on long-running tests
- * Called from board_init_f().
- */
-int post_hotkeys_pressed(void)
-{
-       return 0;       /* No hotkeys supported */
-}
-#endif /* CONFIG_POST */
diff --git a/board/amcc/kilauea/u-boot.lds b/board/amcc/kilauea/u-boot.lds
deleted file mode 100644 (file)
index bebb2b2..0000000
+++ /dev/null
@@ -1,134 +0,0 @@
-/*
- * (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(powerpc)
-/* Do we need any of these for elf?
-   __DYNAMIC = 0;    */
-SECTIONS
-{
-/* To compile successfully, uncomment the following section.
- * To go in ram, remove the section.
- * Added by SunHe.
- */
-  .resetvec 0xFFFFFFFC :
-  {
-    *(.resetvec)
-  } = 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      :
-  {
-    cpu/ppc4xx/start.o (.text)
-
-    *(.text)
-    *(.got1)
-  }
-  _etext = .;
-  PROVIDE (etext = .);
-  .rodata    :
-  {
-    *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
-  }
-  .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 = .);
-}
index a04f2af3b8dc02834b3f8959859dcd6b3fbde24d..332d170d6129b742ca5a42184745a3bc9ff3b12f 100644 (file)
@@ -126,102 +126,6 @@ u32 ddr_clktr(u32 default_val) {
        return (SDRAM_CLKTR_CLKP_180_DEG_ADV);
 }
 
-/*************************************************************************
- *  pci_pre_init
- *
- *  This routine is called just prior to registering the hose and gives
- *  the board the opportunity to check things. Returning a value of zero
- *  indicates that things are bad & PCI initialization should be aborted.
- *
- *     Different boards may wish to customize the pci controller structure
- *     (add regions, override default access routines, etc) or perform
- *     certain pre-initialization actions.
- *
- ************************************************************************/
-#if defined(CONFIG_PCI)
-int pci_pre_init( struct pci_controller *hose )
-{
-       unsigned long strap;
-
-       /*--------------------------------------------------------------------------+
-        *      The luan board is always configured as the host & requires the
-        *      PCI arbiter to be enabled.
-        *--------------------------------------------------------------------------*/
-       mfsdr(SDR0_SDSTP1, strap);
-       if( (strap & SDR0_SDSTP1_PAE_MASK) == 0 ) {
-               printf("PCI: SDR0_STRP1[%08lX] - PCI Arbiter disabled.\n",strap);
-
-               return  0;
-       }
-
-       return  1;
-}
-#endif /* defined(CONFIG_PCI) */
-
-
-/*************************************************************************
- *  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
-        *--------------------------------------------------------------------------*/
-       out32r( PCIL0_PIM0SA, 0 ); /* disable */
-       out32r( PCIL0_PIM1SA, 0 ); /* disable */
-       out32r( PCIL0_PIM2SA, 0 ); /* disable */
-       out32r( PCIL0_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.
-        *--------------------------------------------------------------------------*/
-       out32r( PCIL0_PIM0LAL, CONFIG_SYS_SDRAM_BASE );
-       out32r( PCIL0_PIM0LAH, 0 );
-       out32r( PCIL0_PIM0SA, ~(gd->ram_size - 1) | 1 );
-
-       out32r( PCIL0_BAR0, 0 );
-
-       /*--------------------------------------------------------------------------+
-        * Program the board's subsystem id/vendor id
-        *--------------------------------------------------------------------------*/
-       out16r( PCIL0_SBSYSVID, CONFIG_SYS_PCI_SUBSYS_VENDORID );
-       out16r( PCIL0_SBSYSID, CONFIG_SYS_PCI_SUBSYS_DEVICEID );
-
-       out16r( PCIL0_CMD, in16r(PCIL0_CMD) | PCI_COMMAND_MEMORY );
-}
-#endif /* defined(CONFIG_PCI) && defined(CONFIG_SYS_PCI_TARGET_INIT) */
-
-
-/*************************************************************************
- *  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.
- *
- *
- ************************************************************************/
-#if defined(CONFIG_PCI)
-int is_pci_host(struct pci_controller *hose)
-{
-       return  1;
-}
-#endif                         /* defined(CONFIG_PCI) */
-
-
 /*************************************************************************
  *  hw_watchdog_reset
  *
diff --git a/board/amcc/luan/u-boot.lds b/board/amcc/luan/u-boot.lds
deleted file mode 100644 (file)
index 12c5b60..0000000
+++ /dev/null
@@ -1,141 +0,0 @@
-/*
- * (C) Copyright 2002
- * 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/amcc/luan/init.o     (.text)
-
-    *(.text)
-    *(.got1)
-  }
-  _etext = .;
-  PROVIDE (etext = .);
-  .rodata    :
-  {
-    *(.eh_frame)
-    *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
-  }
-  .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 = .);
-}
index d4277dda99c7c29cafacbab2cf6cc34b36e994a6..4afe0916652e852ebb1e31e7c802ee721e7ff93b 100644 (file)
@@ -236,100 +236,3 @@ int checkboard (void)
 
        return (0);
 }
-
-/*************************************************************************
- *  pci_pre_init
- *
- *  This routine is called just prior to registering the hose and gives
- *  the board the opportunity to check things. Returning a value of zero
- *  indicates that things are bad & PCI initialization should be aborted.
- *
- *      Different boards may wish to customize the pci controller structure
- *      (add regions, override default access routines, etc) or perform
- *      certain pre-initialization actions.
- *
- ************************************************************************/
-#if defined(CONFIG_PCI)
-int pci_pre_init(struct pci_controller * hose )
-{
-       return 0;
-}
-#endif  /* defined(CONFIG_PCI) */
-
-#ifdef CONFIG_PCI
-static struct pci_controller pcie_hose[2] = {{0},{0}};
-
-void pcie_setup_hoses(int busno)
-{
-       struct pci_controller *hose;
-       int i, bus;
-       int ret = 0;
-       bus = busno;
-       char *env;
-       unsigned int delay;
-
-       for (i = 0; i < 2; i++) {
-
-               if (is_end_point(i))
-                       ret = ppc4xx_init_pcie_endport(i);
-               else
-                       ret = ppc4xx_init_pcie_rootport(i);
-               if (ret == -ENODEV)
-                       continue;
-               if (ret) {
-                       printf("PCIE%d: initialization as %s failed\n", i,
-                              is_end_point(i) ? "endpoint" : "root-complex");
-                       continue;
-               }
-
-               hose = &pcie_hose[i];
-               hose->first_busno = bus;
-               hose->last_busno = bus;
-               hose->current_busno = bus;
-
-               /* setup mem resource */
-               pci_set_region(hose->regions + 0,
-                              CONFIG_SYS_PCIE_MEMBASE + i * CONFIG_SYS_PCIE_MEMSIZE,
-                              CONFIG_SYS_PCIE_MEMBASE + i * CONFIG_SYS_PCIE_MEMSIZE,
-                              CONFIG_SYS_PCIE_MEMSIZE,
-                              PCI_REGION_MEM);
-               hose->region_count = 1;
-               pci_register_hose(hose);
-
-               if (is_end_point(i)) {
-                       ppc4xx_setup_pcie_endpoint(hose, i);
-                       /*
-                        * Reson for no scanning is endpoint can not generate
-                        * upstream configuration accesses.
-                        */
-               } else {
-                       ppc4xx_setup_pcie_rootpoint(hose, i);
-                       env = getenv ("pciscandelay");
-                       if (env != NULL) {
-                               delay = simple_strtoul(env, NULL, 10);
-                               if (delay > 5)
-                                       printf("Warning, expect noticable delay before "
-                                              "PCIe scan due to 'pciscandelay' value!\n");
-                               mdelay(delay * 1000);
-                       }
-
-                       /*
-                        * Config access can only go down stream
-                        */
-                       hose->last_busno = pci_hose_scan(hose);
-                       bus = hose->last_busno + 1;
-               }
-       }
-}
-#endif
-
-#if defined(CONFIG_POST)
-/*
- * Returns 1 if keys pressed to start the power-on long-running tests
- * Called from board_init_f().
- */
-int post_hotkeys_pressed(void)
-{
-       return 0;       /* No hotkeys supported */
-}
-#endif /* CONFIG_POST */
diff --git a/board/amcc/makalu/u-boot.lds b/board/amcc/makalu/u-boot.lds
deleted file mode 100644 (file)
index bebb2b2..0000000
+++ /dev/null
@@ -1,134 +0,0 @@
-/*
- * (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(powerpc)
-/* Do we need any of these for elf?
-   __DYNAMIC = 0;    */
-SECTIONS
-{
-/* To compile successfully, uncomment the following section.
- * To go in ram, remove the section.
- * Added by SunHe.
- */
-  .resetvec 0xFFFFFFFC :
-  {
-    *(.resetvec)
-  } = 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      :
-  {
-    cpu/ppc4xx/start.o (.text)
-
-    *(.text)
-    *(.got1)
-  }
-  _etext = .;
-  PROVIDE (etext = .);
-  .rodata    :
-  {
-    *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
-  }
-  .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 = .);
-}
index 0aa317ec0e4e7403deb1b29aa011b1c4752b96a3..7bffa3c4082f772a3b8f904cab15072040320aed 100644 (file)
@@ -275,102 +275,6 @@ long int fixed_sdram (void)
 }
 #endif /* !defined(CONFIG_SPD_EEPROM) */
 
-
-/*************************************************************************
- *  pci_pre_init
- *
- *  This routine is called just prior to registering the hose and gives
- *  the board the opportunity to check things. Returning a value of zero
- *  indicates that things are bad & PCI initialization should be aborted.
- *
- *     Different boards may wish to customize the pci controller structure
- *     (add regions, override default access routines, etc) or perform
- *     certain pre-initialization actions.
- *
- ************************************************************************/
-#if defined(CONFIG_PCI)
-int pci_pre_init(struct pci_controller * hose )
-{
-       unsigned long strap;
-
-       /*--------------------------------------------------------------------------+
-        *      The ocotea board is always configured as the host & requires the
-        *      PCI arbiter to be enabled.
-        *--------------------------------------------------------------------------*/
-       mfsdr(SDR0_SDSTP1, strap);
-       if( (strap & SDR0_SDSTP1_PAE_MASK) == 0 ){
-               printf("PCI: SDR0_STRP1[%08lX] - PCI Arbiter disabled.\n",strap);
-               return 0;
-       }
-
-       return 1;
-}
-#endif /* defined(CONFIG_PCI) */
-
-/*************************************************************************
- *  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
-        *--------------------------------------------------------------------------*/
-       out32r( PCIL0_PIM0SA, 0 ); /* disable */
-       out32r( PCIL0_PIM1SA, 0 ); /* disable */
-       out32r( PCIL0_PIM2SA, 0 ); /* disable */
-       out32r( PCIL0_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.
-        *--------------------------------------------------------------------------*/
-       out32r( PCIL0_PIM0LAL, CONFIG_SYS_SDRAM_BASE );
-       out32r( PCIL0_PIM0LAH, 0 );
-       out32r( PCIL0_PIM0SA, ~(gd->ram_size - 1) | 1 );
-
-       out32r( PCIL0_BAR0, 0 );
-
-       /*--------------------------------------------------------------------------+
-        * Program the board's subsystem id/vendor id
-        *--------------------------------------------------------------------------*/
-       out16r( PCIL0_SBSYSVID, CONFIG_SYS_PCI_SUBSYS_VENDORID );
-       out16r( PCIL0_SBSYSID, CONFIG_SYS_PCI_SUBSYS_DEVICEID );
-
-       out16r( PCIL0_CMD, in16r(PCIL0_CMD) | PCI_COMMAND_MEMORY );
-}
-#endif /* defined(CONFIG_PCI) && defined(CONFIG_SYS_PCI_TARGET_INIT) */
-
-
-/*************************************************************************
- *  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.
- *
- *
- ************************************************************************/
-#if defined(CONFIG_PCI)
-int is_pci_host(struct pci_controller *hose)
-{
-    /* The ocotea board is always configured as host. */
-    return(1);
-}
-#endif /* defined(CONFIG_PCI) */
-
-
 void fpga_init(void)
 {
        unsigned long group;
@@ -496,15 +400,3 @@ void fpga_init(void)
 
        return;
 }
-
-#ifdef CONFIG_POST
-/*
- * Returns 1 if keys pressed to start the power-on long-running tests
- * Called from board_init_f().
- */
-int post_hotkeys_pressed(void)
-{
-
-       return (ctrlc());
-}
-#endif
diff --git a/board/amcc/ocotea/u-boot.lds b/board/amcc/ocotea/u-boot.lds
deleted file mode 100644 (file)
index b0b4c00..0000000
+++ /dev/null
@@ -1,141 +0,0 @@
-/*
- * (C) Copyright 2004
- * 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/amcc/ocotea/init.o   (.text)
-
-    *(.text)
-    *(.got1)
-  }
-  _etext = .;
-  PROVIDE (etext = .);
-  .rodata    :
-  {
-    *(.eh_frame)
-    *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
-  }
-  .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 = .);
-}
diff --git a/board/amcc/redwood/u-boot.lds b/board/amcc/redwood/u-boot.lds
deleted file mode 100644 (file)
index 7bda06e..0000000
+++ /dev/null
@@ -1,145 +0,0 @@
-/*
- * (C) Copyright 2004
- * 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)
-SEARCH_DIR(/lib); SEARCH_DIR(/usr/lib); SEARCH_DIR(/usr/local/lib); SEARCH_DIR(/usr/local/powerpc-any-elf/lib);
-/* 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/amcc/redwood/init.o  (.text)
-
-/*    . = env_offset;*/
-/*    common/env_embedded.o(.text)*/
-
-    *(.text)
-    *(.got1)
-  }
-  _etext = .;
-  PROVIDE (etext = .);
-  .rodata    :
-  {
-    *(.eh_frame)
-    *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
-  }
-  .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       :
-  {
-   *(.sbss) *(.scommon)
-   *(.dynbss)
-   *(.bss)
-   *(COMMON)
-   . = ALIGN(4);
-  }
-  _end = . ;
-  PROVIDE (end = .);
-}
index 6c748c9143fad00d7eac5160b64c7183961f141a..b57e473e4b5c4084d4ca6b253250561ab7232036 100644 (file)
@@ -43,3 +43,7 @@ endif
 ifeq ($(dbcr),1)
 PLATFORM_CPPFLAGS += -DCONFIG_SYS_INIT_DBCR=0x8cff0000
 endif
+
+ifdef CONFIG_NAND_U_BOOT
+LDSCRIPT := $(TOPDIR)/board/$(BOARDDIR)/u-boot-nand.lds
+endif
index 00f6408720b90d6a9b69bb16e56ff6a632931c00..6756a27238ef7afd6db132b205b252653e4b0d31 100644 (file)
@@ -364,183 +364,12 @@ int checkboard(void)
 /*
  * Assign interrupts to PCI devices.
  */
-void sequoia_pci_fixup_irq(struct pci_controller *hose, pci_dev_t dev)
+void board_pci_fixup_irq(struct pci_controller *hose, pci_dev_t dev)
 {
        pci_hose_write_config_byte(hose, dev, PCI_INTERRUPT_LINE, VECNUM_EIRQ2);
 }
 #endif
 
-/*
- * pci_pre_init
- *
- * This routine is called just prior to registering the hose and gives
- * the board the opportunity to check things. Returning a value of zero
- * indicates that things are bad & PCI initialization should be aborted.
- *
- * Different boards may wish to customize the pci controller structure
- * (add regions, override default access routines, etc) or perform
- * certain pre-initialization actions.
- */
-#if defined(CONFIG_PCI)
-int pci_pre_init(struct pci_controller *hose)
-{
-       unsigned long addr;
-
-       /*
-        * Set priority for all PLB3 devices to 0.
-        * Set PLB3 arbiter to fair mode.
-        */
-       mfsdr(SD0_AMP1, addr);
-       mtsdr(SD0_AMP1, (addr & 0x000000FF) | 0x0000FF00);
-       addr = mfdcr(PLB3_ACR);
-       mtdcr(PLB3_ACR, addr | 0x80000000);
-
-       /*
-        * Set priority for all PLB4 devices to 0.
-        */
-       mfsdr(SD0_AMP0, addr);
-       mtsdr(SD0_AMP0, (addr & 0x000000FF) | 0x0000FF00);
-       addr = mfdcr(PLB4_ACR) | 0xa0000000;    /* Was 0x8---- */
-       mtdcr(PLB4_ACR, addr);
-
-       /*
-        * Set Nebula PLB4 arbiter to fair mode.
-        */
-       /* Segment0 */
-       addr = (mfdcr(PLB0_ACR) & ~PLB0_ACR_PPM_MASK) | PLB0_ACR_PPM_FAIR;
-       addr = (addr & ~PLB0_ACR_HBU_MASK) | PLB0_ACR_HBU_ENABLED;
-       addr = (addr & ~PLB0_ACR_RDP_MASK) | PLB0_ACR_RDP_4DEEP;
-       addr = (addr & ~PLB0_ACR_WRP_MASK) | PLB0_ACR_WRP_2DEEP;
-       mtdcr(PLB0_ACR, addr);
-
-       /* Segment1 */
-       addr = (mfdcr(PLB1_ACR) & ~PLB1_ACR_PPM_MASK) | PLB1_ACR_PPM_FAIR;
-       addr = (addr & ~PLB1_ACR_HBU_MASK) | PLB1_ACR_HBU_ENABLED;
-       addr = (addr & ~PLB1_ACR_RDP_MASK) | PLB1_ACR_RDP_4DEEP;
-       addr = (addr & ~PLB1_ACR_WRP_MASK) | PLB1_ACR_WRP_2DEEP;
-       mtdcr(PLB1_ACR, addr);
-
-#ifdef CONFIG_PCI_PNP
-       hose->fixup_irq = sequoia_pci_fixup_irq;
-#endif
-       return 1;
-}
-#endif /* defined(CONFIG_PCI) */
-
-/*
- * 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)
-{
-       /*
-        * Set up Direct MMIO registers
-        */
-       /*
-        * PowerPC440EPX PCI Master configuration.
-        * Map one 1Gig range of PLB/processor addresses to PCI memory space.
-        * PLB address 0xA0000000-0xDFFFFFFF
-        *     ==> PCI address 0xA0000000-0xDFFFFFFF
-        * Use byte reversed out routines to handle endianess.
-        * Make this region non-prefetchable.
-        */
-       out32r(PCIL0_PMM0MA, 0x00000000);       /* PMM0 Mask/Attribute */
-                                               /* - disabled b4 setting */
-       out32r(PCIL0_PMM0LA, CONFIG_SYS_PCI_MEMBASE);   /* PMM0 Local Address */
-       out32r(PCIL0_PMM0PCILA, CONFIG_SYS_PCI_MEMBASE); /* PMM0 PCI Low Address */
-       out32r(PCIL0_PMM0PCIHA, 0x00000000);    /* PMM0 PCI High Address */
-       out32r(PCIL0_PMM0MA, 0xE0000001);       /* 512M + No prefetching, */
-                                               /* and enable region */
-
-       out32r(PCIL0_PMM1MA, 0x00000000);       /* PMM0 Mask/Attribute */
-                                               /* - disabled b4 setting */
-       out32r(PCIL0_PMM1LA, CONFIG_SYS_PCI_MEMBASE2); /* PMM0 Local Address */
-       out32r(PCIL0_PMM1PCILA, CONFIG_SYS_PCI_MEMBASE2); /* PMM0 PCI Low Address */
-       out32r(PCIL0_PMM1PCIHA, 0x00000000);    /* PMM0 PCI High Address */
-       out32r(PCIL0_PMM1MA, 0xE0000001);       /* 512M + No prefetching, */
-                                               /* and enable region */
-
-       out32r(PCIL0_PTM1MS, 0x00000001);       /* Memory Size/Attribute */
-       out32r(PCIL0_PTM1LA, 0);                /* Local Addr. Reg */
-       out32r(PCIL0_PTM2MS, 0);                /* Memory Size/Attribute */
-       out32r(PCIL0_PTM2LA, 0);                /* Local Addr. Reg */
-
-       /*
-        * Set up Configuration registers
-        */
-
-       /* Program the board's subsystem id/vendor id */
-       pci_write_config_word(0, PCI_SUBSYSTEM_VENDOR_ID,
-                             CONFIG_SYS_PCI_SUBSYS_VENDORID);
-       pci_write_config_word(0, PCI_SUBSYSTEM_ID, CONFIG_SYS_PCI_SUBSYS_ID);
-
-       /* Configure command register as bus master */
-       pci_write_config_word(0, PCI_COMMAND, PCI_COMMAND_MASTER);
-
-       /* 240nS PCI clock */
-       pci_write_config_word(0, PCI_LATENCY_TIMER, 1);
-
-       /* No error reporting */
-       pci_write_config_word(0, PCI_ERREN, 0);
-
-       pci_write_config_dword(0, PCI_BRDGOPT2, 0x00000101);
-
-}
-#endif /* defined(CONFIG_PCI) && defined(CONFIG_SYS_PCI_TARGET_INIT) */
-
-#if defined(CONFIG_PCI) && defined(CONFIG_SYS_PCI_MASTER_INIT)
-void pci_master_init(struct pci_controller *hose)
-{
-       unsigned short temp_short;
-
-       /*
-        * Write the PowerPC440 EP PCI Configuration regs.
-        * Enable PowerPC440 EP to be a master on the PCI bus (PMM).
-        * Enable PowerPC440 EP to act as a PCI memory target (PTM).
-        */
-       pci_read_config_word(0, PCI_COMMAND, &temp_short);
-       pci_write_config_word(0, PCI_COMMAND,
-                             temp_short | PCI_COMMAND_MASTER |
-                             PCI_COMMAND_MEMORY);
-}
-#endif /* defined(CONFIG_PCI) && defined(CONFIG_SYS_PCI_MASTER_INIT) */
-
-/*
- * 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.
- */
-#if defined(CONFIG_PCI)
-int is_pci_host(struct pci_controller *hose)
-{
-       /* Cactus is always configured as host. */
-       return (1);
-}
-#endif /* defined(CONFIG_PCI) */
-
-#if defined(CONFIG_POST)
-/*
- * Returns 1 if keys pressed to start the power-on long-running tests
- * Called from board_init_f().
- */
-int post_hotkeys_pressed(void)
-{
-       return 0;       /* No hotkeys supported */
-}
-#endif /* CONFIG_POST */
-
 #if defined(CONFIG_NAND_U_BOOT) || defined(CONFIG_SYS_RAMBOOT)
 /*
  * On NAND-booting sequoia, we need to patch the chips select numbers
diff --git a/board/amcc/sequoia/u-boot.lds b/board/amcc/sequoia/u-boot.lds
deleted file mode 100644 (file)
index b9ec56b..0000000
+++ /dev/null
@@ -1,142 +0,0 @@
-/*
- * (C) Copyright 2002
- * 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)
-
-    *(.text)
-    *(.got1)
-  }
-  _etext = .;
-  PROVIDE (etext = .);
-  .rodata    :
-  {
-    *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
-  }
-  .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);
-  }
-
-  ppcenv_assert = ASSERT(. < 0xFFFF8000, ".bss section too big, overlaps .ppcenv section. Please update your confguration: CONFIG_SYS_MONITOR_BASE, CONFIG_SYS_MONITOR_LEN and TEXT_BASE may need to be modified.");
-
-  _end = . ;
-  PROVIDE (end = .);
-}
diff --git a/board/amcc/taihu/u-boot.lds b/board/amcc/taihu/u-boot.lds
deleted file mode 100644 (file)
index d37200d..0000000
+++ /dev/null
@@ -1,134 +0,0 @@
-/*
- * (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(powerpc)
-/* Do we need any of these for elf?
-   __DYNAMIC = 0;    */
-SECTIONS
-{
-  .resetvec 0xFFFFFFFC :
-  {
-    *(.resetvec)
-  } = 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)
-
-    *(.text)
-    *(.got1)
-  }
-  _etext = .;
-  PROVIDE (etext = .);
-  .rodata    :
-  {
-    *(.eh_frame)
-    *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
-  }
-  .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 = .);
-}
index 0c20faf9ab6804f1bd2424a839db595c941be52c..cac7a78d69e57ad54e60eb68dba6230daf85c8c2 100644 (file)
@@ -209,110 +209,6 @@ int checkboard (void)
        return (0);
 }
 
-/*************************************************************************
- *  pci_pre_init
- *
- *  This routine is called just prior to registering the hose and gives
- *  the board the opportunity to check things. Returning a value of zero
- *  indicates that things are bad & PCI initialization should be aborted.
- *
- *     Different boards may wish to customize the pci controller structure
- *     (add regions, override default access routines, etc) or perform
- *     certain pre-initialization actions.
- *
- ************************************************************************/
-#if defined(CONFIG_PCI)
-int pci_pre_init(struct pci_controller * hose )
-{
-       unsigned long strap;
-
-       /*--------------------------------------------------------------------------+
-        *      The ocotea board is always configured as the host & requires the
-        *      PCI arbiter to be enabled.
-        *--------------------------------------------------------------------------*/
-       mfsdr(SDR0_SDSTP1, strap);
-       if( (strap & SDR0_SDSTP1_PAE_MASK) == 0 ){
-               printf("PCI: SDR0_STRP1[%08lX] - PCI Arbiter disabled.\n",strap);
-               return 0;
-       }
-
-       return 1;
-}
-#endif /* defined(CONFIG_PCI) */
-
-/*************************************************************************
- *  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
-        *--------------------------------------------------------------------------*/
-       out32r( PCIL0_PIM0SA, 0 ); /* disable */
-       out32r( PCIL0_PIM1SA, 0 ); /* disable */
-       out32r( PCIL0_PIM2SA, 0 ); /* disable */
-       out32r( PCIL0_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.
-        *--------------------------------------------------------------------------*/
-       out32r( PCIL0_PIM0LAL, CONFIG_SYS_SDRAM_BASE );
-       out32r( PCIL0_PIM0LAH, 0 );
-       out32r( PCIL0_PIM0SA, ~(gd->ram_size - 1) | 1 );
-
-       out32r( PCIL0_BAR0, 0 );
-
-       /*--------------------------------------------------------------------------+
-        * Program the board's subsystem id/vendor id
-        *--------------------------------------------------------------------------*/
-       out16r( PCIL0_SBSYSVID, CONFIG_SYS_PCI_SUBSYS_VENDORID );
-       out16r( PCIL0_SBSYSID, CONFIG_SYS_PCI_SUBSYS_DEVICEID );
-
-       out16r( PCIL0_CMD, in16r(PCIL0_CMD) | PCI_COMMAND_MEMORY );
-}
-#endif /* defined(CONFIG_PCI) && defined(CONFIG_SYS_PCI_TARGET_INIT) */
-
-/*************************************************************************
- *  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.
- *
- *
- ************************************************************************/
-#if defined(CONFIG_PCI)
-int is_pci_host(struct pci_controller *hose)
-{
-       /* The ocotea board is always configured as host. */
-       return(1);
-}
-#endif /* defined(CONFIG_PCI) */
-
-#ifdef CONFIG_POST
-/*
- * Returns 1 if keys pressed to start the power-on long-running tests
- * Called from board_init_f().
- */
-int post_hotkeys_pressed(void)
-{
-       return (ctrlc());
-}
-#endif
-
 int board_eth_init(bd_t *bis)
 {
        cpu_eth_init(bis);
diff --git a/board/amcc/taishan/u-boot.lds b/board/amcc/taishan/u-boot.lds
deleted file mode 100644 (file)
index c043f69..0000000
+++ /dev/null
@@ -1,141 +0,0 @@
-/*
- * (C) Copyright 2004
- * 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/amcc/taishan/init.o  (.text)
-
-    *(.text)
-    *(.got1)
-  }
-  _etext = .;
-  PROVIDE (etext = .);
-  .rodata    :
-  {
-    *(.eh_frame)
-    *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
-  }
-  .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 = .);
-}
diff --git a/board/amcc/walnut/u-boot.lds b/board/amcc/walnut/u-boot.lds
deleted file mode 100644 (file)
index d7a7857..0000000
+++ /dev/null
@@ -1,135 +0,0 @@
-/*
- * (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(powerpc)
-/* Do we need any of these for elf?
-   __DYNAMIC = 0;    */
-SECTIONS
-{
-  .resetvec 0xFFFFFFFC :
-  {
-    *(.resetvec)
-  } = 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)
-
-    *(.text)
-    *(.got1)
-  }
-  _etext = .;
-  PROVIDE (etext = .);
-  .rodata    :
-  {
-    *(.eh_frame)
-    *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
-  }
-  .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 = .);
-}
diff --git a/board/amcc/yosemite/u-boot.lds b/board/amcc/yosemite/u-boot.lds
deleted file mode 100644 (file)
index b8646d5..0000000
+++ /dev/null
@@ -1,141 +0,0 @@
-/*
- * (C) Copyright 2002
- * 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/amcc/yosemite/init.o (.text)
-
-    *(.text)
-    *(.got1)
-  }
-  _etext = .;
-  PROVIDE (etext = .);
-  .rodata    :
-  {
-    *(.eh_frame)
-    *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
-  }
-  .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 = .);
-}
index ccbeb0e7adca95e3632fd1907b7abcc0a87e7575..98c1f3b81e8ea7b9a60834b3a82b343cf1217429 100644 (file)
@@ -352,166 +352,6 @@ phys_size_t initdram(int board)
        return CONFIG_SYS_SDRAM_BANKS * (CONFIG_SYS_KBYTES_SDRAM * 1024);       /* return bytes */
 }
 
-/*************************************************************************
- *  pci_pre_init
- *
- *  This routine is called just prior to registering the hose and gives
- *  the board the opportunity to check things. Returning a value of zero
- *  indicates that things are bad & PCI initialization should be aborted.
- *
- *     Different boards may wish to customize the pci controller structure
- *     (add regions, override default access routines, etc) or perform
- *     certain pre-initialization actions.
- *
- ************************************************************************/
-#if defined(CONFIG_PCI)
-int pci_pre_init(struct pci_controller *hose)
-{
-       unsigned long addr;
-
-       /*-------------------------------------------------------------------------+
-         | Set priority for all PLB3 devices to 0.
-         | Set PLB3 arbiter to fair mode.
-         +-------------------------------------------------------------------------*/
-       mfsdr(SD0_AMP1, addr);
-       mtsdr(SD0_AMP1, (addr & 0x000000FF) | 0x0000FF00);
-       addr = mfdcr(PLB3_ACR);
-       mtdcr(PLB3_ACR, addr | 0x80000000);
-
-       /*-------------------------------------------------------------------------+
-         | Set priority for all PLB4 devices to 0.
-         +-------------------------------------------------------------------------*/
-       mfsdr(SD0_AMP0, addr);
-       mtsdr(SD0_AMP0, (addr & 0x000000FF) | 0x0000FF00);
-       addr = mfdcr(PLB4_ACR) | 0xa0000000;    /* Was 0x8---- */
-       mtdcr(PLB4_ACR, addr);
-
-       /*-------------------------------------------------------------------------+
-         | Set Nebula PLB4 arbiter to fair mode.
-         +-------------------------------------------------------------------------*/
-       /* Segment0 */
-       addr = (mfdcr(PLB0_ACR) & ~PLB0_ACR_PPM_MASK) | PLB0_ACR_PPM_FAIR;
-       addr = (addr & ~PLB0_ACR_HBU_MASK) | PLB0_ACR_HBU_ENABLED;
-       addr = (addr & ~PLB0_ACR_RDP_MASK) | PLB0_ACR_RDP_4DEEP;
-       addr = (addr & ~PLB0_ACR_WRP_MASK) | PLB0_ACR_WRP_2DEEP;
-       mtdcr(PLB0_ACR, addr);
-
-       /* Segment1 */
-       addr = (mfdcr(PLB1_ACR) & ~PLB1_ACR_PPM_MASK) | PLB1_ACR_PPM_FAIR;
-       addr = (addr & ~PLB1_ACR_HBU_MASK) | PLB1_ACR_HBU_ENABLED;
-       addr = (addr & ~PLB1_ACR_RDP_MASK) | PLB1_ACR_RDP_4DEEP;
-       addr = (addr & ~PLB1_ACR_WRP_MASK) | PLB1_ACR_WRP_2DEEP;
-       mtdcr(PLB1_ACR, addr);
-
-       return 1;
-}
-#endif /* defined(CONFIG_PCI) */
-
-/*************************************************************************
- *  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)
-{
-       /*--------------------------------------------------------------------------+
-        * Set up Direct MMIO registers
-        *--------------------------------------------------------------------------*/
-       /*--------------------------------------------------------------------------+
-         | PowerPC440 EP PCI Master configuration.
-         | Map one 1Gig range of PLB/processor addresses to PCI memory space.
-         |   PLB address 0xA0000000-0xDFFFFFFF ==> PCI address 0xA0000000-0xDFFFFFFF
-         |   Use byte reversed out routines to handle endianess.
-         | Make this region non-prefetchable.
-         +--------------------------------------------------------------------------*/
-       out32r(PCIL0_PMM0MA, 0x00000000);       /* PMM0 Mask/Attribute - disabled b4 setting */
-       out32r(PCIL0_PMM0LA, CONFIG_SYS_PCI_MEMBASE);   /* PMM0 Local Address */
-       out32r(PCIL0_PMM0PCILA, CONFIG_SYS_PCI_MEMBASE);        /* PMM0 PCI Low Address */
-       out32r(PCIL0_PMM0PCIHA, 0x00000000);    /* PMM0 PCI High Address */
-       out32r(PCIL0_PMM0MA, 0xE0000001);       /* 512M + No prefetching, and enable region */
-
-       out32r(PCIL0_PMM1MA, 0x00000000);       /* PMM0 Mask/Attribute - disabled b4 setting */
-       out32r(PCIL0_PMM1LA, CONFIG_SYS_PCI_MEMBASE2);  /* PMM0 Local Address */
-       out32r(PCIL0_PMM1PCILA, CONFIG_SYS_PCI_MEMBASE2);       /* PMM0 PCI Low Address */
-       out32r(PCIL0_PMM1PCIHA, 0x00000000);    /* PMM0 PCI High Address */
-       out32r(PCIL0_PMM1MA, 0xE0000001);       /* 512M + No prefetching, and enable region */
-
-       out32r(PCIL0_PTM1MS, 0x00000001);       /* Memory Size/Attribute */
-       out32r(PCIL0_PTM1LA, 0);        /* Local Addr. Reg */
-       out32r(PCIL0_PTM2MS, 0);        /* Memory Size/Attribute */
-       out32r(PCIL0_PTM2LA, 0);        /* Local Addr. Reg */
-
-       /*--------------------------------------------------------------------------+
-        * Set up Configuration registers
-        *--------------------------------------------------------------------------*/
-
-       /* Program the board's subsystem id/vendor id */
-       pci_write_config_word(0, PCI_SUBSYSTEM_VENDOR_ID,
-                             CONFIG_SYS_PCI_SUBSYS_VENDORID);
-       pci_write_config_word(0, PCI_SUBSYSTEM_ID, CONFIG_SYS_PCI_SUBSYS_ID);
-
-       /* Configure command register as bus master */
-       pci_write_config_word(0, PCI_COMMAND, PCI_COMMAND_MASTER);
-
-       /* 240nS PCI clock */
-       pci_write_config_word(0, PCI_LATENCY_TIMER, 1);
-
-       /* No error reporting */
-       pci_write_config_word(0, PCI_ERREN, 0);
-
-       pci_write_config_dword(0, PCI_BRDGOPT2, 0x00000101);
-
-}
-#endif                         /* defined(CONFIG_PCI) && defined(CONFIG_SYS_PCI_TARGET_INIT) */
-
-/*************************************************************************
- *  pci_master_init
- *
- ************************************************************************/
-#if defined(CONFIG_PCI) && defined(CONFIG_SYS_PCI_MASTER_INIT)
-void pci_master_init(struct pci_controller *hose)
-{
-       unsigned short temp_short;
-
-       /*--------------------------------------------------------------------------+
-         | Write the PowerPC440 EP PCI Configuration regs.
-         |   Enable PowerPC440 EP to be a master on the PCI bus (PMM).
-         |   Enable PowerPC440 EP to act as a PCI memory target (PTM).
-         +--------------------------------------------------------------------------*/
-       pci_read_config_word(0, PCI_COMMAND, &temp_short);
-       pci_write_config_word(0, PCI_COMMAND,
-                             temp_short | PCI_COMMAND_MASTER |
-                             PCI_COMMAND_MEMORY);
-}
-#endif                         /* defined(CONFIG_PCI) && defined(CONFIG_SYS_PCI_MASTER_INIT) */
-
-/*************************************************************************
- *  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.
- *
- *
- ************************************************************************/
-#if defined(CONFIG_PCI)
-int is_pci_host(struct pci_controller *hose)
-{
-       /* Bamboo is always configured as host. */
-       return (1);
-}
-#endif                         /* defined(CONFIG_PCI) */
-
 /*************************************************************************
  *  hw_watchdog_reset
  *
diff --git a/board/amcc/yucca/u-boot.lds b/board/amcc/yucca/u-boot.lds
deleted file mode 100644 (file)
index 2d44c64..0000000
+++ /dev/null
@@ -1,141 +0,0 @@
-/*
- * (C) Copyright 2004
- * 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/amcc/yucca/init.o    (.text)
-
-    *(.text)
-    *(.got1)
-  }
-  _etext = .;
-  PROVIDE (etext = .);
-  .rodata    :
-  {
-    *(.eh_frame)
-    *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
-  }
-  .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 = .);
-}
index d8f4bcbb17ddf9812b9cbb2c465ff355b24db586..67a016787a41aa9bfd50b4a102d4ad5a8b53f842 100644 (file)
@@ -588,98 +588,8 @@ u32 ddr_clktr(u32 default_val) {
        return default_val;
 }
 
-/*************************************************************************
- *  pci_pre_init
- *
- *  This routine is called just prior to registering the hose and gives
- *  the board the opportunity to check things. Returning a value of zero
- *  indicates that things are bad & PCI initialization should be aborted.
- *
- *     Different boards may wish to customize the pci controller structure
- *     (add regions, override default access routines, etc) or perform
- *     certain pre-initialization actions.
- *
- ************************************************************************/
 #if defined(CONFIG_PCI)
-int pci_pre_init(struct pci_controller * hose )
-{
-       unsigned long strap;
-
-       /*-------------------------------------------------------------------+
-        *      The yucca board is always configured as the host & requires the
-        *      PCI arbiter to be enabled.
-        *-------------------------------------------------------------------*/
-       mfsdr(SDR0_SDSTP1, strap);
-       if( (strap & SDR0_SDSTP1_PAE_MASK) == 0 ) {
-               printf("PCI: SDR0_STRP1[%08lX] - PCI Arbiter disabled.\n",strap);
-               return 0;
-       }
-
-       return 1;
-}
-#endif /* defined(CONFIG_PCI) */
-
-/*************************************************************************
- *  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
-        *-------------------------------------------------------------------*/
-       out32r( PCIL0_PIM0SA, 0 ); /* disable */
-       out32r( PCIL0_PIM1SA, 0 ); /* disable */
-       out32r( PCIL0_PIM2SA, 0 ); /* disable */
-       out32r( PCIL0_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.
-        *-------------------------------------------------------------------*/
-       out32r( PCIL0_PIM0LAL, CONFIG_SYS_SDRAM_BASE );
-       out32r( PCIL0_PIM0LAH, 0 );
-       out32r( PCIL0_PIM0SA, ~(gd->ram_size - 1) | 1 );
-       out32r( PCIL0_BAR0, 0 );
-
-       /*-------------------------------------------------------------------+
-        * Program the board's subsystem id/vendor id
-        *-------------------------------------------------------------------*/
-       out16r( PCIL0_SBSYSVID, CONFIG_SYS_PCI_SUBSYS_VENDORID );
-       out16r( PCIL0_SBSYSID, CONFIG_SYS_PCI_SUBSYS_DEVICEID );
-
-       out16r( PCIL0_CMD, in16r(PCIL0_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)
-{
-       /* The yucca board is always configured as host. */
-       return 1;
-}
-
-static int yucca_pcie_card_present(int port)
+int board_pcie_card_present(int port)
 {
        u16 reg;
 
@@ -696,186 +606,55 @@ static int yucca_pcie_card_present(int port)
        }
 }
 
-/*
- * For the given slot, set rootpoint mode, send power to the slot,
- * turn on the green LED and turn off the yellow LED, enable the clock
- * and turn off reset.
- */
-void yucca_setup_pcie_fpga_rootpoint(int port)
-{
-       u16 power, clock, green_led, yellow_led, reset_off, rootpoint, endpoint;
-
-       switch(port) {
-       case 0:
-               rootpoint   = FPGA_REG1C_PE0_ROOTPOINT;
-               endpoint    = 0;
-               power       = FPGA_REG1A_PE0_PWRON;
-               green_led   = FPGA_REG1A_PE0_GLED;
-               clock       = FPGA_REG1A_PE0_REFCLK_ENABLE;
-               yellow_led  = FPGA_REG1A_PE0_YLED;
-               reset_off   = FPGA_REG1C_PE0_PERST;
-               break;
-       case 1:
-               rootpoint   = 0;
-               endpoint    = FPGA_REG1C_PE1_ENDPOINT;
-               power       = FPGA_REG1A_PE1_PWRON;
-               green_led   = FPGA_REG1A_PE1_GLED;
-               clock       = FPGA_REG1A_PE1_REFCLK_ENABLE;
-               yellow_led  = FPGA_REG1A_PE1_YLED;
-               reset_off   = FPGA_REG1C_PE1_PERST;
-               break;
-       case 2:
-               rootpoint   = 0;
-               endpoint    = FPGA_REG1C_PE2_ENDPOINT;
-               power       = FPGA_REG1A_PE2_PWRON;
-               green_led   = FPGA_REG1A_PE2_GLED;
-               clock       = FPGA_REG1A_PE2_REFCLK_ENABLE;
-               yellow_led  = FPGA_REG1A_PE2_YLED;
-               reset_off   = FPGA_REG1C_PE2_PERST;
-               break;
-
-       default:
-               return;
-       }
-
-       out_be16((u16 *)FPGA_REG1A,
-                ~(power | clock | green_led) &
-                (yellow_led | in_be16((u16 *)FPGA_REG1A)));
-
-       out_be16((u16 *)FPGA_REG1C,
-                ~(endpoint | reset_off) &
-                (rootpoint | in_be16((u16 *)FPGA_REG1C)));
-       /*
-        * Leave device in reset for a while after powering on the
-        * slot to give it a chance to initialize.
-        */
-       udelay(250 * 1000);
-
-       out_be16((u16 *)FPGA_REG1C, reset_off | in_be16((u16 *)FPGA_REG1C));
-}
 /*
  * For the given slot, set endpoint mode, send power to the slot,
- * turn on the green LED and turn off the yellow LED, enable the clock
- * .In end point mode reset bit is  read only.
+ * turn on the green LED and turn off the yellow LED, enable the
+ * clock. In end point mode reset bit is read only.
  */
-void yucca_setup_pcie_fpga_endpoint(int port)
+void board_pcie_setup_port(int port, int rootpoint)
 {
-       u16 power, clock, green_led, yellow_led, reset_off, rootpoint, endpoint;
+       u16 power, clock, green_led, yellow_led,
+               reset_off, rp, ep;
 
-       switch(port) {
+       switch (port) {
        case 0:
-               rootpoint   = FPGA_REG1C_PE0_ROOTPOINT;
-               endpoint    = 0;
-               power       = FPGA_REG1A_PE0_PWRON;
-               green_led   = FPGA_REG1A_PE0_GLED;
-               clock       = FPGA_REG1A_PE0_REFCLK_ENABLE;
-               yellow_led  = FPGA_REG1A_PE0_YLED;
-               reset_off   = FPGA_REG1C_PE0_PERST;
+               rp = FPGA_REG1C_PE0_ROOTPOINT;
+               ep = 0;
                break;
        case 1:
-               rootpoint   = 0;
-               endpoint    = FPGA_REG1C_PE1_ENDPOINT;
-               power       = FPGA_REG1A_PE1_PWRON;
-               green_led   = FPGA_REG1A_PE1_GLED;
-               clock       = FPGA_REG1A_PE1_REFCLK_ENABLE;
-               yellow_led  = FPGA_REG1A_PE1_YLED;
-               reset_off   = FPGA_REG1C_PE1_PERST;
+               rp = 0;
+               ep = FPGA_REG1C_PE1_ENDPOINT;
                break;
        case 2:
-               rootpoint   = 0;
-               endpoint    = FPGA_REG1C_PE2_ENDPOINT;
-               power       = FPGA_REG1A_PE2_PWRON;
-               green_led   = FPGA_REG1A_PE2_GLED;
-               clock       = FPGA_REG1A_PE2_REFCLK_ENABLE;
-               yellow_led  = FPGA_REG1A_PE2_YLED;
-               reset_off   = FPGA_REG1C_PE2_PERST;
+               rp = 0;
+               ep = FPGA_REG1C_PE2_ENDPOINT;
                break;
 
        default:
                return;
        }
 
-       out_be16((u16 *)FPGA_REG1A,
-                ~(power | clock | green_led) &
-                (yellow_led | in_be16((u16 *)FPGA_REG1A)));
-
-       out_be16((u16 *)FPGA_REG1C,
-                ~(rootpoint | reset_off) &
-                (endpoint | in_be16((u16 *)FPGA_REG1C)));
-}
+       power = FPGA_REG1A_PWRON_ENCODE(port);
+       green_led = FPGA_REG1A_GLED_ENCODE(port);
+       clock = FPGA_REG1A_REFCLK_ENCODE(port);
+       yellow_led = FPGA_REG1A_YLED_ENCODE(port);
+       reset_off = FPGA_REG1C_PERST_ENCODE(port);
 
-static struct pci_controller pcie_hose[3] = {{0},{0},{0}};
+       out_be16((u16 *)FPGA_REG1A, ~(power | clock | green_led) &
+                (yellow_led | in_be16((u16 *)FPGA_REG1A)));
 
-void pcie_setup_hoses(int busno)
-{
-       struct pci_controller *hose;
-       int i, bus;
-       int ret = 0;
-       char *env;
-       unsigned int delay;
+       out_be16((u16 *)FPGA_REG1C, ~(ep | reset_off) &
+                (rp | in_be16((u16 *)FPGA_REG1C)));
 
-       /*
-        * assume we're called after the PCIX hose is initialized, which takes
-        * bus ID 0 and therefore start numbering PCIe's from 1.
-        */
-       bus = busno;
-       for (i = 0; i <= 2; i++) {
-               /* Check for yucca card presence */
-               if (!yucca_pcie_card_present(i))
-                       continue;
-
-               if (is_end_point(i)) {
-                       yucca_setup_pcie_fpga_endpoint(i);
-                       ret = ppc4xx_init_pcie_endport(i);
-               } else {
-                       yucca_setup_pcie_fpga_rootpoint(i);
-                       ret = ppc4xx_init_pcie_rootport(i);
-               }
-               if (ret == -ENODEV)
-                       continue;
-               if (ret) {
-                       printf("PCIE%d: initialization as %s failed\n", i,
-                              is_end_point(i) ? "endpoint" : "root-complex");
-                       continue;
-               }
-
-               hose = &pcie_hose[i];
-               hose->first_busno = bus;
-               hose->last_busno = bus;
-               hose->current_busno = bus;
-
-               /* setup mem resource */
-               pci_set_region(hose->regions + 0,
-                       CONFIG_SYS_PCIE_MEMBASE + i * CONFIG_SYS_PCIE_MEMSIZE,
-                       CONFIG_SYS_PCIE_MEMBASE + i * CONFIG_SYS_PCIE_MEMSIZE,
-                       CONFIG_SYS_PCIE_MEMSIZE,
-                       PCI_REGION_MEM);
-               hose->region_count = 1;
-               pci_register_hose(hose);
-
-               if (is_end_point(i)) {
-                       ppc4xx_setup_pcie_endpoint(hose, i);
-                       /*
-                        * Reson for no scanning is endpoint can not generate
-                        * upstream configuration accesses.
-                        */
-               } else {
-                       ppc4xx_setup_pcie_rootpoint(hose, i);
-                       env = getenv("pciscandelay");
-                       if (env != NULL) {
-                               delay = simple_strtoul(env, NULL, 10);
-                               if (delay > 5)
-                                       printf("Warning, expect noticable delay before "
-                                              "PCIe scan due to 'pciscandelay' value!\n");
-                               mdelay(delay * 1000);
-                       }
+       if (rootpoint) {
+               /*
+                * Leave device in reset for a while after powering on the
+                * slot to give it a chance to initialize.
+                */
+               udelay(250 * 1000);
 
-                       /*
-                        * Config access can only go down stream
-                        */
-                       hose->last_busno = pci_hose_scan(hose);
-                       bus = hose->last_busno + 1;
-               }
+               out_be16((u16 *)FPGA_REG1C,
+                        reset_off | in_be16((u16 *)FPGA_REG1C));
        }
 }
 #endif /* defined(CONFIG_PCI) */
@@ -929,17 +708,6 @@ void fpga_init(void)
        return;
 }
 
-#ifdef CONFIG_POST
-/*
- * Returns 1 if keys pressed to start the power-on long-running tests
- * Called from board_init_f().
- */
-int post_hotkeys_pressed(void)
-{
-       return (ctrlc());
-}
-#endif
-
 /*---------------------------------------------------------------------------+
  | onboard_pci_arbiter_selected => from EPLD
  +---------------------------------------------------------------------------*/
index c09783a6aea7256724ba8b9e5933a1bf744b9296..09c6efa5aef92e489ca7855f9dd6e18ff40bfad8 100644 (file)
@@ -25,3 +25,6 @@
 # like it's not in RAM.  This is a bit of voodoo to allow it to be
 # run from RAM instead of Flash.
 TEXT_BASE = 0x08000000
+
+# Use board specific linker script
+LDSCRIPT := $(SRCTREE)/board/amirix/ap1000/u-boot.lds
index 087cf596221fdb46887339b04f203630e05a1f82..7562ffa87d71141fe17cae13d8dbde65fef18ec2 100644 (file)
@@ -124,7 +124,7 @@ void set_timer (ulong ticks)
 }
 
 /* delay usec useconds */
-void udelay (unsigned long usec)
+void __udelay (unsigned long usec)
 {
        ulong tmo, tmp;
 
index 9e2f1a5366bbdc43d061988c07cc511c97ff0f8d..0b5412bde62689949b58db5d108baf462f224337 100644 (file)
@@ -330,14 +330,6 @@ int board_early_init_r(void)
 }
 
 
-#ifdef CONFIG_POST
-int post_hotkeys_pressed(void)
-{
-       return 0;
-}
-#endif /* CONFIG_POST */
-
-
 #if defined(CONFIG_POST) || defined(CONFIG_LOGBUFFER)
 void post_word_store(ulong a)
 {
diff --git a/board/cray/L1/u-boot.lds b/board/cray/L1/u-boot.lds
deleted file mode 100644 (file)
index bd80df6..0000000
+++ /dev/null
@@ -1,150 +0,0 @@
-/*
- * (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(powerpc)
-/* Do we need any of these for elf?
-   __DYNAMIC = 0;    */
-SECTIONS
-{
-  .resetvec 0xFFFFFFFC :
-  {
-    *(.resetvec)
-  } = 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/cray/L1/init.o       (.text)
-    cpu/ppc4xx/traps.o (.text)
-    cpu/ppc4xx/interrupts.o    (.text)
-    cpu/ppc4xx/4xx_uart.o      (.text)
-    cpu/ppc4xx/cpu_init.o      (.text)
-    cpu/ppc4xx/speed.o (.text)
-    drivers/net/4xx_enet.o     (.text)
-    common/dlmalloc.o  (.text)
-    lib_generic/crc32.o                (.text)
-    lib_ppc/extable.o  (.text)
-    lib_generic/zlib.o         (.text)
-
-/*. = env_offset;*/
-    common/env_embedded.o(.text)
-
-    *(.text)
-    *(.got1)
-  }
-  _etext = .;
-  PROVIDE (etext = .);
-  .rodata    :
-  {
-    *(.eh_frame)
-    *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
-  }
-  .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 = .);
-}
diff --git a/board/csb272/u-boot.lds b/board/csb272/u-boot.lds
deleted file mode 100644 (file)
index b58ccc5..0000000
+++ /dev/null
@@ -1,151 +0,0 @@
-/*
- * (C) Copyright 2000-2004
- * 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
-
-  /* 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/csb272/init.o        (.text)
-    cpu/ppc4xx/kgdb.o  (.text)
-    cpu/ppc4xx/traps.o (.text)
-    cpu/ppc4xx/interrupts.o    (.text)
-    cpu/ppc4xx/4xx_uart.o      (.text)
-    cpu/ppc4xx/cpu_init.o      (.text)
-    cpu/ppc4xx/speed.o (.text)
-    drivers/net/4xx_enet.o     (.text)
-    common/dlmalloc.o  (.text)
-    lib_generic/crc32.o                (.text)
-
-    lib_ppc/extable.o  (.text)
-    lib_ppc/board.o    (.text)
-    lib_generic/zlib.o (.text)
-/*    . = env_offset;*/
-/*    common/env_embedded.o(.text)*/
-
-    *(.text)
-    *(.got1)
-  }
-  _etext = .;
-  PROVIDE (etext = .);
-  .rodata    :
-  {
-    *(.eh_frame)
-    *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
-  }
-  .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 = .);
-}
diff --git a/board/csb472/u-boot.lds b/board/csb472/u-boot.lds
deleted file mode 100644 (file)
index ba37c1b..0000000
+++ /dev/null
@@ -1,151 +0,0 @@
-/*
- * (C) Copyright 2000-2004
- * 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
-
-  /* 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/csb472/init.o        (.text)
-    cpu/ppc4xx/kgdb.o  (.text)
-    cpu/ppc4xx/traps.o (.text)
-    cpu/ppc4xx/interrupts.o    (.text)
-    cpu/ppc4xx/4xx_uart.o      (.text)
-    cpu/ppc4xx/cpu_init.o      (.text)
-    cpu/ppc4xx/speed.o (.text)
-    drivers/net/4xx_enet.o     (.text)
-    common/dlmalloc.o  (.text)
-    lib_generic/crc32.o                (.text)
-
-    lib_ppc/extable.o  (.text)
-    lib_ppc/board.o    (.text)
-    lib_generic/zlib.o (.text)
-/*    . = env_offset;*/
-/*    common/env_embedded.o(.text)*/
-
-    *(.text)
-    *(.got1)
-  }
-  _etext = .;
-  PROVIDE (etext = .);
-  .rodata    :
-  {
-    *(.eh_frame)
-    *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
-  }
-  .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 = .);
-}
diff --git a/board/dave/PPChameleonEVB/u-boot.lds b/board/dave/PPChameleonEVB/u-boot.lds
deleted file mode 100644 (file)
index ee7f59e..0000000
+++ /dev/null
@@ -1,153 +0,0 @@
-/*
- * (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(powerpc)
-/* Do we need any of these for elf?
-   __DYNAMIC = 0;    */
-SECTIONS
-{
-  .resetvec 0xFFFFFFFC :
-  {
-    *(.resetvec)
-  } = 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)
-    cpu/ppc4xx/traps.o (.text)
-    cpu/ppc4xx/interrupts.o    (.text)
-    cpu/ppc4xx/4xx_uart.o      (.text)
-    cpu/ppc4xx/cpu_init.o      (.text)
-    cpu/ppc4xx/speed.o (.text)
-    drivers/net/4xx_enet.o     (.text)
-    common/dlmalloc.o  (.text)
-    lib_generic/crc32.o                (.text)
-    lib_ppc/extable.o  (.text)
-    lib_generic/zlib.o         (.text)
-
-    *(.text)
-    *(.got1)
-  }
-  _etext = .;
-  PROVIDE (etext = .);
-  .rodata    :
-  {
-    *(.eh_frame)
-    *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
-  }
-  .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);
-  }
-
-  ppcenv_assert = ASSERT(. < 0xFFFF8000, ".bss section too big, overlaps .ppcenv section. Please update your confguration: CONFIG_SYS_MONITOR_BASE, CONFIG_SYS_MONITOR_LEN and TEXT_BASE may need to be modified.");
-  . = 0xFFFF8000;
-  .ppcenv :
-  {
-    common/env_embedded.o(.ppcenv);
-  }
-
-  _end = . ;
-  PROVIDE (end = .);
-}
index ffdc20b93ab82e5d88bb557eea5d4e7884004b62..9fab76fa5d887a73056590f9c1e0aca9c1c77118 100644 (file)
@@ -1,6 +1,7 @@
 /*
  * Miscelaneous DaVinci functions.
  *
+ * Copyright (C) 2009 Nick Thompson, GE Fanuc Ltd, <nick.thompson@gefanuc.com>
  * Copyright (C) 2007 Sergey Kubushyn <ksi@koi8.net>
  * Copyright (C) 2008 Lyrtech <www.lyrtech.com>
  * Copyright (C) 2004 Texas Instruments.
@@ -27,7 +28,8 @@
 #include <i2c.h>
 #include <net.h>
 #include <asm/arch/hardware.h>
-
+#include <asm/io.h>
+#include "misc.h"
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -109,3 +111,47 @@ void dv_configure_mac_address(uint8_t *rom_enetaddr)
 }
 
 #endif /* DAVINCI_EMAC */
+
+/*
+ * Change the setting of a pin multiplexer field.
+ *
+ * Takes an array of pinmux settings similar to:
+ *
+ * struct pinmux_config uart_pins[] = {
+ *     { &davinci_syscfg_regs->pinmux[8], 2, 7 },
+ *     { &davinci_syscfg_regs->pinmux[9], 2, 0 }
+ * };
+ *
+ * Stepping through the array, each pinmux[n] register has the given value
+ * set in the pin mux field specified.
+ *
+ * The number of pins in the array must be passed (ARRAY_SIZE can provide
+ * this value conveniently).
+ *
+ * Returns 0 if all field numbers and values are in the correct range,
+ * else returns -1.
+ */
+int davinci_configure_pin_mux(const struct pinmux_config *pins,
+                             const int n_pins)
+{
+       int i;
+
+       /* check for invalid pinmux values */
+       for (i = 0; i < n_pins; i++) {
+               if (pins[i].field >= PIN_MUX_NUM_FIELDS ||
+                   (pins[i].value & ~PIN_MUX_FIELD_MASK) != 0)
+                       return -1;
+       }
+
+       /* configure the pinmuxes */
+       for (i = 0; i < n_pins; i++) {
+               const int offset = pins[i].field * PIN_MUX_FIELD_SIZE;
+               const unsigned int value = pins[i].value << offset;
+               const unsigned int mask = PIN_MUX_FIELD_MASK << offset;
+               const dv_reg *mux = pins[i].mux;
+
+               writel(value | (readl(mux) & (~mask)), mux);
+       }
+
+       return 0;
+}
index dc3cc41330200a95404a5ccd4cdaee5c9629db55..f6d8b1bda125ce952af90e2a4a2e4680ea67a833 100644 (file)
 #ifndef __MISC_H
 #define __MISC_H
 
+/* pin muxer definitions */
+#define PIN_MUX_NUM_FIELDS     8       /* Per register */
+#define PIN_MUX_FIELD_SIZE     4       /* n in bits */
+#define PIN_MUX_FIELD_MASK     ((1 << PIN_MUX_FIELD_SIZE) - 1)
+
+/* pin definition */
+struct pinmux_config {
+       dv_reg          *mux;           /* Address of mux register */
+       unsigned char   value;          /* Value to set in field */
+       unsigned char   field;          /* field number */
+};
 
 int dvevm_read_mac_address(uint8_t *buf);
 void dv_configure_mac_address(uint8_t *rom_enetaddr);
+int davinci_configure_pin_mux(const struct pinmux_config *pins, int n_pins);
 
 #endif /* __MISC_H */
diff --git a/board/davinci/da830evm/Makefile b/board/davinci/da830evm/Makefile
new file mode 100644 (file)
index 0000000..02636fa
--- /dev/null
@@ -0,0 +1,51 @@
+#
+# (C) Copyright 2000, 2001, 2002
+# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
+#
+# Copyright (C) 2007 Sergey Kubushyn <ksi@koi8.net>
+#
+# 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  := da830evm.o
+
+SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
+OBJS   := $(addprefix $(obj),$(COBJS))
+SOBJS  := $(addprefix $(obj),$(SOBJS))
+
+$(LIB):        $(obj).depend $(OBJS) $(SOBJS)
+       $(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS)
+
+clean:
+       rm -f $(SOBJS) $(OBJS)
+
+distclean:     clean
+       rm -f $(LIB) core *.bak *~ .depend
+
+#########################################################################
+# This is for $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+#########################################################################
diff --git a/board/davinci/da830evm/config.mk b/board/davinci/da830evm/config.mk
new file mode 100644 (file)
index 0000000..6da29a9
--- /dev/null
@@ -0,0 +1,43 @@
+#
+# (C) Copyright 2008, Texas Instruments, Inc. http://www.ti.com/
+#
+# Copyright (C) 2007 Sergey Kubushyn <ksi@koi8.net>
+#
+# (C) Copyright 2002
+# Gary Jennejohn, DENX Software Engineering, <gj@denx.de>
+# David Mueller, ELSOFT AG, <d.mueller@elsoft.ch>
+#
+# 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
+#
+
+# Texas Instruments DA8xx EVM board (ARM925EJS) cpu
+# see http://www.ti.com/ for more information on Texas Instruments
+#
+# DA8xx EVM has 1 bank of 64 MB SDRAM (2 16Meg x16 chips).
+# Physical Address:
+# C000'0000 to C400'0000
+#
+# Linux-Kernel is expected to be at C000'8000, entry C000'8000
+# (mem base + reserved)
+#
+# we load ourself to C108 '0000
+
+
+#Provide at least 16MB spacing between us and the Linux Kernel image
+TEXT_BASE = 0xC1080000
diff --git a/board/davinci/da830evm/da830evm.c b/board/davinci/da830evm/da830evm.c
new file mode 100644 (file)
index 0000000..bb8cc3c
--- /dev/null
@@ -0,0 +1,127 @@
+/*
+ * Copyright (C) 2009 Nick Thompson, GE Fanuc, Ltd. <nick.thompson@gefanuc.com>
+ *
+ * Base on code from TI. Original Notices follow:
+ *
+ * (C) Copyright 2008, Texas Instruments, Inc. http://www.ti.com/
+ *
+ * Modified for DA8xx EVM.
+ *
+ * Copyright (C) 2007 Sergey Kubushyn <ksi@koi8.net>
+ *
+ * Parts are shamelessly stolen from various TI sources, original copyright
+ * follows:
+ * -----------------------------------------------------------------
+ *
+ * Copyright (C) 2004 Texas Instruments.
+ *
+ * ----------------------------------------------------------------------------
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ * ----------------------------------------------------------------------------
+ */
+
+#include <common.h>
+#include <i2c.h>
+#include <asm/arch/hardware.h>
+#include <asm/io.h>
+#include "../common/misc.h"
+
+DECLARE_GLOBAL_DATA_PTR;
+
+#define pinmux &davinci_syscfg_regs->pinmux
+
+#ifdef CONFIG_SPI_FLASH
+/* SPI0 pin muxer settings */
+const struct pinmux_config spi0_pins[] = {
+       { pinmux[7], 1, 3 },
+       { pinmux[7], 1, 4 },
+       { pinmux[7], 1, 5 },
+       { pinmux[7], 1, 6 },
+       { pinmux[7], 1, 7 }
+};
+#endif
+
+/* UART pin muxer settings */
+const struct pinmux_config uart_pins[] = {
+       { pinmux[8], 2, 7 },
+       { pinmux[9], 2, 0 }
+};
+
+/* I2C pin muxer settings */
+const struct pinmux_config i2c_pins[] = {
+       { pinmux[9], 2, 3 },
+       { pinmux[9], 2, 4 }
+};
+
+int board_init(void)
+{
+#ifndef CONFIG_USE_IRQ
+       /*
+        * Mask all IRQs by clearing the global enable and setting
+        * the enable clear for all the 90 interrupts.
+        */
+
+       writel(0, &davinci_aintc_regs->ger);
+
+       writel(0, &davinci_aintc_regs->hier);
+
+       writel(0xffffffff, &davinci_aintc_regs->ecr1);
+       writel(0xffffffff, &davinci_aintc_regs->ecr2);
+       writel(0xffffffff, &davinci_aintc_regs->ecr3);
+#endif
+
+       /* arch number of the board */
+       gd->bd->bi_arch_number = MACH_TYPE_DAVINCI_DA830_EVM;
+
+       /* address of boot parameters */
+       gd->bd->bi_boot_params = LINUX_BOOT_PARAM_ADDR;
+
+       /*
+        * Power on required peripherals
+        * ARM does not have access by default to PSC0 and PSC1
+        * assuming here that the DSP bootloader has set the IOPU
+        * such that PSC access is available to ARM
+        */
+       lpsc_on(DAVINCI_LPSC_AEMIF);    /* NAND, NOR */
+       lpsc_on(DAVINCI_LPSC_SPI0);     /* Serial Flash */
+       lpsc_on(DAVINCI_LPSC_EMAC);     /* image download */
+       lpsc_on(DAVINCI_LPSC_UART2);    /* console */
+       lpsc_on(DAVINCI_LPSC_GPIO);
+
+       /* setup the SUSPSRC for ARM to control emulation suspend */
+       writel(readl(&davinci_syscfg_regs->suspsrc) &
+              ~(DAVINCI_SYSCFG_SUSPSRC_EMAC | DAVINCI_SYSCFG_SUSPSRC_I2C |
+                DAVINCI_SYSCFG_SUSPSRC_SPI0 | DAVINCI_SYSCFG_SUSPSRC_TIMER0 |
+                DAVINCI_SYSCFG_SUSPSRC_UART2),
+              &davinci_syscfg_regs->suspsrc);
+
+#ifdef CONFIG_SPI_FLASH
+       if (davinci_configure_pin_mux(spi0_pins, ARRAY_SIZE(spi0_pins)) != 0)
+               return 1;
+#endif
+
+       if (davinci_configure_pin_mux(uart_pins, ARRAY_SIZE(uart_pins)) != 0)
+               return 1;
+
+       if (davinci_configure_pin_mux(i2c_pins, ARRAY_SIZE(i2c_pins)) != 0)
+               return 1;
+
+       /* enable the console UART */
+       writel((DAVINCI_UART_PWREMU_MGMT_FREE | DAVINCI_UART_PWREMU_MGMT_URRST |
+               DAVINCI_UART_PWREMU_MGMT_UTRST),
+              &davinci_uart2_ctrl_regs->pwremu_mgmt);
+
+       return(0);
+}
index ac3b28299333d49460c1333ec13305cac08bc018..994a9aae9fa701ce4a6d0ff02c3af7c527cdba63 100644 (file)
@@ -18,6 +18,8 @@
 
 #include <common.h>
 #include <asm/io.h>
+#include <nand.h>
+#include <asm/arch/nand_defs.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -28,3 +30,12 @@ int board_init(void)
 
        return 0;
 }
+
+#ifdef CONFIG_NAND_DAVINCI
+int board_nand_init(struct nand_chip *nand)
+{
+       davinci_nand_init(nand);
+
+       return 0;
+}
+#endif
index a76384130ddd24162aa9d4cd76ea7e68b3326038..5c64804fb291c7aae66189fb26bb78a1cd50e4f9 100644 (file)
@@ -22,3 +22,7 @@
 #
 
 TEXT_BASE = 0x38040000
+CFLAGS_dlmalloc.o += -Wa,--no-warn -fno-strict-aliasing
+PLATFORM_RELFLAGS += -fvisibility=hidden
+PLATFORM_CPPFLAGS += -fno-dwarf2-cfi-asm
+PLATFORM_LDFLAGS += -pic --emit-relocs -Bsymbolic -Bsymbolic-functions
index 29cf29518a0034c13ddcb747c3f5a035f974e77b..6d0b15a0fa26791cdbd7b8910a2ae374aa3d64df 100644 (file)
@@ -47,7 +47,6 @@ void init_sc520_enet (void)
 {
        /* Set CPU Speed to 100MHz */
        sc520_mmcr->cpuctl = 0x01;
-       gd->cpu_clk = 100000000;
 
        /* wait at least one millisecond */
        asm("movl       $0x2000,%%ecx\n"
@@ -67,7 +66,7 @@ void init_sc520_enet (void)
 /*
  * Miscellaneous platform dependent initializations
  */
-int board_init(void)
+int board_early_init_f(void)
 {
        init_sc520_enet();
 
@@ -117,6 +116,14 @@ int board_init(void)
        sc520_mmcr->sysarbctl = 0x06;
        sc520_mmcr->sysarbmenb = 0x0003;
 
+       return 0;
+}
+
+int board_early_init_r(void)
+{
+       /* CPU Speed to 100MHz */
+       gd->cpu_clk = 100000000;
+
        /* Crystal is 33.000MHz */
        gd->bus_clk = 33000000;
 
index 48e4d83a13825d8f741a3087a0ad3b13d6f05fc3..af2c13215663f62c675fe35b663148e98f51c670 100644 (file)
@@ -71,6 +71,8 @@ board_init16:
 .section .bios, "ax"
 .code16
 .globl realmode_reset
+.hidden realmode_reset
+.type realmode_reset, @function
 realmode_reset:
        /* Alias MMCR to 0xdf000 */
        movw    $0xfffc, %dx
index 4ea424d320c08be3da8958240841e664082cf0da..0d740215ce95c8f053a6929c468ae597a7af8d67 100644 (file)
@@ -28,28 +28,48 @@ ENTRY(_start)
 SECTIONS
 {
        . = 0x38040000;         /* Location of bootcode in flash */
+       _i386boot_text_start = .;
        .text  : { *(.text); }
 
        . = ALIGN(4);
        .rodata : { *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) }
 
        _i386boot_text_size = SIZEOF(.text) + SIZEOF(.rodata);
+       . = ALIGN(4);
+
+       .data : { *(.data) }
+       . = ALIGN(4);
+
+       .interp : { *(.interp) }
+       . = ALIGN(4);
+
+       .dynsym : { *(.dynsym) }
+       . = ALIGN(4);
 
-       . = 0x03FF0000;         /* Ram data segment to use */
-       _i386boot_romdata_dest = ABSOLUTE(.);
-       .data : AT ( LOADADDR(.rodata) + SIZEOF(.rodata) ) { *(.data) }
-       _i386boot_romdata_start = LOADADDR(.data);
+       .dynstr : { *(.dynstr) }
+       . = ALIGN(4);
+
+       .hash : { *(.hash) }
+       . = ALIGN(4);
 
+       .got : { *(.got) }
        . = ALIGN(4);
-       .got : AT ( LOADADDR(.data) + SIZEOF(.data) ) { *(.got) }
 
+       .got.plt : { *(.got.plt) }
        . = ALIGN(4);
+
+       .dynamic (NOLOAD) : { *(.dynamic) }
+       . = ALIGN(4);
+
        __u_boot_cmd_start = .;
        .u_boot_cmd : { *(.u_boot_cmd) }
+       . = ALIGN(4);
        __u_boot_cmd_end = .;
        _i386boot_cmd_start = LOADADDR(.u_boot_cmd);
 
-       _i386boot_romdata_size = SIZEOF(.data) + SIZEOF(.got) + SIZEOF(.u_boot_cmd);
+       _i386boot_rel_dyn_start = .;
+       .rel.dyn : { *(.rel.dyn) }
+       _i386boot_rel_dyn_end = .;
 
        . = ALIGN(4);
        _i386boot_bss_start = ABSOLUTE(.);
@@ -57,7 +77,7 @@ SECTIONS
        _i386boot_bss_size = SIZEOF(.bss);
 
        /* 16bit realmode trampoline code */
-       .realmode 0x7c0 : AT ( LOADADDR(.got) + SIZEOF(.got) + SIZEOF(.u_boot_cmd)) { *(.realmode) }
+       .realmode 0x7c0 : AT ( LOADADDR(.rel.dyn) + SIZEOF(.rel.dyn) ) { *(.realmode) }
 
        _i386boot_realmode = LOADADDR(.realmode);
        _i386boot_realmode_size = SIZEOF(.realmode);
index 81a455202a7c5f85edd665205aab7417544844c7..c2a68728093b67b8cbde49f6a9e369d1663f0e94 100644 (file)
@@ -33,7 +33,7 @@ OBJS  := $(addprefix $(obj),$(COBJS))
 SOBJS  := $(addprefix $(obj),$(SOBJS))
 
 $(LIB):        $(OBJS) $(SOBJS)
-       $(AR) $(ARFLAGS) $@ $(OBJS)
+       $(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS)
 
 clean:
        rm -f $(SOBJS) $(OBJS)
diff --git a/board/eric/u-boot.lds b/board/eric/u-boot.lds
deleted file mode 100644 (file)
index 261ccfb..0000000
+++ /dev/null
@@ -1,150 +0,0 @@
-/*
- * (C) Copyright 2001
- * 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
-
-  /* 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/eric/init.o  (.text)
-    cpu/ppc4xx/kgdb.o  (.text)
-    cpu/ppc4xx/traps.o (.text)
-    cpu/ppc4xx/interrupts.o    (.text)
-    cpu/ppc4xx/4xx_uart.o      (.text)
-    cpu/ppc4xx/cpu_init.o      (.text)
-    cpu/ppc4xx/speed.o (.text)
-    drivers/net/4xx_enet.o     (.text)
-    common/dlmalloc.o  (.text)
-    lib_generic/crc32.o                (.text)
-    lib_ppc/extable.o  (.text)
-    lib_generic/zlib.o         (.text)
-
-/*    . = env_offset;*/
-    common/env_embedded.o(.text)
-
-    *(.text)
-    *(.got1)
-  }
-  _etext = .;
-  PROVIDE (etext = .);
-  .rodata    :
-  {
-    *(.eh_frame)
-    *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
-  }
-  .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 = .);
-}
diff --git a/board/esd/adciop/u-boot.lds b/board/esd/adciop/u-boot.lds
deleted file mode 100644 (file)
index 9207fe0..0000000
+++ /dev/null
@@ -1,132 +0,0 @@
-/*
- * (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(powerpc)
-/* Do we need any of these for elf?
-   __DYNAMIC = 0;    */
-SECTIONS
-{
-  .resetvec 0xFFFFFFFC :
-  {
-    *(.resetvec)
-  } = 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      :
-  {
-    cpu/ppc4xx/start.o (.text)
-
-    *(.text)
-    *(.got1)
-  }
-  _etext = .;
-  PROVIDE (etext = .);
-  .rodata    :
-  {
-    *(.eh_frame)
-    *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
-  }
-  .fini      : { *(.fini)    } =0
-  .ctors     : { *(.ctors)   }
-  .dtors     : { *(.dtors)   }
-
-  /* Read-write section, merged into data segment: */
-  . = (. + 0x0FFF) & 0xFFFFF000;
-  _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(4096);
-  __init_begin = .;
-  .text.init : { *(.text.init) }
-  .data.init : { *(.data.init) }
-  . = ALIGN(4096);
-  __init_end = .;
-
-  __bss_start = .;
-  .bss (NOLOAD)       :
-  {
-   *(.sbss) *(.scommon)
-   *(.dynbss)
-   *(.bss)
-   *(COMMON)
-   . = ALIGN(4);
-  }
-  _end = . ;
-  PROVIDE (end = .);
-}
diff --git a/board/esd/apc405/u-boot.lds b/board/esd/apc405/u-boot.lds
deleted file mode 100644 (file)
index 0799275..0000000
+++ /dev/null
@@ -1,132 +0,0 @@
-/*
- * (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(powerpc)
-/* Do we need any of these for elf?
-   __DYNAMIC = 0;    */
-SECTIONS
-{
-  .resetvec 0xFFFFFFFC :
-  {
-    *(.resetvec)
-  } = 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      :
-  {
-    cpu/ppc4xx/start.o (.text)
-
-    *(.text)
-    *(.got1)
-  }
-  _etext = .;
-  PROVIDE (etext = .);
-  .rodata    :
-  {
-    *(.eh_frame)
-    *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
-  }
-  .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 = .);
-}
diff --git a/board/esd/ar405/u-boot.lds b/board/esd/ar405/u-boot.lds
deleted file mode 100644 (file)
index 2247109..0000000
+++ /dev/null
@@ -1,132 +0,0 @@
-/*
- * (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(powerpc)
-/* Do we need any of these for elf?
-   __DYNAMIC = 0;    */
-SECTIONS
-{
-  .resetvec 0xFFFFFFFC :
-  {
-    *(.resetvec)
-  } = 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      :
-  {
-    cpu/ppc4xx/start.o         (.text)
-
-    *(.text)
-    *(.got1)
-  }
-  _etext = .;
-  PROVIDE (etext = .);
-  .rodata    :
-  {
-    *(.eh_frame)
-    *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
-  }
-  .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 = .);
-}
diff --git a/board/esd/ash405/u-boot.lds b/board/esd/ash405/u-boot.lds
deleted file mode 100644 (file)
index 285c901..0000000
+++ /dev/null
@@ -1,131 +0,0 @@
-/*
- * (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(powerpc)
-/* Do we need any of these for elf?
-   __DYNAMIC = 0;    */
-SECTIONS
-{
-  .resetvec 0xFFFFFFFC :
-  {
-    *(.resetvec)
-  } = 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      :
-  {
-    cpu/ppc4xx/start.o (.text)
-
-    *(.text)
-    *(.got1)
-  }
-  _etext = .;
-  PROVIDE (etext = .);
-  .rodata    :
-  {
-    *(.eh_frame)
-    *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
-  }
-  .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 = .);
-}
diff --git a/board/esd/canbt/u-boot.lds b/board/esd/canbt/u-boot.lds
deleted file mode 100644 (file)
index 2247109..0000000
+++ /dev/null
@@ -1,132 +0,0 @@
-/*
- * (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(powerpc)
-/* Do we need any of these for elf?
-   __DYNAMIC = 0;    */
-SECTIONS
-{
-  .resetvec 0xFFFFFFFC :
-  {
-    *(.resetvec)
-  } = 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      :
-  {
-    cpu/ppc4xx/start.o         (.text)
-
-    *(.text)
-    *(.got1)
-  }
-  _etext = .;
-  PROVIDE (etext = .);
-  .rodata    :
-  {
-    *(.eh_frame)
-    *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
-  }
-  .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 = .);
-}
diff --git a/board/esd/cms700/u-boot.lds b/board/esd/cms700/u-boot.lds
deleted file mode 100644 (file)
index 0799275..0000000
+++ /dev/null
@@ -1,132 +0,0 @@
-/*
- * (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(powerpc)
-/* Do we need any of these for elf?
-   __DYNAMIC = 0;    */
-SECTIONS
-{
-  .resetvec 0xFFFFFFFC :
-  {
-    *(.resetvec)
-  } = 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      :
-  {
-    cpu/ppc4xx/start.o (.text)
-
-    *(.text)
-    *(.got1)
-  }
-  _etext = .;
-  PROVIDE (etext = .);
-  .rodata    :
-  {
-    *(.eh_frame)
-    *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
-  }
-  .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 = .);
-}
diff --git a/board/esd/cpci2dp/u-boot.lds b/board/esd/cpci2dp/u-boot.lds
deleted file mode 100644 (file)
index 0799275..0000000
+++ /dev/null
@@ -1,132 +0,0 @@
-/*
- * (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(powerpc)
-/* Do we need any of these for elf?
-   __DYNAMIC = 0;    */
-SECTIONS
-{
-  .resetvec 0xFFFFFFFC :
-  {
-    *(.resetvec)
-  } = 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      :
-  {
-    cpu/ppc4xx/start.o (.text)
-
-    *(.text)
-    *(.got1)
-  }
-  _etext = .;
-  PROVIDE (etext = .);
-  .rodata    :
-  {
-    *(.eh_frame)
-    *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
-  }
-  .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 = .);
-}
diff --git a/board/esd/cpci405/u-boot.lds b/board/esd/cpci405/u-boot.lds
deleted file mode 100644 (file)
index 0799275..0000000
+++ /dev/null
@@ -1,132 +0,0 @@
-/*
- * (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(powerpc)
-/* Do we need any of these for elf?
-   __DYNAMIC = 0;    */
-SECTIONS
-{
-  .resetvec 0xFFFFFFFC :
-  {
-    *(.resetvec)
-  } = 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      :
-  {
-    cpu/ppc4xx/start.o (.text)
-
-    *(.text)
-    *(.got1)
-  }
-  _etext = .;
-  PROVIDE (etext = .);
-  .rodata    :
-  {
-    *(.eh_frame)
-    *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
-  }
-  .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 = .);
-}
diff --git a/board/esd/cpciiser4/u-boot.lds b/board/esd/cpciiser4/u-boot.lds
deleted file mode 100644 (file)
index 0799275..0000000
+++ /dev/null
@@ -1,132 +0,0 @@
-/*
- * (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(powerpc)
-/* Do we need any of these for elf?
-   __DYNAMIC = 0;    */
-SECTIONS
-{
-  .resetvec 0xFFFFFFFC :
-  {
-    *(.resetvec)
-  } = 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      :
-  {
-    cpu/ppc4xx/start.o (.text)
-
-    *(.text)
-    *(.got1)
-  }
-  _etext = .;
-  PROVIDE (etext = .);
-  .rodata    :
-  {
-    *(.eh_frame)
-    *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
-  }
-  .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 = .);
-}
index ae855dc057f29064c48524fa4a1e39d3037a753b..4fe3774ffbca4018110f4cd86642aa1a36d6bec4 100644 (file)
@@ -21,3 +21,6 @@
 # MA 02111-1307 USA
 #
 TEXT_BASE = 0xFFFC0000
+
+# Use board specific linker script
+LDSCRIPT := $(SRCTREE)/board/esd/dasa_sim/u-boot.lds
diff --git a/board/esd/dp405/u-boot.lds b/board/esd/dp405/u-boot.lds
deleted file mode 100644 (file)
index 0799275..0000000
+++ /dev/null
@@ -1,132 +0,0 @@
-/*
- * (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(powerpc)
-/* Do we need any of these for elf?
-   __DYNAMIC = 0;    */
-SECTIONS
-{
-  .resetvec 0xFFFFFFFC :
-  {
-    *(.resetvec)
-  } = 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      :
-  {
-    cpu/ppc4xx/start.o (.text)
-
-    *(.text)
-    *(.got1)
-  }
-  _etext = .;
-  PROVIDE (etext = .);
-  .rodata    :
-  {
-    *(.eh_frame)
-    *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
-  }
-  .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 = .);
-}
diff --git a/board/esd/du405/u-boot.lds b/board/esd/du405/u-boot.lds
deleted file mode 100644 (file)
index 65ad2f2..0000000
+++ /dev/null
@@ -1,132 +0,0 @@
-/*
- * (C) Copyright 2000, 2001
- * 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
-
-  /* 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      :
-  {
-    cpu/ppc4xx/start.o (.text)
-
-    *(.text)
-    *(.got1)
-  }
-  _etext = .;
-  PROVIDE (etext = .);
-  .rodata    :
-  {
-    *(.eh_frame)
-    *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
-  }
-  .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 = .);
-}
index d0e52cbab3911a0464af3b32d756be322dab29f0..111cce52a2a3a200eb8772b96593e5872d8cadde 100644 (file)
@@ -360,165 +360,6 @@ int checkboard(void)
        return (0);
 }
 
-/*
- * pci_pre_init
- *
- * This routine is called just prior to registering the hose and gives
- * the board the opportunity to check things. Returning a value of zero
- * indicates that things are bad & PCI initialization should be aborted.
- *
- * Different boards may wish to customize the pci controller structure
- * (add regions, override default access routines, etc) or perform
- * certain pre-initialization actions.
- */
-#if defined(CONFIG_PCI)
-int pci_pre_init(struct pci_controller *hose)
-{
-       unsigned long addr;
-
-       /*
-        * Set priority for all PLB3 devices to 0.
-        * Set PLB3 arbiter to fair mode.
-        */
-       mfsdr(SD0_AMP1, addr);
-       mtsdr(SD0_AMP1, (addr & 0x000000FF) | 0x0000FF00);
-       addr = mfdcr(PLB3_ACR);
-       mtdcr(PLB3_ACR, addr | 0x80000000);
-
-       /*
-        * Set priority for all PLB4 devices to 0.
-        */
-       mfsdr(SD0_AMP0, addr);
-       mtsdr(SD0_AMP0, (addr & 0x000000FF) | 0x0000FF00);
-       addr = mfdcr(PLB4_ACR) | 0xa0000000; /* Was 0x8---- */
-       mtdcr(PLB4_ACR, addr);
-
-       /*
-        * Set Nebula PLB4 arbiter to fair mode.
-        */
-       /* Segment0 */
-       addr = (mfdcr(PLB0_ACR) & ~PLB0_ACR_PPM_MASK) | PLB0_ACR_PPM_FAIR;
-       addr = (addr & ~PLB0_ACR_HBU_MASK) | PLB0_ACR_HBU_ENABLED;
-       addr = (addr & ~PLB0_ACR_RDP_MASK) | PLB0_ACR_RDP_4DEEP;
-       addr = (addr & ~PLB0_ACR_WRP_MASK) | PLB0_ACR_WRP_2DEEP;
-       mtdcr(PLB0_ACR, addr);
-
-       /* Segment1 */
-       addr = (mfdcr(PLB1_ACR) & ~PLB1_ACR_PPM_MASK) | PLB1_ACR_PPM_FAIR;
-       addr = (addr & ~PLB1_ACR_HBU_MASK) | PLB1_ACR_HBU_ENABLED;
-       addr = (addr & ~PLB1_ACR_RDP_MASK) | PLB1_ACR_RDP_4DEEP;
-       addr = (addr & ~PLB1_ACR_WRP_MASK) | PLB1_ACR_WRP_2DEEP;
-       mtdcr(PLB1_ACR, addr);
-
-       return 1;
-}
-#endif /* defined(CONFIG_PCI) */
-
-/*
- * 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)
-{
-       /*
-        * Set up Direct MMIO registers
-        */
-       /*
-        * PowerPC440EPX PCI Master configuration.
-        * Map one 1Gig range of PLB/processor addresses to PCI memory space.
-        * PLB address 0xA0000000-0xDFFFFFFF
-        *     ==> PCI address 0xA0000000-0xDFFFFFFF
-        * Use byte reversed out routines to handle endianess.
-        * Make this region non-prefetchable.
-        */
-       out32r(PCIL0_PMM0MA, 0x00000000);       /* PMM0 Mask/Attribute */
-                                               /* - disabled b4 setting */
-       out32r(PCIL0_PMM0LA, CONFIG_SYS_PCI_MEMBASE);   /* PMM0 Local Address */
-       out32r(PCIL0_PMM0PCILA, CONFIG_SYS_PCI_MEMBASE); /* PMM0 PCI Low Address */
-       out32r(PCIL0_PMM0PCIHA, 0x00000000);    /* PMM0 PCI High Address */
-       out32r(PCIL0_PMM0MA, 0xE0000001);       /* 512M + No prefetching, */
-                                               /* and enable region */
-
-       out32r(PCIL0_PMM1MA, 0x00000000);       /* PMM0 Mask/Attribute */
-                                               /* - disabled b4 setting */
-       out32r(PCIL0_PMM1LA, CONFIG_SYS_PCI_MEMBASE2); /* PMM0 Local Address */
-       out32r(PCIL0_PMM1PCILA, CONFIG_SYS_PCI_MEMBASE2); /* PMM0 PCI Low Address */
-       out32r(PCIL0_PMM1PCIHA, 0x00000000);    /* PMM0 PCI High Address */
-       out32r(PCIL0_PMM1MA, 0xE0000001);       /* 512M + No prefetching, */
-                                               /* and enable region */
-
-       out32r(PCIL0_PTM1MS, 0x00000001);       /* Memory Size/Attribute */
-       out32r(PCIL0_PTM1LA, 0);                /* Local Addr. Reg */
-       out32r(PCIL0_PTM2MS, 0);                /* Memory Size/Attribute */
-       out32r(PCIL0_PTM2LA, 0);                /* Local Addr. Reg */
-
-       /*
-        * Set up Configuration registers
-        */
-
-       /* Program the board's subsystem id/vendor id */
-       pci_write_config_word(0, PCI_SUBSYSTEM_VENDOR_ID,
-                             PCI_VENDOR_ID_ESDGMBH);
-       pci_write_config_word(0, PCI_SUBSYSTEM_ID, PCI_DEVICE_ID_DU440);
-
-       pci_write_config_word(0, PCI_CLASS_SUB_CODE, PCI_CLASS_BRIDGE_HOST);
-
-       /* Configure command register as bus master */
-       pci_write_config_word(0, PCI_COMMAND, PCI_COMMAND_MASTER);
-
-       /* 240nS PCI clock */
-       pci_write_config_word(0, PCI_LATENCY_TIMER, 1);
-
-       /* No error reporting */
-       pci_write_config_word(0, PCI_ERREN, 0);
-
-       pci_write_config_dword(0, PCI_BRDGOPT2, 0x00000101);
-
-}
-#endif /* defined(CONFIG_PCI) && defined(CONFIG_SYS_PCI_TARGET_INIT) */
-
-#if defined(CONFIG_PCI) && defined(CONFIG_SYS_PCI_MASTER_INIT)
-void pci_master_init(struct pci_controller *hose)
-{
-       unsigned short temp_short;
-
-       /*
-        * Write the PowerPC440 EP PCI Configuration regs.
-        * Enable PowerPC440 EP to be a master on the PCI bus (PMM).
-        * Enable PowerPC440 EP to act as a PCI memory target (PTM).
-        */
-       pci_read_config_word(0, PCI_COMMAND, &temp_short);
-       pci_write_config_word(0, PCI_COMMAND,
-                             temp_short | PCI_COMMAND_MASTER |
-                             PCI_COMMAND_MEMORY);
-}
-#endif /* defined(CONFIG_PCI) && defined(CONFIG_SYS_PCI_MASTER_INIT) */
-
-/*
- * 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.
- */
-#if defined(CONFIG_PCI)
-int is_pci_host(struct pci_controller *hose)
-{
-       /* always configured as host. */
-       return (1);
-}
-#endif /* defined(CONFIG_PCI) */
-
 int last_stage_init(void)
 {
        int e, i;
index a124a7ee9b51df8f16f245a55247673efbb87b4d..37697ec854f985a4cd44d95abe0b387322fa1d59 100644 (file)
@@ -38,6 +38,3 @@
 #define PWR_RDY                        0x10
 
 #define CPLD_IRQ               (32+30)
-
-#define PCI_VENDOR_ID_ESDGMBH  0x12fe
-#define PCI_DEVICE_ID_DU440    0x0444
diff --git a/board/esd/du440/u-boot.lds b/board/esd/du440/u-boot.lds
deleted file mode 100644 (file)
index 3b6c096..0000000
+++ /dev/null
@@ -1,139 +0,0 @@
-/*
- * (C) Copyright 2002
- * 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      :
-  {
-    cpu/ppc4xx/start.o (.text)
-
-    *(.text)
-    *(.got1)
-  }
-  _etext = .;
-  PROVIDE (etext = .);
-  .rodata    :
-  {
-    *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
-  }
-  .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);
-  }
-
-  ppcenv_assert = ASSERT(. < 0xFFFF8000, ".bss section too big, overlaps .ppcenv section. Please update your confguration: CONFIG_SYS_MONITOR_BASE, CONFIG_SYS_MONITOR_LEN and TEXT_BASE may need to be modified.");
-
-  _end = . ;
-  PROVIDE (end = .);
-}
diff --git a/board/esd/hh405/u-boot.lds b/board/esd/hh405/u-boot.lds
deleted file mode 100644 (file)
index 0799275..0000000
+++ /dev/null
@@ -1,132 +0,0 @@
-/*
- * (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(powerpc)
-/* Do we need any of these for elf?
-   __DYNAMIC = 0;    */
-SECTIONS
-{
-  .resetvec 0xFFFFFFFC :
-  {
-    *(.resetvec)
-  } = 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      :
-  {
-    cpu/ppc4xx/start.o (.text)
-
-    *(.text)
-    *(.got1)
-  }
-  _etext = .;
-  PROVIDE (etext = .);
-  .rodata    :
-  {
-    *(.eh_frame)
-    *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
-  }
-  .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 = .);
-}
diff --git a/board/esd/hub405/u-boot.lds b/board/esd/hub405/u-boot.lds
deleted file mode 100644 (file)
index 285c901..0000000
+++ /dev/null
@@ -1,131 +0,0 @@
-/*
- * (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(powerpc)
-/* Do we need any of these for elf?
-   __DYNAMIC = 0;    */
-SECTIONS
-{
-  .resetvec 0xFFFFFFFC :
-  {
-    *(.resetvec)
-  } = 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      :
-  {
-    cpu/ppc4xx/start.o (.text)
-
-    *(.text)
-    *(.got1)
-  }
-  _etext = .;
-  PROVIDE (etext = .);
-  .rodata    :
-  {
-    *(.eh_frame)
-    *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
-  }
-  .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 = .);
-}
diff --git a/board/esd/ocrtc/u-boot.lds b/board/esd/ocrtc/u-boot.lds
deleted file mode 100644 (file)
index 34884b6..0000000
+++ /dev/null
@@ -1,147 +0,0 @@
-/*
- * (C) Copyright 2001
- * 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
-
-  /* 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)
-    cpu/ppc4xx/traps.o (.text)
-    cpu/ppc4xx/interrupts.o    (.text)
-    cpu/ppc4xx/4xx_uart.o      (.text)
-    cpu/ppc4xx/cpu_init.o      (.text)
-    cpu/ppc4xx/speed.o (.text)
-    common/dlmalloc.o  (.text)
-    lib_generic/crc32.o                (.text)
-    lib_ppc/extable.o  (.text)
-    lib_generic/zlib.o         (.text)
-
-/*    . = env_offset;*/
-/*    common/env_embedded.o(.text)*/
-
-    *(.text)
-    *(.got1)
-  }
-  _etext = .;
-  PROVIDE (etext = .);
-  .rodata    :
-  {
-    *(.eh_frame)
-    *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
-  }
-  .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 = .);
-}
diff --git a/board/esd/pci405/u-boot.lds b/board/esd/pci405/u-boot.lds
deleted file mode 100644 (file)
index 0799275..0000000
+++ /dev/null
@@ -1,132 +0,0 @@
-/*
- * (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(powerpc)
-/* Do we need any of these for elf?
-   __DYNAMIC = 0;    */
-SECTIONS
-{
-  .resetvec 0xFFFFFFFC :
-  {
-    *(.resetvec)
-  } = 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      :
-  {
-    cpu/ppc4xx/start.o (.text)
-
-    *(.text)
-    *(.got1)
-  }
-  _etext = .;
-  PROVIDE (etext = .);
-  .rodata    :
-  {
-    *(.eh_frame)
-    *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
-  }
-  .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 = .);
-}
index c57d90cf6fed304f5257010ecd59be1a7e5c7042..98acb4b7712b5648d4fa528ce0c0613c6515d592 100644 (file)
@@ -31,7 +31,6 @@ LIB   = $(obj)lib$(BOARD).a
 COBJS  = $(BOARD).o flash.o \
        ../common/misc.o \
        ../common/esd405ep_nand.o \
-       ../common/auto_update.o
 
 SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
 OBJS   := $(addprefix $(obj),$(COBJS))
index c733587b2a8557016b69ff8e46d32d026140ff6c..fcffdf67c01f113241ea8430fd1db2bb65bb4be3 100644 (file)
@@ -46,50 +46,6 @@ const unsigned char fpgadata[] =
  */
 #include "../common/fpga.c"
 
-/*
- * include common auto-update code (for esd boards)
- */
-#include "../common/auto_update.h"
-
-au_image_t au_image[] = {
-       {"plu405/preinst.img", 0, -1, AU_SCRIPT},
-       {"plu405/u-boot.img", 0xfffc0000, 0x00040000, AU_FIRMWARE},
-       {"plu405/pImage_${bd_type}", 0x00000000, 0x00100000, AU_NAND},
-       {"plu405/pImage.initrd", 0x00100000, 0x00200000, AU_NAND},
-       {"plu405/yaffsmt2.img", 0x00300000, 0x01c00000, AU_NAND},
-       {"plu405/postinst.img", 0, 0, AU_SCRIPT},
-};
-
-int N_AU_IMAGES = (sizeof(au_image) / sizeof(au_image[0]));
-
-/*
- * generate a short spike on the CAN tx line
- * to bring the couplers in sync
- */
-void init_coupler(u32 addr)
-{
-       struct sja1000_basic_s *ctrl = (struct sja1000_basic_s *)addr;
-
-       /* reset */
-       out_8(&ctrl->cr, CR_RR);
-
-       /* dominant */
-       out_8(&ctrl->btr0, 0x00); /* btr setup is required */
-       out_8(&ctrl->btr1, 0x14); /* we use 1Mbit/s */
-       out_8(&ctrl->oc, OC_TP1 | OC_TN1 | OC_POL1 |
-             OC_TP0 | OC_TN0 | OC_POL0 | OC_MODE1);
-       out_8(&ctrl->cr, 0x00);
-
-       /* delay */
-       in_8(&ctrl->cr);
-       in_8(&ctrl->cr);
-       in_8(&ctrl->cr);
-       in_8(&ctrl->cr);
-
-       /* reset */
-       out_8(&ctrl->cr, CR_RR);
-}
-
 /* Prototypes */
 int gunzip(void *, int, unsigned char *, unsigned long *);
 
diff --git a/board/esd/plu405/u-boot.lds b/board/esd/plu405/u-boot.lds
deleted file mode 100644 (file)
index 285c901..0000000
+++ /dev/null
@@ -1,131 +0,0 @@
-/*
- * (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(powerpc)
-/* Do we need any of these for elf?
-   __DYNAMIC = 0;    */
-SECTIONS
-{
-  .resetvec 0xFFFFFFFC :
-  {
-    *(.resetvec)
-  } = 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      :
-  {
-    cpu/ppc4xx/start.o (.text)
-
-    *(.text)
-    *(.got1)
-  }
-  _etext = .;
-  PROVIDE (etext = .);
-  .rodata    :
-  {
-    *(.eh_frame)
-    *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
-  }
-  .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 = .);
-}
diff --git a/board/esd/pmc405/u-boot.lds b/board/esd/pmc405/u-boot.lds
deleted file mode 100644 (file)
index 178a755..0000000
+++ /dev/null
@@ -1,131 +0,0 @@
-/*
- * (C) Copyright 2000, 2001
- * 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
-
-  /* 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      :
-  {
-    cpu/ppc4xx/start.o (.text)
-
-    *(.text)
-    *(.got1)
-  }
-  _etext = .;
-  PROVIDE (etext = .);
-  .rodata    :
-  {
-    *(.eh_frame)
-    *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
-  }
-  .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 = .);
-}
diff --git a/board/esd/pmc405de/u-boot.lds b/board/esd/pmc405de/u-boot.lds
deleted file mode 100644 (file)
index 0799275..0000000
+++ /dev/null
@@ -1,132 +0,0 @@
-/*
- * (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(powerpc)
-/* Do we need any of these for elf?
-   __DYNAMIC = 0;    */
-SECTIONS
-{
-  .resetvec 0xFFFFFFFC :
-  {
-    *(.resetvec)
-  } = 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      :
-  {
-    cpu/ppc4xx/start.o (.text)
-
-    *(.text)
-    *(.got1)
-  }
-  _etext = .;
-  PROVIDE (etext = .);
-  .rodata    :
-  {
-    *(.eh_frame)
-    *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
-  }
-  .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 = .);
-}
index 0c4d58282e7a422e4325c7c8c4974b8f45fa8412..91e65ec8a98dedf153b80991ddba6ec13f8fbb79 100644 (file)
 # Foundation, Inc., 59 Temple Place, Suite 330, Boston,
 # MA 02111-1307 USA
 #
-#
-# AMCC 440EPx Reference Platform (Sequoia) board
-#
-
 sinclude $(OBJTREE)/board/$(BOARDDIR)/config.tmp
 
 ifndef TEXT_BASE
index ec9255243c472c18014a3f5b303695472e717689..bd43a9aef0d6ccf6a23ed58a61f81c9b66a83865 100644 (file)
@@ -39,6 +39,8 @@
 #include <miiphy.h>
 #endif
 #include <serial.h>
+#include <asm/4xx_pci.h>
+
 #include "fpga.h"
 #include "pmc440.h"
 
@@ -478,7 +480,7 @@ int checkboard(void)
 /*
  * Assign interrupts to PCI devices. Some OSs rely on this.
  */
-void pmc440_pci_fixup_irq(struct pci_controller *hose, pci_dev_t dev)
+void board_pci_fixup_irq(struct pci_controller *hose, pci_dev_t dev)
 {
        unsigned char int_line[] = {IRQ_PCIC, IRQ_PCID, IRQ_PCIA, IRQ_PCIB};
 
@@ -487,64 +489,6 @@ void pmc440_pci_fixup_irq(struct pci_controller *hose, pci_dev_t dev)
 }
 #endif
 
-/*
- * pci_pre_init
- *
- * This routine is called just prior to registering the hose and gives
- * the board the opportunity to check things. Returning a value of zero
- * indicates that things are bad & PCI initialization should be aborted.
- *
- * Different boards may wish to customize the pci controller structure
- * (add regions, override default access routines, etc) or perform
- * certain pre-initialization actions.
- */
-#if defined(CONFIG_PCI)
-int pci_pre_init(struct pci_controller *hose)
-{
-       unsigned long addr;
-
-       /*
-        * Set priority for all PLB3 devices to 0.
-        * Set PLB3 arbiter to fair mode.
-        */
-       mfsdr(SD0_AMP1, addr);
-       mtsdr(SD0_AMP1, (addr & 0x000000FF) | 0x0000FF00);
-       addr = mfdcr(PLB3_ACR);
-       mtdcr(PLB3_ACR, addr | 0x80000000);
-
-       /*
-        * Set priority for all PLB4 devices to 0.
-        */
-       mfsdr(SD0_AMP0, addr);
-       mtsdr(SD0_AMP0, (addr & 0x000000FF) | 0x0000FF00);
-       addr = mfdcr(PLB4_ACR) | 0xa0000000;    /* Was 0x8---- */
-       mtdcr(PLB4_ACR, addr);
-
-       /*
-        * Set Nebula PLB4 arbiter to fair mode.
-        */
-       /* Segment0 */
-       addr = (mfdcr(PLB0_ACR) & ~PLB0_ACR_PPM_MASK) | PLB0_ACR_PPM_FAIR;
-       addr = (addr & ~PLB0_ACR_HBU_MASK) | PLB0_ACR_HBU_ENABLED;
-       addr = (addr & ~PLB0_ACR_RDP_MASK) | PLB0_ACR_RDP_4DEEP;
-       addr = (addr & ~PLB0_ACR_WRP_MASK) | PLB0_ACR_WRP_2DEEP;
-       mtdcr(PLB0_ACR, addr);
-
-       /* Segment1 */
-       addr = (mfdcr(PLB1_ACR) & ~PLB1_ACR_PPM_MASK) | PLB1_ACR_PPM_FAIR;
-       addr = (addr & ~PLB1_ACR_HBU_MASK) | PLB1_ACR_HBU_ENABLED;
-       addr = (addr & ~PLB1_ACR_RDP_MASK) | PLB1_ACR_RDP_4DEEP;
-       addr = (addr & ~PLB1_ACR_WRP_MASK) | PLB1_ACR_WRP_2DEEP;
-       mtdcr(PLB1_ACR, addr);
-
-#ifdef CONFIG_PCI_PNP
-       hose->fixup_irq = pmc440_pci_fixup_irq;
-#endif
-
-       return 1;
-}
-#endif /* defined(CONFIG_PCI) */
-
 /*
  * pci_target_init
  *
@@ -658,24 +602,16 @@ void pci_target_init(struct pci_controller *hose)
 #endif /* defined(CONFIG_PCI) && defined(CONFIG_SYS_PCI_TARGET_INIT) */
 
 /*
- * pci_master_init
+ * Override weak default pci_master_init()
  */
 #if defined(CONFIG_PCI) && defined(CONFIG_SYS_PCI_MASTER_INIT)
 void pci_master_init(struct pci_controller *hose)
 {
-       unsigned short temp_short;
-
        /*
-        * Write the PowerPC440 EP PCI Configuration regs.
-        * Enable PowerPC440 EP to be a master on the PCI bus (PMM).
-        * Enable PowerPC440 EP to act as a PCI memory target (PTM).
+        * Only configure the master in monach mode
         */
-       if (is_monarch()) {
-               pci_read_config_word(0, PCI_COMMAND, &temp_short);
-               pci_write_config_word(0, PCI_COMMAND,
-                                     temp_short | PCI_COMMAND_MASTER |
-                                     PCI_COMMAND_MEMORY);
-       }
+       if (is_monarch())
+               __pci_master_init(hose);
 }
 #endif /* defined(CONFIG_PCI) && defined(CONFIG_SYS_PCI_MASTER_INIT) */
 
@@ -712,7 +648,7 @@ static void wait_for_pci_ready(void)
 }
 
 /*
- * is_pci_host
+ * Override weak is_pci_host()
  *
  * This routine is called to determine if a pci scan should be
  * performed. With various hardware environments (especially cPCI and
@@ -741,17 +677,6 @@ int is_pci_host(struct pci_controller *hose)
 }
 #endif /* defined(CONFIG_PCI) */
 
-#if defined(CONFIG_POST)
-/*
- * Returns 1 if keys pressed to start the power-on long-running tests
- * Called from board_init_f().
- */
-int post_hotkeys_pressed(void)
-{
-       return 0;       /* No hotkeys supported */
-}
-#endif /* CONFIG_POST */
-
 #ifdef CONFIG_RESET_PHY_R
 void reset_phy(void)
 {
diff --git a/board/esd/pmc440/u-boot.lds b/board/esd/pmc440/u-boot.lds
deleted file mode 100644 (file)
index 3b6c096..0000000
+++ /dev/null
@@ -1,139 +0,0 @@
-/*
- * (C) Copyright 2002
- * 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      :
-  {
-    cpu/ppc4xx/start.o (.text)
-
-    *(.text)
-    *(.got1)
-  }
-  _etext = .;
-  PROVIDE (etext = .);
-  .rodata    :
-  {
-    *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
-  }
-  .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);
-  }
-
-  ppcenv_assert = ASSERT(. < 0xFFFF8000, ".bss section too big, overlaps .ppcenv section. Please update your confguration: CONFIG_SYS_MONITOR_BASE, CONFIG_SYS_MONITOR_LEN and TEXT_BASE may need to be modified.");
-
-  _end = . ;
-  PROVIDE (end = .);
-}
diff --git a/board/esd/voh405/u-boot.lds b/board/esd/voh405/u-boot.lds
deleted file mode 100644 (file)
index 0799275..0000000
+++ /dev/null
@@ -1,132 +0,0 @@
-/*
- * (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(powerpc)
-/* Do we need any of these for elf?
-   __DYNAMIC = 0;    */
-SECTIONS
-{
-  .resetvec 0xFFFFFFFC :
-  {
-    *(.resetvec)
-  } = 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      :
-  {
-    cpu/ppc4xx/start.o (.text)
-
-    *(.text)
-    *(.got1)
-  }
-  _etext = .;
-  PROVIDE (etext = .);
-  .rodata    :
-  {
-    *(.eh_frame)
-    *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
-  }
-  .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 = .);
-}
diff --git a/board/esd/vom405/u-boot.lds b/board/esd/vom405/u-boot.lds
deleted file mode 100644 (file)
index 0799275..0000000
+++ /dev/null
@@ -1,132 +0,0 @@
-/*
- * (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(powerpc)
-/* Do we need any of these for elf?
-   __DYNAMIC = 0;    */
-SECTIONS
-{
-  .resetvec 0xFFFFFFFC :
-  {
-    *(.resetvec)
-  } = 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      :
-  {
-    cpu/ppc4xx/start.o (.text)
-
-    *(.text)
-    *(.got1)
-  }
-  _etext = .;
-  PROVIDE (etext = .);
-  .rodata    :
-  {
-    *(.eh_frame)
-    *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
-  }
-  .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 = .);
-}
diff --git a/board/esd/wuh405/u-boot.lds b/board/esd/wuh405/u-boot.lds
deleted file mode 100644 (file)
index 285c901..0000000
+++ /dev/null
@@ -1,131 +0,0 @@
-/*
- * (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(powerpc)
-/* Do we need any of these for elf?
-   __DYNAMIC = 0;    */
-SECTIONS
-{
-  .resetvec 0xFFFFFFFC :
-  {
-    *(.resetvec)
-  } = 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      :
-  {
-    cpu/ppc4xx/start.o (.text)
-
-    *(.text)
-    *(.got1)
-  }
-  _etext = .;
-  PROVIDE (etext = .);
-  .rodata    :
-  {
-    *(.eh_frame)
-    *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
-  }
-  .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 = .);
-}
diff --git a/board/exbitgen/u-boot.lds b/board/exbitgen/u-boot.lds
deleted file mode 100644 (file)
index d2b28e1..0000000
+++ /dev/null
@@ -1,149 +0,0 @@
-/*
- * (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(powerpc)
-/* Do we need any of these for elf?
-   __DYNAMIC = 0;    */
-SECTIONS
-{
-  .resetvec 0xFFFFFFFC :
-  {
-    *(.resetvec)
-  } = 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/exbitgen/init.o      (.text)
-    cpu/ppc4xx/kgdb.o  (.text)
-    cpu/ppc4xx/traps.o (.text)
-    cpu/ppc4xx/interrupts.o    (.text)
-    cpu/ppc4xx/4xx_uart.o      (.text)
-    cpu/ppc4xx/cpu_init.o      (.text)
-    cpu/ppc4xx/speed.o (.text)
-    common/dlmalloc.o  (.text)
-    lib_generic/crc32.o                (.text)
-    lib_ppc/extable.o  (.text)
-    lib_generic/zlib.o         (.text)
-
-/*    . = env_offset;*/
-    common/env_embedded.o(.text)
-
-    *(.text)
-    *(.got1)
-  }
-  _etext = .;
-  PROVIDE (etext = .);
-  .rodata    :
-  {
-    *(.eh_frame)
-    *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
-  }
-  .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)
-  . = ALIGN(4);
-   *(.bss)
-   *(COMMON)
-   . = ALIGN(4);
-  }
-  _end = . ;
-  PROVIDE (end = .);
-}
diff --git a/board/faraday/a320evb/Makefile b/board/faraday/a320evb/Makefile
new file mode 100644 (file)
index 0000000..74f660d
--- /dev/null
@@ -0,0 +1,51 @@
+#
+# (C) Copyright 2000-2006
+# 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  := a320evb.o
+SOBJS  := lowlevel_init.o
+
+SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
+OBJS   := $(addprefix $(obj),$(COBJS))
+SOBJS  := $(addprefix $(obj),$(SOBJS))
+
+$(LIB):        $(obj).depend $(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
+
+#########################################################################
diff --git a/board/faraday/a320evb/a320evb.c b/board/faraday/a320evb/a320evb.c
new file mode 100644 (file)
index 0000000..85b11b9
--- /dev/null
@@ -0,0 +1,73 @@
+/*
+ * (C) Copyright 2009 Faraday Technology
+ * Po-Yu Chuang <ratbert@faraday-tech.com>
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <common.h>
+#include <netdev.h>
+#include <asm/io.h>
+
+#include <asm/arch/ftsmc020.h>
+
+DECLARE_GLOBAL_DATA_PTR;
+
+/*
+ * Miscellaneous platform dependent initialisations
+ */
+
+int board_init(void)
+{
+       gd->bd->bi_arch_number = MACH_TYPE_FARADAY;
+       gd->bd->bi_boot_params = PHYS_SDRAM_1 + 0x100;
+
+       ftsmc020_init();        /* initialize Flash */
+       return 0;
+}
+
+int dram_init(void)
+{
+       unsigned long sdram_base = PHYS_SDRAM_1;
+       unsigned long expected_size = PHYS_SDRAM_1_SIZE;
+       unsigned long actual_size;
+
+       actual_size = get_ram_size((void *)sdram_base, expected_size);
+
+       gd->bd->bi_dram[0].start = sdram_base;
+       gd->bd->bi_dram[0].size  = actual_size;
+
+       if (expected_size != actual_size)
+               printf("Warning: Only %lu of %lu MiB SDRAM is working\n",
+                               actual_size >> 20, expected_size >> 20);
+
+       return 0;
+}
+
+int board_eth_init(bd_t *bd)
+{
+       return ftmac100_initialize(bd);
+}
+
+ulong board_flash_get_legacy(ulong base, int banknum, flash_info_t *info)
+{
+       if (banknum == 0) {     /* non-CFI boot flash */
+               info->portwidth = FLASH_CFI_8BIT;
+               info->chipwidth = FLASH_CFI_BY8;
+               info->interface = FLASH_CFI_X8;
+               return 1;
+       } else
+               return 0;
+}
diff --git a/board/faraday/a320evb/config.mk b/board/faraday/a320evb/config.mk
new file mode 100644 (file)
index 0000000..aa25b98
--- /dev/null
@@ -0,0 +1,35 @@
+#
+# (C) Copyright 2009 Faraday Technology
+# Po-Yu Chuang <ratbert@faraday-tech.com>
+#
+# 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
+#
+
+# Faraday A320 board with FA526/FA626TE/ARM926EJ-S cpus
+#
+# see http://www.faraday-tech.com/ for more information
+
+# A320 has 1 bank of 64 MB DRAM
+#
+# 1000'0000 to 1400'0000
+#
+# Linux-Kernel is expected to be at 1000'8000, entry 1000'8000
+#
+# we load ourself to 13f8'0000
+#
+# download area is 1200'0000
+
+TEXT_BASE = 0x13f80000
diff --git a/board/faraday/a320evb/lowlevel_init.S b/board/faraday/a320evb/lowlevel_init.S
new file mode 100644 (file)
index 0000000..97718c0
--- /dev/null
@@ -0,0 +1,118 @@
+/*
+ * (C) Copyright 2009 Faraday Technology
+ * Po-Yu Chuang <ratbert@faraday-tech.com>
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <config.h>
+#include <version.h>
+
+#include <asm/macro.h>
+#include <asm/arch/ftsdmc020.h>
+
+/*
+ * parameters for the SDRAM controller
+ */
+#define TP0_A          (CONFIG_FTSDMC020_BASE + FTSDMC020_OFFSET_TP0)
+#define TP1_A          (CONFIG_FTSDMC020_BASE + FTSDMC020_OFFSET_TP1)
+#define CR_A           (CONFIG_FTSDMC020_BASE + FTSDMC020_OFFSET_CR)
+#define B0_BSR_A       (CONFIG_FTSDMC020_BASE + FTSDMC020_OFFSET_BANK0_BSR)
+#define ACR_A          (CONFIG_FTSDMC020_BASE + FTSDMC020_OFFSET_ACR)
+
+#define TP0_D          CONFIG_SYS_FTSDMC020_TP0
+#define TP1_D          CONFIG_SYS_FTSDMC020_TP1
+#define CR_D1          FTSDMC020_CR_IPREC
+#define CR_D2          FTSDMC020_CR_ISMR
+#define CR_D3          FTSDMC020_CR_IREF
+
+#define B0_BSR_D       (CONFIG_SYS_FTSDMC020_BANK0_BSR | \
+                       FTSDMC020_BANK_BASE(PHYS_SDRAM_1))
+#define ACR_D          FTSDMC020_ACR_TOC(0x18)
+
+/*
+ * numeric 7 segment display
+ */
+.macro led, num
+       write32 CONFIG_DEBUG_LED, \num
+.endm
+
+/*
+ * Waiting for SDRAM to set up
+ */
+.macro wait_sdram
+       ldr     r0, =CONFIG_FTSDMC020_BASE
+1:
+       ldr     r1, [r0, #FTSDMC020_OFFSET_CR]
+       cmp     r1, #0
+       bne     1b
+.endm
+
+.globl lowlevel_init
+lowlevel_init:
+       mov     r11, lr
+
+       led     0x0
+
+       bl      init_sdmc
+
+       led     0x1
+
+       /* everything is fine now */
+       mov     lr, r11
+       mov     pc, lr
+
+/*
+ * memory initialization
+ */
+init_sdmc:
+       led     0x10
+
+       /* set SDRAM register */
+
+       write32 TP0_A, TP0_D
+       led     0x11
+
+       write32 TP1_A, TP1_D
+       led     0x12
+
+       /* set to precharge */
+       write32 CR_A, CR_D1
+       led     0x13
+
+       wait_sdram
+       led     0x14
+
+       /* set mode register */
+       write32 CR_A, CR_D2
+       led     0x15
+
+       wait_sdram
+       led     0x16
+
+       /* set to refresh */
+       write32 CR_A, CR_D3
+       led     0x17
+
+       wait_sdram
+       led     0x18
+
+       write32 B0_BSR_A, B0_BSR_D
+       led     0x19
+
+       write32 ACR_A, ACR_D
+       led     0x1a
+
+       mov     pc, lr
index cb138296ba0fc14a4250592e03de36f2a9011686..0c4fd6854d46757e9eeb96997eee2d58b2aa4257 100644 (file)
@@ -72,7 +72,7 @@ static long fixed_sdram(void)
         * Erratum DDR3 requires a 50ms delay after clearing DDRCDR[DDR_cfg],
         * or the DDR2 controller may fail to initialize correctly.
         */
-       udelay(50000);
+       __udelay(50000);
 
        im->ddr.csbnds[0].csbnds = (msize - 1) >> 24;
        im->ddr.cs_config[0] = CONFIG_SYS_DDR_CONFIG;
diff --git a/board/g2000/u-boot.lds b/board/g2000/u-boot.lds
deleted file mode 100644 (file)
index 0799275..0000000
+++ /dev/null
@@ -1,132 +0,0 @@
-/*
- * (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(powerpc)
-/* Do we need any of these for elf?
-   __DYNAMIC = 0;    */
-SECTIONS
-{
-  .resetvec 0xFFFFFFFC :
-  {
-    *(.resetvec)
-  } = 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      :
-  {
-    cpu/ppc4xx/start.o (.text)
-
-    *(.text)
-    *(.got1)
-  }
-  _etext = .;
-  PROVIDE (etext = .);
-  .rodata    :
-  {
-    *(.eh_frame)
-    *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
-  }
-  .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 = .);
-}
diff --git a/board/gdsys/dlvision/u-boot.lds b/board/gdsys/dlvision/u-boot.lds
deleted file mode 100644 (file)
index 689c808..0000000
+++ /dev/null
@@ -1,131 +0,0 @@
-/*
- * (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(powerpc)
-/* Do we need any of these for elf?
-   __DYNAMIC = 0;    */
-SECTIONS
-{
-  .resetvec 0xFFFFFFFC :
-  {
-    *(.resetvec)
-  } = 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      :
-  {
-    cpu/ppc4xx/start.o (.text)
-
-    *(.text)
-    *(.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)
-  }
-  _end = . ;
-  PROVIDE (end = .);
-}
index 90dbe52aa283f0f30c2ac3e90009a46a5a988954..ecbc3c3d1a540ede7afb2eff1c24d92e62d2fd87 100644 (file)
@@ -29,6 +29,7 @@
 #include <ppc4xx.h>
 #include <asm/processor.h>
 #include <asm/io.h>
+#include <asm/4xx_pci.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -158,55 +159,13 @@ int checkboard(void)
 }
 
 /*
- * pci_pre_init
- *
- * This routine is called just prior to registering the hose and gives
- * the board the opportunity to check things. Returning a value of zero
- * indicates that things are bad & PCI initialization should be aborted.
- *
- *     Different boards may wish to customize the pci controller structure
- *     (add regions, override default access routines, etc) or perform
- *     certain pre-initialization actions.
- *
+ * Override weak pci_pre_init()
  */
 #if defined(CONFIG_PCI)
 int pci_pre_init(struct pci_controller *hose)
 {
-       unsigned long addr;
-
-       /*
-        * Set priority for all PLB3 devices to 0.
-        * Set PLB3 arbiter to fair mode.
-        */
-       mfsdr(SD0_AMP1, addr);
-       mtsdr(SD0_AMP1, (addr & 0x000000FF) | 0x0000FF00);
-       addr = mfdcr(PLB3_ACR);
-       mtdcr(PLB3_ACR, addr | 0x80000000);
-
-       /*
-        * Set priority for all PLB4 devices to 0.
-        */
-       mfsdr(SD0_AMP0, addr);
-       mtsdr(SD0_AMP0, (addr & 0x000000FF) | 0x0000FF00);
-       addr = mfdcr(PLB4_ACR) | 0xa0000000;    /* Was 0x8---- */
-       mtdcr(PLB4_ACR, addr);
-
-       /*
-        * Set Nebula PLB4 arbiter to fair mode.
-        */
-       /* Segment0 */
-       addr = (mfdcr(PLB0_ACR) & ~PLB0_ACR_PPM_MASK) | PLB0_ACR_PPM_FAIR;
-       addr = (addr & ~PLB0_ACR_HBU_MASK) | PLB0_ACR_HBU_ENABLED;
-       addr = (addr & ~PLB0_ACR_RDP_MASK) | PLB0_ACR_RDP_4DEEP;
-       addr = (addr & ~PLB0_ACR_WRP_MASK) | PLB0_ACR_WRP_2DEEP;
-       mtdcr(PLB0_ACR, addr);
-
-       /* Segment1 */
-       addr = (mfdcr(PLB1_ACR) & ~PLB1_ACR_PPM_MASK) | PLB1_ACR_PPM_FAIR;
-       addr = (addr & ~PLB1_ACR_HBU_MASK) | PLB1_ACR_HBU_ENABLED;
-       addr = (addr & ~PLB1_ACR_RDP_MASK) | PLB1_ACR_RDP_4DEEP;
-       addr = (addr & ~PLB1_ACR_WRP_MASK) | PLB1_ACR_WRP_2DEEP;
-       mtdcr(PLB1_ACR, addr);
+       /* First call common code */
+       __pci_pre_init(hose);
 
        /* enable 66 MHz ext. Clock */
        out32(GPIO1_TCR, in32(GPIO1_TCR) | 0x00008000);
@@ -215,109 +174,3 @@ int pci_pre_init(struct pci_controller *hose)
        return 1;
 }
 #endif /* defined(CONFIG_PCI) */
-
-/*
- * 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)
-{
-       /*
-        * Set up Direct MMIO registers
-        */
-
-       /*
-        * PowerPC440 EP PCI Master configuration.
-        * Map one 1Gig range of PLB/processor addresses to PCI memory space.
-        *       PLB address 0xA0000000-0xDFFFFFFF
-        *   ==> PCI address 0xA0000000-0xDFFFFFFF
-        *   Use byte reversed out routines to handle endianess.
-        * Make this region non-prefetchable.
-        */
-       out32r(PCIL0_PMM0MA, 0x00000000);       /* disabled b4 setting */
-       out32r(PCIL0_PMM0LA, CONFIG_SYS_PCI_MEMBASE);
-       out32r(PCIL0_PMM0PCILA, CONFIG_SYS_PCI_MEMBASE);
-       out32r(PCIL0_PMM0PCIHA, 0x00000000);
-       out32r(PCIL0_PMM0MA, 0xE0000001); /* 512M, no prefetch, enable region */
-
-       out32r(PCIL0_PMM1MA, 0x00000000);       /* disabled b4 setting */
-       out32r(PCIL0_PMM1LA, CONFIG_SYS_PCI_MEMBASE2);
-       out32r(PCIL0_PMM1PCILA, CONFIG_SYS_PCI_MEMBASE2);
-       out32r(PCIL0_PMM1PCIHA, 0x00000000);
-       out32r(PCIL0_PMM1MA, 0xE0000001); /* 512M, no prefetch, enable region */
-
-       out32r(PCIL0_PTM1MS, 0x00000001);
-       out32r(PCIL0_PTM1LA, 0);
-       out32r(PCIL0_PTM2MS, 0);
-       out32r(PCIL0_PTM2LA, 0);
-
-       /*
-        * Set up Configuration registers
-        */
-
-       /* Program the board's subsystem id/vendor id */
-       pci_write_config_word(0, PCI_SUBSYSTEM_VENDOR_ID,
-                             CONFIG_SYS_PCI_SUBSYS_VENDORID);
-       pci_write_config_word(0, PCI_SUBSYSTEM_ID, CONFIG_SYS_PCI_SUBSYS_ID);
-
-       /* Configure command register as bus master */
-       pci_write_config_word(0, PCI_COMMAND, PCI_COMMAND_MASTER);
-
-       /* 240nS PCI clock */
-       pci_write_config_word(0, PCI_LATENCY_TIMER, 1);
-
-       /* No error reporting */
-       pci_write_config_word(0, PCI_ERREN, 0);
-
-       pci_write_config_dword(0, PCI_BRDGOPT2, 0x00000101);
-
-}
-#endif /* defined(CONFIG_PCI) && defined(CONFIG_SYS_PCI_TARGET_INIT) */
-
-/*
- *  pci_master_init
- *
- */
-#if defined(CONFIG_PCI) && defined(CONFIG_SYS_PCI_MASTER_INIT)
-void pci_master_init(struct pci_controller *hose)
-{
-       unsigned short temp_short;
-
-       /*
-        * Write the PowerPC440 EP PCI Configuration regs.
-        *   Enable PowerPC440 EP to be a master on the PCI bus (PMM).
-        *   Enable PowerPC440 EP to act as a PCI memory target (PTM).
-        */
-       pci_read_config_word(0, PCI_COMMAND, &temp_short);
-       pci_write_config_word(0, PCI_COMMAND,
-                             temp_short | PCI_COMMAND_MASTER |
-                             PCI_COMMAND_MEMORY);
-}
-#endif /* defined(CONFIG_PCI) && defined(CONFIG_SYS_PCI_MASTER_INIT) */
-
-/*
- *  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.
- *
- *
- */
-#if defined(CONFIG_PCI)
-int is_pci_host(struct pci_controller *hose)
-{
-       return 1;
-}
-#endif /* defined(CONFIG_PCI) */
diff --git a/board/gdsys/gdppc440etx/u-boot.lds b/board/gdsys/gdppc440etx/u-boot.lds
deleted file mode 100644 (file)
index 6ab36ee..0000000
+++ /dev/null
@@ -1,141 +0,0 @@
-/*
- * (C) Copyright 2002
- * 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/gdppc440etx/init.o     (.text)
-
-    *(.text)
-    *(.got1)
-  }
-  _etext = .;
-  PROVIDE (etext = .);
-  .rodata    :
-  {
-    *(.eh_frame)
-    *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
-  }
-  .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 = .);
-}
index b42e90853f4bc97a680876d8f46b66313a166881..23a10c41f9f415c0c082d8fda0686edc23684163 100644 (file)
@@ -141,64 +141,6 @@ int checkboard(void)
        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 *)PCIL0_PIM0SA, 0); /* disable */
-       out_le32((void *)PCIL0_PIM1SA, 0); /* disable */
-       out_le32((void *)PCIL0_PIM2SA, 0); /* disable */
-       out_le32((void *)PCIL0_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 *)PCIL0_PIM0LAL, CONFIG_SYS_SDRAM_BASE);
-       out_le32((void *)PCIL0_PIM0LAH, 0);
-       out_le32((void *)PCIL0_PIM0SA, ~(gd->ram_size - 1) | 1);
-       out_le32((void *)PCIL0_BAR0, 0);
-
-       /*
-        * Program the board's subsystem id/vendor id
-        */
-       out_le16((void *)PCIL0_SBSYSVID, CONFIG_SYS_PCI_SUBSYS_VENDORID);
-       out_le16((void *)PCIL0_SBSYSID, CONFIG_SYS_PCI_SUBSYS_DEVICEID);
-
-       out_le16((void *)PCIL0_CMD, in16r(PCIL0_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)
 {
        /*
diff --git a/board/gdsys/intip/u-boot.lds b/board/gdsys/intip/u-boot.lds
deleted file mode 100644 (file)
index 624c4c1..0000000
+++ /dev/null
@@ -1,143 +0,0 @@
-/*
- * (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/intip/init.o   (.text)
-
-    *(.text)
-    *(.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 = .);
-}
diff --git a/board/gdsys/neo/u-boot.lds b/board/gdsys/neo/u-boot.lds
deleted file mode 100644 (file)
index 75202ca..0000000
+++ /dev/null
@@ -1,129 +0,0 @@
-/*
- * (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(powerpc)
-/* Do we need any of these for elf?
-   __DYNAMIC = 0;    */
-SECTIONS
-{
-  .resetvec 0xFFFFFFFC :
-  {
-    *(.resetvec)
-  } = 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      :
-  {
-    cpu/ppc4xx/start.o (.text)
-
-    *(.text)
-    *(.got1)
-  }
-  _etext = .;
-  PROVIDE (etext = .);
-  .rodata    :
-  {
-    *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
-  }
-  .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)
-  }
-  _end = . ;
-  PROVIDE (end = .);
-}
index 008f765af89aa89466aa10f6f52835c462587cf9..b37a0f24d493458b8da346f4d7a6da9760d96d93 100644 (file)
@@ -292,14 +292,3 @@ void board_poweroff (void)
        puts ("### Please power off the board ###\n");
        while (1);
 }
-
-#ifdef CONFIG_POST
-/*
- * Returns 1 if keys pressed to start the power-on long-running tests
- * Called from board_init_f().
- */
-int post_hotkeys_pressed (void)
-{
-       return 0;               /* No hotkeys supported */
-}
-#endif
diff --git a/board/ipek01/Makefile b/board/ipek01/Makefile
new file mode 100644 (file)
index 0000000..ddfd2ef
--- /dev/null
@@ -0,0 +1,50 @@
+#
+# (C) Copyright 2003-2006
+# 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)
+
+clean:
+       rm -f $(SOBJS) $(OBJS)
+
+distclean:     clean
+       rm -f $(LIB) core *.bak .depend
+
+#########################################################################
+
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+#########################################################################
diff --git a/board/ipek01/config.mk b/board/ipek01/config.mk
new file mode 100644 (file)
index 0000000..c8ecb29
--- /dev/null
@@ -0,0 +1,30 @@
+#
+# (C) Copyright 2003-2004
+# 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
+#
+
+#
+# IPEK01 board
+#
+
+TEXT_BASE = 0xfc000000
+
+PLATFORM_CPPFLAGS += -DTEXT_BASE=$(TEXT_BASE) -I$(TOPDIR)/board
diff --git a/board/ipek01/ipek01.c b/board/ipek01/ipek01.c
new file mode 100644 (file)
index 0000000..463a81b
--- /dev/null
@@ -0,0 +1,282 @@
+/*
+ * (C) Copyright 2003-2004
+ * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
+ *
+ * (C) Copyright 2004
+ * Mark Jonas, Freescale Semiconductor, mark.jonas@motorola.com.
+ *
+ * (C) Copyright 2006
+ * MicroSys GmbH
+ *
+ * (C) Copyright 2009
+ * Wolfgang Grandegger, DENX Software Engineering, wg@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 <mpc5xxx.h>
+#include <pci.h>
+#include <netdev.h>
+#include <miiphy.h>
+#include <libfdt.h>
+#include <mb862xx.h>
+#include <video_fb.h>
+#include <asm/processor.h>
+#include <asm/io.h>
+
+#ifdef CONFIG_OF_LIBFDT
+#include <fdt_support.h>
+#endif /* CONFIG_OF_LIBFDT */
+
+/* mt46v16m16-75 */
+#ifdef CONFIG_MPC5200_DDR
+/* Settings for XLB = 132 MHz */
+#define SDRAM_MODE     0x018D0000
+#define SDRAM_EMODE    0x40090000
+#define SDRAM_CONTROL  0x714f0f00
+#define SDRAM_CONFIG1  0x73722930
+#define SDRAM_CONFIG2  0x47770000
+#define SDRAM_TAPDELAY 0x10000000
+#else
+#error SDRAM is not supported on this board
+#endif
+
+DECLARE_GLOBAL_DATA_PTR;
+
+static void sdram_start (int hi_addr)
+{
+       struct mpc5xxx_sdram *sdram = (struct mpc5xxx_sdram *)MPC5XXX_SDRAM;
+       long hi_addr_bit = hi_addr ? 0x01000000 : 0;
+
+       /* unlock mode register */
+       out_be32 (&sdram->ctrl, SDRAM_CONTROL | 0x80000000 | hi_addr_bit);
+
+       /* precharge all banks */
+       out_be32 (&sdram->ctrl, SDRAM_CONTROL | 0x80000002 | hi_addr_bit);
+
+       /* set mode register: extended mode */
+       out_be32 (&sdram->mode, SDRAM_EMODE);
+
+       /* set mode register: reset DLL */
+       out_be32 (&sdram->mode, SDRAM_MODE | 0x04000000);
+
+       /* precharge all banks */
+       out_be32 (&sdram->ctrl, SDRAM_CONTROL | 0x80000002 | hi_addr_bit);
+
+       /* auto refresh */
+       out_be32 (&sdram->ctrl, SDRAM_CONTROL | 0x80000004 | hi_addr_bit);
+
+       /* set mode register */
+       out_be32 (&sdram->mode, SDRAM_MODE);
+
+       /* normal operation */
+       out_be32 (&sdram->ctrl, SDRAM_CONTROL | hi_addr_bit);
+}
+
+/*
+ * ATTENTION: Although partially referenced initdram does NOT make real
+ *            use of CONFIG_SYS_SDRAM_BASE. The code does not work if
+ *            CONFIG_SYS_SDRAM_BASE is something else than 0x00000000.
+ */
+
+phys_size_t initdram (int board_type)
+{
+       struct mpc5xxx_mmap_ctl *mmap_ctl =
+               (struct mpc5xxx_mmap_ctl *)CONFIG_SYS_MBAR;
+       struct mpc5xxx_sdram *sdram = (struct mpc5xxx_sdram *)MPC5XXX_SDRAM;
+       struct mpc5xxx_cdm *cdm = (struct mpc5xxx_cdm *)MPC5XXX_CDM;
+       ulong dramsize = 0;
+       ulong dramsize2 = 0;
+       ulong test1, test2;
+
+       /* setup SDRAM chip selects */
+       out_be32 (&mmap_ctl->sdram0, 0x0000001e);       /* 2G at 0x0 */
+       out_be32 (&mmap_ctl->sdram1, 0x00000000);       /* disabled */
+
+       /* setup config registers */
+       out_be32 (&sdram->config1, SDRAM_CONFIG1);
+       out_be32 (&sdram->config2, SDRAM_CONFIG2);
+
+       /* set tap delay */
+       out_be32 (&cdm->porcfg, SDRAM_TAPDELAY);
+
+       /* find RAM size using SDRAM CS0 only */
+       sdram_start (0);
+       test1 = get_ram_size ((long *)CONFIG_SYS_SDRAM_BASE, 0x80000000);
+       sdram_start (1);
+       test2 = get_ram_size ((long *)CONFIG_SYS_SDRAM_BASE, 0x80000000);
+       if (test1 > test2) {
+               sdram_start (0);
+               dramsize = test1;
+       } else {
+               dramsize = test2;
+       }
+
+       /* memory smaller than 1MB is impossible */
+       if (dramsize < (1 << 20))
+               dramsize = 0;
+
+       /* set SDRAM CS0 size according to the amount of RAM found */
+       if (dramsize > 0)
+               out_be32 (&mmap_ctl->sdram0,
+                         0x13 + __builtin_ffs (dramsize >> 20) - 1);
+       else
+               out_be32 (&mmap_ctl->sdram1, 0);        /* disabled */
+
+       /*
+        * On MPC5200B we need to set the special configuration delay in the
+        * DDR controller. Please refer to Freescale's AN3221 "MPC5200B SDRAM
+        * Initialization and Configuration", 3.3.1 SDelay--MBAR + 0x0190:
+        *
+        * "The SDelay should be written to a value of 0x00000004. It is
+        * required to account for changes caused by normal wafer processing
+        * parameters."
+        */
+       out_be32 (&sdram->sdelay, 0x04);
+
+       return dramsize + dramsize2;
+}
+
+int checkboard (void)
+{
+       puts ("Board: IPEK01 \n");
+       return 0;
+}
+
+void flash_preinit (void)
+{
+       struct mpc5xxx_lpb *lpb = (struct mpc5xxx_lpb *)MPC5XXX_LPB;
+
+       /*
+        * Now, when we are in RAM, enable flash write
+        * access for detection process.
+        * Note that CS_BOOT cannot be cleared when
+        * executing in flash.
+        */
+       clrbits_be32 (&lpb->cs0_cfg, 0x1);      /* clear RO */
+}
+
+void flash_afterinit (ulong start, ulong size)
+{
+       struct mpc5xxx_mmap_ctl *mmap_ctl =
+               (struct mpc5xxx_mmap_ctl *)CONFIG_SYS_MBAR;
+
+#if defined(CONFIG_BOOT_ROM)
+       /* adjust mapping */
+       out_be32 (&mmap_ctl->cs1_start, START_REG (start));
+       out_be32 (&mmap_ctl->cs1_stop, STOP_REG (start, size));
+#else
+       /* adjust mapping */
+       out_be32 (&mmap_ctl->boot_start, START_REG (start));
+       out_be32 (&mmap_ctl->cs0_start, START_REG (start));
+       out_be32 (&mmap_ctl->boot_stop, STOP_REG (start, size));
+       out_be32 (&mmap_ctl->cs0_stop, STOP_REG (start, size));
+#endif
+}
+
+extern flash_info_t flash_info[];      /* info for FLASH chips */
+
+int misc_init_r (void)
+{
+       /* adjust flash start */
+       gd->bd->bi_flashstart = flash_info[0].start[0];
+       return (0);
+}
+
+#ifdef CONFIG_PCI
+static struct pci_controller hose;
+
+extern void pci_mpc5xxx_init (struct pci_controller *);
+
+void pci_init_board (void)
+{
+       pci_mpc5xxx_init (&hose);
+}
+#endif
+
+#if defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP)
+void ft_board_setup (void *blob, bd_t * bd)
+{
+       ft_cpu_setup (blob, bd);
+       fdt_fixup_memory (blob, (u64) bd->bi_memstart, (u64) bd->bi_memsize);
+}
+#endif /* defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP) */
+
+int board_eth_init(bd_t *bis)
+{
+        cpu_eth_init(bis); /* Built in FEC comes first */
+        return pci_eth_init(bis);
+}
+
+#ifdef CONFIG_VIDEO
+extern GraphicDevice mb862xx;
+
+static const gdc_regs init_regs[] = {
+       {0x0100, 0x00000900},
+       {0x0020, 0x80190257},
+       {0x0024, 0x00000000},
+       {0x0028, 0x00000000},
+       {0x002c, 0x00000000},
+       {0x0110, 0x00000000},
+       {0x0114, 0x00000000},
+       {0x0118, 0x02570320},
+       {0x0004, 0x041f0000},
+       {0x0008, 0x031f031f},
+       {0x000c, 0x067f0347},
+       {0x0010, 0x02780000},
+       {0x0014, 0x0257025c},
+       {0x0018, 0x00000000},
+       {0x001c, 0x02570320},
+       {0x0100, 0x80010900},
+       {0x0, 0x0}
+};
+
+const gdc_regs *board_get_regs (void)
+{
+       return init_regs;
+}
+
+/* Returns Lime base address */
+unsigned int board_video_init (void)
+{
+       if (mb862xx_probe (CONFIG_SYS_LIME_BASE) != MB862XX_TYPE_LIME)
+               return 0;
+
+       mb862xx.winSizeX = 800;
+       mb862xx.winSizeY = 600;
+       mb862xx.gdfIndex = GDF_15BIT_555RGB;
+       mb862xx.gdfBytesPP = 2;
+
+       return CONFIG_SYS_LIME_BASE;
+}
+
+#if defined(CONFIG_CONSOLE_EXTRA_INFO)
+/*
+ * Return text to be printed besides the logo.
+ */
+void video_get_info_str (int line_number, char *info)
+{
+       if (line_number == 1)
+               strcpy (info, " Board: IPEK01");
+       else
+               info[0] = '\0';
+}
+#endif
+#endif /* CONFIG_VIDEO */
index 6be03ac541db12619d1761f267d6f0b26ff69ac5..fc71601e5c473807224b9691cb9ebf61e3b1969b 100644 (file)
@@ -33,7 +33,7 @@ OBJS  := $(addprefix $(obj),$(COBJS))
 SOBJS  := $(addprefix $(obj),$(SOBJS))
 
 $(LIB):        $(OBJS) $(SOBJS)
-       $(AR) $(ARFLAGS) $@ $(OBJS)
+       $(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS)
 
 clean:
        rm -f $(SOBJS) $(OBJS)
diff --git a/board/jse/u-boot.lds b/board/jse/u-boot.lds
deleted file mode 100644 (file)
index 6d0a21c..0000000
+++ /dev/null
@@ -1,140 +0,0 @@
-/*
- * (C) Copyright 2000-2004
- * 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
-
-  /* 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          : {
-    /* The start.o file includes the initial jump vector that
-       must be located in the beginning. It is the basic run-
-       time function that calls all other functions. */
-    cpu/ppc4xx/start.o (.text)
-
-    board/jse/init.o   (.text)
-    cpu/ppc4xx/kgdb.o  (.text)
-
-/*    . = env_offset;*/
-/*    common/env_embedded.o(.text)*/
-
-    *(.text)
-    *(.got1)
-  }
-  _etext = .;
-  PROVIDE (etext = .);
-  .rodata    :
-  {
-    *(.eh_frame)
-    *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
-  }
-  .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 = .);
-}
index 8c674a20953bd9330bf30c9884ce0e3ec8bab89f..d5260dc232e4f9840ff606f1429fcd60df77bde3 100644 (file)
@@ -35,6 +35,7 @@
 #include <asm/io.h>
 #include <asm/ppc4xx-uic.h>
 #include <asm/processor.h>
+#include <asm/4xx_pci.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -594,70 +595,12 @@ int checkboard(void)
 /*
  * Assign interrupts to PCI devices.
  */
-void korat_pci_fixup_irq(struct pci_controller *hose, pci_dev_t dev)
+void board_pci_fixup_irq(struct pci_controller *hose, pci_dev_t dev)
 {
        pci_hose_write_config_byte(hose, dev, PCI_INTERRUPT_LINE, VECNUM_EIRQ2);
 }
 #endif
 
-/*
- * pci_pre_init
- *
- * This routine is called just prior to registering the hose and gives
- * the board the opportunity to check things. Returning a value of zero
- * indicates that things are bad & PCI initialization should be aborted.
- *
- * Different boards may wish to customize the pci controller structure
- * (add regions, override default access routines, etc) or perform
- * certain pre-initialization actions.
- */
-#if defined(CONFIG_PCI)
-int pci_pre_init(struct pci_controller *hose)
-{
-       unsigned long addr;
-
-       /*
-        * Set priority for all PLB3 devices to 0.
-        * Set PLB3 arbiter to fair mode.
-        */
-       mfsdr(SD0_AMP1, addr);
-       mtsdr(SD0_AMP1, (addr & 0x000000FF) | 0x0000FF00);
-       addr = mfdcr(PLB3_ACR);
-       mtdcr(PLB3_ACR, addr | 0x80000000);
-
-       /*
-        * Set priority for all PLB4 devices to 0.
-        */
-       mfsdr(SD0_AMP0, addr);
-       mtsdr(SD0_AMP0, (addr & 0x000000FF) | 0x0000FF00);
-       addr = mfdcr(PLB4_ACR) | 0xa0000000;    /* Was 0x8---- */
-       mtdcr(PLB4_ACR, addr);
-
-       /*
-        * Set Nebula PLB4 arbiter to fair mode.
-        */
-       /* Segment0 */
-       addr = (mfdcr(PLB0_ACR) & ~PLB0_ACR_PPM_MASK) | PLB0_ACR_PPM_FAIR;
-       addr = (addr & ~PLB0_ACR_HBU_MASK) | PLB0_ACR_HBU_ENABLED;
-       addr = (addr & ~PLB0_ACR_RDP_MASK) | PLB0_ACR_RDP_4DEEP;
-       addr = (addr & ~PLB0_ACR_WRP_MASK) | PLB0_ACR_WRP_2DEEP;
-       mtdcr(PLB0_ACR, addr);
-
-       /* Segment1 */
-       addr = (mfdcr(PLB1_ACR) & ~PLB1_ACR_PPM_MASK) | PLB1_ACR_PPM_FAIR;
-       addr = (addr & ~PLB1_ACR_HBU_MASK) | PLB1_ACR_HBU_ENABLED;
-       addr = (addr & ~PLB1_ACR_RDP_MASK) | PLB1_ACR_RDP_4DEEP;
-       addr = (addr & ~PLB1_ACR_WRP_MASK) | PLB1_ACR_WRP_2DEEP;
-       mtdcr(PLB1_ACR, addr);
-
-#if defined(CONFIG_PCI_PNP)
-       hose->fixup_irq = korat_pci_fixup_irq;
-#endif
-
-       return 1;
-}
-#endif /* defined(CONFIG_PCI) */
-
 /*
  * pci_target_init
  *
@@ -668,60 +611,8 @@ int pci_pre_init(struct pci_controller *hose)
 #if defined(CONFIG_PCI) && defined(CONFIG_SYS_PCI_TARGET_INIT)
 void pci_target_init(struct pci_controller *hose)
 {
-       /*
-        * Set up Direct MMIO registers
-        */
-       /*
-        * PowerPC440EPX PCI Master configuration.
-        * Map one 1Gig range of PLB/processor addresses to PCI memory space.
-        * PLB address 0x80000000-0xBFFFFFFF
-        *     ==> PCI address 0x80000000-0xBFFFFFFF
-        * Use byte reversed out routines to handle endianess.
-        * Make this region non-prefetchable.
-        */
-       out32r(PCIL0_PMM0MA, 0x00000000);       /* PMM0 Mask/Attribute */
-                                               /* - disabled b4 setting */
-       out32r(PCIL0_PMM0LA, CONFIG_SYS_PCI_MEMBASE);   /* PMM0 Local Address */
-       out32r(PCIL0_PMM0PCILA,
-              CONFIG_SYS_PCI_MEMBASE);         /* PMM0 PCI Low Address */
-       out32r(PCIL0_PMM0PCIHA, 0x00000000);    /* PMM0 PCI High Address */
-       out32r(PCIL0_PMM0MA, 0xE0000001);       /* 512M + No prefetching, */
-                                               /* and enable region */
-
-       out32r(PCIL0_PMM1MA, 0x00000000);       /* PMM0 Mask/Attribute */
-                                               /* - disabled b4 setting */
-       out32r(PCIL0_PMM1LA,
-              CONFIG_SYS_PCI_MEMBASE + 0x20000000);    /* PMM0 Local Address */
-       out32r(PCIL0_PMM1PCILA,
-              CONFIG_SYS_PCI_MEMBASE + 0x20000000);    /* PMM0 PCI Low Address */
-       out32r(PCIL0_PMM1PCIHA, 0x00000000);    /* PMM0 PCI High Address */
-       out32r(PCIL0_PMM1MA, 0xE0000001);       /* 512M + No prefetching, */
-                                               /* and enable region */
-
-       out32r(PCIL0_PTM1MS, 0x00000001);       /* Memory Size/Attribute */
-       out32r(PCIL0_PTM1LA, 0);                /* Local Addr. Reg */
-       out32r(PCIL0_PTM2MS, 0);                /* Memory Size/Attribute */
-       out32r(PCIL0_PTM2LA, 0);                /* Local Addr. Reg */
-
-       /*
-        * Set up Configuration registers
-        */
-
-       /* Program the board's subsystem id/vendor id */
-       pci_write_config_word(0, PCI_SUBSYSTEM_VENDOR_ID,
-                             CONFIG_SYS_PCI_SUBSYS_VENDORID);
-       pci_write_config_word(0, PCI_SUBSYSTEM_ID, CONFIG_SYS_PCI_SUBSYS_ID);
-
-       /* Configure command register as bus master */
-       pci_write_config_word(0, PCI_COMMAND, PCI_COMMAND_MASTER);
-
-       /* 240nS PCI clock */
-       pci_write_config_word(0, PCI_LATENCY_TIMER, 1);
-
-       /* No error reporting */
-       pci_write_config_word(0, PCI_ERREN, 0);
-
-       pci_write_config_dword(0, PCI_BRDGOPT2, 0x00000101);
+       /* First do 440EP(x) common setup */
+       __pci_target_init(hose);
 
        /*
         * Set up Configuration registers for on-board NEC uPD720101 USB
@@ -731,55 +622,6 @@ void pci_target_init(struct pci_controller *hose)
 }
 #endif /* defined(CONFIG_PCI) && defined(CONFIG_SYS_PCI_TARGET_INIT) */
 
-#if defined(CONFIG_PCI) && defined(CONFIG_SYS_PCI_MASTER_INIT)
-void pci_master_init(struct pci_controller *hose)
-{
-       unsigned short temp_short;
-
-       /*
-        * Write the PowerPC440 EP PCI Configuration regs.
-        * Enable PowerPC440 EP to be a master on the PCI bus (PMM).
-        * Enable PowerPC440 EP to act as a PCI memory target (PTM).
-        */
-       pci_read_config_word(0, PCI_COMMAND, &temp_short);
-       pci_write_config_word(0, PCI_COMMAND,
-                             temp_short | PCI_COMMAND_MASTER |
-                             PCI_COMMAND_MEMORY);
-}
-#endif
-
-/*
- * 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.
- */
-#if defined(CONFIG_PCI)
-int is_pci_host(struct pci_controller *hose)
-{
-       /* Korat is always configured as host. */
-       return (1);
-}
-#endif /* defined(CONFIG_PCI) */
-
-#if defined(CONFIG_POST)
-/*
- * Returns 1 if keys pressed to start the power-on long-running tests
- * Called from board_init_f().
- */
-int post_hotkeys_pressed(void)
-{
-       return 0;       /* No hotkeys supported */
-}
-#endif /* CONFIG_POST */
-
 #if defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP)
 void ft_board_setup(void *blob, bd_t *bd)
 {
diff --git a/board/korat/u-boot.lds b/board/korat/u-boot.lds
deleted file mode 100644 (file)
index b9ec56b..0000000
+++ /dev/null
@@ -1,142 +0,0 @@
-/*
- * (C) Copyright 2002
- * 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)
-
-    *(.text)
-    *(.got1)
-  }
-  _etext = .;
-  PROVIDE (etext = .);
-  .rodata    :
-  {
-    *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
-  }
-  .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);
-  }
-
-  ppcenv_assert = ASSERT(. < 0xFFFF8000, ".bss section too big, overlaps .ppcenv section. Please update your confguration: CONFIG_SYS_MONITOR_BASE, CONFIG_SYS_MONITOR_LEN and TEXT_BASE may need to be modified.");
-
-  _end = . ;
-  PROVIDE (end = .);
-}
index fec5407bc742bf3f8edb4d38730b8e82556026b1..2418d59d866c6a0b945321eadd6da87671e9d76f 100644 (file)
@@ -70,14 +70,3 @@ void poweron_key (void)
        else
                setenv ("key1", "on");
 }
-
-#ifdef CONFIG_POST
-/*
- * Returns 1 if keys pressed to start the power-on long-running tests
- * Called from board_init_f().
- */
-int post_hotkeys_pressed (void)
-{
-       return (0);
-}
-#endif
index ef7f2e8dc5778a231a0c25c4449c5c17222abc63..415e036c006456e51a42321eb8a95ebdd4fbd12f 100644 (file)
@@ -275,166 +275,6 @@ int checkboard(void)
        return (0);
 }
 
-/*************************************************************************
- *  pci_pre_init
- *
- *  This routine is called just prior to registering the hose and gives
- *  the board the opportunity to check things. Returning a value of zero
- *  indicates that things are bad & PCI initialization should be aborted.
- *
- *     Different boards may wish to customize the pci controller structure
- *     (add regions, override default access routines, etc) or perform
- *     certain pre-initialization actions.
- *
- ************************************************************************/
-#if defined(CONFIG_PCI)
-int pci_pre_init(struct pci_controller *hose)
-{
-       unsigned long addr;
-
-       /*-------------------------------------------------------------------------+
-         | Set priority for all PLB3 devices to 0.
-         | Set PLB3 arbiter to fair mode.
-         +-------------------------------------------------------------------------*/
-       mfsdr(SD0_AMP1, addr);
-       mtsdr(SD0_AMP1, (addr & 0x000000FF) | 0x0000FF00);
-       addr = mfdcr(PLB3_ACR);
-       mtdcr(PLB3_ACR, addr | 0x80000000);
-
-       /*-------------------------------------------------------------------------+
-         | Set priority for all PLB4 devices to 0.
-         +-------------------------------------------------------------------------*/
-       mfsdr(SD0_AMP0, addr);
-       mtsdr(SD0_AMP0, (addr & 0x000000FF) | 0x0000FF00);
-       addr = mfdcr(PLB4_ACR) | 0xa0000000;    /* Was 0x8---- */
-       mtdcr(PLB4_ACR, addr);
-
-       /*-------------------------------------------------------------------------+
-         | Set Nebula PLB4 arbiter to fair mode.
-         +-------------------------------------------------------------------------*/
-       /* Segment0 */
-       addr = (mfdcr(PLB0_ACR) & ~PLB0_ACR_PPM_MASK) | PLB0_ACR_PPM_FAIR;
-       addr = (addr & ~PLB0_ACR_HBU_MASK) | PLB0_ACR_HBU_ENABLED;
-       addr = (addr & ~PLB0_ACR_RDP_MASK) | PLB0_ACR_RDP_4DEEP;
-       addr = (addr & ~PLB0_ACR_WRP_MASK) | PLB0_ACR_WRP_2DEEP;
-       mtdcr(PLB0_ACR, addr);
-
-       /* Segment1 */
-       addr = (mfdcr(PLB1_ACR) & ~PLB1_ACR_PPM_MASK) | PLB1_ACR_PPM_FAIR;
-       addr = (addr & ~PLB1_ACR_HBU_MASK) | PLB1_ACR_HBU_ENABLED;
-       addr = (addr & ~PLB1_ACR_RDP_MASK) | PLB1_ACR_RDP_4DEEP;
-       addr = (addr & ~PLB1_ACR_WRP_MASK) | PLB1_ACR_WRP_2DEEP;
-       mtdcr(PLB1_ACR, addr);
-
-       return 1;
-}
-#endif /* defined(CONFIG_PCI) */
-
-/*************************************************************************
- *  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)
-{
-       /*--------------------------------------------------------------------------+
-        * Set up Direct MMIO registers
-        *--------------------------------------------------------------------------*/
-       /*--------------------------------------------------------------------------+
-         | PowerPC440EPX PCI Master configuration.
-         | Map one 1Gig range of PLB/processor addresses to PCI memory space.
-         |   PLB address 0xA0000000-0xDFFFFFFF ==> PCI address 0xA0000000-0xDFFFFFFF
-         |   Use byte reversed out routines to handle endianess.
-         | Make this region non-prefetchable.
-         +--------------------------------------------------------------------------*/
-       out32r(PCIL0_PMM0MA, 0x00000000);       /* PMM0 Mask/Attribute - disabled b4 setting */
-       out32r(PCIL0_PMM0LA, CONFIG_SYS_PCI_MEMBASE);   /* PMM0 Local Address */
-       out32r(PCIL0_PMM0PCILA, CONFIG_SYS_PCI_MEMBASE);        /* PMM0 PCI Low Address */
-       out32r(PCIL0_PMM0PCIHA, 0x00000000);    /* PMM0 PCI High Address */
-       out32r(PCIL0_PMM0MA, 0xE0000001);       /* 512M + No prefetching, and enable region */
-
-       out32r(PCIL0_PMM1MA, 0x00000000);       /* PMM0 Mask/Attribute - disabled b4 setting */
-       out32r(PCIL0_PMM1LA, CONFIG_SYS_PCI_MEMBASE2); /* PMM0 Local Address */
-       out32r(PCIL0_PMM1PCILA, CONFIG_SYS_PCI_MEMBASE2);       /* PMM0 PCI Low Address */
-       out32r(PCIL0_PMM1PCIHA, 0x00000000);    /* PMM0 PCI High Address */
-       out32r(PCIL0_PMM1MA, 0xE0000001);       /* 512M + No prefetching, and enable region */
-
-       out32r(PCIL0_PTM1MS, 0x00000001);       /* Memory Size/Attribute */
-       out32r(PCIL0_PTM1LA, 0);        /* Local Addr. Reg */
-       out32r(PCIL0_PTM2MS, 0);        /* Memory Size/Attribute */
-       out32r(PCIL0_PTM2LA, 0);        /* Local Addr. Reg */
-
-       /*--------------------------------------------------------------------------+
-        * Set up Configuration registers
-        *--------------------------------------------------------------------------*/
-
-       /* Program the board's subsystem id/vendor id */
-       pci_write_config_word(0, PCI_SUBSYSTEM_VENDOR_ID,
-                             CONFIG_SYS_PCI_SUBSYS_VENDORID);
-       pci_write_config_word(0, PCI_SUBSYSTEM_ID, CONFIG_SYS_PCI_SUBSYS_ID);
-
-       /* Configure command register as bus master */
-       pci_write_config_word(0, PCI_COMMAND, PCI_COMMAND_MASTER);
-
-       /* 240nS PCI clock */
-       pci_write_config_word(0, PCI_LATENCY_TIMER, 1);
-
-       /* No error reporting */
-       pci_write_config_word(0, PCI_ERREN, 0);
-
-       pci_write_config_dword(0, PCI_BRDGOPT2, 0x00000101);
-
-}
-#endif                         /* defined(CONFIG_PCI) && defined(CONFIG_SYS_PCI_TARGET_INIT) */
-
-/*************************************************************************
- *  pci_master_init
- *
- ************************************************************************/
-#if defined(CONFIG_PCI) && defined(CONFIG_SYS_PCI_MASTER_INIT)
-void pci_master_init(struct pci_controller *hose)
-{
-       unsigned short temp_short;
-
-       /*--------------------------------------------------------------------------+
-         | Write the PowerPC440 EP PCI Configuration regs.
-         |   Enable PowerPC440 EP to be a master on the PCI bus (PMM).
-         |   Enable PowerPC440 EP to act as a PCI memory target (PTM).
-         +--------------------------------------------------------------------------*/
-       pci_read_config_word(0, PCI_COMMAND, &temp_short);
-       pci_write_config_word(0, PCI_COMMAND,
-                             temp_short | PCI_COMMAND_MASTER |
-                             PCI_COMMAND_MEMORY);
-}
-#endif                         /* defined(CONFIG_PCI) && defined(CONFIG_SYS_PCI_MASTER_INIT) */
-
-/*************************************************************************
- *  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.
- *
- *
- ************************************************************************/
-#if defined(CONFIG_PCI)
-int is_pci_host(struct pci_controller *hose)
-{
-       /* Cactus is always configured as host. */
-       return (1);
-}
-#endif                         /* defined(CONFIG_PCI) */
-
 void hw_watchdog_reset(void)
 {
        int val;
@@ -532,13 +372,6 @@ unsigned int board_video_init (void)
        udelay(500);
        gpio_write_bit(CONFIG_SYS_GPIO_LIME_RST, 1);
 
-       /* Lime memory clock adjusted to 100MHz */
-       out_be32((void *)CONFIG_SYS_LIME_SDRAM_CLOCK, CONFIG_SYS_LIME_CLOCK_100MHZ);
-       /* Wait untill time expired. Because of requirements in lime manual */
-       udelay(300);
-       /* Write lime controller memory parameters */
-       out_be32((void *)CONFIG_SYS_LIME_MMR, CONFIG_SYS_LIME_MMR_VALUE);
-
        mb862xx.winSizeX = 640;
        mb862xx.winSizeY = 480;
        mb862xx.gdfBytesPP = 2;
diff --git a/board/lwmon5/u-boot.lds b/board/lwmon5/u-boot.lds
deleted file mode 100644 (file)
index b9ec56b..0000000
+++ /dev/null
@@ -1,142 +0,0 @@
-/*
- * (C) Copyright 2002
- * 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)
-
-    *(.text)
-    *(.got1)
-  }
-  _etext = .;
-  PROVIDE (etext = .);
-  .rodata    :
-  {
-    *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
-  }
-  .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);
-  }
-
-  ppcenv_assert = ASSERT(. < 0xFFFF8000, ".bss section too big, overlaps .ppcenv section. Please update your confguration: CONFIG_SYS_MONITOR_BASE, CONFIG_SYS_MONITOR_LEN and TEXT_BASE may need to be modified.");
-
-  _end = . ;
-  PROVIDE (end = .);
-}
index 2a9366656f5da1b27275536b5c9f47c4bb32fd75..59644dba6a645eda7d19c517dc2b50e44680faac 100644 (file)
@@ -33,7 +33,7 @@ OBJS  := $(addprefix $(obj),$(COBJS))
 SOBJS  := $(addprefix $(obj),$(SOBJS))
 
 $(LIB):        $(OBJS) $(SOBJS)
-       $(AR) $(ARFLAGS) $@ $(OBJS)
+       $(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS)
 
 clean:
        rm -f $(SOBJS) $(OBJS)
index 41118d55290263c295de8819226168823145506f..5e0bdae91b798cc3bee10dc399d5c7995ef0f255 100644 (file)
@@ -27,3 +27,6 @@
 
 #TEXT_BASE = 0xFFFE0000
 TEXT_BASE = 0x18000000
+
+# Use board specific linker script
+LDSCRIPT := $(SRCTREE)/board/ml2/u-boot.lds
index 53bf84658661ea5feaf5c01d0d89fc84e955acce..18a8d8656c808c75dda8400b1930824dcaa9fb52 100644 (file)
@@ -38,7 +38,7 @@ OBJS  := $(addprefix $(obj),$(COBJS))
 SOBJS  := $(addprefix $(obj),$(SOBJS))
 
 $(LIB):        $(OBJS) $(SOBJS)
-       $(AR) $(ARFLAGS) $@ $(OBJS)
+       $(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS)
 
 clean:
        rm -f $(SOBJS) $(OBJS)
index 495e9bd88a430f5f48c51156bfeb91f8c1c379d1..af3a98a42fb4255fd518b6fbd950d19ec2b0c2c0 100644 (file)
@@ -706,17 +706,6 @@ void print_mip405_rev (void)
 }
 
 
-#ifdef CONFIG_POST
-/*
- * Returns 1 if keys pressed to start the power-on long-running tests
- * Called from board_init_f().
- */
-int post_hotkeys_pressed(void)
-{
-       return 0;       /* No hotkeys supported */
-}
-#endif
-
 extern int mk_date (char *, struct rtc_time *);
 
 int last_stage_init (void)
diff --git a/board/mpl/mip405/u-boot.lds b/board/mpl/mip405/u-boot.lds
deleted file mode 100644 (file)
index cc8bed0..0000000
+++ /dev/null
@@ -1,154 +0,0 @@
-/*
- * (C) Copyright 2000, 2001
- * 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 :
-  {
-    board/mpl/mip405/init.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/mpl/mip405/init.o    (.text)
-    cpu/ppc4xx/kgdb.o  (.text)
-    cpu/ppc4xx/traps.o (.text)
-    cpu/ppc4xx/interrupts.o    (.text)
-    cpu/ppc4xx/4xx_uart.o      (.text)
-    cpu/ppc4xx/cpu_init.o      (.text)
-    cpu/ppc4xx/speed.o (.text)
-    drivers/net/4xx_enet.o     (.text)
-    common/dlmalloc.o  (.text)
-    lib_generic/crc32.o                (.text)
-    lib_ppc/extable.o  (.text)
-    lib_generic/zlib.o         (.text)
-
-/*    . = env_offset;*/
-/*    common/env_embedded.o(.text)*/
-
-    *(.text)
-    *(.got1)
-  }
-  _etext = .;
-  PROVIDE (etext = .);
-  .rodata    :
-  {
-    *(.eh_frame)
-    *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
-  }
-  .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 = .);
-}
index 590c7da5bb390f43eaaa424d5a9bc727f74fb405..774b59f84e5fed339c8cc7d9388443126f0bf0c9 100644 (file)
@@ -41,7 +41,7 @@ OBJS  := $(addprefix $(obj),$(COBJS))
 SOBJS  := $(addprefix $(obj),$(SOBJS))
 
 $(LIB):        $(OBJS) $(SOBJS)
-       $(AR) $(ARFLAGS) $@ $(OBJS)
+       $(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS)
 
 clean:
        rm -f $(SOBJS) $(OBJS)
diff --git a/board/mpl/pip405/u-boot.lds b/board/mpl/pip405/u-boot.lds
deleted file mode 100644 (file)
index 92290d8..0000000
+++ /dev/null
@@ -1,149 +0,0 @@
-/*
- * (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(powerpc)
-/* Do we need any of these for elf?
-   __DYNAMIC = 0;    */
-SECTIONS
-{
-  .resetvec 0xFFFFFFFC :
-  {
-    *(.resetvec)
-  } = 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/mpl/pip405/init.o    (.text)
-    cpu/ppc4xx/kgdb.o  (.text)
-    cpu/ppc4xx/traps.o (.text)
-    cpu/ppc4xx/interrupts.o    (.text)
-    cpu/ppc4xx/4xx_uart.o      (.text)
-    cpu/ppc4xx/cpu_init.o      (.text)
-    cpu/ppc4xx/speed.o (.text)
-    common/dlmalloc.o  (.text)
-    lib_generic/crc32.o                (.text)
-    lib_ppc/extable.o  (.text)
-    lib_generic/zlib.o         (.text)
-
-/*    . = env_offset;*/
-/*    common/env_embedded.o(.text)*/
-
-    *(.text)
-    *(.got1)
-  }
-  _etext = .;
-  PROVIDE (etext = .);
-  .rodata    :
-  {
-    *(.eh_frame)
-    *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
-  }
-  .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 = .);
-}
index 4d8b579caa8c8b8f3b290d5a1edeab84be418b47..1835677a88575d981bb24b275a9384f59691c557 100644 (file)
@@ -27,7 +27,7 @@
 
 #include <common.h>
 #include <netdev.h>
-#include <s3c2410.h>
+#include <asm/arch/s3c24x0_cpu.h>
 #include <stdio_dev.h>
 #include <i2c.h>
 
index f46e0e4c58dc6c83932cfc07bafef4df843ce9e5..94fd2faf3bf9a730eacc801ab9dab9ea35595514 100644 (file)
@@ -25,7 +25,7 @@
  * Global routines used for VCMA9
  *****************************************************************************/
 
-#include <s3c2410.h>
+#include <asm/arch/s3c24x0_cpu.h>
 
 extern int  mem_test(unsigned long start, unsigned long ramsize,int mode);
 
@@ -118,13 +118,13 @@ static inline u32 NF_Read_ECC(void)
 
 /* VCMA9 PLD regsiters */
 typedef struct {
-       S3C24X0_REG8    ID;
-       S3C24X0_REG8    NIC;
-       S3C24X0_REG8    CAN;
-       S3C24X0_REG8    MISC;
-       S3C24X0_REG8    GPCD;
-       S3C24X0_REG8    BOARD;
-       S3C24X0_REG8    SDRAM;
+       u8      ID;
+       u8      NIC;
+       u8      CAN;
+       u8      MISC;
+       u8      GPCD;
+       u8      BOARD;
+       u8      SDRAM;
 } /*__attribute__((__packed__))*/ VCMA9_PLD;
 
 #define VCMA9_PLD_BASE 0x2C000100
index ba3e9c3cff1ef1adf6c9fd04146d99933ff381b1..8efbc23c897dadf32d4f26ba9611eee89114a8c8 100644 (file)
@@ -174,17 +174,6 @@ phys_size_t initdram(int board_type)
        return dram_size;
 }
 
-#if defined(CONFIG_POST)
-/*
- * Returns 1 if keys pressed to start the power-on long-running tests
- * Called from board_init_f().
- */
-int post_hotkeys_pressed(void)
-{
-       return 0;       /* No hotkeys supported */
-}
-#endif /* CONFIG_POST */
-
 #if defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP)
 void ft_board_setup(void *blob, bd_t *bd)
 {
diff --git a/board/netstal/hcu4/u-boot.lds b/board/netstal/hcu4/u-boot.lds
deleted file mode 100644 (file)
index f748ec3..0000000
+++ /dev/null
@@ -1,137 +0,0 @@
-/*
- * (C) Copyright 2000-2004
- * 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
-
-  /* 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          : {
-    /* The start.o file includes the initial jump vector that
-       must be located in the beginning. It is the basic run-
-       time function that calls all other functions. */
-    cpu/ppc4xx/start.o (.text)
-
-/*    . = env_offset;*/
-/*    common/env_embedded.o(.text)*/
-
-    *(.text)
-    *(.got1)
-  }
-  _etext = .;
-  PROVIDE (etext = .);
-  .rodata    :
-  {
-    *(.eh_frame)
-    *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
-  }
-  .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 = .);
-}
index 946c3f3a4dd304a97e6b7a727241db3b84178f4a..c545cc01ea760fb64a1a32dad41e32edc7e363b0 100644 (file)
@@ -22,6 +22,8 @@
 #include <asm/processor.h>
 #include <ppc440.h>
 #include <asm/io.h>
+#include <asm/4xx_pci.h>
+
 #include  "../common/nm.h"
 
 DECLARE_GLOBAL_DATA_PTR;
@@ -377,121 +379,17 @@ int pci_pre_init(struct pci_controller *hose)
 }
 
 /*
- *  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.
- *
- */
-void pci_target_init(struct pci_controller *hose)
-{
-       if (!board_with_pci()) { return; }
-       /*
-        * Set up Direct MMIO registers
-        *
-        * PowerPC440EPX PCI Master configuration.
-        * Map one 1Gig range of PLB/processor addresses to PCI memory space.
-        *   PLB address 0xA0000000-0xDFFFFFFF ==> PCI address
-        *                0xA0000000-0xDFFFFFFF
-        *   Use byte reversed out routines to handle endianess.
-        * Make this region non-prefetchable.
-        */
-       /* PMM0 Mask/Attribute - disabled b4 setting */
-       out32r(PCIL0_PMM0MA, 0x00000000);
-       out32r(PCIL0_PMM0LA, CONFIG_SYS_PCI_MEMBASE);   /* PMM0 Local Address */
-       /* PMM0 PCI Low Address */
-       out32r(PCIL0_PMM0PCILA, CONFIG_SYS_PCI_MEMBASE);
-       out32r(PCIL0_PMM0PCIHA, 0x00000000);    /* PMM0 PCI High Address */
-       /* 512M + No prefetching, and enable region */
-       out32r(PCIL0_PMM0MA, 0xE0000001);
-
-       /* PMM0 Mask/Attribute - disabled b4 setting */
-       out32r(PCIL0_PMM1MA, 0x00000000);
-       out32r(PCIL0_PMM1LA, CONFIG_SYS_PCI_MEMBASE2);  /* PMM0 Local Address */
-       /* PMM0 PCI Low Address */
-       out32r(PCIL0_PMM1PCILA, CONFIG_SYS_PCI_MEMBASE2);
-       out32r(PCIL0_PMM1PCIHA, 0x00000000);    /* PMM0 PCI High Address */
-       /* 512M + No prefetching, and enable region */
-       out32r(PCIL0_PMM1MA, 0xE0000001);
-
-       out32r(PCIL0_PTM1MS, 0x00000001);       /* Memory Size/Attribute */
-       out32r(PCIL0_PTM1LA, 0);        /* Local Addr. Reg */
-       out32r(PCIL0_PTM2MS, 0);        /* Memory Size/Attribute */
-       out32r(PCIL0_PTM2LA, 0);        /* Local Addr. Reg */
-
-       /*
-        * Set up Configuration registers
-        */
-
-       /* Program the board's subsystem id/vendor id */
-       pci_write_config_word(0, PCI_SUBSYSTEM_VENDOR_ID,
-                             CONFIG_SYS_PCI_SUBSYS_VENDORID);
-       pci_write_config_word(0, PCI_SUBSYSTEM_ID, CONFIG_SYS_PCI_SUBSYS_ID);
-
-       /* Configure command register as bus master */
-       pci_write_config_word(0, PCI_COMMAND, PCI_COMMAND_MASTER);
-
-       /* 240nS PCI clock */
-       pci_write_config_word(0, PCI_LATENCY_TIMER, 1);
-
-       /* No error reporting */
-       pci_write_config_word(0, PCI_ERREN, 0);
-
-       pci_write_config_dword(0, PCI_BRDGOPT2, 0x00000101);
-}
-
-/*
- *  pci_master_init
- *
+ * Override weak default pci_master_init()
  */
 void pci_master_init(struct pci_controller *hose)
 {
-       unsigned short temp_short;
-       if (!board_with_pci()) { return; }
-
-       /*---------------------------------------------------------------
-        * Write the PowerPC440 EP PCI Configuration regs.
-        *   Enable PowerPC440 EP to be a master on the PCI bus (PMM).
-        *   Enable PowerPC440 EP to act as a PCI memory target (PTM).
-        *--------------------------------------------------------------*/
-       pci_read_config_word(0, PCI_COMMAND, &temp_short);
-       pci_write_config_word(0, PCI_COMMAND,
-                             temp_short | PCI_COMMAND_MASTER |
-                             PCI_COMMAND_MEMORY);
-}
+       if (!board_with_pci())
+               return;
 
-/*
- *  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)
-{
-       return 1;
+       __pci_master_init(hose);
 }
 #endif  /* defined(CONFIG_PCI) */
 
-#if defined(CONFIG_POST)
-/*
- * Returns 1 if keys pressed to start the power-on long-running tests
- * Called from board_init_f().
- */
-int post_hotkeys_pressed(void)
-{
-       return 0;       /* No hotkeys supported */
-}
-#endif /* CONFIG_POST */
-
 #if defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP)
 void ft_board_setup(void *blob, bd_t *bd)
 {
diff --git a/board/netstal/hcu5/u-boot.lds b/board/netstal/hcu5/u-boot.lds
deleted file mode 100644 (file)
index bdc6e70..0000000
+++ /dev/null
@@ -1,141 +0,0 @@
-/*
- * (C) Copyright 2000-2004
- * 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)
-
-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)
-
-    *(.text)
-    *(.got1)
-  }
-  _etext = .;
-  PROVIDE (etext = .);
-  .rodata    :
-  {
-    *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
-  }
-  .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);
-  }
-
-  ppcenv_assert = ASSERT(. < 0xFFFFB000, ".bss section too big, overlaps .ppcenv section. Please update your confguration: CONFIG_SYS_MONITOR_BASE, CONFIG_SYS_MONITOR_LEN and TEXT_BASE may need to be modified.");
-
-  _end = . ;
-  PROVIDE (end = .);
-}
index 945d79aa200e9b91fef805c1b220e4643dd97feb..c66ab97ac5b35b16e75797d925f428a00f589392 100644 (file)
@@ -173,17 +173,6 @@ phys_size_t initdram(int board_type)
        return dram_size;
 }
 
-#if defined(CONFIG_POST)
-/*
- * Returns 1 if keys pressed to start the power-on long-running tests
- * Called from board_init_f().
- */
-int post_hotkeys_pressed(void)
-{
-       return 0;       /* No hotkeys supported */
-}
-#endif /* CONFIG_POST */
-
 #if defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP)
 void ft_board_setup(void *blob, bd_t *bd)
 {
diff --git a/board/netstal/mcu25/u-boot.lds b/board/netstal/mcu25/u-boot.lds
deleted file mode 100644 (file)
index 2cf3361..0000000
+++ /dev/null
@@ -1,137 +0,0 @@
-/*
- * (C) Copyright 2000-2004
- * 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
-
-  /* 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          : {
-    /* The start.o file includes the initial jump vector that
-       must be located in the beginning. It is the basic run-
-       time function that calls all other functions. */
-    cpu/ppc4xx/start.o (.text)
-
-/*    . = env_offset;*/
-/*    common/env_embedded.o(.text)*/
-
-    *(.text)
-    *(.got1)
-  }
-  _etext = .;
-  PROVIDE (etext = .);
-  .rodata    :
-  {
-    *(.eh_frame)
-    *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
-  }
-  .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       :
-  {
-   *(.sbss) *(.scommon)
-   *(.dynbss)
-   *(.bss)
-   *(COMMON)
-   . = ALIGN(4);
-  }
-  _end = . ;
-  PROVIDE (end = .);
-}
index 38c9d8919e0cac6c9667dc8e27eddb066e183677..5c935f47a25c3d00ebb126ba1a24366c5fae3b0f 100644 (file)
@@ -564,17 +564,6 @@ int pcmcia_init(void)
 
 #endif
 
-#ifdef CONFIG_POST
-/*
- * Returns 1 if keys pressed to start the power-on long-running tests
- * Called from board_init_f().
- */
-int post_hotkeys_pressed(void)
-{
-       return 0;       /* No hotkeys supported */
-}
-#endif
-
 #ifdef CONFIG_HW_WATCHDOG
 
 void hw_watchdog_reset(void)
index b70827e0cc29b9933fd01c738f0c563bdc34b61d..ce1e616679f49fa77f792c61b5a072d32e702ef4 100644 (file)
@@ -550,166 +550,6 @@ phys_size_t initdram (int board_type)
        return dram_size;
 }
 
-/*************************************************************************
- *  pci_pre_init
- *
- *  This routine is called just prior to registering the hose and gives
- *  the board the opportunity to check things. Returning a value of zero
- *  indicates that things are bad & PCI initialization should be aborted.
- *
- *     Different boards may wish to customize the pci controller structure
- *     (add regions, override default access routines, etc) or perform
- *     certain pre-initialization actions.
- *
- ************************************************************************/
-#if defined(CONFIG_PCI)
-int pci_pre_init(struct pci_controller *hose)
-{
-       unsigned long addr;
-
-       /*-------------------------------------------------------------------------+
-         | Set priority for all PLB3 devices to 0.
-         | Set PLB3 arbiter to fair mode.
-         +-------------------------------------------------------------------------*/
-       mfsdr(SD0_AMP1, addr);
-       mtsdr(SD0_AMP1, (addr & 0x000000FF) | 0x0000FF00);
-       addr = mfdcr(PLB3_ACR);
-       mtdcr(PLB3_ACR, addr | 0x80000000);
-
-       /*-------------------------------------------------------------------------+
-         | Set priority for all PLB4 devices to 0.
-         +-------------------------------------------------------------------------*/
-       mfsdr(SD0_AMP0, addr);
-       mtsdr(SD0_AMP0, (addr & 0x000000FF) | 0x0000FF00);
-       addr = mfdcr(PLB4_ACR) | 0xa0000000;    /* Was 0x8---- */
-       mtdcr(PLB4_ACR, addr);
-
-       /*-------------------------------------------------------------------------+
-         | Set Nebula PLB4 arbiter to fair mode.
-         +-------------------------------------------------------------------------*/
-       /* Segment0 */
-       addr = (mfdcr(PLB0_ACR) & ~PLB0_ACR_PPM_MASK) | PLB0_ACR_PPM_FAIR;
-       addr = (addr & ~PLB0_ACR_HBU_MASK) | PLB0_ACR_HBU_ENABLED;
-       addr = (addr & ~PLB0_ACR_RDP_MASK) | PLB0_ACR_RDP_4DEEP;
-       addr = (addr & ~PLB0_ACR_WRP_MASK) | PLB0_ACR_WRP_2DEEP;
-       mtdcr(PLB0_ACR, addr);
-
-       /* Segment1 */
-       addr = (mfdcr(PLB1_ACR) & ~PLB1_ACR_PPM_MASK) | PLB1_ACR_PPM_FAIR;
-       addr = (addr & ~PLB1_ACR_HBU_MASK) | PLB1_ACR_HBU_ENABLED;
-       addr = (addr & ~PLB1_ACR_RDP_MASK) | PLB1_ACR_RDP_4DEEP;
-       addr = (addr & ~PLB1_ACR_WRP_MASK) | PLB1_ACR_WRP_2DEEP;
-       mtdcr(PLB1_ACR, addr);
-
-       return 1;
-}
-#endif /* defined(CONFIG_PCI) */
-
-/*************************************************************************
- *  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)
-{
-       /*--------------------------------------------------------------------------+
-        * Set up Direct MMIO registers
-        *--------------------------------------------------------------------------*/
-       /*--------------------------------------------------------------------------+
-         | PowerPC440 EP PCI Master configuration.
-         | Map one 1Gig range of PLB/processor addresses to PCI memory space.
-         |   PLB address 0xA0000000-0xDFFFFFFF ==> PCI address 0xA0000000-0xDFFFFFFF
-         |   Use byte reversed out routines to handle endianess.
-         | Make this region non-prefetchable.
-         +--------------------------------------------------------------------------*/
-       out32r(PCIL0_PMM0MA, 0x00000000);       /* PMM0 Mask/Attribute - disabled b4 setting */
-       out32r(PCIL0_PMM0LA, CONFIG_SYS_PCI_MEMBASE);   /* PMM0 Local Address */
-       out32r(PCIL0_PMM0PCILA, CONFIG_SYS_PCI_MEMBASE);        /* PMM0 PCI Low Address */
-       out32r(PCIL0_PMM0PCIHA, 0x00000000);    /* PMM0 PCI High Address */
-       out32r(PCIL0_PMM0MA, 0xE0000001);       /* 512M + No prefetching, and enable region */
-
-       out32r(PCIL0_PMM1MA, 0x00000000);       /* PMM0 Mask/Attribute - disabled b4 setting */
-       out32r(PCIL0_PMM1LA, CONFIG_SYS_PCI_MEMBASE2);  /* PMM0 Local Address */
-       out32r(PCIL0_PMM1PCILA, CONFIG_SYS_PCI_MEMBASE2);       /* PMM0 PCI Low Address */
-       out32r(PCIL0_PMM1PCIHA, 0x00000000);    /* PMM0 PCI High Address */
-       out32r(PCIL0_PMM1MA, 0xE0000001);       /* 512M + No prefetching, and enable region */
-
-       out32r(PCIL0_PTM1MS, 0x00000001);       /* Memory Size/Attribute */
-       out32r(PCIL0_PTM1LA, 0);        /* Local Addr. Reg */
-       out32r(PCIL0_PTM2MS, 0);        /* Memory Size/Attribute */
-       out32r(PCIL0_PTM2LA, 0);        /* Local Addr. Reg */
-
-       /*--------------------------------------------------------------------------+
-        * Set up Configuration registers
-        *--------------------------------------------------------------------------*/
-
-       /* Program the board's subsystem id/vendor id */
-       pci_write_config_word(0, PCI_SUBSYSTEM_VENDOR_ID,
-                             CONFIG_SYS_PCI_SUBSYS_VENDORID);
-       pci_write_config_word(0, PCI_SUBSYSTEM_ID, CONFIG_SYS_PCI_SUBSYS_ID);
-
-       /* Configure command register as bus master */
-       pci_write_config_word(0, PCI_COMMAND, PCI_COMMAND_MASTER);
-
-       /* 240nS PCI clock */
-       pci_write_config_word(0, PCI_LATENCY_TIMER, 1);
-
-       /* No error reporting */
-       pci_write_config_word(0, PCI_ERREN, 0);
-
-       pci_write_config_dword(0, PCI_BRDGOPT2, 0x00000101);
-
-}
-#endif                         /* defined(CONFIG_PCI) && defined(CONFIG_SYS_PCI_TARGET_INIT) */
-
-/*************************************************************************
- *  pci_master_init
- *
- ************************************************************************/
-#if defined(CONFIG_PCI) && defined(CONFIG_SYS_PCI_MASTER_INIT)
-void pci_master_init(struct pci_controller *hose)
-{
-       unsigned short temp_short;
-
-       /*--------------------------------------------------------------------------+
-         | Write the PowerPC440 EP PCI Configuration regs.
-         |   Enable PowerPC440 EP to be a master on the PCI bus (PMM).
-         |   Enable PowerPC440 EP to act as a PCI memory target (PTM).
-         +--------------------------------------------------------------------------*/
-       pci_read_config_word(0, PCI_COMMAND, &temp_short);
-       pci_write_config_word(0, PCI_COMMAND,
-                             temp_short | PCI_COMMAND_MASTER |
-                             PCI_COMMAND_MEMORY);
-}
-#endif                         /* defined(CONFIG_PCI) && defined(CONFIG_SYS_PCI_MASTER_INIT) */
-
-/*************************************************************************
- *  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.
- *
- *
- ************************************************************************/
-#if defined(CONFIG_PCI)
-int is_pci_host(struct pci_controller *hose)
-{
-       /* PCS440EP is always configured as host. */
-       return (1);
-}
-#endif                         /* defined(CONFIG_PCI) */
-
 /*************************************************************************
  *  hw_watchdog_reset
  *
index 51335c4d9c82503f33d987e6787a395cb31f95ea..060e7eb2372cc15c34ba6186e7033d01b45c1065 100644 (file)
@@ -29,6 +29,7 @@
 #include <ppc4xx_enet.h>
 #include <miiphy.h>
 #include <asm/processor.h>
+#include <asm/4xx_pci.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -144,81 +145,23 @@ int checkboard (void)
        return (0);
 }
 
-/*************************************************************************
- *  pci_pre_init
- *
- *  This routine is called just prior to registering the hose and gives
- *  the board the opportunity to check things. Returning a value of zero
- *  indicates that things are bad & PCI initialization should be aborted.
- *
- *     Different boards may wish to customize the pci controller structure
- *     (add regions, override default access routines, etc) or perform
- *     certain pre-initialization actions.
- *
- ************************************************************************/
 #if defined(CONFIG_PCI)
-int pci_pre_init(struct pci_controller * hose )
+/*
+ * Override weak pci_pre_init()
+ */
+int pci_pre_init(struct pci_controller *hose)
 {
-       unsigned long strap;
-
-       /*--------------------------------------------------------------------------+
-        *      The ocotea board is always configured as the host & requires the
-        *      PCI arbiter to be enabled.
-        *--------------------------------------------------------------------------*/
-       mfsdr(SDR0_SDSTP1, strap);
-       if( (strap & SDR0_SDSTP1_PAE_MASK) == 0 ){
-               printf("PCI: SDR0_STRP1[%08lX] - PCI Arbiter disabled.\n",strap);
+       if (__pci_pre_init(hose) == 0)
                return 0;
-       }
 
        /* FPGA Init */
-       alpr_fpga_init ();
+       alpr_fpga_init();
 
        return 1;
 }
-#endif /* defined(CONFIG_PCI) */
 
 /*************************************************************************
- *  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
-        *--------------------------------------------------------------------------*/
-       out32r( PCIL0_PIM0SA, 0 ); /* disable */
-       out32r( PCIL0_PIM1SA, 0 ); /* disable */
-       out32r( PCIL0_PIM2SA, 0 ); /* disable */
-       out32r( PCIL0_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.
-        *--------------------------------------------------------------------------*/
-       out32r( PCIL0_PIM0LAL, CONFIG_SYS_SDRAM_BASE );
-       out32r( PCIL0_PIM0LAH, 0 );
-       out32r( PCIL0_PIM0SA, ~(gd->ram_size - 1) | 1 );
-
-       out32r( PCIL0_BAR0, 0 );
-
-       /*--------------------------------------------------------------------------+
-        * Program the board's subsystem id/vendor id
-        *--------------------------------------------------------------------------*/
-       out16r( PCIL0_SBSYSVID, CONFIG_SYS_PCI_SUBSYS_VENDORID );
-       out16r( PCIL0_SBSYSID, CONFIG_SYS_PCI_SUBSYS_DEVICEID );
-
-       out16r( PCIL0_CMD, in16r(PCIL0_CMD) | PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER);
-}
-#endif /* defined(CONFIG_PCI) && defined(CONFIG_SYS_PCI_TARGET_INIT) */
-
-/*************************************************************************
- *  is_pci_host
+ * Override weak is_pci_host()
  *
  *     This routine is called to determine if a pci scan should be
  *     performed. With various hardware environments (especially cPCI and
@@ -232,8 +175,6 @@ void pci_target_init(struct pci_controller * hose )
  *
  *
  ************************************************************************/
-#if defined(CONFIG_PCI)
-
 static void wait_for_pci_ready(void)
 {
        /*
@@ -287,15 +228,3 @@ void pci_master_init(struct pci_controller *hose)
        out32r(PCIL0_POM1SA, ~(0x10000000 - 1) | 1);    /* 256MB + enable region */
 }
 #endif                         /* defined(CONFIG_PCI) && defined(CONFIG_SYS_PCI_MASTER_INIT) */
-
-#ifdef CONFIG_POST
-/*
- * Returns 1 if keys pressed to start the power-on long-running tests
- * Called from board_init_f().
- */
-int post_hotkeys_pressed(void)
-{
-
-       return (ctrlc());
-}
-#endif
diff --git a/board/prodrive/alpr/u-boot.lds b/board/prodrive/alpr/u-boot.lds
deleted file mode 100644 (file)
index 6633f91..0000000
+++ /dev/null
@@ -1,141 +0,0 @@
-/*
- * (C) Copyright 2004
- * 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/prodrive/alpr/init.o (.text)
-
-    *(.text)
-    *(.got1)
-  }
-  _etext = .;
-  PROVIDE (etext = .);
-  .rodata    :
-  {
-    *(.eh_frame)
-    *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
-  }
-  .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 = .);
-}
index 9a078527609ea71caf505a1726902dc7c479c70e..020f66dd8eab0ddd44635f856f2f973db66169d7 100644 (file)
@@ -165,77 +165,7 @@ int misc_init_r (void)
 }
 
 /*************************************************************************
- *  pci_pre_init
- *
- *  This routine is called just prior to registering the hose and gives
- *  the board the opportunity to check things. Returning a value of zero
- *  indicates that things are bad & PCI initialization should be aborted.
- *
- *     Different boards may wish to customize the pci controller structure
- *     (add regions, override default access routines, etc) or perform
- *     certain pre-initialization actions.
- *
- ************************************************************************/
-#if defined(CONFIG_PCI)
-int pci_pre_init(struct pci_controller *hose)
-{
-       unsigned long strap;
-
-       /*--------------------------------------------------------------------------+
-        *      The P3P440 board is always configured as the host & requires the
-        *      PCI arbiter to be disabled because it's an PMC module.
-        *--------------------------------------------------------------------------*/
-       strap = mfdcr(CPC0_STRP1);
-       if (strap & 0x00100000) {
-               printf("PCI: CPC0_STRP1[PAE] set.\n");
-               return 0;
-       }
-
-       return 1;
-}
-#endif /* defined(CONFIG_PCI) */
-
-/*************************************************************************
- *  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
-        *--------------------------------------------------------------------------*/
-       out32r(PCIL0_PIM0SA, 0);        /* disable */
-       out32r(PCIL0_PIM1SA, 0);        /* disable */
-       out32r(PCIL0_PIM2SA, 0);        /* disable */
-       out32r(PCIL0_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.
-        *--------------------------------------------------------------------------*/
-       out32r(PCIL0_PIM0LAL, CONFIG_SYS_SDRAM_BASE);
-       out32r(PCIL0_PIM0LAH, 0);
-       out32r(PCIL0_PIM0SA, ~(gd->ram_size - 1) | 1);
-
-       out32r(PCIL0_BAR0, 0);
-
-       /*--------------------------------------------------------------------------+
-        * Program the board's subsystem id/vendor id
-        *--------------------------------------------------------------------------*/
-       out16r(PCIL0_SBSYSVID, CONFIG_SYS_PCI_SUBSYS_VENDORID);
-       out16r(PCIL0_SBSYSID, CONFIG_SYS_PCI_SUBSYS_DEVICEID);
-
-       out16r(PCIL0_CMD, in16r(PCIL0_CMD) | PCI_COMMAND_MEMORY);
-}
-#endif                         /* defined(CONFIG_PCI) && defined(CONFIG_SYS_PCI_TARGET_INIT) */
-
-/*************************************************************************
- *  is_pci_host
+ * Override weak is_pci_host()
  *
  *     This routine is called to determine if a pci scan should be
  *     performed. With various hardware environments (especially cPCI and
diff --git a/board/prodrive/p3p440/u-boot.lds b/board/prodrive/p3p440/u-boot.lds
deleted file mode 100644 (file)
index b1c2dff..0000000
+++ /dev/null
@@ -1,141 +0,0 @@
-/*
- * (C) Copyright 2002
- * 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/prodrive/p3p440/init.o       (.text)
-
-    *(.text)
-    *(.got1)
-  }
-  _etext = .;
-  PROVIDE (etext = .);
-  .rodata    :
-  {
-    *(.eh_frame)
-    *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
-  }
-  .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 = .);
-}
diff --git a/board/quad100hd/u-boot.lds b/board/quad100hd/u-boot.lds
deleted file mode 100644 (file)
index 4f359b7..0000000
+++ /dev/null
@@ -1,131 +0,0 @@
-/*
- * (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(powerpc)
-SEARCH_DIR(/lib); SEARCH_DIR(/usr/lib); SEARCH_DIR(/usr/local/lib); SEARCH_DIR(/usr/local/powerpc-any-elf/lib);
-/* Do we need any of these for elf?
-   __DYNAMIC = 0;    */
-SECTIONS
-{
-  .resetvec 0xFFFFFFFC :
-  {
-    *(.resetvec)
-  } = 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      :
-  {
-    cpu/ppc4xx/start.o (.text)
-
-    *(.text)
-    *(.got1)
-  }
-  _etext = .;
-  PROVIDE (etext = .);
-  .rodata    :
-  {
-    *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
-  }
-  .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 = .);
-}
index 2513937ed126ee83ab590dce5a4df73372781f62..49d8bba15de0d10f9d874306d4bdc8e60b4cf413 100644 (file)
@@ -869,15 +869,3 @@ void spi_cs_deactivate(struct spi_slave *slave)
 #endif
 
 #endif /* CONFIG_MISC_INIT_R */
-
-#ifdef CONFIG_POST
-/*
- * Returns 1 if keys pressed to start the power-on long-running tests
- * Called from board_init_f().
- */
-int post_hotkeys_pressed(void)
-{
-       return 0;       /* No hotkeys supported */
-}
-
-#endif
index 42bf00868dae9f14ec260786a2d7293faf118c4a..1294d3f1b1c664d2c2cac1866367ce9db598b0b0 100644 (file)
@@ -27,7 +27,7 @@
 
 #include <common.h>
 #include <netdev.h>
-#include <s3c2400.h>
+#include <asm/arch/s3c24x0_cpu.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
index fde7730930ef2658ed12453d343689bb8158fca6..5d1a8bb0cf6bfd1b829f0b53582fb61488fd1734 100644 (file)
@@ -27,7 +27,7 @@
 
 #include <common.h>
 #include <netdev.h>
-#include <s3c2410.h>
+#include <asm/arch/s3c24x0_cpu.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
index 47f72f6132efc0d835329beb8bc0524bd4bd098a..30d88780d08a9338f181bbfff5ae3e2752538bf6 100644 (file)
@@ -34,7 +34,7 @@
 #include <config.h>
 #include <version.h>
 
-#include <s3c6400.h>
+#include <asm/arch/s3c6400.h>
 
 #ifdef CONFIG_SERIAL1
 #define ELFIN_UART_CONSOLE_BASE (ELFIN_UART_BASE + ELFIN_UART0_OFFSET)
index 561c0c83115871950129af11bdbc568c8c52a166..78aaa9e13a3a88847bb6b82092a2f79931b1eb92 100644 (file)
@@ -30,7 +30,7 @@
 
 #include <common.h>
 #include <netdev.h>
-#include <s3c6400.h>
+#include <asm/arch/s3c6400.h>
 
 /* ------------------------------------------------------------------------- */
 #define CS8900_Tacs    0x0     /* 0clk         address set-up          */
index a484874ea3561891f56ca871d7197222d6574d60..6b910743d52fc5f8a8c3822a9d0e09e8fce266eb 100644 (file)
@@ -300,91 +300,6 @@ long int fixed_sdram (void)
 }
 #endif /* !defined(CONFIG_SPD_EEPROM) */
 
-
-/*************************************************************************
- *  pci_pre_init
- *
- *  This routine is called just prior to registering the hose and gives
- *  the board the opportunity to check things. Returning a value of zero
- *  indicates that things are bad & PCI initialization should be aborted.
- *
- *     Different boards may wish to customize the pci controller structure
- *     (add regions, override default access routines, etc) or perform
- *     certain pre-initialization actions.
- *
- ************************************************************************/
-#if defined(CONFIG_PCI)
-int pci_pre_init(struct pci_controller * hose )
-{
-       unsigned long strap;
-
-       /*--------------------------------------------------------------------------+
-        *      The metrobox is always configured as the host & requires the
-        *      PCI arbiter to be enabled.
-        *--------------------------------------------------------------------------*/
-       mfsdr(SDR0_SDSTP1, strap);
-       if( (strap & SDR0_SDSTP1_PAE_MASK) == 0 ){
-               printf("PCI: SDR0_STRP1[%08lX] - PCI Arbiter disabled.\n",strap);
-               return 0;
-       }
-
-       return 1;
-}
-#endif /* defined(CONFIG_PCI) */
-
-/*************************************************************************
- *  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
-        *--------------------------------------------------------------------------*/
-       out32r( PCIL0_PIM0SA, 0 ); /* disable */
-       out32r( PCIL0_PIM1SA, 0 ); /* disable */
-       out32r( PCIL0_PIM2SA, 0 ); /* disable */
-       out32r( PCIL0_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.
-        *--------------------------------------------------------------------------*/
-       out32r( PCIL0_PIM0LAL, CONFIG_SYS_SDRAM_BASE );
-       out32r( PCIL0_PIM0LAH, 0 );
-       out32r( PCIL0_PIM0SA, ~(gd->ram_size - 1) | 1 );
-
-       out32r( PCIL0_BAR0, 0 );
-
-       /*--------------------------------------------------------------------------+
-        * Program the board's subsystem id/vendor id
-        *--------------------------------------------------------------------------*/
-       out16r( PCIL0_SBSYSVID, CONFIG_SYS_PCI_SUBSYS_VENDORID );
-       out16r( PCIL0_SBSYSID, CONFIG_SYS_PCI_SUBSYS_DEVICEID );
-
-       out16r( PCIL0_CMD, in16r(PCIL0_CMD) | PCI_COMMAND_MEMORY );
-}
-#endif /* defined(CONFIG_PCI) && defined(CONFIG_SYS_PCI_TARGET_INIT) */
-
-
-/*************************************************************************
- *  is_pci_host
- *
- *
- ************************************************************************/
-#if defined(CONFIG_PCI)
-int is_pci_host(struct pci_controller *hose)
-{
-    /* The metrobox is always configured as host. */
-    return(1);
-}
-#endif /* defined(CONFIG_PCI) */
-
 /*************************************************************************
  *  board_get_enetaddr
  *
diff --git a/board/sandburst/karef/u-boot.lds b/board/sandburst/karef/u-boot.lds
deleted file mode 100644 (file)
index f22ece2..0000000
+++ /dev/null
@@ -1,156 +0,0 @@
-/*
- * (C) Copyright 2005
- * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
- * Travis B. Sawyer, Sandburst Corporation, tsawyer@sandburst.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
- */
-
-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/sandburst/karef/init.o       (.text)
-    cpu/ppc4xx/kgdb.o  (.text)
-    cpu/ppc4xx/traps.o (.text)
-    cpu/ppc4xx/interrupts.o    (.text)
-    cpu/ppc4xx/4xx_uart.o      (.text)
-    cpu/ppc4xx/cpu_init.o      (.text)
-    cpu/ppc4xx/speed.o (.text)
-    drivers/net/4xx_enet.o     (.text)
-    common/dlmalloc.o  (.text)
-    lib_generic/crc32.o                (.text)
-    lib_ppc/extable.o  (.text)
-    lib_generic/zlib.o         (.text)
-
-/*    . = env_offset;*/
-/*    common/env_embedded.o(.text)*/
-
-    *(.text)
-    *(.got1)
-  }
-  _etext = .;
-  PROVIDE (etext = .);
-  .rodata    :
-  {
-    *(.eh_frame)
-    *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
-  }
-  .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 = .);
-}
diff --git a/board/sandburst/metrobox/u-boot.lds b/board/sandburst/metrobox/u-boot.lds
deleted file mode 100644 (file)
index c5851f2..0000000
+++ /dev/null
@@ -1,156 +0,0 @@
-/*
- * (C) Copyright 2005
- * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
- * Travis B. Sawyer, Sandburst Corporation, tsawyer@sandburst.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
- */
-
-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/sandburst/metrobox/init.o    (.text)
-    cpu/ppc4xx/kgdb.o  (.text)
-    cpu/ppc4xx/traps.o (.text)
-    cpu/ppc4xx/interrupts.o    (.text)
-    cpu/ppc4xx/4xx_uart.o      (.text)
-    cpu/ppc4xx/cpu_init.o      (.text)
-    cpu/ppc4xx/speed.o (.text)
-    drivers/net/4xx_enet.o     (.text)
-    common/dlmalloc.o  (.text)
-    lib_generic/crc32.o                (.text)
-    lib_ppc/extable.o  (.text)
-    lib_generic/zlib.o         (.text)
-
-/*    . = env_offset;*/
-/*    common/env_embedded.o(.text)*/
-
-    *(.text)
-    *(.got1)
-  }
-  _etext = .;
-  PROVIDE (etext = .);
-  .rodata    :
-  {
-    *(.eh_frame)
-    *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
-  }
-  .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 = .);
-}
index 7452c1f945bf7a73e13575e8f045297d2141aa4f..3a936778ec4e65f56d500552848ab7e1f8a34cc3 100644 (file)
@@ -30,7 +30,7 @@
 
 #include <common.h>
 #include <netdev.h>
-#include <s3c2410.h>
+#include <asm/arch/s3c24x0_cpu.h>
 
 #if defined(CONFIG_CMD_NAND)
 #include <linux/mtd/nand.h>
diff --git a/board/sbc405/u-boot.lds b/board/sbc405/u-boot.lds
deleted file mode 100644 (file)
index 89edd67..0000000
+++ /dev/null
@@ -1,147 +0,0 @@
-/*
- * (C) Copyright 2000, 2001
- * 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
-
-  /* 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)
-    cpu/ppc4xx/traps.o (.text)
-    cpu/ppc4xx/interrupts.o    (.text)
-    cpu/ppc4xx/4xx_uart.o      (.text)
-    cpu/ppc4xx/cpu_init.o      (.text)
-    cpu/ppc4xx/speed.o (.text)
-    drivers/net/4xx_enet.o     (.text)
-    common/dlmalloc.o  (.text)
-    lib_generic/crc32.o                (.text)
-    lib_ppc/extable.o  (.text)
-    lib_generic/zlib.o         (.text)
-
-/*    . = env_offset;*/
-/*    common/env_embedded.o(.text)*/
-
-    *(.text)
-    *(.got1)
-  }
-  _etext = .;
-  PROVIDE (etext = .);
-  .rodata    :
-  {
-    *(.eh_frame)
-    *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
-  }
-  .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 = .);
-}
index 51d66d517e9608b0208a8714aefea710c5a2cba8..9183c15f2a4ec86a46a9d51f041b8a19b0a39a8f 100644 (file)
@@ -268,17 +268,6 @@ ft_board_setup(void *blob, bd_t *bd)
 }
 #endif /* defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP) */
 
-#define CONFIG_SYS_LIME_SRST           ((CONFIG_SYS_LIME_BASE) + 0x01FC002C)
-#define CONFIG_SYS_LIME_CCF            ((CONFIG_SYS_LIME_BASE) + 0x01FC0038)
-#define CONFIG_SYS_LIME_MMR            ((CONFIG_SYS_LIME_BASE) + 0x01FCFFFC)
-/* Lime clock frequency */
-#define CONFIG_SYS_LIME_CLK_100MHZ     0x00000
-#define CONFIG_SYS_LIME_CLK_133MHZ     0x10000
-/* SDRAM parameter */
-#define CONFIG_SYS_LIME_MMR_VALUE      0x4157BA63
-
-#define DISPLAY_WIDTH          800
-#define DISPLAY_HEIGHT         480
 #define DEFAULT_BRIGHTNESS     25
 #define BACKLIGHT_ENABLE       (1 << 31)
 
@@ -308,14 +297,12 @@ const gdc_regs *board_get_regs (void)
        return init_regs;
 }
 
-#define CONFIG_SYS_LIME_CID            ((CONFIG_SYS_LIME_BASE) + 0x01FC00F0)
-#define CONFIG_SYS_LIME_REV            ((CONFIG_SYS_LIME_BASE) + 0x01FF8084)
 int lime_probe(void)
 {
        volatile ccsr_lbc_t *memctl = (void *)(CONFIG_SYS_MPC85xx_LBC_ADDR);
        uint cfg_br2;
        uint cfg_or2;
-       uint reg;
+       int type;
 
        cfg_br2 = memctl->br2;
        cfg_or2 = memctl->or2;
@@ -325,21 +312,15 @@ int lime_probe(void)
        memctl->or2 = 0xfc000410;
        memctl->br2 = (CONFIG_SYS_LIME_BASE) | 0x00001901;
 
-       /* Try to access GDC ID/Revision registers */
-       reg = in_be32((void *)CONFIG_SYS_LIME_CID);
-       reg = in_be32((void *)CONFIG_SYS_LIME_CID);
-       if (reg == 0x303) {
-               reg = in_be32((void *)CONFIG_SYS_LIME_REV);
-               reg = in_be32((void *)CONFIG_SYS_LIME_REV);
-               reg = ((reg & ~0xff) == 0x20050100) ? 1 : 0;
-       } else
-               reg = 0;
+       /* Get controller type */
+       type = mb862xx_probe(CONFIG_SYS_LIME_BASE);
 
        /* Restore previous CS2 configuration */
        memctl->br2 = 0;
        memctl->or2 = cfg_or2;
        memctl->br2 = cfg_br2;
-       return reg;
+
+       return (type == MB862XX_TYPE_LIME) ? 1 : 0;
 }
 
 /* Returns Lime base address */
@@ -348,21 +329,8 @@ unsigned int board_video_init (void)
        if (!lime_probe())
                return 0;
 
-       /*
-        * Reset Lime controller
-        */
-       out_be32((void *)CONFIG_SYS_LIME_SRST, 0x1);
-       udelay(200);
-
-       /* Set Lime clock to 133MHz */
-       out_be32((void *)CONFIG_SYS_LIME_CCF, CONFIG_SYS_LIME_CLK_133MHZ);
-       /* Delay required */
-       udelay(300);
-       /* Set memory parameters */
-       out_be32((void *)CONFIG_SYS_LIME_MMR, CONFIG_SYS_LIME_MMR_VALUE);
-
-       mb862xx.winSizeX = DISPLAY_WIDTH;
-       mb862xx.winSizeY = DISPLAY_HEIGHT;
+       mb862xx.winSizeX = 800;
+       mb862xx.winSizeY = 480;
        mb862xx.gdfIndex = GDF_15BIT_555RGB;
        mb862xx.gdfBytesPP = 2;
 
index 72810d036aea9a73e89c9b4e07f5d2a2efcd5677..802bfba1ab685b8078198aa43cff285e830af4c8 100644 (file)
@@ -91,17 +91,6 @@ void spi_cs_deactivate(struct spi_slave *slave)
 
 #endif
 
-#if    defined(CONFIG_POST)
-/*
- * Returns 1 if keys pressed to start the power-on long-running tests
- * Called from board_init_f().
- */
-int post_hotkeys_pressed(void)
-{
-       return 0;       /* No hotkeys supported */
-}
-#endif /* CONFIG_POST */
-
 #ifdef CONFIG_CMD_NET
 int board_eth_init(bd_t *bis)
 {
index 04a36075b85247dcd7125a5e1aba2104b8d24cad..472d7d81e90d935fabeb3d817c356a1ee1365340 100644 (file)
@@ -25,7 +25,7 @@
 
 #include <common.h>
 #include <command.h>
-#include <s3c2400.h>
+#include <asm/arch/s3c24x0_cpu.h>
 #include <rtc.h>
 
 /*
index 7d5c0a2c9ccb85c8fc43234dee8704b32ca1dbf4..ad0c13665e41073c0a3f0a088e2304157b0f79fd 100644 (file)
@@ -22,7 +22,7 @@
  */
 
 #include <common.h>
-#include <s3c2400.h>
+#include <asm/arch/s3c24x0_cpu.h>
 #include "rs485.h"
 
 static void rs485_setbrg (void);
index 9f0a5b9b46a31327d72ccfe491af922022202003..16d69bbd5ca4bf62e4092a693dff5d45847706dd 100644 (file)
@@ -24,7 +24,7 @@
 #ifndef _RS485_H_
 #define _RS485_H_
 
-#include <s3c2400.h>
+#include <asm/arch/s3c24x0_cpu.h>
 
 int rs485_init (void);
 int rs485_getc (void);
index ea782a9137e21d248290001be705e830a5d2a42a..71fd22c158ccfb51586998a5643f7267c05fb68a 100644 (file)
@@ -26,7 +26,7 @@
 #include <common.h>
 #include <netdev.h>
 #include <malloc.h>
-#include <s3c2400.h>
+#include <asm/arch/s3c24x0_cpu.h>
 #include <command.h>
 
 DECLARE_GLOBAL_DATA_PTR;
index dc2a8d77503d67366baad36806bfb561c86f7617..2df9a0440708ab45fb5c80f014b25d22b6f4a4ae 100644 (file)
@@ -26,7 +26,7 @@
 #include <common.h>
 #include <exports.h>
 #include <timestamp.h>
-#include <s3c2400.h>
+#include <asm/arch/s3c24x0_cpu.h>
 #include "tsc2000.h"
 #include "rs485.h"
 
index fc501a8a4b1e5cbcbfb51b312ca7fb69948b2823..5890624f0f02c272fd049bd6258cd8e72fa6ef0d 100644 (file)
@@ -26,7 +26,7 @@
  */
 
 #include <common.h>
-#include <s3c2400.h>
+#include <asm/arch/s3c24x0_cpu.h>
 #include <asm/io.h>
 #include <div64.h>
 #include "tsc2000.h"
index d5ad5bbdf5d3bc09ed5a379e44c735a5b5515c39..b7eb8cce03ceeb71d64cdb20386d7586ced510d3 100644 (file)
@@ -37,7 +37,7 @@
 #include <stdarg.h>
 #include <linux/types.h>
 #include <stdio_dev.h>
-#include <s3c2400.h>
+#include <asm/arch/s3c24x0_cpu.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
index 38c7be6bad6d1b56a605c22ef50c1057531ea296..4dba2900dbcaaa31ee78e43dbac17a9d1208925d 100644 (file)
@@ -268,15 +268,3 @@ int misc_init_r (void)
 
        return 0;
 }
-
-
-#ifdef CONFIG_POST
-/*
- * Returns 1 if keys pressed to start the power-on long-running tests
- * Called from board_init_f().
- */
-int post_hotkeys_pressed (void)
-{
-       return 0;               /* No hotkeys supported */
-}
-#endif
diff --git a/board/w7o/u-boot.lds b/board/w7o/u-boot.lds
deleted file mode 100644 (file)
index d953fd4..0000000
+++ /dev/null
@@ -1,132 +0,0 @@
-/*
- * (C) Copyright 2001
- * 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
-
-  /* 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      :
-  {
-    cpu/ppc4xx/start.o (.text)
-    board/w7o/init.o   (.text)
-    *(.text)
-    *(.got1)
-  }
-  _etext = .;
-  PROVIDE (etext = .);
-  .rodata    :
-  {
-    *(.eh_frame)
-    *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
-  }
-  .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 = .);
-}
diff --git a/board/xes/xpedite1000/u-boot.lds b/board/xes/xpedite1000/u-boot.lds
deleted file mode 100644 (file)
index 73f65d6..0000000
+++ /dev/null
@@ -1,151 +0,0 @@
-/*
- * (C) Copyright 2002-2004
- * 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/xes/xpedite1000/init.o       (.text)
-    cpu/ppc4xx/kgdb.o  (.text)
-    cpu/ppc4xx/traps.o (.text)
-    cpu/ppc4xx/interrupts.o    (.text)
-    cpu/ppc4xx/4xx_uart.o      (.text)
-    cpu/ppc4xx/cpu_init.o      (.text)
-    cpu/ppc4xx/speed.o (.text)
-    common/dlmalloc.o  (.text)
-    lib_generic/crc32.o                (.text)
-    lib_ppc/extable.o  (.text)
-    lib_generic/zlib.o         (.text)
-
-    *(.text)
-    *(.got1)
-  }
-  _etext = .;
-  PROVIDE (etext = .);
-  .rodata    :
-  {
-    *(.eh_frame)
-    *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
-  }
-  .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 = .);
-}
index 04949bb2d464b95c3bc0caa351abbe7f2c066bda..b4cbb2fce13782e2d4497d00452477197e5aaa82 100644 (file)
@@ -136,6 +136,8 @@ phys_size_t initdram(int board_type)
 }
 
 /*
+ * Override weak pci_pre_init()
+ *
  * This routine is called just prior to registering the hose and gives
  * the board the opportunity to check things. Returning a value of zero
  * indicates that things are bad & PCI initialization should be aborted.
@@ -144,7 +146,6 @@ phys_size_t initdram(int board_type)
  * (add regions, override default access routines, etc) or perform
  * certain pre-initialization actions.
  */
-
 #if defined(CONFIG_PCI)
 int pci_pre_init(struct pci_controller * hose)
 {
@@ -166,40 +167,10 @@ int pci_pre_init(struct pci_controller * hose)
 }
 #endif /* defined(CONFIG_PCI) */
 
-#if defined(CONFIG_PCI) && defined(CONFIG_SYS_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.
- */
-void pci_target_init(struct pci_controller * hose)
-{
-       /* Disable everything */
-       out32r(PCIL0_PIM0SA, 0);
-       out32r(PCIL0_PIM1SA, 0);
-       out32r(PCIL0_PIM2SA, 0);
-       out32r(PCIL0_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.
-        */
-       out32r(PCIL0_PIM0LAL, CONFIG_SYS_SDRAM_BASE);
-       out32r(PCIL0_PIM0LAH, 0);
-       out32r(PCIL0_PIM0SA, ~(gd->ram_size - 1) | 1);
-
-       out32r(PCIL0_BAR0, 0);
-
-       /* Program the board's subsystem id/vendor id */
-       out16r(PCIL0_SBSYSVID, CONFIG_SYS_PCI_SUBSYS_VENDORID);
-       out16r(PCIL0_SBSYSID, CONFIG_SYS_PCI_SUBSYS_DEVICEID);
-
-       out16r(PCIL0_CMD, in16r(PCIL0_CMD) | PCI_COMMAND_MEMORY);
-}
-#endif /* defined(CONFIG_PCI) && defined(CONFIG_SYS_PCI_TARGET_INIT) */
-
 #if defined(CONFIG_PCI)
 /*
+ * Override weak 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
index 57ddb2fd7a55badf037a45883e3344958fca80c1..208a25ba11a48b084b3f2d5304102ebd2a06fb26 100644 (file)
@@ -27,3 +27,6 @@
 
 #TEXT_BASE = 0xFFFE0000
 TEXT_BASE = 0x04000000
+
+# Use board specific linker script
+LDSCRIPT := $(SRCTREE)/board/xilinx/ml300/u-boot.lds
diff --git a/board/zeus/u-boot.lds b/board/zeus/u-boot.lds
deleted file mode 100644 (file)
index f3ccd33..0000000
+++ /dev/null
@@ -1,130 +0,0 @@
-/*
- * (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(powerpc)
-/* Do we need any of these for elf?
-   __DYNAMIC = 0;    */
-SECTIONS
-{
-  .resetvec 0xFFFFFFFC :
-  {
-    *(.resetvec)
-  } = 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      :
-  {
-    cpu/ppc4xx/start.o (.text)
-
-    *(.text)
-    *(.got1)
-  }
-  _etext = .;
-  PROVIDE (etext = .);
-  .rodata    :
-  {
-    *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
-  }
-  .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 = .);
-}
index 47f6a71e2e1f6ee5d7cb856e38281c4480e23796..778418086c41fe9d10cedbc8d81b02b0a7e930b1 100644 (file)
@@ -44,7 +44,9 @@ COBJS-y += xyzModem.o
 # core command
 COBJS-y += cmd_boot.o
 COBJS-y += cmd_bootm.o
+COBJS-y += cmd_help.o
 COBJS-y += cmd_nvedit.o
+COBJS-y += cmd_version.o
 
 # environment
 COBJS-y += env_common.o
@@ -83,9 +85,11 @@ COBJS-$(CONFIG_CMD_DIAG) += cmd_diag.o
 endif
 COBJS-$(CONFIG_CMD_DISPLAY) += cmd_display.o
 COBJS-$(CONFIG_CMD_DTT) += cmd_dtt.o
+COBJS-$(CONFIG_CMD_ECHO) += cmd_echo.o
 COBJS-$(CONFIG_ENV_IS_IN_EEPROM) += cmd_eeprom.o
 COBJS-$(CONFIG_CMD_EEPROM) += cmd_eeprom.o
 COBJS-$(CONFIG_CMD_ELF) += cmd_elf.o
+COBJS-$(CONFIG_SYS_HUSH_PARSER) += cmd_exit.o
 COBJS-$(CONFIG_CMD_EXT2) += cmd_ext2.o
 COBJS-$(CONFIG_CMD_FAT) += cmd_fat.o
 COBJS-$(CONFIG_CMD_FDC)$(CONFIG_CMD_FDOS) += cmd_fdc.o
@@ -115,7 +119,7 @@ COBJS-$(CONFIG_CMD_MISC) += cmd_misc.o
 COBJS-$(CONFIG_CMD_MMC) += cmd_mmc.o
 COBJS-$(CONFIG_MP) += cmd_mp.o
 COBJS-$(CONFIG_CMD_MTDPARTS) += cmd_mtdparts.o
-COBJS-y += cmd_nand.o
+COBJS-$(CONFIG_CMD_NAND) += cmd_nand.o
 COBJS-$(CONFIG_CMD_NET) += cmd_net.o
 COBJS-$(CONFIG_CMD_ONENAND) += cmd_onenand.o
 COBJS-$(CONFIG_CMD_OTP) += cmd_otp.o
@@ -134,6 +138,7 @@ COBJS-$(CONFIG_CMD_SPI) += cmd_spi.o
 COBJS-$(CONFIG_CMD_SPIBOOTLDR) += cmd_spibootldr.o
 COBJS-$(CONFIG_CMD_STRINGS) += cmd_strings.o
 COBJS-$(CONFIG_CMD_TERMINAL) += cmd_terminal.o
+COBJS-$(CONFIG_SYS_HUSH_PARSER) += cmd_test.o
 COBJS-$(CONFIG_CMD_TSI148) += cmd_tsi148.o
 COBJS-$(CONFIG_CMD_UBI) += cmd_ubi.o
 COBJS-$(CONFIG_CMD_UBIFS) += cmd_ubifs.o
index e16552ec3a3f1b2d1fc0e761b9187362f7e097ec..efd6aec0cf19f60b36e32f15c5345db6be03865e 100644 (file)
 #include <lzma/LzmaTools.h>
 #endif /* CONFIG_LZMA */
 
+#ifdef CONFIG_LZO
+#include <linux/lzo.h>
+#endif /* CONFIG_LZO */
+
 DECLARE_GLOBAL_DATA_PTR;
 
 extern int gunzip (void *dst, int dstlen, unsigned char *src, unsigned long *lenp);
@@ -405,6 +409,24 @@ static int bootm_load_os(image_info_t os, ulong *load_end, int boot_progress)
                *load_end = load + unc_len;
                break;
 #endif /* CONFIG_LZMA */
+#ifdef CONFIG_LZO
+       case IH_COMP_LZO:
+               printf ("   Uncompressing %s ... ", type_name);
+
+               int ret = lzop_decompress((const unsigned char *)image_start,
+                                         image_len, (unsigned char *)load,
+                                         &unc_len);
+               if (ret != LZO_E_OK) {
+                       printf ("LZO: uncompress or overwrite error %d "
+                             "- must RESET board to recover\n", ret);
+                       if (boot_progress)
+                               show_boot_progress (-6);
+                       return BOOTM_ERR_RESET;
+               }
+
+               *load_end = load + unc_len;
+               break;
+#endif /* CONFIG_LZO */
        default:
                printf ("Unimplemented compression type %d\n", comp);
                return BOOTM_ERR_UNIMPLEMENTED;
diff --git a/common/cmd_echo.c b/common/cmd_echo.c
new file mode 100644 (file)
index 0000000..3ec4d48
--- /dev/null
@@ -0,0 +1,58 @@
+/*
+ * Copyright 2000-2009
+ * 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 <common.h>
+#include <command.h>
+
+int do_echo(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+{
+       int i;
+       int putnl = 1;
+
+       for (i = 1; i < argc; i++) {
+               char *p = argv[i], c;
+
+               if (i > 1)
+                       putc(' ');
+               while ((c = *p++) != '\0') {
+                       if (c == '\\' && *p == 'c') {
+                               putnl = 0;
+                               p++;
+                       } else {
+                               putc(c);
+                       }
+               }
+       }
+
+       if (putnl)
+               putc('\n');
+
+       return 0;
+}
+
+U_BOOT_CMD(
+       echo,   CONFIG_SYS_MAXARGS,     1,      do_echo,
+       "echo args to console",
+       "[args..]\n"
+       "    - echo args to console; \\c suppresses newline"
+);
diff --git a/common/cmd_exit.c b/common/cmd_exit.c
new file mode 100644 (file)
index 0000000..ed876d8
--- /dev/null
@@ -0,0 +1,42 @@
+/*
+ * Copyright 2000-2009
+ * 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 <common.h>
+#include <command.h>
+
+int do_exit(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+{
+       int r;
+
+       r = 0;
+       if (argc > 1)
+               r = simple_strtoul(argv[1], NULL, 10);
+
+       return -r - 2;
+}
+
+U_BOOT_CMD(
+       exit,   2,      1,      do_exit,
+       "exit script",
+       ""
+);
diff --git a/common/cmd_help.c b/common/cmd_help.c
new file mode 100644 (file)
index 0000000..e860dfb
--- /dev/null
@@ -0,0 +1,50 @@
+/*
+ * Copyright 2000-2009
+ * 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 <common.h>
+#include <command.h>
+
+int do_help(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
+{
+       return _do_help(&__u_boot_cmd_start,
+                       &__u_boot_cmd_end - &__u_boot_cmd_start,
+                       cmdtp, flag, argc, argv);
+}
+
+U_BOOT_CMD(
+       help,   CONFIG_SYS_MAXARGS,     1,      do_help,
+       "print command description/usage",
+       "\n"
+       "       - print brief description of all commands\n"
+       "help command ...\n"
+       "       - print detailed usage of 'command'"
+);
+
+/* This does not use the U_BOOT_CMD macro as ? can't be used in symbol names */
+cmd_tbl_t __u_boot_cmd_question_mark Struct_Section = {
+       "?",    CONFIG_SYS_MAXARGS,     1,      do_help,
+       "alias for 'help'",
+#ifdef  CONFIG_SYS_LONGHELP
+       ""
+#endif /* CONFIG_SYS_LONGHELP */
+};
index 158a55fa705db7534708df308938215b564fa97a..075a8afb60a4c22494095d80be9e74c11dba732d 100644 (file)
@@ -9,18 +9,7 @@
  */
 
 #include <common.h>
-
-
-/*
- *
- * New NAND support
- *
- */
-#include <common.h>
 #include <linux/mtd/mtd.h>
-
-#if defined(CONFIG_CMD_NAND)
-
 #include <command.h>
 #include <watchdog.h>
 #include <malloc.h>
@@ -686,4 +675,3 @@ U_BOOT_CMD(nboot, 4, 1, do_nandboot,
        "boot from NAND device",
        "[partition] | [[[loadAddr] dev] offset]"
 );
-#endif
diff --git a/common/cmd_test.c b/common/cmd_test.c
new file mode 100644 (file)
index 0000000..d886f89
--- /dev/null
@@ -0,0 +1,173 @@
+/*
+ * Copyright 2000-2009
+ * 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 <common.h>
+#include <command.h>
+
+int do_test(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+{
+       char **ap;
+       int left, adv, expr, last_expr, neg, last_cmp;
+
+       /* args? */
+       if (argc < 3)
+               return 1;
+
+#if 0
+       {
+               printf("test:");
+               left = 1;
+               while (argv[left])
+                       printf(" %s", argv[left++]);
+       }
+#endif
+
+       last_expr = 0;
+       left = argc - 1; ap = argv + 1;
+       if (left > 0 && strcmp(ap[0], "!") == 0) {
+               neg = 1;
+               ap++;
+               left--;
+       } else
+               neg = 0;
+
+       expr = -1;
+       last_cmp = -1;
+       last_expr = -1;
+       while (left > 0) {
+
+               if (strcmp(ap[0], "-o") == 0 || strcmp(ap[0], "-a") == 0)
+                       adv = 1;
+               else if (strcmp(ap[0], "-z") == 0 || strcmp(ap[0], "-n") == 0)
+                       adv = 2;
+               else
+                       adv = 3;
+
+               if (left < adv) {
+                       expr = 1;
+                       break;
+               }
+
+               if (adv == 1) {
+                       if (strcmp(ap[0], "-o") == 0) {
+                               last_expr = expr;
+                               last_cmp = 0;
+                       } else if (strcmp(ap[0], "-a") == 0) {
+                               last_expr = expr;
+                               last_cmp = 1;
+                       } else {
+                               expr = 1;
+                               break;
+                       }
+               }
+
+               if (adv == 2) {
+                       if (strcmp(ap[0], "-z") == 0)
+                               expr = strlen(ap[1]) == 0 ? 1 : 0;
+                       else if (strcmp(ap[0], "-n") == 0)
+                               expr = strlen(ap[1]) == 0 ? 0 : 1;
+                       else {
+                               expr = 1;
+                               break;
+                       }
+
+                       if (last_cmp == 0)
+                               expr = last_expr || expr;
+                       else if (last_cmp == 1)
+                               expr = last_expr && expr;
+                       last_cmp = -1;
+               }
+
+               if (adv == 3) {
+                       if (strcmp(ap[1], "=") == 0)
+                               expr = strcmp(ap[0], ap[2]) == 0;
+                       else if (strcmp(ap[1], "!=") == 0)
+                               expr = strcmp(ap[0], ap[2]) != 0;
+                       else if (strcmp(ap[1], ">") == 0)
+                               expr = strcmp(ap[0], ap[2]) > 0;
+                       else if (strcmp(ap[1], "<") == 0)
+                               expr = strcmp(ap[0], ap[2]) < 0;
+                       else if (strcmp(ap[1], "-eq") == 0)
+                               expr = simple_strtol(ap[0], NULL, 10) == simple_strtol(ap[2], NULL, 10);
+                       else if (strcmp(ap[1], "-ne") == 0)
+                               expr = simple_strtol(ap[0], NULL, 10) != simple_strtol(ap[2], NULL, 10);
+                       else if (strcmp(ap[1], "-lt") == 0)
+                               expr = simple_strtol(ap[0], NULL, 10) < simple_strtol(ap[2], NULL, 10);
+                       else if (strcmp(ap[1], "-le") == 0)
+                               expr = simple_strtol(ap[0], NULL, 10) <= simple_strtol(ap[2], NULL, 10);
+                       else if (strcmp(ap[1], "-gt") == 0)
+                               expr = simple_strtol(ap[0], NULL, 10) > simple_strtol(ap[2], NULL, 10);
+                       else if (strcmp(ap[1], "-ge") == 0)
+                               expr = simple_strtol(ap[0], NULL, 10) >= simple_strtol(ap[2], NULL, 10);
+                       else {
+                               expr = 1;
+                               break;
+                       }
+
+                       if (last_cmp == 0)
+                               expr = last_expr || expr;
+                       else if (last_cmp == 1)
+                               expr = last_expr && expr;
+                       last_cmp = -1;
+               }
+
+               ap += adv; left -= adv;
+       }
+
+       if (neg)
+               expr = !expr;
+
+       expr = !expr;
+
+       debug (": returns %d\n", expr);
+
+       return expr;
+}
+
+U_BOOT_CMD(
+       test,   CONFIG_SYS_MAXARGS,     1,      do_test,
+       "minimal test like /bin/sh",
+       "[args..]"
+);
+
+int do_false(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+{
+       return 1;
+}
+
+U_BOOT_CMD(
+       false,  CONFIG_SYS_MAXARGS,     1,      do_false,
+       "do nothing, unsuccessfully",
+       NULL
+);
+
+int do_true(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+{
+       return 0;
+}
+
+U_BOOT_CMD(
+       true,   CONFIG_SYS_MAXARGS,     1,      do_true,
+       "do nothing, successfully",
+       NULL
+);
diff --git a/common/cmd_version.c b/common/cmd_version.c
new file mode 100644 (file)
index 0000000..7f165c7
--- /dev/null
@@ -0,0 +1,40 @@
+/*
+ * Copyright 2000-2009
+ * 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 <common.h>
+#include <command.h>
+
+extern char version_string[];
+
+int do_version(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+{
+       printf("\n%s\n", version_string);
+
+       return 0;
+}
+
+U_BOOT_CMD(
+       version,        1,              1,      do_version,
+       "print monitor version",
+       ""
+);
index b57f8dfc81f5d40e8686208d8b2613c7dc95fb25..0c66b7a1d9361e994fd0b7cff97c180d47f600ec 100644 (file)
 #include <common.h>
 #include <command.h>
 
-int
-do_version (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
-{
-       extern char version_string[];
-       printf ("\n%s\n", version_string);
-       return 0;
-}
-
-U_BOOT_CMD(
-       version,        1,              1,      do_version,
-       "print monitor version",
-       ""
-);
-
-#if defined(CONFIG_CMD_ECHO)
-
-int
-do_echo (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
-{
-       int i, putnl = 1;
-
-       for (i = 1; i < argc; i++) {
-               char *p = argv[i], c;
-
-               if (i > 1)
-                       putc(' ');
-               while ((c = *p++) != '\0') {
-                       if (c == '\\' && *p == 'c') {
-                               putnl = 0;
-                               p++;
-                       } else {
-                               putc(c);
-                       }
-               }
-       }
-
-       if (putnl)
-               putc('\n');
-       return 0;
-}
-
-U_BOOT_CMD(
-       echo,   CONFIG_SYS_MAXARGS,     1,      do_echo,
-       "echo args to console",
-       "[args..]\n"
-       "    - echo args to console; \\c suppresses newline"
-);
-
-#endif
-
-#ifdef CONFIG_SYS_HUSH_PARSER
-
-int
-do_test (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
-{
-       char **ap;
-       int left, adv, expr, last_expr, neg, last_cmp;
-
-       /* args? */
-       if (argc < 3)
-               return 1;
-
-#if 0
-       {
-               printf("test:");
-               left = 1;
-               while (argv[left])
-                       printf(" %s", argv[left++]);
-       }
-#endif
-
-       last_expr = 0;
-       left = argc - 1; ap = argv + 1;
-       if (left > 0 && strcmp(ap[0], "!") == 0) {
-               neg = 1;
-               ap++;
-               left--;
-       } else
-               neg = 0;
-
-       expr = -1;
-       last_cmp = -1;
-       last_expr = -1;
-       while (left > 0) {
-
-               if (strcmp(ap[0], "-o") == 0 || strcmp(ap[0], "-a") == 0)
-                       adv = 1;
-               else if (strcmp(ap[0], "-z") == 0 || strcmp(ap[0], "-n") == 0)
-                       adv = 2;
-               else
-                       adv = 3;
-
-               if (left < adv) {
-                       expr = 1;
-                       break;
-               }
-
-               if (adv == 1) {
-                       if (strcmp(ap[0], "-o") == 0) {
-                               last_expr = expr;
-                               last_cmp = 0;
-                       } else if (strcmp(ap[0], "-a") == 0) {
-                               last_expr = expr;
-                               last_cmp = 1;
-                       } else {
-                               expr = 1;
-                               break;
-                       }
-               }
-
-               if (adv == 2) {
-                       if (strcmp(ap[0], "-z") == 0)
-                               expr = strlen(ap[1]) == 0 ? 1 : 0;
-                       else if (strcmp(ap[0], "-n") == 0)
-                               expr = strlen(ap[1]) == 0 ? 0 : 1;
-                       else {
-                               expr = 1;
-                               break;
-                       }
-
-                       if (last_cmp == 0)
-                               expr = last_expr || expr;
-                       else if (last_cmp == 1)
-                               expr = last_expr && expr;
-                       last_cmp = -1;
-               }
-
-               if (adv == 3) {
-                       if (strcmp(ap[1], "=") == 0)
-                               expr = strcmp(ap[0], ap[2]) == 0;
-                       else if (strcmp(ap[1], "!=") == 0)
-                               expr = strcmp(ap[0], ap[2]) != 0;
-                       else if (strcmp(ap[1], ">") == 0)
-                               expr = strcmp(ap[0], ap[2]) > 0;
-                       else if (strcmp(ap[1], "<") == 0)
-                               expr = strcmp(ap[0], ap[2]) < 0;
-                       else if (strcmp(ap[1], "-eq") == 0)
-                               expr = simple_strtol(ap[0], NULL, 10) == simple_strtol(ap[2], NULL, 10);
-                       else if (strcmp(ap[1], "-ne") == 0)
-                               expr = simple_strtol(ap[0], NULL, 10) != simple_strtol(ap[2], NULL, 10);
-                       else if (strcmp(ap[1], "-lt") == 0)
-                               expr = simple_strtol(ap[0], NULL, 10) < simple_strtol(ap[2], NULL, 10);
-                       else if (strcmp(ap[1], "-le") == 0)
-                               expr = simple_strtol(ap[0], NULL, 10) <= simple_strtol(ap[2], NULL, 10);
-                       else if (strcmp(ap[1], "-gt") == 0)
-                               expr = simple_strtol(ap[0], NULL, 10) > simple_strtol(ap[2], NULL, 10);
-                       else if (strcmp(ap[1], "-ge") == 0)
-                               expr = simple_strtol(ap[0], NULL, 10) >= simple_strtol(ap[2], NULL, 10);
-                       else {
-                               expr = 1;
-                               break;
-                       }
-
-                       if (last_cmp == 0)
-                               expr = last_expr || expr;
-                       else if (last_cmp == 1)
-                               expr = last_expr && expr;
-                       last_cmp = -1;
-               }
-
-               ap += adv; left -= adv;
-       }
-
-       if (neg)
-               expr = !expr;
-
-       expr = !expr;
-
-       debug (": returns %d\n", expr);
-
-       return expr;
-}
-
-U_BOOT_CMD(
-       test,   CONFIG_SYS_MAXARGS,     1,      do_test,
-       "minimal test like /bin/sh",
-       "[args..]"
-);
-
-int
-do_exit (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
-{
-       int r;
-
-       r = 0;
-       if (argc > 1)
-               r = simple_strtoul(argv[1], NULL, 10);
-
-       return -r - 2;
-}
-
-U_BOOT_CMD(
-       exit,   2,      1,      do_exit,
-       "exit script",
-       ""
-);
-
-
-#endif
-
 /*
  * Use puts() instead of printf() to avoid printf buffer overflow
  * for long help messages
@@ -297,39 +97,6 @@ int _do_help (cmd_tbl_t *cmd_start, int cmd_items, cmd_tbl_t * cmdtp, int
        return rcode;
 }
 
-int do_help (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
-{
-       return _do_help(&__u_boot_cmd_start,
-                       &__u_boot_cmd_end - &__u_boot_cmd_start,
-                       cmdtp, flag, argc, argv);
-}
-
-
-U_BOOT_CMD(
-       help,   CONFIG_SYS_MAXARGS,     1,      do_help,
-       "print online help",
-       "[command ...]\n"
-       "    - show help information (for 'command')\n"
-       "'help' prints online help for the monitor commands.\n\n"
-       "Without arguments, it prints a short usage message for all commands.\n\n"
-       "To get detailed help information for specific commands you can type\n"
-       "'help' with one or more command names as arguments."
-);
-
-/* This does not use the U_BOOT_CMD macro as ? can't be used in symbol names */
-#ifdef  CONFIG_SYS_LONGHELP
-cmd_tbl_t __u_boot_cmd_question_mark Struct_Section = {
-       "?",    CONFIG_SYS_MAXARGS,     1,      do_help,
-       "alias for 'help'",
-       ""
-};
-#else
-cmd_tbl_t __u_boot_cmd_question_mark Struct_Section = {
-       "?",    CONFIG_SYS_MAXARGS,     1,      do_help,
-       "alias for 'help'"
-};
-#endif /* CONFIG_SYS_LONGHELP */
-
 /***************************************************************************
  * find command table entry for a command
  */
index ca088a17d1596fc192be4cd3dc12b9b2ab2a411c..735b3443e63a556e0af9dbd63f3def0286f85a0a 100644 (file)
@@ -1522,11 +1522,6 @@ void *sbrk(ptrdiff_t increment)
        return (void *)old;
 }
 
-#ifndef CONFIG_X86
-/*
- * x86 boards use a slightly different init sequence thus they implement
- * their own version of mem_malloc_init()
- */
 void mem_malloc_init(ulong start, ulong size)
 {
        mem_malloc_start = start;
@@ -1535,7 +1530,6 @@ void mem_malloc_init(ulong start, ulong size)
 
        memset((void *)mem_malloc_start, 0, size);
 }
-#endif
 
 /* field-extraction macros */
 
index dcf09dee1bcf9d3162ef20974677e5ed98a72752..23d2caa621dfee67d88b03b159b9a29056c753ce 100644 (file)
@@ -60,11 +60,14 @@ uchar env_get_char_spec(int index)
 void env_relocate_spec(void)
 {
        struct mtd_info *mtd = &onenand_mtd;
+       struct onenand_chip *this = &onenand_chip;
        loff_t env_addr;
        int use_default = 0;
        size_t retlen;
 
        env_addr = CONFIG_ENV_ADDR;
+       if (FLEXONENAND(this))
+               env_addr = CONFIG_ENV_ADDR_FLEX;
 
        /* Check OneNAND exist */
        if (mtd->writesize)
@@ -91,6 +94,7 @@ void env_relocate_spec(void)
 int saveenv(void)
 {
        struct mtd_info *mtd = &onenand_mtd;
+       struct onenand_chip *this = &onenand_chip;
        loff_t env_addr = CONFIG_ENV_ADDR;
        struct erase_info instr = {
                .callback       = NULL,
@@ -98,6 +102,12 @@ int saveenv(void)
        size_t retlen;
 
        instr.len = CONFIG_ENV_SIZE;
+       if (FLEXONENAND(this)) {
+               env_addr = CONFIG_ENV_ADDR_FLEX;
+               instr.len = CONFIG_ENV_SIZE_FLEX;
+               instr.len <<= onenand_mtd.eraseregions[0].numblocks == 1 ?
+                               1 : 0;
+       }
        instr.addr = env_addr;
        instr.mtd = mtd;
        if (mtd->erase(mtd, &instr)) {
index b3b6e1f9c6abfa2c978159eaa89f9da14e9cafc0..60bba750f75990cc4f0b644ec49df6c42db55cc0 100644 (file)
@@ -12,38 +12,34 @@ unsigned long get_version(void)
        return XF_VERSION;
 }
 
-void jumptable_init (void)
-{
-       int i;
-
-       gd->jt = (void **) malloc (XF_MAX * sizeof (void *));
-       for (i = 0; i < XF_MAX; i++)
-               gd->jt[i] = (void *) dummy;
+/* Reuse _exports.h with a little trickery to avoid bitrot */
+#define EXPORT_FUNC(sym) gd->jt[XF_##sym] = (void *)sym;
 
-       gd->jt[XF_get_version] = (void *) get_version;
-       gd->jt[XF_malloc] = (void *) malloc;
-       gd->jt[XF_free] = (void *) free;
-       gd->jt[XF_getenv] = (void *) getenv;
-       gd->jt[XF_setenv] = (void *) setenv;
-       gd->jt[XF_get_timer] = (void *) get_timer;
-       gd->jt[XF_simple_strtoul] = (void *) simple_strtoul;
-       gd->jt[XF_udelay] = (void *) udelay;
-       gd->jt[XF_simple_strtol] = (void *) simple_strtol;
-       gd->jt[XF_strcmp] = (void *) strcmp;
-#if defined(CONFIG_I386) || defined(CONFIG_PPC)
-       gd->jt[XF_install_hdlr] = (void *) irq_install_handler;
-       gd->jt[XF_free_hdlr] = (void *) irq_free_handler;
-#endif /* I386 || PPC */
-#if defined(CONFIG_CMD_I2C)
-       gd->jt[XF_i2c_write] = (void *) i2c_write;
-       gd->jt[XF_i2c_read] = (void *) i2c_read;
+#if !defined(CONFIG_I386) && !defined(CONFIG_PPC)
+# define install_hdlr      dummy
+# define free_hdlr         dummy
+#else /* kludge for non-standard function naming */
+# define install_hdlr      irq_install_handler
+# define free_hdlr         irq_free_handler
+#endif
+#ifndef CONFIG_CMD_I2C
+# define i2c_write         dummy
+# define i2c_read          dummy
 #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;
+#ifndef CONFIG_CMD_SPI
+# define spi_init          dummy
+# define spi_setup_slave   dummy
+# define spi_free_slave    dummy
+# define spi_claim_bus     dummy
+# define spi_release_bus   dummy
+# define spi_xfer          dummy
 #endif
+#ifndef CONFIG_HAS_UID
+# define forceenv          dummy
+#endif
+
+void jumptable_init(void)
+{
+       gd->jt = malloc(XF_MAX * sizeof(void *));
+#include <_exports.h>
 }
index 6eaf41eb131feb2624421b590c99441bc3a542bf..5cc3ab49d888961b93c4f6b32adf6efefcc7be55 100644 (file)
@@ -148,6 +148,7 @@ static table_entry_t uimage_comp[] = {
        {       IH_COMP_BZIP2,  "bzip2",        "bzip2 compressed",     },
        {       IH_COMP_GZIP,   "gzip",         "gzip compressed",      },
        {       IH_COMP_LZMA,   "lzma",         "lzma compressed",      },
+       {       IH_COMP_LZO,    "lzo",          "lzo compressed",       },
        {       -1,             "",             "",                     },
 };
 
index 8cfd60c86ca0498665cc3bac36cb5a7ed72c41d2..cb1c4af977203cca95aa39aa58a1864648f023dc 100644 (file)
--- a/config.mk
+++ b/config.mk
@@ -46,13 +46,41 @@ PLATFORM_LDFLAGS =
 
 #########################################################################
 
+HOSTCFLAGS     = -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer \
+                 $(HOSTCPPFLAGS)
+HOSTSTRIP      = strip
+
+#
+# Mac OS X / Darwin's C preprocessor is Apple specific.  It
+# generates numerous errors and warnings.  We want to bypass it
+# and use GNU C's cpp.  To do this we pass the -traditional-cpp
+# option to the compiler.  Note that the -traditional-cpp flag
+# DOES NOT have the same semantics as GNU C's flag, all it does
+# is invoke the GNU preprocessor in stock ANSI/ISO C fashion.
+#
+# Apple's linker is similar, thanks to the new 2 stage linking
+# multiple symbol definitions are treated as errors, hence the
+# -multiply_defined suppress option to turn off this error.
+#
+
 ifeq ($(HOSTOS),darwin)
 HOSTCC         = cc
+HOSTCFLAGS     += -traditional-cpp
+HOSTLDFLAGS    += -multiply_defined suppress
 else
 HOSTCC         = gcc
 endif
-HOSTCFLAGS     = -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer
-HOSTSTRIP      = strip
+
+ifeq ($(HOSTOS),cygwin)
+HOSTCFLAGS     += -ansi
+endif
+
+# We build some files with extra pedantic flags to try to minimize things
+# that won't build on some weird host compiler -- though there are lots of
+# exceptions for files that aren't complaint.
+
+HOSTCFLAGS_NOPED = $(filter-out -pedantic,$(HOSTCFLAGS))
+HOSTCFLAGS     += -pedantic
 
 #########################################################################
 #
@@ -200,7 +228,7 @@ endif
 
 #########################################################################
 
-export HOSTCC HOSTCFLAGS CROSS_COMPILE \
+export HOSTCC HOSTCFLAGS HOSTLDFLAGS PEDCFLAGS HOSTSTRIP CROSS_COMPILE \
        AS LD CC CPP AR NM STRIP OBJCOPY OBJDUMP MAKE
 export TEXT_BASE PLATFORM_CPPFLAGS PLATFORM_RELFLAGS CPPFLAGS CFLAGS AFLAGS
 
index 29b484e4482fc6b025047a146f2c141d23af89a3..7972ba0dd7481f88a45fe0b0961a413d13fa62ee 100644 (file)
@@ -152,7 +152,7 @@ void set_timer (ulong t)
 }
 
 /* delay x useconds AND perserve advance timstamp value */
-void udelay (unsigned long usec)
+void __udelay (unsigned long usec)
 {
        unsigned long long tmp;
        ulong tmo;
index 8dd8d7b008d83f3223b68ca0d4b9e0ebc7a73ef1..67547490fdaaad0e5e7f4420471aed4af174af94 100644 (file)
@@ -74,7 +74,7 @@ void set_timer (ulong t)
 }
 
 /* delay x useconds AND perserve advance timstamp value */
-void udelay (unsigned long usec)
+void __udelay (unsigned long usec)
 {
        ulong tmo, tmp;
 
index d1a3327483f1af14ea8baec6beeb2587da7cb9b3..2c0014f2bd5a4856a3cefc3202774867547beca4 100644 (file)
@@ -33,7 +33,7 @@
 
 #include <common.h>
 #include <command.h>
-#include <s3c6400.h>
+#include <asm/arch/s3c6400.h>
 #include <asm/system.h>
 
 static void cache_flush (void);
index 32bb467f2f64c6b7e216b5bcc65b92b60acbd397..df88cba3421402ebd3063692e5c3d46f55eb9b9f 100644 (file)
@@ -24,7 +24,7 @@
  */
 
 #include <config.h>
-#include <s3c6400.h>
+#include <asm/arch/s3c6400.h>
 
        .globl mem_ctrl_asm_init
 mem_ctrl_asm_init:
index 315b13f8d34a073992fff62309bc10b1910fb212..eae572e4fdbbcb6aba357017d466880d63bf13b3 100644 (file)
@@ -21,7 +21,7 @@
  * MA 02111-1307 USA
  */
 
-#include <s3c6400.h>
+#include <asm/arch/s3c6400.h>
 
 .globl reset_cpu
 reset_cpu:
index 5c335a55a9e9b02780656cd927c0b56b78655bd3..11962acade552d42756344ed164e8f7ff5cf53bd 100644 (file)
@@ -31,7 +31,7 @@
  */
 
 #include <common.h>
-#include <s3c6400.h>
+#include <asm/arch/s3c6400.h>
 
 #define APLL 0
 #define MPLL 1
index 22a5b77701f886c7803bcf08c9aa5f5e76522b43..9768319efa07992375a03eafeec80bcbe30b4eec 100644 (file)
@@ -40,7 +40,7 @@
 
 #include <common.h>
 #include <asm/proc-armv/ptrace.h>
-#include <s3c6400.h>
+#include <asm/arch/s3c6400.h>
 #include <div64.h>
 
 static ulong timer_load_val;
@@ -164,7 +164,7 @@ void set_timer(ulong t)
        timestamp = t * (timer_load_val / (100 * CONFIG_SYS_HZ));
 }
 
-void udelay(unsigned long usec)
+void __udelay(unsigned long usec)
 {
        unsigned long long tmp;
        ulong tmo;
index cb891df1790fc0fc54f494cc7f76b4533e7d0f65..68a356d13e9a2d9069961d56286040bf4adeda39 100644 (file)
@@ -35,7 +35,7 @@
 #ifdef CONFIG_ENABLE_MMU
 #include <asm/proc/domain.h>
 #endif
-#include <s3c6400.h>
+#include <asm/arch/s3c6400.h>
 
 #if !defined(CONFIG_ENABLE_MMU) && !defined(CONFIG_SYS_PHY_UBOOT_BASE)
 #define CONFIG_SYS_PHY_UBOOT_BASE      CONFIG_SYS_UBOOT_BASE
@@ -241,16 +241,11 @@ mmu_enable:
 skip_hw_init:
        /* Set up the stack                                                 */
 stack_setup:
-#ifdef CONFIG_MEMORY_UPPER_CODE
-       ldr     sp, =(CONFIG_SYS_UBOOT_BASE + CONFIG_SYS_UBOOT_SIZE - 0xc)
-#else
-       ldr     r0, _TEXT_BASE          /* upper 128 KiB: relocated uboot   */
+       ldr     r0, =CONFIG_SYS_UBOOT_BASE      /* base of copy in DRAM     */
        sub     r0, r0, #CONFIG_SYS_MALLOC_LEN  /* malloc area                      */
        sub     r0, r0, #CONFIG_SYS_GBL_DATA_SIZE /* bdinfo                        */
        sub     sp, r0, #12             /* leave 3 words for abort-stack    */
 
-#endif
-
 clear_bss:
        ldr     r0, _bss_start          /* find start of bss segment        */
        ldr     r1, _bss_end            /* stop here                        */
index 91d552cd28a755d43c016c0c777c09e7878062ed..eb8d4253181c12a6136ce9ac8bec21a069c49f38 100644 (file)
@@ -224,7 +224,7 @@ void set_timer (ulong t)
        timestamp = t;
 }
 
-void udelay (unsigned long usec)
+void __udelay (unsigned long usec)
 {
        ulong tmo;
 
@@ -296,7 +296,7 @@ ulong get_timer (ulong base)
        return timestamp - base;
 }
 
-void udelay (unsigned long usec)
+void __udelay (unsigned long usec)
 {
        u32 ticks;
 
diff --git a/cpu/arm920t/a320/Makefile b/cpu/arm920t/a320/Makefile
new file mode 100644 (file)
index 0000000..f030c53
--- /dev/null
@@ -0,0 +1,47 @@
+#
+# (C) Copyright 2000-2006
+# 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$(SOC).a
+
+SOBJS  += reset.o
+COBJS  += timer.o
+COBJS  += ftsmc020.o
+
+SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
+OBJS   := $(addprefix $(obj),$(SOBJS) $(COBJS))
+
+all:   $(obj).depend $(LIB)
+
+$(LIB):        $(OBJS)
+       $(AR) $(ARFLAGS) $@ $(OBJS)
+
+#########################################################################
+
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+#########################################################################
diff --git a/cpu/arm920t/a320/ftsmc020.c b/cpu/arm920t/a320/ftsmc020.c
new file mode 100644 (file)
index 0000000..7646537
--- /dev/null
@@ -0,0 +1,51 @@
+/*
+ * (C) Copyright 2009 Faraday Technology
+ * Po-Yu Chuang <ratbert@faraday-tech.com>
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <config.h>
+#include <common.h>
+#include <asm/io.h>
+#include <asm/arch/ftsmc020.h>
+
+struct ftsmc020_config {
+       unsigned int    config;
+       unsigned int    timing;
+};
+
+static struct ftsmc020_config config[] = CONFIG_SYS_FTSMC020_CONFIGS;
+
+static struct ftsmc020 *smc = (struct ftsmc020 *)CONFIG_FTSMC020_BASE;
+
+static void ftsmc020_setup_bank(unsigned int bank, struct ftsmc020_config *cfg)
+{
+       if (bank > 3) {
+               printf("bank # %u invalid\n", bank);
+               return;
+       }
+
+       writel(cfg->config, &smc->bank[bank].cr);
+       writel(cfg->timing, &smc->bank[bank].tpr);
+}
+
+void ftsmc020_init(void)
+{
+       int i;
+
+       for (i = 0; i < ARRAY_SIZE(config); i++)
+               ftsmc020_setup_bank(i, &config[i]);
+}
diff --git a/cpu/arm920t/a320/reset.S b/cpu/arm920t/a320/reset.S
new file mode 100644 (file)
index 0000000..12ca527
--- /dev/null
@@ -0,0 +1,22 @@
+/*
+ * (C) Copyright 2009 Faraday Technology
+ * Po-Yu Chuang <ratbert@faraday-tech.com>
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+.global reset_cpu
+reset_cpu:
+       b       reset_cpu
diff --git a/cpu/arm920t/a320/timer.c b/cpu/arm920t/a320/timer.c
new file mode 100644 (file)
index 0000000..bb65593
--- /dev/null
@@ -0,0 +1,193 @@
+/*
+ * (C) Copyright 2009 Faraday Technology
+ * Po-Yu Chuang <ratbert@faraday-tech.com>
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <common.h>
+#include <asm/io.h>
+#include <asm/arch/ftpmu010.h>
+#include <asm/arch/fttmr010.h>
+
+static ulong timestamp;
+static ulong lastdec;
+
+static struct fttmr010 *tmr = (struct fttmr010 *)CONFIG_FTTMR010_BASE;
+static struct ftpmu010 *pmu = (struct ftpmu010 *)CONFIG_FTPMU010_BASE;
+
+#define TIMER_CLOCK    32768
+#define TIMER_LOAD_VAL 0xffffffff
+
+int timer_init(void)
+{
+       unsigned int oscc;
+       unsigned int cr;
+
+       debug("%s()\n", __func__);
+
+       /* disable timers */
+       writel(0, &tmr->cr);
+
+       /*
+        * use 32768Hz oscillator for RTC, WDT, TIMER
+        */
+
+       /* enable the 32768Hz oscillator */
+       oscc = readl(&pmu->OSCC);
+       oscc &= ~(FTPMU010_OSCC_OSCL_OFF | FTPMU010_OSCC_OSCL_TRI);
+       writel(oscc, &pmu->OSCC);
+
+       /* wait until ready */
+       while (!(readl(&pmu->OSCC) & FTPMU010_OSCC_OSCL_STABLE))
+               ;
+
+       /* select 32768Hz oscillator */
+       oscc = readl(&pmu->OSCC);
+       oscc |= FTPMU010_OSCC_OSCL_RTCLSEL;
+       writel(oscc, &pmu->OSCC);
+
+       /* setup timer */
+       writel(TIMER_LOAD_VAL, &tmr->timer3_load);
+       writel(TIMER_LOAD_VAL, &tmr->timer3_counter);
+       writel(0, &tmr->timer3_match1);
+       writel(0, &tmr->timer3_match2);
+
+       /* we don't want timer to issue interrupts */
+       writel(FTTMR010_TM3_MATCH1 |
+              FTTMR010_TM3_MATCH2 |
+              FTTMR010_TM3_OVERFLOW,
+              &tmr->interrupt_mask);
+
+       cr = readl(&tmr->cr);
+       cr |= FTTMR010_TM3_CLOCK;       /* use external clock */
+       cr |= FTTMR010_TM3_ENABLE;
+       writel(cr, &tmr->cr);
+
+       /* init the timestamp and lastdec value */
+       reset_timer_masked();
+
+       return 0;
+}
+
+/*
+ * timer without interrupts
+ */
+
+/*
+ * reset time
+ */
+void reset_timer_masked(void)
+{
+       /* capure current decrementer value time */
+       lastdec = readl(&tmr->timer3_counter) / (TIMER_CLOCK / CONFIG_SYS_HZ);
+       timestamp = 0;          /* start "advancing" time stamp from 0 */
+
+       debug("%s(): lastdec = %lx\n", __func__, lastdec);
+}
+
+void reset_timer(void)
+{
+       debug("%s()\n", __func__);
+       reset_timer_masked();
+}
+
+/*
+ * return timer ticks
+ */
+ulong get_timer_masked(void)
+{
+       /* current tick value */
+       ulong now = readl(&tmr->timer3_counter) / (TIMER_CLOCK / CONFIG_SYS_HZ);
+
+       debug("%s(): now = %lx, lastdec = %lx\n", __func__, now, lastdec);
+
+       if (lastdec >= now) {
+               /*
+                * normal mode (non roll)
+                * move stamp fordward with absoulte diff ticks
+                */
+               timestamp += lastdec - now;
+       } else {
+               /*
+                * we have overflow of the count down timer
+                *
+                * nts = ts + ld + (TLV - now)
+                * ts=old stamp, ld=time that passed before passing through -1
+                * (TLV-now) amount of time after passing though -1
+                * nts = new "advancing time stamp"...it could also roll and
+                * cause problems.
+                */
+               timestamp += lastdec + TIMER_LOAD_VAL - now;
+       }
+
+       lastdec = now;
+
+       debug("%s() returns %lx\n", __func__, timestamp);
+
+       return timestamp;
+}
+
+/*
+ * return difference between timer ticks and base
+ */
+ulong get_timer(ulong base)
+{
+       debug("%s(%lx)\n", __func__, base);
+       return get_timer_masked() - base;
+}
+
+void set_timer(ulong t)
+{
+       debug("%s(%lx)\n", __func__, t);
+       timestamp = t;
+}
+
+/* delay x useconds AND perserve advance timstamp value */
+void udelay(unsigned long usec)
+{
+       long tmo = usec * (TIMER_CLOCK / 1000) / 1000;
+       unsigned long now, last = readl(&tmr->timer3_counter);
+
+       debug("%s(%lu)\n", __func__, usec);
+       while (tmo > 0) {
+               now = readl(&tmr->timer3_counter);
+               if (now > last) /* count down timer overflow */
+                       tmo -= TIMER_LOAD_VAL + last - now;
+               else
+                       tmo -= last - now;
+               last = now;
+       }
+}
+
+/*
+ * This function is derived from PowerPC code (read timebase as long long).
+ * On ARM it just returns the timer value.
+ */
+unsigned long long get_ticks(void)
+{
+       debug("%s()\n", __func__);
+       return get_timer(0);
+}
+
+/*
+ * This function is derived from PowerPC code (timebase clock frequency).
+ * On ARM it returns the number of timer ticks per second.
+ */
+ulong get_tbclk(void)
+{
+       debug("%s()\n", __func__);
+       return CONFIG_SYS_HZ;
+}
index 235d1073886f6a07a364c3df58fde50e628690d1..9c54bbedbe646d8cd79e3a0ad7596d12f727afe2 100644 (file)
@@ -87,7 +87,7 @@ void set_timer (ulong t)
        timestamp = t;
 }
 
-void udelay (unsigned long usec)
+void __udelay (unsigned long usec)
 {
        udelay_masked(usec);
 }
index 31ec588d9194684641ec842a9328f1ed10e2208e..b06b518f03b2801de67622f54d34a8d2ac2b12cf 100644 (file)
@@ -89,7 +89,7 @@ void udelay_masked (unsigned long usec)
        } while (diff >= 0);
 }
 
-void udelay (unsigned long usec)
+void __udelay (unsigned long usec)
 {
        udelay_masked(usec);
 }
index 22987bc48bec43bc08a00235d608be30dfccc723..886e370596287310dc411a5d1d47bf62412c320b 100644 (file)
@@ -81,7 +81,7 @@ void set_timer(ulong t)
        timer_ticks = t;
 }
 
-void udelay(ulong usec)
+void __udelay(ulong usec)
 {
        ulong start = get_timer_masked();
        ulong end;
index 91489461367b49b9177ffa030ad879b1ec2a6a93..879fda66a9d056f25fce663efffe3b75a571ccac 100644 (file)
 
 #include <common.h>
 
-#if defined(CONFIG_S3C2400)
-#include <s3c2400.h>
-#elif defined(CONFIG_S3C2410)
-#include <s3c2410.h>
-#endif
+#include <asm/arch/s3c24x0_cpu.h>
 #include <asm/proc-armv/ptrace.h>
 
 void do_irq (struct pt_regs *pt_regs)
index 136c7794a6f51325cc0556194da952eefd42406b..b13283a798e884ec141d846278966ea69077c395 100644 (file)
  */
 
 #include <common.h>
-#if defined(CONFIG_S3C2400) || defined (CONFIG_S3C2410) || defined (CONFIG_TRAB)
+#ifdef CONFIG_S3C24X0
 
 #include <asm/io.h>
-
-#if defined(CONFIG_S3C2400)
-#include <s3c2400.h>
-#elif defined(CONFIG_S3C2410)
-#include <s3c2410.h>
-#endif
+#include <asm/arch/s3c24x0_cpu.h>
 
 #define MPLL 0
 #define UPLL 1
@@ -100,6 +95,4 @@ ulong get_UCLK(void)
        return get_PLLCLK(UPLL);
 }
 
-#endif /* defined(CONFIG_S3C2400) ||
-         defined (CONFIG_S3C2410) ||
-         defined (CONFIG_TRAB) */
+#endif /* CONFIG_S3C24X0 */
index a27f0e273cec779639b678e15afa73c070b743ea..7d47354381c0a68c5ff9491b8bec5244b75f9789 100644 (file)
  */
 
 #include <common.h>
-#if defined(CONFIG_S3C2400) || \
-    defined(CONFIG_S3C2410) || \
-    defined(CONFIG_TRAB)
+#ifdef CONFIG_S3C24X0
 
 #include <asm/io.h>
-
-#if defined(CONFIG_S3C2400)
-#include <s3c2400.h>
-#elif defined(CONFIG_S3C2410)
-#include <s3c2410.h>
-#endif
+#include <asm/arch/s3c24x0_cpu.h>
 
 int timer_load_val = 0;
 static ulong timer_clk;
@@ -106,7 +99,7 @@ void set_timer(ulong t)
        timestamp = t;
 }
 
-void udelay(unsigned long usec)
+void __udelay (unsigned long usec)
 {
        ulong tmo;
        ulong start = get_ticks();
@@ -227,6 +220,4 @@ void reset_cpu(ulong ignored)
        /*NOTREACHED*/
 }
 
-#endif /* defined(CONFIG_S3C2400)  ||
-         defined (CONFIG_S3C2410) ||
-         defined (CONFIG_TRAB) */
+#endif /* CONFIG_S3C24X0 */
index b5ba8c4f3a7091cc06533fcaebd9d54b374e3427..e468ed08fc4d22bf9a3341f50400fa111e79ca38 100644 (file)
 
 #include <common.h>
 
-#if defined(CONFIG_USB_OHCI_NEW) && defined(CONFIG_SYS_USB_OHCI_CPU_INIT)
-# if defined(CONFIG_S3C2400) || defined(CONFIG_S3C2410)
-
-#if defined(CONFIG_S3C2400)
-# include <s3c2400.h>
-#elif defined(CONFIG_S3C2410)
-# include <s3c2410.h>
-#endif
+#if defined(CONFIG_USB_OHCI_NEW) && \
+    defined(CONFIG_SYS_USB_OHCI_CPU_INIT) && \
+    defined(CONFIG_S3C24X0)
 
+#include <asm/arch/s3c24x0_cpu.h>
 #include <asm/io.h>
 
 int usb_cpu_init(void)
@@ -70,5 +66,6 @@ int usb_cpu_init_fail(void)
        return 0;
 }
 
-# endif        /* defined(CONFIG_S3C2400) || defined(CONFIG_S3C2410) */
-#endif /* defined(CONFIG_USB_OHCI_NEW) && defined(CONFIG_SYS_USB_OHCI_CPU_INIT) */
+#endif /* defined(CONFIG_USB_OHCI_NEW) && \
+          defined(CONFIG_SYS_USB_OHCI_CPU_INIT) && \
+          defined(CONFIG_S3C24X0) */
index 7672e4ce110c901312d0e8949ba26cba1c7363aa..5aa8d64a55cfddeea11014c2256be3a1f6240824 100644 (file)
 #include <common.h>
 /* #include <pci.h> no PCI on the S3C24X0 */
 
-#ifdef CONFIG_USB_OHCI
-
-#if defined(CONFIG_S3C2400)
-#include <s3c2400.h>
-#elif defined(CONFIG_S3C2410)
-#include <s3c2410.h>
-#endif
+#if defined(CONFIG_USB_OHCI) && defined(CONFIG_S3C24X0)
 
+#include <asm/arch/s3c24x0_cpu.h>
 #include <asm/io.h>
 #include <malloc.h>
 #include <usb.h>
@@ -1757,4 +1752,4 @@ int usb_lowlevel_stop(void)
        return 0;
 }
 
-#endif /* CONFIG_USB_OHCI */
+#endif /* defined(CONFIG_USB_OHCI) && defined(CONFIG_S3C24X0) */
index 114427a16ed36c618711a3be2007a5ba8c18606e..779f192e519ef000fef340722aabffe30382417c 100644 (file)
@@ -131,7 +131,7 @@ copyex:
        bne     copyex
 #endif
 
-#if defined(CONFIG_S3C2400) || defined(CONFIG_S3C2410)
+#ifdef CONFIG_S3C24X0
        /* turn off the watchdog */
 
 # if defined(CONFIG_S3C2400)
@@ -166,7 +166,7 @@ copyex:
        ldr     r0, =CLKDIVN
        mov     r1, #3
        str     r1, [r0]
-#endif /* CONFIG_S3C2400 || CONFIG_S3C2410 */
+#endif /* CONFIG_S3C24X0 */
 
        /*
         * we do sys-critical inits only at reboot,
index c16ef2577f8abb9b88bd953d416e8cb3903c59e8..7dfe2b56463b6c03f7c5551b2fc569631aa0dd12 100644 (file)
@@ -81,7 +81,7 @@ void set_timer (ulong t)
 }
 
 /* delay x useconds AND preserve advance timestamp value */
-void udelay (unsigned long usec)
+void __udelay (unsigned long usec)
 {
        int32_t tmo = usec * (TIMER_CLOCK / 1000) / 1000;
        uint32_t now, last = __raw_readl(CONFIG_SYS_TIMERBASE + READ_TIM);
index 811bb3c5906d8fc73fabd0fe72dd3941e5596ab8..7352b5c3379ebddb126fdac767cf090cec08d39a 100644 (file)
@@ -105,7 +105,7 @@ ulong get_timer_masked(void)
        return tick_to_time(get_ticks());
 }
 
-void udelay(unsigned long usec)
+void __udelay(unsigned long usec)
 {
        unsigned long long tmp;
        ulong tmo;
index 390cab8a200250dc2286358e1bbc505733901a3b..fc3551c302335272944682e3cedb1ad29687e14e 100644 (file)
@@ -23,7 +23,7 @@
 #include <common.h>
 #include <netdev.h>
 #include <asm/arch/hardware.h>
-
+#include <asm/io.h>
 
 /* offsets from PLL controller base */
 #define PLLC_PLLCTL    0x100
 #define DDR_PLLDIV     PLLC_PLLDIV1
 #endif
 
+#ifdef CONFIG_SOC_DA8XX
+const dv_reg * const sysdiv[7] = {
+       &davinci_pllc_regs->plldiv1, &davinci_pllc_regs->plldiv2,
+       &davinci_pllc_regs->plldiv3, &davinci_pllc_regs->plldiv4,
+       &davinci_pllc_regs->plldiv5, &davinci_pllc_regs->plldiv6,
+       &davinci_pllc_regs->plldiv7
+};
+
+int clk_get(enum davinci_clk_ids id)
+{
+       int pre_div;
+       int pllm;
+       int post_div;
+       int pll_out;
+
+       pll_out = CONFIG_SYS_OSCIN_FREQ;
+
+       if (id == DAVINCI_AUXCLK_CLKID)
+               goto out;
+
+       /*
+        * Lets keep this simple. Combining operations can result in
+        * unexpected approximations
+        */
+       pre_div = (readl(&davinci_pllc_regs->prediv) &
+                  DAVINCI_PLLC_DIV_MASK) + 1;
+       pllm = readl(&davinci_pllc_regs->pllm) + 1;
+
+       pll_out /= pre_div;
+       pll_out *= pllm;
+
+       if (id == DAVINCI_PLLM_CLKID)
+               goto out;
+
+       post_div = (readl(&davinci_pllc_regs->postdiv) &
+                   DAVINCI_PLLC_DIV_MASK) + 1;
+
+       pll_out /= post_div;
+
+       if (id == DAVINCI_PLLC_CLKID)
+               goto out;
+
+       pll_out /= (readl(sysdiv[id - 1]) & DAVINCI_PLLC_DIV_MASK) + 1;
+
+out:
+       return pll_out;
+}
+#endif /* CONFIG_SOC_DA8XX */
 
 #ifdef CONFIG_DISPLAY_CPUINFO
 
index 5bb972f186f9a953584048eeefdad2151e2650d0..8273a7fae4e96273cb5cade22f53d5db40a1da41 100644 (file)
@@ -25,6 +25,7 @@
 
 #include <common.h>
 #include <asm/arch/hardware.h>
+#include <asm/io.h>
 
 /*
  * The PSC manages three inputs to a "module" which may be a peripheral or
 /* Works on Always On power domain only (no PD argument) */
 void lpsc_on(unsigned int id)
 {
-       dv_reg_p mdstat, mdctl;
+       dv_reg_p mdstat, mdctl, ptstat, ptcmd;
+#ifdef CONFIG_SOC_DA8XX
+       struct davinci_psc_regs *psc_regs;
+#endif
 
+#ifndef CONFIG_SOC_DA8XX
        if (id >= DAVINCI_LPSC_GEM)
                return;                 /* Don't work on DSP Power Domain */
 
        mdstat = REG_P(PSC_MDSTAT_BASE + (id * 4));
        mdctl = REG_P(PSC_MDCTL_BASE + (id * 4));
+       ptstat = REG_P(PSC_PTSTAT);
+       ptcmd = REG_P(PSC_PTCMD);
+#else
+       if (id < DAVINCI_LPSC_PSC1_BASE) {
+               if (id >= PSC_PSC0_MODULE_ID_CNT)
+                       return;
+               psc_regs = davinci_psc0_regs;
+               mdstat = &psc_regs->psc0.mdstat[id];
+               mdctl = &psc_regs->psc0.mdctl[id];
+       } else {
+               id -= DAVINCI_LPSC_PSC1_BASE;
+               if (id >= PSC_PSC1_MODULE_ID_CNT)
+                       return;
+               psc_regs = davinci_psc1_regs;
+               mdstat = &psc_regs->psc1.mdstat[id];
+               mdctl = &psc_regs->psc1.mdctl[id];
+       }
+       ptstat = &psc_regs->ptstat;
+       ptcmd = &psc_regs->ptcmd;
+#endif
 
-       while (REG(PSC_PTSTAT) & 0x01)
+       while (readl(ptstat) & 0x01)
                continue;
 
-       if ((*mdstat & 0x1f) == 0x03)
-               return;                 /* Already on and enabled */
+       if ((readl(mdstat) & 0x1f) == 0x03)
+               return; /* Already on and enabled */
 
-       *mdctl |= 0x03;
+       writel(readl(mdctl) | 0x03, mdctl);
 
        switch (id) {
 #ifdef CONFIG_SOC_DM644X
@@ -80,16 +105,16 @@ void lpsc_on(unsigned int id)
        case DAVINCI_LPSC_MEMSTICK:
        case DAVINCI_LPSC_McBSP:
        case DAVINCI_LPSC_GPIO:
-               *mdctl |= 0x200;
+               writel(readl(mdctl) | 0x200, mdctl);
                break;
 #endif
        }
 
-       REG(PSC_PTCMD) = 0x01;
+       writel(0x01, ptcmd);
 
-       while (REG(PSC_PTSTAT) & 0x03)
+       while (readl(ptstat) & 0x01)
                continue;
-       while ((*mdstat & 0x1f) != 0x03)        /* Probably an overkill... */
+       while ((readl(mdstat) & 0x1f) != 0x03)
                continue;
 }
 
index 80751add84eca84b804d0d9a8343a3de68b339ec..9da7443f30b5fea4df134a932ac49739f6c9e1ee 100644 (file)
@@ -38,8 +38,9 @@
  */
 
 #include <common.h>
+#include <asm/io.h>
 
-typedef volatile struct {
+struct davinci_timer {
        u_int32_t       pid12;
        u_int32_t       emumgt;
        u_int32_t       na1;
@@ -51,9 +52,10 @@ typedef volatile struct {
        u_int32_t       tcr;
        u_int32_t       tgcr;
        u_int32_t       wdtcr;
-} davinci_timer;
+};
 
-davinci_timer          *timer = (davinci_timer *)CONFIG_SYS_TIMERBASE;
+static struct davinci_timer * const timer =
+       (struct davinci_timer *)CONFIG_SYS_TIMERBASE;
 
 #define TIMER_LOAD_VAL (CONFIG_SYS_HZ_CLOCK / CONFIG_SYS_HZ)
 #define TIM_CLK_DIV    16
@@ -64,30 +66,30 @@ static ulong lastinc;
 int timer_init(void)
 {
        /* We are using timer34 in unchained 32-bit mode, full speed */
-       timer->tcr = 0x0;
-       timer->tgcr = 0x0;
-       timer->tgcr = 0x06 | ((TIM_CLK_DIV - 1) << 8);
-       timer->tim34 = 0x0;
-       timer->prd34 = TIMER_LOAD_VAL;
+       writel(0x0, &timer->tcr);
+       writel(0x0, &timer->tgcr);
+       writel(0x06 | ((TIM_CLK_DIV - 1) << 8), &timer->tgcr);
+       writel(0x0, &timer->tim34);
+       writel(TIMER_LOAD_VAL, &timer->prd34);
        lastinc = 0;
        timestamp = 0;
-       timer->tcr = 2 << 22;
+       writel(2 << 22, &timer->tcr);
 
        return(0);
 }
 
 void reset_timer(void)
 {
-       timer->tcr = 0x0;
-       timer->tim34 = 0;
+       writel(0x0, &timer->tcr);
+       writel(0x0, &timer->tim34);
        lastinc = 0;
        timestamp = 0;
-       timer->tcr = 2 << 22;
+       writel(2 << 22, &timer->tcr);
 }
 
 static ulong get_timer_raw(void)
 {
-       ulong now = timer->tim34;
+       ulong now = readl(&timer->tim34);
 
        if (now >= lastinc) {
                /* normal mode */
@@ -110,7 +112,7 @@ void set_timer(ulong t)
        timestamp = t;
 }
 
-void udelay(unsigned long usec)
+void __udelay(unsigned long usec)
 {
        ulong tmo;
        ulong endtime;
index 817ff4284f230a1315777c348867636eecfb094f..2ec6a93807e9775856c3d42ac42ad8442ef7e7d8 100644 (file)
@@ -125,7 +125,7 @@ void set_timer(ulong t)
        timestamp = t;
 }
 
-void udelay(unsigned long usec)
+void __udelay(unsigned long usec)
 {
        uint current;
        ulong delayticks;
index 90110581ef6a73a9457efe2e84b97217cd74ca30..8f1d47bba775716ec21afd2a5e662c617b7a24d4 100644 (file)
@@ -177,7 +177,7 @@ void set_timer (ulong t)
 }
 
 /* delay x useconds AND preserve advance timstamp value */
-void udelay (unsigned long usec)
+void __udelay (unsigned long usec)
 {
        unsigned long long tmp;
        ulong tmo;
index 16067c900ae25f41b2fe486590c597f8ecdb2258..047b9e35130a014922200063d385def309f9244c 100644 (file)
@@ -59,7 +59,7 @@ ulong get_timer(ulong base)
 }
 
 /* Delay x useconds */
-void udelay(unsigned long usec)
+void __udelay(unsigned long usec)
 {
        ulong ini, end;
 
index 392b158d508eb30c3dddb817ad80e10ee304d135..2ac38c40b774e9f22a5b69c823873a9439cd4603 100644 (file)
@@ -80,7 +80,7 @@ void set_timer (ulong t)
 }
 
 /* delay x useconds AND perserve advance timstamp value */
-void udelay (unsigned long usec)
+void __udelay (unsigned long usec)
 {
        ulong tmo, tmp;
 
index 50c13350a06bb6909f90de225c637aa766eafea1..563db3654867c6fdd7d71873b83063e6addffa52 100755 (executable)
@@ -109,7 +109,7 @@ void set_timer (ulong t)
 }
 
 /* delay x useconds AND perserve advance timstamp value */
-void udelay (unsigned long usec)
+void __udelay (unsigned long usec)
 {
        ulong tmo, tmp;
 
index 8b8cd6d61776b763a1f7498752a2e2e982c72748..dfb7e4c2ad71831095a4ae014cb1e0203077b8ce 100644 (file)
@@ -161,10 +161,11 @@ void do_sdrc_init(u32 cs, u32 early)
                writel(0, &sdrc_base->sysconfig);
 
                /* setup sdrc to ball mux */
-               writel(SDP_SDRC_SHARING, &sdrc_base->sharing);
+               writel(SDRC_SHARING, &sdrc_base->sharing);
 
                /* Disable Power Down of CKE cuz of 1 CKE on combo part */
-               writel(SRFRONRESET | PAGEPOLICY_HIGH, &sdrc_base->power);
+               writel(WAKEUPPROC | PWDNEN | SRFRONRESET | PAGEPOLICY_HIGH,
+                               &sdrc_base->power);
 
                writel(ENADLL | DLLPHASE_90, &sdrc_base->dlla_ctrl);
                sdelay(0x20000);
index 31b20033ccc7fc531248558419cf7f171d7324a3..08fb32eaaef54d29f74e5824a3b7a47e9eb9e603 100644 (file)
@@ -109,7 +109,7 @@ u32 get_cpu_rev(void)
  ****************************************************/
 u32 is_mem_sdr(void)
 {
-       if (readl(&sdrc_base->cs[CS0].mr) == SDP_SDRC_MR_0_SDR)
+       if (readl(&sdrc_base->cs[CS0].mr) == SDRC_MR_0_SDR)
                return 1;
        return 0;
 }
index 12a16b3210aeb401feb0767c6c3e61336e03ab8b..401bfe6d09799525aa8ee71cebf80cfd2630f25f 100644 (file)
@@ -82,7 +82,7 @@ void set_timer(ulong t)
 }
 
 /* delay x useconds */
-void udelay(unsigned long usec)
+void __udelay(unsigned long usec)
 {
        long tmo = usec * (TIMER_CLOCK / 1000) / 1000;
        unsigned long now, last = readl(&timer_base->tcrr);
index cdba5d934279f65af2ff597f5c42507658254bf9..c5df5c5ab53b7a641c64c33252d142cf66560a02 100644 (file)
@@ -115,7 +115,7 @@ void set_timer(unsigned long t)
 }
 
 /* delay x useconds */
-void udelay(unsigned long usec)
+void __udelay(unsigned long usec)
 {
        unsigned long tmo, tmp;
 
index e08f27383da108cd82a3e549bbfcb4e99dba6492..60899c79ea0b59c24fb3315412362a939afbb219 100644 (file)
@@ -30,7 +30,7 @@ LIB   := $(obj)lib$(CPU).a
 START-y                        += start.o
 
 COBJS-y                        += cpu.o
-COBJS-y                        += hsdramc.o
+COBJS-$(CONFIG_SYS_HSDRAMC) += hsdramc.o
 COBJS-y                        += exception.o
 COBJS-y                        += cache.o
 COBJS-y                        += interrupts.o
index f74121cd46239aa3d9335a481b72a1e0b72254cd..b6eae667c242ab0b22fe8cdcd54d7a01a9cdda61 100644 (file)
@@ -21,7 +21,6 @@
  */
 #include <common.h>
 
-#ifdef CONFIG_SYS_HSDRAMC
 #include <asm/io.h>
 #include <asm/sdram.h>
 
@@ -116,5 +115,3 @@ unsigned long sdram_init(void *sdram_base, const struct sdram_config *config)
 
        return sdram_size;
 }
-
-#endif /* CONFIG_SYS_HSDRAMC */
index 75cc39e94c33eb02684efd845500df0458d98c0e..c6d8d16e39e8aecd95abbd2cf866b88b6438ca53 100644 (file)
@@ -96,7 +96,7 @@ void set_timer(unsigned long t)
 /*
  * For short delays only. It will overflow after a few seconds.
  */
-void udelay(unsigned long usec)
+void __udelay(unsigned long usec)
 {
        unsigned long cycles;
        unsigned long base;
index 19456e5c1476f999812e0247e8cb4b05cba9c03b..921bfe0c0f15bcdb644a2142415fcace283f4fc3 100644 (file)
@@ -64,7 +64,7 @@ int disable_interrupts(void)
        return 1;
 }
 
-void udelay(unsigned long usec)
+void __udelay(unsigned long usec)
 {
        unsigned long delay, start, stop;
        unsigned long cclk;
index e98bd3d7dab3ede7d28fcb3c8ea659e0398b961a..c658c6e45919213ddb576f5898744b2c7453c921 100644 (file)
@@ -29,7 +29,7 @@ include $(TOPDIR)/config.mk
 LIB    = $(obj)lib$(CPU).a
 
 START  = start.o start16.o resetvec.o
-COBJS  = serial.o interrupts.o exceptions.o cpu.o
+COBJS  = serial.o interrupts.o cpu.o
 
 SRCS   := $(START:.o=.S) $(SOBJS:.o=.S) $(COBJS:.o=.c)
 OBJS   := $(addprefix $(obj),$(SOBJS) $(COBJS))
index d91e33b947ade5e48936ca2c605f4be2054a39df..3010519e7461347e73d5e399992e4b5b15e813c8 100644 (file)
@@ -37,7 +37,7 @@
 #include <command.h>
 #include <asm/interrupt.h>
 
-int cpu_init(void)
+int cpu_init_f(void)
 {
        /* initialize FPU, reset EM, set MP and NE */
        asm ("fninit\n" \
@@ -46,10 +46,13 @@ int cpu_init(void)
             "orl  $0x22, %eax\n" \
             "movl %eax, %cr0\n" );
 
+       return 0;
+}
+
+int cpu_init_r(void)
+{
        /* Initialize core interrupt and exception functionality of CPU */
        cpu_init_interrupts ();
-       cpu_init_exceptions ();
-
        return 0;
 }
 
@@ -74,6 +77,8 @@ void __attribute__ ((regparm(0))) generate_gpf(void);
 
 /* segment 0x70 is an arbitrary segment which does not exist */
 asm(".globl generate_gpf\n"
+    ".hidden generate_gpf\n"
+    ".type generate_gpf, @function\n"
     "generate_gpf:\n"
     "ljmp   $0x70, $0x47114711\n");
 
diff --git a/cpu/i386/exceptions.c b/cpu/i386/exceptions.c
deleted file mode 100644 (file)
index bc3d434..0000000
+++ /dev/null
@@ -1,229 +0,0 @@
-/*
- * (C) Copyright 2002
- * Daniel Engström, Omicron Ceti AB, daniel@omicron.se.
- *
- * 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/interrupt.h>
-
-asm (".globl exp_return\n"
-     "exp_return:\n"
-     "     addl  $12, %esp\n"
-     "     pop   %esp\n"
-     "     popa\n"
-     "     iret\n");
-
-char exception_stack[4096];
-
-/*
- * For detailed description of each exception, refer to:
- * Intel® 64 and IA-32 Architectures Software Developer's Manual
- * Volume 1: Basic Architecture
- * Order Number: 253665-029US, November 2008
- * Table 6-1. Exceptions and Interrupts
- */
-DECLARE_EXCEPTION(0, divide_error_entry);
-DECLARE_EXCEPTION(1, debug_entry);
-DECLARE_EXCEPTION(2, nmi_interrupt_entry);
-DECLARE_EXCEPTION(3, breakpoint_entry);
-DECLARE_EXCEPTION(4, overflow_entry);
-DECLARE_EXCEPTION(5, bound_range_exceeded_entry);
-DECLARE_EXCEPTION(6, invalid_opcode_entry);
-DECLARE_EXCEPTION(7, device_not_available_entry);
-DECLARE_EXCEPTION(8, double_fault_entry);
-DECLARE_EXCEPTION(9, coprocessor_segment_overrun_entry);
-DECLARE_EXCEPTION(10, invalid_tss_entry);
-DECLARE_EXCEPTION(11, segment_not_present_entry);
-DECLARE_EXCEPTION(12, stack_segment_fault_entry);
-DECLARE_EXCEPTION(13, general_protection_entry);
-DECLARE_EXCEPTION(14, page_fault_entry);
-DECLARE_EXCEPTION(15, reserved_exception_entry);
-DECLARE_EXCEPTION(16, floating_point_error_entry);
-DECLARE_EXCEPTION(17, alignment_check_entry);
-DECLARE_EXCEPTION(18, machine_check_entry);
-DECLARE_EXCEPTION(19, simd_floating_point_exception_entry);
-DECLARE_EXCEPTION(20, reserved_exception_entry);
-DECLARE_EXCEPTION(21, reserved_exception_entry);
-DECLARE_EXCEPTION(22, reserved_exception_entry);
-DECLARE_EXCEPTION(23, reserved_exception_entry);
-DECLARE_EXCEPTION(24, reserved_exception_entry);
-DECLARE_EXCEPTION(25, reserved_exception_entry);
-DECLARE_EXCEPTION(26, reserved_exception_entry);
-DECLARE_EXCEPTION(27, reserved_exception_entry);
-DECLARE_EXCEPTION(28, reserved_exception_entry);
-DECLARE_EXCEPTION(29, reserved_exception_entry);
-DECLARE_EXCEPTION(30, reserved_exception_entry);
-DECLARE_EXCEPTION(31, reserved_exception_entry);
-
-__isr__ reserved_exception_entry(int cause, int ip, int seg)
-{
-       printf("Reserved Exception %d at %04x:%08x\n", cause, seg, ip);
-}
-
-__isr__ divide_error_entry(int cause, int ip, int seg)
-{
-       printf("Divide Error (Division by zero) at %04x:%08x\n", seg, ip);
-       while(1);
-}
-
-__isr__ debug_entry(int cause, int ip, int seg)
-{
-       printf("Debug Interrupt (Single step) at %04x:%08x\n", seg, ip);
-}
-
-__isr__ nmi_interrupt_entry(int cause, int ip, int seg)
-{
-       printf("NMI Interrupt at %04x:%08x\n", seg, ip);
-}
-
-__isr__ breakpoint_entry(int cause, int ip, int seg)
-{
-       printf("Breakpoint at %04x:%08x\n", seg, ip);
-}
-
-__isr__ overflow_entry(int cause, int ip, int seg)
-{
-       printf("Overflow at %04x:%08x\n", seg, ip);
-       while(1);
-}
-
-__isr__ bound_range_exceeded_entry(int cause, int ip, int seg)
-{
-       printf("BOUND Range Exceeded at %04x:%08x\n", seg, ip);
-       while(1);
-}
-
-__isr__ invalid_opcode_entry(int cause, int ip, int seg)
-{
-       printf("Invalid Opcode (UnDefined Opcode) at %04x:%08x\n", seg, ip);
-       while(1);
-}
-
-__isr__ device_not_available_entry(int cause, int ip, int seg)
-{
-       printf("Device Not Available (No Math Coprocessor) at %04x:%08x\n", seg, ip);
-       while(1);
-}
-
-__isr__ double_fault_entry(int cause, int ip, int seg)
-{
-       printf("Double fault at %04x:%08x\n", seg, ip);
-       while(1);
-}
-
-__isr__ coprocessor_segment_overrun_entry(int cause, int ip, int seg)
-{
-       printf("Co-processor segment overrun at %04x:%08x\n", seg, ip);
-       while(1);
-}
-
-__isr__ invalid_tss_entry(int cause, int ip, int seg)
-{
-       printf("Invalid TSS at %04x:%08x\n", seg, ip);
-}
-
-__isr__ segment_not_present_entry(int cause, int ip, int seg)
-{
-       printf("Segment Not Present at %04x:%08x\n", seg, ip);
-       while(1);
-}
-
-__isr__ stack_segment_fault_entry(int cause, int ip, int seg)
-{
-       printf("Stack Segment Fault at %04x:%08x\n", seg, ip);
-       while(1);
-}
-
-__isr__ general_protection_entry(int cause, int ip, int seg)
-{
-       printf("General Protection at %04x:%08x\n", seg, ip);
-}
-
-__isr__ page_fault_entry(int cause, int ip, int seg)
-{
-       printf("Page fault at %04x:%08x\n", seg, ip);
-       while(1);
-}
-
-__isr__ floating_point_error_entry(int cause, int ip, int seg)
-{
-       printf("Floating-Point Error (Math Fault) at %04x:%08x\n", seg, ip);
-}
-
-__isr__ alignment_check_entry(int cause, int ip, int seg)
-{
-       printf("Alignment check at %04x:%08x\n", seg, ip);
-}
-
-__isr__ machine_check_entry(int cause, int ip, int seg)
-{
-       printf("Machine Check at %04x:%08x\n", seg, ip);
-}
-
-__isr__ simd_floating_point_exception_entry(int cause, int ip, int seg)
-{
-       printf("SIMD Floating-Point Exception at %04x:%08x\n", seg, ip);
-}
-
-int cpu_init_exceptions(void)
-{
-       /* Just in case... */
-       disable_interrupts();
-
-       /* Setup exceptions */
-       set_vector(0x00, exp_0);
-       set_vector(0x01, exp_1);
-       set_vector(0x02, exp_2);
-       set_vector(0x03, exp_3);
-       set_vector(0x04, exp_4);
-       set_vector(0x05, exp_5);
-       set_vector(0x06, exp_6);
-       set_vector(0x07, exp_7);
-       set_vector(0x08, exp_8);
-       set_vector(0x09, exp_9);
-       set_vector(0x0a, exp_10);
-       set_vector(0x0b, exp_11);
-       set_vector(0x0c, exp_12);
-       set_vector(0x0d, exp_13);
-       set_vector(0x0e, exp_14);
-       set_vector(0x0f, exp_15);
-       set_vector(0x10, exp_16);
-       set_vector(0x11, exp_17);
-       set_vector(0x12, exp_18);
-       set_vector(0x13, exp_19);
-       set_vector(0x14, exp_20);
-       set_vector(0x15, exp_21);
-       set_vector(0x16, exp_22);
-       set_vector(0x17, exp_23);
-       set_vector(0x18, exp_24);
-       set_vector(0x19, exp_25);
-       set_vector(0x1a, exp_26);
-       set_vector(0x1b, exp_27);
-       set_vector(0x1c, exp_28);
-       set_vector(0x1d, exp_29);
-       set_vector(0x1e, exp_30);
-       set_vector(0x1f, exp_31);
-
-       /* It is now safe to enable interrupts */
-       enable_interrupts();
-
-       return 0;
-}
index 063ea42cd2bf31a022727fdf77c414d89682e502..4b57437193079a7df614d62aaac81e513c131319 100644 (file)
@@ -1,4 +1,7 @@
 /*
+ * (C) Copyright 2008
+ * Graeme Russ, graeme.russ@gmail.com.
+ *
  * (C) Copyright 2002
  * Daniel Engström, Omicron Ceti AB, daniel@omicron.se.
  *
 #include <common.h>
 #include <asm/interrupt.h>
 
+#define DECLARE_INTERRUPT(x) \
+       ".globl irq_"#x"\n" \
+       ".hidden irq_"#x"\n" \
+       ".type irq_"#x", @function\n" \
+       "irq_"#x":\n" \
+       "pushl %ebp\n" \
+       "movl %esp,%ebp\n" \
+       "pusha\n" \
+       "pushl $"#x"\n" \
+       "jmp irq_common_entry\n"
 
 struct idt_entry {
        u16     base_low;
@@ -33,35 +46,37 @@ struct idt_entry {
        u16     base_high;
 } __attribute__ ((packed));
 
+struct desc_ptr {
+       unsigned short size;
+       unsigned long address;
+       unsigned short segment;
+} __attribute__((packed));
 
 struct idt_entry idt[256];
 
+struct desc_ptr idt_ptr;
 
-asm (".globl irq_return\n"
-     "irq_return:\n"
-     "     addl  $4, %esp\n"
-     "     popa\n"
-     "     iret\n");
-
-void __attribute__ ((regparm(0))) default_isr(void);
-asm ("default_isr: iret\n");
-
-asm ("idt_ptr:\n"
-       ".word  0x800\n" /* size of the table 8*256 bytes */
-       ".long  idt\n"   /* offset */
-       ".word  0x18\n");/* data segment */
+static inline void load_idt(const struct desc_ptr *dtr)
+{
+       asm volatile("cs lidt %0"::"m" (*dtr));
+}
 
 void set_vector(u8 intnum, void *routine)
 {
-       idt[intnum].base_high = (u16)((u32)(routine + gd->reloc_off) >> 16);
-       idt[intnum].base_low = (u16)((u32)(routine + gd->reloc_off) & 0xffff);
+       idt[intnum].base_high = (u16)((u32)(routine) >> 16);
+       idt[intnum].base_low = (u16)((u32)(routine) & 0xffff);
 }
 
+void irq_0(void);
+void irq_1(void);
 
 int cpu_init_interrupts(void)
 {
        int i;
 
+       int irq_entry_size = irq_1 - irq_0;
+       void *irq_entry = (void *)irq_0;
+
        /* Just in case... */
        disable_interrupts();
 
@@ -70,10 +85,15 @@ int cpu_init_interrupts(void)
                idt[i].access = 0x8e;
                idt[i].res = 0;
                idt[i].selector = 0x10;
-               set_vector(i, default_isr);
+               set_vector(i, irq_entry);
+               irq_entry += irq_entry_size;
        }
 
-       asm ("cs lidt idt_ptr\n");
+       idt_ptr.size = 256 * 8;
+       idt_ptr.address = (unsigned long) idt;
+       idt_ptr.segment = 0x18;
+
+       load_idt(&idt_ptr);
 
        /* It is now safe to enable interrupts */
        enable_interrupts();
@@ -81,6 +101,12 @@ int cpu_init_interrupts(void)
        return 0;
 }
 
+void __do_irq(int irq)
+{
+       printf("Unhandled IRQ : %d\n", irq);
+}
+void do_irq(int irq) __attribute__((weak, alias("__do_irq")));
+
 void enable_interrupts(void)
 {
        asm("sti\n");
@@ -94,3 +120,382 @@ int disable_interrupts(void)
 
        return (flags&0x200); /* IE flags is bit 9 */
 }
+
+/* IRQ Low-Level Service Routine */
+__isr__ irq_llsr(int ip, int seg, int irq)
+{
+       /*
+        * For detailed description of each exception, refer to:
+        * Intel® 64 and IA-32 Architectures Software Developer's Manual
+        * Volume 1: Basic Architecture
+        * Order Number: 253665-029US, November 2008
+        * Table 6-1. Exceptions and Interrupts
+        */
+       switch (irq) {
+       case 0x00:
+               printf("Divide Error (Division by zero) at %04x:%08x\n", seg, ip);
+               while(1);
+               break;
+       case 0x01:
+               printf("Debug Interrupt (Single step) at %04x:%08x\n", seg, ip);
+               break;
+       case 0x02:
+               printf("NMI Interrupt at %04x:%08x\n", seg, ip);
+               break;
+       case 0x03:
+               printf("Breakpoint at %04x:%08x\n", seg, ip);
+               break;
+       case 0x04:
+               printf("Overflow at %04x:%08x\n", seg, ip);
+               while(1);
+               break;
+       case 0x05:
+               printf("BOUND Range Exceeded at %04x:%08x\n", seg, ip);
+               while(1);
+               break;
+       case 0x06:
+               printf("Invalid Opcode (UnDefined Opcode) at %04x:%08x\n", seg, ip);
+               while(1);
+               break;
+       case 0x07:
+               printf("Device Not Available (No Math Coprocessor) at %04x:%08x\n", seg, ip);
+               while(1);
+               break;
+       case 0x08:
+               printf("Double fault at %04x:%08x\n", seg, ip);
+               while(1);
+               break;
+       case 0x09:
+               printf("Co-processor segment overrun at %04x:%08x\n", seg, ip);
+               while(1);
+               break;
+       case 0x0a:
+               printf("Invalid TSS at %04x:%08x\n", seg, ip);
+               break;
+       case 0x0b:
+               printf("Segment Not Present at %04x:%08x\n", seg, ip);
+               while(1);
+               break;
+       case 0x0c:
+               printf("Stack Segment Fault at %04x:%08x\n", seg, ip);
+               while(1);
+               break;
+       case 0x0d:
+               printf("General Protection at %04x:%08x\n", seg, ip);
+               break;
+       case 0x0e:
+               printf("Page fault at %04x:%08x\n", seg, ip);
+               while(1);
+               break;
+       case 0x0f:
+               printf("Floating-Point Error (Math Fault) at %04x:%08x\n", seg, ip);
+               break;
+       case 0x10:
+               printf("Alignment check at %04x:%08x\n", seg, ip);
+               break;
+       case 0x11:
+               printf("Machine Check at %04x:%08x\n", seg, ip);
+               break;
+       case 0x12:
+               printf("SIMD Floating-Point Exception at %04x:%08x\n", seg, ip);
+               break;
+       case 0x13:
+       case 0x14:
+       case 0x15:
+       case 0x16:
+       case 0x17:
+       case 0x18:
+       case 0x19:
+       case 0x1a:
+       case 0x1b:
+       case 0x1c:
+       case 0x1d:
+       case 0x1e:
+       case 0x1f:
+               printf("Reserved Exception %d at %04x:%08x\n", irq, seg, ip);
+               break;
+
+       default:
+               /* Hardware or User IRQ */
+               do_irq(irq);
+       }
+}
+
+/*
+ * OK - This looks really horrible, but it serves a purpose - It helps create
+ * fully relocatable code.
+ *  - The call to irq_llsr will be a relative jump
+ *  - The IRQ entries will be guaranteed to be in order
+ * It's a bit annoying that we need to waste 3 bytes per interrupt entry
+ * (total of 768 code bytes), but we MUST create a Stack Frame and this is
+ * the easiest way I could do it. Maybe it can be made better later.
+ */
+asm(".globl irq_common_entry\n" \
+       ".hidden irq_common_entry\n" \
+       ".type irq_common_entry, @function\n" \
+       "irq_common_entry:\n" \
+       "pushl $0\n" \
+       "pushl $0\n" \
+       "call irq_llsr\n" \
+       "popl %eax\n" \
+       "popl %eax\n" \
+       "popl %eax\n" \
+       "popa\n" \
+       "leave\n"\
+       "iret\n" \
+       DECLARE_INTERRUPT(0) \
+       DECLARE_INTERRUPT(1) \
+       DECLARE_INTERRUPT(2) \
+       DECLARE_INTERRUPT(3) \
+       DECLARE_INTERRUPT(4) \
+       DECLARE_INTERRUPT(5) \
+       DECLARE_INTERRUPT(6) \
+       DECLARE_INTERRUPT(7) \
+       DECLARE_INTERRUPT(8) \
+       DECLARE_INTERRUPT(9) \
+       DECLARE_INTERRUPT(10) \
+       DECLARE_INTERRUPT(11) \
+       DECLARE_INTERRUPT(12) \
+       DECLARE_INTERRUPT(13) \
+       DECLARE_INTERRUPT(14) \
+       DECLARE_INTERRUPT(15) \
+       DECLARE_INTERRUPT(16) \
+       DECLARE_INTERRUPT(17) \
+       DECLARE_INTERRUPT(18) \
+       DECLARE_INTERRUPT(19) \
+       DECLARE_INTERRUPT(20) \
+       DECLARE_INTERRUPT(21) \
+       DECLARE_INTERRUPT(22) \
+       DECLARE_INTERRUPT(23) \
+       DECLARE_INTERRUPT(24) \
+       DECLARE_INTERRUPT(25) \
+       DECLARE_INTERRUPT(26) \
+       DECLARE_INTERRUPT(27) \
+       DECLARE_INTERRUPT(28) \
+       DECLARE_INTERRUPT(29) \
+       DECLARE_INTERRUPT(30) \
+       DECLARE_INTERRUPT(31) \
+       DECLARE_INTERRUPT(32) \
+       DECLARE_INTERRUPT(33) \
+       DECLARE_INTERRUPT(34) \
+       DECLARE_INTERRUPT(35) \
+       DECLARE_INTERRUPT(36) \
+       DECLARE_INTERRUPT(37) \
+       DECLARE_INTERRUPT(38) \
+       DECLARE_INTERRUPT(39) \
+       DECLARE_INTERRUPT(40) \
+       DECLARE_INTERRUPT(41) \
+       DECLARE_INTERRUPT(42) \
+       DECLARE_INTERRUPT(43) \
+       DECLARE_INTERRUPT(44) \
+       DECLARE_INTERRUPT(45) \
+       DECLARE_INTERRUPT(46) \
+       DECLARE_INTERRUPT(47) \
+       DECLARE_INTERRUPT(48) \
+       DECLARE_INTERRUPT(49) \
+       DECLARE_INTERRUPT(50) \
+       DECLARE_INTERRUPT(51) \
+       DECLARE_INTERRUPT(52) \
+       DECLARE_INTERRUPT(53) \
+       DECLARE_INTERRUPT(54) \
+       DECLARE_INTERRUPT(55) \
+       DECLARE_INTERRUPT(56) \
+       DECLARE_INTERRUPT(57) \
+       DECLARE_INTERRUPT(58) \
+       DECLARE_INTERRUPT(59) \
+       DECLARE_INTERRUPT(60) \
+       DECLARE_INTERRUPT(61) \
+       DECLARE_INTERRUPT(62) \
+       DECLARE_INTERRUPT(63) \
+       DECLARE_INTERRUPT(64) \
+       DECLARE_INTERRUPT(65) \
+       DECLARE_INTERRUPT(66) \
+       DECLARE_INTERRUPT(67) \
+       DECLARE_INTERRUPT(68) \
+       DECLARE_INTERRUPT(69) \
+       DECLARE_INTERRUPT(70) \
+       DECLARE_INTERRUPT(71) \
+       DECLARE_INTERRUPT(72) \
+       DECLARE_INTERRUPT(73) \
+       DECLARE_INTERRUPT(74) \
+       DECLARE_INTERRUPT(75) \
+       DECLARE_INTERRUPT(76) \
+       DECLARE_INTERRUPT(77) \
+       DECLARE_INTERRUPT(78) \
+       DECLARE_INTERRUPT(79) \
+       DECLARE_INTERRUPT(80) \
+       DECLARE_INTERRUPT(81) \
+       DECLARE_INTERRUPT(82) \
+       DECLARE_INTERRUPT(83) \
+       DECLARE_INTERRUPT(84) \
+       DECLARE_INTERRUPT(85) \
+       DECLARE_INTERRUPT(86) \
+       DECLARE_INTERRUPT(87) \
+       DECLARE_INTERRUPT(88) \
+       DECLARE_INTERRUPT(89) \
+       DECLARE_INTERRUPT(90) \
+       DECLARE_INTERRUPT(91) \
+       DECLARE_INTERRUPT(92) \
+       DECLARE_INTERRUPT(93) \
+       DECLARE_INTERRUPT(94) \
+       DECLARE_INTERRUPT(95) \
+       DECLARE_INTERRUPT(97) \
+       DECLARE_INTERRUPT(96) \
+       DECLARE_INTERRUPT(98) \
+       DECLARE_INTERRUPT(99) \
+       DECLARE_INTERRUPT(100) \
+       DECLARE_INTERRUPT(101) \
+       DECLARE_INTERRUPT(102) \
+       DECLARE_INTERRUPT(103) \
+       DECLARE_INTERRUPT(104) \
+       DECLARE_INTERRUPT(105) \
+       DECLARE_INTERRUPT(106) \
+       DECLARE_INTERRUPT(107) \
+       DECLARE_INTERRUPT(108) \
+       DECLARE_INTERRUPT(109) \
+       DECLARE_INTERRUPT(110) \
+       DECLARE_INTERRUPT(111) \
+       DECLARE_INTERRUPT(112) \
+       DECLARE_INTERRUPT(113) \
+       DECLARE_INTERRUPT(114) \
+       DECLARE_INTERRUPT(115) \
+       DECLARE_INTERRUPT(116) \
+       DECLARE_INTERRUPT(117) \
+       DECLARE_INTERRUPT(118) \
+       DECLARE_INTERRUPT(119) \
+       DECLARE_INTERRUPT(120) \
+       DECLARE_INTERRUPT(121) \
+       DECLARE_INTERRUPT(122) \
+       DECLARE_INTERRUPT(123) \
+       DECLARE_INTERRUPT(124) \
+       DECLARE_INTERRUPT(125) \
+       DECLARE_INTERRUPT(126) \
+       DECLARE_INTERRUPT(127) \
+       DECLARE_INTERRUPT(128) \
+       DECLARE_INTERRUPT(129) \
+       DECLARE_INTERRUPT(130) \
+       DECLARE_INTERRUPT(131) \
+       DECLARE_INTERRUPT(132) \
+       DECLARE_INTERRUPT(133) \
+       DECLARE_INTERRUPT(134) \
+       DECLARE_INTERRUPT(135) \
+       DECLARE_INTERRUPT(136) \
+       DECLARE_INTERRUPT(137) \
+       DECLARE_INTERRUPT(138) \
+       DECLARE_INTERRUPT(139) \
+       DECLARE_INTERRUPT(140) \
+       DECLARE_INTERRUPT(141) \
+       DECLARE_INTERRUPT(142) \
+       DECLARE_INTERRUPT(143) \
+       DECLARE_INTERRUPT(144) \
+       DECLARE_INTERRUPT(145) \
+       DECLARE_INTERRUPT(146) \
+       DECLARE_INTERRUPT(147) \
+       DECLARE_INTERRUPT(148) \
+       DECLARE_INTERRUPT(149) \
+       DECLARE_INTERRUPT(150) \
+       DECLARE_INTERRUPT(151) \
+       DECLARE_INTERRUPT(152) \
+       DECLARE_INTERRUPT(153) \
+       DECLARE_INTERRUPT(154) \
+       DECLARE_INTERRUPT(155) \
+       DECLARE_INTERRUPT(156) \
+       DECLARE_INTERRUPT(157) \
+       DECLARE_INTERRUPT(158) \
+       DECLARE_INTERRUPT(159) \
+       DECLARE_INTERRUPT(160) \
+       DECLARE_INTERRUPT(161) \
+       DECLARE_INTERRUPT(162) \
+       DECLARE_INTERRUPT(163) \
+       DECLARE_INTERRUPT(164) \
+       DECLARE_INTERRUPT(165) \
+       DECLARE_INTERRUPT(166) \
+       DECLARE_INTERRUPT(167) \
+       DECLARE_INTERRUPT(168) \
+       DECLARE_INTERRUPT(169) \
+       DECLARE_INTERRUPT(170) \
+       DECLARE_INTERRUPT(171) \
+       DECLARE_INTERRUPT(172) \
+       DECLARE_INTERRUPT(173) \
+       DECLARE_INTERRUPT(174) \
+       DECLARE_INTERRUPT(175) \
+       DECLARE_INTERRUPT(176) \
+       DECLARE_INTERRUPT(177) \
+       DECLARE_INTERRUPT(178) \
+       DECLARE_INTERRUPT(179) \
+       DECLARE_INTERRUPT(180) \
+       DECLARE_INTERRUPT(181) \
+       DECLARE_INTERRUPT(182) \
+       DECLARE_INTERRUPT(183) \
+       DECLARE_INTERRUPT(184) \
+       DECLARE_INTERRUPT(185) \
+       DECLARE_INTERRUPT(186) \
+       DECLARE_INTERRUPT(187) \
+       DECLARE_INTERRUPT(188) \
+       DECLARE_INTERRUPT(189) \
+       DECLARE_INTERRUPT(190) \
+       DECLARE_INTERRUPT(191) \
+       DECLARE_INTERRUPT(192) \
+       DECLARE_INTERRUPT(193) \
+       DECLARE_INTERRUPT(194) \
+       DECLARE_INTERRUPT(195) \
+       DECLARE_INTERRUPT(196) \
+       DECLARE_INTERRUPT(197) \
+       DECLARE_INTERRUPT(198) \
+       DECLARE_INTERRUPT(199) \
+       DECLARE_INTERRUPT(200) \
+       DECLARE_INTERRUPT(201) \
+       DECLARE_INTERRUPT(202) \
+       DECLARE_INTERRUPT(203) \
+       DECLARE_INTERRUPT(204) \
+       DECLARE_INTERRUPT(205) \
+       DECLARE_INTERRUPT(206) \
+       DECLARE_INTERRUPT(207) \
+       DECLARE_INTERRUPT(208) \
+       DECLARE_INTERRUPT(209) \
+       DECLARE_INTERRUPT(210) \
+       DECLARE_INTERRUPT(211) \
+       DECLARE_INTERRUPT(212) \
+       DECLARE_INTERRUPT(213) \
+       DECLARE_INTERRUPT(214) \
+       DECLARE_INTERRUPT(215) \
+       DECLARE_INTERRUPT(216) \
+       DECLARE_INTERRUPT(217) \
+       DECLARE_INTERRUPT(218) \
+       DECLARE_INTERRUPT(219) \
+       DECLARE_INTERRUPT(220) \
+       DECLARE_INTERRUPT(221) \
+       DECLARE_INTERRUPT(222) \
+       DECLARE_INTERRUPT(223) \
+       DECLARE_INTERRUPT(224) \
+       DECLARE_INTERRUPT(225) \
+       DECLARE_INTERRUPT(226) \
+       DECLARE_INTERRUPT(227) \
+       DECLARE_INTERRUPT(228) \
+       DECLARE_INTERRUPT(229) \
+       DECLARE_INTERRUPT(230) \
+       DECLARE_INTERRUPT(231) \
+       DECLARE_INTERRUPT(232) \
+       DECLARE_INTERRUPT(233) \
+       DECLARE_INTERRUPT(234) \
+       DECLARE_INTERRUPT(235) \
+       DECLARE_INTERRUPT(236) \
+       DECLARE_INTERRUPT(237) \
+       DECLARE_INTERRUPT(238) \
+       DECLARE_INTERRUPT(239) \
+       DECLARE_INTERRUPT(240) \
+       DECLARE_INTERRUPT(241) \
+       DECLARE_INTERRUPT(242) \
+       DECLARE_INTERRUPT(243) \
+       DECLARE_INTERRUPT(244) \
+       DECLARE_INTERRUPT(245) \
+       DECLARE_INTERRUPT(246) \
+       DECLARE_INTERRUPT(247) \
+       DECLARE_INTERRUPT(248) \
+       DECLARE_INTERRUPT(249) \
+       DECLARE_INTERRUPT(250) \
+       DECLARE_INTERRUPT(251) \
+       DECLARE_INTERRUPT(252) \
+       DECLARE_INTERRUPT(253) \
+       DECLARE_INTERRUPT(254) \
+       DECLARE_INTERRUPT(255));
index 23de14bdd816f0126d182b4b2a8c90f6578983db..93b5b555c3014e68ff81bec4ed1eed7b2bc29e63 100644 (file)
@@ -35,6 +35,12 @@ void sc520_timer_isr(void)
 
 int timer_init(void)
 {
+       /* Register the SC520 specific timer interrupt handler */
+       register_timer_isr (sc520_timer_isr);
+
+       /* Install interrupt handler for GP Timer 1 */
+       irq_install_handler (0, timer_isr, NULL);
+
        /* Map GP Timer 1 to Master PIC IR0  */
        sc520_mmcr->gp_tmr_int_map[1] = 0x01;
 
@@ -54,11 +60,6 @@ int timer_init(void)
        sc520_mmcr->gptmr1maxcmpa = 100;
        sc520_mmcr->gptmr1ctl = 0xe009;
 
-       /* Register the SC520 specific timer interrupt handler */
-       register_timer_isr (sc520_timer_isr);
-
-       /* Install interrupt handler for GP Timer 1 */
-       irq_install_handler (0, timer_isr, NULL);
        unmask_irq (0);
 
        /* Clear the GP Timer 1 status register to get the show rolling*/
@@ -67,7 +68,7 @@ int timer_init(void)
        return 0;
 }
 
-void udelay(unsigned long usec)
+void __udelay(unsigned long usec)
 {
        int m = 0;
        long u;
index 59089ef59b67b948e61c9e9f2c9ae51c0ecb1e76..25d32e658e60206915ff33573386eb4bdb0548e2 100644 (file)
@@ -63,11 +63,8 @@ early_board_init_ret:
        jmp     mem_init
 mem_init_ret:
 
-       /* check ammount of configured memory
-        * (we need atleast bss start+bss size+stack size) */
-       movl    $_i386boot_bss_start, %ecx        /* BSS start */
-       addl    $_i386boot_bss_size, %ecx         /* BSS size */
-       addl    $CONFIG_SYS_STACK_SIZE, %ecx
+       /* Check we have enough memory for stack */
+       movl    $CONFIG_SYS_STACK_SIZE, %ecx
        cmpl    %ecx, %eax
        jae     mem_ok
 
@@ -78,6 +75,8 @@ mem_init_ret:
 .progress0a:
        jmp     die
 mem_ok:
+       /* Set stack pointer to upper memory limit*/
+       movl    %eax, %esp
 
        /* indicate progress */
        movw    $0x02, %ax
@@ -85,12 +84,7 @@ mem_ok:
        jmp     show_boot_progress_asm
 .progress1:
 
-       /* create a stack after the bss */
-       movl    $_i386boot_bss_start, %eax
-       addl    $_i386boot_bss_size, %eax
-       addl    $CONFIG_SYS_STACK_SIZE, %eax
-       movl    %eax, %esp
-
+       /* Test the stack */
        pushl   $0
        popl    %eax
        cmpl    $0, %eax
@@ -116,115 +110,19 @@ stack_ok:
        jmp     show_boot_progress_asm
 .progress2:
 
-       /* copy data section to ram, size must be 4-byte aligned */
-       movl    $_i386boot_romdata_dest, %edi     /* destination address */
-       movl    $_i386boot_romdata_start, %esi    /* source address */
-       movl    $_i386boot_romdata_size, %ecx     /* number of bytes to copy */
-       movl    %ecx, %eax
-       andl    $3, %eax
-       jnz     data_fail
-
-       shrl    $2, %ecx                          /* copy 4 byte each time */
-       cld
-       cmpl    $0, %ecx
-       je      data_ok
-data_segment:
-       movsl
-       loop    data_segment
-       jmp     data_ok
-data_fail:
-       /* indicate (lack of) progress */
-       movw    $0x83, %ax
-       movl    $.progress2a, %ebp
-       jmp     show_boot_progress_asm
-.progress2a:
-       jmp     die
-
-data_ok:
-
-       /* indicate progress */
-       movw    $0x04, %ax
-       movl    $.progress3, %ebp
-       jmp     show_boot_progress_asm
-.progress3:
-
-       /* clear bss section in ram, size must be 4-byte aligned  */
-       movl    $_i386boot_bss_start, %edi        /* MK_CHG BSS start */
-       movl    $_i386boot_bss_size, %ecx         /* BSS size */
-       movl    %ecx, %eax
-       andl    $3, %eax
-       jnz     bss_fail
-       shrl    $2, %ecx                          /* clear 4 byte each time */
-       cld
-       cmpl    $0, %ecx
-       je      bss_ok
-bss:
-       movl    $0, (%edi)
-       add     $4, %edi
-       loop    bss
-       jmp     bss_ok
-
-bss_fail:
-       /* indicate (lack of) progress */
-       movw    $0x84, %ax
-       movl    $.progress3a, %ebp
-       jmp     show_boot_progress_asm
-.progress3a:
-       jmp     die
-
-bss_ok:
-#ifndef CONFIG_SKIP_RELOCATE_UBOOT
-       /* indicate progress */
-       movw    $0x06, %ax
-       movl    $.progress6, %ebp
-       jmp     show_boot_progress_asm
-.progress6:
-
-       /* copy text section to ram, size must be 4-byte aligned */
-       movl    $CONFIG_SYS_BL_START_RAM, %edi          /* destination address */
-       movl    $TEXT_BASE, %esi                /* source address */
-       movl    $_i386boot_text_size, %ecx      /* number of bytes to copy */
-       movl    %ecx, %eax
-       andl    $3, %eax
-       jz      text_copy                       /* Already 4-byte aligned */
-       subl    $4, %eax                        /* Add extra bytes to size */
-       addl    %eax, %ecx
-text_copy:
-       shrl    $2, %ecx                        /* copy 4 byte each time */
-       cld
-       cmpl    $0, %ecx
-       je      text_ok
-text_segment:
-       movsl
-       loop    text_segment
-       jmp     text_ok
-text_fail:
-       /* indicate (lack of) progress */
-       movw    $0x86, %ax
-       movl    $.progress5a, %ebp
-       jmp     show_boot_progress_asm
-.progress5a:
-       jmp     die
-
-text_ok:
-#endif
        wbinvd
 
+       /* Get upper memory limit */
+       movl %esp, %ecx
+       subl $CONFIG_SYS_STACK_SIZE, %ecx
 
-       /* indicate progress */
-       movw    $0x05, %ax
-       movl    $.progress4, %ebp
-       jmp     show_boot_progress_asm
-.progress4:
-
-#ifndef CONFIG_SKIP_RELOCATE_UBOOT
-       /* Jump to the RAM copy of start_i386boot */
-       movl    $start_i386boot, %ebp
-       addl    $(CONFIG_SYS_BL_START_RAM - TEXT_BASE), %ebp
-       call    *%ebp           /* Enter, U-boot! */
-#else
-       call    start_i386boot  /* Enter, U-boot! */
-#endif
+       /* Create a Stack Frame */
+       pushl %ebp
+       movl %esp, %ebp
+
+       /* stack_limit parameter */
+       pushl   %ecx
+       call    board_init_f    /* Enter, U-boot! */
 
        /* indicate (lack of) progress */
        movw    $0x85, %ax
index 196ba5db2eaf760c750b1c4a8b0ac41ea18b1cf6..5ebce5338cb41bf1b1416e5aacec7d223fe8fb59 100644 (file)
@@ -505,8 +505,8 @@ reset_endless:
 /*
  * 0 <= r0 <= 2000
  */
-.globl udelay
-udelay:
+.globl __udelay
+__udelay:
        mov     r2,     #0x6800
        orr     r2, r2, #0x00db
        mul     r0, r2, r0
index 685614966b72de124151f12364dfc2ffa4c8b64f..edf341ff9f9b24dbac9fc7c4b19539b358900be8 100644 (file)
@@ -99,7 +99,7 @@ void ixp425_udelay(unsigned long usec)
        while (!(*IXP425_OSST & IXP425_OSST_TIMER_1_PEND));
 }
 
-void udelay (unsigned long usec)
+void __udelay (unsigned long usec)
 {
        while (usec--) ixp425_udelay(1);
 }
index f9b5be01042d84a6f4b3a01cf8ea4c25fa4a31ce..2691315d84f71c84dbed5a895b6b76770ff19e2e 100644 (file)
@@ -90,7 +90,7 @@ void set_timer (ulong t)
        timestamp = t;
 }
 
-void udelay (unsigned long usec)
+void __udelay (unsigned long usec)
 {
        ulong tmo,tmp;
 
index 67e81894af4a23dc0059a270fb7ecfe84bb58755..8dc010a3521aca6219a5a7d596ecfdda049a4167 100644 (file)
@@ -40,7 +40,7 @@ static ulong timestamp;
 #endif
 extern void dtimer_intr_setup(void);
 
-void udelay(unsigned long usec)
+void __udelay(unsigned long usec)
 {
        volatile slt_t *timerp = (slt_t *) (CONFIG_SYS_UDELAY_BASE);
        u32 now, freq;
index a0fc8f13887860c7bfa77ba68e7f9825edf4f1bc..b4c63e2a2a21f1de297dfcc4c73443d2f8588cb8 100644 (file)
@@ -58,7 +58,6 @@ SECTIONS
   .text      :
   {
     *(.text)
-    *(.fixup)
     *(.got1)
    } :text
     _etext = .;
index fa521f0415c12fe80f1782988a1cdf5fa05ee5e3..eed4534e5f50b146edd57ff27efddfa2c304ee11 100644 (file)
 
 #include <common.h>
 #include <command.h>
-#if !defined(CONFIG_440)
 #include <asm/4xx_pci.h>
-#endif
 #include <asm/processor.h>
+#include <asm/io.h>
 #include <pci.h>
 
 #ifdef CONFIG_PCI
 
 DECLARE_GLOBAL_DATA_PTR;
 
+#if defined(CONFIG_405GP) || defined(CONFIG_405EP)
+
+#if defined(CONFIG_PMC405)
+ushort pmc405_pci_subsys_deviceid(void);
+#endif
+
+/*#define DEBUG*/
+
 /*
  * Board-specific pci initialization
  * Platform code can reimplement pci_pre_init() if needed
  */
 int __pci_pre_init(struct pci_controller *hose)
 {
-#if defined (CONFIG_405EP)
+#if defined(CONFIG_405EP)
        /*
         * Enable the internal PCI arbiter by default.
         *
@@ -105,15 +112,8 @@ int __pci_pre_init(struct pci_controller *hose)
 
        return 1;
 }
-int pci_pre_init(struct pci_controller *hose) __attribute__((weak, alias("__pci_pre_init")));
-
-#if defined(CONFIG_405GP) || defined(CONFIG_405EP)
-
-#if defined(CONFIG_PMC405)
-ushort pmc405_pci_subsys_deviceid(void);
-#endif
-
-/*#define DEBUG*/
+int pci_pre_init(struct pci_controller *hose)
+       __attribute__((weak, alias("__pci_pre_init")));
 
 int __is_pci_host(struct pci_controller *hose)
 {
@@ -231,7 +231,7 @@ void pci_405gp_init(struct pci_controller *hose)
                pciauto_region_init(hose->pci_fb);
 
        /* Let board change/modify hose & do initial checks */
-       if (pci_pre_init (hose) == 0) {
+       if (pci_pre_init(hose) == 0) {
                printf("PCI: Board-specific initialization failed.\n");
                printf("PCI: Configuration aborted.\n");
                return;
@@ -478,6 +478,231 @@ void pci_init_board(void)
 
 static struct pci_controller ppc440_hose = {0};
 
+/*
+ * 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.
+ *
+ * Weak default implementation: "Normal" boards implement the PCI
+ * host functionality. This can be overridden for PCI adapter boards.
+ */
+int __is_pci_host(struct pci_controller *hose)
+{
+       return 1;
+}
+int is_pci_host(struct pci_controller *hose)
+       __attribute__((weak, alias("__is_pci_host")));
+
+#if defined(CONFIG_440EP) || defined(CONFIG_440EPX) || \
+    defined(CONFIG_440GR) || defined(CONFIG_440GRX)
+
+#if defined(CONFIG_SYS_PCI_TARGET_INIT)
+/*
+ * 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.
+ */
+void __pci_target_init(struct pci_controller *hose)
+{
+       /*
+        * Set up Direct MMIO registers
+        */
+
+       /*
+        * PowerPC440 EP PCI Master configuration.
+        * Map one 1Gig range of PLB/processor addresses to PCI memory space.
+        * PLB address 0xA0000000-0xDFFFFFFF ==> PCI address 0xA0000000-0xDFFFFFFF
+        * Use byte reversed out routines to handle endianess.
+        * Make this region non-prefetchable.
+        */
+       /* PMM0 Mask/Attribute - disabled b4 setting */
+       out_le32((void *)PCIL0_PMM0MA, 0x00000000);
+       /* PMM0 Local Address */
+       out_le32((void *)PCIL0_PMM0LA, CONFIG_SYS_PCI_MEMBASE);
+       /* PMM0 PCI Low Address */
+       out_le32((void *)PCIL0_PMM0PCILA, CONFIG_SYS_PCI_MEMBASE);
+       /* PMM0 PCI High Address */
+       out_le32((void *)PCIL0_PMM0PCIHA, 0x00000000);
+       /* 512M + No prefetching, and enable region */
+       out_le32((void *)PCIL0_PMM0MA, 0xE0000001);
+
+       /* PMM1 Mask/Attribute - disabled b4 setting */
+       out_le32((void *)PCIL0_PMM1MA, 0x00000000);
+       /* PMM1 Local Address */
+       out_le32((void *)PCIL0_PMM1LA, CONFIG_SYS_PCI_MEMBASE2);
+       /* PMM1 PCI Low Address */
+       out_le32((void *)PCIL0_PMM1PCILA, CONFIG_SYS_PCI_MEMBASE2);
+       /* PMM1 PCI High Address */
+       out_le32((void *)PCIL0_PMM1PCIHA, 0x00000000);
+       /* 512M + No prefetching, and enable region */
+       out_le32((void *)PCIL0_PMM1MA, 0xE0000001);
+
+       out_le32((void *)PCIL0_PTM1MS, 0x00000001); /* Memory Size/Attribute */
+       out_le32((void *)PCIL0_PTM1LA, 0);      /* Local Addr. Reg */
+       out_le32((void *)PCIL0_PTM2MS, 0);      /* Memory Size/Attribute */
+       out_le32((void *)PCIL0_PTM2LA, 0);      /* Local Addr. Reg */
+
+       /*
+        * Set up Configuration registers
+        */
+
+       /* Program the board's subsystem id/vendor id */
+       pci_write_config_word(0, PCI_SUBSYSTEM_VENDOR_ID,
+                             CONFIG_SYS_PCI_SUBSYS_VENDORID);
+       pci_write_config_word(0, PCI_SUBSYSTEM_ID, CONFIG_SYS_PCI_SUBSYS_ID);
+
+       /* Configure command register as bus master */
+       pci_write_config_word(0, PCI_COMMAND, PCI_COMMAND_MASTER);
+
+       /* 240nS PCI clock */
+       pci_write_config_word(0, PCI_LATENCY_TIMER, 1);
+
+       /* No error reporting */
+       pci_write_config_word(0, PCI_ERREN, 0);
+
+       pci_write_config_dword(0, PCI_BRDGOPT2, 0x00000101);
+}
+#endif /* CONFIG_SYS_PCI_TARGET_INIT */
+
+/*
+ * pci_pre_init
+ *
+ * This routine is called just prior to registering the hose and gives
+ * the board the opportunity to check things. Returning a value of zero
+ * indicates that things are bad & PCI initialization should be aborted.
+ *
+ * Different boards may wish to customize the pci controller structure
+ * (add regions, override default access routines, etc) or perform
+ * certain pre-initialization actions.
+ *
+ */
+int __pci_pre_init(struct pci_controller *hose)
+{
+       u32 reg;
+
+       /*
+        * Set priority for all PLB3 devices to 0.
+        * Set PLB3 arbiter to fair mode.
+        */
+       mfsdr(SD0_AMP1, reg);
+       mtsdr(SD0_AMP1, (reg & 0x000000FF) | 0x0000FF00);
+       reg = mfdcr(PLB3_ACR);
+       mtdcr(PLB3_ACR, reg | 0x80000000);
+
+       /*
+        * Set priority for all PLB4 devices to 0.
+        */
+       mfsdr(SD0_AMP0, reg);
+       mtsdr(SD0_AMP0, (reg & 0x000000FF) | 0x0000FF00);
+       reg = mfdcr(PLB4_ACR) | 0xa0000000;
+       mtdcr(PLB4_ACR, reg);
+
+       /*
+        * Set Nebula PLB4 arbiter to fair mode.
+        */
+       /* Segment0 */
+       reg = (mfdcr(PLB0_ACR) & ~PLB0_ACR_PPM_MASK) | PLB0_ACR_PPM_FAIR;
+       reg = (reg & ~PLB0_ACR_HBU_MASK) | PLB0_ACR_HBU_ENABLED;
+       reg = (reg & ~PLB0_ACR_RDP_MASK) | PLB0_ACR_RDP_4DEEP;
+       reg = (reg & ~PLB0_ACR_WRP_MASK) | PLB0_ACR_WRP_2DEEP;
+       mtdcr(PLB0_ACR, reg);
+
+       /* Segment1 */
+       reg = (mfdcr(PLB1_ACR) & ~PLB1_ACR_PPM_MASK) | PLB1_ACR_PPM_FAIR;
+       reg = (reg & ~PLB1_ACR_HBU_MASK) | PLB1_ACR_HBU_ENABLED;
+       reg = (reg & ~PLB1_ACR_RDP_MASK) | PLB1_ACR_RDP_4DEEP;
+       reg = (reg & ~PLB1_ACR_WRP_MASK) | PLB1_ACR_WRP_2DEEP;
+       mtdcr(PLB1_ACR, reg);
+
+#if defined(CONFIG_SYS_PCI_BOARD_FIXUP_IRQ)
+       hose->fixup_irq = board_pci_fixup_irq;
+#endif
+
+       return 1;
+}
+
+#else /* defined(CONFIG_440EP) ... */
+
+#if defined(CONFIG_SYS_PCI_TARGET_INIT)
+void __pci_target_init(struct pci_controller * hose)
+{
+       /*
+        * Disable everything
+        */
+       out_le32((void *)PCIL0_PIM0SA, 0); /* disable */
+       out_le32((void *)PCIL0_PIM1SA, 0); /* disable */
+       out_le32((void *)PCIL0_PIM2SA, 0); /* disable */
+       out_le32((void *)PCIL0_EROMBA, 0); /* disable expansion rom */
+
+       /*
+        * Map all of SDRAM to PCI address 0x0000_0000. Note that the 440
+        * strapping options do not support sizes such as 128/256 MB.
+        */
+       out_le32((void *)PCIL0_PIM0LAL, CONFIG_SYS_SDRAM_BASE);
+       out_le32((void *)PCIL0_PIM0LAH, 0);
+       out_le32((void *)PCIL0_PIM0SA, ~(gd->ram_size - 1) | 1);
+       out_le32((void *)PCIL0_BAR0, 0);
+
+       /*
+        * Program the board's subsystem id/vendor id
+        */
+       out_le16((void *)PCIL0_SBSYSVID, CONFIG_SYS_PCI_SUBSYS_VENDORID);
+       out_le16((void *)PCIL0_SBSYSID, CONFIG_SYS_PCI_SUBSYS_DEVICEID);
+
+       out_le16((void *)PCIL0_CMD, in_le16((void *)PCIL0_CMD) |
+                PCI_COMMAND_MEMORY);
+}
+#endif /* CONFIG_SYS_PCI_TARGET_INIT */
+
+int __pci_pre_init(struct pci_controller *hose)
+{
+       /*
+        * This board is always configured as the host & requires the
+        * PCI arbiter to be enabled.
+        */
+       if (!pci_arbiter_enabled()) {
+               printf("PCI: PCI Arbiter disabled!\n");
+               return 0;
+       }
+
+       return 1;
+}
+
+#endif /* defined(CONFIG_440EP) ... */
+
+#if defined(CONFIG_SYS_PCI_TARGET_INIT)
+void pci_target_init(struct pci_controller * hose)
+       __attribute__((weak, alias("__pci_target_init")));
+#endif /* CONFIG_SYS_PCI_TARGET_INIT */
+
+int pci_pre_init(struct pci_controller *hose)
+       __attribute__((weak, alias("__pci_pre_init")));
+
+#if defined(CONFIG_SYS_PCI_MASTER_INIT)
+void __pci_master_init(struct pci_controller *hose)
+{
+       u16 reg;
+
+       /*
+        * Write the PowerPC440 EP PCI Configuration regs.
+        * Enable PowerPC440 EP to be a master on the PCI bus (PMM).
+        * Enable PowerPC440 EP to act as a PCI memory target (PTM).
+        */
+       pci_read_config_word(0, PCI_COMMAND, &reg);
+       pci_write_config_word(0, PCI_COMMAND, reg |
+                             PCI_COMMAND_MASTER | PCI_COMMAND_MEMORY);
+}
+void pci_master_init(struct pci_controller *hose)
+       __attribute__((weak, alias("__pci_master_init")));
+#endif /* CONFIG_SYS_PCI_MASTER_INIT */
 
 int pci_440_init (struct pci_controller *hose)
 {
@@ -548,7 +773,7 @@ int pci_440_init (struct pci_controller *hose)
        pci_setup_indirect(hose, PCIL0_CFGADR, PCIL0_CFGDATA);
 
        /* Let board change/modify hose & do initial checks */
-       if (pci_pre_init (hose) == 0) {
+       if (pci_pre_init(hose) == 0) {
                printf("PCI: Board-specific initialization failed.\n");
                printf("PCI: Configuration aborted.\n");
                return -1;
index 19d2c7dd2f46affa43e2f64c98bf30a5c62b85d7..d9605c30b50992476eed6ea9d76aa29509c444ef 100644 (file)
@@ -48,6 +48,125 @@ enum {
        LNKW_X8                 = 0x8
 };
 
+static struct pci_controller pcie_hose[CONFIG_SYS_PCIE_NR_PORTS];
+
+/*
+ * Per default, all cards are present, so we need to check if the
+ * link comes up.
+ */
+int __board_pcie_card_present(int port)
+{
+       return 1;
+}
+int board_pcie_card_present(int port)
+       __attribute__((weak, alias("__board_pcie_card_present")));
+
+/*
+ * Some boards have runtime detection of the first and last PCIe
+ * slot used, so let's provide weak default functions for the
+ * common version.
+ */
+int __board_pcie_first(void)
+{
+       return 0;
+}
+int board_pcie_first(void)
+       __attribute__((weak, alias("__board_pcie_first")));
+
+int __board_pcie_last(void)
+{
+       return CONFIG_SYS_PCIE_NR_PORTS - 1;
+}
+int board_pcie_last(void)
+       __attribute__((weak, alias("__board_pcie_last")));
+
+void __board_pcie_setup_port(int port, int rootpoint)
+{
+       /* noting in this weak default implementation */
+}
+void board_pcie_setup_port(int port, int rootpoint)
+       __attribute__((weak, alias("__board_pcie_setup_port")));
+
+void pcie_setup_hoses(int busno)
+{
+       struct pci_controller *hose;
+       int i, bus;
+       int ret = 0;
+       char *env;
+       unsigned int delay;
+       int first = board_pcie_first();
+       int last = board_pcie_last();
+
+       /*
+        * Assume we're called after the PCI(X) hose(s) are initialized,
+        * which takes bus ID 0... and therefore start numbering PCIe's
+        * from the next number.
+        */
+       bus = busno;
+
+       for (i = first; i <= last; i++) {
+               /*
+                * Some boards (e.g. Katmai) can detects via hardware
+                * if a PCIe card is plugged, so let's check this.
+                */
+               if (!board_pcie_card_present(i))
+                       continue;
+
+               if (is_end_point(i)) {
+                       board_pcie_setup_port(i, 0);
+                       ret = ppc4xx_init_pcie_endport(i);
+               } else {
+                       board_pcie_setup_port(i, 1);
+                       ret = ppc4xx_init_pcie_rootport(i);
+               }
+               if (ret == -ENODEV)
+                       continue;
+               if (ret) {
+                       printf("PCIE%d: initialization as %s failed\n", i,
+                              is_end_point(i) ? "endpoint" : "root-complex");
+                       continue;
+               }
+
+               hose = &pcie_hose[i];
+               hose->first_busno = bus;
+               hose->last_busno = bus;
+               hose->current_busno = bus;
+
+               /* setup mem resource */
+               pci_set_region(hose->regions + 0,
+                              CONFIG_SYS_PCIE_MEMBASE + i * CONFIG_SYS_PCIE_MEMSIZE,
+                              CONFIG_SYS_PCIE_MEMBASE + i * CONFIG_SYS_PCIE_MEMSIZE,
+                              CONFIG_SYS_PCIE_MEMSIZE,
+                              PCI_REGION_MEM);
+               hose->region_count = 1;
+               pci_register_hose(hose);
+
+               if (is_end_point(i)) {
+                       ppc4xx_setup_pcie_endpoint(hose, i);
+                       /*
+                        * Reson for no scanning is endpoint can not generate
+                        * upstream configuration accesses.
+                        */
+               } else {
+                       ppc4xx_setup_pcie_rootpoint(hose, i);
+                       env = getenv ("pciscandelay");
+                       if (env != NULL) {
+                               delay = simple_strtoul(env, NULL, 10);
+                               if (delay > 5)
+                                       printf("Warning, expect noticable delay before "
+                                              "PCIe scan due to 'pciscandelay' value!\n");
+                               mdelay(delay * 1000);
+                       }
+
+                       /*
+                        * Config access can only go down stream
+                        */
+                       hose->last_busno = pci_hose_scan(hose);
+                       bus = hose->last_busno + 1;
+               }
+       }
+}
+
 static int validate_endpoint(struct pci_controller *hose)
 {
        if (hose->cfg_data == (u8 *)CONFIG_SYS_PCIE0_CFGBASE)
index d360d5beecee6ef914da32cc2e37f1d15ac1d9f6..ba57211dd064d664f353b99586b1db0475d25da6 100644 (file)
@@ -52,6 +52,12 @@ static int do_chip_config(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
        int cur_config_nr = -1;
        u8 cur_config[CONFIG_4xx_CONFIG_BLOCKSIZE];
 
+       /*
+        * First switch to correct I2C bus. This is I2C bus 0
+        * for all currently available 4xx derivats.
+        */
+       I2C_SET_BUS(0);
+
 #ifdef CONFIG_CMD_EEPROM
        ret = eeprom_read(CONFIG_4xx_CONFIG_I2C_EEPROM_ADDR,
                          CONFIG_4xx_CONFIG_I2C_EEPROM_OFFSET,
index 00ad39b602710096562a2ca615d8e0606b4b05cd..979004b7dbf43a4179ba12513dfec501725cfca4 100644 (file)
@@ -32,3 +32,6 @@ PLATFORM_CPPFLAGS += -Wa,-m440 -mcpu=440
 else
 PLATFORM_CPPFLAGS += -Wa,-m405 -mcpu=405
 endif
+
+# Use default linker script.  Board port can override in board/*/config.mk
+LDSCRIPT := $(SRCTREE)/cpu/ppc4xx/u-boot.lds
index e1b00a74c7a63736f2ceaf14cbcc2b7e5bba8370..73d4d06afc3d6c4b79e290f05c4bb6bc157efbff 100644 (file)
@@ -81,7 +81,7 @@ static int pci_async_enabled(void)
 
 #if defined(CONFIG_PCI) && !defined(CONFIG_IOP480) && \
     !defined(CONFIG_405) && !defined(CONFIG_405EX)
-static int pci_arbiter_enabled(void)
+int pci_arbiter_enabled(void)
 {
 #if defined(CONFIG_405GP)
        return (mfdcr(CPC0_PSR) & PSR_PCI_ARBIT_EN);
index e3e1bab64f5473ad8fe71d1cd9fb08bd7352581f..7976e75e0ba2d01e533c2947e20af9ee9ef54054 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * (C) Copyright 2007
+ * (C) Copyright 2007-2009
  * Stefan Roese, DENX Software Engineering, sr@denx.de.
  *
  * based on work by Anne Sophie Harnois <anne-sophie.harnois@nextream.fr>
@@ -37,7 +37,8 @@
 DECLARE_GLOBAL_DATA_PTR;
 
 #if defined(CONFIG_I2C_MULTI_BUS)
-/* Initialize the bus pointer to whatever one the SPD EEPROM is on.
+/*
+ * Initialize the bus pointer to whatever one the SPD EEPROM is on.
  * Default is bus 0.  This is necessary because the DDR initialization
  * runs from ROM, and we can't switch buses because we can't modify
  * the global variables.
@@ -45,59 +46,63 @@ DECLARE_GLOBAL_DATA_PTR;
 #ifndef CONFIG_SYS_SPD_BUS_NUM
 #define CONFIG_SYS_SPD_BUS_NUM 0
 #endif
-static unsigned int i2c_bus_num __attribute__ ((section (".data"))) = CONFIG_SYS_SPD_BUS_NUM;
+static unsigned int i2c_bus_num __attribute__ ((section (".data"))) =
+       CONFIG_SYS_SPD_BUS_NUM;
 #endif /* CONFIG_I2C_MULTI_BUS */
 
 static void _i2c_bus_reset(void)
 {
+       struct ppc4xx_i2c *i2c = (struct ppc4xx_i2c *)I2C_BASE_ADDR;
        int i;
        u8 dc;
 
        /* Reset status register */
        /* write 1 in SCMP and IRQA to clear these fields */
-       out_8((u8 *)IIC_STS, 0x0A);
+       out_8(&i2c->sts, 0x0A);
 
        /* write 1 in IRQP IRQD LA ICT XFRA to clear these fields */
-       out_8((u8 *)IIC_EXTSTS, 0x8F);
+       out_8(&i2c->extsts, 0x8F);
 
        /* Place chip in the reset state */
-       out_8((u8 *)IIC_XTCNTLSS, IIC_XTCNTLSS_SRST);
+       out_8(&i2c->xtcntlss, IIC_XTCNTLSS_SRST);
 
        /* Check if bus is free */
-       dc = in_8((u8 *)IIC_DIRECTCNTL);
+       dc = in_8(&i2c->directcntl);
        if (!DIRCTNL_FREE(dc)){
                /* Try to set bus free state */
-               out_8((u8 *)IIC_DIRECTCNTL, IIC_DIRCNTL_SDAC | IIC_DIRCNTL_SCC);
+               out_8(&i2c->directcntl, IIC_DIRCNTL_SDAC | IIC_DIRCNTL_SCC);
 
                /* Wait until we regain bus control */
                for (i = 0; i < 100; ++i) {
-                       dc = in_8((u8 *)IIC_DIRECTCNTL);
+                       dc = in_8(&i2c->directcntl);
                        if (DIRCTNL_FREE(dc))
                                break;
 
                        /* Toggle SCL line */
                        dc ^= IIC_DIRCNTL_SCC;
-                       out_8((u8 *)IIC_DIRECTCNTL, dc);
+                       out_8(&i2c->directcntl, dc);
                        udelay(10);
                        dc ^= IIC_DIRCNTL_SCC;
-                       out_8((u8 *)IIC_DIRECTCNTL, dc);
+                       out_8(&i2c->directcntl, dc);
                }
        }
 
        /* Remove reset */
-       out_8((u8 *)IIC_XTCNTLSS, 0);
+       out_8(&i2c->xtcntlss, 0);
 }
 
-void i2c_init(int speed, int slaveadd)
+void i2c_init(int speed, int slaveaddr)
 {
-       unsigned long freqOPB;
+       struct ppc4xx_i2c *i2c = (struct ppc4xx_i2c *)I2C_BASE_ADDR;
        int val, divisor;
        int bus;
 
 #ifdef CONFIG_SYS_I2C_INIT_BOARD
-       /* call board specific i2c bus reset routine before accessing the   */
-       /* environment, which might be in a chip on that bus. For details   */
-       /* about this problem see doc/I2C_Edge_Conditions.                  */
+       /*
+        * Call board specific i2c bus reset routine before accessing the
+        * environment, which might be in a chip on that bus. For details
+        * about this problem see doc/I2C_Edge_Conditions.
+        */
        i2c_init_board();
 #endif
 
@@ -109,54 +114,52 @@ void i2c_init(int speed, int slaveadd)
                _i2c_bus_reset();
 
                /* clear lo master address */
-               out_8((u8 *)IIC_LMADR, 0);
+               out_8(&i2c->lmadr, 0);
 
                /* clear hi master address */
-               out_8((u8 *)IIC_HMADR, 0);
+               out_8(&i2c->hmadr, 0);
 
                /* clear lo slave address */
-               out_8((u8 *)IIC_LSADR, 0);
+               out_8(&i2c->lsadr, 0);
 
                /* clear hi slave address */
-               out_8((u8 *)IIC_HSADR, 0);
+               out_8(&i2c->hsadr, 0);
 
                /* Clock divide Register */
-               /* get OPB frequency */
-               freqOPB = get_OPB_freq();
-               /* set divisor according to freqOPB */
-               divisor = (freqOPB - 1) / 10000000;
+               /* set divisor according to freq_opb */
+               divisor = (get_OPB_freq() - 1) / 10000000;
                if (divisor == 0)
                        divisor = 1;
-               out_8((u8 *)IIC_CLKDIV, divisor);
+               out_8(&i2c->clkdiv, divisor);
 
                /* no interrupts */
-               out_8((u8 *)IIC_INTRMSK, 0);
+               out_8(&i2c->intrmsk, 0);
 
                /* clear transfer count */
-               out_8((u8 *)IIC_XFRCNT, 0);
+               out_8(&i2c->xfrcnt, 0);
 
                /* clear extended control & stat */
                /* write 1 in SRC SRS SWC SWS to clear these fields */
-               out_8((u8 *)IIC_XTCNTLSS, 0xF0);
+               out_8(&i2c->xtcntlss, 0xF0);
 
                /* Mode Control Register
                   Flush Slave/Master data buffer */
-               out_8((u8 *)IIC_MDCNTL, IIC_MDCNTL_FSDB | IIC_MDCNTL_FMDB);
+               out_8(&i2c->mdcntl, IIC_MDCNTL_FSDB | IIC_MDCNTL_FMDB);
 
-               val = in_8((u8 *)IIC_MDCNTL);
+               val = in_8(&i2c->mdcntl);
 
                /* Ignore General Call, slave transfers are ignored,
                 * disable interrupts, exit unknown bus state, enable hold
                 * SCL 100kHz normaly or FastMode for 400kHz and above
                 */
 
-               val |= IIC_MDCNTL_EUBS|IIC_MDCNTL_HSCL;
+               val |= IIC_MDCNTL_EUBS | IIC_MDCNTL_HSCL;
                if (speed >= 400000)
                        val |= IIC_MDCNTL_FSM;
-               out_8((u8 *)IIC_MDCNTL, val);
+               out_8(&i2c->mdcntl, val);
 
                /* clear control reg */
-               out_8((u8 *)IIC_CNTL, 0x00);
+               out_8(&i2c->cntl, 0x00);
        }
 
        /* set to SPD bus as default bus upon powerup */
@@ -195,13 +198,14 @@ static int i2c_transfer(unsigned char cmd_type,
                        unsigned char data[],
                        unsigned short data_len)
 {
-       unsigned char* ptr;
+       struct ppc4xx_i2c *i2c = (struct ppc4xx_i2c *)I2C_BASE_ADDR;
+       u8 *ptr;
        int reading;
-       int tran,cnt;
+       int tran, cnt;
        int result;
        int status;
        int i;
-       uchar creg;
+       u8 creg;
 
        if (data == 0 || data_len == 0) {
                /* Don't support data transfer of no length or to address 0 */
@@ -219,12 +223,13 @@ static int i2c_transfer(unsigned char cmd_type,
        }
 
        /* Clear Stop Complete Bit */
-       out_8((u8 *)IIC_STS, IIC_STS_SCMP);
+       out_8(&i2c->sts, IIC_STS_SCMP);
+
        /* Check init */
        i = 10;
        do {
                /* Get status */
-               status = in_8((u8 *)IIC_STS);
+               status = in_8(&i2c->sts);
                i--;
        } while ((status & IIC_STS_PT) && (i > 0));
 
@@ -232,13 +237,16 @@ static int i2c_transfer(unsigned char cmd_type,
                result = IIC_NOK_TOUT;
                return(result);
        }
+
        /* flush the Master/Slave Databuffers */
-       out_8((u8 *)IIC_MDCNTL, ((in_8((u8 *)IIC_MDCNTL))|IIC_MDCNTL_FMDB|IIC_MDCNTL_FSDB));
+       out_8(&i2c->mdcntl, in_8(&i2c->mdcntl) |
+             IIC_MDCNTL_FMDB | IIC_MDCNTL_FSDB);
+
        /* need to wait 4 OPB clocks? code below should take that long */
 
        /* 7-bit adressing */
-       out_8((u8 *)IIC_HMADR, 0);
-       out_8((u8 *)IIC_LMADR, chip);
+       out_8(&i2c->hmadr, 0);
+       out_8(&i2c->lmadr, chip);
 
        tran = 0;
        result = IIC_OK;
@@ -247,9 +255,10 @@ static int i2c_transfer(unsigned char cmd_type,
        while (tran != cnt && (result == IIC_OK)) {
                int  bc,j;
 
-               /* Control register =
-                * Normal transfer, 7-bits adressing, Transfer up to bc bytes, Normal start,
-                * Transfer is a sequence of transfers
+               /*
+                * Control register =
+                * Normal transfer, 7-bits adressing, Transfer up to
+                * bc bytes, Normal start, Transfer is a sequence of transfers
                 */
                creg |= IIC_CNTL_PT;
 
@@ -259,32 +268,36 @@ static int i2c_transfer(unsigned char cmd_type,
                if ((!cmd_type && (ptr == addr)) || ((tran + bc) != cnt))
                        creg |= IIC_CNTL_CHT;
 
-               if (reading)
+               if (reading) {
                        creg |= IIC_CNTL_READ;
-               else
-                       for(j=0; j < bc; j++)
+               } else {
+                       for(j = 0; j < bc; j++) {
                                /* Set buffer */
-                               out_8((u8 *)IIC_MDBUF, ptr[tran+j]);
-               out_8((u8 *)IIC_CNTL, creg);
+                               out_8(&i2c->mdbuf, ptr[tran + j]);
+                       }
+               }
+               out_8(&i2c->cntl, creg);
 
-               /* Transfer is in progress
+               /*
+                * Transfer is in progress
                 * we have to wait for upto 5 bytes of data
                 * 1 byte chip address+r/w bit then bc bytes
                 * of data.
                 * udelay(10) is 1 bit time at 100khz
                 * Doubled for slop. 20 is too small.
                 */
-               i = 2*5*8;
+               i = 2 * 5 * 8;
                do {
                        /* Get status */
-                       status = in_8((u8 *)IIC_STS);
+                       status = in_8(&i2c->sts);
                        udelay(10);
                        i--;
-               } while ((status & IIC_STS_PT) && !(status & IIC_STS_ERR) && (i > 0));
+               } while ((status & IIC_STS_PT) && !(status & IIC_STS_ERR) &&
+                        (i > 0));
 
                if (status & IIC_STS_ERR) {
                        result = IIC_NOK;
-                       status = in_8((u8 *)IIC_EXTSTS);
+                       status = in_8(&i2c->extsts);
                        /* Lost arbitration? */
                        if (status & IIC_EXTSTS_LA)
                                result = IIC_NOK_LA;
@@ -297,19 +310,21 @@ static int i2c_transfer(unsigned char cmd_type,
                } else if ( status & IIC_STS_PT) {
                        result = IIC_NOK_TOUT;
                }
+
                /* Command is reading => get buffer */
                if ((reading) && (result == IIC_OK)) {
                        /* Are there data in buffer */
                        if (status & IIC_STS_MDBS) {
                                /*
-                                * even if we have data we have to wait 4OPB clocks
-                                * for it to hit the front of the FIFO, after that
-                                * we can just read. We should check XFCNT here and
-                                * if the FIFO is full there is no need to wait.
+                                * even if we have data we have to wait 4OPB
+                                * clocks for it to hit the front of the FIFO,
+                                * after that we can just read. We should check
+                                * XFCNT here and if the FIFO is full there is
+                                * no need to wait.
                                 */
                                udelay(1);
-                               for (j=0; j<bc; j++)
-                                       ptr[tran+j] = in_8((u8 *)IIC_MDBUF);
+                               for (j = 0; j < bc; j++)
+                                       ptr[tran + j] = in_8(&i2c->mdbuf);
                        } else
                                result = IIC_NOK_DATA;
                }
@@ -324,7 +339,7 @@ static int i2c_transfer(unsigned char cmd_type,
                                creg = IIC_CNTL_RPST;
                }
        }
-       return (result);
+       return result;
 }
 
 int i2c_probe(uchar chip)
@@ -338,17 +353,17 @@ int i2c_probe(uchar chip)
         * address was <ACK>ed (i.e. there was a chip at that address which
         * drove the data line low).
         */
-       return (i2c_transfer(1, chip << 1, 0,0, buf, 1) != 0);
+       return (i2c_transfer(1, chip << 1, 0, 0, buf, 1) != 0);
 }
 
-
-int i2c_read(uchar chip, uint addr, int alen, uchar * buffer, int len)
+static int ppc4xx_i2c_transfer(uchar chip, uint addr, int alen, uchar *buffer,
+                              int len, int read)
 {
        uchar xaddr[4];
        int ret;
 
        if (alen > 4) {
-               printf ("I2C read: addr len %d not supported\n", alen);
+               printf("I2C: addr len %d not supported\n", alen);
                return 1;
        }
 
@@ -373,50 +388,30 @@ int i2c_read(uchar chip, uint addr, int alen, uchar * buffer, int len)
         * hidden in the chip address.
         */
        if (alen > 0)
-               chip |= ((addr >> (alen * 8)) & CONFIG_SYS_I2C_EEPROM_ADDR_OVERFLOW);
+               chip |= ((addr >> (alen * 8)) &
+                        CONFIG_SYS_I2C_EEPROM_ADDR_OVERFLOW);
 #endif
-       if ((ret = i2c_transfer(1, chip<<1, &xaddr[4-alen], alen, buffer, len)) != 0) {
-               if (gd->have_console)
-                       printf( "I2c read: failed %d\n", ret);
+       if ((ret = i2c_transfer(read, chip << 1, &xaddr[4 - alen], alen,
+                               buffer, len)) != 0) {
+               if (gd->have_console) {
+                       printf("I2C %s: failed %d\n",
+                              read ? "read" : "write", ret);
+               }
+
                return 1;
        }
+
        return 0;
 }
 
-int i2c_write(uchar chip, uint addr, int alen, uchar * buffer, int len)
+int i2c_read(uchar chip, uint addr, int alen, uchar * buffer, int len)
 {
-       uchar xaddr[4];
-
-       if (alen > 4) {
-               printf ("I2C write: addr len %d not supported\n", alen);
-               return 1;
-
-       }
-
-       if (alen > 0) {
-               xaddr[0] = (addr >> 24) & 0xFF;
-               xaddr[1] = (addr >> 16) & 0xFF;
-               xaddr[2] = (addr >> 8) & 0xFF;
-               xaddr[3] = addr & 0xFF;
-       }
-
-#ifdef CONFIG_SYS_I2C_EEPROM_ADDR_OVERFLOW
-       /*
-        * EEPROM chips that implement "address overflow" are ones
-        * like Catalyst 24WC04/08/16 which has 9/10/11 bits of
-        * address and the extra bits end up in the "chip address"
-        * bit slots. This makes a 24WC08 (1Kbyte) chip look like
-        * four 256 byte chips.
-        *
-        * Note that we consider the length of the address field to
-        * still be one byte because the extra address bits are
-        * hidden in the chip address.
-        */
-       if (alen > 0)
-               chip |= ((addr >> (alen * 8)) & CONFIG_SYS_I2C_EEPROM_ADDR_OVERFLOW);
-#endif
+       return ppc4xx_i2c_transfer(chip, addr, alen, buffer, len, 1);
+}
 
-       return (i2c_transfer(0, chip<<1, &xaddr[4-alen], alen, buffer, len ) != 0);
+int i2c_write(uchar chip, uint addr, int alen, uchar * buffer, int len)
+{
+       return ppc4xx_i2c_transfer(chip, addr, alen, buffer, len, 0);
 }
 
 #if defined(CONFIG_I2C_MULTI_BUS)
similarity index 71%
rename from board/pcs440ep/u-boot.lds
rename to cpu/ppc4xx/u-boot.lds
index 2f6109117debd2a1a6dcd0cc506dbebcb789fc8a..2b47934a2ef99b9ad0b5f3026d6414591f9b2aa7 100644 (file)
@@ -1,6 +1,5 @@
 /*
- * (C) Copyright 2006
- * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
+ * Copyright 2007-2009 Freescale Semiconductor, Inc.
  *
  * See file CREDITS for list of people who contributed to this
  * project.
  * MA 02111-1307 USA
  */
 
+#include "config.h"    /* CONFIG_BOARDDIR */
+
+#ifndef RESET_VECTOR_ADDRESS
+#define RESET_VECTOR_ADDRESS   0xfffffffc
+#endif
+
 OUTPUT_ARCH(powerpc)
 /* Do we need any of these for elf?
    __DYNAMIC = 0;    */
-SECTIONS
+PHDRS
 {
-  .resetvec 0xFFFFFFFC :
-  {
-    *(.resetvec)
-  } = 0xffff
-
-  .bootpg 0xFFFFF000 :
-  {
-    cpu/ppc4xx/start.o (.bootpg)
-  } = 0xffff
+  text PT_LOAD;
+  bss PT_LOAD;
+}
 
+SECTIONS
+{
   /* Read-only sections, merged into text segment: */
   . = + SIZEOF_HEADERS;
   .interp : { *(.interp) }
@@ -62,20 +63,16 @@ SECTIONS
   .plt : { *(.plt) }
   .text      :
   {
-    cpu/ppc4xx/start.o (.text)
-    board/pcs440ep/init.o      (.text)
-    lib_generic/sha1.o         (.text)
-
     *(.text)
     *(.got1)
-  }
-  _etext = .;
-  PROVIDE (etext = .);
-  .rodata    :
-  {
+   } :text
+    _etext = .;
+    PROVIDE (etext = .);
+    .rodata    :
+   {
     *(.eh_frame)
     *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
-  }
+  } :text
   .fini      : { *(.fini)    } =0
   .ctors     : { *(.ctors)   }
   .dtors     : { *(.dtors)   }
@@ -124,6 +121,39 @@ SECTIONS
   . = ALIGN(256);
   __init_end = .;
 
+#ifdef CONFIG_440
+  .bootpg RESET_VECTOR_ADDRESS - 0xffc :
+  {
+    cpu/ppc4xx/start.o (.bootpg)
+
+    /*
+     * PPC440 board need a board specific object with the
+     * TLB definitions. This needs to get included right after
+     * start.o, since the first shadow TLB only covers 4k
+     * of address space.
+     */
+    CONFIG_BOARDDIR/init.o     (.bootpg)
+  } :text = 0xffff
+#endif
+
+  .resetvec RESET_VECTOR_ADDRESS :
+  {
+    *(.resetvec)
+  } :text = 0xffff
+
+  . = RESET_VECTOR_ADDRESS + 0x4;
+
+  /*
+   * Make sure that the bss segment isn't linked at 0x0, otherwise its
+   * address won't be updated during relocation fixups.  Note that
+   * this is a temporary fix.  Code to dynamically the fixup the bss
+   * location will be added in the future.  When the bss relocation
+   * fixup code is present this workaround should be removed.
+   */
+#if (RESET_VECTOR_ADDRESS == 0xfffffffc)
+  . |= 0x10;
+#endif
+
   __bss_start = .;
   .bss (NOLOAD)       :
   {
@@ -131,9 +161,9 @@ SECTIONS
    *(.dynbss)
    *(.bss)
    *(COMMON)
-   . = ALIGN(4);
-  }
+  } :bss
 
+  . = ALIGN(4);
   _end = . ;
   PROVIDE (end = .);
 }
index e2df3a57fcbabb90b07ed3a0d6aac60ee3c65a3f..8d0f82679b0a12707ce428d2a9a2bde13e1211a2 100644 (file)
@@ -78,7 +78,7 @@ void set_timer (ulong t)
        /* nop */
 }
 
-void udelay (unsigned long usec)
+void __udelay (unsigned long usec)
 {
        udelay_masked (usec);
 }
index 34184abb735b81891264aa57ce9265f6e31aa4ba..6f1d8f677afbdf849860ba1ee7bed935421ba10b 100644 (file)
@@ -75,7 +75,7 @@ void set_timer (ulong t)
        timestamp = t;
 }
 
-void udelay (unsigned long usec)
+void __udelay (unsigned long usec)
 {
        ulong tmo;
 
index 3f77e815cb61729e05851b1a449e4867c46f0800..020750125af3929c6d94547a0a8832eae685db24 100644 (file)
@@ -49,7 +49,7 @@ void set_timer (ulong t)
        /* nop */
 }
 
-void udelay (unsigned long usec)
+void __udelay (unsigned long usec)
 {
        udelay_masked (usec);
 }
diff --git a/doc/README.davinci b/doc/README.davinci
new file mode 100644 (file)
index 0000000..506f0d4
--- /dev/null
@@ -0,0 +1,116 @@
+Summary
+=======
+
+This README is about U-Boot support for TI's ARM 926EJS based family of SoCs.
+These SOCs are used for cameras, video security and surveillance, DVR's, etc.
+DaVinci SOC's comprise of DM644x, DM646x, DM35x and DM36x series of SOC's
+Additionally there are some SOCs meant for the audio market which though have
+an OMAP part number are very similar to the DaVinci series of SOC's
+Additionally, some family members contain a TI DSP and/or graphics
+co processors along with a host of other peripherals.
+
+Currently the following boards are supported:
+
+* TI DaVinci DM644x EVM
+
+* TI DaVinci DM646x EVM
+
+* TI DaVinci DM355 EVM
+
+* TI DaVinci DM365 EVM
+
+* TI DA830 EVM
+
+* DM355 based Leopard board
+
+* DM644x based schmoogie board
+
+* DM644x based sffsdr board
+
+* DM644x based sonata board
+
+Build
+=====
+
+* TI DaVinci DM644x EVM:
+
+make davinci_dvevm_config
+make
+
+* TI DaVinci DM646x EVM:
+
+make davinci_dm6467evm_config
+make
+
+* TI DaVinci DM355 EVM:
+
+make davinci_dm355evm_config
+make
+
+* TI DaVinci DM365 EVM:
+
+make davinci_dm365evm_config
+make
+
+* TI DA830 EVM:
+
+make da830evm_config
+make
+
+* DM355 based Leopard board:
+
+make davinci_dm355leopard_config
+make
+
+* DM644x based schmoogie board:
+
+make davinci_schmoogie_config
+make
+
+* DM644x based sffsdr board:
+
+make davinci_sffsdr_config
+make
+
+* DM644x based sonata board:
+
+make davinci_sonata_config
+make
+
+Bootloaders
+===============
+
+The DaVinci SOC's use 2 bootloaders. The low level initialization
+is done by a UBL(user boot loader). The UBL is written to a NAND/NOR/SPI flash
+by a programmer. During initial bootup, the ROM Bootloader reads the UBL
+from a storage device and loads it into the IRAM. The UBL then loads the U-Boot
+into the RAM.
+The programmers and UBL are always released as part of any standard TI
+software release associated with an SOC.
+
+Links
+=====
+
+1) TI DaVinci DM355 EVM:
+http://focus.ti.com/docs/prod/folders/print/tms320dm355.html
+http://www.spectrumdigital.com/product_info.php?cPath=103&products_id=203&osCsid=c499af6087317f11b3da19b4e8f1af32
+
+2) TI DaVinci DM365 EVM:
+http://focus.ti.com/docs/prod/folders/print/tms320dm365.html?247SEM=
+http://support.spectrumdigital.com/boards/evmdm365/revc/
+
+3) DaVinci DM355 based leopard board
+http://designsomething.org/leopardboard/default.aspx
+http://www.spectrumdigital.com/product_info.php?cPath=103&products_id=192&osCsid=67c20335668ffc57cb35727106eb24b1
+
+4) TI DaVinci DM6467 EVM:
+http://focus.ti.com/docs/prod/folders/print/tms320dm6467.html
+http://support.spectrumdigital.com/boards/evmdm6467/revf/
+
+5) TI DaVinci DM6446 EVM:
+http://focus.ti.com/docs/prod/folders/print/tms320dm6446.html
+http://www.spectrumdigital.com/product_info.php?cPath=103&products_id=222
+
+6) TI DA830 EVM
+http://focus.ti.com/apps/docs/gencontent.tsp?appId=1&contentId=52385
+http://www.spectrumdigital.com/product_info.php?cPath=37&products_id=214
index 4a12976e376fac5b90809cba20e1f03fe96f389b..b860e89f81b9b977991d41c6081b1fbdc9ac95e1 100644 (file)
@@ -33,6 +33,7 @@ COBJS-$(CONFIG_I2C_MXC) += mxc_i2c.o
 COBJS-$(CONFIG_DRIVER_OMAP1510_I2C) += omap1510_i2c.o
 COBJS-$(CONFIG_DRIVER_OMAP24XX_I2C) += omap24xx_i2c.o
 COBJS-$(CONFIG_DRIVER_OMAP34XX_I2C) += omap24xx_i2c.o
+COBJS-$(CONFIG_PCA9564_I2C) += pca9564_i2c.o
 COBJS-$(CONFIG_DRIVER_S3C24X0_I2C) += s3c24x0_i2c.o
 COBJS-$(CONFIG_S3C44B0_I2C) += s3c44b0_i2c.o
 COBJS-$(CONFIG_SOFT_I2C) += soft_i2c.o
index e7906340799b9072553ff6d15ac9c53526e5dbf0..73a78d2237d99793b7fe3114ccc512022022ad2a 100644 (file)
@@ -26,6 +26,7 @@
 
 #ifdef TWI0_CLKDIV
 #define bfin_write_TWI_CLKDIV(val)           bfin_write_TWI0_CLKDIV(val)
+#define bfin_read_TWI_CLKDIV(val)            bfin_read_TWI0_CLKDIV(val)
 #define bfin_write_TWI_CONTROL(val)          bfin_write_TWI0_CONTROL(val)
 #define bfin_read_TWI_CONTROL(val)           bfin_read_TWI0_CONTROL(val)
 #define bfin_write_TWI_MASTER_ADDR(val)      bfin_write_TWI0_MASTER_ADDR(val)
 #ifdef CONFIG_TWICLK_KHZ
 # error do not define CONFIG_TWICLK_KHZ ... use CONFIG_SYS_I2C_SPEED
 #endif
-#if CONFIG_SYS_I2C_SPEED > 400000
-# error The Blackfin I2C hardware can only operate at 400KHz max
+
+/*
+ * The way speed is changed into duty often results in integer truncation
+ * with 50% duty, so we'll force rounding up to the next duty by adding 1
+ * to the max.  In practice this will get us a speed of something like
+ * 385 KHz.  The other limit is easy to handle as it is only 8 bits.
+ */
+#define I2C_SPEED_MAX             400000
+#define I2C_SPEED_TO_DUTY(speed)  (5000000 / (speed))
+#define I2C_DUTY_MAX              (I2C_SPEED_TO_DUTY(I2C_SPEED_MAX) + 1)
+#define I2C_DUTY_MIN              0xff /* 8 bit limited */
+#define SYS_I2C_DUTY              I2C_SPEED_TO_DUTY(CONFIG_SYS_I2C_SPEED)
+/* Note: duty is inverse of speed, so the comparisons below are correct */
+#if SYS_I2C_DUTY < I2C_DUTY_MAX || SYS_I2C_DUTY > I2C_DUTY_MIN
+# error "The Blackfin I2C hardware can only operate 20KHz - 400KHz"
 #endif
 
 /* All transfers are described by this data structure */
@@ -60,6 +74,9 @@ struct i2c_msg {
        u8 *abuf;               /* addr buffer */
 };
 
+/* Allow msec timeout per ~byte transfer */
+#define I2C_TIMEOUT 10
+
 /**
  * wait_for_completion - manage the actual i2c transfer
  *     @msg: the i2c msg
@@ -67,8 +84,9 @@ struct i2c_msg {
 static int wait_for_completion(struct i2c_msg *msg)
 {
        uint16_t int_stat;
+       ulong timebase = get_timer(0);
 
-       while (!ctrlc()) {
+       do {
                int_stat = bfin_read_TWI_INT_STAT();
 
                if (int_stat & XMTSERV) {
@@ -103,7 +121,7 @@ static int wait_for_completion(struct i2c_msg *msg)
                        debugi("processing MERR");
                        bfin_write_TWI_INT_STAT(MERR);
                        SSYNC();
-                       break;
+                       return msg->len;
                }
                if (int_stat & MCOMP) {
                        debugi("processing MCOMP");
@@ -116,7 +134,12 @@ static int wait_for_completion(struct i2c_msg *msg)
                        } else
                                break;
                }
-       }
+
+               /* If we were able to do something, reset timeout */
+               if (int_stat)
+                       timebase = get_timer(0);
+
+       } while (get_timer(timebase) < I2C_TIMEOUT);
 
        return msg->len;
 }
@@ -204,7 +227,36 @@ static int i2c_transfer(uchar chip, uint addr, int alen, uchar *buffer, int len,
        return ret;
 }
 
-/*
+/**
+ * i2c_set_bus_speed - set i2c bus speed
+ *     @speed: bus speed (in HZ)
+ */
+int i2c_set_bus_speed(unsigned int speed)
+{
+       u16 clkdiv = I2C_SPEED_TO_DUTY(speed);
+
+       /* Set TWI interface clock */
+       if (clkdiv < I2C_DUTY_MAX || clkdiv > I2C_DUTY_MIN)
+               return -1;
+       bfin_write_TWI_CLKDIV((clkdiv << 8) | (clkdiv & 0xff));
+
+       /* Don't turn it on */
+       bfin_write_TWI_MASTER_CTL(speed > 100000 ? FAST : 0);
+
+       return 0;
+}
+
+/**
+ * i2c_get_bus_speed - get i2c bus speed
+ *     @speed: bus speed (in HZ)
+ */
+unsigned int i2c_get_bus_speed(void)
+{
+       /* 10 MHz / (2 * CLKDIV) -> 5 MHz / CLKDIV */
+       return 5000000 / (bfin_read_TWI_CLKDIV() & 0xff);
+}
+
+/**
  * i2c_init - initialize the i2c bus
  *     @speed: bus speed (in HZ)
  *     @slaveaddr: address of device in slave mode (0 - not slave)
@@ -220,15 +272,9 @@ void i2c_init(int speed, int slaveaddr)
        bfin_write_TWI_CONTROL(prescale);
 
        /* Set TWI interface clock as specified */
-       bfin_write_TWI_CLKDIV(
-               ((5 * 1024 / (speed / 1000)) << 8) |
-               ((5 * 1024 / (speed / 1000)) & 0xFF)
-       );
-
-       /* Don't turn it on */
-       bfin_write_TWI_MASTER_CTL(speed > 100000 ? FAST : 0);
+       i2c_set_bus_speed(speed);
 
-       /* But enable it */
+       /* Enable it */
        bfin_write_TWI_CONTROL(TWI_ENA | prescale);
        SSYNC();
 
index 1a4c8c9ad2701b550fc1ad0ab2a9fde741902080..ff18991f0e49d9bdf536f9703af33ad1cfe09feb 100644 (file)
@@ -29,6 +29,11 @@ static void wait_for_bb (void);
 static u16 wait_for_pin (void);
 static void flush_fifo(void);
 
+static struct i2c *i2c_base = (struct i2c *)I2C_DEFAULT_BASE;
+
+static unsigned int bus_initialized[I2C_BUS_MAX];
+static unsigned int current_bus;
+
 void i2c_init (int speed, int slaveadd)
 {
        int psc, fsscll, fssclh;
@@ -95,30 +100,32 @@ void i2c_init (int speed, int slaveadd)
                sclh = (unsigned int)fssclh;
        }
 
-       writew(0x2, I2C_SYSC); /* for ES2 after soft reset */
+       writew(0x2, &i2c_base->sysc); /* for ES2 after soft reset */
        udelay(1000);
-       writew(0x0, I2C_SYSC); /* will probably self clear but */
+       writew(0x0, &i2c_base->sysc); /* will probably self clear but */
 
-       if (readw (I2C_CON) & I2C_CON_EN) {
-               writew (0, I2C_CON);
+       if (readw (&i2c_base->con) & I2C_CON_EN) {
+               writew (0, &i2c_base->con);
                udelay (50000);
        }
 
-       writew(psc, I2C_PSC);
-       writew(scll, I2C_SCLL);
-       writew(sclh, I2C_SCLH);
+       writew(psc, &i2c_base->psc);
+       writew(scll, &i2c_base->scll);
+       writew(sclh, &i2c_base->sclh);
 
        /* own address */
-       writew (slaveadd, I2C_OA);
-       writew (I2C_CON_EN, I2C_CON);
+       writew (slaveadd, &i2c_base->oa);
+       writew (I2C_CON_EN, &i2c_base->con);
 
        /* have to enable intrrupts or OMAP i2c module doesn't work */
        writew (I2C_IE_XRDY_IE | I2C_IE_RRDY_IE | I2C_IE_ARDY_IE |
-               I2C_IE_NACK_IE | I2C_IE_AL_IE, I2C_IE);
+               I2C_IE_NACK_IE | I2C_IE_AL_IE, &i2c_base->ie);
        udelay (1000);
        flush_fifo();
-       writew (0xFFFF, I2C_STAT);
-       writew (0, I2C_CNT);
+       writew (0xFFFF, &i2c_base->stat);
+       writew (0, &i2c_base->cnt);
+
+       bus_initialized[current_bus] = 1;
 }
 
 static int i2c_read_byte (u8 devaddr, u8 regoffset, u8 * value)
@@ -130,19 +137,19 @@ static int i2c_read_byte (u8 devaddr, u8 regoffset, u8 * value)
        wait_for_bb ();
 
        /* one byte only */
-       writew (1, I2C_CNT);
+       writew (1, &i2c_base->cnt);
        /* set slave address */
-       writew (devaddr, I2C_SA);
+       writew (devaddr, &i2c_base->sa);
        /* no stop bit needed here */
-       writew (I2C_CON_EN | I2C_CON_MST | I2C_CON_STT | I2C_CON_TRX, I2C_CON);
+       writew (I2C_CON_EN | I2C_CON_MST | I2C_CON_STT | I2C_CON_TRX, &i2c_base->con);
 
        status = wait_for_pin ();
 
        if (status & I2C_STAT_XRDY) {
                /* Important: have to use byte access */
-               writeb (regoffset, I2C_DATA);
+               writeb (regoffset, &i2c_base->data);
                udelay (20000);
-               if (readw (I2C_STAT) & I2C_STAT_NACK) {
+               if (readw (&i2c_base->stat) & I2C_STAT_NACK) {
                        i2c_error = 1;
                }
        } else {
@@ -151,28 +158,28 @@ static int i2c_read_byte (u8 devaddr, u8 regoffset, u8 * value)
 
        if (!i2c_error) {
                /* free bus, otherwise we can't use a combined transction */
-               writew (0, I2C_CON);
-               while (readw (I2C_STAT) || (readw (I2C_CON) & I2C_CON_MST)) {
+               writew (0, &i2c_base->con);
+               while (readw (&i2c_base->stat) || (readw (&i2c_base->con) & I2C_CON_MST)) {
                        udelay (10000);
                        /* Have to clear pending interrupt to clear I2C_STAT */
-                       writew (0xFFFF, I2C_STAT);
+                       writew (0xFFFF, &i2c_base->stat);
                }
 
                wait_for_bb ();
                /* set slave address */
-               writew (devaddr, I2C_SA);
+               writew (devaddr, &i2c_base->sa);
                /* read one byte from slave */
-               writew (1, I2C_CNT);
+               writew (1, &i2c_base->cnt);
                /* need stop bit here */
                writew (I2C_CON_EN | I2C_CON_MST | I2C_CON_STT | I2C_CON_STP,
-                       I2C_CON);
+                       &i2c_base->con);
 
                status = wait_for_pin ();
                if (status & I2C_STAT_RRDY) {
 #if defined(CONFIG_OMAP243X) || defined(CONFIG_OMAP34XX)
-                       *value = readb (I2C_DATA);
+                       *value = readb (&i2c_base->data);
 #else
-                       *value = readw (I2C_DATA);
+                       *value = readw (&i2c_base->data);
 #endif
                        udelay (20000);
                } else {
@@ -180,17 +187,17 @@ static int i2c_read_byte (u8 devaddr, u8 regoffset, u8 * value)
                }
 
                if (!i2c_error) {
-                       writew (I2C_CON_EN, I2C_CON);
-                       while (readw (I2C_STAT)
-                              || (readw (I2C_CON) & I2C_CON_MST)) {
+                       writew (I2C_CON_EN, &i2c_base->con);
+                       while (readw (&i2c_base->stat)
+                              || (readw (&i2c_base->con) & I2C_CON_MST)) {
                                udelay (10000);
-                               writew (0xFFFF, I2C_STAT);
+                               writew (0xFFFF, &i2c_base->stat);
                        }
                }
        }
        flush_fifo();
-       writew (0xFFFF, I2C_STAT);
-       writew (0, I2C_CNT);
+       writew (0xFFFF, &i2c_base->stat);
+       writew (0, &i2c_base->cnt);
        return i2c_error;
 }
 
@@ -203,12 +210,12 @@ static int i2c_write_byte (u8 devaddr, u8 regoffset, u8 value)
        wait_for_bb ();
 
        /* two bytes */
-       writew (2, I2C_CNT);
+       writew (2, &i2c_base->cnt);
        /* set slave address */
-       writew (devaddr, I2C_SA);
+       writew (devaddr, &i2c_base->sa);
        /* stop bit needed here */
        writew (I2C_CON_EN | I2C_CON_MST | I2C_CON_STT | I2C_CON_TRX |
-               I2C_CON_STP, I2C_CON);
+               I2C_CON_STP, &i2c_base->con);
 
        /* wait until state change */
        status = wait_for_pin ();
@@ -216,24 +223,24 @@ static int i2c_write_byte (u8 devaddr, u8 regoffset, u8 value)
        if (status & I2C_STAT_XRDY) {
 #if defined(CONFIG_OMAP243X) || defined(CONFIG_OMAP34XX)
                /* send out 1 byte */
-               writeb (regoffset, I2C_DATA);
-               writew (I2C_STAT_XRDY, I2C_STAT);
+               writeb (regoffset, &i2c_base->data);
+               writew (I2C_STAT_XRDY, &i2c_base->stat);
 
                status = wait_for_pin ();
                if ((status & I2C_STAT_XRDY)) {
                        /* send out next 1 byte */
-                       writeb (value, I2C_DATA);
-                       writew (I2C_STAT_XRDY, I2C_STAT);
+                       writeb (value, &i2c_base->data);
+                       writew (I2C_STAT_XRDY, &i2c_base->stat);
                } else {
                        i2c_error = 1;
                }
 #else
                /* send out two bytes */
-               writew ((value << 8) + regoffset, I2C_DATA);
+               writew ((value << 8) + regoffset, &i2c_base->data);
 #endif
                /* must have enough delay to allow BB bit to go low */
                udelay (50000);
-               if (readw (I2C_STAT) & I2C_STAT_NACK) {
+               if (readw (&i2c_base->stat) & I2C_STAT_NACK) {
                        i2c_error = 1;
                }
        } else {
@@ -243,18 +250,18 @@ static int i2c_write_byte (u8 devaddr, u8 regoffset, u8 value)
        if (!i2c_error) {
                int eout = 200;
 
-               writew (I2C_CON_EN, I2C_CON);
-               while ((stat = readw (I2C_STAT)) || (readw (I2C_CON) & I2C_CON_MST)) {
+               writew (I2C_CON_EN, &i2c_base->con);
+               while ((stat = readw (&i2c_base->stat)) || (readw (&i2c_base->con) & I2C_CON_MST)) {
                        udelay (1000);
                        /* have to read to clear intrrupt */
-                       writew (0xFFFF, I2C_STAT);
+                       writew (0xFFFF, &i2c_base->stat);
                        if(--eout == 0) /* better leave with error than hang */
                                break;
                }
        }
        flush_fifo();
-       writew (0xFFFF, I2C_STAT);
-       writew (0, I2C_CNT);
+       writew (0xFFFF, &i2c_base->stat);
+       writew (0, &i2c_base->cnt);
        return i2c_error;
 }
 
@@ -265,14 +272,14 @@ static void flush_fifo(void)
         * you get a bus error
         */
        while(1){
-               stat = readw(I2C_STAT);
+               stat = readw(&i2c_base->stat);
                if(stat == I2C_STAT_RRDY){
 #if defined(CONFIG_OMAP243X) || defined(CONFIG_OMAP34XX)
-                       readb(I2C_DATA);
+                       readb(&i2c_base->data);
 #else
-                       readw(I2C_DATA);
+                       readw(&i2c_base->data);
 #endif
-                       writew(I2C_STAT_RRDY,I2C_STAT);
+                       writew(I2C_STAT_RRDY,&i2c_base->stat);
                        udelay(1000);
                }else
                        break;
@@ -283,7 +290,7 @@ int i2c_probe (uchar chip)
 {
        int res = 1; /* default = fail */
 
-       if (chip == readw (I2C_OA)) {
+       if (chip == readw (&i2c_base->oa)) {
                return res;
        }
 
@@ -291,27 +298,27 @@ int i2c_probe (uchar chip)
        wait_for_bb ();
 
        /* try to read one byte */
-       writew (1, I2C_CNT);
+       writew (1, &i2c_base->cnt);
        /* set slave address */
-       writew (chip, I2C_SA);
+       writew (chip, &i2c_base->sa);
        /* stop bit needed here */
-       writew (I2C_CON_EN | I2C_CON_MST | I2C_CON_STT | I2C_CON_STP, I2C_CON);
+       writew (I2C_CON_EN | I2C_CON_MST | I2C_CON_STT | I2C_CON_STP, &i2c_base->con);
        /* enough delay for the NACK bit set */
        udelay (50000);
 
-       if (!(readw (I2C_STAT) & I2C_STAT_NACK)) {
+       if (!(readw (&i2c_base->stat) & I2C_STAT_NACK)) {
                res = 0;      /* success case */
                flush_fifo();
-               writew(0xFFFF, I2C_STAT);
+               writew(0xFFFF, &i2c_base->stat);
        } else {
-               writew(0xFFFF, I2C_STAT);        /* failue, clear sources*/
-               writew (readw (I2C_CON) | I2C_CON_STP, I2C_CON); /* finish up xfer */
+               writew(0xFFFF, &i2c_base->stat);         /* failue, clear sources*/
+               writew (readw (&i2c_base->con) | I2C_CON_STP, &i2c_base->con); /* finish up xfer */
                udelay(20000);
                wait_for_bb ();
        }
        flush_fifo();
-       writew (0, I2C_CNT); /* don't allow any more data in...we don't want it.*/
-       writew(0xFFFF, I2C_STAT);
+       writew (0, &i2c_base->cnt); /* don't allow any more data in...we don't want it.*/
+       writew(0xFFFF, &i2c_base->stat);
        return res;
 }
 
@@ -370,17 +377,17 @@ static void wait_for_bb (void)
        int timeout = 10;
        u16 stat;
 
-       writew(0xFFFF, I2C_STAT);        /* clear current interruts...*/
-       while ((stat = readw (I2C_STAT) & I2C_STAT_BB) && timeout--) {
-               writew (stat, I2C_STAT);
+       writew(0xFFFF, &i2c_base->stat);         /* clear current interruts...*/
+       while ((stat = readw (&i2c_base->stat) & I2C_STAT_BB) && timeout--) {
+               writew (stat, &i2c_base->stat);
                udelay (50000);
        }
 
        if (timeout <= 0) {
                printf ("timed out in wait_for_bb: I2C_STAT=%x\n",
-                       readw (I2C_STAT));
+                       readw (&i2c_base->stat));
        }
-       writew(0xFFFF, I2C_STAT);        /* clear delayed stuff*/
+       writew(0xFFFF, &i2c_base->stat);         /* clear delayed stuff*/
 }
 
 static u16 wait_for_pin (void)
@@ -390,7 +397,7 @@ static u16 wait_for_pin (void)
 
        do {
                udelay (1000);
-               status = readw (I2C_STAT);
+               status = readw (&i2c_base->stat);
        } while (  !(status &
                   (I2C_STAT_ROVR | I2C_STAT_XUDF | I2C_STAT_XRDY |
                    I2C_STAT_RRDY | I2C_STAT_ARDY | I2C_STAT_NACK |
@@ -398,8 +405,33 @@ static u16 wait_for_pin (void)
 
        if (timeout <= 0) {
                printf ("timed out in wait_for_pin: I2C_STAT=%x\n",
-                       readw (I2C_STAT));
-                       writew(0xFFFF, I2C_STAT);
+                       readw (&i2c_base->stat));
+                       writew(0xFFFF, &i2c_base->stat);
 }
        return status;
 }
+
+int i2c_set_bus_num(unsigned int bus)
+{
+       if ((bus < 0) || (bus >= I2C_BUS_MAX)) {
+               printf("Bad bus: %d\n", bus);
+               return -1;
+       }
+
+#if I2C_BUS_MAX==3
+       if (bus == 2)
+               i2c_base = (struct i2c *)I2C_BASE3;
+       else
+#endif
+       if (bus == 1)
+               i2c_base = (struct i2c *)I2C_BASE2;
+       else
+               i2c_base = (struct i2c *)I2C_BASE1;
+
+       current_bus = bus;
+
+       if(!bus_initialized[current_bus])
+               i2c_init(CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE);
+
+       return 0;
+}
diff --git a/drivers/i2c/pca9564_i2c.c b/drivers/i2c/pca9564_i2c.c
new file mode 100644 (file)
index 0000000..199a9ee
--- /dev/null
@@ -0,0 +1,189 @@
+/*
+ * File:         drivers/i2c/pca9564.c
+ * Based on:     drivers/i2c/s3c44b0_i2c.c
+ * Author:
+ *
+ * Created:      2009-06-23
+ * Description:  PCA9564 i2c bridge driver
+ *
+ * Modified:
+ *               Copyright 2009 CJSC "NII STT", http://www.niistt.ru/
+ *
+ * Bugs:
+ *
+ * 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, see the file COPYING, or write
+ * to the Free Software Foundation, Inc.,
+ * 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+
+#include <common.h>
+#include <i2c.h>
+#include <pca9564.h>
+#include <asm/io.h>
+
+#define PCA_STA                        (CONFIG_PCA9564_BASE + 0)
+#define PCA_TO                 (CONFIG_PCA9564_BASE + 0)
+#define PCA_DAT                        (CONFIG_PCA9564_BASE + (1 << 2))
+#define PCA_ADR                        (CONFIG_PCA9564_BASE + (2 << 2))
+#define PCA_CON                        (CONFIG_PCA9564_BASE + (3 << 2))
+
+static unsigned char pca_read_reg(unsigned int reg)
+{
+       return readb((void *)reg);
+}
+
+static void pca_write_reg(unsigned int reg, unsigned char value)
+{
+       writeb(value, (void *)reg);
+}
+
+static int pca_wait_busy(void)
+{
+       unsigned int timeout = 10000;
+
+       while (!(pca_read_reg(PCA_CON) & PCA_CON_SI) && --timeout)
+               udelay(1);
+
+       if (timeout == 0)
+               debug("I2C timeout!\n");
+
+       debug("CON = 0x%02x, STA = 0x%02x\n", pca_read_reg(PCA_CON),
+              pca_read_reg(PCA_STA));
+
+       return timeout ? 0 : 1;
+}
+
+/*=====================================================================*/
+/*                         Public Functions                            */
+/*=====================================================================*/
+
+/*-----------------------------------------------------------------------
+ * Initialization
+ */
+void i2c_init(int speed, int slaveaddr)
+{
+       pca_write_reg(PCA_CON, PCA_CON_ENSIO | speed);
+}
+
+/*
+ * Probe the given I2C chip address.  Returns 0 if a chip responded,
+ * not 0 on failure.
+ */
+
+int i2c_probe(uchar chip)
+{
+       unsigned char res;
+
+       pca_write_reg(PCA_CON, PCA_CON_STA | PCA_CON_ENSIO);
+       pca_wait_busy();
+
+       pca_write_reg(PCA_CON, PCA_CON_STA | PCA_CON_ENSIO);
+
+       pca_write_reg(PCA_DAT, (chip << 1) | 1);
+       res = pca_wait_busy();
+
+       if ((res == 0) && (pca_read_reg(PCA_STA) == 0x48))
+               res = 1;
+
+       pca_write_reg(PCA_CON, PCA_CON_STO | PCA_CON_ENSIO);
+
+       return res;
+}
+
+/*
+ * Read/Write interface:
+ *   chip:    I2C chip address, range 0..127
+ *   addr:    Memory (register) address within the chip
+ *   alen:    Number of bytes to use for addr (typically 1, 2 for larger
+ *              memories, 0 for register type devices with only one
+ *              register)
+ *   buffer:  Where to read/write the data
+ *   len:     How many bytes to read/write
+ *
+ *   Returns: 0 on success, not 0 on failure
+ */
+int i2c_read(uchar chip, uint addr, int alen, uchar *buffer, int len)
+{
+       int i;
+
+       pca_write_reg(PCA_CON, PCA_CON_ENSIO | PCA_CON_STA);
+       pca_wait_busy();
+
+       pca_write_reg(PCA_CON, PCA_CON_ENSIO);
+
+       pca_write_reg(PCA_DAT, (chip << 1));
+       pca_wait_busy();
+       pca_write_reg(PCA_CON, PCA_CON_ENSIO);
+
+       if (alen > 0) {
+               pca_write_reg(PCA_DAT, addr);
+               pca_wait_busy();
+               pca_write_reg(PCA_CON, PCA_CON_ENSIO);
+       }
+
+       pca_write_reg(PCA_CON, PCA_CON_ENSIO | PCA_CON_STO);
+
+       udelay(500);
+
+       pca_write_reg(PCA_CON, PCA_CON_ENSIO | PCA_CON_STA);
+       pca_wait_busy();
+       pca_write_reg(PCA_CON, PCA_CON_ENSIO);
+
+       pca_write_reg(PCA_DAT, (chip << 1) | 1);
+       pca_wait_busy();
+
+       for (i = 0; i < len; ++i) {
+               if (i == len - 1)
+                       pca_write_reg(PCA_CON, PCA_CON_ENSIO);
+               else
+                       pca_write_reg(PCA_CON, PCA_CON_ENSIO | PCA_CON_AA);
+
+               pca_wait_busy();
+               buffer[i] = pca_read_reg(PCA_DAT);
+
+       }
+
+       pca_write_reg(PCA_CON, PCA_CON_ENSIO | PCA_CON_STO);
+
+       return 0;
+}
+
+int i2c_write(uchar chip, uint addr, int alen, uchar *buffer, int len)
+{
+       int i;
+
+       pca_write_reg(PCA_CON, PCA_CON_ENSIO | PCA_CON_STA);
+       pca_wait_busy();
+       pca_write_reg(PCA_CON, PCA_CON_ENSIO);
+
+       pca_write_reg(PCA_DAT, chip << 1);
+       pca_wait_busy();
+       pca_write_reg(PCA_CON, PCA_CON_ENSIO);
+
+       if (alen > 0) {
+               pca_write_reg(PCA_DAT, addr);
+               pca_wait_busy();
+               pca_write_reg(PCA_CON, PCA_CON_ENSIO);
+       }
+
+       for (i = 0; i < len; ++i) {
+               pca_write_reg(PCA_DAT, buffer[i]);
+               pca_wait_busy();
+               pca_write_reg(PCA_CON, PCA_CON_ENSIO);
+       }
+
+       pca_write_reg(PCA_CON, PCA_CON_STO | PCA_CON_ENSIO);
+
+       return 0;
+}
index 55c6a12aaed1d92116affa1ba8cae953f5ec8700..c8371cf730c0256f911a3a54d05034fe8b584651 100644 (file)
  */
 
 #include <common.h>
-#if defined(CONFIG_S3C2400)
-#include <s3c2400.h>
-#elif defined(CONFIG_S3C2410)
-#include <s3c2410.h>
-#endif
+#include <asm/arch/s3c24x0_cpu.h>
 
 #include <asm/io.h>
 #include <i2c.h>
index 59883a58f674e96d696e98de6df2e9d13b630d1f..9a4878391674e924f9e3c1144392249cebd76984 100644 (file)
 #include <asm/io.h>
 #include <asm/arch/hardware.h>
 #endif
+#ifdef CONFIG_AT91SAM9263              /* only valid for AT91SAM9263 */
+#include <asm/arch/at91_pmc.h>
+#include <asm/arch/gpio.h>
+#include <asm/arch/io.h>
+#endif
 #ifdef CONFIG_IXP425                   /* only valid for IXP425 */
 #include <asm/arch/ixp425.h>
 #endif
index 513dd25b0d6d1a1c74961c7d261ae0129c381716..96c0e653ba667d0976cdb7556ce2e3b3a7ee239b 100644 (file)
@@ -63,7 +63,9 @@ unsigned char mmc_board_init(void)
 {
        t2_t *t2_base = (t2_t *)T2_BASE;
 
+#if defined(CONFIG_TWL4030_POWER)
        twl4030_power_mmc_init();
+#endif
 
        writel(readl(&t2_base->pbias_lite) | PBIASLITEPWRDNZ1 |
                PBIASSPEEDCTRL0 | PBIASLITEPWRDNZ0,
index eabaf3e773f63d8e14d46694e1a57fd394437428..41a95685f6d1acc4f44fd84ad05a121dfdd5f737 100644 (file)
@@ -182,13 +182,7 @@ static int nand_davinci_correct_data(struct mtd_info *mtd, u_char *dat, u_char *
 
 #ifdef CONFIG_SYS_NAND_4BIT_HW_ECC_OOBFIRST
 static struct nand_ecclayout nand_davinci_4bit_layout_oobfirst = {
-/*
- * TI uses a different layout for 4K page deviecs. Since the
- * eccpos filed can hold only a limited number of entries, adding
- * support for 4K page will result in compilation warnings
- * 4K Support will be added later
- */
-#ifdef CONFIG_SYS_NAND_PAGE_2K
+#if defined(CONFIG_SYS_NAND_PAGE_2K)
        .eccbytes = 40,
        .eccpos = {
                24, 25, 26, 27, 28,
@@ -200,6 +194,21 @@ static struct nand_ecclayout nand_davinci_4bit_layout_oobfirst = {
        .oobfree = {
                {.offset = 2, .length = 22, },
        },
+#elif defined(CONFIG_SYS_NAND_PAGE_4K)
+       .eccbytes = 80,
+       .eccpos = {
+               48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
+               58, 59, 60, 61, 62, 63, 64, 65, 66, 67,
+               68, 69, 70, 71, 72, 73, 74, 75, 76, 77,
+               78, 79, 80, 81, 82, 83, 84, 85, 86, 87,
+               88, 89, 90, 91, 92, 93, 94, 95, 96, 97,
+               98, 99, 100, 101, 102, 103, 104, 105, 106, 107,
+               108, 109, 110, 111, 112, 113, 114, 115, 116, 117,
+               118, 119, 120, 121, 122, 123, 124, 125, 126, 127,
+               },
+       .oobfree = {
+               {.offset = 2, .length = 46, },
+       },
 #endif
 };
 
index 50cb4aa9dcf9f1932b60e89ae5a41f09da6a0924..146e9bf3cb6e9900c76d49a33d3e6b8c5b45a753 100644 (file)
@@ -766,9 +766,6 @@ int board_nand_init(struct nand_chip *nand)
        nand->waitfunc = fsl_elbc_wait;
 
        /* set up nand options */
-       /* redirect the pointer of bbt pattern to RAM */
-       bbt_main_descr.pattern = bbt_pattern;
-       bbt_mirror_descr.pattern = mirror_pattern;
        nand->bbt_td = &bbt_main_descr;
        nand->bbt_md = &bbt_mirror_descr;
 
@@ -815,7 +812,6 @@ int board_nand_init(struct nand_chip *nand)
        /* Large-page-specific setup */
        if (or & OR_FCM_PGS) {
                priv->page_size = 1;
-               largepage_memorybased.pattern = scan_ff_pattern;
                nand->badblock_pattern = &largepage_memorybased;
 
                /* adjust ecc setup if needed */
index 426bb95e9e9f10f62b13e2877428370158daa3d9..7171bdd51b421441f401df6b70cb1b56bfdea3f1 100644 (file)
@@ -893,6 +893,9 @@ static int nand_wait(struct mtd_info *mtd, struct nand_chip *this)
  * @mtd:       mtd info structure
  * @chip:      nand chip info structure
  * @buf:       buffer to store read data
+ * @page:      page number to read
+ *
+ * Not for syndrome calculating ecc controllers, which use a special oob layout
  */
 static int nand_read_page_raw(struct mtd_info *mtd, struct nand_chip *chip,
                              uint8_t *buf, int page)
@@ -902,11 +905,54 @@ static int nand_read_page_raw(struct mtd_info *mtd, struct nand_chip *chip,
        return 0;
 }
 
+/**
+ * nand_read_page_raw_syndrome - [Intern] read raw page data without ecc
+ * @mtd:       mtd info structure
+ * @chip:      nand chip info structure
+ * @buf:       buffer to store read data
+ * @page:      page number to read
+ *
+ * We need a special oob layout and handling even when OOB isn't used.
+ */
+static int nand_read_page_raw_syndrome(struct mtd_info *mtd, struct nand_chip *chip,
+                             uint8_t *buf, int page)
+{
+       int eccsize = chip->ecc.size;
+       int eccbytes = chip->ecc.bytes;
+       uint8_t *oob = chip->oob_poi;
+       int steps, size;
+
+       for (steps = chip->ecc.steps; steps > 0; steps--) {
+               chip->read_buf(mtd, buf, eccsize);
+               buf += eccsize;
+
+               if (chip->ecc.prepad) {
+                       chip->read_buf(mtd, oob, chip->ecc.prepad);
+                       oob += chip->ecc.prepad;
+               }
+
+               chip->read_buf(mtd, oob, eccbytes);
+               oob += eccbytes;
+
+               if (chip->ecc.postpad) {
+                       chip->read_buf(mtd, oob, chip->ecc.postpad);
+                       oob += chip->ecc.postpad;
+               }
+       }
+
+       size = mtd->oobsize - (oob - chip->oob_poi);
+       if (size)
+               chip->read_buf(mtd, oob, size);
+
+       return 0;
+}
+
 /**
  * nand_read_page_swecc - [REPLACABLE] software ecc based page read function
  * @mtd:       mtd info structure
  * @chip:      nand chip info structure
  * @buf:       buffer to store read data
+ * @page:      page number to read
  */
 static int nand_read_page_swecc(struct mtd_info *mtd, struct nand_chip *chip,
                                uint8_t *buf, int page)
@@ -946,9 +992,9 @@ static int nand_read_page_swecc(struct mtd_info *mtd, struct nand_chip *chip,
  * nand_read_subpage - [REPLACABLE] software ecc based sub-page read function
  * @mtd:       mtd info structure
  * @chip:      nand chip info structure
- * @dataofs    offset of requested data within the page
- * @readlen    data length
- * @buf:       buffer to store read data
+ * @data_offs: offset of requested data within the page
+ * @readlen:   data length
+ * @bufpoi:    buffer to store read data
  */
 static int nand_read_subpage(struct mtd_info *mtd, struct nand_chip *chip, uint32_t data_offs, uint32_t readlen, uint8_t *bufpoi)
 {
@@ -1015,7 +1061,7 @@ static int nand_read_subpage(struct mtd_info *mtd, struct nand_chip *chip, uint3
                int stat;
 
                stat = chip->ecc.correct(mtd, p, &chip->buffers->ecccode[i], &chip->buffers->ecccalc[i]);
-               if (stat < 0)
+               if (stat == -1)
                        mtd->ecc_stats.failed++;
                else
                        mtd->ecc_stats.corrected += stat;
@@ -1028,6 +1074,7 @@ static int nand_read_subpage(struct mtd_info *mtd, struct nand_chip *chip, uint3
  * @mtd:       mtd info structure
  * @chip:      nand chip info structure
  * @buf:       buffer to store read data
+ * @page:      page number to read
  *
  * Not for syndrome calculating ecc controllers which need a special oob layout
  */
@@ -1059,7 +1106,7 @@ static int nand_read_page_hwecc(struct mtd_info *mtd, struct nand_chip *chip,
                int stat;
 
                stat = chip->ecc.correct(mtd, p, &ecc_code[i], &ecc_calc[i]);
-               if (stat == -1)
+               if (stat < 0)
                        mtd->ecc_stats.failed++;
                else
                        mtd->ecc_stats.corrected += stat;
@@ -1072,6 +1119,7 @@ static int nand_read_page_hwecc(struct mtd_info *mtd, struct nand_chip *chip,
  * @mtd:       mtd info structure
  * @chip:      nand chip info structure
  * @buf:       buffer to store read data
+ * @page:      page number to read
  *
  * Hardware ECC for large page chips, require OOB to be read first.
  * For this ECC mode, the write_page method is re-used from ECC_HW.
@@ -1120,6 +1168,7 @@ static int nand_read_page_hwecc_oob_first(struct mtd_info *mtd,
  * @mtd:       mtd info structure
  * @chip:      nand chip info structure
  * @buf:       buffer to store read data
+ * @page:      page number to read
  *
  * The hw generator calculates the error syndrome automatically. Therefor
  * we need a special oob layout and handling.
@@ -1677,6 +1726,8 @@ static int nand_read_oob(struct mtd_info *mtd, loff_t from,
  * @mtd:       mtd info structure
  * @chip:      nand chip info structure
  * @buf:       data buffer
+ *
+ * Not for syndrome calculating ecc controllers, which use a special oob layout
  */
 static void nand_write_page_raw(struct mtd_info *mtd, struct nand_chip *chip,
                                const uint8_t *buf)
@@ -1685,6 +1736,44 @@ static void nand_write_page_raw(struct mtd_info *mtd, struct nand_chip *chip,
        chip->write_buf(mtd, chip->oob_poi, mtd->oobsize);
 }
 
+/**
+ * nand_write_page_raw_syndrome - [Intern] raw page write function
+ * @mtd:       mtd info structure
+ * @chip:      nand chip info structure
+ * @buf:       data buffer
+ *
+ * We need a special oob layout and handling even when ECC isn't checked.
+ */
+static void nand_write_page_raw_syndrome(struct mtd_info *mtd, struct nand_chip *chip,
+                               const uint8_t *buf)
+{
+       int eccsize = chip->ecc.size;
+       int eccbytes = chip->ecc.bytes;
+       uint8_t *oob = chip->oob_poi;
+       int steps, size;
+
+       for (steps = chip->ecc.steps; steps > 0; steps--) {
+               chip->write_buf(mtd, buf, eccsize);
+               buf += eccsize;
+
+               if (chip->ecc.prepad) {
+                       chip->write_buf(mtd, oob, chip->ecc.prepad);
+                       oob += chip->ecc.prepad;
+               }
+
+               chip->read_buf(mtd, oob, eccbytes);
+               oob += eccbytes;
+
+               if (chip->ecc.postpad) {
+                       chip->write_buf(mtd, oob, chip->ecc.postpad);
+                       oob += chip->ecc.postpad;
+               }
+       }
+
+       size = mtd->oobsize - (oob - chip->oob_poi);
+       if (size)
+               chip->write_buf(mtd, oob, size);
+}
 /**
  * nand_write_page_swecc - [REPLACABLE] software ecc based page write function
  * @mtd:       mtd info structure
@@ -2211,13 +2300,15 @@ static int nand_erase(struct mtd_info *mtd, struct erase_info *instr)
 int nand_erase_nand(struct mtd_info *mtd, struct erase_info *instr,
                    int allowbbt)
 {
-       int page, len, status, pages_per_block, ret, chipnr;
+       int page, status, pages_per_block, ret, chipnr;
        struct nand_chip *chip = mtd->priv;
-       int rewrite_bbt[CONFIG_SYS_NAND_MAX_CHIPS]={0};
+       loff_t rewrite_bbt[CONFIG_SYS_NAND_MAX_CHIPS] = {0};
        unsigned int bbt_masked_page = 0xffffffff;
+       loff_t len;
 
-       MTDDEBUG (MTD_DEBUG_LEVEL3, "nand_erase: start = 0x%08x, len = %i\n",
-                 (unsigned int) instr->addr, (unsigned int) instr->len);
+       MTDDEBUG(MTD_DEBUG_LEVEL3, "nand_erase: start = 0x%012llx, "
+                "len = %llu\n", (unsigned long long) instr->addr,
+                (unsigned long long) instr->len);
 
        /* Start address must align on block boundary */
        if (instr->addr & ((1 << chip->phys_erase_shift) - 1)) {
@@ -2313,7 +2404,7 @@ int nand_erase_nand(struct mtd_info *mtd, struct erase_info *instr,
                        MTDDEBUG (MTD_DEBUG_LEVEL0, "nand_erase: "
                                  "Failed erase, page 0x%08x\n", page);
                        instr->state = MTD_ERASE_FAILED;
-                       instr->fail_addr = (page << chip->page_shift);
+                       instr->fail_addr = ((loff_t)page << chip->page_shift);
                        goto erase_exit;
                }
 
@@ -2323,7 +2414,8 @@ int nand_erase_nand(struct mtd_info *mtd, struct erase_info *instr,
                 */
                if (bbt_masked_page != 0xffffffff &&
                    (page & BBT_PAGE_MASK) == bbt_masked_page)
-                           rewrite_bbt[chipnr] = (page << chip->page_shift);
+                       rewrite_bbt[chipnr] =
+                               ((loff_t)page << chip->page_shift);
 
                /* Increment page address and decrement length */
                len -= (1 << chip->phys_erase_shift);
@@ -2370,8 +2462,8 @@ int nand_erase_nand(struct mtd_info *mtd, struct erase_info *instr,
                        continue;
                /* update the BBT for chip */
                MTDDEBUG (MTD_DEBUG_LEVEL0, "nand_erase_nand: nand_update_bbt "
-                         "(%d:0x%0x 0x%0x)\n", chipnr, rewrite_bbt[chipnr],
-                         chip->bbt_td->pages[chipnr]);
+                         "(%d:0x%0llx 0x%0x)\n", chipnr, rewrite_bbt[chipnr],
+                         chip->bbt_td->pages[chipnr]);
                nand_update_bbt(mtd, rewrite_bbt[chipnr]);
        }
 
@@ -2566,7 +2658,7 @@ static struct nand_flash_dev *nand_get_flash_type(struct mtd_info *mtd,
        if (!mtd->name)
                mtd->name = type->name;
 
-       chip->chipsize = type->chipsize << 20;
+       chip->chipsize = (uint64_t)type->chipsize << 20;
 
        /* Newer devices have all the information in additional id bytes */
        if (!type->pagesize) {
@@ -2624,7 +2716,10 @@ static struct nand_flash_dev *nand_get_flash_type(struct mtd_info *mtd,
 
        chip->bbt_erase_shift = chip->phys_erase_shift =
                ffs(mtd->erasesize) - 1;
-       chip->chip_shift = ffs(chip->chipsize) - 1;
+       if (chip->chipsize & 0xffffffff)
+               chip->chip_shift = ffs((unsigned)chip->chipsize) - 1;
+       else
+               chip->chip_shift = ffs((unsigned)(chip->chipsize >> 32)) + 31;
 
        /* Set the bad block position */
        chip->badblockpos = mtd->writesize > 512 ?
@@ -2722,7 +2817,6 @@ int nand_scan_ident(struct mtd_info *mtd, int maxchips)
 /**
  * nand_scan_tail - [NAND Interface] Scan for the NAND device
  * @mtd:           MTD device structure
- * @maxchips:      Number of chips to scan for
  *
  * This is the second phase of the normal nand_scan() function. It
  * fills out all the uninitialized function pointers with the defaults
@@ -2761,7 +2855,6 @@ int nand_scan_tail(struct mtd_info *mtd)
                default:
                        printk(KERN_WARNING "No oob scheme defined for "
                               "oobsize %d\n", mtd->oobsize);
-/*                     BUG(); */
                }
        }
 
@@ -2772,10 +2865,6 @@ int nand_scan_tail(struct mtd_info *mtd)
         * check ECC mode, default to software if 3byte/512byte hardware ECC is
         * selected and we have 256 byte pagesize fallback to software ECC
         */
-       if (!chip->ecc.read_page_raw)
-               chip->ecc.read_page_raw = nand_read_page_raw;
-       if (!chip->ecc.write_page_raw)
-               chip->ecc.write_page_raw = nand_write_page_raw;
 
        switch (chip->ecc.mode) {
        case NAND_ECC_HW_OOB_FIRST:
@@ -2795,6 +2884,10 @@ int nand_scan_tail(struct mtd_info *mtd)
                        chip->ecc.read_page = nand_read_page_hwecc;
                if (!chip->ecc.write_page)
                        chip->ecc.write_page = nand_write_page_hwecc;
+               if (!chip->ecc.read_page_raw)
+                       chip->ecc.read_page_raw = nand_read_page_raw;
+               if (!chip->ecc.write_page_raw)
+                       chip->ecc.write_page_raw = nand_write_page_raw;
                if (!chip->ecc.read_oob)
                        chip->ecc.read_oob = nand_read_oob_std;
                if (!chip->ecc.write_oob)
@@ -2816,6 +2909,10 @@ int nand_scan_tail(struct mtd_info *mtd)
                        chip->ecc.read_page = nand_read_page_syndrome;
                if (!chip->ecc.write_page)
                        chip->ecc.write_page = nand_write_page_syndrome;
+               if (!chip->ecc.read_page_raw)
+                       chip->ecc.read_page_raw = nand_read_page_raw_syndrome;
+               if (!chip->ecc.write_page_raw)
+                       chip->ecc.write_page_raw = nand_write_page_raw_syndrome;
                if (!chip->ecc.read_oob)
                        chip->ecc.read_oob = nand_read_oob_syndrome;
                if (!chip->ecc.write_oob)
@@ -2834,6 +2931,8 @@ int nand_scan_tail(struct mtd_info *mtd)
                chip->ecc.read_page = nand_read_page_swecc;
                chip->ecc.read_subpage = nand_read_subpage;
                chip->ecc.write_page = nand_write_page_swecc;
+               chip->ecc.read_page_raw = nand_read_page_raw;
+               chip->ecc.write_page_raw = nand_write_page_raw;
                chip->ecc.read_oob = nand_read_oob_std;
                chip->ecc.write_oob = nand_write_oob_std;
                chip->ecc.size = 256;
@@ -2846,6 +2945,8 @@ int nand_scan_tail(struct mtd_info *mtd)
                chip->ecc.read_page = nand_read_page_raw;
                chip->ecc.write_page = nand_write_page_raw;
                chip->ecc.read_oob = nand_read_oob_std;
+               chip->ecc.read_page_raw = nand_read_page_raw;
+               chip->ecc.write_page_raw = nand_write_page_raw;
                chip->ecc.write_oob = nand_write_oob_std;
                chip->ecc.size = mtd->writesize;
                chip->ecc.bytes = 0;
@@ -2862,7 +2963,8 @@ int nand_scan_tail(struct mtd_info *mtd)
         * the out of band area
         */
        chip->ecc.layout->oobavail = 0;
-       for (i = 0; chip->ecc.layout->oobfree[i].length; i++)
+       for (i = 0; chip->ecc.layout->oobfree[i].length
+                       && i < ARRAY_SIZE(chip->ecc.layout->oobfree); i++)
                chip->ecc.layout->oobavail +=
                        chip->ecc.layout->oobfree[i].length;
        mtd->oobavail = chip->ecc.layout->oobavail;
@@ -2890,6 +2992,7 @@ int nand_scan_tail(struct mtd_info *mtd)
                        break;
                case 4:
                case 8:
+               case 16:
                        mtd->subpage_sft = 2;
                        break;
                }
index d68a315f197cbc78aa6c3f5671602f580ea643c9..2fe68abe1df8c05255dc5589fc35cc6e6998bbd9 100644 (file)
@@ -182,16 +182,19 @@ static int read_bbt(struct mtd_info *mtd, uint8_t *buf, int page, int num,
                                if (tmp == msk)
                                        continue;
                                if (reserved_block_code && (tmp == reserved_block_code)) {
-                                       printk(KERN_DEBUG "nand_read_bbt: Reserved block at 0x%08x\n",
-                                              ((offs << 2) + (act >> 1)) << this->bbt_erase_shift);
+                                       printk(KERN_DEBUG "nand_read_bbt: Reserved block at 0x%012llx\n",
+                                               (loff_t)((offs << 2) +
+                                               (act >> 1)) <<
+                                               this->bbt_erase_shift);
                                        this->bbt[offs + (act >> 3)] |= 0x2 << (act & 0x06);
                                        mtd->ecc_stats.bbtblocks++;
                                        continue;
                                }
                                /* Leave it for now, if its matured we can move this
                                 * message to MTD_DEBUG_LEVEL0 */
-                               printk(KERN_DEBUG "nand_read_bbt: Bad block at 0x%08x\n",
-                                      ((offs << 2) + (act >> 1)) << this->bbt_erase_shift);
+                               printk(KERN_DEBUG "nand_read_bbt: Bad block at 0x%012llx\n",
+                                       (loff_t)((offs << 2) + (act >> 1)) <<
+                                       this->bbt_erase_shift);
                                /* Factory marked bad or worn out ? */
                                if (tmp == 0)
                                        this->bbt[offs + (act >> 3)] |= 0x3 << (act & 0x06);
@@ -295,8 +298,8 @@ static int read_abs_bbts(struct mtd_info *mtd, uint8_t *buf,
 
        /* Read the primary version, if available */
        if (td->options & NAND_BBT_VERSION) {
-               scan_read_raw(mtd, buf, td->pages[0] << this->page_shift,
-                             mtd->writesize);
+               scan_read_raw(mtd, buf, (loff_t)td->pages[0] <<
+                               this->page_shift, mtd->writesize);
                td->version[0] = buf[mtd->writesize + td->veroffs];
                printk(KERN_DEBUG "Bad block table at page %d, version 0x%02X\n",
                       td->pages[0], td->version[0]);
@@ -304,8 +307,8 @@ static int read_abs_bbts(struct mtd_info *mtd, uint8_t *buf,
 
        /* Read the mirror version, if available */
        if (md && (md->options & NAND_BBT_VERSION)) {
-               scan_read_raw(mtd, buf, md->pages[0] << this->page_shift,
-                             mtd->writesize);
+               scan_read_raw(mtd, buf, (loff_t)md->pages[0] <<
+                               this->page_shift, mtd->writesize);
                md->version[0] = buf[mtd->writesize + md->veroffs];
                printk(KERN_DEBUG "Bad block table at page %d, version 0x%02X\n",
                       md->pages[0], md->version[0]);
@@ -422,7 +425,7 @@ static int create_bbt(struct mtd_info *mtd, uint8_t *buf,
                numblocks = this->chipsize >> (this->bbt_erase_shift - 1);
                startblock = chip * numblocks;
                numblocks += startblock;
-               from = startblock << (this->bbt_erase_shift - 1);
+               from = (loff_t)startblock << (this->bbt_erase_shift - 1);
        }
 
        for (i = startblock; i < numblocks;) {
@@ -440,8 +443,8 @@ static int create_bbt(struct mtd_info *mtd, uint8_t *buf,
                if (ret) {
                        this->bbt[i >> 3] |= 0x03 << (i & 0x6);
                        MTDDEBUG (MTD_DEBUG_LEVEL0,
-                                 "Bad eraseblock %d at 0x%08x\n",
-                                 i >> 1, (unsigned int)from);
+                                 "Bad eraseblock %d at 0x%012llx\n",
+                                 i >> 1, (unsigned long long)from);
                        mtd->ecc_stats.badblocks++;
                }
 
@@ -507,7 +510,7 @@ static int search_bbt(struct mtd_info *mtd, uint8_t *buf, struct nand_bbt_descr
                for (block = 0; block < td->maxblocks; block++) {
 
                        int actblock = startblock + dir * block;
-                       loff_t offs = actblock << this->bbt_erase_shift;
+                       loff_t offs = (loff_t)actblock << this->bbt_erase_shift;
 
                        /* Read first page */
                        scan_read_raw(mtd, buf, offs, mtd->writesize);
@@ -731,7 +734,7 @@ static int write_bbt(struct mtd_info *mtd, uint8_t *buf,
 
                memset(&einfo, 0, sizeof(einfo));
                einfo.mtd = mtd;
-               einfo.addr = (unsigned long)to;
+               einfo.addr = to;
                einfo.len = 1 << this->bbt_erase_shift;
                res = nand_erase_nand(mtd, &einfo, 1);
                if (res < 0)
@@ -741,8 +744,9 @@ static int write_bbt(struct mtd_info *mtd, uint8_t *buf,
                if (res < 0)
                        goto outerr;
 
-               printk(KERN_DEBUG "Bad block table written to 0x%08x, version "
-                      "0x%02X\n", (unsigned int)to, td->version[chip]);
+               printk(KERN_DEBUG "Bad block table written to 0x%012llx, "
+                      "version 0x%02X\n", (unsigned long long)to,
+                      td->version[chip]);
 
                /* Mark it as used */
                td->pages[chip] = page;
@@ -922,7 +926,8 @@ static void mark_bbt_region(struct mtd_info *mtd, struct nand_bbt_descr *td)
                        newval = oldval | (0x2 << (block & 0x06));
                        this->bbt[(block >> 3)] = newval;
                        if ((oldval != newval) && td->reserved_block_code)
-                               nand_update_bbt(mtd, block << (this->bbt_erase_shift - 1));
+                               nand_update_bbt(mtd, (loff_t)block <<
+                                       (this->bbt_erase_shift - 1));
                        continue;
                }
                update = 0;
@@ -943,7 +948,8 @@ static void mark_bbt_region(struct mtd_info *mtd, struct nand_bbt_descr *td)
                   new ones have been marked, then we need to update the stored
                   bbts.  This should only happen once. */
                if (update && td->reserved_block_code)
-                       nand_update_bbt(mtd, (block - 2) << (this->bbt_erase_shift - 1));
+                       nand_update_bbt(mtd, (loff_t)(block - 2) <<
+                               (this->bbt_erase_shift - 1));
        }
 }
 
@@ -1039,7 +1045,6 @@ int nand_update_bbt(struct mtd_info *mtd, loff_t offs)
        if (!this->bbt || !td)
                return -EINVAL;
 
-       len = mtd->size >> (this->bbt_erase_shift + 2);
        /* Allocate a temporary buffer for one eraseblock incl. oob */
        len = (1 << this->bbt_erase_shift);
        len += (len >> this->page_shift) * mtd->oobsize;
index f2f3e722e5d0cb5431fb13b719bfa267122e32df..a27d47e5f1f7c4c7c58f17d11b2bb6812a25b0d5 100644 (file)
@@ -21,7 +21,7 @@
 #include <common.h>
 
 #include <nand.h>
-#include <s3c2410.h>
+#include <asm/arch/s3c24x0_cpu.h>
 #include <asm/io.h>
 
 #define S3C2410_NFCONF_EN          (1<<15)
 #define S3C2410_ADDR_NALE 4
 #define S3C2410_ADDR_NCLE 8
 
+#ifdef CONFIG_NAND_SPL
+
+/* in the early stage of NAND flash booting, printf() is not available */
+#define printf(fmt, args...)
+
+static void nand_read_buf(struct mtd_info *mtd, u_char *buf, int len)
+{
+       int i;
+       struct nand_chip *this = mtd->priv;
+
+       for (i = 0; i < len; i++)
+               buf[i] = readb(this->IO_ADDR_R);
+}
+#endif
+
 static void s3c2410_hwcontrol(struct mtd_info *mtd, int cmd, unsigned int ctrl)
 {
        struct nand_chip *chip = mtd->priv;
@@ -83,9 +98,10 @@ void s3c2410_nand_enable_hwecc(struct mtd_info *mtd, int mode)
 static int s3c2410_nand_calculate_ecc(struct mtd_info *mtd, const u_char *dat,
                                      u_char *ecc_code)
 {
-       ecc_code[0] = NFECC0;
-       ecc_code[1] = NFECC1;
-       ecc_code[2] = NFECC2;
+       struct s3c2410_nand *nand = s3c2410_get_base_nand();
+       ecc_code[0] = readb(&nand->NFECC);
+       ecc_code[1] = readb(&nand->NFECC + 1);
+       ecc_code[2] = readb(&nand->NFECC + 2);
        debugX(1, "s3c2410_nand_calculate_hwecc(%p,): 0x%02x 0x%02x 0x%02x\n",
               mtd , ecc_code[0], ecc_code[1], ecc_code[2]);
 
@@ -130,8 +146,13 @@ int board_nand_init(struct nand_chip *nand)
        /* initialize nand_chip data structure */
        nand->IO_ADDR_R = nand->IO_ADDR_W = (void *)&nand_reg->NFDATA;
 
+       nand->select_chip = NULL;
+
        /* read_buf and write_buf are default */
        /* read_byte and write_byte are default */
+#ifdef CONFIG_NAND_SPL
+       nand->read_buf = nand_read_buf;
+#endif
 
        /* hwcontrol always must be implemented */
        nand->cmd_ctrl = s3c2410_hwcontrol;
@@ -142,7 +163,9 @@ int board_nand_init(struct nand_chip *nand)
        nand->ecc.hwctl = s3c2410_nand_enable_hwecc;
        nand->ecc.calculate = s3c2410_nand_calculate_ecc;
        nand->ecc.correct = s3c2410_nand_correct_data;
-       nand->ecc.mode = NAND_ECC_HW3_512;
+       nand->ecc.mode = NAND_ECC_HW;
+       nand->ecc.size = CONFIG_SYS_NAND_ECCSIZE;
+       nand->ecc.bytes = CONFIG_SYS_NAND_ECCBYTES;
 #else
        nand->ecc.mode = NAND_ECC_SOFT;
 #endif
index edaf55a14ed023801b5fd600df01b73af9a15174..084e475649e81d5147b9673fa215e979378bcb75 100644 (file)
@@ -28,7 +28,7 @@
 #include <common.h>
 
 #include <nand.h>
-#include <s3c6400.h>
+#include <asm/arch/s3c6400.h>
 
 #include <asm/io.h>
 #include <asm/errno.h>
index 368fa6ef68eb2974e483c451d74c4d362251d627..f9273ab970489fda54ad8faa1c50e51aad8da887 100644 (file)
@@ -9,6 +9,11 @@
  *      auto-placement support, read-while load support, various fixes
  *      Copyright (C) Nokia Corporation, 2007
  *
+ *      Rohit Hagargundgi <h.rohit at samsung.com>,
+ *      Amul Kumar Saha <amul.saha@samsung.com>:
+ *      Flex-OneNAND support
+ *      Copyright (C) Samsung Electronics, 2009
+ *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
  * published by the Free Software Foundation.
@@ -24,7 +29,7 @@
 #include <malloc.h>
 
 /* It should access 16-bit instead of 8-bit */
-static inline void *memcpy_16(void *dst, const void *src, unsigned int len)
+static void *memcpy_16(void *dst, const void *src, unsigned int len)
 {
        void *ret = dst;
        short *d = dst;
@@ -36,6 +41,27 @@ static inline void *memcpy_16(void *dst, const void *src, unsigned int len)
        return ret;
 }
 
+/**
+ *  onenand_oob_128 - oob info for Flex-Onenand with 4KB page
+ *  For now, we expose only 64 out of 80 ecc bytes
+ */
+static struct nand_ecclayout onenand_oob_128 = {
+       .eccbytes       = 64,
+       .eccpos         = {
+               6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
+               22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
+               38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
+               54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
+               70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
+               86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
+               102, 103, 104, 105
+               },
+       .oobfree        = {
+               {2, 4}, {18, 4}, {34, 4}, {50, 4},
+               {66, 4}, {82, 4}, {98, 4}, {114, 4}
+       }
+};
+
 /**
  * onenand_oob_64 - oob info for large (2KB) page
  */
@@ -74,6 +100,14 @@ static const unsigned char ffchars[] = {
        0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, /* 48 */
        0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
        0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, /* 64 */
+       0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+       0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, /* 80 */
+       0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+       0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, /* 96 */
+       0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+       0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, /* 112 */
+       0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+       0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, /* 128 */
 };
 
 /**
@@ -179,6 +213,85 @@ static int onenand_buffer_address(int dataram1, int sectors, int count)
        return ((bsa << ONENAND_BSA_SHIFT) | bsc);
 }
 
+/**
+ * flexonenand_block - Return block number for flash address
+ * @param this         - OneNAND device structure
+ * @param addr         - Address for which block number is needed
+ */
+static unsigned int flexonenand_block(struct onenand_chip *this, loff_t addr)
+{
+       unsigned int boundary, blk, die = 0;
+
+       if (ONENAND_IS_DDP(this) && addr >= this->diesize[0]) {
+               die = 1;
+               addr -= this->diesize[0];
+       }
+
+       boundary = this->boundary[die];
+
+       blk = addr >> (this->erase_shift - 1);
+       if (blk > boundary)
+               blk = (blk + boundary + 1) >> 1;
+
+       blk += die ? this->density_mask : 0;
+       return blk;
+}
+
+unsigned int onenand_block(struct onenand_chip *this, loff_t addr)
+{
+       if (!FLEXONENAND(this))
+               return addr >> this->erase_shift;
+       return flexonenand_block(this, addr);
+}
+
+/**
+ * flexonenand_addr - Return address of the block
+ * @this:              OneNAND device structure
+ * @block:             Block number on Flex-OneNAND
+ *
+ * Return address of the block
+ */
+static loff_t flexonenand_addr(struct onenand_chip *this, int block)
+{
+       loff_t ofs = 0;
+       int die = 0, boundary;
+
+       if (ONENAND_IS_DDP(this) && block >= this->density_mask) {
+               block -= this->density_mask;
+               die = 1;
+               ofs = this->diesize[0];
+       }
+
+       boundary = this->boundary[die];
+       ofs += (loff_t) block << (this->erase_shift - 1);
+       if (block > (boundary + 1))
+               ofs += (loff_t) (block - boundary - 1)
+                       << (this->erase_shift - 1);
+       return ofs;
+}
+
+loff_t onenand_addr(struct onenand_chip *this, int block)
+{
+       if (!FLEXONENAND(this))
+               return (loff_t) block << this->erase_shift;
+       return flexonenand_addr(this, block);
+}
+
+/**
+ * flexonenand_region - [Flex-OneNAND] Return erase region of addr
+ * @param mtd          MTD device structure
+ * @param addr         address whose erase region needs to be identified
+ */
+int flexonenand_region(struct mtd_info *mtd, loff_t addr)
+{
+       int i;
+
+       for (i = 0; i < mtd->numeraseregions; i++)
+               if (addr < mtd->eraseregions[i].offset)
+                       break;
+       return i - 1;
+}
+
 /**
  * onenand_get_density - [DEFAULT] Get OneNAND density
  * @param dev_id        OneNAND device ID
@@ -205,10 +318,11 @@ static int onenand_command(struct mtd_info *mtd, int cmd, loff_t addr,
                           size_t len)
 {
        struct onenand_chip *this = mtd->priv;
-       int value, readcmd = 0;
+       int value;
        int block, page;
+
        /* Now we use page size operation */
-       int sectors = 4, count = 4;
+       int sectors = 0, count = 0;
 
        /* Address translation */
        switch (cmd) {
@@ -220,15 +334,28 @@ static int onenand_command(struct mtd_info *mtd, int cmd, loff_t addr,
                page = -1;
                break;
 
+       case FLEXONENAND_CMD_PI_ACCESS:
+               /* addr contains die index */
+               block = addr * this->density_mask;
+               page = -1;
+               break;
+
        case ONENAND_CMD_ERASE:
        case ONENAND_CMD_BUFFERRAM:
-               block = (int)(addr >> this->erase_shift);
+               block = onenand_block(this, addr);
                page = -1;
                break;
 
+       case FLEXONENAND_CMD_READ_PI:
+               cmd = ONENAND_CMD_READ;
+               block = addr * this->density_mask;
+               page = 0;
+               break;
+
        default:
-               block = (int)(addr >> this->erase_shift);
-               page = (int)(addr >> this->page_shift);
+               block = onenand_block(this, addr);
+               page = (int) (addr
+                       - onenand_addr(this, block)) >> this->page_shift;
                page &= this->page_mask;
                break;
        }
@@ -240,8 +367,11 @@ static int onenand_command(struct mtd_info *mtd, int cmd, loff_t addr,
                this->write_word(value,
                                 this->base + ONENAND_REG_START_ADDRESS2);
 
-               /* Switch to the next data buffer */
-               ONENAND_SET_NEXT_BUFFERRAM(this);
+               if (ONENAND_IS_MLC(this))
+                       ONENAND_SET_BUFFERRAM0(this);
+               else
+                       /* Switch to the next data buffer */
+                       ONENAND_SET_NEXT_BUFFERRAM(this);
 
                return 0;
        }
@@ -252,7 +382,7 @@ static int onenand_command(struct mtd_info *mtd, int cmd, loff_t addr,
                this->write_word(value,
                                 this->base + ONENAND_REG_START_ADDRESS1);
 
-               /* Write 'DFS, FBA' of Flash */
+               /* Select DataRAM for DDP */
                value = onenand_bufferram_address(this, block);
                this->write_word(value,
                                 this->base + ONENAND_REG_START_ADDRESS2);
@@ -262,10 +392,14 @@ static int onenand_command(struct mtd_info *mtd, int cmd, loff_t addr,
                int dataram;
 
                switch (cmd) {
+               case FLEXONENAND_CMD_RECOVER_LSB:
                case ONENAND_CMD_READ:
                case ONENAND_CMD_READOOB:
-                       dataram = ONENAND_SET_NEXT_BUFFERRAM(this);
-                       readcmd = 1;
+                       if (ONENAND_IS_MLC(this))
+                               dataram = ONENAND_SET_BUFFERRAM0(this);
+                       else
+                               dataram = ONENAND_SET_NEXT_BUFFERRAM(this);
+
                        break;
 
                default:
@@ -291,6 +425,29 @@ static int onenand_command(struct mtd_info *mtd, int cmd, loff_t addr,
        return 0;
 }
 
+/**
+ * onenand_read_ecc - return ecc status
+ * @param this         onenand chip structure
+ */
+static int onenand_read_ecc(struct onenand_chip *this)
+{
+       int ecc, i;
+
+       if (!FLEXONENAND(this))
+               return this->read_word(this->base + ONENAND_REG_ECC_STATUS);
+
+       for (i = 0; i < 4; i++) {
+               ecc = this->read_word(this->base
+                               + ((ONENAND_REG_ECC_STATUS + i) << 1));
+               if (likely(!ecc))
+                       continue;
+               if (ecc & FLEXONENAND_UNCORRECTABLE_ERROR)
+                       return ONENAND_ECC_2BIT_ALL;
+       }
+
+       return 0;
+}
+
 /**
  * onenand_wait - [DEFAULT] wait until the command is done
  * @param mtd          MTD device structure
@@ -305,7 +462,7 @@ static int onenand_wait(struct mtd_info *mtd, int state)
        struct onenand_chip *this = mtd->priv;
        unsigned int flags = ONENAND_INT_MASTER;
        unsigned int interrupt = 0;
-       unsigned int ctrl, ecc;
+       unsigned int ctrl;
 
        while (1) {
                interrupt = this->read_word(this->base + ONENAND_REG_INTERRUPT);
@@ -315,6 +472,14 @@ static int onenand_wait(struct mtd_info *mtd, int state)
 
        ctrl = this->read_word(this->base + ONENAND_REG_CTRL_STATUS);
 
+       if (interrupt & ONENAND_INT_READ) {
+               int ecc = onenand_read_ecc(this);
+               if (ecc & ONENAND_ECC_2BIT_ALL) {
+                       printk("onenand_wait: ECC error = 0x%04x\n", ecc);
+                       return -EBADMSG;
+               }
+       }
+
        if (ctrl & ONENAND_CTRL_ERROR) {
                printk("onenand_wait: controller error = 0x%04x\n", ctrl);
                if (ctrl & ONENAND_CTRL_LOCK)
@@ -324,14 +489,6 @@ static int onenand_wait(struct mtd_info *mtd, int state)
                return -EIO;
        }
 
-       if (interrupt & ONENAND_INT_READ) {
-               ecc = this->read_word(this->base + ONENAND_REG_ECC_STATUS);
-               if (ecc & ONENAND_ECC_2BIT_ALL) {
-                       MTDDEBUG (MTD_DEBUG_LEVEL0,
-                                 "onenand_wait: ECC error = 0x%04x\n", ecc);
-                       return -EBADMSG;
-               }
-       }
 
        return 0;
 }
@@ -499,7 +656,7 @@ static int onenand_check_bufferram(struct mtd_info *mtd, loff_t addr)
 
        if (found && ONENAND_IS_DDP(this)) {
                /* Select DataRAM for DDP */
-               int block = (int) (addr >> this->erase_shift);
+               int block = onenand_block(this, addr);
                int value = onenand_bufferram_address(this, block);
                this->write_word(value, this->base + ONENAND_REG_START_ADDRESS2);
        }
@@ -631,6 +788,45 @@ static int onenand_transfer_auto_oob(struct mtd_info *mtd, uint8_t *buf,
        return 0;
 }
 
+/**
+ * onenand_recover_lsb - [Flex-OneNAND] Recover LSB page data
+ * @param mtd          MTD device structure
+ * @param addr         address to recover
+ * @param status       return value from onenand_wait
+ *
+ * MLC NAND Flash cell has paired pages - LSB page and MSB page. LSB page has
+ * lower page address and MSB page has higher page address in paired pages.
+ * If power off occurs during MSB page program, the paired LSB page data can
+ * become corrupt. LSB page recovery read is a way to read LSB page though page
+ * data are corrupted. When uncorrectable error occurs as a result of LSB page
+ * read after power up, issue LSB page recovery read.
+ */
+static int onenand_recover_lsb(struct mtd_info *mtd, loff_t addr, int status)
+{
+       struct onenand_chip *this = mtd->priv;
+       int i;
+
+       /* Recovery is only for Flex-OneNAND */
+       if (!FLEXONENAND(this))
+               return status;
+
+       /* check if we failed due to uncorrectable error */
+       if (status != -EBADMSG && status != ONENAND_BBT_READ_ECC_ERROR)
+               return status;
+
+       /* check if address lies in MLC region */
+       i = flexonenand_region(mtd, addr);
+       if (mtd->eraseregions[i].erasesize < (1 << this->erase_shift))
+               return status;
+
+       printk("onenand_recover_lsb:"
+               "Attempting to recover from uncorrectable read\n");
+
+       /* Issue the LSB page recovery command */
+       this->command(mtd, FLEXONENAND_CMD_RECOVER_LSB, addr, this->writesize);
+       return this->wait(mtd, FL_READING);
+}
+
 /**
  * onenand_read_ops_nolock - [OneNAND Interface] OneNAND read main and/or out-of-band
  * @param mtd          MTD device structure
@@ -673,6 +869,7 @@ static int onenand_read_ops_nolock(struct mtd_info *mtd, loff_t from,
        stats = mtd->ecc_stats;
 
        /* Read-while-load method */
+       /* Note: We can't use this feature in MLC */
 
        /* Do first load to bufferRAM */
        if (read < len) {
@@ -680,6 +877,8 @@ static int onenand_read_ops_nolock(struct mtd_info *mtd, loff_t from,
                        this->main_buf = buf;
                        this->command(mtd, ONENAND_CMD_READ, from, writesize);
                        ret = this->wait(mtd, FL_READING);
+                       if (unlikely(ret))
+                               ret = onenand_recover_lsb(mtd, from, ret);
                        onenand_update_bufferram(mtd, from, !ret);
                        if (ret == -EBADMSG)
                                ret = 0;
@@ -694,7 +893,7 @@ static int onenand_read_ops_nolock(struct mtd_info *mtd, loff_t from,
        while (!ret) {
                /* If there is more to load then start next load */
                from += thislen;
-               if (read + thislen < len) {
+               if (!ONENAND_IS_MLC(this) && read + thislen < len) {
                        this->main_buf = buf + thislen;
                        this->command(mtd, ONENAND_CMD_READ, from, writesize);
                        /*
@@ -728,6 +927,16 @@ static int onenand_read_ops_nolock(struct mtd_info *mtd, loff_t from,
                        oobcolumn = 0;
                }
 
+               if (ONENAND_IS_MLC(this) && (read + thislen < len)) {
+                       this->command(mtd, ONENAND_CMD_READ, from, writesize);
+                       ret = this->wait(mtd, FL_READING);
+                       if (unlikely(ret))
+                               ret = onenand_recover_lsb(mtd, from, ret);
+                       onenand_update_bufferram(mtd, from, !ret);
+                       if (ret == -EBADMSG)
+                               ret = 0;
+               }
+
                /* See if we are done */
                read += thislen;
                if (read == len)
@@ -735,16 +944,19 @@ static int onenand_read_ops_nolock(struct mtd_info *mtd, loff_t from,
                /* Set up for next read from bufferRAM */
                if (unlikely(boundary))
                        this->write_word(ONENAND_DDP_CHIP1, this->base + ONENAND_REG_START_ADDRESS2);
-               ONENAND_SET_NEXT_BUFFERRAM(this);
+               if (!ONENAND_IS_MLC(this))
+                       ONENAND_SET_NEXT_BUFFERRAM(this);
                buf += thislen;
                thislen = min_t(int, writesize, len - read);
                column = 0;
 
-               /* Now wait for load */
-               ret = this->wait(mtd, FL_READING);
-               onenand_update_bufferram(mtd, from, !ret);
-               if (ret == -EBADMSG)
-                       ret = 0;
+               if (!ONENAND_IS_MLC(this)) {
+                       /* Now wait for load */
+                       ret = this->wait(mtd, FL_READING);
+                       onenand_update_bufferram(mtd, from, !ret);
+                       if (ret == -EBADMSG)
+                               ret = 0;
+               }
        }
 
        /*
@@ -781,7 +993,7 @@ static int onenand_read_oob_nolock(struct mtd_info *mtd, loff_t from,
        size_t len = ops->ooblen;
        mtd_oob_mode_t mode = ops->mode;
        u_char *buf = ops->oobbuf;
-       int ret = 0;
+       int ret = 0, readcmd;
 
        from += ops->ooboffs;
 
@@ -812,16 +1024,21 @@ static int onenand_read_oob_nolock(struct mtd_info *mtd, loff_t from,
 
        stats = mtd->ecc_stats;
 
+       readcmd = ONENAND_IS_MLC(this) ? ONENAND_CMD_READ : ONENAND_CMD_READOOB;
+
        while (read < len) {
                thislen = oobsize - column;
                thislen = min_t(int, thislen, len);
 
                this->spare_buf = buf;
-               this->command(mtd, ONENAND_CMD_READOOB, from, mtd->oobsize);
+               this->command(mtd, readcmd, from, mtd->oobsize);
 
                onenand_update_bufferram(mtd, from, 0);
 
                ret = this->wait(mtd, FL_READING);
+               if (unlikely(ret))
+                       ret = onenand_recover_lsb(mtd, from, ret);
+
                if (ret && ret != -EBADMSG) {
                        printk(KERN_ERR "onenand_read_oob_nolock: read failed = 0x%x\n", ret);
                        break;
@@ -945,9 +1162,12 @@ static int onenand_bbt_wait(struct mtd_info *mtd, int state)
        ctrl = this->read_word(this->base + ONENAND_REG_CTRL_STATUS);
 
        if (interrupt & ONENAND_INT_READ) {
-               int ecc = this->read_word(this->base + ONENAND_REG_ECC_STATUS);
-               if (ecc & ONENAND_ECC_2BIT_ALL)
+               int ecc = onenand_read_ecc(this);
+               if (ecc & ONENAND_ECC_2BIT_ALL) {
+                       printk(KERN_INFO "onenand_bbt_wait: ecc error = 0x%04x"
+                               ", controller = 0x%04x\n", ecc, ctrl);
                        return ONENAND_BBT_READ_ERROR;
+               }
        } else {
                printk(KERN_ERR "onenand_bbt_wait: read timeout!"
                                "ctrl=0x%04x intr=0x%04x\n", ctrl, interrupt);
@@ -976,12 +1196,14 @@ int onenand_bbt_read_oob(struct mtd_info *mtd, loff_t from,
 {
        struct onenand_chip *this = mtd->priv;
        int read = 0, thislen, column;
-       int ret = 0;
+       int ret = 0, readcmd;
        size_t len = ops->ooblen;
        u_char *buf = ops->oobbuf;
 
        MTDDEBUG(MTD_DEBUG_LEVEL3, "onenand_bbt_read_oob: from = 0x%08x, len = %zi\n", (unsigned int) from, len);
 
+       readcmd = ONENAND_IS_MLC(this) ? ONENAND_CMD_READ : ONENAND_CMD_READOOB;
+
        /* Initialize return value */
        ops->oobretlen = 0;
 
@@ -1002,11 +1224,14 @@ int onenand_bbt_read_oob(struct mtd_info *mtd, loff_t from,
                thislen = min_t(int, thislen, len);
 
                this->spare_buf = buf;
-               this->command(mtd, ONENAND_CMD_READOOB, from, mtd->oobsize);
+               this->command(mtd, readcmd, from, mtd->oobsize);
 
                onenand_update_bufferram(mtd, from, 0);
 
                ret = this->bbt_wait(mtd, FL_READING);
+               if (unlikely(ret))
+                       ret = onenand_recover_lsb(mtd, from, ret);
+
                if (ret)
                        break;
 
@@ -1044,9 +1269,11 @@ static int onenand_verify_oob(struct mtd_info *mtd, const u_char *buf, loff_t to
 {
        struct onenand_chip *this = mtd->priv;
        u_char *oob_buf = this->oob_buf;
-       int status, i;
+       int status, i, readcmd;
 
-       this->command(mtd, ONENAND_CMD_READOOB, to, mtd->oobsize);
+       readcmd = ONENAND_IS_MLC(this) ? ONENAND_CMD_READ : ONENAND_CMD_READOOB;
+
+       this->command(mtd, readcmd, to, mtd->oobsize);
        onenand_update_bufferram(mtd, to, 0);
        status = this->wait(mtd, FL_READING);
        if (status)
@@ -1291,7 +1518,7 @@ static int onenand_write_oob_nolock(struct mtd_info *mtd, loff_t to,
 {
        struct onenand_chip *this = mtd->priv;
        int column, ret = 0, oobsize;
-       int written = 0;
+       int written = 0, oobcmd;
        u_char *oobbuf;
        size_t len = ops->ooblen;
        const u_char *buf = ops->oobbuf;
@@ -1333,6 +1560,8 @@ static int onenand_write_oob_nolock(struct mtd_info *mtd, loff_t to,
 
        oobbuf = this->oob_buf;
 
+       oobcmd = ONENAND_IS_MLC(this) ? ONENAND_CMD_PROG : ONENAND_CMD_PROGOOB;
+
        /* Loop until all data write */
        while (written < len) {
                int thislen = min_t(int, oobsize, len - written);
@@ -1348,7 +1577,14 @@ static int onenand_write_oob_nolock(struct mtd_info *mtd, loff_t to,
                        memcpy(oobbuf + column, buf, thislen);
                this->write_bufferram(mtd, 0, ONENAND_SPARERAM, oobbuf, 0, mtd->oobsize);
 
-               this->command(mtd, ONENAND_CMD_PROGOOB, to, mtd->oobsize);
+               if (ONENAND_IS_MLC(this)) {
+                       /* Set main area of DataRAM to 0xff*/
+                       memset(this->page_buf, 0xff, mtd->writesize);
+                       this->write_bufferram(mtd, 0, ONENAND_DATARAM,
+                               this->page_buf, 0, mtd->writesize);
+               }
+
+               this->command(mtd, oobcmd, to, mtd->oobsize);
 
                onenand_update_bufferram(mtd, to, 0);
                if (ONENAND_IS_2PLANE(this)) {
@@ -1475,34 +1711,54 @@ int onenand_erase(struct mtd_info *mtd, struct erase_info *instr)
 {
        struct onenand_chip *this = mtd->priv;
        unsigned int block_size;
-       loff_t addr;
-       int len;
-       int ret = 0;
-
-       MTDDEBUG (MTD_DEBUG_LEVEL3,
-                "onenand_erase: start = 0x%08x, len = %i\n",
-                (unsigned int)instr->addr, (unsigned int)instr->len);
+       loff_t addr = instr->addr;
+       unsigned int len = instr->len;
+       int ret = 0, i;
+       struct mtd_erase_region_info *region = NULL;
+       unsigned int region_end = 0;
 
-       block_size = (1 << this->erase_shift);
+       MTDDEBUG(MTD_DEBUG_LEVEL3, "onenand_erase: start = 0x%08x, len = %i\n",
+                       (unsigned int) addr, len);
 
-       /* Start address must align on block boundary */
-       if (unlikely(instr->addr & (block_size - 1))) {
-               MTDDEBUG (MTD_DEBUG_LEVEL0,
-                        "onenand_erase: Unaligned address\n");
+       /* Do not allow erase past end of device */
+       if (unlikely((len + addr) > mtd->size)) {
+               MTDDEBUG(MTD_DEBUG_LEVEL0, "onenand_erase:"
+                                       "Erase past end of device\n");
                return -EINVAL;
        }
 
-       /* Length must align on block boundary */
-       if (unlikely(instr->len & (block_size - 1))) {
-               MTDDEBUG (MTD_DEBUG_LEVEL0,
-                        "onenand_erase: Length not block aligned\n");
-               return -EINVAL;
+       if (FLEXONENAND(this)) {
+               /* Find the eraseregion of this address */
+               i = flexonenand_region(mtd, addr);
+               region = &mtd->eraseregions[i];
+
+               block_size = region->erasesize;
+               region_end = region->offset
+                       + region->erasesize * region->numblocks;
+
+               /* Start address within region must align on block boundary.
+                * Erase region's start offset is always block start address.
+                */
+               if (unlikely((addr - region->offset) & (block_size - 1))) {
+                       MTDDEBUG(MTD_DEBUG_LEVEL0, "onenand_erase:"
+                               " Unaligned address\n");
+                       return -EINVAL;
+               }
+       } else {
+               block_size = 1 << this->erase_shift;
+
+               /* Start address must align on block boundary */
+               if (unlikely(addr & (block_size - 1))) {
+                       MTDDEBUG(MTD_DEBUG_LEVEL0, "onenand_erase:"
+                                               "Unaligned address\n");
+                       return -EINVAL;
+               }
        }
 
-       /* Do not allow erase past end of device */
-       if (unlikely((instr->len + instr->addr) > mtd->size)) {
+       /* Length must align on block boundary */
+       if (unlikely(len & (block_size - 1))) {
                MTDDEBUG (MTD_DEBUG_LEVEL0,
-                        "onenand_erase: Erase past end of device\n");
+                        "onenand_erase: Length not block aligned\n");
                return -EINVAL;
        }
 
@@ -1512,9 +1768,6 @@ int onenand_erase(struct mtd_info *mtd, struct erase_info *instr)
        onenand_get_device(mtd, FL_ERASING);
 
        /* Loop throught the pages */
-       len = instr->len;
-       addr = instr->addr;
-
        instr->state = MTD_ERASING;
 
        while (len) {
@@ -1541,14 +1794,7 @@ int onenand_erase(struct mtd_info *mtd, struct erase_info *instr)
                        else
                                MTDDEBUG (MTD_DEBUG_LEVEL0, "onenand_erase: "
                                          "Failed erase, block %d\n",
-                                         (unsigned)(addr >> this->erase_shift));
-                       if (ret == -EPERM)
-                               printk("onenand_erase: "
-                                         "Device is write protected!!!\n");
-                       else
-                               printk("onenand_erase: "
-                                         "Failed erase, block %d\n",
-                                         (unsigned)(addr >> this->erase_shift));
+                                       onenand_block(this, addr));
                        instr->state = MTD_ERASE_FAILED;
                        instr->fail_addr = addr;
 
@@ -1557,6 +1803,23 @@ int onenand_erase(struct mtd_info *mtd, struct erase_info *instr)
 
                len -= block_size;
                addr += block_size;
+
+               if (addr == region_end) {
+                       if (!len)
+                               break;
+                       region++;
+
+                       block_size = region->erasesize;
+                       region_end = region->offset
+                               + region->erasesize * region->numblocks;
+
+                       if (len & (block_size - 1)) {
+                               /* This has been checked at MTD
+                                * partitioning level. */
+                               printk("onenand_erase: Unaligned address\n");
+                               goto erase_exit;
+                       }
+               }
        }
 
        instr->state = MTD_ERASE_DONE;
@@ -1634,7 +1897,7 @@ static int onenand_default_block_markbad(struct mtd_info *mtd, loff_t ofs)
        int block;
 
        /* Get block number */
-       block = ((int) ofs) >> bbm->bbt_erase_shift;
+       block = onenand_block(this, ofs);
        if (bbm->bbt)
                bbm->bbt[block >> 2] |= 0x01 << ((block & 0x03) << 1);
 
@@ -1682,8 +1945,8 @@ static int onenand_do_lock_cmd(struct mtd_info *mtd, loff_t ofs, size_t len, int
        int start, end, block, value, status;
        int wp_status_mask;
 
-       start = ofs >> this->erase_shift;
-       end = len >> this->erase_shift;
+       start = onenand_block(this, ofs);
+       end = onenand_block(this, ofs + len);
 
        if (cmd == ONENAND_CMD_LOCK)
                wp_status_mask = ONENAND_WP_LS;
@@ -1718,7 +1981,7 @@ static int onenand_do_lock_cmd(struct mtd_info *mtd, loff_t ofs, size_t len, int
        }
 
        /* Block lock scheme */
-       for (block = start; block < start + end; block++) {
+       for (block = start; block < end; block++) {
                /* Set block address */
                value = onenand_block_address(this, block);
                this->write_word(value, this->base + ONENAND_REG_START_ADDRESS1);
@@ -1831,7 +2094,7 @@ static void onenand_unlock_all(struct mtd_info *mtd)
 {
        struct onenand_chip *this = mtd->priv;
        loff_t ofs = 0;
-       size_t len = this->chipsize;
+       size_t len = mtd->size;
 
        if (this->options & ONENAND_HAS_UNLOCK_ALL) {
                /* Set start block address */
@@ -1847,14 +2110,12 @@ static void onenand_unlock_all(struct mtd_info *mtd)
                                & ONENAND_CTRL_ONGO)
                        continue;
 
-               return;
-
                /* Check lock status */
                if (onenand_check_lock_status(this))
                        return;
 
                /* Workaround for all block unlock in DDP */
-               if (ONENAND_IS_DDP(this)) {
+               if (ONENAND_IS_DDP(this) && !FLEXONENAND(this)) {
                        /* All blocks on another chip */
                        ofs = this->chipsize >> 1;
                        len = this->chipsize >> 1;
@@ -1906,6 +2167,14 @@ static void onenand_check_features(struct mtd_info *mtd)
                break;
        }
 
+       if (ONENAND_IS_MLC(this))
+               this->options &= ~ONENAND_HAS_2PLANE;
+
+       if (FLEXONENAND(this)) {
+               this->options &= ~ONENAND_HAS_CONT_LOCK;
+               this->options |= ONENAND_HAS_UNLOCK_ALL;
+       }
+
        if (this->options & ONENAND_HAS_CONT_LOCK)
                printk(KERN_DEBUG "Lock scheme is Continuous Lock\n");
        if (this->options & ONENAND_HAS_UNLOCK_ALL)
@@ -1922,16 +2191,18 @@ static void onenand_check_features(struct mtd_info *mtd)
  */
 char *onenand_print_device_info(int device, int version)
 {
-       int vcc, demuxed, ddp, density;
+       int vcc, demuxed, ddp, density, flexonenand;
        char *dev_info = malloc(80);
        char *p = dev_info;
 
        vcc = device & ONENAND_DEVICE_VCC_MASK;
        demuxed = device & ONENAND_DEVICE_IS_DEMUX;
        ddp = device & ONENAND_DEVICE_IS_DDP;
-       density = device >> ONENAND_DEVICE_DENSITY_SHIFT;
-       p += sprintf(dev_info, "%sOneNAND%s %dMB %sV 16-bit (0x%02x)",
+       density = onenand_get_density(device);
+       flexonenand = device & DEVICE_IS_FLEXONENAND;
+       p += sprintf(dev_info, "%s%sOneNAND%s %dMB %sV 16-bit (0x%02x)",
               demuxed ? "" : "Muxed ",
+              flexonenand ? "Flex-" : "",
               ddp ? "(DDP)" : "",
               (16 << density), vcc ? "2.65/3.3" : "1.8", device);
 
@@ -1957,7 +2228,7 @@ static int onenand_check_maf(int manuf)
        char *name;
        int i;
 
-       for (i = 0; size; i++)
+       for (i = 0; i < size; i++)
                if (manuf == onenand_manuf_ids[i].id)
                        break;
 
@@ -1973,6 +2244,265 @@ static int onenand_check_maf(int manuf)
        return i == size;
 }
 
+/**
+* flexonenand_get_boundary     - Reads the SLC boundary
+* @param onenand_info          - onenand info structure
+*
+* Fill up boundary[] field in onenand_chip
+**/
+static int flexonenand_get_boundary(struct mtd_info *mtd)
+{
+       struct onenand_chip *this = mtd->priv;
+       unsigned int die, bdry;
+       int ret, syscfg, locked;
+
+       /* Disable ECC */
+       syscfg = this->read_word(this->base + ONENAND_REG_SYS_CFG1);
+       this->write_word((syscfg | 0x0100), this->base + ONENAND_REG_SYS_CFG1);
+
+       for (die = 0; die < this->dies; die++) {
+               this->command(mtd, FLEXONENAND_CMD_PI_ACCESS, die, 0);
+               this->wait(mtd, FL_SYNCING);
+
+               this->command(mtd, FLEXONENAND_CMD_READ_PI, die, 0);
+               ret = this->wait(mtd, FL_READING);
+
+               bdry = this->read_word(this->base + ONENAND_DATARAM);
+               if ((bdry >> FLEXONENAND_PI_UNLOCK_SHIFT) == 3)
+                       locked = 0;
+               else
+                       locked = 1;
+               this->boundary[die] = bdry & FLEXONENAND_PI_MASK;
+
+               this->command(mtd, ONENAND_CMD_RESET, 0, 0);
+               ret = this->wait(mtd, FL_RESETING);
+
+               printk(KERN_INFO "Die %d boundary: %d%s\n", die,
+                      this->boundary[die], locked ? "(Locked)" : "(Unlocked)");
+       }
+
+       /* Enable ECC */
+       this->write_word(syscfg, this->base + ONENAND_REG_SYS_CFG1);
+       return 0;
+}
+
+/**
+ * flexonenand_get_size - Fill up fields in onenand_chip and mtd_info
+ *                       boundary[], diesize[], mtd->size, mtd->erasesize,
+ *                       mtd->eraseregions
+ * @param mtd          - MTD device structure
+ */
+static void flexonenand_get_size(struct mtd_info *mtd)
+{
+       struct onenand_chip *this = mtd->priv;
+       int die, i, eraseshift, density;
+       int blksperdie, maxbdry;
+       loff_t ofs;
+
+       density = onenand_get_density(this->device_id);
+       blksperdie = ((loff_t)(16 << density) << 20) >> (this->erase_shift);
+       blksperdie >>= ONENAND_IS_DDP(this) ? 1 : 0;
+       maxbdry = blksperdie - 1;
+       eraseshift = this->erase_shift - 1;
+
+       mtd->numeraseregions = this->dies << 1;
+
+       /* This fills up the device boundary */
+       flexonenand_get_boundary(mtd);
+       die = 0;
+       ofs = 0;
+       i = -1;
+       for (; die < this->dies; die++) {
+               if (!die || this->boundary[die-1] != maxbdry) {
+                       i++;
+                       mtd->eraseregions[i].offset = ofs;
+                       mtd->eraseregions[i].erasesize = 1 << eraseshift;
+                       mtd->eraseregions[i].numblocks =
+                                                       this->boundary[die] + 1;
+                       ofs += mtd->eraseregions[i].numblocks << eraseshift;
+                       eraseshift++;
+               } else {
+                       mtd->numeraseregions -= 1;
+                       mtd->eraseregions[i].numblocks +=
+                                                       this->boundary[die] + 1;
+                       ofs += (this->boundary[die] + 1) << (eraseshift - 1);
+               }
+               if (this->boundary[die] != maxbdry) {
+                       i++;
+                       mtd->eraseregions[i].offset = ofs;
+                       mtd->eraseregions[i].erasesize = 1 << eraseshift;
+                       mtd->eraseregions[i].numblocks = maxbdry ^
+                                                        this->boundary[die];
+                       ofs += mtd->eraseregions[i].numblocks << eraseshift;
+                       eraseshift--;
+               } else
+                       mtd->numeraseregions -= 1;
+       }
+
+       /* Expose MLC erase size except when all blocks are SLC */
+       mtd->erasesize = 1 << this->erase_shift;
+       if (mtd->numeraseregions == 1)
+               mtd->erasesize >>= 1;
+
+       printk(KERN_INFO "Device has %d eraseregions\n", mtd->numeraseregions);
+       for (i = 0; i < mtd->numeraseregions; i++)
+               printk(KERN_INFO "[offset: 0x%08llx, erasesize: 0x%05x,"
+                       " numblocks: %04u]\n", mtd->eraseregions[i].offset,
+                       mtd->eraseregions[i].erasesize,
+                       mtd->eraseregions[i].numblocks);
+
+       for (die = 0, mtd->size = 0; die < this->dies; die++) {
+               this->diesize[die] = (loff_t) (blksperdie << this->erase_shift);
+               this->diesize[die] -= (loff_t) (this->boundary[die] + 1)
+                                                << (this->erase_shift - 1);
+               mtd->size += this->diesize[die];
+       }
+}
+
+/**
+ * flexonenand_check_blocks_erased - Check if blocks are erased
+ * @param mtd_info     - mtd info structure
+ * @param start                - first erase block to check
+ * @param end          - last erase block to check
+ *
+ * Converting an unerased block from MLC to SLC
+ * causes byte values to change. Since both data and its ECC
+ * have changed, reads on the block give uncorrectable error.
+ * This might lead to the block being detected as bad.
+ *
+ * Avoid this by ensuring that the block to be converted is
+ * erased.
+ */
+static int flexonenand_check_blocks_erased(struct mtd_info *mtd,
+                                       int start, int end)
+{
+       struct onenand_chip *this = mtd->priv;
+       int i, ret;
+       int block;
+       struct mtd_oob_ops ops = {
+               .mode = MTD_OOB_PLACE,
+               .ooboffs = 0,
+               .ooblen = mtd->oobsize,
+               .datbuf = NULL,
+               .oobbuf = this->oob_buf,
+       };
+       loff_t addr;
+
+       printk(KERN_DEBUG "Check blocks from %d to %d\n", start, end);
+
+       for (block = start; block <= end; block++) {
+               addr = flexonenand_addr(this, block);
+               if (onenand_block_isbad_nolock(mtd, addr, 0))
+                       continue;
+
+               /*
+                * Since main area write results in ECC write to spare,
+                * it is sufficient to check only ECC bytes for change.
+                */
+               ret = onenand_read_oob_nolock(mtd, addr, &ops);
+               if (ret)
+                       return ret;
+
+               for (i = 0; i < mtd->oobsize; i++)
+                       if (this->oob_buf[i] != 0xff)
+                               break;
+
+               if (i != mtd->oobsize) {
+                       printk(KERN_WARNING "Block %d not erased.\n", block);
+                       return 1;
+               }
+       }
+
+       return 0;
+}
+
+/**
+ * flexonenand_set_boundary    - Writes the SLC boundary
+ * @param mtd                  - mtd info structure
+ */
+int flexonenand_set_boundary(struct mtd_info *mtd, int die,
+                                   int boundary, int lock)
+{
+       struct onenand_chip *this = mtd->priv;
+       int ret, density, blksperdie, old, new, thisboundary;
+       loff_t addr;
+
+       if (die >= this->dies)
+               return -EINVAL;
+
+       if (boundary == this->boundary[die])
+               return 0;
+
+       density = onenand_get_density(this->device_id);
+       blksperdie = ((16 << density) << 20) >> this->erase_shift;
+       blksperdie >>= ONENAND_IS_DDP(this) ? 1 : 0;
+
+       if (boundary >= blksperdie) {
+               printk("flexonenand_set_boundary:"
+                       "Invalid boundary value. "
+                       "Boundary not changed.\n");
+               return -EINVAL;
+       }
+
+       /* Check if converting blocks are erased */
+       old = this->boundary[die] + (die * this->density_mask);
+       new = boundary + (die * this->density_mask);
+       ret = flexonenand_check_blocks_erased(mtd, min(old, new)
+                                               + 1, max(old, new));
+       if (ret) {
+               printk(KERN_ERR "flexonenand_set_boundary: Please erase blocks before boundary change\n");
+               return ret;
+       }
+
+       this->command(mtd, FLEXONENAND_CMD_PI_ACCESS, die, 0);
+       this->wait(mtd, FL_SYNCING);
+
+       /* Check is boundary is locked */
+       this->command(mtd, FLEXONENAND_CMD_READ_PI, die, 0);
+       ret = this->wait(mtd, FL_READING);
+
+       thisboundary = this->read_word(this->base + ONENAND_DATARAM);
+       if ((thisboundary >> FLEXONENAND_PI_UNLOCK_SHIFT) != 3) {
+               printk(KERN_ERR "flexonenand_set_boundary: boundary locked\n");
+               goto out;
+       }
+
+       printk(KERN_INFO "flexonenand_set_boundary: Changing die %d boundary: %d%s\n",
+                       die, boundary, lock ? "(Locked)" : "(Unlocked)");
+
+       boundary &= FLEXONENAND_PI_MASK;
+       boundary |= lock ? 0 : (3 << FLEXONENAND_PI_UNLOCK_SHIFT);
+
+       addr = die ? this->diesize[0] : 0;
+       this->command(mtd, ONENAND_CMD_ERASE, addr, 0);
+       ret = this->wait(mtd, FL_ERASING);
+       if (ret) {
+               printk("flexonenand_set_boundary:"
+                       "Failed PI erase for Die %d\n", die);
+               goto out;
+       }
+
+       this->write_word(boundary, this->base + ONENAND_DATARAM);
+       this->command(mtd, ONENAND_CMD_PROG, addr, 0);
+       ret = this->wait(mtd, FL_WRITING);
+       if (ret) {
+               printk("flexonenand_set_boundary:"
+                       "Failed PI write for Die %d\n", die);
+               goto out;
+       }
+
+       this->command(mtd, FLEXONENAND_CMD_PI_UPDATE, die, 0);
+       ret = this->wait(mtd, FL_WRITING);
+out:
+       this->write_word(ONENAND_CMD_RESET, this->base + ONENAND_REG_COMMAND);
+       this->wait(mtd, FL_RESETING);
+       if (!ret)
+               /* Recalculate device size on boundary change*/
+               flexonenand_get_size(mtd);
+
+       return ret;
+}
+
 /**
  * onenand_probe - [OneNAND Interface] Probe the OneNAND device
  * @param mtd          MTD device structure
@@ -2016,48 +2546,69 @@ static int onenand_probe(struct mtd_info *mtd)
        maf_id = this->read_word(this->base + ONENAND_REG_MANUFACTURER_ID);
        dev_id = this->read_word(this->base + ONENAND_REG_DEVICE_ID);
        ver_id = this->read_word(this->base + ONENAND_REG_VERSION_ID);
+       this->technology = this->read_word(this->base + ONENAND_REG_TECHNOLOGY);
 
        /* Check OneNAND device */
        if (maf_id != bram_maf_id || dev_id != bram_dev_id)
                return -ENXIO;
 
-       /* FIXME : Current OneNAND MTD doesn't support Flex-OneNAND */
-       if (dev_id & (1 << 9)) {
-               printk("Not yet support Flex-OneNAND\n");
-               return -ENXIO;
-       }
-
        /* Flash device information */
        mtd->name = onenand_print_device_info(dev_id, ver_id);
        this->device_id = dev_id;
        this->version_id = ver_id;
 
        density = onenand_get_density(dev_id);
+       if (FLEXONENAND(this)) {
+               this->dies = ONENAND_IS_DDP(this) ? 2 : 1;
+               /* Maximum possible erase regions */
+               mtd->numeraseregions = this->dies << 1;
+               mtd->eraseregions = malloc(sizeof(struct mtd_erase_region_info)
+                                       * (this->dies << 1));
+               if (!mtd->eraseregions)
+                       return -ENOMEM;
+       }
+
+       /*
+        * For Flex-OneNAND, chipsize represents maximum possible device size.
+        * mtd->size represents the actual device size.
+        */
        this->chipsize = (16 << density) << 20;
-       /* Set density mask. it is used for DDP */
-       if (ONENAND_IS_DDP(this))
-               this->density_mask = (1 << (density + 6));
-       else
-               this->density_mask = 0;
 
        /* OneNAND page size & block size */
        /* The data buffer size is equal to page size */
        mtd->writesize =
            this->read_word(this->base + ONENAND_REG_DATA_BUFFER_SIZE);
+       /* We use the full BufferRAM */
+       if (ONENAND_IS_MLC(this))
+               mtd->writesize <<= 1;
+
        mtd->oobsize = mtd->writesize >> 5;
        /* Pagers per block is always 64 in OneNAND */
        mtd->erasesize = mtd->writesize << 6;
+       /*
+        * Flex-OneNAND SLC area has 64 pages per block.
+        * Flex-OneNAND MLC area has 128 pages per block.
+        * Expose MLC erase size to find erase_shift and page_mask.
+        */
+       if (FLEXONENAND(this))
+               mtd->erasesize <<= 1;
 
        this->erase_shift = ffs(mtd->erasesize) - 1;
        this->page_shift = ffs(mtd->writesize) - 1;
        this->ppb_shift = (this->erase_shift - this->page_shift);
        this->page_mask = (mtd->erasesize / mtd->writesize) - 1;
+       /* Set density mask. it is used for DDP */
+       if (ONENAND_IS_DDP(this))
+               this->density_mask = this->chipsize >> (this->erase_shift + 1);
        /* It's real page size */
        this->writesize = mtd->writesize;
 
        /* REVIST: Multichip handling */
 
-       mtd->size = this->chipsize;
+       if (FLEXONENAND(this))
+               flexonenand_get_size(mtd);
+       else
+               mtd->size = this->chipsize;
 
        /* Check OneNAND features */
        onenand_check_features(mtd);
@@ -2149,6 +2700,11 @@ int onenand_scan(struct mtd_info *mtd, int maxchips)
         * Allow subpage writes up to oobsize.
         */
        switch (mtd->oobsize) {
+       case 128:
+               this->ecclayout = &onenand_oob_128;
+               mtd->subpage_sft = 0;
+               break;
+
        case 64:
                this->ecclayout = &onenand_oob_64;
                mtd->subpage_sft = 2;
index d538f95828f56957c9271aeb9f3dc3a4354f5433..1354877729d9aa8a8d4814b1a414b8c02687dfb3 100644 (file)
@@ -69,6 +69,7 @@ static int create_bbt(struct mtd_info *mtd, uint8_t * buf,
        loff_t from;
        size_t readlen, ooblen;
        struct mtd_oob_ops ops;
+       int rgn;
 
        printk(KERN_INFO "Scanning device for bad blocks\n");
 
@@ -82,7 +83,7 @@ static int create_bbt(struct mtd_info *mtd, uint8_t * buf,
        /* Note that numblocks is 2 * (real numblocks) here;
         * see i += 2 below as it makses shifting and masking less painful
         */
-       numblocks = mtd->size >> (bbm->bbt_erase_shift - 1);
+       numblocks = this->chipsize >> (bbm->bbt_erase_shift - 1);
        startblock = 0;
        from = 0;
 
@@ -115,7 +116,12 @@ static int create_bbt(struct mtd_info *mtd, uint8_t * buf,
                        }
                }
                i += 2;
-               from += (1 << bbm->bbt_erase_shift);
+
+               if (FLEXONENAND(this)) {
+                       rgn = flexonenand_region(mtd, from);
+                       from += mtd->eraseregions[rgn].erasesize;
+               } else
+                       from += (1 << bbm->bbt_erase_shift);
        }
 
        return 0;
@@ -152,7 +158,7 @@ static int onenand_isbad_bbt(struct mtd_info *mtd, loff_t offs, int allowbbt)
        uint8_t res;
 
        /* Get block number * 2 */
-       block = (int)(offs >> (bbm->bbt_erase_shift - 1));
+       block = (int) (onenand_block(this, offs) << 1);
        res = (bbm->bbt[block >> 3] >> (block & 0x06)) & 0x03;
 
        MTDDEBUG (MTD_DEBUG_LEVEL2,
@@ -191,7 +197,7 @@ int onenand_scan_bbt(struct mtd_info *mtd, struct nand_bbt_descr *bd)
        struct bbm_info *bbm = this->bbm;
        int len, ret = 0;
 
-       len = mtd->size >> (this->erase_shift + 2);
+       len = this->chipsize >> (this->erase_shift + 2);
        /* Allocate memory (2bit per block) */
        bbm->bbt = malloc(len);
        if (!bbm->bbt) {
index 9823b5b47839e389e54e89bb36219b1b0904c707..c642016c2d2ed482a903ecf6f2ead3f119008c76 100644 (file)
@@ -40,8 +40,10 @@ void onenand_init(void)
 
        onenand_scan(&onenand_mtd, 1);
 
+       if (onenand_chip.device_id & DEVICE_IS_FLEXONENAND)
+               puts("Flex-");
        puts("OneNAND: ");
-       print_size(onenand_mtd.size, "\n");
+       print_size(onenand_chip.chipsize, "\n");
 
 #ifdef CONFIG_MTD_DEVICE
        /*
index c3c0bc2f591e7491483c9511d3fde017070d9264..7738a7acaa0c79054d67a835945fdf30a5810cef 100644 (file)
@@ -47,15 +47,15 @@ struct ftrtc010 {
 
 static struct ftrtc010 *rtc = (struct ftrtc010 *)CONFIG_FTRTC010_BASE;
 
-static void ftrtc010_enable (void)
+static void ftrtc010_enable(void)
 {
-       writel (FTRTC010_CR_ENABLE, &rtc->cr);
+       writel(FTRTC010_CR_ENABLE, &rtc->cr);
 }
 
 /*
  * return current time in seconds
  */
-static unsigned long ftrtc010_time (void)
+static unsigned long ftrtc010_time(void)
 {
        unsigned long day;
        unsigned long hour;
@@ -64,11 +64,11 @@ static unsigned long ftrtc010_time (void)
        unsigned long second2;
 
        do {
-               second  = readl (&rtc->sec);
-               day     = readl (&rtc->day);
-               hour    = readl (&rtc->hour);
-               minute  = readl (&rtc->min);
-               second2 = readl (&rtc->sec);
+               second  = readl(&rtc->sec);
+               day     = readl(&rtc->day);
+               hour    = readl(&rtc->hour);
+               minute  = readl(&rtc->min);
+               second2 = readl(&rtc->sec);
        } while (second != second2);
 
        return day * 24 * 60 * 60 + hour * 60 * 60 + minute * 60 + second;
@@ -78,16 +78,16 @@ static unsigned long ftrtc010_time (void)
  * Get the current time from the RTC
  */
 
-int rtc_get (struct rtc_time *tmp)
+int rtc_get(struct rtc_time *tmp)
 {
        unsigned long now;
 
-       debug ("%s(): record register: %x\n",
-              __func__, readl (&rtc->record));
+       debug("%s(): record register: %x\n",
+             __func__, readl(&rtc->record));
 
-       now = ftrtc010_time () + readl (&rtc->record);
+       now = ftrtc010_time() + readl(&rtc->record);
 
-       to_tm (now, tmp);
+       to_tm(now, tmp);
 
        return 0;
 }
@@ -95,30 +95,30 @@ int rtc_get (struct rtc_time *tmp)
 /*
  * Set the RTC
  */
-int rtc_set (struct rtc_time *tmp)
+int rtc_set(struct rtc_time *tmp)
 {
        unsigned long new;
        unsigned long now;
 
-       debug ("%s(): DATE: %4d-%02d-%02d (wday=%d)  TIME: %2d:%02d:%02d\n",
-              __func__,
-              tmp->tm_year, tmp->tm_mon, tmp->tm_mday, tmp->tm_wday,
-              tmp->tm_hour, tmp->tm_min, tmp->tm_sec);
+       debug("%s(): DATE: %4d-%02d-%02d (wday=%d)  TIME: %2d:%02d:%02d\n",
+             __func__,
+             tmp->tm_year, tmp->tm_mon, tmp->tm_mday, tmp->tm_wday,
+             tmp->tm_hour, tmp->tm_min, tmp->tm_sec);
 
-       new = mktime (tmp->tm_year, tmp->tm_mon, tmp->tm_mday, tmp->tm_hour,
-                     tmp->tm_min, tmp->tm_sec);
+       new = mktime(tmp->tm_year, tmp->tm_mon, tmp->tm_mday, tmp->tm_hour,
+                    tmp->tm_min, tmp->tm_sec);
 
-       now = ftrtc010_time ();
+       now = ftrtc010_time();
 
-       debug ("%s(): write %lx to record register\n", __func__, new - now);
+       debug("%s(): write %lx to record register\n", __func__, new - now);
 
-       writel (new - now, &rtc->record);
+       writel(new - now, &rtc->record);
 
        return 0;
 }
 
-void rtc_reset (void)
+void rtc_reset(void)
 {
-       debug ("%s()\n", __func__);
-       ftrtc010_enable ();
+       debug("%s()\n", __func__);
+       ftrtc010_enable();
 }
index 02b41d91b1ac29f95a550b6ea17c18747e210e0c..5b665bb0133391a413b63a0ea1b99ffa9bc573f9 100644 (file)
@@ -120,5 +120,4 @@ void rtc_reset(void)
         * Could not be tested as the reset pin is not wired on
         * the sbc35-ag20 board
         */
-       return 0;
 }
index 1ce34e38df3cf47b2f4341eb113a38778e284171..04de5ca545d52c88780e459bdd785a806d5e822f 100644 (file)
 
 #if (defined(CONFIG_CMD_DATE))
 
-#if defined(CONFIG_S3C2400)
-#include <s3c2400.h>
-#elif defined(CONFIG_S3C2410)
-#include <s3c2410.h>
-#endif
+#include <asm/arch/s3c24x0_cpu.h>
 
 #include <rtc.h>
 #include <asm/io.h>
index 1b974e04fef074a5a1ddcdc76e26e4f7cdd4a624..6d22df7cf4ee7bdad47093e36ee227094dd68d28 100644 (file)
@@ -23,7 +23,7 @@
 
 #include <common.h>
 
-#include <s3c6400.h>
+#include <asm/arch/s3c6400.h>
 
 #ifdef CONFIG_SERIAL1
 #define UART_NR        S3C64XX_UART0
index c2c72e456f30ad75dcf2ffae29f60304cad1e287..5dd4dd8160469c6d66df82fe141524132cf0d3a2 100644 (file)
  */
 
 #include <common.h>
-#if defined(CONFIG_S3C2400) || defined(CONFIG_TRAB)
-#include <s3c2400.h>
-#elif defined(CONFIG_S3C2410)
-#include <s3c2410.h>
-#endif
+#include <asm/arch/s3c24x0_cpu.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
index 68c06a9190fc687671192cb4e954af93429f24ab..73669a9f1704b581480d8257797082df786e28ad 100644 (file)
@@ -98,14 +98,24 @@ int serial_init_dev(const int dev_index)
        return 0;
 }
 
-static int serial_err_check(const int dev_index)
+static int serial_err_check(const int dev_index, int op)
 {
        struct s5pc1xx_uart *const uart = s5pc1xx_get_base_uart(dev_index);
+       unsigned int mask;
+
+       /*
+        * UERSTAT
+        * Break Detect [3]
+        * Frame Err    [2] : receive operation
+        * Parity Err   [1] : receive operation
+        * Overrun Err  [0] : receive operation
+        */
+       if (op)
+               mask = 0x8;
+       else
+               mask = 0xf;
 
-       if (readl(&uart->uerstat) & 0xf)
-               return 1;
-
-       return 0;
+       return readl(&uart->uerstat) & mask;
 }
 
 /*
@@ -119,7 +129,7 @@ int serial_getc_dev(const int dev_index)
 
        /* wait for character to arrive */
        while (!(readl(&uart->utrstat) & 0x1)) {
-               if (serial_err_check(dev_index))
+               if (serial_err_check(dev_index, 0))
                        return 0;
        }
 
@@ -135,7 +145,7 @@ void serial_putc_dev(const char c, const int dev_index)
 
        /* wait for room in the tx FIFO */
        while (!(readl(&uart->utrstat) & 0x2)) {
-               if (serial_err_check(dev_index))
+               if (serial_err_check(dev_index, 1))
                        return;
        }
 
index 67d478f8701383cce383b55064fc0b39cb1b5ee1..b03a60044e854f66f95ad77d33f0f183a75b55e8 100644 (file)
@@ -65,8 +65,7 @@
 #endif
 
 #if defined(CONFIG_ARM920T) || \
-    defined(CONFIG_S3C2400) || \
-    defined(CONFIG_S3C2410) || \
+    defined(CONFIG_S3C24X0) || \
     defined(CONFIG_S3C6400) || \
     defined(CONFIG_440EP) || \
     defined(CONFIG_PCI_OHCI) || \
index 274a4ed309783fe42d9678ad84da49c58b8fe78a..cd295dabb782a298b34e34af78d28885e29ec0fb 100644 (file)
@@ -25,7 +25,7 @@
  */
 
 #include <common.h>
-#include <s3c6400.h>
+#include <asm/arch/s3c6400.h>
 
 int usb_cpu_init(void)
 {
index fbc4df9f69c964a385eadc87c3584eeecd526e27..16d6689f228a307cfb93c40874b0eb254481b48c 100644 (file)
@@ -146,9 +146,11 @@ CONFIG_VIDEO_HW_CURSOR:         - Uses the hardware cursor capability of the
 #ifdef CONFIG_VIDEO_CORALP
 #define VIDEO_FB_LITTLE_ENDIAN
 #endif
+#ifdef CONFIG_VIDEO_MB862xx_ACCEL
 #define VIDEO_HW_RECTFILL
 #define VIDEO_HW_BITBLT
 #endif
+#endif
 
 /*****************************************************************************/
 /* Include video_fb.h after definitions of VIDEO_HW_RECTFILL etc            */
@@ -319,7 +321,7 @@ void        console_cursor (int state);
 #else
 #define SWAP16(x)       (x)
 #define SWAP32(x)       (x)
-#if defined(VIDEO_FB_16BPP_PIXEL_SWAP)
+#if defined(VIDEO_FB_16BPP_WORD_SWAP)
 #define SHORTSWAP32(x)  ( ((x) >> 16) | ((x) << 16) )
 #else
 #define SHORTSWAP32(x)  (x)
index a8676cc645f7ec160777ad8f09131c62b54798b7..edf34aa061330de697874410025a86bc66506497 100644 (file)
@@ -89,6 +89,7 @@ unsigned int fr_div[] = { 0x00000f00, 0x00000900, 0x00000500 };
                                       (GC_DISP_BASE | GC_L0PAL0) + \
                                       ((idx) << 2)), (val))
 
+#if defined(CONFIG_VIDEO_MB862xx_ACCEL)
 static void gdc_sw_reset (void)
 {
        GraphicDevice *dev = &mb862xx;
@@ -129,6 +130,7 @@ static void de_wait_slots (int slots)
                        break;
                }
 }
+#endif
 
 #if !defined(CONFIG_VIDEO_CORALP)
 static void board_disp_init (void)
@@ -144,11 +146,13 @@ static void board_disp_init (void)
 #endif
 
 /*
- * Init drawing engine
+ * Init drawing engine if accel enabled.
+ * Also clears visible framebuffer.
  */
 static void de_init (void)
 {
        GraphicDevice *dev = &mb862xx;
+#if defined(CONFIG_VIDEO_MB862xx_ACCEL)
        int cf = (dev->gdfBytesPP == 1) ? 0x0000 : 0x8000;
 
        dev->dprBase = dev->frameAdrs + GC_DRAW_BASE;
@@ -174,6 +178,14 @@ static void de_init (void)
        DE_WR_FIFO (dev->winSizeY << 16 | dev->winSizeX);
        /* sync with SW access to framebuffer */
        de_wait ();
+#else
+       unsigned int i, *p;
+
+       i = dev->winSizeX * dev->winSizeY;
+       p = (unsigned int *)dev->frameAdrs;
+       while (i--)
+               *p++ = 0;
+#endif
 }
 
 #if defined(CONFIG_VIDEO_CORALP)
@@ -340,6 +352,30 @@ unsigned int card_init (void)
 }
 #endif
 
+
+#if !defined(CONFIG_VIDEO_CORALP)
+int mb862xx_probe(unsigned int addr)
+{
+       GraphicDevice *dev = &mb862xx;
+       unsigned int reg;
+
+       dev->frameAdrs = addr;
+       dev->dprBase = dev->frameAdrs + GC_DRAW_BASE;
+
+       /* Try to access GDC ID/Revision registers */
+       reg = HOST_RD_REG (GC_CID);
+       reg = HOST_RD_REG (GC_CID);
+       if (reg == 0x303) {
+               reg = DE_RD_REG(GC_REV);
+               reg = DE_RD_REG(GC_REV);
+               if ((reg & ~0xff) == 0x20050100)
+                       return MB862XX_TYPE_LIME;
+       }
+
+       return 0;
+}
+#endif
+
 void *video_hw_init (void)
 {
        GraphicDevice *dev = &mb862xx;
@@ -359,8 +395,16 @@ void *video_hw_init (void)
        if ((dev->frameAdrs = board_video_init ()) == 0) {
                puts ("Controller not found!\n");
                return NULL;
-       } else
+       } else {
                puts ("Lime\n");
+
+               /* Set Change of Clock Frequency Register */
+               HOST_WR_REG (GC_CCF, CONFIG_SYS_MB862xx_CCF);
+               /* Delay required */
+               udelay(300);
+               /* Set Memory I/F Mode Register) */
+               HOST_WR_REG (GC_MMR, CONFIG_SYS_MB862xx_MMR);
+       }
 #endif
 
        de_init ();
@@ -389,6 +433,7 @@ void video_set_lut (unsigned int index, unsigned char r,
        L0PAL_WR_REG (index, (r << 16) | (g << 8) | (b));
 }
 
+#if defined(CONFIG_VIDEO_MB862xx_ACCEL)
 /*
  * Drawing engine Fill and BitBlt screen region
  */
@@ -430,3 +475,4 @@ void video_hw_bitblt (unsigned int bpp, unsigned int src_x,
        DE_WR_FIFO ((height << 16) | width);
        de_wait (); /* sync */
 }
+#endif
index 04a270b450127a088da3de626a756b04ff7d8814..d4c5ca2559f431d12494a4350b4645430d9efef9 100644 (file)
@@ -44,6 +44,7 @@ EXT_COBJ_FILES-$(CONFIG_API) += lib_generic/crc32.o
 EXT_COBJ_FILES-$(CONFIG_API) += lib_generic/ctype.o
 EXT_COBJ_FILES-$(CONFIG_API) += lib_generic/div64.o
 EXT_COBJ_FILES-$(CONFIG_API) += lib_generic/string.o
+EXT_COBJ_FILES-$(CONFIG_API) += lib_generic/time.o
 EXT_COBJ_FILES-$(CONFIG_API) += lib_generic/vsprintf.o
 ifeq ($(ARCH),ppc)
 EXT_SOBJ_FILES-$(CONFIG_API) += lib_ppc/ppcstring.o
index 2b62badfb88e32b8162d6410cb7423b2cf404f00..2b107d9797f45eaaf3bc5bee1ef7d8eac93cd62e 100644 (file)
@@ -74,7 +74,7 @@ void putc (const char c)
        ub_putc(c);
 }
 
-void udelay(unsigned long usec)
+void __udelay(unsigned long usec)
 {
        ub_udelay(usec);
 }
index 070657fbb6663a2ffb9f4c4a5562463c35e333e2..0c6c926f73174bf0573889ab30e7037f3abf2518 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * (C) Copyright 2007
+ * (C) Copyright 2007-2009
  * Stefan Roese, DENX Software Engineering, sr@denx.de.
  *
  * See file CREDITS for list of people who contributed to this
 #define I2C_BASE_ADDR  (0xEF600500 + I2C_BUS_OFFS)
 #endif
 
-#define I2C_REGISTERS_BASE_ADDRESS I2C_BASE_ADDR
-#define IIC_MDBUF      (I2C_REGISTERS_BASE_ADDRESS+IICMDBUF)
-#define IIC_SDBUF      (I2C_REGISTERS_BASE_ADDRESS+IICSDBUF)
-#define IIC_LMADR      (I2C_REGISTERS_BASE_ADDRESS+IICLMADR)
-#define IIC_HMADR      (I2C_REGISTERS_BASE_ADDRESS+IICHMADR)
-#define IIC_CNTL       (I2C_REGISTERS_BASE_ADDRESS+IICCNTL)
-#define IIC_MDCNTL     (I2C_REGISTERS_BASE_ADDRESS+IICMDCNTL)
-#define IIC_STS                (I2C_REGISTERS_BASE_ADDRESS+IICSTS)
-#define IIC_EXTSTS     (I2C_REGISTERS_BASE_ADDRESS+IICEXTSTS)
-#define IIC_LSADR      (I2C_REGISTERS_BASE_ADDRESS+IICLSADR)
-#define IIC_HSADR      (I2C_REGISTERS_BASE_ADDRESS+IICHSADR)
-#define IIC_CLKDIV     (I2C_REGISTERS_BASE_ADDRESS+IIC0_CLKDIV)
-#define IIC_INTRMSK    (I2C_REGISTERS_BASE_ADDRESS+IICINTRMSK)
-#define IIC_XFRCNT     (I2C_REGISTERS_BASE_ADDRESS+IICXFRCNT)
-#define IIC_XTCNTLSS   (I2C_REGISTERS_BASE_ADDRESS+IICXTCNTLSS)
-#define IIC_DIRECTCNTL (I2C_REGISTERS_BASE_ADDRESS+IICDIRECTCNTL)
+struct ppc4xx_i2c {
+       u8 mdbuf;
+       u8 res1;
+       u8 sdbuf;
+       u8 res2;
+       u8 lmadr;
+       u8 hmadr;
+       u8 cntl;
+       u8 mdcntl;
+       u8 sts;
+       u8 extsts;
+       u8 lsadr;
+       u8 hsadr;
+       u8 clkdiv;
+       u8 intrmsk;
+       u8 xfrcnt;
+       u8 xtcntlss;
+       u8 directcntl;
+       u8 intr;
+};
 
 /* MDCNTL Register Bit definition */
 #define IIC_MDCNTL_HSCL                0x01
diff --git a/include/asm-arm/arch-a320/a320.h b/include/asm-arm/arch-a320/a320.h
new file mode 100644 (file)
index 0000000..5c0a097
--- /dev/null
@@ -0,0 +1,35 @@
+/*
+ * (C) Copyright 2009 Faraday Technology
+ * Po-Yu Chuang <ratbert@faraday-tech.com>
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#ifndef __A320_H
+#define __A320_H
+
+/*
+ * Hardware register bases
+ */
+#define CONFIG_FTSMC020_BASE   0x90200000      /* Static Memory Controller */
+#define CONFIG_DEBUG_LED       0x902ffffc      /* Debug LED */
+#define CONFIG_FTSDMC020_BASE  0x90300000      /* SDRAM Controller */
+#define CONFIG_FTMAC100_BASE   0x90900000      /* Ethernet */
+#define CONFIG_FTPMU010_BASE   0x98100000      /* Power Management Unit */
+#define CONFIG_FTTMR010_BASE   0x98400000      /* Timer */
+#define CONFIG_FTRTC010_BASE   0x98600000      /* Real Time Clock*/
+
+#endif /* __A320_H */
+
diff --git a/include/asm-arm/arch-a320/ftpmu010.h b/include/asm-arm/arch-a320/ftpmu010.h
new file mode 100644 (file)
index 0000000..8ef7a37
--- /dev/null
@@ -0,0 +1,146 @@
+/*
+ * (C) Copyright 2009 Faraday Technology
+ * Po-Yu Chuang <ratbert@faraday-tech.com>
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+/*
+ * Power Management Unit
+ */
+#ifndef __FTPMU010_H
+#define __FTPMU010_H
+
+struct ftpmu010 {
+       unsigned int    IDNMBR0;        /* 0x00 */
+       unsigned int    reserved0;      /* 0x04 */
+       unsigned int    OSCC;           /* 0x08 */
+       unsigned int    PMODE;          /* 0x0C */
+       unsigned int    PMCR;           /* 0x10 */
+       unsigned int    PED;            /* 0x14 */
+       unsigned int    PEDSR;          /* 0x18 */
+       unsigned int    reserved1;      /* 0x1C */
+       unsigned int    PMSR;           /* 0x20 */
+       unsigned int    PGSR;           /* 0x24 */
+       unsigned int    MFPSR;          /* 0x28 */
+       unsigned int    MISC;           /* 0x2C */
+       unsigned int    PDLLCR0;        /* 0x30 */
+       unsigned int    PDLLCR1;        /* 0x34 */
+       unsigned int    AHBMCLKOFF;     /* 0x38 */
+       unsigned int    APBMCLKOFF;     /* 0x3C */
+       unsigned int    DCSRCR0;        /* 0x40 */
+       unsigned int    DCSRCR1;        /* 0x44 */
+       unsigned int    DCSRCR2;        /* 0x48 */
+       unsigned int    SDRAMHTC;       /* 0x4C */
+       unsigned int    PSPR0;          /* 0x50 */
+       unsigned int    PSPR1;          /* 0x54 */
+       unsigned int    PSPR2;          /* 0x58 */
+       unsigned int    PSPR3;          /* 0x5C */
+       unsigned int    PSPR4;          /* 0x60 */
+       unsigned int    PSPR5;          /* 0x64 */
+       unsigned int    PSPR6;          /* 0x68 */
+       unsigned int    PSPR7;          /* 0x6C */
+       unsigned int    PSPR8;          /* 0x70 */
+       unsigned int    PSPR9;          /* 0x74 */
+       unsigned int    PSPR10;         /* 0x78 */
+       unsigned int    PSPR11;         /* 0x7C */
+       unsigned int    PSPR12;         /* 0x80 */
+       unsigned int    PSPR13;         /* 0x84 */
+       unsigned int    PSPR14;         /* 0x88 */
+       unsigned int    PSPR15;         /* 0x8C */
+       unsigned int    AHBDMA_RACCS;   /* 0x90 */
+       unsigned int    reserved2;      /* 0x94 */
+       unsigned int    reserved3;      /* 0x98 */
+       unsigned int    JSS;            /* 0x9C */
+       unsigned int    CFC_RACC;       /* 0xA0 */
+       unsigned int    SSP1_RACC;      /* 0xA4 */
+       unsigned int    UART1TX_RACC;   /* 0xA8 */
+       unsigned int    UART1RX_RACC;   /* 0xAC */
+       unsigned int    UART2TX_RACC;   /* 0xB0 */
+       unsigned int    UART2RX_RACC;   /* 0xB4 */
+       unsigned int    SDC_RACC;       /* 0xB8 */
+       unsigned int    I2SAC97_RACC;   /* 0xBC */
+       unsigned int    IRDATX_RACC;    /* 0xC0 */
+       unsigned int    reserved4;      /* 0xC4 */
+       unsigned int    USBD_RACC;      /* 0xC8 */
+       unsigned int    IRDARX_RACC;    /* 0xCC */
+       unsigned int    IRDA_RACC;      /* 0xD0 */
+       unsigned int    ED0_RACC;       /* 0xD4 */
+       unsigned int    ED1_RACC;       /* 0xD8 */
+};
+
+/*
+ * ID Number 0 Register
+ */
+#define FTPMU010_ID_A320A      0x03200000
+#define FTPMU010_ID_A320C      0x03200010
+#define FTPMU010_ID_A320D      0x03200030
+
+/*
+ * OSC Control Register
+ */
+#define FTPMU010_OSCC_OSCH_TRI         (1 << 11)
+#define FTPMU010_OSCC_OSCH_STABLE      (1 << 9)
+#define FTPMU010_OSCC_OSCH_OFF         (1 << 8)
+
+#define FTPMU010_OSCC_OSCL_TRI         (1 << 3)
+#define FTPMU010_OSCC_OSCL_RTCLSEL     (1 << 2)
+#define FTPMU010_OSCC_OSCL_STABLE      (1 << 1)
+#define FTPMU010_OSCC_OSCL_OFF         (1 << 0)
+
+/*
+ * Power Mode Register
+ */
+#define FTPMU010_PMODE_DIVAHBCLK_MASK  (0x7 << 4)
+#define FTPMU010_PMODE_DIVAHBCLK_2     (0x0 << 4)
+#define FTPMU010_PMODE_DIVAHBCLK_3     (0x1 << 4)
+#define FTPMU010_PMODE_DIVAHBCLK_4     (0x2 << 4)
+#define FTPMU010_PMODE_DIVAHBCLK_6     (0x3 << 4)
+#define FTPMU010_PMODE_DIVAHBCLK_8     (0x4 << 4)
+#define FTPMU010_PMODE_DIVAHBCLK(pmode)        (((pmode) >> 4) & 0x7)
+#define FTPMU010_PMODE_FCS             (1 << 2)
+#define FTPMU010_PMODE_TURBO           (1 << 1)
+#define FTPMU010_PMODE_SLEEP           (1 << 0)
+
+/*
+ * Power Manager Status Register
+ */
+#define FTPMU010_PMSR_SMR      (1 << 10)
+
+#define FTPMU010_PMSR_RDH      (1 << 2)
+#define FTPMU010_PMSR_PH       (1 << 1)
+#define FTPMU010_PMSR_CKEHLOW  (1 << 0)
+
+/*
+ * Multi-Function Port Setting Register
+ */
+#define FTPMU010_MFPSR_MODEMPINSEL     (1 << 14)
+#define FTPMU010_MFPSR_AC97CLKOUTSEL   (1 << 13)
+#define FTPMU010_MFPSR_AC97PINSEL      (1 << 3)
+
+/*
+ * PLL/DLL Control Register 0
+ */
+#define FTPMU010_PDLLCR0_HCLKOUTDIS(cr0)       (((cr0) >> 20) & 0xf)
+#define FTPMU010_PDLLCR0_DLLFRAG               (1 << 19)
+#define FTPMU010_PDLLCR0_DLLSTSEL              (1 << 18)
+#define FTPMU010_PDLLCR0_DLLSTABLE             (1 << 17)
+#define FTPMU010_PDLLCR0_DLLDIS                        (1 << 16)
+#define FTPMU010_PDLLCR0_PLL1NS(cr0)           (((cr0) >> 3) & 0x1ff)
+#define FTPMU010_PDLLCR0_PLL1STSEL             (1 << 2)
+#define FTPMU010_PDLLCR0_PLL1STABLE            (1 << 1)
+#define FTPMU010_PDLLCR0_PLL1DIS               (1 << 0)
+
+#endif /* __FTPMU010_H */
diff --git a/include/asm-arm/arch-a320/ftsdmc020.h b/include/asm-arm/arch-a320/ftsdmc020.h
new file mode 100644 (file)
index 0000000..0699772
--- /dev/null
@@ -0,0 +1,103 @@
+/*
+ * (C) Copyright 2009 Faraday Technology
+ * Po-Yu Chuang <ratbert@faraday-tech.com>
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+/*
+ * SDRAM Controller
+ */
+#ifndef __FTSDMC020_H
+#define __FTSDMC020_H
+
+#define FTSDMC020_OFFSET_TP0           0x00
+#define FTSDMC020_OFFSET_TP1           0x04
+#define FTSDMC020_OFFSET_CR            0x08
+#define FTSDMC020_OFFSET_BANK0_BSR     0x0C
+#define FTSDMC020_OFFSET_BANK1_BSR     0x10
+#define FTSDMC020_OFFSET_BANK2_BSR     0x14
+#define FTSDMC020_OFFSET_BANK3_BSR     0x18
+#define FTSDMC020_OFFSET_BANK4_BSR     0x1C
+#define FTSDMC020_OFFSET_BANK5_BSR     0x20
+#define FTSDMC020_OFFSET_BANK6_BSR     0x24
+#define FTSDMC020_OFFSET_BANK7_BSR     0x28
+#define FTSDMC020_OFFSET_ACR           0x34
+
+/*
+ * Timing Parametet 0 Register
+ */
+#define FTSDMC020_TP0_TCL(x)   ((x) & 0x3)
+#define FTSDMC020_TP0_TWR(x)   (((x) & 0x3) << 4)
+#define FTSDMC020_TP0_TRF(x)   (((x) & 0xf) << 8)
+#define FTSDMC020_TP0_TRCD(x)  (((x) & 0x7) << 12)
+#define FTSDMC020_TP0_TRP(x)   (((x) & 0xf) << 16)
+#define FTSDMC020_TP0_TRAS(x)  (((x) & 0xf) << 20)
+
+/*
+ * Timing Parametet 1 Register
+ */
+#define FTSDMC020_TP1_REF_INTV(x)      ((x) & 0xffff)
+#define FTSDMC020_TP1_INI_REFT(x)      (((x) & 0xf) << 16)
+#define FTSDMC020_TP1_INI_PREC(x)      (((x) & 0xf) << 20)
+
+/*
+ * Configuration Register
+ */
+#define FTSDMC020_CR_SREF      (1 << 0)
+#define FTSDMC020_CR_PWDN      (1 << 1)
+#define FTSDMC020_CR_ISMR      (1 << 2)
+#define FTSDMC020_CR_IREF      (1 << 3)
+#define FTSDMC020_CR_IPREC     (1 << 4)
+#define FTSDMC020_CR_REFTYPE   (1 << 5)
+
+/*
+ * SDRAM External Bank Base/Size Register
+ */
+#define FTSDMC020_BANK_ENABLE          (1 << 28)
+
+#define FTSDMC020_BANK_BASE(addr)      (((addr) >> 20) << 16)
+
+#define FTSDMC020_BANK_DDW_X4          (0 << 12)
+#define FTSDMC020_BANK_DDW_X8          (1 << 12)
+#define FTSDMC020_BANK_DDW_X16         (2 << 12)
+#define FTSDMC020_BANK_DDW_X32         (3 << 12)
+
+#define FTSDMC020_BANK_DSZ_16M         (0 << 8)
+#define FTSDMC020_BANK_DSZ_64M         (1 << 8)
+#define FTSDMC020_BANK_DSZ_128M                (2 << 8)
+#define FTSDMC020_BANK_DSZ_256M                (3 << 8)
+
+#define FTSDMC020_BANK_MBW_8           (0 << 4)
+#define FTSDMC020_BANK_MBW_16          (1 << 4)
+#define FTSDMC020_BANK_MBW_32          (2 << 4)
+
+#define FTSDMC020_BANK_SIZE_1M         0x0
+#define FTSDMC020_BANK_SIZE_2M         0x1
+#define FTSDMC020_BANK_SIZE_4M         0x2
+#define FTSDMC020_BANK_SIZE_8M         0x3
+#define FTSDMC020_BANK_SIZE_16M                0x4
+#define FTSDMC020_BANK_SIZE_32M                0x5
+#define FTSDMC020_BANK_SIZE_64M                0x6
+#define FTSDMC020_BANK_SIZE_128M       0x7
+#define FTSDMC020_BANK_SIZE_256M       0x8
+
+/*
+ * Arbiter Control Register
+ */
+#define FTSDMC020_ACR_TOC(x)   ((x) & 0x1f)
+#define FTSDMC020_ACR_TOE      (1 << 8)
+
+#endif /* __FTSDMC020_H */
diff --git a/include/asm-arm/arch-a320/ftsmc020.h b/include/asm-arm/arch-a320/ftsmc020.h
new file mode 100644 (file)
index 0000000..95d9500
--- /dev/null
@@ -0,0 +1,79 @@
+/*
+ * (C) Copyright 2009 Faraday Technology
+ * Po-Yu Chuang <ratbert@faraday-tech.com>
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+/*
+ * Static Memory Controller
+ */
+#ifndef __FTSMC020_H
+#define __FTSMC020_H
+
+#ifndef __ASSEMBLY__
+
+struct ftsmc020 {
+       struct {
+               unsigned int    cr;     /* 0x00, 0x08, 0x10, 0x18 */
+               unsigned int    tpr;    /* 0x04, 0x0c, 0x14, 0x1c */
+       } bank[4];
+       unsigned int    pad[8]; /* 0x20 - 0x3c */
+       unsigned int    ssr;    /* 0x40 */
+};
+
+void ftsmc020_init(void);
+
+#endif /* __ASSEMBLY__ */
+
+/*
+ * Memory Bank Configuration Register
+ */
+#define FTSMC020_BANK_ENABLE   (1 << 28)
+#define FTSMC020_BANK_BASE(x)  ((x) & 0x0fff1000)
+
+#define FTSMC020_BANK_WPROT    (1 << 11)
+
+#define FTSMC020_BANK_SIZE_32K (0xb << 4)
+#define FTSMC020_BANK_SIZE_64K (0xc << 4)
+#define FTSMC020_BANK_SIZE_128K        (0xd << 4)
+#define FTSMC020_BANK_SIZE_256K        (0xe << 4)
+#define FTSMC020_BANK_SIZE_512K        (0xf << 4)
+#define FTSMC020_BANK_SIZE_1M  (0x0 << 4)
+#define FTSMC020_BANK_SIZE_2M  (0x1 << 4)
+#define FTSMC020_BANK_SIZE_4M  (0x2 << 4)
+#define FTSMC020_BANK_SIZE_8M  (0x3 << 4)
+#define FTSMC020_BANK_SIZE_16M (0x4 << 4)
+#define FTSMC020_BANK_SIZE_32M (0x5 << 4)
+
+#define FTSMC020_BANK_MBW_8    (0x0 << 0)
+#define FTSMC020_BANK_MBW_16   (0x1 << 0)
+#define FTSMC020_BANK_MBW_32   (0x2 << 0)
+
+/*
+ * Memory Bank Timing Parameter Register
+ */
+#define FTSMC020_TPR_ETRNA(x)  (((x) & 0xf) << 28)
+#define FTSMC020_TPR_EATI(x)   (((x) & 0xf) << 24)
+#define FTSMC020_TPR_RBE       (1 << 20)
+#define FTSMC020_TPR_AST(x)    (((x) & 0x3) << 18)
+#define FTSMC020_TPR_CTW(x)    (((x) & 0x3) << 16)
+#define FTSMC020_TPR_ATI(x)    (((x) & 0xf) << 12)
+#define FTSMC020_TPR_AT2(x)    (((x) & 0x3) << 8)
+#define FTSMC020_TPR_WTC(x)    (((x) & 0x3) << 6)
+#define FTSMC020_TPR_AHT(x)    (((x) & 0x3) << 4)
+#define FTSMC020_TPR_TRNA(x)   (((x) & 0xf) << 0)
+
+#endif /* __FTSMC020_H */
diff --git a/include/asm-arm/arch-a320/fttmr010.h b/include/asm-arm/arch-a320/fttmr010.h
new file mode 100644 (file)
index 0000000..72abcb3
--- /dev/null
@@ -0,0 +1,73 @@
+/*
+ * (C) Copyright 2009 Faraday Technology
+ * Po-Yu Chuang <ratbert@faraday-tech.com>
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+/*
+ * Timer
+ */
+#ifndef __FTTMR010_H
+#define __FTTMR010_H
+
+struct fttmr010 {
+       unsigned int    timer1_counter;         /* 0x00 */
+       unsigned int    timer1_load;            /* 0x04 */
+       unsigned int    timer1_match1;          /* 0x08 */
+       unsigned int    timer1_match2;          /* 0x0c */
+       unsigned int    timer2_counter;         /* 0x10 */
+       unsigned int    timer2_load;            /* 0x14 */
+       unsigned int    timer2_match1;          /* 0x18 */
+       unsigned int    timer2_match2;          /* 0x1c */
+       unsigned int    timer3_counter;         /* 0x20 */
+       unsigned int    timer3_load;            /* 0x24 */
+       unsigned int    timer3_match1;          /* 0x28 */
+       unsigned int    timer3_match2;          /* 0x2c */
+       unsigned int    cr;                     /* 0x30 */
+       unsigned int    interrupt_state;        /* 0x34 */
+       unsigned int    interrupt_mask;         /* 0x38 */
+};
+
+/*
+ * Timer Control Register
+ */
+#define FTTMR010_TM3_UPDOWN    (1 << 11)
+#define FTTMR010_TM2_UPDOWN    (1 << 10)
+#define FTTMR010_TM1_UPDOWN    (1 << 9)
+#define FTTMR010_TM3_OFENABLE  (1 << 8)
+#define FTTMR010_TM3_CLOCK     (1 << 7)
+#define FTTMR010_TM3_ENABLE    (1 << 6)
+#define FTTMR010_TM2_OFENABLE  (1 << 5)
+#define FTTMR010_TM2_CLOCK     (1 << 4)
+#define FTTMR010_TM2_ENABLE    (1 << 3)
+#define FTTMR010_TM1_OFENABLE  (1 << 2)
+#define FTTMR010_TM1_CLOCK     (1 << 1)
+#define FTTMR010_TM1_ENABLE    (1 << 0)
+
+/*
+ * Timer Interrupt State & Mask Registers
+ */
+#define FTTMR010_TM3_OVERFLOW  (1 << 8)
+#define FTTMR010_TM3_MATCH2    (1 << 7)
+#define FTTMR010_TM3_MATCH1    (1 << 6)
+#define FTTMR010_TM2_OVERFLOW  (1 << 5)
+#define FTTMR010_TM2_MATCH2    (1 << 4)
+#define FTTMR010_TM2_MATCH1    (1 << 3)
+#define FTTMR010_TM1_OVERFLOW  (1 << 2)
+#define FTTMR010_TM1_MATCH2    (1 << 1)
+#define FTTMR010_TM1_MATCH1    (1 << 0)
+
+#endif /* __FTTMR010_H */
index acf12ea7a29954e0d03cacc91f4bfc6c27946fa2..81cc8ab1571aac3a0e4d09e9329fdcb9d0aa49cb 100644 (file)
@@ -49,6 +49,8 @@ typedef volatile unsigned int *       dv_reg_p;
  * on other DaVinci chips.  Double check them before you try
  * using the addresses ... or PSC module identifiers, etc.
  */
+#ifndef CONFIG_SOC_DA8XX
+
 #define DAVINCI_DMA_3PCC_BASE                  (0x01c00000)
 #define DAVINCI_DMA_3PTC0_BASE                 (0x01c10000)
 #define DAVINCI_DMA_3PTC1_BASE                 (0x01c10400)
@@ -116,10 +118,46 @@ typedef volatile unsigned int *   dv_reg_p;
 
 #endif
 
+#else /* CONFIG_SOC_DA8XX */
+
+#define DAVINCI_UART0_BASE                     0x01c42000
+#define DAVINCI_UART1_BASE                     0x01d0c000
+#define DAVINCI_UART2_BASE                     0x01d0d000
+#define DAVINCI_I2C0_BASE                      0x01c22000
+#define DAVINCI_I2C1_BASE                      0x01e28000
+#define DAVINCI_TIMER0_BASE                    0x01c20000
+#define DAVINCI_TIMER1_BASE                    0x01c21000
+#define DAVINCI_WDOG_BASE                      0x01c21000
+#define DAVINCI_PLL_CNTRL0_BASE                        0x01c11000
+#define DAVINCI_PSC0_BASE                      0x01c10000
+#define DAVINCI_PSC1_BASE                      0x01e27000
+#define DAVINCI_SPI0_BASE                      0x01c41000
+#define DAVINCI_USB_OTG_BASE                   0x01e00000
+#define DAVINCI_SPI1_BASE                      0x01e12000
+#define DAVINCI_GPIO_BASE                      0x01e26000
+#define DAVINCI_EMAC_CNTRL_REGS_BASE           0x01e23000
+#define DAVINCI_EMAC_WRAPPER_CNTRL_REGS_BASE   0x01e22000
+#define DAVINCI_EMAC_WRAPPER_RAM_BASE          0x01e20000
+#define DAVINCI_MDIO_CNTRL_REGS_BASE           0x01e24000
+#define DAVINCI_ASYNC_EMIF_CNTRL_BASE          0x68000000
+#define DAVINCI_ASYNC_EMIF_DATA_CE0_BASE       0x40000000
+#define DAVINCI_ASYNC_EMIF_DATA_CE2_BASE       0x60000000
+#define DAVINCI_ASYNC_EMIF_DATA_CE3_BASE       0x62000000
+#define DAVINCI_ASYNC_EMIF_DATA_CE4_BASE       0x64000000
+#define DAVINCI_ASYNC_EMIF_DATA_CE5_BASE       0x66000000
+#define DAVINCI_DDR_EMIF_CTRL_BASE             0xb0000000
+#define DAVINCI_DDR_EMIF_DATA_BASE             0xc0000000
+#define DAVINCI_INTC_BASE                      0xfffee000
+#define DAVINCI_BOOTCFG_BASE                   0x01c14000
+
+#endif /* CONFIG_SOC_DA8XX */
+
 /* Power and Sleep Controller (PSC) Domains */
 #define DAVINCI_GPSC_ARMDOMAIN         0
 #define DAVINCI_GPSC_DSPDOMAIN         1
 
+#ifndef CONFIG_SOC_DA8XX
+
 #define DAVINCI_LPSC_VPSSMSTR          0
 #define DAVINCI_LPSC_VPSSSLV           1
 #define DAVINCI_LPSC_TPCC              2
@@ -166,6 +204,52 @@ typedef volatile unsigned int *    dv_reg_p;
 #define DAVINCI_DM646X_LPSC_UART0      26
 #define DAVINCI_DM646X_LPSC_I2C                31
 
+#else /* CONFIG_SOC_DA8XX */
+
+enum davinci_lpsc_ids {
+       DAVINCI_LPSC_TPCC = 0,
+       DAVINCI_LPSC_TPTC0,
+       DAVINCI_LPSC_TPTC1,
+       DAVINCI_LPSC_AEMIF,
+       DAVINCI_LPSC_SPI0,
+       DAVINCI_LPSC_MMC_SD,
+       DAVINCI_LPSC_AINTC,
+       DAVINCI_LPSC_ARM_RAM_ROM,
+       DAVINCI_LPSC_SECCTL_KEYMGR,
+       DAVINCI_LPSC_UART0,
+       DAVINCI_LPSC_SCR0,
+       DAVINCI_LPSC_SCR1,
+       DAVINCI_LPSC_SCR2,
+       DAVINCI_LPSC_DMAX,
+       DAVINCI_LPSC_ARM,
+       DAVINCI_LPSC_GEM,
+       /* for LPSCs in PSC1, offset from 32 for differentiation */
+       DAVINCI_LPSC_PSC1_BASE = 32,
+       DAVINCI_LPSC_USB11,
+       DAVINCI_LPSC_USB20,
+       DAVINCI_LPSC_GPIO,
+       DAVINCI_LPSC_UHPI,
+       DAVINCI_LPSC_EMAC,
+       DAVINCI_LPSC_DDR_EMIF,
+       DAVINCI_LPSC_McASP0,
+       DAVINCI_LPSC_McASP1,
+       DAVINCI_LPSC_McASP2,
+       DAVINCI_LPSC_SPI1,
+       DAVINCI_LPSC_I2C1,
+       DAVINCI_LPSC_UART1,
+       DAVINCI_LPSC_UART2,
+       DAVINCI_LPSC_LCDC,
+       DAVINCI_LPSC_ePWM,
+       DAVINCI_LPSC_eCAP,
+       DAVINCI_LPSC_eQEP,
+       DAVINCI_LPSC_SCR_P0,
+       DAVINCI_LPSC_SCR_P1,
+       DAVINCI_LPSC_CR_P3,
+       DAVINCI_LPSC_L3_CBA_RAM
+};
+
+#endif /* CONFIG_SOC_DA8XX */
+
 void lpsc_on(unsigned int id);
 void dsp_on(void);
 
@@ -174,6 +258,8 @@ void davinci_enable_emac(void);
 void davinci_enable_i2c(void);
 void davinci_errata_workarounds(void);
 
+#ifndef CONFIG_SOC_DA8XX
+
 /* Some PSC defines */
 #define PSC_CHP_SHRTSW                 (0x01c40038)
 #define PSC_GBLCTL                     (0x01c41010)
@@ -194,6 +280,39 @@ void davinci_errata_workarounds(void);
 
 #define PSC_SILVER_BULLET              (0x01c41a20)
 
+#else /* CONFIG_SOC_DA8XX */
+
+#define PSC_PSC0_MODULE_ID_CNT         16
+#define PSC_PSC1_MODULE_ID_CNT         32
+
+struct davinci_psc_regs {
+       dv_reg  revid;
+       dv_reg  rsvd0[71];
+       dv_reg  ptcmd;
+       dv_reg  rsvd1;
+       dv_reg  ptstat;
+       dv_reg  rsvd2[437];
+       union {
+               struct {
+                       dv_reg  mdstat[PSC_PSC0_MODULE_ID_CNT];
+                       dv_reg  rsvd3[112];
+                       dv_reg  mdctl[PSC_PSC0_MODULE_ID_CNT];
+               } psc0;
+               struct {
+                       dv_reg  mdstat[PSC_PSC1_MODULE_ID_CNT];
+                       dv_reg  rsvd3[96];
+                       dv_reg  mdctl[PSC_PSC1_MODULE_ID_CNT];
+               } psc1;
+       };
+};
+
+#define davinci_psc0_regs ((struct davinci_psc_regs *)DAVINCI_PSC0_BASE)
+#define davinci_psc1_regs ((struct davinci_psc_regs *)DAVINCI_PSC1_BASE)
+
+#endif /* CONFIG_SOC_DA8XX */
+
+#ifndef CONFIG_SOC_DA8XX
+
 /* Miscellania... */
 #define VBPR                           (0x20000020)
 
@@ -206,4 +325,122 @@ void davinci_errata_workarounds(void);
 #define PINMUX3                                0x01c4000c
 #define PINMUX4                                0x01c40010
 
+#else /* CONFIG_SOC_DA8XX */
+
+struct davinci_pllc_regs {
+       dv_reg  revid;
+       dv_reg  rsvd1[56];
+       dv_reg  rstype;
+       dv_reg  rsvd2[6];
+       dv_reg  pllctl;
+       dv_reg  ocsel;
+       dv_reg  rsvd3[2];
+       dv_reg  pllm;
+       dv_reg  prediv;
+       dv_reg  plldiv1;
+       dv_reg  plldiv2;
+       dv_reg  plldiv3;
+       dv_reg  oscdiv;
+       dv_reg  postdiv;
+       dv_reg  rsvd4[3];
+       dv_reg  pllcmd;
+       dv_reg  pllstat;
+       dv_reg  alnctl;
+       dv_reg  dchange;
+       dv_reg  cken;
+       dv_reg  ckstat;
+       dv_reg  systat;
+       dv_reg  rsvd5[3];
+       dv_reg  plldiv4;
+       dv_reg  plldiv5;
+       dv_reg  plldiv6;
+       dv_reg  plldiv7;
+       dv_reg  rsvd6[32];
+       dv_reg  emucnt0;
+       dv_reg  emucnt1;
+};
+
+#define davinci_pllc_regs ((struct davinci_pllc_regs *)DAVINCI_PLL_CNTRL0_BASE)
+#define DAVINCI_PLLC_DIV_MASK  0x1f
+
+/* Clock IDs */
+enum davinci_clk_ids {
+       DAVINCI_SPI0_CLKID = 2,
+       DAVINCI_UART2_CLKID = 2,
+       DAVINCI_MDIO_CLKID = 4,
+       DAVINCI_ARM_CLKID = 6,
+       DAVINCI_PLLM_CLKID = 0xff,
+       DAVINCI_PLLC_CLKID = 0x100,
+       DAVINCI_AUXCLK_CLKID = 0x101
+};
+
+int clk_get(enum davinci_clk_ids id);
+
+/* Boot config */
+struct davinci_syscfg_regs {
+       dv_reg  revid;
+       dv_reg  rsvd[71];
+       dv_reg  pinmux[20];
+       dv_reg  suspsrc;
+       dv_reg  chipsig;
+       dv_reg  chipsig_clr;
+       dv_reg  cfgchip0;
+       dv_reg  cfgchip1;
+       dv_reg  cfgchip2;
+       dv_reg  cfgchip3;
+       dv_reg  cfgchip4;
+};
+
+#define davinci_syscfg_regs \
+       ((struct davinci_syscfg_regs *)DAVINCI_BOOTCFG_BASE)
+
+/* Emulation suspend bits */
+#define DAVINCI_SYSCFG_SUSPSRC_EMAC            (1 << 5)
+#define DAVINCI_SYSCFG_SUSPSRC_I2C             (1 << 16)
+#define DAVINCI_SYSCFG_SUSPSRC_SPI0            (1 << 21)
+#define DAVINCI_SYSCFG_SUSPSRC_UART2           (1 << 20)
+#define DAVINCI_SYSCFG_SUSPSRC_TIMER0          (1 << 27)
+
+/* Interrupt controller */
+struct davinci_aintc_regs {
+       dv_reg  revid;
+       dv_reg  cr;
+       dv_reg  dummy0[2];
+       dv_reg  ger;
+       dv_reg  dummy1[219];
+       dv_reg  ecr1;
+       dv_reg  ecr2;
+       dv_reg  ecr3;
+       dv_reg  dummy2[1117];
+       dv_reg  hier;
+};
+
+#define davinci_aintc_regs ((struct davinci_aintc_regs *)DAVINCI_INTC_BASE)
+
+struct davinci_uart_ctrl_regs {
+       dv_reg  revid1;
+       dv_reg  revid2;
+       dv_reg  pwremu_mgmt;
+       dv_reg  mdr;
+};
+
+#define DAVINCI_UART_CTRL_BASE 0x28
+#define DAVINCI_UART0_CTRL_ADDR (DAVINCI_UART0_BASE + DAVINCI_UART_CTRL_BASE)
+#define DAVINCI_UART1_CTRL_ADDR (DAVINCI_UART1_BASE + DAVINCI_UART_CTRL_BASE)
+#define DAVINCI_UART2_CTRL_ADDR (DAVINCI_UART2_BASE + DAVINCI_UART_CTRL_BASE)
+
+#define davinci_uart0_ctrl_regs \
+       ((struct davinci_uart_ctrl_regs *)DAVINCI_UART0_CTRL_ADDR)
+#define davinci_uart1_ctrl_regs \
+       ((struct davinci_uart_ctrl_regs *)DAVINCI_UART1_CTRL_ADDR)
+#define davinci_uart2_ctrl_regs \
+       ((struct davinci_uart_ctrl_regs *)DAVINCI_UART2_CTRL_ADDR)
+
+/* UART PWREMU_MGMT definitions */
+#define DAVINCI_UART_PWREMU_MGMT_FREE  (1 << 0)
+#define DAVINCI_UART_PWREMU_MGMT_URRST (1 << 13)
+#define DAVINCI_UART_PWREMU_MGMT_UTRST (1 << 14)
+
+#endif /* CONFIG_SOC_DA8XX */
+
 #endif /* __ASM_ARCH_HARDWARE_H */
index 2e902e17f830be2a561f103a1ddab9bcf369763b..24cd268b953c2b1054e3e466749173bb588cd55b 100644 (file)
 #define I2C_WRITE              0
 #define I2C_READ               1
 
+#ifndef CONFIG_SOC_DA8XX
 #define I2C_BASE               0x01c21000
+#else
+#define I2C_BASE               0x01c22000
+#endif
 
 #define        I2C_OA                  (I2C_BASE + 0x00)
 #define I2C_IE                 (I2C_BASE + 0x04)
@@ -88,6 +92,7 @@
 #define I2C_CON_XA     (1 << 8)        /* Expand address */
 #define I2C_CON_STP    (1 << 11)       /* Stop condition (master mode only) */
 #define I2C_CON_STT    (1 << 13)       /* Start condition (master mode only) */
+#define I2C_CON_FREE   (1 << 14)       /* Free run on emulation */
 
 #define I2C_TIMEOUT    0xffff0000      /* Timeout mask for poll_i2c_irq() */
 
index 44db7a2d45efc06dc8f757504331b40ae0484513..19046aaab456106d12358995e8328f059408cb84 100644 (file)
 #ifndef _OMAP24XX_I2C_H_
 #define _OMAP24XX_I2C_H_
 
-#define I2C_BASE                0x48070000
+#define I2C_BASE1              0x48070000
 #define I2C_BASE2               0x48072000 /* nothing hooked up on h4 */
 
-#define I2C_REV                 (I2C_BASE + 0x00)
-#define I2C_IE                  (I2C_BASE + 0x04)
-#define I2C_STAT                (I2C_BASE + 0x08)
-#define I2C_IV                  (I2C_BASE + 0x0c)
-#define I2C_BUF                 (I2C_BASE + 0x14)
-#define I2C_CNT                 (I2C_BASE + 0x18)
-#define I2C_DATA                (I2C_BASE + 0x1c)
-#define I2C_SYSC                (I2C_BASE + 0x20)
-#define I2C_CON                 (I2C_BASE + 0x24)
-#define I2C_OA                  (I2C_BASE + 0x28)
-#define I2C_SA                  (I2C_BASE + 0x2c)
-#define I2C_PSC                 (I2C_BASE + 0x30)
-#define I2C_SCLL                (I2C_BASE + 0x34)
-#define I2C_SCLH                (I2C_BASE + 0x38)
-#define I2C_SYSTEST             (I2C_BASE + 0x3c)
+#define I2C_DEFAULT_BASE       I2C_BASE1
+
+struct i2c {
+       unsigned short rev;     /* 0x00 */
+       unsigned short res1;
+       unsigned short ie;      /* 0x04 */
+       unsigned short res2;
+       unsigned short stat;    /* 0x08 */
+       unsigned short res3;
+       unsigned short iv;      /* 0x0C */
+       unsigned short res4[3];
+       unsigned short buf;     /* 0x14 */
+       unsigned short res5;
+       unsigned short cnt;     /* 0x18 */
+       unsigned short res6;
+       unsigned short data;    /* 0x1C */
+       unsigned short res7;
+       unsigned short sysc;    /* 0x20 */
+       unsigned short res8;
+       unsigned short con;     /* 0x24 */
+       unsigned short res9;
+       unsigned short oa;      /* 0x28 */
+       unsigned short res10;
+       unsigned short sa;      /* 0x2C */
+       unsigned short res11;
+       unsigned short psc;     /* 0x30 */
+       unsigned short res12;
+       unsigned short scll;    /* 0x34 */
+       unsigned short res13;
+       unsigned short sclh;    /* 0x38 */
+       unsigned short res14;
+       unsigned short systest; /* 0x3c */
+       unsigned short res15;
+};
+
+#define I2C_BUS_MAX    2
 
 /* I2C masks */
 
index 8ab2e391bc33b244bb54ff8ec19f67ff17e136ca..e51c4f3293d1c1a315eb74a20c879f9bb75e83e4 100644 (file)
@@ -222,6 +222,7 @@ struct sdrc {
 
 #define PAGEPOLICY_HIGH                (0x1 << 0)
 #define SRFRONRESET            (0x1 << 7)
+#define PWDNEN                 (0x1 << 2)
 #define WAKEUPPROC             (0x1 << 26)
 
 #define DDR_SDRAM              (0x1 << 0)
index 8b339cce9ab553e650282e5fdddcc6252d44aad8..490e03bb65e401c222b76a1049c4eb8edfc6477a 100644 (file)
 
 #define I2C_DEFAULT_BASE       I2C_BASE1
 
-#define I2C_REV                (I2C_DEFAULT_BASE + 0x00)
-#define I2C_IE                 (I2C_DEFAULT_BASE + 0x04)
-#define I2C_STAT       (I2C_DEFAULT_BASE + 0x08)
-#define I2C_IV                 (I2C_DEFAULT_BASE + 0x0c)
-#define I2C_BUF                (I2C_DEFAULT_BASE + 0x14)
-#define I2C_CNT                (I2C_DEFAULT_BASE + 0x18)
-#define I2C_DATA       (I2C_DEFAULT_BASE + 0x1c)
-#define I2C_SYSC       (I2C_DEFAULT_BASE + 0x20)
-#define I2C_CON                (I2C_DEFAULT_BASE + 0x24)
-#define I2C_OA                 (I2C_DEFAULT_BASE + 0x28)
-#define I2C_SA                 (I2C_DEFAULT_BASE + 0x2c)
-#define I2C_PSC                (I2C_DEFAULT_BASE + 0x30)
-#define I2C_SCLL       (I2C_DEFAULT_BASE + 0x34)
-#define I2C_SCLH       (I2C_DEFAULT_BASE + 0x38)
-#define I2C_SYSTEST    (I2C_DEFAULT_BASE + 0x3c)
+struct i2c {
+       unsigned short rev;     /* 0x00 */
+       unsigned short res1;
+       unsigned short ie;      /* 0x04 */
+       unsigned short res2;
+       unsigned short stat;    /* 0x08 */
+       unsigned short res3;
+       unsigned short iv;      /* 0x0C */
+       unsigned short res4[3];
+       unsigned short buf;     /* 0x14 */
+       unsigned short res5;
+       unsigned short cnt;     /* 0x18 */
+       unsigned short res6;
+       unsigned short data;    /* 0x1C */
+       unsigned short res7;
+       unsigned short sysc;    /* 0x20 */
+       unsigned short res8;
+       unsigned short con;     /* 0x24 */
+       unsigned short res9;
+       unsigned short oa;      /* 0x28 */
+       unsigned short res10;
+       unsigned short sa;      /* 0x2C */
+       unsigned short res11;
+       unsigned short psc;     /* 0x30 */
+       unsigned short res12;
+       unsigned short scll;    /* 0x34 */
+       unsigned short res13;
+       unsigned short sclh;    /* 0x38 */
+       unsigned short res14;
+       unsigned short systest; /* 0x3c */
+       unsigned short res15;
+};
+
+#define I2C_BUS_MAX    3
 
 /* I2C masks */
 
index 5b9ac753e8d1d5ccf6b6bd5ad0ae75a0eb70eb6b..9439758e4a0ef48874c35d4fb06f38c1fece1550 100644 (file)
@@ -40,11 +40,8 @@ enum {
 #define EARLY_INIT     1
 
 /* Slower full frequency range default timings for x32 operation*/
-#define SDP_SDRC_SHARING       0x00000100
-#define SDP_SDRC_MR_0_SDR      0x00000031
-
-/* optimized timings good for current shipping parts */
-#define SDP_3430_SDRC_RFR_CTRL_165MHz  0x0004e201 /* 7.8us/6ns - 50=0x4e2 */
+#define SDRC_SHARING   0x00000100
+#define SDRC_MR_0_SDR  0x00000031
 
 #define DLL_OFFSET             0
 #define DLL_WRITEDDRCLKX2DIS   1
@@ -71,29 +68,78 @@ enum {
  *     TCKE = 2
  *     XSR = 120/6 = 20
  */
-#define TDAL_165       6
-#define TDPL_165       3
-#define TRRD_165       2
-#define TRCD_165       3
-#define TRP_165                3
-#define TRAS_165       7
-#define TRC_165                10
-#define TRFC_165       21
-#define V_ACTIMA_165   ((TRFC_165 << 27) | (TRC_165 << 22) | \
-                       (TRAS_165 << 18) | (TRP_165 << 15) |  \
-                       (TRCD_165 << 12) | (TRRD_165 << 9) |  \
-                       (TDPL_165 << 6) | (TDAL_165))
-
-#define TWTR_165       1
-#define TCKE_165       1
-#define TXP_165                5
-#define XSR_165                23
-#define V_ACTIMB_165   (((TCKE_165 << 12) | (XSR_165 << 0)) |  \
-                       (TXP_165 << 8) | (TWTR_165 << 16))
-
-#define SDP_SDRC_ACTIM_CTRLA_0 V_ACTIMA_165
-#define SDP_SDRC_ACTIM_CTRLB_0 V_ACTIMB_165
-#define SDP_SDRC_RFR_CTRL      SDP_3430_SDRC_RFR_CTRL_165MHz
+#define INFINEON_TDAL_165      6
+#define INFINEON_TDPL_165      3
+#define INFINEON_TRRD_165      2
+#define INFINEON_TRCD_165      3
+#define INFINEON_TRP_165       3
+#define INFINEON_TRAS_165      7
+#define INFINEON_TRC_165       10
+#define INFINEON_TRFC_165      12
+#define INFINEON_V_ACTIMA_165  ((INFINEON_TRFC_165 << 27) |            \
+               (INFINEON_TRC_165 << 22) | (INFINEON_TRAS_165 << 18) |  \
+               (INFINEON_TRP_165 << 15) | (INFINEON_TRCD_165 << 12) |  \
+               (INFINEON_TRRD_165 << 9) | (INFINEON_TDPL_165 << 6) |   \
+               (INFINEON_TDAL_165))
+
+#define INFINEON_TWTR_165      1
+#define INFINEON_TCKE_165      2
+#define INFINEON_TXP_165       2
+#define INFINEON_XSR_165       20
+#define INFINEON_V_ACTIMB_165  ((INFINEON_TCKE_165 << 12) |            \
+               (INFINEON_XSR_165 << 0) | (INFINEON_TXP_165 << 8) |     \
+               (INFINEON_TWTR_165 << 16))
+
+/* Micron part of 3430 EVM (165MHz optimized) 6.06ns
+ * ACTIMA
+ *     TDAL = Twr/Tck + Trp/tck= 15/6 + 18 /6 = 2.5 + 3 = 5.5 -> 6
+ *     TDPL (Twr)      = 15/6  = 2.5 -> 3
+ *     TRRD            = 12/6  = 2
+ *     TRCD            = 18/6  = 3
+ *     TRP             = 18/6  = 3
+ *     TRAS            = 42/6  = 7
+ *     TRC             = 60/6  = 10
+ *     TRFC            = 125/6 = 21
+ * ACTIMB
+ *     TWTR            = 1
+ *     TCKE            = 1
+ *     TXSR            = 138/6 = 23
+ *     TXP             = 25/6  = 4.1 ~5
+ */
+#define MICRON_TDAL_165                6
+#define MICRON_TDPL_165                3
+#define MICRON_TRRD_165                2
+#define MICRON_TRCD_165                3
+#define MICRON_TRP_165         3
+#define MICRON_TRAS_165                7
+#define MICRON_TRC_165         10
+#define MICRON_TRFC_165                21
+#define MICRON_V_ACTIMA_165 ((MICRON_TRFC_165 << 27) |                 \
+               (MICRON_TRC_165 << 22) | (MICRON_TRAS_165 << 18) |      \
+               (MICRON_TRP_165 << 15) | (MICRON_TRCD_165 << 12) |      \
+               (MICRON_TRRD_165 << 9) | (MICRON_TDPL_165 << 6) |       \
+               (MICRON_TDAL_165))
+
+#define MICRON_TWTR_165                1
+#define MICRON_TCKE_165                1
+#define MICRON_XSR_165         23
+#define MICRON_TXP_165         5
+#define MICRON_V_ACTIMB_165 ((MICRON_TCKE_165 << 12) |                 \
+               (MICRON_XSR_165 << 0) | (MICRON_TXP_165 << 8) | \
+               (MICRON_TWTR_165 << 16))
+
+#ifdef CONFIG_OMAP3_INFINEON_DDR
+#define V_ACTIMA_165 INFINEON_V_ACTIMA_165
+#define V_ACTIMB_165 INFINEON_V_ACTIMB_165
+#endif
+#ifdef CONFIG_OMAP3_MICRON_DDR
+#define V_ACTIMA_165 MICRON_V_ACTIMA_165
+#define V_ACTIMB_165 MICRON_V_ACTIMB_165
+#endif
+
+#if !defined(V_ACTIMA_165) || !defined(V_ACTIMB_165)
+#error "Please choose the right DDR type in config header"
+#endif
 
 /*
  * GPMC settings -
similarity index 98%
rename from include/s3c2400.h
rename to include/asm-arm/arch-s3c24x0/s3c2400.h
index 062259d1022abadcc138f0dbe6a01bb3344a4ddb..2678be15489864efe5871faaf6c6820cec9fe999 100644 (file)
@@ -60,74 +60,90 @@ enum s3c24x0_uarts_nr {
 #define S3C2400_MMC_BASE               0x15A00000
 
 /* include common stuff */
-#include <s3c24x0.h>
+#include <asm/arch/s3c24x0.h>
 
 
 static inline struct s3c24x0_memctl *s3c24x0_get_base_memctl(void)
 {
        return (struct s3c24x0_memctl *)S3C24X0_MEMCTL_BASE;
 }
+
 static inline struct s3c24x0_usb_host *s3c24x0_get_base_usb_host(void)
 {
        return (struct s3c24x0_usb_host *)S3C24X0_USB_HOST_BASE;
 }
+
 static inline struct s3c24x0_interrupt *s3c24x0_get_base_interrupt(void)
 {
        return (struct s3c24x0_interrupt *)S3C24X0_INTERRUPT_BASE;
 }
+
 static inline struct s3c24x0_dmas *s3c24x0_get_base_dmas(void)
 {
        return (struct s3c24x0_dmas *)S3C24X0_DMA_BASE;
 }
+
 static inline struct s3c24x0_clock_power *s3c24x0_get_base_clock_power(void)
 {
        return (struct s3c24x0_clock_power *)S3C24X0_CLOCK_POWER_BASE;
 }
+
 static inline struct s3c24x0_lcd *s3c24x0_get_base_lcd(void)
 {
        return (struct s3c24x0_lcd *)S3C24X0_LCD_BASE;
 }
+
 static inline struct s3c24x0_uart
        *s3c24x0_get_base_uart(enum s3c24x0_uarts_nr n)
 {
        return (struct s3c24x0_uart *)(S3C24X0_UART_BASE + (n * 0x4000));
 }
+
 static inline struct s3c24x0_timers *s3c24x0_get_base_timers(void)
 {
        return (struct s3c24x0_timers *)S3C24X0_TIMER_BASE;
 }
+
 static inline struct s3c24x0_usb_device *s3c24x0_get_base_usb_device(void)
 {
        return (struct s3c24x0_usb_device *)S3C24X0_USB_DEVICE_BASE;
 }
+
 static inline struct s3c24x0_watchdog *s3c24x0_get_base_watchdog(void)
 {
        return (struct s3c24x0_watchdog *)S3C24X0_WATCHDOG_BASE;
 }
+
 static inline struct s3c24x0_i2c *s3c24x0_get_base_i2c(void)
 {
        return (struct s3c24x0_i2c *)S3C24X0_I2C_BASE;
 }
+
 static inline struct s3c24x0_i2s *s3c24x0_get_base_i2s(void)
 {
        return (struct s3c24x0_i2s *)S3C24X0_I2S_BASE;
 }
+
 static inline struct s3c24x0_gpio *s3c24x0_get_base_gpio(void)
 {
        return (struct s3c24x0_gpio *)S3C24X0_GPIO_BASE;
 }
+
 static inline struct s3c24x0_rtc *s3c24x0_get_base_rtc(void)
 {
        return (struct s3c24x0_rtc *)S3C24X0_RTC_BASE;
 }
+
 static inline struct s3c2400_adc *s3c2400_get_base_adc(void)
 {
        return (struct s3c2400_adc *)S3C24X0_ADC_BASE;
 }
+
 static inline struct s3c24x0_spi *s3c24x0_get_base_spi(void)
 {
        return (struct s3c24x0_spi *)S3C24X0_SPI_BASE;
 }
+
 static inline struct s3c2400_mmc *s3c2400_get_base_mmc(void)
 {
        return (struct s3c2400_mmc *)S3C2400_MMC_BASE;
similarity index 98%
rename from include/s3c2410.h
rename to include/asm-arm/arch-s3c24x0/s3c2410.h
index 03b33b49248bfcb492beafe55d45dfe5b1312321..0543fe1565ebd340d109ba02695548cd4b8e0426 100644 (file)
@@ -66,78 +66,95 @@ enum s3c24x0_uarts_nr {
 
 
 /* include common stuff */
-#include <s3c24x0.h>
+#include <asm/arch/s3c24x0.h>
 
 
 static inline struct s3c24x0_memctl *s3c24x0_get_base_memctl(void)
 {
        return (struct s3c24x0_memctl *)S3C24X0_MEMCTL_BASE;
 }
+
 static inline struct s3c24x0_usb_host *s3c24x0_get_base_usb_host(void)
 {
        return (struct s3c24x0_usb_host *)S3C24X0_USB_HOST_BASE;
 }
+
 static inline struct s3c24x0_interrupt *s3c24x0_get_base_interrupt(void)
 {
        return (struct s3c24x0_interrupt *)S3C24X0_INTERRUPT_BASE;
 }
+
 static inline struct s3c24x0_dmas *s3c24x0_get_base_dmas(void)
 {
        return (struct s3c24x0_dmas *)S3C24X0_DMA_BASE;
 }
+
 static inline struct s3c24x0_clock_power *s3c24x0_get_base_clock_power(void)
 {
        return (struct s3c24x0_clock_power *)S3C24X0_CLOCK_POWER_BASE;
 }
+
 static inline struct s3c24x0_lcd *s3c24x0_get_base_lcd(void)
 {
        return (struct s3c24x0_lcd *)S3C24X0_LCD_BASE;
 }
+
 static inline struct s3c2410_nand *s3c2410_get_base_nand(void)
 {
        return (struct s3c2410_nand *)S3C2410_NAND_BASE;
 }
+
 static inline struct s3c24x0_uart
        *s3c24x0_get_base_uart(enum s3c24x0_uarts_nr n)
 {
        return (struct s3c24x0_uart *)(S3C24X0_UART_BASE + (n * 0x4000));
 }
+
 static inline struct s3c24x0_timers *s3c24x0_get_base_timers(void)
 {
        return (struct s3c24x0_timers *)S3C24X0_TIMER_BASE;
 }
+
 static inline struct s3c24x0_usb_device *s3c24x0_get_base_usb_device(void)
 {
        return (struct s3c24x0_usb_device *)S3C24X0_USB_DEVICE_BASE;
 }
+
 static inline struct s3c24x0_watchdog *s3c24x0_get_base_watchdog(void)
 {
        return (struct s3c24x0_watchdog *)S3C24X0_WATCHDOG_BASE;
 }
+
 static inline struct s3c24x0_i2c *s3c24x0_get_base_i2c(void)
 {
        return (struct s3c24x0_i2c *)S3C24X0_I2C_BASE;
 }
+
 static inline struct s3c24x0_i2s *s3c24x0_get_base_i2s(void)
 {
        return (struct s3c24x0_i2s *)S3C24X0_I2S_BASE;
 }
+
 static inline struct s3c24x0_gpio *s3c24x0_get_base_gpio(void)
 {
        return (struct s3c24x0_gpio *)S3C24X0_GPIO_BASE;
 }
+
 static inline struct s3c24x0_rtc *s3c24x0_get_base_rtc(void)
 {
        return (struct s3c24x0_rtc *)S3C24X0_RTC_BASE;
 }
+
 static inline struct s3c2410_adc *s3c2410_get_base_adc(void)
 {
        return (struct s3c2410_adc *)S3C2410_ADC_BASE;
 }
+
 static inline struct s3c24x0_spi *s3c24x0_get_base_spi(void)
 {
        return (struct s3c24x0_spi *)S3C24X0_SPI_BASE;
 }
+
 static inline struct s3c2410_sdi *s3c2410_get_base_sdi(void)
 {
        return (struct s3c2410_sdi *)S3C2410_SDI_BASE;
diff --git a/include/asm-arm/arch-s3c24x0/s3c24x0.h b/include/asm-arm/arch-s3c24x0/s3c24x0.h
new file mode 100644 (file)
index 0000000..15f53dd
--- /dev/null
@@ -0,0 +1,652 @@
+/*
+ * (C) Copyright 2003
+ * David Müller ELSOFT AG Switzerland. d.mueller@elsoft.ch
+ *
+ * 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
+ */
+
+/************************************************
+ * NAME            : s3c24x0.h
+ * Version  : 31.3.2003
+ *
+ * common stuff for SAMSUNG S3C24X0 SoC
+ ************************************************/
+
+#ifndef __S3C24X0_H__
+#define __S3C24X0_H__
+
+/* Memory controller (see manual chapter 5) */
+struct s3c24x0_memctl {
+       u32     BWSCON;
+       u32     BANKCON[8];
+       u32     REFRESH;
+       u32     BANKSIZE;
+       u32     MRSRB6;
+       u32     MRSRB7;
+};
+
+
+/* USB HOST (see manual chapter 12) */
+struct s3c24x0_usb_host {
+       u32     HcRevision;
+       u32     HcControl;
+       u32     HcCommonStatus;
+       u32     HcInterruptStatus;
+       u32     HcInterruptEnable;
+       u32     HcInterruptDisable;
+       u32     HcHCCA;
+       u32     HcPeriodCuttendED;
+       u32     HcControlHeadED;
+       u32     HcControlCurrentED;
+       u32     HcBulkHeadED;
+       u32     HcBuldCurrentED;
+       u32     HcDoneHead;
+       u32     HcRmInterval;
+       u32     HcFmRemaining;
+       u32     HcFmNumber;
+       u32     HcPeriodicStart;
+       u32     HcLSThreshold;
+       u32     HcRhDescriptorA;
+       u32     HcRhDescriptorB;
+       u32     HcRhStatus;
+       u32     HcRhPortStatus1;
+       u32     HcRhPortStatus2;
+};
+
+
+/* INTERRUPT (see manual chapter 14) */
+struct s3c24x0_interrupt {
+       u32     SRCPND;
+       u32     INTMOD;
+       u32     INTMSK;
+       u32     PRIORITY;
+       u32     INTPND;
+       u32     INTOFFSET;
+#ifdef CONFIG_S3C2410
+       u32     SUBSRCPND;
+       u32     INTSUBMSK;
+#endif
+};
+
+
+/* DMAS (see manual chapter 8) */
+struct s3c24x0_dma {
+       u32     DISRC;
+#ifdef CONFIG_S3C2410
+       u32     DISRCC;
+#endif
+       u32     DIDST;
+#ifdef CONFIG_S3C2410
+       u32     DIDSTC;
+#endif
+       u32     DCON;
+       u32     DSTAT;
+       u32     DCSRC;
+       u32     DCDST;
+       u32     DMASKTRIG;
+#ifdef CONFIG_S3C2400
+       u32     res[1];
+#endif
+#ifdef CONFIG_S3C2410
+       u32     res[7];
+#endif
+};
+
+struct s3c24x0_dmas {
+       struct s3c24x0_dma      dma[4];
+};
+
+
+/* CLOCK & POWER MANAGEMENT (see S3C2400 manual chapter 6) */
+/*                          (see S3C2410 manual chapter 7) */
+struct s3c24x0_clock_power {
+       u32     LOCKTIME;
+       u32     MPLLCON;
+       u32     UPLLCON;
+       u32     CLKCON;
+       u32     CLKSLOW;
+       u32     CLKDIVN;
+};
+
+
+/* LCD CONTROLLER (see manual chapter 15) */
+struct s3c24x0_lcd {
+       u32     LCDCON1;
+       u32     LCDCON2;
+       u32     LCDCON3;
+       u32     LCDCON4;
+       u32     LCDCON5;
+       u32     LCDSADDR1;
+       u32     LCDSADDR2;
+       u32     LCDSADDR3;
+       u32     REDLUT;
+       u32     GREENLUT;
+       u32     BLUELUT;
+       u32     res[8];
+       u32     DITHMODE;
+       u32     TPAL;
+#ifdef CONFIG_S3C2410
+       u32     LCDINTPND;
+       u32     LCDSRCPND;
+       u32     LCDINTMSK;
+       u32     LPCSEL;
+#endif
+};
+
+
+/* NAND FLASH (see S3C2410 manual chapter 6) */
+struct s3c2410_nand {
+       u32     NFCONF;
+       u32     NFCMD;
+       u32     NFADDR;
+       u32     NFDATA;
+       u32     NFSTAT;
+       u32     NFECC;
+};
+
+
+/* UART (see manual chapter 11) */
+struct s3c24x0_uart {
+       u32     ULCON;
+       u32     UCON;
+       u32     UFCON;
+       u32     UMCON;
+       u32     UTRSTAT;
+       u32     UERSTAT;
+       u32     UFSTAT;
+       u32     UMSTAT;
+#ifdef __BIG_ENDIAN
+       u8      res1[3];
+       u8      UTXH;
+       u8      res2[3];
+       u8      URXH;
+#else /* Little Endian */
+       u8      UTXH;
+       u8      res1[3];
+       u8      URXH;
+       u8      res2[3];
+#endif
+       u32     UBRDIV;
+};
+
+
+/* PWM TIMER (see manual chapter 10) */
+struct s3c24x0_timer {
+       u32     TCNTB;
+       u32     TCMPB;
+       u32     TCNTO;
+};
+
+struct s3c24x0_timers {
+       u32     TCFG0;
+       u32     TCFG1;
+       u32     TCON;
+       struct s3c24x0_timer    ch[4];
+       u32     TCNTB4;
+       u32     TCNTO4;
+};
+
+
+/* USB DEVICE (see manual chapter 13) */
+struct s3c24x0_usb_dev_fifos {
+#ifdef __BIG_ENDIAN
+       u8      res[3];
+       u8      EP_FIFO_REG;
+#else /*  little endian */
+       u8      EP_FIFO_REG;
+       u8      res[3];
+#endif
+};
+
+struct s3c24x0_usb_dev_dmas {
+#ifdef __BIG_ENDIAN
+       u8      res1[3];
+       u8      EP_DMA_CON;
+       u8      res2[3];
+       u8      EP_DMA_UNIT;
+       u8      res3[3];
+       u8      EP_DMA_FIFO;
+       u8      res4[3];
+       u8      EP_DMA_TTC_L;
+       u8      res5[3];
+       u8      EP_DMA_TTC_M;
+       u8      res6[3];
+       u8      EP_DMA_TTC_H;
+#else /*  little endian */
+       u8      EP_DMA_CON;
+       u8      res1[3];
+       u8      EP_DMA_UNIT;
+       u8      res2[3];
+       u8      EP_DMA_FIFO;
+       u8      res3[3];
+       u8      EP_DMA_TTC_L;
+       u8      res4[3];
+       u8      EP_DMA_TTC_M;
+       u8      res5[3];
+       u8      EP_DMA_TTC_H;
+       u8      res6[3];
+#endif
+};
+
+struct s3c24x0_usb_device {
+#ifdef __BIG_ENDIAN
+       u8      res1[3];
+       u8      FUNC_ADDR_REG;
+       u8      res2[3];
+       u8      PWR_REG;
+       u8      res3[3];
+       u8      EP_INT_REG;
+       u8      res4[15];
+       u8      USB_INT_REG;
+       u8      res5[3];
+       u8      EP_INT_EN_REG;
+       u8      res6[15];
+       u8      USB_INT_EN_REG;
+       u8      res7[3];
+       u8      FRAME_NUM1_REG;
+       u8      res8[3];
+       u8      FRAME_NUM2_REG;
+       u8      res9[3];
+       u8      INDEX_REG;
+       u8      res10[7];
+       u8      MAXP_REG;
+       u8      res11[3];
+       u8      EP0_CSR_IN_CSR1_REG;
+       u8      res12[3];
+       u8      IN_CSR2_REG;
+       u8      res13[7];
+       u8      OUT_CSR1_REG;
+       u8      res14[3];
+       u8      OUT_CSR2_REG;
+       u8      res15[3];
+       u8      OUT_FIFO_CNT1_REG;
+       u8      res16[3];
+       u8      OUT_FIFO_CNT2_REG;
+#else /*  little endian */
+       u8      FUNC_ADDR_REG;
+       u8      res1[3];
+       u8      PWR_REG;
+       u8      res2[3];
+       u8      EP_INT_REG;
+       u8      res3[15];
+       u8      USB_INT_REG;
+       u8      res4[3];
+       u8      EP_INT_EN_REG;
+       u8      res5[15];
+       u8      USB_INT_EN_REG;
+       u8      res6[3];
+       u8      FRAME_NUM1_REG;
+       u8      res7[3];
+       u8      FRAME_NUM2_REG;
+       u8      res8[3];
+       u8      INDEX_REG;
+       u8      res9[7];
+       u8      MAXP_REG;
+       u8      res10[7];
+       u8      EP0_CSR_IN_CSR1_REG;
+       u8      res11[3];
+       u8      IN_CSR2_REG;
+       u8      res12[3];
+       u8      OUT_CSR1_REG;
+       u8      res13[7];
+       u8      OUT_CSR2_REG;
+       u8      res14[3];
+       u8      OUT_FIFO_CNT1_REG;
+       u8      res15[3];
+       u8      OUT_FIFO_CNT2_REG;
+       u8      res16[3];
+#endif /*  __BIG_ENDIAN */
+       struct s3c24x0_usb_dev_fifos    fifo[5];
+       struct s3c24x0_usb_dev_dmas     dma[5];
+};
+
+
+/* WATCH DOG TIMER (see manual chapter 18) */
+struct s3c24x0_watchdog {
+       u32     WTCON;
+       u32     WTDAT;
+       u32     WTCNT;
+};
+
+
+/* IIC (see manual chapter 20) */
+struct s3c24x0_i2c {
+       u32     IICCON;
+       u32     IICSTAT;
+       u32     IICADD;
+       u32     IICDS;
+};
+
+
+/* IIS (see manual chapter 21) */
+struct s3c24x0_i2s {
+#ifdef __BIG_ENDIAN
+       u16     res1;
+       u16     IISCON;
+       u16     res2;
+       u16     IISMOD;
+       u16     res3;
+       u16     IISPSR;
+       u16     res4;
+       u16     IISFCON;
+       u16     res5;
+       u16     IISFIFO;
+#else /*  little endian */
+       u16     IISCON;
+       u16     res1;
+       u16     IISMOD;
+       u16     res2;
+       u16     IISPSR;
+       u16     res3;
+       u16     IISFCON;
+       u16     res4;
+       u16     IISFIFO;
+       u16     res5;
+#endif
+};
+
+
+/* I/O PORT (see manual chapter 9) */
+struct s3c24x0_gpio {
+#ifdef CONFIG_S3C2400
+       u32     PACON;
+       u32     PADAT;
+
+       u32     PBCON;
+       u32     PBDAT;
+       u32     PBUP;
+
+       u32     PCCON;
+       u32     PCDAT;
+       u32     PCUP;
+
+       u32     PDCON;
+       u32     PDDAT;
+       u32     PDUP;
+
+       u32     PECON;
+       u32     PEDAT;
+       u32     PEUP;
+
+       u32     PFCON;
+       u32     PFDAT;
+       u32     PFUP;
+
+       u32     PGCON;
+       u32     PGDAT;
+       u32     PGUP;
+
+       u32     OPENCR;
+
+       u32     MISCCR;
+       u32     EXTINT;
+#endif
+#ifdef CONFIG_S3C2410
+       u32     GPACON;
+       u32     GPADAT;
+       u32     res1[2];
+       u32     GPBCON;
+       u32     GPBDAT;
+       u32     GPBUP;
+       u32     res2;
+       u32     GPCCON;
+       u32     GPCDAT;
+       u32     GPCUP;
+       u32     res3;
+       u32     GPDCON;
+       u32     GPDDAT;
+       u32     GPDUP;
+       u32     res4;
+       u32     GPECON;
+       u32     GPEDAT;
+       u32     GPEUP;
+       u32     res5;
+       u32     GPFCON;
+       u32     GPFDAT;
+       u32     GPFUP;
+       u32     res6;
+       u32     GPGCON;
+       u32     GPGDAT;
+       u32     GPGUP;
+       u32     res7;
+       u32     GPHCON;
+       u32     GPHDAT;
+       u32     GPHUP;
+       u32     res8;
+
+       u32     MISCCR;
+       u32     DCLKCON;
+       u32     EXTINT0;
+       u32     EXTINT1;
+       u32     EXTINT2;
+       u32     EINTFLT0;
+       u32     EINTFLT1;
+       u32     EINTFLT2;
+       u32     EINTFLT3;
+       u32     EINTMASK;
+       u32     EINTPEND;
+       u32     GSTATUS0;
+       u32     GSTATUS1;
+       u32     GSTATUS2;
+       u32     GSTATUS3;
+       u32     GSTATUS4;
+#endif
+};
+
+
+/* RTC (see manual chapter 17) */
+struct s3c24x0_rtc {
+#ifdef __BIG_ENDIAN
+       u8      res1[67];
+       u8      RTCCON;
+       u8      res2[3];
+       u8      TICNT;
+       u8      res3[11];
+       u8      RTCALM;
+       u8      res4[3];
+       u8      ALMSEC;
+       u8      res5[3];
+       u8      ALMMIN;
+       u8      res6[3];
+       u8      ALMHOUR;
+       u8      res7[3];
+       u8      ALMDATE;
+       u8      res8[3];
+       u8      ALMMON;
+       u8      res9[3];
+       u8      ALMYEAR;
+       u8      res10[3];
+       u8      RTCRST;
+       u8      res11[3];
+       u8      BCDSEC;
+       u8      res12[3];
+       u8      BCDMIN;
+       u8      res13[3];
+       u8      BCDHOUR;
+       u8      res14[3];
+       u8      BCDDATE;
+       u8      res15[3];
+       u8      BCDDAY;
+       u8      res16[3];
+       u8      BCDMON;
+       u8      res17[3];
+       u8      BCDYEAR;
+#else /*  little endian */
+       u8      res0[64];
+       u8      RTCCON;
+       u8      res1[3];
+       u8      TICNT;
+       u8      res2[11];
+       u8      RTCALM;
+       u8      res3[3];
+       u8      ALMSEC;
+       u8      res4[3];
+       u8      ALMMIN;
+       u8      res5[3];
+       u8      ALMHOUR;
+       u8      res6[3];
+       u8      ALMDATE;
+       u8      res7[3];
+       u8      ALMMON;
+       u8      res8[3];
+       u8      ALMYEAR;
+       u8      res9[3];
+       u8      RTCRST;
+       u8      res10[3];
+       u8      BCDSEC;
+       u8      res11[3];
+       u8      BCDMIN;
+       u8      res12[3];
+       u8      BCDHOUR;
+       u8      res13[3];
+       u8      BCDDATE;
+       u8      res14[3];
+       u8      BCDDAY;
+       u8      res15[3];
+       u8      BCDMON;
+       u8      res16[3];
+       u8      BCDYEAR;
+       u8      res17[3];
+#endif
+};
+
+
+/* ADC (see manual chapter 16) */
+struct s3c2400_adc {
+       u32     ADCCON;
+       u32     ADCDAT;
+};
+
+
+/* ADC (see manual chapter 16) */
+struct s3c2410_adc {
+       u32     ADCCON;
+       u32     ADCTSC;
+       u32     ADCDLY;
+       u32     ADCDAT0;
+       u32     ADCDAT1;
+};
+
+
+/* SPI (see manual chapter 22) */
+struct s3c24x0_spi_channel {
+       u8      SPCON;
+       u8      res1[3];
+       u8      SPSTA;
+       u8      res2[3];
+       u8      SPPIN;
+       u8      res3[3];
+       u8      SPPRE;
+       u8      res4[3];
+       u8      SPTDAT;
+       u8      res5[3];
+       u8      SPRDAT;
+       u8      res6[3];
+       u8      res7[16];
+};
+
+struct s3c24x0_spi {
+       struct s3c24x0_spi_channel      ch[S3C24X0_SPI_CHANNELS];
+};
+
+
+/* MMC INTERFACE (see S3C2400 manual chapter 19) */
+struct s3c2400_mmc {
+#ifdef __BIG_ENDIAN
+       u8      res1[3];
+       u8      MMCON;
+       u8      res2[3];
+       u8      MMCRR;
+       u8      res3[3];
+       u8      MMFCON;
+       u8      res4[3];
+       u8      MMSTA;
+       u16     res5;
+       u16     MMFSTA;
+       u8      res6[3];
+       u8      MMPRE;
+       u16     res7;
+       u16     MMLEN;
+       u8      res8[3];
+       u8      MMCR7;
+       u32     MMRSP[4];
+       u8      res9[3];
+       u8      MMCMD0;
+       u32     MMCMD1;
+       u16     res10;
+       u16     MMCR16;
+       u8      res11[3];
+       u8      MMDAT;
+#else
+       u8      MMCON;
+       u8      res1[3];
+       u8      MMCRR;
+       u8      res2[3];
+       u8      MMFCON;
+       u8      res3[3];
+       u8      MMSTA;
+       u8      res4[3];
+       u16     MMFSTA;
+       u16     res5;
+       u8      MMPRE;
+       u8      res6[3];
+       u16     MMLEN;
+       u16     res7;
+       u8      MMCR7;
+       u8      res8[3];
+       u32     MMRSP[4];
+       u8      MMCMD0;
+       u8      res9[3];
+       u32     MMCMD1;
+       u16     MMCR16;
+       u16     res10;
+       u8      MMDAT;
+       u8      res11[3];
+#endif
+};
+
+
+/* SD INTERFACE (see S3C2410 manual chapter 19) */
+struct s3c2410_sdi {
+       u32     SDICON;
+       u32     SDIPRE;
+       u32     SDICARG;
+       u32     SDICCON;
+       u32     SDICSTA;
+       u32     SDIRSP0;
+       u32     SDIRSP1;
+       u32     SDIRSP2;
+       u32     SDIRSP3;
+       u32     SDIDTIMER;
+       u32     SDIBSIZE;
+       u32     SDIDCON;
+       u32     SDIDCNT;
+       u32     SDIDSTA;
+       u32     SDIFSTA;
+#ifdef __BIG_ENDIAN
+       u8      res[3];
+       u8      SDIDAT;
+#else
+       u8      SDIDAT;
+       u8      res[3];
+#endif
+       u32     SDIIMSK;
+};
+
+#endif /*__S3C24X0_H__*/
diff --git a/include/asm-arm/arch-s3c24x0/s3c24x0_cpu.h b/include/asm-arm/arch-s3c24x0/s3c24x0_cpu.h
new file mode 100644 (file)
index 0000000..c37d4a1
--- /dev/null
@@ -0,0 +1,27 @@
+/*
+ * (C) Copyright 2009
+ * Kevin Morfitt, Fearnside Systems Ltd, <kevin.morfitt@fearnside-systems.co.uk>
+ *
+ * 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
+ */
+
+#ifdef CONFIG_S3C2400
+       #include <asm/arch/s3c2400.h>
+#elif defined CONFIG_S3C2410
+       #include <asm/arch/s3c2410.h>
+#else
+       #error Please define the s3c24x0 cpu type
+#endif
index 6c1f5ac4e6cfd97a899ae075f0caad886b0983b7..f1f7d932ade8162fcb0866f9b092786d007bb3a8 100644 (file)
@@ -1,9 +1,6 @@
 /*
- * This was automagically generated from mach-types!
+ * This was automagically generated from arch/arm/tools/mach-types!
  * Do NOT edit
- *
- * Last update: Fri Sep 4 22:16:22 2009
- *
  */
 
 #ifndef __ASM_ARM_MACH_TYPE_H
@@ -1637,7 +1634,7 @@ extern unsigned int __machine_arch_type;
 #define MACH_TYPE_AML_M8050            1644
 #define MACH_TYPE_MX35_3DS             1645
 #define MACH_TYPE_MARS                 1646
-#define MACH_TYPE_NTOSD_644XA          1647
+#define MACH_TYPE_NEUROS_OSD2          1647
 #define MACH_TYPE_BADGER               1648
 #define MACH_TYPE_TRIZEPS4WL           1649
 #define MACH_TYPE_TRIZEPS5             1650
@@ -1653,7 +1650,7 @@ extern unsigned int __machine_arch_type;
 #define MACH_TYPE_ZORAN43XX            1660
 #define MACH_TYPE_SONIX926             1661
 #define MACH_TYPE_CELESTIALSEMI        1662
-#define MACH_TYPE_CC9M2443             1663
+#define MACH_TYPE_CC9M2443JS           1663
 #define MACH_TYPE_TW5334               1664
 #define MACH_TYPE_HTCARTEMIS           1665
 #define MACH_TYPE_NAL_HLITE            1666
@@ -1775,6 +1772,7 @@ extern unsigned int __machine_arch_type;
 #define MACH_TYPE_WDG002               1785
 #define MACH_TYPE_SG560ADSL            1786
 #define MACH_TYPE_NEXTIO_N2800_ICA     1787
+#define MACH_TYPE_MACH_MARVELL_NEW1    1788
 #define MACH_TYPE_MARVELL_NEWDB        1789
 #define MACH_TYPE_VANDIHUD             1790
 #define MACH_TYPE_MAGX_E8              1791
@@ -1801,7 +1799,7 @@ extern unsigned int __machine_arch_type;
 #define MACH_TYPE_RD88F5181L_GE        1812
 #define MACH_TYPE_SIFMAIN              1813
 #define MACH_TYPE_SAM9_L9261           1814
-#define MACH_TYPE_CC9M2443JS           1815
+#define MACH_TYPE_CC9M2443             1815
 #define MACH_TYPE_XARIA300             1816
 #define MACH_TYPE_IT9200               1817
 #define MACH_TYPE_RD88F5181L_FXO       1818
@@ -2401,6 +2399,154 @@ extern unsigned int __machine_arch_type;
 #define MACH_TYPE_MULTIBUS_MASTER      2416
 #define MACH_TYPE_MULTIBUS_PBK         2417
 #define MACH_TYPE_TNETV107X            2418
+#define MACH_TYPE_SNAKE                2419
+#define MACH_TYPE_CWMX27               2420
+#define MACH_TYPE_SCH_M480             2421
+#define MACH_TYPE_PLATYPUS             2422
+#define MACH_TYPE_PSS2                 2423
+#define MACH_TYPE_DAVINCI_APM150       2424
+#define MACH_TYPE_STR9100              2425
+#define MACH_TYPE_NET5BIG              2426
+#define MACH_TYPE_SEABED9263           2427
+#define MACH_TYPE_MX51_M2ID            2428
+#define MACH_TYPE_OCTVOCPLUS_EB        2429
+#define MACH_TYPE_KLK_FIREFOX          2430
+#define MACH_TYPE_KLK_WIRMA_MODULE     2431
+#define MACH_TYPE_KLK_WIRMA_MMI        2432
+#define MACH_TYPE_SUPERSONIC           2433
+#define MACH_TYPE_LIBERTY              2434
+#define MACH_TYPE_MH355                2435
+#define MACH_TYPE_PC7802               2436
+#define MACH_TYPE_GNET_SGC             2437
+#define MACH_TYPE_EINSTEIN15           2438
+#define MACH_TYPE_CMPD                 2439
+#define MACH_TYPE_DAVINCI_HASE1        2440
+#define MACH_TYPE_LGEINCITEPHONE       2441
+#define MACH_TYPE_EA313X               2442
+#define MACH_TYPE_FWBD_39064           2443
+#define MACH_TYPE_FWBD_390128          2444
+#define MACH_TYPE_PELCO_MOE            2445
+#define MACH_TYPE_MINIMIX27            2446
+#define MACH_TYPE_OMAP3_THUNDER        2447
+#define MACH_TYPE_PASSIONC             2448
+#define MACH_TYPE_MX27AMATA            2449
+#define MACH_TYPE_BGAT1                2450
+#define MACH_TYPE_BUZZ                 2451
+#define MACH_TYPE_MB9G20               2452
+#define MACH_TYPE_YUSHAN               2453
+#define MACH_TYPE_LIZARD               2454
+#define MACH_TYPE_OMAP3POLYCOM         2455
+#define MACH_TYPE_SMDKV210             2456
+#define MACH_TYPE_BRAVO                2457
+#define MACH_TYPE_SIOGENTOO1           2458
+#define MACH_TYPE_SIOGENTOO2           2459
+#define MACH_TYPE_SM3K                 2460
+#define MACH_TYPE_ACER_TEMPO_F900      2461
+#define MACH_TYPE_SST61VC010_DEV       2462
+#define MACH_TYPE_GLITTERTIND          2463
+#define MACH_TYPE_OMAP_ZOOM3           2464
+#define MACH_TYPE_OMAP_3630SDP         2465
+#define MACH_TYPE_CYBOOK2440           2466
+#define MACH_TYPE_TORINO_S             2467
+#define MACH_TYPE_HAVANA               2468
+#define MACH_TYPE_BEAUMONT_11          2469
+#define MACH_TYPE_VANGUARD             2470
+#define MACH_TYPE_S5PC110_DRACO        2471
+#define MACH_TYPE_CARTESIO_TWO         2472
+#define MACH_TYPE_ASTER                2473
+#define MACH_TYPE_VOGUESV210           2474
+#define MACH_TYPE_ACM500X              2475
+#define MACH_TYPE_KM9260               2476
+#define MACH_TYPE_NIDEFLEXG1           2477
+#define MACH_TYPE_CTERA_PLUG_IO        2478
+#define MACH_TYPE_SMARTQ7              2479
+#define MACH_TYPE_AT91SAM9G10EK2       2480
+#define MACH_TYPE_ASUSP527             2481
+#define MACH_TYPE_AT91SAM9G20MPM2      2482
+#define MACH_TYPE_TOPASA900            2483
+#define MACH_TYPE_ELECTRUM_100         2484
+#define MACH_TYPE_MX51GRB              2485
+#define MACH_TYPE_XEA300               2486
+#define MACH_TYPE_HTCSTARTREK          2487
+#define MACH_TYPE_LIMA                 2488
+#define MACH_TYPE_CSB740               2489
+#define MACH_TYPE_USB_S8815            2490
+#define MACH_TYPE_WATSON_EFM_PLUGIN    2491
+#define MACH_TYPE_MILKYWAY             2492
+#define MACH_TYPE_G4EVM                2493
+#define MACH_TYPE_PICOMOD6             2494
+#define MACH_TYPE_OMAPL138_HAWKBOARD   2495
+#define MACH_TYPE_IP6000               2496
+#define MACH_TYPE_IP6010               2497
+#define MACH_TYPE_UTM400               2498
+#define MACH_TYPE_OMAP3_ZYBEX          2499
+#define MACH_TYPE_WIRELESS_SPACE       2500
+#define MACH_TYPE_SX560                2501
+#define MACH_TYPE_TS41X                2502
+#define MACH_TYPE_ELPHEL10373          2503
+#define MACH_TYPE_RHOBOT               2504
+#define MACH_TYPE_MX51_REFRESH         2505
+#define MACH_TYPE_LS9260               2506
+#define MACH_TYPE_SHANK                2507
+#define MACH_TYPE_QSD8X50_ST1          2508
+#define MACH_TYPE_AT91SAM9M10EKES      2509
+#define MACH_TYPE_HIRAM                2510
+#define MACH_TYPE_PHY3250              2511
+#define MACH_TYPE_EA3250               2512
+#define MACH_TYPE_FDI3250              2513
+#define MACH_TYPE_WHITESTONE           2514
+#define MACH_TYPE_AT91SAM9263NIT       2515
+#define MACH_TYPE_CCMX51               2516
+#define MACH_TYPE_CCMX51JS             2517
+#define MACH_TYPE_CCWMX51              2518
+#define MACH_TYPE_CCWMX51JS            2519
+#define MACH_TYPE_MINI6410             2520
+#define MACH_TYPE_TINY6410             2521
+#define MACH_TYPE_NANO6410             2522
+#define MACH_TYPE_AT572D940HFNLDB      2523
+#define MACH_TYPE_HTCLEO               2524
+#define MACH_TYPE_AVP13                2525
+#define MACH_TYPE_XXSVIDEOD            2526
+#define MACH_TYPE_VPNEXT               2527
+#define MACH_TYPE_SWARCO_ITC3          2528
+#define MACH_TYPE_TX51                 2529
+#define MACH_TYPE_DOLBY_CAT1021        2530
+#define MACH_TYPE_MX28EVK              2531
+#define MACH_TYPE_PHOENIX260           2532
+#define MACH_TYPE_UVACA_STORK          2533
+#define MACH_TYPE_SMARTQ5              2534
+#define MACH_TYPE_ALL3078              2535
+#define MACH_TYPE_CTERA_2BAY_DS        2536
+#define MACH_TYPE_SIOGENTOO3           2537
+#define MACH_TYPE_EPB5000              2538
+#define MACH_TYPE_HY9263               2539
+#define MACH_TYPE_ACER_TEMPO_M900      2540
+#define MACH_TYPE_ACER_TEMPO_DX900     2541
+#define MACH_TYPE_ACER_TEMPO_X960      2542
+#define MACH_TYPE_ACER_ETEN_V900       2543
+#define MACH_TYPE_ACER_ETEN_X900       2544
+#define MACH_TYPE_BONNELL              2545
+#define MACH_TYPE_OHT_MX27             2546
+#define MACH_TYPE_HTCQUARTZ            2547
+#define MACH_TYPE_DAVINCI_DM6467TEVM   2548
+#define MACH_TYPE_C3AX03               2549
+#define MACH_TYPE_MXT_TD60             2550
+#define MACH_TYPE_ESYX                 2551
+#define MACH_TYPE_DOVE_DB              2552
+#define MACH_TYPE_BULLDOG              2553
+#define MACH_TYPE_DERELL_ME2000        2554
+#define MACH_TYPE_BCMRING_BASE         2555
+#define MACH_TYPE_BCMRING_EVM          2556
+#define MACH_TYPE_BCMRING_EVM_JAZZ     2557
+#define MACH_TYPE_BCMRING_SP           2558
+#define MACH_TYPE_BCMRING_SV           2559
+#define MACH_TYPE_BCMRING_SV_JAZZ      2560
+#define MACH_TYPE_BCMRING_TABLET       2561
+#define MACH_TYPE_BCMRING_VP           2562
+#define MACH_TYPE_BCMRING_EVM_SEIKOR   2563
+#define MACH_TYPE_BCMRING_SP_WQVGA     2564
+#define MACH_TYPE_BCMRING_CUSTOM       2565
+#define MACH_TYPE_ACER_S200            2566
 
 #ifdef CONFIG_ARCH_EBSA110
 # ifdef machine_arch_type
@@ -13353,9 +13499,9 @@ extern unsigned int __machine_arch_type;
 # else
 #  define machine_arch_type    MACH_TYPE_REA_2D
 # endif
-# define machine_is_rea_2d()   (machine_arch_type == MACH_TYPE_REA_2D)
+# define machine_is_rea_cpu2() (machine_arch_type == MACH_TYPE_REA_2D)
 #else
-# define machine_is_rea_2d()   (0)
+# define machine_is_rea_cpu2() (0)
 #endif
 
 #ifdef CONFIG_MACH_TI3E524
@@ -21866,16 +22012,16 @@ extern unsigned int __machine_arch_type;
 # define machine_is_mars()     (0)
 #endif
 
-#ifdef CONFIG_MACH_NTOSD_644XA
+#ifdef CONFIG_MACH_NEUROS_OSD2
 # ifdef machine_arch_type
 #  undef machine_arch_type
 #  define machine_arch_type    __machine_arch_type
 # else
-#  define machine_arch_type    MACH_TYPE_NTOSD_644XA
+#  define machine_arch_type    MACH_TYPE_NEUROS_OSD2
 # endif
-# define machine_is_ntosd_644xa()      (machine_arch_type == MACH_TYPE_NTOSD_644XA)
+# define machine_is_neuros_osd2()      (machine_arch_type == MACH_TYPE_NEUROS_OSD2)
 #else
-# define machine_is_ntosd_644xa()      (0)
+# define machine_is_neuros_osd2()      (0)
 #endif
 
 #ifdef CONFIG_MACH_BADGER
@@ -22058,16 +22204,16 @@ extern unsigned int __machine_arch_type;
 # define machine_is_celestialsemi()    (0)
 #endif
 
-#ifdef CONFIG_MACH_CC9M2443
+#ifdef CONFIG_MACH_CC9M2443JS
 # ifdef machine_arch_type
 #  undef machine_arch_type
 #  define machine_arch_type    __machine_arch_type
 # else
-#  define machine_arch_type    MACH_TYPE_CC9M2443
+#  define machine_arch_type    MACH_TYPE_CC9M2443JS
 # endif
-# define machine_is_cc9m2443() (machine_arch_type == MACH_TYPE_CC9M2443)
+# define machine_is_cc9m2443js()       (machine_arch_type == MACH_TYPE_CC9M2443JS)
 #else
-# define machine_is_cc9m2443() (0)
+# define machine_is_cc9m2443js()       (0)
 #endif
 
 #ifdef CONFIG_MACH_TW5334
@@ -23522,6 +23668,18 @@ extern unsigned int __machine_arch_type;
 # define machine_is_nextio_n2800_ica() (0)
 #endif
 
+#ifdef CONFIG_MACH_MACH_MARVELL_NEW1
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_MACH_MARVELL_NEW1
+# endif
+# define machine_is_dove_db()  (machine_arch_type == MACH_TYPE_MACH_MARVELL_NEW1)
+#else
+# define machine_is_dove_db()  (0)
+#endif
+
 #ifdef CONFIG_MACH_MARVELL_NEWDB
 # ifdef machine_arch_type
 #  undef machine_arch_type
@@ -23834,16 +23992,16 @@ extern unsigned int __machine_arch_type;
 # define machine_is_sam9_l9261()       (0)
 #endif
 
-#ifdef CONFIG_MACH_CC9M2443JS
+#ifdef CONFIG_MACH_CC9M2443
 # ifdef machine_arch_type
 #  undef machine_arch_type
 #  define machine_arch_type    __machine_arch_type
 # else
-#  define machine_arch_type    MACH_TYPE_CC9M2443JS
+#  define machine_arch_type    MACH_TYPE_CC9M2443
 # endif
-# define machine_is_cc9m2443js()       (machine_arch_type == MACH_TYPE_CC9M2443JS)
+# define machine_is_cc9m2443() (machine_arch_type == MACH_TYPE_CC9M2443)
 #else
-# define machine_is_cc9m2443js()       (0)
+# define machine_is_cc9m2443() (0)
 #endif
 
 #ifdef CONFIG_MACH_XARIA300
@@ -31034,6 +31192,1782 @@ extern unsigned int __machine_arch_type;
 # define machine_is_tnetv107x()        (0)
 #endif
 
+#ifdef CONFIG_MACH_SNAKE
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_SNAKE
+# endif
+# define machine_is_snake()    (machine_arch_type == MACH_TYPE_SNAKE)
+#else
+# define machine_is_snake()    (0)
+#endif
+
+#ifdef CONFIG_MACH_CWMX27
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_CWMX27
+# endif
+# define machine_is_cwmx27()   (machine_arch_type == MACH_TYPE_CWMX27)
+#else
+# define machine_is_cwmx27()   (0)
+#endif
+
+#ifdef CONFIG_MACH_SCH_M480
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_SCH_M480
+# endif
+# define machine_is_sch_m480() (machine_arch_type == MACH_TYPE_SCH_M480)
+#else
+# define machine_is_sch_m480() (0)
+#endif
+
+#ifdef CONFIG_MACH_PLATYPUS
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_PLATYPUS
+# endif
+# define machine_is_platypus() (machine_arch_type == MACH_TYPE_PLATYPUS)
+#else
+# define machine_is_platypus() (0)
+#endif
+
+#ifdef CONFIG_MACH_PSS2
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_PSS2
+# endif
+# define machine_is_pss2()     (machine_arch_type == MACH_TYPE_PSS2)
+#else
+# define machine_is_pss2()     (0)
+#endif
+
+#ifdef CONFIG_MACH_DAVINCI_APM150
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_DAVINCI_APM150
+# endif
+# define machine_is_davinci_apm150()   (machine_arch_type == MACH_TYPE_DAVINCI_APM150)
+#else
+# define machine_is_davinci_apm150()   (0)
+#endif
+
+#ifdef CONFIG_MACH_STR9100
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_STR9100
+# endif
+# define machine_is_str9100()  (machine_arch_type == MACH_TYPE_STR9100)
+#else
+# define machine_is_str9100()  (0)
+#endif
+
+#ifdef CONFIG_MACH_NET5BIG
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_NET5BIG
+# endif
+# define machine_is_net5big()  (machine_arch_type == MACH_TYPE_NET5BIG)
+#else
+# define machine_is_net5big()  (0)
+#endif
+
+#ifdef CONFIG_MACH_SEABED9263
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_SEABED9263
+# endif
+# define machine_is_seabed9263()       (machine_arch_type == MACH_TYPE_SEABED9263)
+#else
+# define machine_is_seabed9263()       (0)
+#endif
+
+#ifdef CONFIG_MACH_MX51_M2ID
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_MX51_M2ID
+# endif
+# define machine_is_mx51_m2id()        (machine_arch_type == MACH_TYPE_MX51_M2ID)
+#else
+# define machine_is_mx51_m2id()        (0)
+#endif
+
+#ifdef CONFIG_MACH_OCTVOCPLUS_EB
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_OCTVOCPLUS_EB
+# endif
+# define machine_is_octvocplus_eb()    (machine_arch_type == MACH_TYPE_OCTVOCPLUS_EB)
+#else
+# define machine_is_octvocplus_eb()    (0)
+#endif
+
+#ifdef CONFIG_MACH_KLK_FIREFOX
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_KLK_FIREFOX
+# endif
+# define machine_is_klk_firefox()      (machine_arch_type == MACH_TYPE_KLK_FIREFOX)
+#else
+# define machine_is_klk_firefox()      (0)
+#endif
+
+#ifdef CONFIG_MACH_KLK_WIRMA_MODULE
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_KLK_WIRMA_MODULE
+# endif
+# define machine_is_klk_wirma_module() (machine_arch_type == MACH_TYPE_KLK_WIRMA_MODULE)
+#else
+# define machine_is_klk_wirma_module() (0)
+#endif
+
+#ifdef CONFIG_MACH_KLK_WIRMA_MMI
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_KLK_WIRMA_MMI
+# endif
+# define machine_is_klk_wirma_mmi()    (machine_arch_type == MACH_TYPE_KLK_WIRMA_MMI)
+#else
+# define machine_is_klk_wirma_mmi()    (0)
+#endif
+
+#ifdef CONFIG_MACH_SUPERSONIC
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_SUPERSONIC
+# endif
+# define machine_is_supersonic()       (machine_arch_type == MACH_TYPE_SUPERSONIC)
+#else
+# define machine_is_supersonic()       (0)
+#endif
+
+#ifdef CONFIG_MACH_LIBERTY
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_LIBERTY
+# endif
+# define machine_is_liberty()  (machine_arch_type == MACH_TYPE_LIBERTY)
+#else
+# define machine_is_liberty()  (0)
+#endif
+
+#ifdef CONFIG_MACH_MH355
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_MH355
+# endif
+# define machine_is_mh355()    (machine_arch_type == MACH_TYPE_MH355)
+#else
+# define machine_is_mh355()    (0)
+#endif
+
+#ifdef CONFIG_MACH_PC7802
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_PC7802
+# endif
+# define machine_is_pc7802()   (machine_arch_type == MACH_TYPE_PC7802)
+#else
+# define machine_is_pc7802()   (0)
+#endif
+
+#ifdef CONFIG_MACH_GNET_SGC
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_GNET_SGC
+# endif
+# define machine_is_gnet_sgc() (machine_arch_type == MACH_TYPE_GNET_SGC)
+#else
+# define machine_is_gnet_sgc() (0)
+#endif
+
+#ifdef CONFIG_MACH_EINSTEIN15
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_EINSTEIN15
+# endif
+# define machine_is_einstein15()       (machine_arch_type == MACH_TYPE_EINSTEIN15)
+#else
+# define machine_is_einstein15()       (0)
+#endif
+
+#ifdef CONFIG_MACH_CMPD
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_CMPD
+# endif
+# define machine_is_cmpd()     (machine_arch_type == MACH_TYPE_CMPD)
+#else
+# define machine_is_cmpd()     (0)
+#endif
+
+#ifdef CONFIG_MACH_DAVINCI_HASE1
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_DAVINCI_HASE1
+# endif
+# define machine_is_davinci_hase1()    (machine_arch_type == MACH_TYPE_DAVINCI_HASE1)
+#else
+# define machine_is_davinci_hase1()    (0)
+#endif
+
+#ifdef CONFIG_MACH_LGEINCITEPHONE
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_LGEINCITEPHONE
+# endif
+# define machine_is_lgeincitephone()   (machine_arch_type == MACH_TYPE_LGEINCITEPHONE)
+#else
+# define machine_is_lgeincitephone()   (0)
+#endif
+
+#ifdef CONFIG_MACH_EA313X
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_EA313X
+# endif
+# define machine_is_ea313x()   (machine_arch_type == MACH_TYPE_EA313X)
+#else
+# define machine_is_ea313x()   (0)
+#endif
+
+#ifdef CONFIG_MACH_FWBD_39064
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_FWBD_39064
+# endif
+# define machine_is_fwbd_39064()       (machine_arch_type == MACH_TYPE_FWBD_39064)
+#else
+# define machine_is_fwbd_39064()       (0)
+#endif
+
+#ifdef CONFIG_MACH_FWBD_390128
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_FWBD_390128
+# endif
+# define machine_is_fwbd_390128()      (machine_arch_type == MACH_TYPE_FWBD_390128)
+#else
+# define machine_is_fwbd_390128()      (0)
+#endif
+
+#ifdef CONFIG_MACH_PELCO_MOE
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_PELCO_MOE
+# endif
+# define machine_is_pelco_moe()        (machine_arch_type == MACH_TYPE_PELCO_MOE)
+#else
+# define machine_is_pelco_moe()        (0)
+#endif
+
+#ifdef CONFIG_MACH_MINIMIX27
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_MINIMIX27
+# endif
+# define machine_is_minimix27()        (machine_arch_type == MACH_TYPE_MINIMIX27)
+#else
+# define machine_is_minimix27()        (0)
+#endif
+
+#ifdef CONFIG_MACH_OMAP3_THUNDER
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_OMAP3_THUNDER
+# endif
+# define machine_is_omap3_thunder()    (machine_arch_type == MACH_TYPE_OMAP3_THUNDER)
+#else
+# define machine_is_omap3_thunder()    (0)
+#endif
+
+#ifdef CONFIG_MACH_PASSIONC
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_PASSIONC
+# endif
+# define machine_is_passionc() (machine_arch_type == MACH_TYPE_PASSIONC)
+#else
+# define machine_is_passionc() (0)
+#endif
+
+#ifdef CONFIG_MACH_MX27AMATA
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_MX27AMATA
+# endif
+# define machine_is_mx27amata()        (machine_arch_type == MACH_TYPE_MX27AMATA)
+#else
+# define machine_is_mx27amata()        (0)
+#endif
+
+#ifdef CONFIG_MACH_BGAT1
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_BGAT1
+# endif
+# define machine_is_bgat1()    (machine_arch_type == MACH_TYPE_BGAT1)
+#else
+# define machine_is_bgat1()    (0)
+#endif
+
+#ifdef CONFIG_MACH_BUZZ
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_BUZZ
+# endif
+# define machine_is_buzz()     (machine_arch_type == MACH_TYPE_BUZZ)
+#else
+# define machine_is_buzz()     (0)
+#endif
+
+#ifdef CONFIG_MACH_MB9G20
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_MB9G20
+# endif
+# define machine_is_mb9g20()   (machine_arch_type == MACH_TYPE_MB9G20)
+#else
+# define machine_is_mb9g20()   (0)
+#endif
+
+#ifdef CONFIG_MACH_YUSHAN
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_YUSHAN
+# endif
+# define machine_is_yushan()   (machine_arch_type == MACH_TYPE_YUSHAN)
+#else
+# define machine_is_yushan()   (0)
+#endif
+
+#ifdef CONFIG_MACH_LIZARD
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_LIZARD
+# endif
+# define machine_is_lizard()   (machine_arch_type == MACH_TYPE_LIZARD)
+#else
+# define machine_is_lizard()   (0)
+#endif
+
+#ifdef CONFIG_MACH_OMAP3POLYCOM
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_OMAP3POLYCOM
+# endif
+# define machine_is_omap3polycom()     (machine_arch_type == MACH_TYPE_OMAP3POLYCOM)
+#else
+# define machine_is_omap3polycom()     (0)
+#endif
+
+#ifdef CONFIG_MACH_SMDKV210
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_SMDKV210
+# endif
+# define machine_is_smdkv210() (machine_arch_type == MACH_TYPE_SMDKV210)
+#else
+# define machine_is_smdkv210() (0)
+#endif
+
+#ifdef CONFIG_MACH_BRAVO
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_BRAVO
+# endif
+# define machine_is_bravo()    (machine_arch_type == MACH_TYPE_BRAVO)
+#else
+# define machine_is_bravo()    (0)
+#endif
+
+#ifdef CONFIG_MACH_SIOGENTOO1
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_SIOGENTOO1
+# endif
+# define machine_is_siogentoo1()       (machine_arch_type == MACH_TYPE_SIOGENTOO1)
+#else
+# define machine_is_siogentoo1()       (0)
+#endif
+
+#ifdef CONFIG_MACH_SIOGENTOO2
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_SIOGENTOO2
+# endif
+# define machine_is_siogentoo2()       (machine_arch_type == MACH_TYPE_SIOGENTOO2)
+#else
+# define machine_is_siogentoo2()       (0)
+#endif
+
+#ifdef CONFIG_MACH_SM3K
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_SM3K
+# endif
+# define machine_is_sm3k()     (machine_arch_type == MACH_TYPE_SM3K)
+#else
+# define machine_is_sm3k()     (0)
+#endif
+
+#ifdef CONFIG_MACH_ACER_TEMPO_F900
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_ACER_TEMPO_F900
+# endif
+# define machine_is_acer_tempo_f900()  (machine_arch_type == MACH_TYPE_ACER_TEMPO_F900)
+#else
+# define machine_is_acer_tempo_f900()  (0)
+#endif
+
+#ifdef CONFIG_MACH_SST61VC010_DEV
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_SST61VC010_DEV
+# endif
+# define machine_is_sst61vc010_dev()   (machine_arch_type == MACH_TYPE_SST61VC010_DEV)
+#else
+# define machine_is_sst61vc010_dev()   (0)
+#endif
+
+#ifdef CONFIG_MACH_GLITTERTIND
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_GLITTERTIND
+# endif
+# define machine_is_glittertind()      (machine_arch_type == MACH_TYPE_GLITTERTIND)
+#else
+# define machine_is_glittertind()      (0)
+#endif
+
+#ifdef CONFIG_MACH_OMAP_ZOOM3
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_OMAP_ZOOM3
+# endif
+# define machine_is_omap_zoom3()       (machine_arch_type == MACH_TYPE_OMAP_ZOOM3)
+#else
+# define machine_is_omap_zoom3()       (0)
+#endif
+
+#ifdef CONFIG_MACH_OMAP_3630SDP
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_OMAP_3630SDP
+# endif
+# define machine_is_omap_3630sdp()     (machine_arch_type == MACH_TYPE_OMAP_3630SDP)
+#else
+# define machine_is_omap_3630sdp()     (0)
+#endif
+
+#ifdef CONFIG_MACH_CYBOOK2440
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_CYBOOK2440
+# endif
+# define machine_is_cybook2440()       (machine_arch_type == MACH_TYPE_CYBOOK2440)
+#else
+# define machine_is_cybook2440()       (0)
+#endif
+
+#ifdef CONFIG_MACH_TORINO_S
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_TORINO_S
+# endif
+# define machine_is_torino_s() (machine_arch_type == MACH_TYPE_TORINO_S)
+#else
+# define machine_is_torino_s() (0)
+#endif
+
+#ifdef CONFIG_MACH_HAVANA
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_HAVANA
+# endif
+# define machine_is_havana()   (machine_arch_type == MACH_TYPE_HAVANA)
+#else
+# define machine_is_havana()   (0)
+#endif
+
+#ifdef CONFIG_MACH_BEAUMONT_11
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_BEAUMONT_11
+# endif
+# define machine_is_beaumont_11()      (machine_arch_type == MACH_TYPE_BEAUMONT_11)
+#else
+# define machine_is_beaumont_11()      (0)
+#endif
+
+#ifdef CONFIG_MACH_VANGUARD
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_VANGUARD
+# endif
+# define machine_is_vanguard() (machine_arch_type == MACH_TYPE_VANGUARD)
+#else
+# define machine_is_vanguard() (0)
+#endif
+
+#ifdef CONFIG_MACH_S5PC110_DRACO
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_S5PC110_DRACO
+# endif
+# define machine_is_s5pc110_draco()    (machine_arch_type == MACH_TYPE_S5PC110_DRACO)
+#else
+# define machine_is_s5pc110_draco()    (0)
+#endif
+
+#ifdef CONFIG_MACH_CARTESIO_TWO
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_CARTESIO_TWO
+# endif
+# define machine_is_cartesio_two()     (machine_arch_type == MACH_TYPE_CARTESIO_TWO)
+#else
+# define machine_is_cartesio_two()     (0)
+#endif
+
+#ifdef CONFIG_MACH_ASTER
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_ASTER
+# endif
+# define machine_is_aster()    (machine_arch_type == MACH_TYPE_ASTER)
+#else
+# define machine_is_aster()    (0)
+#endif
+
+#ifdef CONFIG_MACH_VOGUESV210
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_VOGUESV210
+# endif
+# define machine_is_voguesv210()       (machine_arch_type == MACH_TYPE_VOGUESV210)
+#else
+# define machine_is_voguesv210()       (0)
+#endif
+
+#ifdef CONFIG_MACH_ACM500X
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_ACM500X
+# endif
+# define machine_is_acm500x()  (machine_arch_type == MACH_TYPE_ACM500X)
+#else
+# define machine_is_acm500x()  (0)
+#endif
+
+#ifdef CONFIG_MACH_KM9260
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_KM9260
+# endif
+# define machine_is_km9260()   (machine_arch_type == MACH_TYPE_KM9260)
+#else
+# define machine_is_km9260()   (0)
+#endif
+
+#ifdef CONFIG_MACH_NIDEFLEXG1
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_NIDEFLEXG1
+# endif
+# define machine_is_nideflexg1()       (machine_arch_type == MACH_TYPE_NIDEFLEXG1)
+#else
+# define machine_is_nideflexg1()       (0)
+#endif
+
+#ifdef CONFIG_MACH_CTERA_PLUG_IO
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_CTERA_PLUG_IO
+# endif
+# define machine_is_ctera_plug_io()    (machine_arch_type == MACH_TYPE_CTERA_PLUG_IO)
+#else
+# define machine_is_ctera_plug_io()    (0)
+#endif
+
+#ifdef CONFIG_MACH_SMARTQ7
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_SMARTQ7
+# endif
+# define machine_is_smartq7()  (machine_arch_type == MACH_TYPE_SMARTQ7)
+#else
+# define machine_is_smartq7()  (0)
+#endif
+
+#ifdef CONFIG_MACH_AT91SAM9G10EK2
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_AT91SAM9G10EK2
+# endif
+# define machine_is_at91sam9g10ek2()   (machine_arch_type == MACH_TYPE_AT91SAM9G10EK2)
+#else
+# define machine_is_at91sam9g10ek2()   (0)
+#endif
+
+#ifdef CONFIG_MACH_ASUSP527
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_ASUSP527
+# endif
+# define machine_is_asusp527() (machine_arch_type == MACH_TYPE_ASUSP527)
+#else
+# define machine_is_asusp527() (0)
+#endif
+
+#ifdef CONFIG_MACH_AT91SAM9G20MPM2
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_AT91SAM9G20MPM2
+# endif
+# define machine_is_at91sam9g20mpm2()  (machine_arch_type == MACH_TYPE_AT91SAM9G20MPM2)
+#else
+# define machine_is_at91sam9g20mpm2()  (0)
+#endif
+
+#ifdef CONFIG_MACH_TOPASA900
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_TOPASA900
+# endif
+# define machine_is_topasa900()        (machine_arch_type == MACH_TYPE_TOPASA900)
+#else
+# define machine_is_topasa900()        (0)
+#endif
+
+#ifdef CONFIG_MACH_ELECTRUM_100
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_ELECTRUM_100
+# endif
+# define machine_is_electrum_100()     (machine_arch_type == MACH_TYPE_ELECTRUM_100)
+#else
+# define machine_is_electrum_100()     (0)
+#endif
+
+#ifdef CONFIG_MACH_MX51GRB
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_MX51GRB
+# endif
+# define machine_is_mx51grb()  (machine_arch_type == MACH_TYPE_MX51GRB)
+#else
+# define machine_is_mx51grb()  (0)
+#endif
+
+#ifdef CONFIG_MACH_XEA300
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_XEA300
+# endif
+# define machine_is_xea300()   (machine_arch_type == MACH_TYPE_XEA300)
+#else
+# define machine_is_xea300()   (0)
+#endif
+
+#ifdef CONFIG_MACH_HTCSTARTREK
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_HTCSTARTREK
+# endif
+# define machine_is_htcstartrek()      (machine_arch_type == MACH_TYPE_HTCSTARTREK)
+#else
+# define machine_is_htcstartrek()      (0)
+#endif
+
+#ifdef CONFIG_MACH_LIMA
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_LIMA
+# endif
+# define machine_is_lima()     (machine_arch_type == MACH_TYPE_LIMA)
+#else
+# define machine_is_lima()     (0)
+#endif
+
+#ifdef CONFIG_MACH_CSB740
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_CSB740
+# endif
+# define machine_is_csb740()   (machine_arch_type == MACH_TYPE_CSB740)
+#else
+# define machine_is_csb740()   (0)
+#endif
+
+#ifdef CONFIG_MACH_USB_S8815
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_USB_S8815
+# endif
+# define machine_is_usb_s8815()        (machine_arch_type == MACH_TYPE_USB_S8815)
+#else
+# define machine_is_usb_s8815()        (0)
+#endif
+
+#ifdef CONFIG_MACH_WATSON_EFM_PLUGIN
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_WATSON_EFM_PLUGIN
+# endif
+# define machine_is_watson_efm_plugin()        (machine_arch_type == MACH_TYPE_WATSON_EFM_PLUGIN)
+#else
+# define machine_is_watson_efm_plugin()        (0)
+#endif
+
+#ifdef CONFIG_MACH_MILKYWAY
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_MILKYWAY
+# endif
+# define machine_is_milkyway() (machine_arch_type == MACH_TYPE_MILKYWAY)
+#else
+# define machine_is_milkyway() (0)
+#endif
+
+#ifdef CONFIG_MACH_G4EVM
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_G4EVM
+# endif
+# define machine_is_g4evm()    (machine_arch_type == MACH_TYPE_G4EVM)
+#else
+# define machine_is_g4evm()    (0)
+#endif
+
+#ifdef CONFIG_MACH_PICOMOD6
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_PICOMOD6
+# endif
+# define machine_is_picomod6() (machine_arch_type == MACH_TYPE_PICOMOD6)
+#else
+# define machine_is_picomod6() (0)
+#endif
+
+#ifdef CONFIG_MACH_OMAPL138_HAWKBOARD
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_OMAPL138_HAWKBOARD
+# endif
+# define machine_is_omapl138_hawkboard()       (machine_arch_type == MACH_TYPE_OMAPL138_HAWKBOARD)
+#else
+# define machine_is_omapl138_hawkboard()       (0)
+#endif
+
+#ifdef CONFIG_MACH_IP6000
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_IP6000
+# endif
+# define machine_is_ip6000()   (machine_arch_type == MACH_TYPE_IP6000)
+#else
+# define machine_is_ip6000()   (0)
+#endif
+
+#ifdef CONFIG_MACH_IP6010
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_IP6010
+# endif
+# define machine_is_ip6010()   (machine_arch_type == MACH_TYPE_IP6010)
+#else
+# define machine_is_ip6010()   (0)
+#endif
+
+#ifdef CONFIG_MACH_UTM400
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_UTM400
+# endif
+# define machine_is_utm400()   (machine_arch_type == MACH_TYPE_UTM400)
+#else
+# define machine_is_utm400()   (0)
+#endif
+
+#ifdef CONFIG_MACH_OMAP3_ZYBEX
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_OMAP3_ZYBEX
+# endif
+# define machine_is_omap3_zybex()      (machine_arch_type == MACH_TYPE_OMAP3_ZYBEX)
+#else
+# define machine_is_omap3_zybex()      (0)
+#endif
+
+#ifdef CONFIG_MACH_WIRELESS_SPACE
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_WIRELESS_SPACE
+# endif
+# define machine_is_wireless_space()   (machine_arch_type == MACH_TYPE_WIRELESS_SPACE)
+#else
+# define machine_is_wireless_space()   (0)
+#endif
+
+#ifdef CONFIG_MACH_SX560
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_SX560
+# endif
+# define machine_is_sx560()    (machine_arch_type == MACH_TYPE_SX560)
+#else
+# define machine_is_sx560()    (0)
+#endif
+
+#ifdef CONFIG_MACH_TS41X
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_TS41X
+# endif
+# define machine_is_ts41x()    (machine_arch_type == MACH_TYPE_TS41X)
+#else
+# define machine_is_ts41x()    (0)
+#endif
+
+#ifdef CONFIG_MACH_ELPHEL10373
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_ELPHEL10373
+# endif
+# define machine_is_elphel10373()      (machine_arch_type == MACH_TYPE_ELPHEL10373)
+#else
+# define machine_is_elphel10373()      (0)
+#endif
+
+#ifdef CONFIG_MACH_RHOBOT
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_RHOBOT
+# endif
+# define machine_is_rhobot()   (machine_arch_type == MACH_TYPE_RHOBOT)
+#else
+# define machine_is_rhobot()   (0)
+#endif
+
+#ifdef CONFIG_MACH_MX51_REFRESH
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_MX51_REFRESH
+# endif
+# define machine_is_mx51_refresh()     (machine_arch_type == MACH_TYPE_MX51_REFRESH)
+#else
+# define machine_is_mx51_refresh()     (0)
+#endif
+
+#ifdef CONFIG_MACH_LS9260
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_LS9260
+# endif
+# define machine_is_ls9260()   (machine_arch_type == MACH_TYPE_LS9260)
+#else
+# define machine_is_ls9260()   (0)
+#endif
+
+#ifdef CONFIG_MACH_SHANK
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_SHANK
+# endif
+# define machine_is_shank()    (machine_arch_type == MACH_TYPE_SHANK)
+#else
+# define machine_is_shank()    (0)
+#endif
+
+#ifdef CONFIG_MACH_QSD8X50_ST1
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_QSD8X50_ST1
+# endif
+# define machine_is_qsd8x50_st1()      (machine_arch_type == MACH_TYPE_QSD8X50_ST1)
+#else
+# define machine_is_qsd8x50_st1()      (0)
+#endif
+
+#ifdef CONFIG_MACH_AT91SAM9M10EKES
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_AT91SAM9M10EKES
+# endif
+# define machine_is_at91sam9m10ekes()  (machine_arch_type == MACH_TYPE_AT91SAM9M10EKES)
+#else
+# define machine_is_at91sam9m10ekes()  (0)
+#endif
+
+#ifdef CONFIG_MACH_HIRAM
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_HIRAM
+# endif
+# define machine_is_hiram()    (machine_arch_type == MACH_TYPE_HIRAM)
+#else
+# define machine_is_hiram()    (0)
+#endif
+
+#ifdef CONFIG_MACH_PHY3250
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_PHY3250
+# endif
+# define machine_is_phy3250()  (machine_arch_type == MACH_TYPE_PHY3250)
+#else
+# define machine_is_phy3250()  (0)
+#endif
+
+#ifdef CONFIG_MACH_EA3250
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_EA3250
+# endif
+# define machine_is_ea3250()   (machine_arch_type == MACH_TYPE_EA3250)
+#else
+# define machine_is_ea3250()   (0)
+#endif
+
+#ifdef CONFIG_MACH_FDI3250
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_FDI3250
+# endif
+# define machine_is_fdi3250()  (machine_arch_type == MACH_TYPE_FDI3250)
+#else
+# define machine_is_fdi3250()  (0)
+#endif
+
+#ifdef CONFIG_MACH_WHITESTONE
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_WHITESTONE
+# endif
+# define machine_is_whitestone()       (machine_arch_type == MACH_TYPE_WHITESTONE)
+#else
+# define machine_is_whitestone()       (0)
+#endif
+
+#ifdef CONFIG_MACH_AT91SAM9263NIT
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_AT91SAM9263NIT
+# endif
+# define machine_is_at91sam9263nit()   (machine_arch_type == MACH_TYPE_AT91SAM9263NIT)
+#else
+# define machine_is_at91sam9263nit()   (0)
+#endif
+
+#ifdef CONFIG_MACH_CCMX51
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_CCMX51
+# endif
+# define machine_is_ccmx51()   (machine_arch_type == MACH_TYPE_CCMX51)
+#else
+# define machine_is_ccmx51()   (0)
+#endif
+
+#ifdef CONFIG_MACH_CCMX51JS
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_CCMX51JS
+# endif
+# define machine_is_ccmx51js() (machine_arch_type == MACH_TYPE_CCMX51JS)
+#else
+# define machine_is_ccmx51js() (0)
+#endif
+
+#ifdef CONFIG_MACH_CCWMX51
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_CCWMX51
+# endif
+# define machine_is_ccwmx51()  (machine_arch_type == MACH_TYPE_CCWMX51)
+#else
+# define machine_is_ccwmx51()  (0)
+#endif
+
+#ifdef CONFIG_MACH_CCWMX51JS
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_CCWMX51JS
+# endif
+# define machine_is_ccwmx51js()        (machine_arch_type == MACH_TYPE_CCWMX51JS)
+#else
+# define machine_is_ccwmx51js()        (0)
+#endif
+
+#ifdef CONFIG_MACH_MINI6410
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_MINI6410
+# endif
+# define machine_is_mini6410() (machine_arch_type == MACH_TYPE_MINI6410)
+#else
+# define machine_is_mini6410() (0)
+#endif
+
+#ifdef CONFIG_MACH_TINY6410
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_TINY6410
+# endif
+# define machine_is_tiny6410() (machine_arch_type == MACH_TYPE_TINY6410)
+#else
+# define machine_is_tiny6410() (0)
+#endif
+
+#ifdef CONFIG_MACH_NANO6410
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_NANO6410
+# endif
+# define machine_is_nano6410() (machine_arch_type == MACH_TYPE_NANO6410)
+#else
+# define machine_is_nano6410() (0)
+#endif
+
+#ifdef CONFIG_MACH_AT572D940HFNLDB
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_AT572D940HFNLDB
+# endif
+# define machine_is_at572d940hfnldb()  (machine_arch_type == MACH_TYPE_AT572D940HFNLDB)
+#else
+# define machine_is_at572d940hfnldb()  (0)
+#endif
+
+#ifdef CONFIG_MACH_HTCLEO
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_HTCLEO
+# endif
+# define machine_is_htcleo()   (machine_arch_type == MACH_TYPE_HTCLEO)
+#else
+# define machine_is_htcleo()   (0)
+#endif
+
+#ifdef CONFIG_MACH_AVP13
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_AVP13
+# endif
+# define machine_is_avp13()    (machine_arch_type == MACH_TYPE_AVP13)
+#else
+# define machine_is_avp13()    (0)
+#endif
+
+#ifdef CONFIG_MACH_XXSVIDEOD
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_XXSVIDEOD
+# endif
+# define machine_is_xxsvideod()        (machine_arch_type == MACH_TYPE_XXSVIDEOD)
+#else
+# define machine_is_xxsvideod()        (0)
+#endif
+
+#ifdef CONFIG_MACH_VPNEXT
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_VPNEXT
+# endif
+# define machine_is_vpnext()   (machine_arch_type == MACH_TYPE_VPNEXT)
+#else
+# define machine_is_vpnext()   (0)
+#endif
+
+#ifdef CONFIG_MACH_SWARCO_ITC3
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_SWARCO_ITC3
+# endif
+# define machine_is_swarco_itc3()      (machine_arch_type == MACH_TYPE_SWARCO_ITC3)
+#else
+# define machine_is_swarco_itc3()      (0)
+#endif
+
+#ifdef CONFIG_MACH_TX51
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_TX51
+# endif
+# define machine_is_tx51()     (machine_arch_type == MACH_TYPE_TX51)
+#else
+# define machine_is_tx51()     (0)
+#endif
+
+#ifdef CONFIG_MACH_DOLBY_CAT1021
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_DOLBY_CAT1021
+# endif
+# define machine_is_dolby_cat1021()    (machine_arch_type == MACH_TYPE_DOLBY_CAT1021)
+#else
+# define machine_is_dolby_cat1021()    (0)
+#endif
+
+#ifdef CONFIG_MACH_MX28EVK
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_MX28EVK
+# endif
+# define machine_is_mx28evk()  (machine_arch_type == MACH_TYPE_MX28EVK)
+#else
+# define machine_is_mx28evk()  (0)
+#endif
+
+#ifdef CONFIG_MACH_PHOENIX260
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_PHOENIX260
+# endif
+# define machine_is_phoenix260()       (machine_arch_type == MACH_TYPE_PHOENIX260)
+#else
+# define machine_is_phoenix260()       (0)
+#endif
+
+#ifdef CONFIG_MACH_UVACA_STORK
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_UVACA_STORK
+# endif
+# define machine_is_uvaca_stork()      (machine_arch_type == MACH_TYPE_UVACA_STORK)
+#else
+# define machine_is_uvaca_stork()      (0)
+#endif
+
+#ifdef CONFIG_MACH_SMARTQ5
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_SMARTQ5
+# endif
+# define machine_is_smartq5()  (machine_arch_type == MACH_TYPE_SMARTQ5)
+#else
+# define machine_is_smartq5()  (0)
+#endif
+
+#ifdef CONFIG_MACH_ALL3078
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_ALL3078
+# endif
+# define machine_is_all3078()  (machine_arch_type == MACH_TYPE_ALL3078)
+#else
+# define machine_is_all3078()  (0)
+#endif
+
+#ifdef CONFIG_MACH_CTERA_2BAY_DS
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_CTERA_2BAY_DS
+# endif
+# define machine_is_ctera_2bay_ds()    (machine_arch_type == MACH_TYPE_CTERA_2BAY_DS)
+#else
+# define machine_is_ctera_2bay_ds()    (0)
+#endif
+
+#ifdef CONFIG_MACH_SIOGENTOO3
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_SIOGENTOO3
+# endif
+# define machine_is_siogentoo3()       (machine_arch_type == MACH_TYPE_SIOGENTOO3)
+#else
+# define machine_is_siogentoo3()       (0)
+#endif
+
+#ifdef CONFIG_MACH_EPB5000
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_EPB5000
+# endif
+# define machine_is_epb5000()  (machine_arch_type == MACH_TYPE_EPB5000)
+#else
+# define machine_is_epb5000()  (0)
+#endif
+
+#ifdef CONFIG_MACH_HY9263
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_HY9263
+# endif
+# define machine_is_hy9263()   (machine_arch_type == MACH_TYPE_HY9263)
+#else
+# define machine_is_hy9263()   (0)
+#endif
+
+#ifdef CONFIG_MACH_ACER_TEMPO_M900
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_ACER_TEMPO_M900
+# endif
+# define machine_is_acer_tempo_m900()  (machine_arch_type == MACH_TYPE_ACER_TEMPO_M900)
+#else
+# define machine_is_acer_tempo_m900()  (0)
+#endif
+
+#ifdef CONFIG_MACH_ACER_TEMPO_DX900
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_ACER_TEMPO_DX900
+# endif
+# define machine_is_acer_tempo_dx650() (machine_arch_type == MACH_TYPE_ACER_TEMPO_DX900)
+#else
+# define machine_is_acer_tempo_dx650() (0)
+#endif
+
+#ifdef CONFIG_MACH_ACER_TEMPO_X960
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_ACER_TEMPO_X960
+# endif
+# define machine_is_acer_tempo_x960()  (machine_arch_type == MACH_TYPE_ACER_TEMPO_X960)
+#else
+# define machine_is_acer_tempo_x960()  (0)
+#endif
+
+#ifdef CONFIG_MACH_ACER_ETEN_V900
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_ACER_ETEN_V900
+# endif
+# define machine_is_acer_eten_v900()   (machine_arch_type == MACH_TYPE_ACER_ETEN_V900)
+#else
+# define machine_is_acer_eten_v900()   (0)
+#endif
+
+#ifdef CONFIG_MACH_ACER_ETEN_X900
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_ACER_ETEN_X900
+# endif
+# define machine_is_acer_eten_x900()   (machine_arch_type == MACH_TYPE_ACER_ETEN_X900)
+#else
+# define machine_is_acer_eten_x900()   (0)
+#endif
+
+#ifdef CONFIG_MACH_BONNELL
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_BONNELL
+# endif
+# define machine_is_bonnell()  (machine_arch_type == MACH_TYPE_BONNELL)
+#else
+# define machine_is_bonnell()  (0)
+#endif
+
+#ifdef CONFIG_MACH_OHT_MX27
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_OHT_MX27
+# endif
+# define machine_is_oht_mx27() (machine_arch_type == MACH_TYPE_OHT_MX27)
+#else
+# define machine_is_oht_mx27() (0)
+#endif
+
+#ifdef CONFIG_MACH_HTCQUARTZ
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_HTCQUARTZ
+# endif
+# define machine_is_htcquartz()        (machine_arch_type == MACH_TYPE_HTCQUARTZ)
+#else
+# define machine_is_htcquartz()        (0)
+#endif
+
+#ifdef CONFIG_MACH_DAVINCI_DM6467TEVM
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_DAVINCI_DM6467TEVM
+# endif
+# define machine_is_davinci_dm6467tevm()       (machine_arch_type == MACH_TYPE_DAVINCI_DM6467TEVM)
+#else
+# define machine_is_davinci_dm6467tevm()       (0)
+#endif
+
+#ifdef CONFIG_MACH_C3AX03
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_C3AX03
+# endif
+# define machine_is_c3ax03()   (machine_arch_type == MACH_TYPE_C3AX03)
+#else
+# define machine_is_c3ax03()   (0)
+#endif
+
+#ifdef CONFIG_MACH_MXT_TD60
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_MXT_TD60
+# endif
+# define machine_is_mxt_td60() (machine_arch_type == MACH_TYPE_MXT_TD60)
+#else
+# define machine_is_mxt_td60() (0)
+#endif
+
+#ifdef CONFIG_MACH_ESYX
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_ESYX
+# endif
+# define machine_is_esyx()     (machine_arch_type == MACH_TYPE_ESYX)
+#else
+# define machine_is_esyx()     (0)
+#endif
+
+#ifdef CONFIG_MACH_DOVE_DB
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_DOVE_DB
+# endif
+# define machine_is_dove_db2() (machine_arch_type == MACH_TYPE_DOVE_DB)
+#else
+# define machine_is_dove_db2() (0)
+#endif
+
+#ifdef CONFIG_MACH_BULLDOG
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_BULLDOG
+# endif
+# define machine_is_bulldog()  (machine_arch_type == MACH_TYPE_BULLDOG)
+#else
+# define machine_is_bulldog()  (0)
+#endif
+
+#ifdef CONFIG_MACH_DERELL_ME2000
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_DERELL_ME2000
+# endif
+# define machine_is_derell_me2000()    (machine_arch_type == MACH_TYPE_DERELL_ME2000)
+#else
+# define machine_is_derell_me2000()    (0)
+#endif
+
+#ifdef CONFIG_MACH_BCMRING_BASE
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_BCMRING_BASE
+# endif
+# define machine_is_bcmring_base()     (machine_arch_type == MACH_TYPE_BCMRING_BASE)
+#else
+# define machine_is_bcmring_base()     (0)
+#endif
+
+#ifdef CONFIG_MACH_BCMRING_EVM
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_BCMRING_EVM
+# endif
+# define machine_is_bcmring_evm()      (machine_arch_type == MACH_TYPE_BCMRING_EVM)
+#else
+# define machine_is_bcmring_evm()      (0)
+#endif
+
+#ifdef CONFIG_MACH_BCMRING_EVM_JAZZ
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_BCMRING_EVM_JAZZ
+# endif
+# define machine_is_bcmring_evm_jazz() (machine_arch_type == MACH_TYPE_BCMRING_EVM_JAZZ)
+#else
+# define machine_is_bcmring_evm_jazz() (0)
+#endif
+
+#ifdef CONFIG_MACH_BCMRING_SP
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_BCMRING_SP
+# endif
+# define machine_is_bcmring_sp()       (machine_arch_type == MACH_TYPE_BCMRING_SP)
+#else
+# define machine_is_bcmring_sp()       (0)
+#endif
+
+#ifdef CONFIG_MACH_BCMRING_SV
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_BCMRING_SV
+# endif
+# define machine_is_bcmring_sv()       (machine_arch_type == MACH_TYPE_BCMRING_SV)
+#else
+# define machine_is_bcmring_sv()       (0)
+#endif
+
+#ifdef CONFIG_MACH_BCMRING_SV_JAZZ
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_BCMRING_SV_JAZZ
+# endif
+# define machine_is_bcmring_sv_jazz()  (machine_arch_type == MACH_TYPE_BCMRING_SV_JAZZ)
+#else
+# define machine_is_bcmring_sv_jazz()  (0)
+#endif
+
+#ifdef CONFIG_MACH_BCMRING_TABLET
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_BCMRING_TABLET
+# endif
+# define machine_is_bcmring_tablet()   (machine_arch_type == MACH_TYPE_BCMRING_TABLET)
+#else
+# define machine_is_bcmring_tablet()   (0)
+#endif
+
+#ifdef CONFIG_MACH_BCMRING_VP
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_BCMRING_VP
+# endif
+# define machine_is_bcmring_vp()       (machine_arch_type == MACH_TYPE_BCMRING_VP)
+#else
+# define machine_is_bcmring_vp()       (0)
+#endif
+
+#ifdef CONFIG_MACH_BCMRING_EVM_SEIKOR
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_BCMRING_EVM_SEIKOR
+# endif
+# define machine_is_bcmring_evm_seikor()       (machine_arch_type == MACH_TYPE_BCMRING_EVM_SEIKOR)
+#else
+# define machine_is_bcmring_evm_seikor()       (0)
+#endif
+
+#ifdef CONFIG_MACH_BCMRING_SP_WQVGA
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_BCMRING_SP_WQVGA
+# endif
+# define machine_is_bcmring_sp_wqvga() (machine_arch_type == MACH_TYPE_BCMRING_SP_WQVGA)
+#else
+# define machine_is_bcmring_sp_wqvga() (0)
+#endif
+
+#ifdef CONFIG_MACH_BCMRING_CUSTOM
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_BCMRING_CUSTOM
+# endif
+# define machine_is_bcmring_custom()   (machine_arch_type == MACH_TYPE_BCMRING_CUSTOM)
+#else
+# define machine_is_bcmring_custom()   (0)
+#endif
+
+#ifdef CONFIG_MACH_ACER_S200
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type    __machine_arch_type
+# else
+#  define machine_arch_type    MACH_TYPE_ACER_S200
+# endif
+# define machine_is_acer_s200()        (machine_arch_type == MACH_TYPE_ACER_S200)
+#else
+# define machine_is_acer_s200()        (0)
+#endif
+
 /*
  * These have not yet been registered
  */
index ea0b3664e01bf690254cdeff9540d3f0f49e2059..3af6ad3e7171e6d2b65fae0ee6fb3d1192768049 100644 (file)
@@ -47,7 +47,7 @@ extern __inline__ void __delay(unsigned long loops)
  * first constant multiplications gets optimized away if the delay is
  * a constant)
  */
-extern __inline__ void udelay(unsigned long usecs)
+extern __inline__ void __udelay(unsigned long usecs)
 {
        __delay(usecs);
 }
index 7f408cb944e3b06304c0866f257586ae66e2e483..3e2674af683d5d99fdbe9248620e9db8166593ae 100644 (file)
@@ -43,31 +43,4 @@ extern char exception_stack[];
 
 #define __isr__ void __attribute__ ((regparm(0)))
 
-#define DECLARE_INTERRUPT(x) \
-       asm(".globl irq_"#x"\n" \
-                   "irq_"#x":\n" \
-                   "pusha \n" \
-                   "pushl $"#x"\n" \
-                   "pushl $irq_return\n" \
-                   "jmp   do_irq\n"); \
-       __isr__ irq_##x(void)
-
-#define DECLARE_EXCEPTION(x, f) \
-       asm(".globl exp_"#x"\n" \
-                   "exp_"#x":\n" \
-                   "pusha \n" \
-                   "movl     %esp, %ebx\n" \
-                   "movl     $exception_stack, %eax\n" \
-                   "movl     %eax, %esp \n" \
-                   "pushl    %ebx\n" \
-                   "movl     32(%esp), %ebx\n" \
-                   "xorl     %edx, %edx\n" \
-                   "movw     36(%esp), %dx\n" \
-                   "pushl    %edx\n" \
-                   "pushl    %ebx\n" \
-                   "pushl    $"#x"\n" \
-                   "pushl    $exp_return\n" \
-                   "jmp      "#f"\n"); \
-       __isr__ exp_##x(void)
-
 #endif
index 3921e01e692c49db15ae506cfca1366a370a2ee0..7c99c8c57dfbe203b357a82caf981d4de91fd2dc 100644 (file)
 #ifndef _U_BOOT_I386_H_
 #define _U_BOOT_I386_H_        1
 
-/* for the following variables, see start.S */
-extern ulong i386boot_start;       /* code start (in flash) */
-extern ulong i386boot_end;         /* code end (in flash) */
-extern ulong i386boot_romdata_start;/* datasegment in flash (also code+rodata end) */
-extern ulong i386boot_romdata_dest; /* data location segment in ram */
-extern ulong i386boot_romdata_size; /* size of data segment */
-extern ulong i386boot_bss_start;    /* bss start */
-extern ulong i386boot_bss_size;     /* bss size */
-extern ulong i386boot_stack_end;    /* first usable RAM address after bss and stack */
-extern ulong i386boot_ram_end;      /* end of ram */
-
-extern ulong i386boot_realmode;     /* start of realmode entry code */
-extern ulong i386boot_realmode_size;/* size of realmode entry code */
-extern ulong i386boot_bios;         /* start of BIOS emulation code */
-extern ulong i386boot_bios_size;    /* size of BIOS emulation code */
-
-
 /* cpu/.../cpu.c */
-int cpu_init(void);
+int cpu_init_r(void);
+int cpu_init_f(void);
 
 /* cpu/.../timer.c */
 void timer_isr(void *);
@@ -55,9 +39,6 @@ int timer_init(void);
 /* cpu/.../interrupts.c */
 int cpu_init_interrupts(void);
 
-/* cpu/.../exceptions.c */
-int cpu_init_exceptions(void);
-
 /* board/.../... */
 int board_init(void);
 int dram_init(void);
index 30125a19ef65629946c8967dac6f2d7ceb8de894..f686e7cb07b26a891b2a4017ee88015762ca4111 100644 (file)
@@ -1,6 +1,8 @@
 #ifndef _405GP_PCI_H
 #define _405GP_PCI_H
 
+#include <pci.h>
+
 /*----------------------------------------------------------------------------+
 | 405GP PCI core memory map defines.
 +----------------------------------------------------------------------------*/
 
 #define PCIDEVID_405GP 0x0
 
+void board_pci_fixup_irq(struct pci_controller *hose, pci_dev_t dev);
+int pci_arbiter_enabled(void);
+int __pci_pre_init(struct pci_controller *hose);
+void __pci_target_init(struct pci_controller *hose);
+void __pci_master_init(struct pci_controller *hose);
+
 #endif
index f7c93bf5a6d427d97108a73146c22482fe285633..749d35cabe6e2731ba57d8d5bd0e8ce8cd8643b9 100644 (file)
@@ -107,6 +107,9 @@ typedef volatile unsigned char      vu_char;
 #ifdef CONFIG_BLACKFIN
 #include <asm/blackfin.h>
 #endif
+#ifdef CONFIG_SOC_DA8XX
+#include <asm/arch/hardware.h>
+#endif
 
 #include <part.h>
 #include <flash.h>
@@ -495,8 +498,9 @@ int prt_mpc8220_clks (void);
 ulong  get_OPB_freq (void);
 ulong  get_PCI_freq (void);
 #endif
-#if defined(CONFIG_S3C2400) || defined(CONFIG_S3C2410) || \
-       defined(CONFIG_LH7A40X) || defined(CONFIG_S3C6400)
+#if defined(CONFIG_S3C24X0) || \
+    defined(CONFIG_LH7A40X) || \
+    defined(CONFIG_S3C6400)
 ulong  get_FCLK (void);
 ulong  get_HCLK (void);
 ulong  get_PCLK (void);
@@ -603,11 +607,14 @@ unsigned long long get_ticks(void);
 void   wait_ticks    (unsigned long);
 
 /* lib_$(ARCH)/time.c */
-void   udelay        (unsigned long);
+void   __udelay      (unsigned long);
 ulong  usec2ticks    (unsigned long usec);
 ulong  ticks2usec    (unsigned long ticks);
 int    init_timebase (void);
 
+/* lib_generic/time.c */
+void   udelay        (unsigned long);
+
 /* lib_generic/vsprintf.c */
 ulong  simple_strtoul(const char *cp,char **endp,unsigned int base);
 #ifdef CONFIG_SYS_64BIT_VSPRINTF
index e9ea1bf7d0878072dc3cad39ccd04ac936f02929..65dc2359d01b0a01405c647630a8a3ab58473a6b 100644 (file)
@@ -60,8 +60,9 @@
 #define CONFIG_SYS_PCI_MEMBASE1        CONFIG_SYS_PCI_MEMBASE  + 0x10000000
 #define CONFIG_SYS_PCI_MEMBASE2        CONFIG_SYS_PCI_MEMBASE1 + 0x10000000
 #define CONFIG_SYS_PCI_MEMBASE3        CONFIG_SYS_PCI_MEMBASE2 + 0x10000000
-#define CONFIG_SYS_PCI_IOBASE          0xe8000000
-
+#define CONFIG_SYS_PCI_IOBASE          0xe8000000
+#define CONFIG_SYS_PCI_SUBSYS_VENDORID PCI_VENDOR_ID_ESDGMBH
+#define CONFIG_SYS_PCI_SUBSYS_ID       0x0444          /* device ID for DU440 */
 
 /* Don't change either of these */
 #define CONFIG_SYS_PERIPHERAL_BASE     0xef600000      /* internal peripherals */
index 2f84f7fcb6681a623320154ee8e020f1771cb13e..5f5f1c76af39d37946ffc380f0abc5b74cf70959 100644 (file)
@@ -99,8 +99,6 @@
 
 #define CONFIG_SUPPORT_VFAT
 
-#define CONFIG_AUTO_UPDATE      1       /* autoupdate via compactflash  */
-
 #undef CONFIG_WATCHDOG                 /* watchdog disabled            */
 
 #define CONFIG_RTC_MC146818            /* DS1685 is MC146818 compatible*/
  * Please note that CONFIG_SYS_SDRAM_BASE _must_ start at 0
  */
 #define CONFIG_SYS_SDRAM_BASE          0x00000000
-#define CONFIG_SYS_FLASH_BASE          0xFFFA0000
-#define CONFIG_SYS_MONITOR_BASE        TEXT_BASE
-#define CONFIG_SYS_MONITOR_LEN         (384 * 1024)    /* Reserve 384kB for Monitor */
-#define CONFIG_SYS_MALLOC_LEN          (384 * 1024)    /* Reserve 384kB for malloc() */
+#define CONFIG_SYS_FLASH_BASE          CONFIG_SYS_MONITOR_BASE
+#define CONFIG_SYS_MONITOR_BASE                TEXT_BASE
+#define CONFIG_SYS_MONITOR_LEN         (~(TEXT_BASE) + 1)
+#define CONFIG_SYS_MALLOC_LEN          (1024 << 10)
 
 /*
  * Environment Variable setup
 #define CONFIG_SYS_USB_OHCI_SLOT_NAME  "ohci_pci"
 #define CONFIG_USB_STORAGE     1
 
+/*
+ * UBI
+ */
+#define CONFIG_CMD_UBI
+#define CONFIG_RBTREE
+#define CONFIG_MTD_DEVICE
+#define CONFIG_MTD_PARTITIONS
+#define CONFIG_CMD_MTDPARTS
+#define CONFIG_LZO
+
 #endif /* __CONFIG_H */
index d6e2f6bc5e2be03e4610e676ca11264a9744f3e3..6310cfc339d301e775078a1b93c9fa8761b8fa81 100644 (file)
 
 #define CONFIG_CMD_BSP
 #define CONFIG_CMD_DATE
-#define CONFIG_CMD_ASKENV
 #define CONFIG_CMD_DHCP
 #define CONFIG_CMD_DTT
 #define CONFIG_CMD_DIAG
 #define CONFIG_CMD_ELF
 #define CONFIG_CMD_FAT
 #define CONFIG_CMD_I2C
-#define CONFIG_CMD_IRQ
 #define CONFIG_CMD_MII
 #define CONFIG_CMD_NAND
 #define CONFIG_CMD_NET
 /* Board-specific PCI */
 #define CONFIG_SYS_PCI_TARGET_INIT
 #define CONFIG_SYS_PCI_MASTER_INIT
+#define CONFIG_SYS_PCI_BOARD_FIXUP_IRQ
 
 /* PCI identification */
 #define CONFIG_SYS_PCI_SUBSYS_VENDORID 0x12FE  /* PCI Vendor ID: esd gmbh      */
 #define CONFIG_SYS_PCI_SUBSYS_ID_NONMONARCH 0x0441     /* PCI Device ID: Non-Monarch */
 #define CONFIG_SYS_PCI_SUBSYS_ID_MONARCH 0x0440        /* PCI Device ID: Monarch */
+/* for weak __pci_target_init() */
+#define CONFIG_SYS_PCI_SUBSYS_ID       CONFIG_SYS_PCI_SUBSYS_ID_MONARCH
 #define CONFIG_SYS_PCI_CLASSCODE_NONMONARCH    PCI_CLASS_PROCESSOR_POWERPC
 #define CONFIG_SYS_PCI_CLASSCODE_MONARCH       PCI_CLASS_BRIDGE_HOST
 
index 618b7f0a7e0fe10529772cc81bf76d48c8caf1d6..ebc81c40034f5ff798cc08e349c34aa79520dc31 100644 (file)
  * High Level Configuration Options
  * (easy to change)
  */
-#define CONFIG_ARM920T         1       /* This is an ARM920T Core      */
-#define        CONFIG_S3C2410          1       /* in a SAMSUNG S3C2410 SoC     */
-#define CONFIG_VCMA9           1       /* on a MPL VCMA9 Board  */
+#define CONFIG_ARM920T 1       /* This is an ARM920T Core      */
+#define CONFIG_S3C24X0 1       /* in a SAMSUNG S3C24x0-type SoC        */
+#define CONFIG_S3C2410 1       /* specifically a SAMSUNG S3C2410 SoC   */
+#define CONFIG_VCMA9   1       /* on a MPL VCMA9 Board  */
 
 /* input clock of PLL */
 #define CONFIG_SYS_CLK_FREQ    12000000/* VCMA9 has 12MHz input clock  */
diff --git a/include/configs/a320evb.h b/include/configs/a320evb.h
new file mode 100644 (file)
index 0000000..fcc5563
--- /dev/null
@@ -0,0 +1,222 @@
+/*
+ * (C) Copyright 2009 Faraday Technology
+ * Po-Yu Chuang <ratbert@faraday-tech.com>
+ *
+ * Configuation settings for the Faraday A320 board.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#ifndef __CONFIG_H
+#define __CONFIG_H
+
+#include <asm/arch/a320.h>
+
+/*-----------------------------------------------------------------------
+ * CPU and Board Configuration Options
+ */
+#undef CONFIG_USE_IRQ          /* we don't need IRQ/FIQ stuff */
+
+#undef CONFIG_SKIP_LOWLEVEL_INIT
+
+/*-----------------------------------------------------------------------
+ * Timer
+ */
+#define CONFIG_SYS_HZ          1000    /* timer ticks per second */
+
+/*-----------------------------------------------------------------------
+ * Real Time Clock
+ */
+#define CONFIG_RTC_FTRTC010
+
+/*-----------------------------------------------------------------------
+ * Serial console configuration
+ */
+
+/* FTUART is a high speed NS 16C550A compatible UART */
+#define CONFIG_BAUDRATE                        38400
+#define CONFIG_CONS_INDEX              1
+#define CONFIG_SYS_NS16550
+#define CONFIG_SYS_NS16550_SERIAL
+#define CONFIG_SYS_NS16550_COM1                0x98200000
+#define CONFIG_SYS_NS16550_REG_SIZE    -4
+#define CONFIG_SYS_NS16550_CLK         18432000
+
+/* valid baudrates */
+#define CONFIG_SYS_BAUDRATE_TABLE      { 9600, 19200, 38400, 57600, 115200 }
+
+/*-----------------------------------------------------------------------
+ * Ethernet
+ */
+#define CONFIG_NET_MULTI
+#define CONFIG_FTMAC100
+
+#define CONFIG_BOOTDELAY       3
+
+/*-----------------------------------------------------------------------
+ * Command line configuration.
+ */
+#include <config_cmd_default.h>
+
+#define CONFIG_CMD_CACHE
+#define CONFIG_CMD_DATE
+#define CONFIG_CMD_PING
+
+/*-----------------------------------------------------------------------
+ * Miscellaneous configurable options
+ */
+#define CONFIG_SYS_LONGHELP                    /* undef to save memory */
+#define CONFIG_SYS_PROMPT      "A320 # "       /* Monitor Command Prompt */
+#define CONFIG_SYS_CBSIZE      256             /* Console I/O Buffer Size */
+
+/* Print Buffer Size */
+#define CONFIG_SYS_PBSIZE      \
+       (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
+
+/* max number of command args */
+#define CONFIG_SYS_MAXARGS     16
+
+/* Boot Argument Buffer Size */
+#define CONFIG_SYS_BARGSIZE    CONFIG_SYS_CBSIZE
+
+/*-----------------------------------------------------------------------
+ * Stack sizes
+ *
+ * The stack sizes are set up in start.S using the settings below
+ */
+#define CONFIG_STACKSIZE       (128 * 1024)    /* regular stack */
+#ifdef CONFIG_USE_IRQ
+#define CONFIG_STACKSIZE_IRQ   (4 * 1024)      /* IRQ stack */
+#define CONFIG_STACKSIZE_FIQ   (4 * 1024)      /* FIQ stack */
+#endif
+
+/*-----------------------------------------------------------------------
+ * Size of malloc() pool
+ */
+#define CONFIG_SYS_MALLOC_LEN          (CONFIG_ENV_SIZE + 128 * 1024)
+
+/*-----------------------------------------------------------------------
+ * size in bytes reserved for initial data
+*/
+#define CONFIG_SYS_GBL_DATA_SIZE       128
+
+/*-----------------------------------------------------------------------
+ * SDRAM controller configuration
+ */
+#define CONFIG_SYS_FTSDMC020_TP0       (FTSDMC020_TP0_TRAS(2) |        \
+                                        FTSDMC020_TP0_TRP(1)  |        \
+                                        FTSDMC020_TP0_TRCD(1) |        \
+                                        FTSDMC020_TP0_TRF(3)  |        \
+                                        FTSDMC020_TP0_TWR(1)  |        \
+                                        FTSDMC020_TP0_TCL(2))
+
+#define CONFIG_SYS_FTSDMC020_TP1       (FTSDMC020_TP1_INI_PREC(4) |    \
+                                        FTSDMC020_TP1_INI_REFT(8) |    \
+                                        FTSDMC020_TP1_REF_INTV(0x180))
+
+#define CONFIG_SYS_FTSDMC020_BANK0_BSR (FTSDMC020_BANK_ENABLE   |      \
+                                        FTSDMC020_BANK_DDW_X16  |      \
+                                        FTSDMC020_BANK_DSZ_256M |      \
+                                        FTSDMC020_BANK_MBW_32   |      \
+                                        FTSDMC020_BANK_SIZE_64M)
+
+/*-----------------------------------------------------------------------
+ * Physical Memory Map
+ */
+#define CONFIG_NR_DRAM_BANKS   1               /* we have 1 bank of DRAM */
+#define PHYS_SDRAM_1           0x10000000      /* SDRAM Bank #1 */
+#define PHYS_SDRAM_1_SIZE      0x04000000      /* 64 MB */
+
+/*
+ * Load address and memory test area should agree with
+ * board/faraday/a320/config.mk. Be careful not to overwrite U-boot itself.
+ */
+#define CONFIG_SYS_LOAD_ADDR           0x12000000
+
+/* memtest works on 63 MB in DRAM */
+#define CONFIG_SYS_MEMTEST_START       0x10000000
+#define CONFIG_SYS_MEMTEST_END         0x13F00000
+
+/*-----------------------------------------------------------------------
+ * Static memory controller configuration
+ */
+
+#include <asm/arch/ftsmc020.h>
+
+#define FTSMC020_BANK0_CONFIG  (FTSMC020_BANK_ENABLE             |     \
+                                FTSMC020_BANK_BASE(PHYS_FLASH_1) |     \
+                                FTSMC020_BANK_SIZE_1M            |     \
+                                FTSMC020_BANK_MBW_8)
+
+#define FTSMC020_BANK0_TIMING  (FTSMC020_TPR_RBE      |        \
+                                FTSMC020_TPR_AST(3)   |        \
+                                FTSMC020_TPR_CTW(3)   |        \
+                                FTSMC020_TPR_ATI(0xf) |        \
+                                FTSMC020_TPR_AT2(3)   |        \
+                                FTSMC020_TPR_WTC(3)   |        \
+                                FTSMC020_TPR_AHT(3)   |        \
+                                FTSMC020_TPR_TRNA(0xf))
+
+#define FTSMC020_BANK1_CONFIG  (FTSMC020_BANK_ENABLE             |     \
+                                FTSMC020_BANK_BASE(PHYS_FLASH_2) |     \
+                                FTSMC020_BANK_SIZE_32M           |     \
+                                FTSMC020_BANK_MBW_32)
+
+#define FTSMC020_BANK1_TIMING  (FTSMC020_TPR_AST(3)   |        \
+                                FTSMC020_TPR_CTW(3)   |        \
+                                FTSMC020_TPR_ATI(0xf) |        \
+                                FTSMC020_TPR_AT2(3)   |        \
+                                FTSMC020_TPR_WTC(3)   |        \
+                                FTSMC020_TPR_AHT(3)   |        \
+                                FTSMC020_TPR_TRNA(0xf))
+
+#define CONFIG_SYS_FTSMC020_CONFIGS    {                       \
+       { FTSMC020_BANK0_CONFIG, FTSMC020_BANK0_TIMING, },      \
+       { FTSMC020_BANK1_CONFIG, FTSMC020_BANK1_TIMING, },      \
+}
+
+/*-----------------------------------------------------------------------
+ * FLASH and environment organization
+ */
+
+/* use CFI framework */
+#define CONFIG_SYS_FLASH_CFI
+#define CONFIG_FLASH_CFI_DRIVER
+
+/* support JEDEC */
+#define CONFIG_FLASH_CFI_LEGACY
+#define CONFIG_SYS_FLASH_LEGACY_512Kx8
+
+#define PHYS_FLASH_1                   0x00000000
+#define PHYS_FLASH_2                   0x00400000
+#define CONFIG_SYS_FLASH_BASE          PHYS_FLASH_1
+#define CONFIG_SYS_FLASH_BANKS_LIST    { PHYS_FLASH_1, PHYS_FLASH_2, }
+
+#define CONFIG_SYS_MONITOR_BASE                PHYS_FLASH_1
+
+/* max number of memory banks */
+#define CONFIG_SYS_MAX_FLASH_BANKS     2
+
+/* max number of sectors on one chip */
+#define CONFIG_SYS_MAX_FLASH_SECT      512
+
+#undef CONFIG_SYS_FLASH_EMPTY_INFO
+
+/* environments */
+#define CONFIG_ENV_IS_IN_FLASH
+#define CONFIG_ENV_ADDR                        0x00060000
+#define CONFIG_ENV_SIZE                        0x20000
+
+#endif /* __CONFIG_H */
index e6248e9df7cc961337a7121e6ba6a696774759f6..964630fa5f7403afb1797577257fc8a7543d7d2f 100644 (file)
  */
 #include <config_cmd_default.h>
 
-#define CONFIG_CMD_ASKENV
 #define CONFIG_CMD_DHCP
 #define CONFIG_CMD_DIAG
 #define CONFIG_CMD_EEPROM
 #define CONFIG_CMD_FPGA
 #define CONFIG_CMD_I2C
-#define CONFIG_CMD_IRQ
 #define CONFIG_CMD_MII
 #define CONFIG_CMD_NAND
 #define CONFIG_CMD_NET
index 575f60e1661d1dddd6a4760435bbd73406beb939..ddac5fbab12222fec957efcf35168a48b6121555 100644 (file)
@@ -76,6 +76,7 @@
  * Size of malloc() pool
  */
 #define        CONFIG_ENV_SIZE SZ_128K /* Total Size of Environment Sector */
+#define CONFIG_ENV_SIZE_FLEX SZ_256K
 #define        CONFIG_SYS_MALLOC_LEN   (CONFIG_ENV_SIZE + SZ_1M)
 /* bytes reserved for initial data */
 #define        CONFIG_SYS_GBL_DATA_SIZE        128
 #define CONFIG_SYS_MONITOR_LEN         SZ_256K /* U-Boot image size */
 #define        CONFIG_ENV_IS_IN_ONENAND        1
 #define CONFIG_ENV_ADDR                0x00020000
+#define CONFIG_ENV_ADDR_FLEX   0x00040000
 
 #define CONFIG_SYS_64BIT_VSPRINTF              /* needed for nand_util.c */
 
diff --git a/include/configs/da830evm.h b/include/configs/da830evm.h
new file mode 100644 (file)
index 0000000..38e2ce1
--- /dev/null
@@ -0,0 +1,243 @@
+/*
+ * Copyright (C) 2008 Texas Instruments, Inc <www.ti.com>
+ *
+ * Based on davinci_dvevm.h. Original Copyrights follow:
+ *
+ * Copyright (C) 2007 Sergey Kubushyn <ksi@koi8.net>
+ *
+ * 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 __CONFIG_H
+#define __CONFIG_H
+
+/*
+ * Board
+ */
+
+/*
+ * SoC Configuration
+ */
+#define CONFIG_MACH_DAVINCI_DA830_EVM
+#define CONFIG_ARM926EJS               /* arm926ejs CPU core */
+#define CONFIG_SOC_DA8XX               /* TI DA8xx SoC */
+#define CONFIG_SYS_CLK_FREQ            clk_get(DAVINCI_ARM_CLKID)
+#define CONFIG_SYS_OSCIN_FREQ          24000000
+#define CONFIG_SYS_TIMERBASE           DAVINCI_TIMER0_BASE
+#define CONFIG_SYS_HZ_CLOCK            clk_get(DAVINCI_AUXCLK_CLKID)
+#define CONFIG_SYS_HZ                  1000
+#define CONFIG_SKIP_LOWLEVEL_INIT
+#define CONFIG_SKIP_RELOCATE_UBOOT     /* to a proper address, init done */
+
+/*
+ * Memory Info
+ */
+#define CONFIG_SYS_MALLOC_LEN  (0x10000 + 1*1024*1024) /* malloc() len */
+#define CONFIG_SYS_GBL_DATA_SIZE       128 /* reserved for initial data */
+#define PHYS_SDRAM_1           DAVINCI_DDR_EMIF_DATA_BASE /* DDR Start */
+#define PHYS_SDRAM_1_SIZE      (64 << 20) /* SDRAM size 64MB */
+#define CONFIG_SYS_MEMTEST_START       PHYS_SDRAM_1 /* memtest start addr */
+#define CONFIG_SYS_MEMTEST_END         (PHYS_SDRAM_1 + 16*1024*1024) /* 16MB test */
+#define CONFIG_NR_DRAM_BANKS   1 /* we have 1 bank of DRAM */
+#define CONFIG_STACKSIZE       (256*1024) /* regular stack */
+
+/*
+ * Serial Driver info
+ */
+#define CONFIG_SYS_NS16550
+#define CONFIG_SYS_NS16550_SERIAL
+#define CONFIG_SYS_NS16550_REG_SIZE    -4      /* NS16550 register size */
+#define CONFIG_SYS_NS16550_COM1        DAVINCI_UART2_BASE /* Base address of UART2 */
+#define CONFIG_SYS_NS16550_CLK clk_get(DAVINCI_UART2_CLKID)
+#define CONFIG_CONS_INDEX      1               /* use UART0 for console */
+#define CONFIG_BAUDRATE                115200          /* Default baud rate */
+#define CONFIG_SYS_BAUDRATE_TABLE      { 9600, 19200, 38400, 57600, 115200 }
+
+/*
+ * I2C Configuration
+ */
+#define CONFIG_HARD_I2C
+#define CONFIG_DRIVER_DAVINCI_I2C
+#define CONFIG_SYS_I2C_SPEED           25000 /* 100Kbps won't work, H/W bug */
+#define CONFIG_SYS_I2C_SLAVE           10 /* Bogus, master-only in U-Boot */
+
+/*
+ * I2C EEPROM definitions for catalyst 24W256 EEPROM chip
+ */
+#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 2
+#define CONFIG_SYS_I2C_EEPROM_ADDR     0x50
+#define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS      6
+#define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS  20
+
+/*
+ * Network & Ethernet Configuration
+ */
+#ifdef CONFIG_DRIVER_TI_EMAC
+#define CONFIG_MII
+#define CONFIG_BOOTP_DEFAULT
+#define CONFIG_BOOTP_DNS
+#define CONFIG_BOOTP_DNS2
+#define CONFIG_BOOTP_SEND_HOSTNAME
+#define CONFIG_NET_RETRY_COUNT 10
+#define CONFIG_NET_MULTI
+#endif
+
+/*
+ * Flash & Environment
+ */
+#ifdef CONFIG_USE_NAND
+#undef CONFIG_ENV_IS_IN_FLASH
+#define CONFIG_NAND_DAVINCI
+#define CONFIG_SYS_NO_FLASH
+#define CONFIG_ENV_IS_IN_NAND          /* U-Boot env in NAND Flash  */
+#define CONFIG_ENV_OFFSET              0x0 /* Block 0--not used by bootcode */
+#define CONFIG_ENV_SIZE                        (128 << 10)
+#define CONFIG_SYS_NAND_4BIT_HW_ECC_OOBFIRST
+#define CONFIG_SYS_NAND_CS             3
+#define CONFIG_SYS_NAND_BASE           DAVINCI_ASYNC_EMIF_DATA_CE3_BASE
+#define CONFIG_SYS_CLE_MASK            0x10
+#define CONFIG_SYS_ALE_MASK            0x8
+#define CONFIG_SYS_NAND_HW_ECC
+#define CONFIG_SYS_MAX_NAND_DEVICE     1 /* Max number of NAND devices */
+#define NAND_MAX_CHIPS                 1
+#define DEF_BOOTM                      ""
+#endif
+
+#ifdef CONFIG_USE_NOR
+#define CONFIG_ENV_IS_IN_FLASH
+#undef CONFIG_SYS_NO_FLASH
+#define CONFIG_SYS_FLASH_CFI_DRIVER
+#define CONFIG_SYS_FLASH_CFI
+#define CONFIG_SYS_MAX_FLASH_BANKS     1 /* max number of flash banks */
+#define CONFIG_SYS_FLASH_SECT_SZ       (64 << 10) /* 64KB */
+#define CONFIG_ENV_OFFSET              (CONFIG_SYS_FLASH_SECT_SZ*3)
+#define CONFIG_SYS_FLASH_BASE          DAVINCI_ASYNC_EMIF_DATA_CE2_BASE
+#define PHYS_FLASH_SIZE                        (32 << 20) /* Flash size 32MB */
+#define CONFIG_SYS_MAX_FLASH_SECT (PHYS_FLASH_SIZE/CONFIG_SYS_FLASH_SECT_SZ)
+#define CONFIG_ENV_SECT_SIZE           CONFIG_SYS_FLASH_SECT_SZ
+#define CONFIG_SYS_FLASH_SPL_ACCESS
+#endif
+
+#ifdef CONFIG_USE_SPIFLASH
+#undef CONFIG_ENV_IS_IN_FLASH
+#undef CONFIG_ENV_IS_IN_NAND
+#define CONFIG_ENV_IS_IN_SPI_FLASH
+#define CONFIG_ENV_SIZE                        (16 << 10)
+#define CONFIG_ENV_OFFSET              (256 << 10)
+#define CONFIG_ENV_SECT_SIZE           4096
+#define CONFIG_SYS_NO_FLASH
+#define CONFIG_SPI
+#define CONFIG_SPI_FLASH
+#define CONFIG_SPI_FLASH_WINBOND
+#define CONFIG_DAVINCI_SPI
+#define CONFIG_SYS_SPI_BASE            DAVINCI_SPI0_BASE
+#define CONFIG_SYS_SPI_CLK             clk_get(DAVINCI_SPI0_CLKID)
+#define CONFIG_SF_DEFAULT_SPEED                50000000
+#define CONFIG_SYS_ENV_SPI_MAX_HZ      CONFIG_SF_DEFAULT_SPEED
+#endif
+
+
+/*
+ * U-Boot general configuration
+ */
+#undef CONFIG_USE_IRQ                  /* No IRQ/FIQ in U-Boot */
+#undef CONFIG_MISC_INIT_R
+#undef CONFIG_BOOTDELAY
+#define CONFIG_BOOTFILE                "uImage" /* Boot file name */
+#define CONFIG_SYS_PROMPT      "DA830-evm > " /* Command Prompt */
+#define CONFIG_SYS_CBSIZE      1024 /* Console I/O Buffer Size */
+#define CONFIG_SYS_PBSIZE      (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16)
+#define CONFIG_SYS_MAXARGS     16 /* max number of command args */
+#define CONFIG_SYS_BARGSIZE    CONFIG_SYS_CBSIZE /* Boot Args Buffer Size */
+#define CONFIG_SYS_LOAD_ADDR   (CONFIG_SYS_MEMTEST_START + 0x700000)
+#define CONFIG_VERSION_VARIABLE
+#define CONFIG_AUTO_COMPLETE   /* Won't work with hush so far, may be later */
+#define CONFIG_SYS_HUSH_PARSER
+#define CONFIG_SYS_PROMPT_HUSH_PS2     "> "
+#define CONFIG_CMDLINE_EDITING
+#define CONFIG_SYS_LONGHELP
+#define CONFIG_CRC32_VERIFY
+#define CONFIG_MX_CYCLIC
+
+/*
+ * Linux Information
+ */
+#define LINUX_BOOT_PARAM_ADDR  (CONFIG_SYS_MEMTEST_START + 0x100)
+#define CONFIG_CMDLINE_TAG
+#define CONFIG_SETUP_MEMORY_TAGS
+#define CONFIG_BOOTARGS                "mem=32M console=ttyS2,115200n8 root=/dev/mtdblock/2 rw noinitrd ip=dhcp"
+#define CONFIG_BOOTCOMMAND     ""
+#define CONFIG_BOOTDELAY       3
+
+/*
+ * U-Boot commands
+ */
+#include <config_cmd_default.h>
+#define CONFIG_CMD_ENV
+#define CONFIG_CMD_ASKENV
+#define CONFIG_CMD_DHCP
+#define CONFIG_CMD_DIAG
+#define CONFIG_CMD_MII
+#define CONFIG_CMD_PING
+#define CONFIG_CMD_SAVES
+#define CONFIG_CMD_MEMORY
+#undef CONFIG_CMD_FPGA
+#undef CONFIG_CMD_SETGETDCR
+#define CONFIG_CMD_EEPROM
+
+#ifndef CONFIG_DRIVER_TI_EMAC
+#undef CONFIG_CMD_NET
+#undef CONFIG_CMD_DHCP
+#undef CONFIG_CMD_MII
+#undef CONFIG_CMD_PING
+#endif
+
+#ifdef CONFIG_USE_NAND
+#undef CONFIG_CMD_FLASH
+#undef CONFIG_CMD_IMLS
+#define CONFIG_CMD_NAND
+#define CONFIG_CMD_MTDPARTS
+#define CONFIG_MTD_PARTITIONS
+#define CONFIG_CMD_UBI
+#define CONFIG_RBTREE
+#endif
+
+#ifdef CONFIG_USE_SPIFLASH
+#undef CONFIG_CMD_IMLS
+#undef CONFIG_CMD_FLASH
+#define CONFIG_CMD_SPI
+#define CONFIG_CMD_SAVEENV
+#endif
+
+#if !defined(CONFIG_USE_NAND) && \
+       !defined(CONFIG_USE_NOR) && \
+       !defined(CONFIG_USE_SPIFLASH)
+#define CONFIG_ENV_IS_NOWHERE
+#define CONFIG_SYS_NO_FLASH
+#define CONFIG_ENV_SIZE                (16 << 10)
+#undef CONFIG_CMD_IMLS
+#undef CONFIG_CMD_FLASH
+#undef CONFIG_CMD_ENV
+#endif
+
+#ifdef CONFIG_USB_DA8XX
+#define CONFIG_CMD_USB         /* include support for usb      */
+#define CONFIG_CMD_STORAGE     /* include support for usb      */
+#define CONFIG_CMD_FAT         /* include support for FAT/storage*/
+#define CONFIG_DOS_PARTITION   /* include support for FAT/storage*/
+#endif
+
+#endif /* __CONFIG_H */
index bd5037e910d27156fb2b8dceb524e854422392ac..1011770962cf7391385ee373dab3ab7a4429a4af 100644 (file)
@@ -66,6 +66,9 @@
 
 /* Hardware drivers */
 
+/* DDR - I use Micron DDR */
+#define CONFIG_OMAP3_MICRON_DDR                1
+
 /* DM9000 */
 #define CONFIG_NET_MULTI               1
 #define CONFIG_NET_RETRY_COUNT         20
index 243a55417859da26d07bd785ac533c41239a751f..6a68bf4938f157bfba19475f50e82fbbb45f2fd2 100644 (file)
@@ -28,6 +28,8 @@
 #ifndef __CONFIG_H
 #define __CONFIG_H
 
+#define CONFIG_RELOC_FIXUP_WORKS
+
 /*
  * Stuff still to be dealt with -
  */
@@ -61,7 +63,7 @@
 /*
  * Size of malloc() pool
  */
-#define CONFIG_MALLOC_SIZE     (CONFIG_SYS_ENV_SIZE + 128*1024)
+#define CONFIG_SYS_MALLOC_LEN  (CONFIG_ENV_SIZE + 128*1024)
 
 #define CONFIG_BAUDRATE                9600
 
 #ifndef __ASSEMBLER__
 extern unsigned long ip;
 
-#define PRINTIP                                asm ("call next_line\n" \
-                                           "next_line:\n" \
+#define PRINTIP                                asm ("call 0\n" \
+                                           "0:\n" \
                                            "pop %%eax\n" \
                                            "movl %%eax, %0\n" \
                                            :"=r"(ip) \
index 8ebb0bbee64436325f26581a2a20d3101009865b..e219cccc95b435a3c6fcfbc0e622d6d67208ce8c 100644 (file)
 #define CONFIG_SYS_NAND_BASE           0xd8000000
 #define CONFIG_JFFS2_NAND
 #define CONFIG_MXC_NAND_HWECC
+#define CONFIG_SYS_64BIT_VSPRINTF      /* needed for nand_util.c */
 
 /*
  * SD/MMC
diff --git a/include/configs/ipek01.h b/include/configs/ipek01.h
new file mode 100644 (file)
index 0000000..d9028fa
--- /dev/null
@@ -0,0 +1,408 @@
+/*
+ * (C) Copyright 2006
+ * MicroSys GmbH
+ *
+ * (C) Copyright 2009
+ * Wolfgang Grandegger, DENX Software Engineering, wg@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
+ */
+
+#ifndef __CONFIG_H
+#define __CONFIG_H
+
+/*
+ * High Level Configuration Options
+ */
+
+#define CONFIG_MPC5200
+#define CONFIG_MPC5xxx         1       /* This is an MPC5xxx CPU */
+#define CONFIG_MPX5200         1       /* ... on MPX5200 board */
+#define CONFIG_MPC5200_DDR     1       /* ... use DDR RAM */
+#define CONFIG_IPEK01                  /* Motherboard is ipek01 */
+
+#define CONFIG_SYS_MPC5XXX_CLKIN       33000000 /* ... running at 33MHz */
+
+#define CONFIG_MISC_INIT_R
+
+#define BOOTFLAG_COLD          0x01    /* Normal Power-On: Boot from FLASH  */
+#define BOOTFLAG_WARM          0x02    /* Software reboot */
+
+#define CONFIG_SYS_CACHELINE_SIZE      32 /* For MPC5xxx CPUs */
+#ifdef CONFIG_CMD_KGDB
+#define CONFIG_SYS_CACHELINE_SHIFT     5  /* log base 2 of the above value */
+#endif
+
+/*
+ * Serial console configuration
+ */
+#define CONFIG_PSC_CONSOLE     1       /* console is on PSC1 */
+#define CONFIG_BAUDRATE                115200  /* ... at 9600 bps */
+#define CONFIG_SYS_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200, 230400 }
+
+#define CONFIG_CMDLINE_EDITING 1       /* add command line history */
+
+/*
+ * Video configuration for LIME GDC
+ */
+#define CONFIG_VIDEO
+#ifdef CONFIG_VIDEO
+#define CONFIG_VIDEO_MB862xx
+#define CONFIG_VIDEO_MB862xx_ACCEL
+#define VIDEO_FB_16BPP_WORD_SWAP
+#define CONFIG_CFB_CONSOLE
+#define CONFIG_VIDEO_LOGO
+#define CONFIG_VIDEO_BMP_LOGO
+#define CONFIG_CONSOLE_EXTRA_INFO
+#define CONFIG_VGA_AS_SINGLE_DEVICE
+#define CONFIG_SYS_CONSOLE_IS_IN_ENV
+#define CONFIG_VIDEO_SW_CURSOR
+#define CONFIG_SPLASH_SCREEN
+#define CONFIG_VIDEO_BMP_GZIP
+#define CONFIG_SYS_VIDEO_LOGO_MAX_SIZE (2 << 20)       /* decompressed img */
+/* Lime clock frequency */
+#define CONFIG_SYS_MB862xx_CCF 0x90000 /* geo 166MHz other 133MHz */
+/* SDRAM parameter */
+#define CONFIG_SYS_MB862xx_MMR 0x41c767e3
+#endif
+
+/*
+ * PCI Mapping:
+ * 0x40000000 - 0x4fffffff - PCI Memory
+ * 0x50000000 - 0x50ffffff - PCI IO Space
+ */
+#define CONFIG_PCI             1
+#define CONFIG_PCI_PNP         1
+#define CONFIG_PCI_SCAN_SHOW   1
+
+#define CONFIG_PCI_MEM_BUS     0x40000000
+#define CONFIG_PCI_MEM_PHYS    CONFIG_PCI_MEM_BUS
+#define CONFIG_PCI_MEM_SIZE    0x10000000
+
+#define CONFIG_PCI_IO_BUS      0x50000000
+#define CONFIG_PCI_IO_PHYS     CONFIG_PCI_IO_BUS
+#define CONFIG_PCI_IO_SIZE     0x01000000
+
+#define CONFIG_NET_MULTI       1
+#define CONFIG_MII             1
+#define CONFIG_EEPRO100                1
+#define CONFIG_SYS_RX_ETH_BUFFER       8  /* use 8 rx buffer on eepro100  */
+
+/* Partitions */
+#define CONFIG_DOS_PARTITION
+
+/* USB */
+#define CONFIG_USB_OHCI_NEW
+#define CONFIG_SYS_OHCI_BE_CONTROLLER
+#define CONFIG_USB_STORAGE
+
+#define CONFIG_SYS_USB_OHCI_CPU_INIT
+#define CONFIG_SYS_USB_OHCI_REGS_BASE          MPC5XXX_USB
+#define CONFIG_SYS_USB_OHCI_SLOT_NAME          "mpc5200"
+#define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS     15
+
+/*
+ * Command line configuration.
+ */
+#include <config_cmd_default.h>
+
+#ifdef CONFIG_VIDEO
+#define CONFIG_CMD_BMP         /* BMP support */
+#endif
+#define CONFIG_CMD_DATE                /* support for RTC, date/time...*/
+#define CONFIG_CMD_DHCP                /* DHCP Support */
+#define CONFIG_CMD_FAT         /* FAT support */
+#define CONFIG_CMD_I2C         /* I2C serial bus support */
+#define CONFIG_CMD_IDE         /* IDE harddisk support */
+#define CONFIG_CMD_IRQ         /* irqinfo */
+#define CONFIG_CMD_MII         /* MII support */
+#define CONFIG_CMD_PCI         /* pciinfo */
+#define CONFIG_CMD_USB         /* USB Support */
+
+#define CONFIG_SYS_LOWBOOT     1
+
+/*
+ * Autobooting
+ */
+#define CONFIG_BOOTDELAY       5       /* autoboot after 5 seconds */
+
+#define CONFIG_PREBOOT "echo;" \
+       "echo Type \\\"run flash_nfs\\\" to mount root filesystem over NFS;" \
+       "echo"
+
+#undef CONFIG_BOOTARGS
+
+#define        CONFIG_EXTRA_ENV_SETTINGS                                       \
+       "netdev=eth0\0"                                                 \
+       "consoledev=ttyPSC0\0"                                          \
+       "hostname=ipek01\0"                                             \
+       "nfsargs=setenv bootargs root=/dev/nfs rw "                     \
+               "nfsroot=${serverip}:${rootpath}\0"                     \
+       "ramargs=setenv bootargs root=/dev/ram rw\0"                    \
+       "addip=setenv bootargs ${bootargs} "                            \
+               "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}"      \
+               ":${hostname}:${netdev}:off panic=1\0"                  \
+       "addtty=setenv bootargs ${bootargs} "                           \
+               "console=${consoledev},${baudrate}\0"                   \
+       "flash_nfs=run nfsargs addip addtty;"                           \
+               "bootm ${kernel_addr} - ${fdtaddr}\0"                   \
+       "flash_self=run ramargs addip addtty;"                          \
+               "bootm ${kernel_addr} ${ramdisk_addr} ${fdtaddr}\0"     \
+       "net_nfs=tftp 200000 ${bootfile}; tftp ${fdtaddr} ${fdtfile};"  \
+               "run nfsargs addip addtty;"                             \
+                "bootm ${loadaddr} - ${fdtaddr}\0"                     \
+       "rootpath=/opt/eldk/ppc_6xx\0"                                  \
+       "bootfile=ipek01/uImage\0"                                      \
+       "load=tftp 100000 ipek01/u-boot.bin\0"                          \
+       "update=protect off FC000000 +60000; era FC000000 +60000; "     \
+               "cp.b 100000 FC000000 ${filesize}\0"                    \
+       "upd=run load;run update\0"                                     \
+       "fdtaddr=800000\0"                                              \
+       "loadaddr=400000\0"                                             \
+       "fdtfile=ipek01/ipek01.dtb\0"                                   \
+       ""
+
+#define CONFIG_BOOTCOMMAND     "run flash_self"
+
+/*
+ * IPB Bus clocking configuration.
+ */
+#define CONFIG_SYS_IPBCLK_EQUALS_XLBCLK        /* for 133MHz */
+/* PCI clock must be 33, because board will not boot */
+#undef CONFIG_SYS_PCICLK_EQUALS_IPBCLK_DIV2    /* for 66MHz */
+
+/*
+ * Open firmware flat tree support
+ */
+#define CONFIG_OF_LIBFDT       1
+#define CONFIG_OF_BOARD_SETUP  1
+
+#define OF_CPU                 "PowerPC,5200@0"
+#define OF_SOC                 "soc5200@f0000000"
+#define OF_TBCLK               (bd->bi_busfreq / 4)
+
+/*
+ * I2C configuration
+ */
+#define CONFIG_HARD_I2C                1       /* I2C with hardware support */
+#define CONFIG_SYS_I2C_MODULE  2       /* Select I2C module #1 or #2 */
+
+#define CONFIG_SYS_I2C_SPEED   100000  /* 100 kHz */
+#define CONFIG_SYS_I2C_SLAVE   0x7F
+
+/*
+ * EEPROM configuration
+ */
+#define CONFIG_SYS_I2C_EEPROM_ADDR             0x53
+#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN         2
+#define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS      6
+#define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS  10
+
+/*
+ * RTC configuration
+ */
+#define CONFIG_RTC_PCF8563
+#define CONFIG_SYS_I2C_RTC_ADDR                0x51
+
+#define CONFIG_SYS_FLASH_BASE          0xFC000000
+#define CONFIG_SYS_FLASH_SIZE          0x01000000
+#define CONFIG_ENV_ADDR                        (CONFIG_SYS_FLASH_BASE + \
+                                        CONFIG_SYS_MONITOR_LEN)
+
+#define CONFIG_SYS_MAX_FLASH_BANKS     1    /* max num of memory banks */
+#define CONFIG_SYS_MAX_FLASH_SECT      256  /* max num of sects on one chip */
+#define CONFIG_SYS_FLASH_PROTECTION  /* "Real" (hardware) sectors protection */
+
+/* use CFI flash driver */
+#define CONFIG_FLASH_CFI_DRIVER
+#define CONFIG_SYS_FLASH_CFI
+#define CONFIG_SYS_FLASH_EMPTY_INFO
+#define CONFIG_SYS_FLASH_USE_BUFFER_WRITE 1
+
+/*
+ * Environment settings
+ */
+#define CONFIG_ENV_IS_IN_FLASH         1
+#define CONFIG_ENV_SIZE                        0x10000
+#define CONFIG_ENV_SECT_SIZE           0x20000
+#define CONFIG_ENV_OVERWRITE           1
+#define CONFIG_ENV_ADDR_REDUND         (CONFIG_ENV_ADDR + CONFIG_ENV_SECT_SIZE)
+#define CONFIG_ENV_SIZE_REDUND         CONFIG_ENV_SIZE
+
+/*
+ * Memory map
+ */
+#define CONFIG_SYS_MBAR                        0xf0000000
+#define CONFIG_SYS_SDRAM_BASE          0x00000000
+#define CONFIG_SYS_DEFAULT_MBAR                0x80000000
+#define        CONFIG_SYS_SRAM_BASE            0xF1000000
+#define        CONFIG_SYS_SRAM_SIZE            0x00200000
+#define        CONFIG_SYS_LIME_BASE            0xE4000000
+#define        CONFIG_SYS_LIME_SIZE            0x04000000
+#define        CONFIG_SYS_FPGA_BASE            0xC0000000
+#define        CONFIG_SYS_FPGA_SIZE            0x10000000
+#define        CONFIG_SYS_MPEG_BASE            0xe2000000
+#define        CONFIG_SYS_MPEG_SIZE            0x01000000
+#define CONFIG_SYS_CF_BASE             0xe1000000
+#define CONFIG_SYS_CF_SIZE             0x01000000
+
+/* Use SRAM until RAM will be available */
+#define CONFIG_SYS_INIT_RAM_ADDR       MPC5XXX_SRAM
+/* End of used area in DPRAM */
+#define CONFIG_SYS_INIT_RAM_END                MPC5XXX_SRAM_SIZE
+
+
+
+/* size in bytes reserved for initial data */
+#define CONFIG_SYS_GBL_DATA_SIZE       128
+
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_END - \
+                                        CONFIG_SYS_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
+
+#define CONFIG_SYS_MONITOR_BASE                TEXT_BASE
+#if (CONFIG_SYS_MONITOR_BASE < CONFIG_SYS_FLASH_BASE)
+#   define CONFIG_SYS_RAMBOOT          1
+#endif
+
+#define CONFIG_SYS_MONITOR_LEN (384 << 10)  /* Reserve 384 kB for Monitor */
+#define CONFIG_SYS_MALLOC_LEN  (4 << 20)    /* Reserve 128 kB for malloc() */
+#define CONFIG_SYS_BOOTMAPSZ   (8 << 20)    /* Initial Memory map for Linux */
+
+/*
+ * Ethernet configuration
+ */
+#define CONFIG_MPC5xxx_FEC             1
+#define CONFIG_MPC5xxx_FEC_MII100
+#define CONFIG_PHY_ADDR                        0x00
+
+/*
+ * GPIO configuration
+ */
+#define CONFIG_SYS_GPS_PORT_CONFIG     0x1d556624
+
+/*
+ * Miscellaneous configurable options
+ */
+#define CONFIG_SYS_LONGHELP                    /* undef to save memory */
+#define CONFIG_SYS_PROMPT              "=> "   /* Monitor Command Prompt */
+#ifdef CONFIG_CMD_KGDB
+#define CONFIG_SYS_CBSIZE              1024    /* Console I/O Buffer Size */
+#else
+#define CONFIG_SYS_CBSIZE              256     /* Console I/O Buffer Size */
+#endif
+/* Print Buffer Size */
+#define CONFIG_SYS_PBSIZE              (CONFIG_SYS_CBSIZE + \
+                                        sizeof(CONFIG_SYS_PROMPT) + 16)
+/* max number of command args */
+#define CONFIG_SYS_MAXARGS             16
+/* Boot Argument Buffer Size */
+#define CONFIG_SYS_BARGSIZE            CONFIG_SYS_CBSIZE
+
+
+#define CONFIG_SYS_MEMTEST_START       0x00100000      /* memtest works on */
+#define CONFIG_SYS_MEMTEST_END         0x00f00000      /* 1...15 MB in DRAM */
+
+#define CONFIG_SYS_LOAD_ADDR           0x100000 /* default load address */
+
+#define CONFIG_SYS_HZ                  1000 /* decrementer freq: 1 ms ticks */
+#define CONFIG_LOOPW
+
+/*
+ * Various low-level settings
+ */
+#if defined(CONFIG_MPC5200)
+#define CONFIG_SYS_HID0_INIT           HID0_ICE | HID0_ICFI
+#define CONFIG_SYS_HID0_FINAL          HID0_ICE
+#else
+#define CONFIG_SYS_HID0_INIT           0
+#define CONFIG_SYS_HID0_FINAL          0
+#endif
+
+#define CONFIG_SYS_BOOTCS_START                CONFIG_SYS_FLASH_BASE
+#define CONFIG_SYS_BOOTCS_SIZE         CONFIG_SYS_FLASH_SIZE
+#define CONFIG_SYS_CS0_START           CONFIG_SYS_FLASH_BASE
+#define CONFIG_SYS_CS0_SIZE            CONFIG_SYS_FLASH_SIZE
+#define CONFIG_SYS_CS1_START           CONFIG_SYS_SRAM_BASE
+#define CONFIG_SYS_CS1_SIZE            CONFIG_SYS_SRAM_SIZE
+#define CONFIG_SYS_CS3_START           CONFIG_SYS_LIME_BASE
+#define CONFIG_SYS_CS3_SIZE            CONFIG_SYS_LIME_SIZE
+#define        CONFIG_SYS_CS6_START            CONFIG_SYS_FPGA_BASE
+#define        CONFIG_SYS_CS6_SIZE             CONFIG_SYS_FPGA_SIZE
+#define        CONFIG_SYS_CS5_START            CONFIG_SYS_CF_BASE
+#define        CONFIG_SYS_CS5_SIZE             CONFIG_SYS_CF_SIZE
+#define        CONFIG_SYS_CS7_START            CONFIG_SYS_MPEG_BASE
+#define        CONFIG_SYS_CS7_SIZE             CONFIG_SYS_MPEG_SIZE
+
+#ifdef CONFIG_SYS_PCISPEED_66
+#define CONFIG_SYS_BOOTCS_CFG          0x0006F900
+#define CONFIG_SYS_CS1_CFG             0x0004FB00
+#define CONFIG_SYS_CS2_CFG             0x0006F900
+#else
+#define CONFIG_SYS_BOOTCS_CFG          0x0002F900
+#define CONFIG_SYS_CS1_CFG             0x0001FB00
+#define CONFIG_SYS_CS2_CFG             0x0002F90C
+#endif
+
+/*
+ * Ack active, Muxed mode, AS=24 bit address, DS=32 bit data, 0
+ * waitstates, writeswap and readswap enabled
+ */
+#define CONFIG_SYS_CS3_CFG             0x00FFFB0C
+#define        CONFIG_SYS_CS6_CFG              0x00FFFB0C
+#define        CONFIG_SYS_CS7_CFG              0x4040751C
+
+#define CONFIG_SYS_CS_BURST            0x00000000
+#define CONFIG_SYS_CS_DEADCYCLE                0x33330000
+
+#define CONFIG_SYS_RESET_ADDRESS       0xff000000
+
+/*-----------------------------------------------------------------------
+ * USB stuff
+ *-----------------------------------------------------------------------
+ */
+#define CONFIG_USB_CLOCK               0x0001BBBB
+#define CONFIG_USB_CONFIG              0x00005000
+
+/*-----------------------------------------------------------------------
+ * IDE/ATA stuff Supports IDE harddisk
+ *-----------------------------------------------------------------------
+ */
+#define CONFIG_IDE_PREINIT
+
+#define CONFIG_SYS_IDE_MAXBUS          1 /* max. 1 IDE bus */
+#define CONFIG_SYS_IDE_MAXDEVICE       2 /* max. 2 drives per IDE bus */
+
+#define CONFIG_SYS_ATA_IDE0_OFFSET     0x0000
+
+#define CONFIG_SYS_ATA_BASE_ADDR       MPC5XXX_ATA
+
+/* Offset for data I/O */
+#define CONFIG_SYS_ATA_DATA_OFFSET     (0x0060)
+
+/* Offset for normal register accesses */
+#define CONFIG_SYS_ATA_REG_OFFSET      (CONFIG_SYS_ATA_DATA_OFFSET)
+
+/* Offset for alternate registers */
+#define CONFIG_SYS_ATA_ALT_OFFSET      (0x005C)
+
+/* Interval between registers */
+#define CONFIG_SYS_ATA_STRIDE          4
+
+#endif /* __CONFIG_H */
index 3840267312d08f2960c4c991e13fcbec2a57d745..c013ac4b3cd74d97a8c4dfa6d61d89a8b1c7e1d0 100644 (file)
 #define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 3
 #define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS 10
 
+/* I2C bootstrap EEPROM */
+#define CONFIG_4xx_CONFIG_I2C_EEPROM_ADDR      0x50
+#define CONFIG_4xx_CONFIG_I2C_EEPROM_OFFSET    0
+#define CONFIG_4xx_CONFIG_BLOCKSIZE            8
+
 /* I2C RTC */
 #define CONFIG_RTC_M41T11      1
 #define CONFIG_SYS_RTC_BUS_NUM         1       /* The I2C bus for RTC          */
 /*
  * Commands additional to the ones defined in amcc-common.h
  */
-#define CONFIG_CMD_EXT2
+#define CONFIG_CMD_CHIP_CONFIG
 #define CONFIG_CMD_DATE
+#define CONFIG_CMD_EXT2
+#define CONFIG_CMD_FAT
 #define CONFIG_CMD_PCI
 #define CONFIG_CMD_SDRAM
 #define CONFIG_CMD_SNTP
index ea6ba8938d7b6463e1408b206dd900a3c4c8e0b1..026dd0854aca4f01014eebd85c87c926ada044f9 100644 (file)
@@ -69,6 +69,7 @@
 #define CONFIG_SYS_OCM_DATA_ADDR       CONFIG_SYS_OCM_BASE
 #define CONFIG_SYS_PCI_BASE            0xe0000000      /* Internal PCI regs    */
 #define CONFIG_SYS_PCI_MEMBASE         0x80000000      /* mapped pci memory    */
+#define CONFIG_SYS_PCI_MEMBASE2                (CONFIG_SYS_PCI_MEMBASE + 0x20000000)
 
 /* Don't change either of these */
 #define CONFIG_SYS_PERIPHERAL_BASE     0xef600000      /* internal peripherals */
 /* Board-specific PCI */
 #define CONFIG_SYS_PCI_TARGET_INIT
 #define CONFIG_SYS_PCI_MASTER_INIT
+#define CONFIG_SYS_PCI_BOARD_FIXUP_IRQ
 
 #define CONFIG_SYS_PCI_SUBSYS_VENDORID 0x10e8  /* AMCC                         */
 #define CONFIG_SYS_PCI_SUBSYS_ID       0xcafe  /* Whatever                     */
index 777a4d6cf7bcca24b992a205f45eba9493db8e61..011dd5c81abaaa19d248e934627186602d17eba7 100644 (file)
 /* Video console */
 #define CONFIG_VIDEO
 #define CONFIG_VIDEO_MB862xx
+#define CONFIG_VIDEO_MB862xx_ACCEL
 #define CONFIG_CFB_CONSOLE
 #define CONFIG_VIDEO_LOGO
 #define CONFIG_CONSOLE_EXTRA_INFO
 #define VIDEO_FB_16BPP_PIXEL_SWAP
+#define VIDEO_FB_16BPP_WORD_SWAP
 
 #define CONFIG_VGA_AS_SINGLE_DEVICE
 #define CONFIG_VIDEO_SW_CURSOR
 /*-----------------------------------------------------------------------
  * Graphics (Fujitsu Lime)
  *----------------------------------------------------------------------*/
-/* SDRAM Clock frequency adjustment register */
-#define CONFIG_SYS_LIME_SDRAM_CLOCK    0xC1FC0038
 /* Lime Clock frequency is to set 100MHz */
 #define CONFIG_SYS_LIME_CLOCK_100MHZ   0x00000
 #if 0
 #define CONFIG_SYS_LIME_CLOCK_133MHZ   0x10000
 #endif
 
-/* SDRAM Parameter register */
-#define CONFIG_SYS_LIME_MMR            0xC1FCFFFC
 /* SDRAM parameter value; was 0x414FB7F2, caused several vertical bars
    and pixel flare on display when 133MHz was configured. According to
    SDRAM chip datasheet CAS Latency is 3 for 133MHz and -75 Speed Grade */
 #ifdef CONFIG_SYS_LIME_CLOCK_133MHZ
-#define CONFIG_SYS_LIME_MMR_VALUE      0x414FB7F3
+#define CONFIG_SYS_MB862xx_MMR 0x414FB7F3
+#define CONFIG_SYS_MB862xx_CCF CONFIG_SYS_LIME_CLOCK_133MHZ
 #else
-#define CONFIG_SYS_LIME_MMR_VALUE      0x414FB7F2
+#define CONFIG_SYS_MB862xx_MMR 0x414FB7F2
+#define CONFIG_SYS_MB862xx_CCF CONFIG_SYS_LIME_CLOCK_100MHZ
 #endif
 
 /*-----------------------------------------------------------------------
index 19a5ec92ece5f029cf6cbd3d977538bdf6b5088a..024b9b83343a6ab69d04e29d51167269da62212a 100644 (file)
@@ -97,6 +97,9 @@
 #define CONFIG_OMAP3_MMC               1
 #define CONFIG_DOS_PARTITION           1
 
+/* DDR - I use Micron DDR */
+#define CONFIG_OMAP3_MICRON_DDR                1
+
 /* commands to include */
 #include <config_cmd_default.h>
 
index a5514aeb9b4684159257671685f75971486800fe..6709edc8635218587874f0e91491be8e2aaa49bb 100644 (file)
 #define CONFIG_OMAP3_MMC               1
 #define CONFIG_DOS_PARTITION           1
 
+/* DDR - I use Micron DDR */
+#define CONFIG_OMAP3_MICRON_DDR                1
+
 /* commands to include */
 #include <config_cmd_default.h>
 
index ffb515d32237d747953a6a2931b71b2122a35697..0f812a79309d612b26eac22a5c5f24e3e6a1d76b 100644 (file)
@@ -89,6 +89,9 @@
 #define CONFIG_OMAP3_MMC               1
 #define CONFIG_DOS_PARTITION           1
 
+/* DDR - I use Micron DDR */
+#define CONFIG_OMAP3_MICRON_DDR                1
+
 /* commands to include */
 #include <config_cmd_default.h>
 
index 6f21af3d1332358ec5a04bd24d58f92a6de027dc..0cafeb81c7a652d9eb348f1e44b504e461a8d555 100644 (file)
@@ -92,6 +92,9 @@
 #define CONFIG_OMAP3_MMC               1
 #define CONFIG_DOS_PARTITION           1
 
+/* DDR - I use Micron DDR */
+#define CONFIG_OMAP3_MICRON_DDR                1
+
 /* commands to include */
 #include <config_cmd_default.h>
 
index 229dc5e644144128477bf739daa292b7b1b49951..d91c8ffa84bf6bc28b63df5e0be2cd3c2f0d591a 100644 (file)
 #define CONFIG_SYS_I2C_BUS_SELECT      1
 #define CONFIG_DRIVER_OMAP34XX_I2C     1
 
+/* DDR - I use Infineon DDR */
+#define CONFIG_OMAP3_INFINEON_DDR      1
+
 /* OMITTED:  single 1 Gbit MT29F1G NAND flash */
 
 /*
index da4b677f93c450c9bd0c62dac14b32726a95653c..2aef973bced8cd8b05d3cdaeb5d3249eceb86530 100644 (file)
@@ -98,6 +98,9 @@
 #define CONFIG_OMAP3_MMC               1
 #define CONFIG_DOS_PARTITION           1
 
+/* DDR - I use Micron DDR */
+#define CONFIG_OMAP3_MICRON_DDR                1
+
 /* commands to include */
 #include <config_cmd_default.h>
 
index 32cd6fdb141210dd0c8651430a43d947590b736d..5b03fb6987aae7e55f410a451fcd0085beccfdbc 100644 (file)
@@ -98,6 +98,9 @@
 #define CONFIG_OMAP3_MMC               1
 #define CONFIG_DOS_PARTITION           1
 
+/* DDR - I use Micron DDR */
+#define CONFIG_OMAP3_MICRON_DDR                1
+
 /* Status LED */
 #define CONFIG_STATUS_LED              1 /* Status LED enabled */
 #define CONFIG_BOARD_SPECIFIC_LED      1
index e6886cf7f6f86c8ec88d2e408b9e3d394683ce5f..025ad0953c2807115f86aa80897fedb888326e68 100644 (file)
  * High Level Configuration Options
  * (easy to change)
  */
-#define CONFIG_ARM920T         1       /* This is an ARM920T Core      */
-#define        CONFIG_S3C2410          1       /* in a SAMSUNG S3C2410 SoC     */
-#define CONFIG_SBC2410X                1       /* on a friendly-arm SBC-2410X Board  */
+#define CONFIG_ARM920T 1       /* This is an ARM920T Core      */
+#define CONFIG_S3C24X0 1       /* in a SAMSUNG S3C24x0-type SoC        */
+#define CONFIG_S3C2410 1       /* specifically a SAMSUNG S3C2410 SoC   */
+#define CONFIG_SBC2410X        1       /* on a friendly-arm SBC-2410X Board  */
 
 /* input clock of PLL */
 #define CONFIG_SYS_CLK_FREQ    12000000/* the SBC2410X has 12MHz input clock */
index 57637607af8d8ce617b64627875709d684695731..d4697ad3f715ee0c8ae7a3791aa48890ebdecf61 100644 (file)
  * CONFIG_SYS_FLASH_BASE   -> start address of internal flash
  * CONFIG_SYS_MONITOR_BASE -> start of u-boot
  */
-#ifndef __ASSEMBLER__
-extern unsigned long offsetOfBigFlash;
-extern unsigned long offsetOfEnvironment;
-#endif
-
 #define CONFIG_SYS_SDRAM_BASE          0x00000000
 #define CONFIG_SYS_FLASH_BASE          0xFFE00000
 #define CONFIG_SYS_MONITOR_BASE        0xFFFC0000     /* placed last 256k */
index 214a9af356eefef62f9d05447116bd6e3853a6c8..2f1dae729cd366cba7ff99960d8dfc79aab00014 100644 (file)
@@ -65,7 +65,7 @@
 /*
  * Size of malloc() pool
  */
-#define CONFIG_MALLOC_SIZE     (CONFIG_ENV_SIZE + 128*1024)
+#define CONFIG_SYS_MALLOC_LEN  (CONFIG_ENV_SIZE + 128*1024)
 
 #define CONFIG_BAUDRATE                9600
 
index f3fc9602ada9e5b7ab1704b0fff4e56af7dbcd4b..cf5633c0d2fbce53f61b3378e2d762c9c25d5bc8 100644 (file)
@@ -63,7 +63,7 @@
 /*
  * Size of malloc() pool
  */
-#define CONFIG_MALLOC_SIZE     (CONFIG_ENV_SIZE + 128*1024)
+#define CONFIG_SYS_MALLOC_LEN  (CONFIG_ENV_SIZE + 128*1024)
 
 
 #define CONFIG_BAUDRATE                9600
index 9605ce25ba29980165e7c2907d8176e3cc431b34..5788d581afae2fa95deaa54b6695a6ff862a8536 100644 (file)
 /* Board-specific PCI */
 #define CONFIG_SYS_PCI_TARGET_INIT
 #define CONFIG_SYS_PCI_MASTER_INIT
+#define CONFIG_SYS_PCI_BOARD_FIXUP_IRQ
 
 #define CONFIG_SYS_PCI_SUBSYS_VENDORID 0x10e8  /* AMCC                         */
 #define CONFIG_SYS_PCI_SUBSYS_ID       0xcafe  /* Whatever                     */
index a1beb65d0ead377c76d7b86cde730c699dcd83ac..fd51219af4cddd1d2e656030aaa92a9d09f3b057 100644 (file)
  * High Level Configuration Options
  * (easy to change)
  */
-#define CONFIG_ARM920T         1       /* This is an ARM920T core      */
-#define CONFIG_S3C2400         1       /* in a SAMSUNG S3C2400 SoC     */
-#define CONFIG_SMDK2400                1       /* on an SAMSUNG SMDK2400 Board */
+#define CONFIG_ARM920T 1       /* This is an ARM920T core      */
+#define CONFIG_S3C24X0 1       /* in a SAMSUNG S3C24x0-type SoC        */
+#define CONFIG_S3C2400 1       /* specifically a SAMSUNG S3C2400 SoC   */
+#define CONFIG_SMDK2400        1       /* on an SAMSUNG SMDK2400 Board */
 
 /* input clock of PLL */
 #define CONFIG_SYS_CLK_FREQ    12000000 /* SMDK2400 has 12 MHz input clock */
index c57751bf90b085f4532c788880b9bdd455d3b59b..f9d1e55186fc783c3280de7eceb26a43a8c84c94 100644 (file)
  * High Level Configuration Options
  * (easy to change)
  */
-#define CONFIG_ARM920T         1       /* This is an ARM920T Core      */
-#define        CONFIG_S3C2410          1       /* in a SAMSUNG S3C2410 SoC     */
-#define CONFIG_SMDK2410                1       /* on a SAMSUNG SMDK2410 Board  */
+#define CONFIG_ARM920T 1       /* This is an ARM920T Core      */
+#define CONFIG_S3C24X0 1       /* in a SAMSUNG S3C24x0-type SoC        */
+#define CONFIG_S3C2410 1       /* specifically a SAMSUNG S3C2410 SoC   */
+#define CONFIG_SMDK2410        1       /* on a SAMSUNG SMDK2410 Board  */
 
 /* input clock of PLL */
 #define CONFIG_SYS_CLK_FREQ    12000000/* the SMDK2410 has 12MHz input clock */
index f6e1221294f332f95026ad50360803ec42747dc6..f644cd2cdaacad41fec892f7b61ff46b7146e8a0 100644 (file)
@@ -49,8 +49,6 @@
 #define CONFIG_ENABLE_MMU
 #endif
 
-#define CONFIG_MEMORY_UPPER_CODE
-
 #define CONFIG_SETUP_MEMORY_TAGS
 #define CONFIG_CMDLINE_TAG
 #define CONFIG_INITRD_TAG
index 35feed0fe14f0e10569fda2c81491a01f67a26df..3632b847f819eaf99bb3bfcbbc984958fbcbaad8 100644 (file)
 
 #define CONFIG_VIDEO
 #define CONFIG_VIDEO_MB862xx
+#define CONFIG_VIDEO_MB862xx_ACCEL
 #define CONFIG_CFB_CONSOLE
 #define CONFIG_VIDEO_LOGO
 #define CONFIG_VIDEO_BMP_LOGO
 #define CONFIG_CONSOLE_EXTRA_INFO
 #define VIDEO_FB_16BPP_PIXEL_SWAP
+#define VIDEO_FB_16BPP_WORD_SWAP
 #define CONFIG_VGA_AS_SINGLE_DEVICE
 #define CONFIG_SYS_CONSOLE_IS_IN_ENV
 #define CONFIG_VIDEO_SW_CURSOR
 #define CONFIG_VIDEO_BMP_GZIP
 #define CONFIG_SYS_VIDEO_LOGO_MAX_SIZE (2 << 20)       /* decompressed img */
 
+/* SDRAM Clock frequency, 100MHz (0x0000) or 133MHz (0x10000) */
+#define CONFIG_SYS_MB862xx_CCF         0x10000
+/* SDRAM parameter */
+#define CONFIG_SYS_MB862xx_MMR         0x4157BA63
+
 /* Serial Port */
 
 #define CONFIG_CONS_INDEX     1
index 97f30cea750cf75f7827b2587320a40ded66be0b..9827195e8d59102ece270f38839844046f6c28f8 100644 (file)
  * High Level Configuration Options
  * (easy to change)
  */
-#define CONFIG_ARM920T         1       /* This is an arm920t CPU       */
-#define CONFIG_S3C2400         1       /* in a SAMSUNG S3C2400 SoC     */
-#define CONFIG_TRAB            1       /* on a TRAB Board              */
-#undef CONFIG_TRAB_50MHZ               /* run the CPU at 50 MHz        */
+#define CONFIG_ARM920T 1       /* This is an arm920t CPU       */
+#define CONFIG_S3C24X0 1       /* in a SAMSUNG S3C24x0-type SoC        */
+#define CONFIG_S3C2400 1       /* specifically a SAMSUNG S3C2400 SoC   */
+#define CONFIG_TRAB    1       /* on a TRAB Board              */
+#undef CONFIG_TRAB_50MHZ       /* run the CPU at 50 MHz        */
 
 /* automatic software updates (see board/trab/auto_update.c) */
 #define CONFIG_AUTO_UPDATE     1
index b165bd7a118d330a004b61eb01a25cbe52f4e9f4..42f880785e7c0e3812019c761cf267a0ab1a7fa1 100644 (file)
 #define FPGA_REG1A_PE_SELSOURCE_0      0x0002
 #define FPGA_REG1A_PE_SELSOURCE_1      0x0001
 
+#define FPGA_REG1A_GLED_ENCODE(n)      (FPGA_REG1A_PE0_GLED >> (n))
+#define FPGA_REG1A_YLED_ENCODE(n)      (FPGA_REG1A_PE0_YLED >> (n))
+#define FPGA_REG1A_PWRON_ENCODE(n)     (FPGA_REG1A_PE0_PWRON >> (n))
+#define FPGA_REG1A_REFCLK_ENCODE(n)    (FPGA_REG1A_PE0_REFCLK_ENABLE >> (n))
+
 /*----------------------------------------------------------------------------+
 | PCIe Miscellaneous
 +----------------------------------------------------------------------------*/
 #define FPGA_REG1C_PE1_PERST           0x0008
 #define FPGA_REG1C_PE2_PERST           0x0004
 
+#define FPGA_REG1C_ROOTPOINT_ENCODE(n) (FPGA_REG1C_PE0_ROOTPOINT >> (n))
+#define FPGA_REG1C_PERST_ENCODE(n)     (FPGA_REG1C_PE0_PERST >> (n))
+
 /*----------------------------------------------------------------------------+
 | Defines
 +----------------------------------------------------------------------------*/
index 2e8fd8b8b41331dcee601ae07e95231201b1ab14..c3a5d2f32e76903927e723642401ac29668f0f4b 100644 (file)
@@ -16,7 +16,7 @@ void install_hdlr(int, interrupt_handler_t*, void*);
 void free_hdlr(int);
 void *malloc(size_t);
 void free(void*);
-void udelay(unsigned long);
+void __udelay(unsigned long);
 unsigned long get_timer(unsigned long);
 void vprintf(const char *, va_list);
 void do_reset (void);
index 04b62d154fe2555749c8c13680320d7bd6857458..d2e78fe298376aa17b442d7891ac990ab3c35cb4 100644 (file)
 #define IH_COMP_GZIP           1       /* gzip  Compression Used       */
 #define IH_COMP_BZIP2          2       /* bzip2 Compression Used       */
 #define IH_COMP_LZMA           3       /* lzma  Compression Used       */
+#define IH_COMP_LZO            4       /* lzo   Compression Used       */
 
 #define IH_MAGIC       0x27051956      /* Image Magic Number           */
 #define IH_NMLEN               32      /* Image Name Length            */
index d793497ec1ca92ddfc0b12ba9854650b64f7beb1..88687faba10bb9ed9d4862142f5161ec0837a8d2 100644 (file)
@@ -27,6 +27,10 @@ int lzo1x_1_compress(const unsigned char *src, size_t src_len,
 int lzo1x_decompress_safe(const unsigned char *src, size_t src_len,
                        unsigned char *dst, size_t *dst_len);
 
+/* decompress lzop format */
+int lzop_decompress(const unsigned char *src, size_t src_len,
+                   unsigned char *dst, size_t *dst_len);
+
 /*
  * Return values (< 0 = Error)
  */
index 410c5dd2fb4114a339ca6a9fa70a9b5bdbcc6d52..8d5f60c75ea093ccc48060ac18a428c525b77e76 100644 (file)
@@ -123,7 +123,7 @@ struct nand_oobfree {
  */
 struct nand_ecclayout {
        uint32_t eccbytes;
-       uint32_t eccpos[64];
+       uint32_t eccpos[128];
        uint32_t oobavail;
        struct nand_oobfree oobfree[MTD_MAX_OOBFREE_ENTRIES];
 };
index cb7c19a4392bdd49151aa09595520eba31b97e0d..94ad0c0e36aba8d4e7c3d1f283ece0c429cd0c04 100644 (file)
@@ -397,7 +397,7 @@ struct nand_chip {
        int             bbt_erase_shift;
        int             chip_shift;
        int             numchips;
-       unsigned long   chipsize;
+       uint64_t        chipsize;
        int             pagemask;
        int             pagebuf;
        int             subpagesize;
index 9a6f31752ed5787f76e8504a3543311e633d8efd..68e174e310c9a780f2ee1b3d726809973843dcfd 100644 (file)
@@ -20,8 +20,9 @@
 #include <linux/mtd/compat.h>
 #include <linux/mtd/bbm.h>
 
+#define MAX_DIES               2
 #define MAX_BUFFERRAM          2
-#define MAX_ONENAND_PAGESIZE   (2048 + 64)
+#define MAX_ONENAND_PAGESIZE   (4096 + 128)
 
 /* Scan and identify a OneNAND device */
 extern int onenand_scan (struct mtd_info *mtd, int max_chips);
@@ -39,9 +40,14 @@ struct onenand_bufferram {
 /**
  * struct onenand_chip - OneNAND Private Flash Chip Data
  * @param base         [BOARDSPECIFIC] address to access OneNAND
+ * @dies:               [INTERN][FLEXONENAND] number of dies on chip
+ * @boundary:           [INTERN][FLEXONENAND] Boundary of the dies
+ * @diesize:            [INTERN][FLEXONENAND] Size of the dies
  * @param chipsize     [INTERN] the size of one chip for multichip arrays
  * @param device_id    [INTERN] device ID
  * @param verstion_id  [INTERN] version ID
+ * @technology         [INTERN] describes the internal NAND array technology such as SLC or MLC.
+ * @density_mask:      [INTERN] chip density, used for DDP devices
  * @param options      [BOARDSPECIFIC] various chip options. They can partly be set to inform onenand_scan about
  * @param erase_shift  [INTERN] number of address bits in a block
  * @param page_shift   [INTERN] number of address bits in a page
@@ -64,9 +70,13 @@ struct onenand_bufferram {
  */
 struct onenand_chip {
        void __iomem *base;
+       unsigned int dies;
+       unsigned int boundary[MAX_DIES];
+       unsigned int diesize[MAX_DIES];
        unsigned int chipsize;
        unsigned int device_id;
        unsigned int version_id;
+       unsigned int technology;
        unsigned int density_mask;
        unsigned int options;
 
@@ -124,6 +134,8 @@ struct onenand_chip {
 #define ONENAND_SET_BUFFERRAM0(this)           (this->bufferram_index = 0)
 #define ONENAND_SET_BUFFERRAM1(this)           (this->bufferram_index = 1)
 
+#define FLEXONENAND(this)      (this->device_id & DEVICE_IS_FLEXONENAND)
+#define ONENAND_IS_MLC(this)   (this->technology & ONENAND_TECHNOLOGY_IS_MLC)
 #define ONENAND_IS_DDP(this)                                           \
        (this->device_id & ONENAND_DEVICE_IS_DDP)
 
@@ -157,4 +169,6 @@ struct onenand_manufacturers {
 int onenand_bbt_read_oob(struct mtd_info *mtd, loff_t from,
                        struct mtd_oob_ops *ops);
 
+unsigned int onenand_block(struct onenand_chip *this, loff_t addr);
+int flexonenand_region(struct mtd_info *mtd, loff_t addr);
 #endif                         /* __LINUX_MTD_ONENAND_H */
index 07fed1c60f67dc054636bc4701f9120982c8a192..8449a3cdc3532653d7ffad366ef09ec78e4c47f5 100644 (file)
@@ -67,6 +67,9 @@
 /*
  * Device ID Register F001h (R)
  */
+#define DEVICE_IS_FLEXONENAND          (1 << 9)
+#define FLEXONENAND_PI_MASK            (0x3ff)
+#define FLEXONENAND_PI_UNLOCK_SHIFT    (14)
 #define ONENAND_DEVICE_DENSITY_MASK    (0xf)
 #define ONENAND_DEVICE_DENSITY_SHIFT   (4)
 #define ONENAND_DEVICE_IS_DDP          (1 << 3)
  */
 #define ONENAND_VERSION_PROCESS_SHIFT  (8)
 
+/*
+ * Technology Register F006h (R)
+ */
+#define ONENAND_TECHNOLOGY_IS_MLC      (1 << 0)
+
 /*
  * Start Address 1 F100h (R/W)
  */
 /*
  * Start Address 8 F107h (R/W)
  */
-#define ONENAND_FPA_MASK               (0x3f)
+#define ONENAND_FPA_MASK               (0x7f)
 #define ONENAND_FPA_SHIFT              (2)
 #define ONENAND_FSA_MASK               (0x03)
 
 #define ONENAND_BSA_BOOTRAM            (0 << 2)
 #define ONENAND_BSA_DATARAM0           (2 << 2)
 #define ONENAND_BSA_DATARAM1           (3 << 2)
-#define ONENAND_BSC_MASK               (0x03)
+#define ONENAND_BSC_MASK               (0x07)
 
 /*
  * Command Register F220h (R/W)
 #define ONENAND_CMD_ERASE_VERIFY       (0x71)
 #define ONENAND_CMD_RESET              (0xF0)
 #define ONENAND_CMD_READID             (0x90)
+#define FLEXONENAND_CMD_RESET          (0xF3)
+#define FLEXONENAND_CMD_PI_UPDATE      (0x05)
+#define FLEXONENAND_CMD_PI_ACCESS      (0x66)
+#define FLEXONENAND_CMD_RECOVER_LSB    (0x05)
 
 /* NOTE: Those are not *REAL* commands */
 #define ONENAND_CMD_BUFFERRAM          (0x1978)
+#define FLEXONENAND_CMD_READ_PI                (0x1985)
 
 /*
  * System Configuration 1 Register F221h (R, R/W)
 #define ONENAND_ECC_2BIT               (1 << 1)
 #define ONENAND_ECC_2BIT_ALL           (0xAAAA)
 #define ONENAND_ECC_4BIT_UNCORRECTABLE (0x1010)
+#define FLEXONENAND_UNCORRECTABLE_ERROR (0x1010)
 
 #endif                         /* __ONENAND_REG_H */
index 10166757bc1c0bffdac96b10b65c6432ca11e5b7..d1d9a96d583f89fccfb7f1cfc5c2c55369467385 100644 (file)
@@ -38,8 +38,8 @@
 
 struct mtd_partition {
        char *name;                     /* identifier string */
-       u_int32_t size;                 /* partition size */
-       u_int32_t offset;               /* offset within the master MTD space */
+       uint64_t size;                  /* partition size */
+       uint64_t offset;                /* offset within the master MTD space */
        u_int32_t mask_flags;           /* master MTD flags to mask out for this partition */
        struct nand_ecclayout *ecclayout;       /* out of band layout for this partition (NAND only)*/
        struct mtd_info **mtdp;         /* pointer to store the MTD object */
index 43f01e7d9c89cc3b195a9e4a0a8b4b40d82ca3fb..009da03f772063aa2ca0fce28b5477ba68d0da8f 100644 (file)
@@ -32,6 +32,8 @@
 #define PCI_DEVICE_ID_CORAL_P  0x2019
 #define PCI_DEVICE_ID_CORAL_PA 0x201E
 
+#define MB862XX_TYPE_LIME      0x1
+
 #define GC_HOST_BASE           0x01fc0000
 #define GC_DISP_BASE           0x01fd0000
 #define GC_DRAW_BASE           0x01ff0000
@@ -39,6 +41,7 @@
 /* Host interface registers */
 #define GC_SRST                        0x0000002c
 #define GC_CCF                 0x00000038
+#define GC_CID                 0x000000f0
 #define GC_MMR                 0x0000fffc
 
 /*
 #define GC_FC                  0x00000480
 #define GC_BC                  0x00000484
 #define GC_FIFO                        0x000004a0
+#define GC_REV                 0x00008084
 #define GC_GEO_FIFO            0x00008400
 
 typedef struct {
@@ -106,6 +110,7 @@ typedef struct {
        unsigned int value;
 } gdc_regs;
 
+int mb862xx_probe(unsigned int addr);
 const gdc_regs *board_get_regs (void);
 unsigned int board_video_init (void);
 void board_backlight_switch(int);
index 49da9d08b55f79441183c12e572799c1d461339f..92279d56ec6b1851377a88428c371646b33583e3 100644 (file)
@@ -23,6 +23,7 @@ struct erase_info;
 struct onenand_chip;
 
 extern struct mtd_info onenand_mtd;
+extern struct onenand_chip onenand_chip;
 
 /* board */
 extern void onenand_board_init(struct mtd_info *);
@@ -38,6 +39,15 @@ extern int onenand_erase(struct mtd_info *mtd, struct erase_info *instr);
 
 extern char *onenand_print_device_info(int device, int version);
 
+extern unsigned onenand_block(struct onenand_chip *this, loff_t addr);
+
+extern loff_t onenand_addr(struct onenand_chip *this, int block);
+
+extern int flexonenand_region(struct mtd_info *mtd, loff_t addr);
+
+extern int flexonenand_set_boundary(struct mtd_info *mtd, int die,
+                                       int boundary, int lock);
+
 /* S3C64xx */
 extern void s3c64xx_onenand_init(struct mtd_info *);
 extern void s3c64xx_set_width_regs(struct onenand_chip *);
diff --git a/include/pca9564.h b/include/pca9564.h
new file mode 100644 (file)
index 0000000..3e75259
--- /dev/null
@@ -0,0 +1,50 @@
+/*
+ * File:         include/pca9564.h
+ * Author:
+ *
+ * Created:      2009-06-23
+ * Description:  PCA9564 i2c bridge driver
+ *
+ * Modified:
+ *               Copyright 2009 CJSC "NII STT", http://www.niistt.ru/
+ *
+ * Bugs:
+ *
+ * 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, see the file COPYING, or write
+ * to the Free Software Foundation, Inc.,
+ * 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+
+#ifndef _PCA9564_H
+#define _PCA9564_H
+
+/* Clock speeds for the bus */
+#define PCA_CON_330kHz      0x00
+#define PCA_CON_288kHz      0x01
+#define PCA_CON_217kHz      0x02
+#define PCA_CON_146kHz      0x03
+#define PCA_CON_88kHz       0x04
+#define PCA_CON_59kHz       0x05
+#define PCA_CON_44kHz       0x06
+#define PCA_CON_36kHz       0x07
+
+#define PCA_CON_AA          0x80 /* Assert Acknowledge */
+#define PCA_CON_ENSIO       0x40 /* Enable */
+#define PCA_CON_STA         0x20 /* Start */
+#define PCA_CON_STO         0x10 /* Stop */
+#define PCA_CON_SI          0x08 /* Serial Interrupt */
+#define PCA_CON_CR          0x07 /* Clock Rate (MASK) */
+
+#endif
+
index 508c77b14e54f2f1db0e146f140a81fddded1422..bc2d051fc789de3b088413ac6ef98668ea4651e5 100644 (file)
 #define        MAL0_RCBS16     (MAL_DCR_BASE + 0x70) /* RX 16 Channel buffer size */
 #define        MAL0_RCBS24     (MAL_DCR_BASE + 0x78) /* RX 24 Channel buffer size */
 
-/*-----------------------------------------------------------------------------
-| IIC Register Offsets
-'----------------------------------------------------------------------------*/
-#define    IICMDBUF        0x00
-#define    IICSDBUF        0x02
-#define    IICLMADR        0x04
-#define    IICHMADR        0x05
-#define    IICCNTL         0x06
-#define    IICMDCNTL       0x07
-#define    IICSTS          0x08
-#define    IICEXTSTS       0x09
-#define    IICLSADR        0x0A
-#define    IICHSADR        0x0B
-#define    IIC0_CLKDIV     0x0C
-#define    IICINTRMSK      0x0D
-#define    IICXFRCNT       0x0E
-#define    IICXTCNTLSS     0x0F
-#define    IICDIRECTCNTL    0x10
-
 /*-----------------------------------------------------------------------------
 | UART Register Offsets
 '----------------------------------------------------------------------------*/
index e54a977dc1e5b857ffc881566161aef81587c995..e60fa13905e7d0eae5ef2bb3554fd9da4a516387 100644 (file)
 #define CPC0_STRP1_PAE_MASK            (0x80000000 >> 11)
 #define CPC0_STRP1_PISE_MASK           (0x80000000 >> 13)
 #endif /* defined(CONFIG_440GP) */
-#if defined(CONFIG_440GX) || defined(CONFIG_440SP)
+#if defined(CONFIG_440GX) || defined(CONFIG_440SP) || \
+    defined(CONFIG_460EX) || defined(CONFIG_460GT)
 #define SDR0_SDSTP1_PAE_MASK           (0x80000000 >> 13)
 #define SDR0_SDSTP1_PISE_MASK          (0x80000000 >> 15)
 #endif /* defined(CONFIG_440GX) || defined(CONFIG_440SP) */
 #define CPR0_PERD_PERDV0_MASK  0x07000000
 #endif
 
-/*-----------------------------------------------------------------------------
-| IIC Register Offsets
-'----------------------------------------------------------------------------*/
-#define IICMDBUF               0x00
-#define IICSDBUF               0x02
-#define IICLMADR               0x04
-#define IICHMADR               0x05
-#define IICCNTL                        0x06
-#define IICMDCNTL              0x07
-#define IICSTS                 0x08
-#define IICEXTSTS              0x09
-#define IICLSADR               0x0A
-#define IICHSADR               0x0B
-#define IIC0_CLKDIV            0x0C
-#define IICINTRMSK             0x0D
-#define IICXFRCNT              0x0E
-#define IICXTCNTLSS            0x0F
-#define IICDIRECTCNTL          0x10
-
 /*-----------------------------------------------------------------------------
 | PCI Internal Registers et. al. (accessed via plb)
 +----------------------------------------------------------------------------*/
diff --git a/include/s3c24x0.h b/include/s3c24x0.h
deleted file mode 100644 (file)
index 56a551a..0000000
+++ /dev/null
@@ -1,656 +0,0 @@
-/*
- * (C) Copyright 2003
- * David Müller ELSOFT AG Switzerland. d.mueller@elsoft.ch
- *
- * 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
- */
-
-/************************************************
- * NAME            : s3c24x0.h
- * Version  : 31.3.2003
- *
- * common stuff for SAMSUNG S3C24X0 SoC
- ************************************************/
-
-#ifndef __S3C24X0_H__
-#define __S3C24X0_H__
-
-typedef volatile u8    S3C24X0_REG8;
-typedef volatile u16   S3C24X0_REG16;
-typedef volatile u32   S3C24X0_REG32;
-
-/* Memory controller (see manual chapter 5) */
-struct s3c24x0_memctl {
-       S3C24X0_REG32   BWSCON;
-       S3C24X0_REG32   BANKCON[8];
-       S3C24X0_REG32   REFRESH;
-       S3C24X0_REG32   BANKSIZE;
-       S3C24X0_REG32   MRSRB6;
-       S3C24X0_REG32   MRSRB7;
-};
-
-
-/* USB HOST (see manual chapter 12) */
-struct s3c24x0_usb_host {
-       S3C24X0_REG32   HcRevision;
-       S3C24X0_REG32   HcControl;
-       S3C24X0_REG32   HcCommonStatus;
-       S3C24X0_REG32   HcInterruptStatus;
-       S3C24X0_REG32   HcInterruptEnable;
-       S3C24X0_REG32   HcInterruptDisable;
-       S3C24X0_REG32   HcHCCA;
-       S3C24X0_REG32   HcPeriodCuttendED;
-       S3C24X0_REG32   HcControlHeadED;
-       S3C24X0_REG32   HcControlCurrentED;
-       S3C24X0_REG32   HcBulkHeadED;
-       S3C24X0_REG32   HcBuldCurrentED;
-       S3C24X0_REG32   HcDoneHead;
-       S3C24X0_REG32   HcRmInterval;
-       S3C24X0_REG32   HcFmRemaining;
-       S3C24X0_REG32   HcFmNumber;
-       S3C24X0_REG32   HcPeriodicStart;
-       S3C24X0_REG32   HcLSThreshold;
-       S3C24X0_REG32   HcRhDescriptorA;
-       S3C24X0_REG32   HcRhDescriptorB;
-       S3C24X0_REG32   HcRhStatus;
-       S3C24X0_REG32   HcRhPortStatus1;
-       S3C24X0_REG32   HcRhPortStatus2;
-};
-
-
-/* INTERRUPT (see manual chapter 14) */
-struct s3c24x0_interrupt {
-       S3C24X0_REG32   SRCPND;
-       S3C24X0_REG32   INTMOD;
-       S3C24X0_REG32   INTMSK;
-       S3C24X0_REG32   PRIORITY;
-       S3C24X0_REG32   INTPND;
-       S3C24X0_REG32   INTOFFSET;
-#ifdef CONFIG_S3C2410
-       S3C24X0_REG32   SUBSRCPND;
-       S3C24X0_REG32   INTSUBMSK;
-#endif
-};
-
-
-/* DMAS (see manual chapter 8) */
-struct s3c24x0_dma {
-       S3C24X0_REG32   DISRC;
-#ifdef CONFIG_S3C2410
-       S3C24X0_REG32   DISRCC;
-#endif
-       S3C24X0_REG32   DIDST;
-#ifdef CONFIG_S3C2410
-       S3C24X0_REG32   DIDSTC;
-#endif
-       S3C24X0_REG32   DCON;
-       S3C24X0_REG32   DSTAT;
-       S3C24X0_REG32   DCSRC;
-       S3C24X0_REG32   DCDST;
-       S3C24X0_REG32   DMASKTRIG;
-#ifdef CONFIG_S3C2400
-       S3C24X0_REG32   res[1];
-#endif
-#ifdef CONFIG_S3C2410
-       S3C24X0_REG32   res[7];
-#endif
-};
-
-struct s3c24x0_dmas {
-       struct s3c24x0_dma      dma[4];
-};
-
-
-/* CLOCK & POWER MANAGEMENT (see S3C2400 manual chapter 6) */
-/*                          (see S3C2410 manual chapter 7) */
-struct s3c24x0_clock_power {
-       S3C24X0_REG32   LOCKTIME;
-       S3C24X0_REG32   MPLLCON;
-       S3C24X0_REG32   UPLLCON;
-       S3C24X0_REG32   CLKCON;
-       S3C24X0_REG32   CLKSLOW;
-       S3C24X0_REG32   CLKDIVN;
-};
-
-
-/* LCD CONTROLLER (see manual chapter 15) */
-struct s3c24x0_lcd {
-       S3C24X0_REG32   LCDCON1;
-       S3C24X0_REG32   LCDCON2;
-       S3C24X0_REG32   LCDCON3;
-       S3C24X0_REG32   LCDCON4;
-       S3C24X0_REG32   LCDCON5;
-       S3C24X0_REG32   LCDSADDR1;
-       S3C24X0_REG32   LCDSADDR2;
-       S3C24X0_REG32   LCDSADDR3;
-       S3C24X0_REG32   REDLUT;
-       S3C24X0_REG32   GREENLUT;
-       S3C24X0_REG32   BLUELUT;
-       S3C24X0_REG32   res[8];
-       S3C24X0_REG32   DITHMODE;
-       S3C24X0_REG32   TPAL;
-#ifdef CONFIG_S3C2410
-       S3C24X0_REG32   LCDINTPND;
-       S3C24X0_REG32   LCDSRCPND;
-       S3C24X0_REG32   LCDINTMSK;
-       S3C24X0_REG32   LPCSEL;
-#endif
-};
-
-
-/* NAND FLASH (see S3C2410 manual chapter 6) */
-struct s3c2410_nand {
-       S3C24X0_REG32   NFCONF;
-       S3C24X0_REG32   NFCMD;
-       S3C24X0_REG32   NFADDR;
-       S3C24X0_REG32   NFDATA;
-       S3C24X0_REG32   NFSTAT;
-       S3C24X0_REG32   NFECC;
-};
-
-
-/* UART (see manual chapter 11) */
-struct s3c24x0_uart {
-       S3C24X0_REG32   ULCON;
-       S3C24X0_REG32   UCON;
-       S3C24X0_REG32   UFCON;
-       S3C24X0_REG32   UMCON;
-       S3C24X0_REG32   UTRSTAT;
-       S3C24X0_REG32   UERSTAT;
-       S3C24X0_REG32   UFSTAT;
-       S3C24X0_REG32   UMSTAT;
-#ifdef __BIG_ENDIAN
-       S3C24X0_REG8    res1[3];
-       S3C24X0_REG8    UTXH;
-       S3C24X0_REG8    res2[3];
-       S3C24X0_REG8    URXH;
-#else /* Little Endian */
-       S3C24X0_REG8    UTXH;
-       S3C24X0_REG8    res1[3];
-       S3C24X0_REG8    URXH;
-       S3C24X0_REG8    res2[3];
-#endif
-       S3C24X0_REG32   UBRDIV;
-};
-
-
-/* PWM TIMER (see manual chapter 10) */
-struct s3c24x0_timer {
-       S3C24X0_REG32   TCNTB;
-       S3C24X0_REG32   TCMPB;
-       S3C24X0_REG32   TCNTO;
-};
-
-struct s3c24x0_timers {
-       S3C24X0_REG32           TCFG0;
-       S3C24X0_REG32           TCFG1;
-       S3C24X0_REG32           TCON;
-       struct s3c24x0_timer    ch[4];
-       S3C24X0_REG32           TCNTB4;
-       S3C24X0_REG32           TCNTO4;
-};
-
-
-/* USB DEVICE (see manual chapter 13) */
-struct s3c24x0_usb_dev_fifos {
-#ifdef __BIG_ENDIAN
-       S3C24X0_REG8    res[3];
-       S3C24X0_REG8    EP_FIFO_REG;
-#else /*  little endian */
-       S3C24X0_REG8    EP_FIFO_REG;
-       S3C24X0_REG8    res[3];
-#endif
-};
-
-struct s3c24x0_usb_dev_dmas {
-#ifdef __BIG_ENDIAN
-       S3C24X0_REG8    res1[3];
-       S3C24X0_REG8    EP_DMA_CON;
-       S3C24X0_REG8    res2[3];
-       S3C24X0_REG8    EP_DMA_UNIT;
-       S3C24X0_REG8    res3[3];
-       S3C24X0_REG8    EP_DMA_FIFO;
-       S3C24X0_REG8    res4[3];
-       S3C24X0_REG8    EP_DMA_TTC_L;
-       S3C24X0_REG8    res5[3];
-       S3C24X0_REG8    EP_DMA_TTC_M;
-       S3C24X0_REG8    res6[3];
-       S3C24X0_REG8    EP_DMA_TTC_H;
-#else /*  little endian */
-       S3C24X0_REG8    EP_DMA_CON;
-       S3C24X0_REG8    res1[3];
-       S3C24X0_REG8    EP_DMA_UNIT;
-       S3C24X0_REG8    res2[3];
-       S3C24X0_REG8    EP_DMA_FIFO;
-       S3C24X0_REG8    res3[3];
-       S3C24X0_REG8    EP_DMA_TTC_L;
-       S3C24X0_REG8    res4[3];
-       S3C24X0_REG8    EP_DMA_TTC_M;
-       S3C24X0_REG8    res5[3];
-       S3C24X0_REG8    EP_DMA_TTC_H;
-       S3C24X0_REG8    res6[3];
-#endif
-};
-
-struct s3c24x0_usb_device {
-#ifdef __BIG_ENDIAN
-       S3C24X0_REG8    res1[3];
-       S3C24X0_REG8    FUNC_ADDR_REG;
-       S3C24X0_REG8    res2[3];
-       S3C24X0_REG8    PWR_REG;
-       S3C24X0_REG8    res3[3];
-       S3C24X0_REG8    EP_INT_REG;
-       S3C24X0_REG8    res4[15];
-       S3C24X0_REG8    USB_INT_REG;
-       S3C24X0_REG8    res5[3];
-       S3C24X0_REG8    EP_INT_EN_REG;
-       S3C24X0_REG8    res6[15];
-       S3C24X0_REG8    USB_INT_EN_REG;
-       S3C24X0_REG8    res7[3];
-       S3C24X0_REG8    FRAME_NUM1_REG;
-       S3C24X0_REG8    res8[3];
-       S3C24X0_REG8    FRAME_NUM2_REG;
-       S3C24X0_REG8    res9[3];
-       S3C24X0_REG8    INDEX_REG;
-       S3C24X0_REG8    res10[7];
-       S3C24X0_REG8    MAXP_REG;
-       S3C24X0_REG8    res11[3];
-       S3C24X0_REG8    EP0_CSR_IN_CSR1_REG;
-       S3C24X0_REG8    res12[3];
-       S3C24X0_REG8    IN_CSR2_REG;
-       S3C24X0_REG8    res13[7];
-       S3C24X0_REG8    OUT_CSR1_REG;
-       S3C24X0_REG8    res14[3];
-       S3C24X0_REG8    OUT_CSR2_REG;
-       S3C24X0_REG8    res15[3];
-       S3C24X0_REG8    OUT_FIFO_CNT1_REG;
-       S3C24X0_REG8    res16[3];
-       S3C24X0_REG8    OUT_FIFO_CNT2_REG;
-#else /*  little endian */
-       S3C24X0_REG8    FUNC_ADDR_REG;
-       S3C24X0_REG8    res1[3];
-       S3C24X0_REG8    PWR_REG;
-       S3C24X0_REG8    res2[3];
-       S3C24X0_REG8    EP_INT_REG;
-       S3C24X0_REG8    res3[15];
-       S3C24X0_REG8    USB_INT_REG;
-       S3C24X0_REG8    res4[3];
-       S3C24X0_REG8    EP_INT_EN_REG;
-       S3C24X0_REG8    res5[15];
-       S3C24X0_REG8    USB_INT_EN_REG;
-       S3C24X0_REG8    res6[3];
-       S3C24X0_REG8    FRAME_NUM1_REG;
-       S3C24X0_REG8    res7[3];
-       S3C24X0_REG8    FRAME_NUM2_REG;
-       S3C24X0_REG8    res8[3];
-       S3C24X0_REG8    INDEX_REG;
-       S3C24X0_REG8    res9[7];
-       S3C24X0_REG8    MAXP_REG;
-       S3C24X0_REG8    res10[7];
-       S3C24X0_REG8    EP0_CSR_IN_CSR1_REG;
-       S3C24X0_REG8    res11[3];
-       S3C24X0_REG8    IN_CSR2_REG;
-       S3C24X0_REG8    res12[3];
-       S3C24X0_REG8    OUT_CSR1_REG;
-       S3C24X0_REG8    res13[7];
-       S3C24X0_REG8    OUT_CSR2_REG;
-       S3C24X0_REG8    res14[3];
-       S3C24X0_REG8    OUT_FIFO_CNT1_REG;
-       S3C24X0_REG8    res15[3];
-       S3C24X0_REG8    OUT_FIFO_CNT2_REG;
-       S3C24X0_REG8    res16[3];
-#endif /*  __BIG_ENDIAN */
-       struct s3c24x0_usb_dev_fifos    fifo[5];
-       struct s3c24x0_usb_dev_dmas     dma[5];
-};
-
-
-/* WATCH DOG TIMER (see manual chapter 18) */
-struct s3c24x0_watchdog {
-       S3C24X0_REG32   WTCON;
-       S3C24X0_REG32   WTDAT;
-       S3C24X0_REG32   WTCNT;
-};
-
-
-/* IIC (see manual chapter 20) */
-struct s3c24x0_i2c {
-       S3C24X0_REG32   IICCON;
-       S3C24X0_REG32   IICSTAT;
-       S3C24X0_REG32   IICADD;
-       S3C24X0_REG32   IICDS;
-};
-
-
-/* IIS (see manual chapter 21) */
-struct s3c24x0_i2s {
-#ifdef __BIG_ENDIAN
-       S3C24X0_REG16   res1;
-       S3C24X0_REG16   IISCON;
-       S3C24X0_REG16   res2;
-       S3C24X0_REG16   IISMOD;
-       S3C24X0_REG16   res3;
-       S3C24X0_REG16   IISPSR;
-       S3C24X0_REG16   res4;
-       S3C24X0_REG16   IISFCON;
-       S3C24X0_REG16   res5;
-       S3C24X0_REG16   IISFIFO;
-#else /*  little endian */
-       S3C24X0_REG16   IISCON;
-       S3C24X0_REG16   res1;
-       S3C24X0_REG16   IISMOD;
-       S3C24X0_REG16   res2;
-       S3C24X0_REG16   IISPSR;
-       S3C24X0_REG16   res3;
-       S3C24X0_REG16   IISFCON;
-       S3C24X0_REG16   res4;
-       S3C24X0_REG16   IISFIFO;
-       S3C24X0_REG16   res5;
-#endif
-};
-
-
-/* I/O PORT (see manual chapter 9) */
-struct s3c24x0_gpio {
-#ifdef CONFIG_S3C2400
-       S3C24X0_REG32   PACON;
-       S3C24X0_REG32   PADAT;
-
-       S3C24X0_REG32   PBCON;
-       S3C24X0_REG32   PBDAT;
-       S3C24X0_REG32   PBUP;
-
-       S3C24X0_REG32   PCCON;
-       S3C24X0_REG32   PCDAT;
-       S3C24X0_REG32   PCUP;
-
-       S3C24X0_REG32   PDCON;
-       S3C24X0_REG32   PDDAT;
-       S3C24X0_REG32   PDUP;
-
-       S3C24X0_REG32   PECON;
-       S3C24X0_REG32   PEDAT;
-       S3C24X0_REG32   PEUP;
-
-       S3C24X0_REG32   PFCON;
-       S3C24X0_REG32   PFDAT;
-       S3C24X0_REG32   PFUP;
-
-       S3C24X0_REG32   PGCON;
-       S3C24X0_REG32   PGDAT;
-       S3C24X0_REG32   PGUP;
-
-       S3C24X0_REG32   OPENCR;
-
-       S3C24X0_REG32   MISCCR;
-       S3C24X0_REG32   EXTINT;
-#endif
-#ifdef CONFIG_S3C2410
-       S3C24X0_REG32   GPACON;
-       S3C24X0_REG32   GPADAT;
-       S3C24X0_REG32   res1[2];
-       S3C24X0_REG32   GPBCON;
-       S3C24X0_REG32   GPBDAT;
-       S3C24X0_REG32   GPBUP;
-       S3C24X0_REG32   res2;
-       S3C24X0_REG32   GPCCON;
-       S3C24X0_REG32   GPCDAT;
-       S3C24X0_REG32   GPCUP;
-       S3C24X0_REG32   res3;
-       S3C24X0_REG32   GPDCON;
-       S3C24X0_REG32   GPDDAT;
-       S3C24X0_REG32   GPDUP;
-       S3C24X0_REG32   res4;
-       S3C24X0_REG32   GPECON;
-       S3C24X0_REG32   GPEDAT;
-       S3C24X0_REG32   GPEUP;
-       S3C24X0_REG32   res5;
-       S3C24X0_REG32   GPFCON;
-       S3C24X0_REG32   GPFDAT;
-       S3C24X0_REG32   GPFUP;
-       S3C24X0_REG32   res6;
-       S3C24X0_REG32   GPGCON;
-       S3C24X0_REG32   GPGDAT;
-       S3C24X0_REG32   GPGUP;
-       S3C24X0_REG32   res7;
-       S3C24X0_REG32   GPHCON;
-       S3C24X0_REG32   GPHDAT;
-       S3C24X0_REG32   GPHUP;
-       S3C24X0_REG32   res8;
-
-       S3C24X0_REG32   MISCCR;
-       S3C24X0_REG32   DCLKCON;
-       S3C24X0_REG32   EXTINT0;
-       S3C24X0_REG32   EXTINT1;
-       S3C24X0_REG32   EXTINT2;
-       S3C24X0_REG32   EINTFLT0;
-       S3C24X0_REG32   EINTFLT1;
-       S3C24X0_REG32   EINTFLT2;
-       S3C24X0_REG32   EINTFLT3;
-       S3C24X0_REG32   EINTMASK;
-       S3C24X0_REG32   EINTPEND;
-       S3C24X0_REG32   GSTATUS0;
-       S3C24X0_REG32   GSTATUS1;
-       S3C24X0_REG32   GSTATUS2;
-       S3C24X0_REG32   GSTATUS3;
-       S3C24X0_REG32   GSTATUS4;
-#endif
-};
-
-
-/* RTC (see manual chapter 17) */
-struct s3c24x0_rtc {
-#ifdef __BIG_ENDIAN
-       S3C24X0_REG8    res1[67];
-       S3C24X0_REG8    RTCCON;
-       S3C24X0_REG8    res2[3];
-       S3C24X0_REG8    TICNT;
-       S3C24X0_REG8    res3[11];
-       S3C24X0_REG8    RTCALM;
-       S3C24X0_REG8    res4[3];
-       S3C24X0_REG8    ALMSEC;
-       S3C24X0_REG8    res5[3];
-       S3C24X0_REG8    ALMMIN;
-       S3C24X0_REG8    res6[3];
-       S3C24X0_REG8    ALMHOUR;
-       S3C24X0_REG8    res7[3];
-       S3C24X0_REG8    ALMDATE;
-       S3C24X0_REG8    res8[3];
-       S3C24X0_REG8    ALMMON;
-       S3C24X0_REG8    res9[3];
-       S3C24X0_REG8    ALMYEAR;
-       S3C24X0_REG8    res10[3];
-       S3C24X0_REG8    RTCRST;
-       S3C24X0_REG8    res11[3];
-       S3C24X0_REG8    BCDSEC;
-       S3C24X0_REG8    res12[3];
-       S3C24X0_REG8    BCDMIN;
-       S3C24X0_REG8    res13[3];
-       S3C24X0_REG8    BCDHOUR;
-       S3C24X0_REG8    res14[3];
-       S3C24X0_REG8    BCDDATE;
-       S3C24X0_REG8    res15[3];
-       S3C24X0_REG8    BCDDAY;
-       S3C24X0_REG8    res16[3];
-       S3C24X0_REG8    BCDMON;
-       S3C24X0_REG8    res17[3];
-       S3C24X0_REG8    BCDYEAR;
-#else /*  little endian */
-       S3C24X0_REG8    res0[64];
-       S3C24X0_REG8    RTCCON;
-       S3C24X0_REG8    res1[3];
-       S3C24X0_REG8    TICNT;
-       S3C24X0_REG8    res2[11];
-       S3C24X0_REG8    RTCALM;
-       S3C24X0_REG8    res3[3];
-       S3C24X0_REG8    ALMSEC;
-       S3C24X0_REG8    res4[3];
-       S3C24X0_REG8    ALMMIN;
-       S3C24X0_REG8    res5[3];
-       S3C24X0_REG8    ALMHOUR;
-       S3C24X0_REG8    res6[3];
-       S3C24X0_REG8    ALMDATE;
-       S3C24X0_REG8    res7[3];
-       S3C24X0_REG8    ALMMON;
-       S3C24X0_REG8    res8[3];
-       S3C24X0_REG8    ALMYEAR;
-       S3C24X0_REG8    res9[3];
-       S3C24X0_REG8    RTCRST;
-       S3C24X0_REG8    res10[3];
-       S3C24X0_REG8    BCDSEC;
-       S3C24X0_REG8    res11[3];
-       S3C24X0_REG8    BCDMIN;
-       S3C24X0_REG8    res12[3];
-       S3C24X0_REG8    BCDHOUR;
-       S3C24X0_REG8    res13[3];
-       S3C24X0_REG8    BCDDATE;
-       S3C24X0_REG8    res14[3];
-       S3C24X0_REG8    BCDDAY;
-       S3C24X0_REG8    res15[3];
-       S3C24X0_REG8    BCDMON;
-       S3C24X0_REG8    res16[3];
-       S3C24X0_REG8    BCDYEAR;
-       S3C24X0_REG8    res17[3];
-#endif
-};
-
-
-/* ADC (see manual chapter 16) */
-struct s3c2400_adc {
-       S3C24X0_REG32   ADCCON;
-       S3C24X0_REG32   ADCDAT;
-};
-
-
-/* ADC (see manual chapter 16) */
-struct s3c2410_adc {
-       S3C24X0_REG32   ADCCON;
-       S3C24X0_REG32   ADCTSC;
-       S3C24X0_REG32   ADCDLY;
-       S3C24X0_REG32   ADCDAT0;
-       S3C24X0_REG32   ADCDAT1;
-};
-
-
-/* SPI (see manual chapter 22) */
-struct s3c24x0_spi_channel {
-       S3C24X0_REG8    SPCON;
-       S3C24X0_REG8    res1[3];
-       S3C24X0_REG8    SPSTA;
-       S3C24X0_REG8    res2[3];
-       S3C24X0_REG8    SPPIN;
-       S3C24X0_REG8    res3[3];
-       S3C24X0_REG8    SPPRE;
-       S3C24X0_REG8    res4[3];
-       S3C24X0_REG8    SPTDAT;
-       S3C24X0_REG8    res5[3];
-       S3C24X0_REG8    SPRDAT;
-       S3C24X0_REG8    res6[3];
-       S3C24X0_REG8    res7[16];
-};
-
-struct s3c24x0_spi {
-       struct s3c24x0_spi_channel      ch[S3C24X0_SPI_CHANNELS];
-};
-
-
-/* MMC INTERFACE (see S3C2400 manual chapter 19) */
-struct s3c2400_mmc {
-#ifdef __BIG_ENDIAN
-       S3C24X0_REG8    res1[3];
-       S3C24X0_REG8    MMCON;
-       S3C24X0_REG8    res2[3];
-       S3C24X0_REG8    MMCRR;
-       S3C24X0_REG8    res3[3];
-       S3C24X0_REG8    MMFCON;
-       S3C24X0_REG8    res4[3];
-       S3C24X0_REG8    MMSTA;
-       S3C24X0_REG16   res5;
-       S3C24X0_REG16   MMFSTA;
-       S3C24X0_REG8    res6[3];
-       S3C24X0_REG8    MMPRE;
-       S3C24X0_REG16   res7;
-       S3C24X0_REG16   MMLEN;
-       S3C24X0_REG8    res8[3];
-       S3C24X0_REG8    MMCR7;
-       S3C24X0_REG32   MMRSP[4];
-       S3C24X0_REG8    res9[3];
-       S3C24X0_REG8    MMCMD0;
-       S3C24X0_REG32   MMCMD1;
-       S3C24X0_REG16   res10;
-       S3C24X0_REG16   MMCR16;
-       S3C24X0_REG8    res11[3];
-       S3C24X0_REG8    MMDAT;
-#else
-       S3C24X0_REG8    MMCON;
-       S3C24X0_REG8    res1[3];
-       S3C24X0_REG8    MMCRR;
-       S3C24X0_REG8    res2[3];
-       S3C24X0_REG8    MMFCON;
-       S3C24X0_REG8    res3[3];
-       S3C24X0_REG8    MMSTA;
-       S3C24X0_REG8    res4[3];
-       S3C24X0_REG16   MMFSTA;
-       S3C24X0_REG16   res5;
-       S3C24X0_REG8    MMPRE;
-       S3C24X0_REG8    res6[3];
-       S3C24X0_REG16   MMLEN;
-       S3C24X0_REG16   res7;
-       S3C24X0_REG8    MMCR7;
-       S3C24X0_REG8    res8[3];
-       S3C24X0_REG32   MMRSP[4];
-       S3C24X0_REG8    MMCMD0;
-       S3C24X0_REG8    res9[3];
-       S3C24X0_REG32   MMCMD1;
-       S3C24X0_REG16   MMCR16;
-       S3C24X0_REG16   res10;
-       S3C24X0_REG8    MMDAT;
-       S3C24X0_REG8    res11[3];
-#endif
-};
-
-
-/* SD INTERFACE (see S3C2410 manual chapter 19) */
-struct s3c2410_sdi {
-       S3C24X0_REG32   SDICON;
-       S3C24X0_REG32   SDIPRE;
-       S3C24X0_REG32   SDICARG;
-       S3C24X0_REG32   SDICCON;
-       S3C24X0_REG32   SDICSTA;
-       S3C24X0_REG32   SDIRSP0;
-       S3C24X0_REG32   SDIRSP1;
-       S3C24X0_REG32   SDIRSP2;
-       S3C24X0_REG32   SDIRSP3;
-       S3C24X0_REG32   SDIDTIMER;
-       S3C24X0_REG32   SDIBSIZE;
-       S3C24X0_REG32   SDIDCON;
-       S3C24X0_REG32   SDIDCNT;
-       S3C24X0_REG32   SDIDSTA;
-       S3C24X0_REG32   SDIFSTA;
-#ifdef __BIG_ENDIAN
-       S3C24X0_REG8    res[3];
-       S3C24X0_REG8    SDIDAT;
-#else
-       S3C24X0_REG8    SDIDAT;
-       S3C24X0_REG8    res[3];
-#endif
-       S3C24X0_REG32   SDIIMSK;
-};
-
-#endif /*__S3C24X0_H__*/
index 2ec261af4a785194fee04ab7ff49435ea528c7c3..bfaf3468ef673b3d12e715d5ce94b128b703e878 100644 (file)
@@ -45,6 +45,7 @@ COBJS-y += sha1.o
 COBJS-$(CONFIG_SHA256) += sha256.o
 COBJS-y += string.o
 COBJS-y        += strmhz.o
+COBJS-y += time.o
 COBJS-y += vsprintf.o
 COBJS-y += zlib.o
 COBJS-$(CONFIG_RBTREE) += rbtree.o
index b27048ceebf2f07075457aedc5f1b0a3cb6db381..468b3979ab1ffa9f9f87891147c932e3fb0fb61f 100644 (file)
@@ -8,11 +8,11 @@
  * For conditions of distribution and use, see copyright notice in zlib.h
  */
 
-#ifndef USE_HOSTCC     /* Shut down "ANSI does not permit..." warnings */
+#ifndef USE_HOSTCC
 #include <common.h>
-#else
-#include <stdint.h>
 #endif
+#include <compiler.h>
+#include <u-boot/crc.h>
 
 #if defined(CONFIG_HW_WATCHDOG) || defined(CONFIG_WATCHDOG)
 #include <watchdog.h>
@@ -22,6 +22,8 @@
 #define local static
 #define ZEXPORT        /* empty */
 
+#define tole(x) cpu_to_le32(x)
+
 #ifdef DYNAMIC_CRC_TABLE
 
 local int crc_table_empty = 1;
@@ -70,7 +72,7 @@ local void make_crc_table()
     c = (uLong)n;
     for (k = 0; k < 8; k++)
       c = c & 1 ? poly ^ (c >> 1) : c >> 1;
-    crc_table[n] = c;
+    crc_table[n] = tole(c);
   }
   crc_table_empty = 0;
 }
@@ -78,59 +80,72 @@ local void make_crc_table()
 /* ========================================================================
  * Table of CRC-32's of all single-byte values (made by make_crc_table)
  */
+
 local const uint32_t crc_table[256] = {
-  0x00000000L, 0x77073096L, 0xee0e612cL, 0x990951baL, 0x076dc419L,
-  0x706af48fL, 0xe963a535L, 0x9e6495a3L, 0x0edb8832L, 0x79dcb8a4L,
-  0xe0d5e91eL, 0x97d2d988L, 0x09b64c2bL, 0x7eb17cbdL, 0xe7b82d07L,
-  0x90bf1d91L, 0x1db71064L, 0x6ab020f2L, 0xf3b97148L, 0x84be41deL,
-  0x1adad47dL, 0x6ddde4ebL, 0xf4d4b551L, 0x83d385c7L, 0x136c9856L,
-  0x646ba8c0L, 0xfd62f97aL, 0x8a65c9ecL, 0x14015c4fL, 0x63066cd9L,
-  0xfa0f3d63L, 0x8d080df5L, 0x3b6e20c8L, 0x4c69105eL, 0xd56041e4L,
-  0xa2677172L, 0x3c03e4d1L, 0x4b04d447L, 0xd20d85fdL, 0xa50ab56bL,
-  0x35b5a8faL, 0x42b2986cL, 0xdbbbc9d6L, 0xacbcf940L, 0x32d86ce3L,
-  0x45df5c75L, 0xdcd60dcfL, 0xabd13d59L, 0x26d930acL, 0x51de003aL,
-  0xc8d75180L, 0xbfd06116L, 0x21b4f4b5L, 0x56b3c423L, 0xcfba9599L,
-  0xb8bda50fL, 0x2802b89eL, 0x5f058808L, 0xc60cd9b2L, 0xb10be924L,
-  0x2f6f7c87L, 0x58684c11L, 0xc1611dabL, 0xb6662d3dL, 0x76dc4190L,
-  0x01db7106L, 0x98d220bcL, 0xefd5102aL, 0x71b18589L, 0x06b6b51fL,
-  0x9fbfe4a5L, 0xe8b8d433L, 0x7807c9a2L, 0x0f00f934L, 0x9609a88eL,
-  0xe10e9818L, 0x7f6a0dbbL, 0x086d3d2dL, 0x91646c97L, 0xe6635c01L,
-  0x6b6b51f4L, 0x1c6c6162L, 0x856530d8L, 0xf262004eL, 0x6c0695edL,
-  0x1b01a57bL, 0x8208f4c1L, 0xf50fc457L, 0x65b0d9c6L, 0x12b7e950L,
-  0x8bbeb8eaL, 0xfcb9887cL, 0x62dd1ddfL, 0x15da2d49L, 0x8cd37cf3L,
-  0xfbd44c65L, 0x4db26158L, 0x3ab551ceL, 0xa3bc0074L, 0xd4bb30e2L,
-  0x4adfa541L, 0x3dd895d7L, 0xa4d1c46dL, 0xd3d6f4fbL, 0x4369e96aL,
-  0x346ed9fcL, 0xad678846L, 0xda60b8d0L, 0x44042d73L, 0x33031de5L,
-  0xaa0a4c5fL, 0xdd0d7cc9L, 0x5005713cL, 0x270241aaL, 0xbe0b1010L,
-  0xc90c2086L, 0x5768b525L, 0x206f85b3L, 0xb966d409L, 0xce61e49fL,
-  0x5edef90eL, 0x29d9c998L, 0xb0d09822L, 0xc7d7a8b4L, 0x59b33d17L,
-  0x2eb40d81L, 0xb7bd5c3bL, 0xc0ba6cadL, 0xedb88320L, 0x9abfb3b6L,
-  0x03b6e20cL, 0x74b1d29aL, 0xead54739L, 0x9dd277afL, 0x04db2615L,
-  0x73dc1683L, 0xe3630b12L, 0x94643b84L, 0x0d6d6a3eL, 0x7a6a5aa8L,
-  0xe40ecf0bL, 0x9309ff9dL, 0x0a00ae27L, 0x7d079eb1L, 0xf00f9344L,
-  0x8708a3d2L, 0x1e01f268L, 0x6906c2feL, 0xf762575dL, 0x806567cbL,
-  0x196c3671L, 0x6e6b06e7L, 0xfed41b76L, 0x89d32be0L, 0x10da7a5aL,
-  0x67dd4accL, 0xf9b9df6fL, 0x8ebeeff9L, 0x17b7be43L, 0x60b08ed5L,
-  0xd6d6a3e8L, 0xa1d1937eL, 0x38d8c2c4L, 0x4fdff252L, 0xd1bb67f1L,
-  0xa6bc5767L, 0x3fb506ddL, 0x48b2364bL, 0xd80d2bdaL, 0xaf0a1b4cL,
-  0x36034af6L, 0x41047a60L, 0xdf60efc3L, 0xa867df55L, 0x316e8eefL,
-  0x4669be79L, 0xcb61b38cL, 0xbc66831aL, 0x256fd2a0L, 0x5268e236L,
-  0xcc0c7795L, 0xbb0b4703L, 0x220216b9L, 0x5505262fL, 0xc5ba3bbeL,
-  0xb2bd0b28L, 0x2bb45a92L, 0x5cb36a04L, 0xc2d7ffa7L, 0xb5d0cf31L,
-  0x2cd99e8bL, 0x5bdeae1dL, 0x9b64c2b0L, 0xec63f226L, 0x756aa39cL,
-  0x026d930aL, 0x9c0906a9L, 0xeb0e363fL, 0x72076785L, 0x05005713L,
-  0x95bf4a82L, 0xe2b87a14L, 0x7bb12baeL, 0x0cb61b38L, 0x92d28e9bL,
-  0xe5d5be0dL, 0x7cdcefb7L, 0x0bdbdf21L, 0x86d3d2d4L, 0xf1d4e242L,
-  0x68ddb3f8L, 0x1fda836eL, 0x81be16cdL, 0xf6b9265bL, 0x6fb077e1L,
-  0x18b74777L, 0x88085ae6L, 0xff0f6a70L, 0x66063bcaL, 0x11010b5cL,
-  0x8f659effL, 0xf862ae69L, 0x616bffd3L, 0x166ccf45L, 0xa00ae278L,
-  0xd70dd2eeL, 0x4e048354L, 0x3903b3c2L, 0xa7672661L, 0xd06016f7L,
-  0x4969474dL, 0x3e6e77dbL, 0xaed16a4aL, 0xd9d65adcL, 0x40df0b66L,
-  0x37d83bf0L, 0xa9bcae53L, 0xdebb9ec5L, 0x47b2cf7fL, 0x30b5ffe9L,
-  0xbdbdf21cL, 0xcabac28aL, 0x53b39330L, 0x24b4a3a6L, 0xbad03605L,
-  0xcdd70693L, 0x54de5729L, 0x23d967bfL, 0xb3667a2eL, 0xc4614ab8L,
-  0x5d681b02L, 0x2a6f2b94L, 0xb40bbe37L, 0xc30c8ea1L, 0x5a05df1bL,
-  0x2d02ef8dL
+tole(0x00000000L), tole(0x77073096L), tole(0xee0e612cL), tole(0x990951baL),
+tole(0x076dc419L), tole(0x706af48fL), tole(0xe963a535L), tole(0x9e6495a3L),
+tole(0x0edb8832L), tole(0x79dcb8a4L), tole(0xe0d5e91eL), tole(0x97d2d988L),
+tole(0x09b64c2bL), tole(0x7eb17cbdL), tole(0xe7b82d07L), tole(0x90bf1d91L),
+tole(0x1db71064L), tole(0x6ab020f2L), tole(0xf3b97148L), tole(0x84be41deL),
+tole(0x1adad47dL), tole(0x6ddde4ebL), tole(0xf4d4b551L), tole(0x83d385c7L),
+tole(0x136c9856L), tole(0x646ba8c0L), tole(0xfd62f97aL), tole(0x8a65c9ecL),
+tole(0x14015c4fL), tole(0x63066cd9L), tole(0xfa0f3d63L), tole(0x8d080df5L),
+tole(0x3b6e20c8L), tole(0x4c69105eL), tole(0xd56041e4L), tole(0xa2677172L),
+tole(0x3c03e4d1L), tole(0x4b04d447L), tole(0xd20d85fdL), tole(0xa50ab56bL),
+tole(0x35b5a8faL), tole(0x42b2986cL), tole(0xdbbbc9d6L), tole(0xacbcf940L),
+tole(0x32d86ce3L), tole(0x45df5c75L), tole(0xdcd60dcfL), tole(0xabd13d59L),
+tole(0x26d930acL), tole(0x51de003aL), tole(0xc8d75180L), tole(0xbfd06116L),
+tole(0x21b4f4b5L), tole(0x56b3c423L), tole(0xcfba9599L), tole(0xb8bda50fL),
+tole(0x2802b89eL), tole(0x5f058808L), tole(0xc60cd9b2L), tole(0xb10be924L),
+tole(0x2f6f7c87L), tole(0x58684c11L), tole(0xc1611dabL), tole(0xb6662d3dL),
+tole(0x76dc4190L), tole(0x01db7106L), tole(0x98d220bcL), tole(0xefd5102aL),
+tole(0x71b18589L), tole(0x06b6b51fL), tole(0x9fbfe4a5L), tole(0xe8b8d433L),
+tole(0x7807c9a2L), tole(0x0f00f934L), tole(0x9609a88eL), tole(0xe10e9818L),
+tole(0x7f6a0dbbL), tole(0x086d3d2dL), tole(0x91646c97L), tole(0xe6635c01L),
+tole(0x6b6b51f4L), tole(0x1c6c6162L), tole(0x856530d8L), tole(0xf262004eL),
+tole(0x6c0695edL), tole(0x1b01a57bL), tole(0x8208f4c1L), tole(0xf50fc457L),
+tole(0x65b0d9c6L), tole(0x12b7e950L), tole(0x8bbeb8eaL), tole(0xfcb9887cL),
+tole(0x62dd1ddfL), tole(0x15da2d49L), tole(0x8cd37cf3L), tole(0xfbd44c65L),
+tole(0x4db26158L), tole(0x3ab551ceL), tole(0xa3bc0074L), tole(0xd4bb30e2L),
+tole(0x4adfa541L), tole(0x3dd895d7L), tole(0xa4d1c46dL), tole(0xd3d6f4fbL),
+tole(0x4369e96aL), tole(0x346ed9fcL), tole(0xad678846L), tole(0xda60b8d0L),
+tole(0x44042d73L), tole(0x33031de5L), tole(0xaa0a4c5fL), tole(0xdd0d7cc9L),
+tole(0x5005713cL), tole(0x270241aaL), tole(0xbe0b1010L), tole(0xc90c2086L),
+tole(0x5768b525L), tole(0x206f85b3L), tole(0xb966d409L), tole(0xce61e49fL),
+tole(0x5edef90eL), tole(0x29d9c998L), tole(0xb0d09822L), tole(0xc7d7a8b4L),
+tole(0x59b33d17L), tole(0x2eb40d81L), tole(0xb7bd5c3bL), tole(0xc0ba6cadL),
+tole(0xedb88320L), tole(0x9abfb3b6L), tole(0x03b6e20cL), tole(0x74b1d29aL),
+tole(0xead54739L), tole(0x9dd277afL), tole(0x04db2615L), tole(0x73dc1683L),
+tole(0xe3630b12L), tole(0x94643b84L), tole(0x0d6d6a3eL), tole(0x7a6a5aa8L),
+tole(0xe40ecf0bL), tole(0x9309ff9dL), tole(0x0a00ae27L), tole(0x7d079eb1L),
+tole(0xf00f9344L), tole(0x8708a3d2L), tole(0x1e01f268L), tole(0x6906c2feL),
+tole(0xf762575dL), tole(0x806567cbL), tole(0x196c3671L), tole(0x6e6b06e7L),
+tole(0xfed41b76L), tole(0x89d32be0L), tole(0x10da7a5aL), tole(0x67dd4accL),
+tole(0xf9b9df6fL), tole(0x8ebeeff9L), tole(0x17b7be43L), tole(0x60b08ed5L),
+tole(0xd6d6a3e8L), tole(0xa1d1937eL), tole(0x38d8c2c4L), tole(0x4fdff252L),
+tole(0xd1bb67f1L), tole(0xa6bc5767L), tole(0x3fb506ddL), tole(0x48b2364bL),
+tole(0xd80d2bdaL), tole(0xaf0a1b4cL), tole(0x36034af6L), tole(0x41047a60L),
+tole(0xdf60efc3L), tole(0xa867df55L), tole(0x316e8eefL), tole(0x4669be79L),
+tole(0xcb61b38cL), tole(0xbc66831aL), tole(0x256fd2a0L), tole(0x5268e236L),
+tole(0xcc0c7795L), tole(0xbb0b4703L), tole(0x220216b9L), tole(0x5505262fL),
+tole(0xc5ba3bbeL), tole(0xb2bd0b28L), tole(0x2bb45a92L), tole(0x5cb36a04L),
+tole(0xc2d7ffa7L), tole(0xb5d0cf31L), tole(0x2cd99e8bL), tole(0x5bdeae1dL),
+tole(0x9b64c2b0L), tole(0xec63f226L), tole(0x756aa39cL), tole(0x026d930aL),
+tole(0x9c0906a9L), tole(0xeb0e363fL), tole(0x72076785L), tole(0x05005713L),
+tole(0x95bf4a82L), tole(0xe2b87a14L), tole(0x7bb12baeL), tole(0x0cb61b38L),
+tole(0x92d28e9bL), tole(0xe5d5be0dL), tole(0x7cdcefb7L), tole(0x0bdbdf21L),
+tole(0x86d3d2d4L), tole(0xf1d4e242L), tole(0x68ddb3f8L), tole(0x1fda836eL),
+tole(0x81be16cdL), tole(0xf6b9265bL), tole(0x6fb077e1L), tole(0x18b74777L),
+tole(0x88085ae6L), tole(0xff0f6a70L), tole(0x66063bcaL), tole(0x11010b5cL),
+tole(0x8f659effL), tole(0xf862ae69L), tole(0x616bffd3L), tole(0x166ccf45L),
+tole(0xa00ae278L), tole(0xd70dd2eeL), tole(0x4e048354L), tole(0x3903b3c2L),
+tole(0xa7672661L), tole(0xd06016f7L), tole(0x4969474dL), tole(0x3e6e77dbL),
+tole(0xaed16a4aL), tole(0xd9d65adcL), tole(0x40df0b66L), tole(0x37d83bf0L),
+tole(0xa9bcae53L), tole(0xdebb9ec5L), tole(0x47b2cf7fL), tole(0x30b5ffe9L),
+tole(0xbdbdf21cL), tole(0xcabac28aL), tole(0x53b39330L), tole(0x24b4a3a6L),
+tole(0xbad03605L), tole(0xcdd70693L), tole(0x54de5729L), tole(0x23d967bfL),
+tole(0xb3667a2eL), tole(0xc4614ab8L), tole(0x5d681b02L), tole(0x2a6f2b94L),
+tole(0xb40bbe37L), tole(0xc30c8ea1L), tole(0x5a05df1bL), tole(0x2d02ef8dL)
 };
 #endif
 
@@ -148,54 +163,63 @@ const uint32_t * ZEXPORT get_crc_table()
 #endif
 
 /* ========================================================================= */
-#define DO1(buf) crc = crc_table[((int)crc ^ (*buf++)) & 0xff] ^ (crc >> 8);
-#define DO2(buf)  DO1(buf); DO1(buf);
-#define DO4(buf)  DO2(buf); DO2(buf);
-#define DO8(buf)  DO4(buf); DO4(buf);
+# ifdef __LITTLE_ENDIAN
+#  define DO_CRC(x) crc = tab[(crc ^ (x)) & 255] ^ (crc >> 8)
+# else
+#  define DO_CRC(x) crc = tab[((crc >> 24) ^ (x)) & 255] ^ (crc << 8)
+# endif
 
 /* ========================================================================= */
-uint32_t ZEXPORT crc32 (uint32_t crc, const Bytef *buf, uInt len)
-{
-#ifdef DYNAMIC_CRC_TABLE
-    if (crc_table_empty)
-      make_crc_table();
-#endif
-    crc = crc ^ 0xffffffffL;
-    while (len >= 8)
-    {
-      DO8(buf);
-      len -= 8;
-    }
-    if (len) do {
-      DO1(buf);
-    } while (--len);
-    return crc ^ 0xffffffffL;
-}
-
-#if defined(CONFIG_CMD_JFFS2) || defined(CONFIG_CMD_NAND)
 
 /* No ones complement version. JFFS2 (and other things ?)
  * don't use ones compliment in their CRC calculations.
  */
 uint32_t ZEXPORT crc32_no_comp(uint32_t crc, const Bytef *buf, uInt len)
 {
+    const uint32_t *tab = crc_table;
+    const uint32_t *b =(const uint32_t *)buf;
+    size_t rem_len;
 #ifdef DYNAMIC_CRC_TABLE
     if (crc_table_empty)
       make_crc_table();
 #endif
-    while (len >= 8)
-    {
-      DO8(buf);
-      len -= 8;
+    crc = cpu_to_le32(crc);
+    /* Align it */
+    if (((long)b) & 3 && len) {
+        uint8_t *p = (uint8_t *)b;
+        do {
+             DO_CRC(*p++);
+        } while ((--len) && ((long)p)&3);
+        b = (uint32_t *)p;
+    }
+
+    rem_len = len & 3;
+    len = len >> 2;
+    for (--b; len; --len) {
+        /* load data 32 bits wide, xor data 32 bits wide. */
+        crc ^= *++b; /* use pre increment for speed */
+        DO_CRC(0);
+        DO_CRC(0);
+        DO_CRC(0);
+        DO_CRC(0);
+    }
+    len = rem_len;
+    /* And the last few bytes */
+    if (len) {
+        uint8_t *p = (uint8_t *)(b + 1) - 1;
+        do {
+             DO_CRC(*++p); /* use pre increment for speed */
+        } while (--len);
     }
-    if (len) do {
-      DO1(buf);
-    } while (--len);
 
-    return crc;
+    return le32_to_cpu(crc);
 }
+#undef DO_CRC
 
-#endif
+uint32_t ZEXPORT crc32 (uint32_t crc, const Bytef *p, uInt len)
+{
+     return crc32_no_comp(crc ^ 0xffffffffL, p, len) ^ 0xffffffffL;
+}
 
 /*
  * Calculate the crc32 checksum triggering the watchdog every 'chunk_sz' bytes
index 2780e118a402635b81ae1b2f22b41c1d3a7051ed..09bdc8f6ca00324f8b7ec331da7ca58709e42bb9 100644 (file)
 #define COPY4(dst, src)        \
                put_unaligned(get_unaligned((const u32 *)(src)), (u32 *)(dst))
 
+static const unsigned char lzop_magic[] = {
+       0x89, 0x4c, 0x5a, 0x4f, 0x00, 0x0d, 0x0a, 0x1a, 0x0a
+};
+
+#define HEADER_HAS_FILTER      0x00000800L
+
+static inline const unsigned char *parse_header(const unsigned char *src)
+{
+       u8 level = 0;
+       u16 version;
+       int i;
+
+       /* read magic: 9 first bytes */
+       for (i = 0; i < ARRAY_SIZE(lzop_magic); i++) {
+               if (*src++ != lzop_magic[i])
+                       return NULL;
+       }
+       /* get version (2bytes), skip library version (2),
+        * 'need to be extracted' version (2) and
+        * method (1) */
+       version = get_unaligned_be16(src);
+       src += 7;
+       if (version >= 0x0940)
+               level = *src++;
+       if (get_unaligned_be32(src) & HEADER_HAS_FILTER)
+               src += 4; /* filter info */
+
+       /* skip flags, mode and mtime_low */
+       src += 12;
+       if (version >= 0x0940)
+               src += 4;       /* skip mtime_high */
+
+       i = *src++;
+       /* don't care about the file name, and skip checksum */
+       src += i + 4;
+
+       return src;
+}
+
+int lzop_decompress(const unsigned char *src, size_t src_len,
+                   unsigned char *dst, size_t *dst_len)
+{
+       unsigned char *start = dst;
+       const unsigned char *send = src + src_len;
+       u32 slen, dlen;
+       size_t tmp;
+       int r;
+
+       src = parse_header(src);
+       if (!src)
+               return LZO_E_ERROR;
+
+       while (src < send) {
+               /* read uncompressed block size */
+               dlen = get_unaligned_be32(src);
+               src += 4;
+
+               /* exit if last block */
+               if (dlen == 0) {
+                       *dst_len = dst - start;
+                       return LZO_E_OK;
+               }
+
+               /* read compressed block size, and skip block checksum info */
+               slen = get_unaligned_be32(src);
+               src += 8;
+
+               if (slen <= 0 || slen > dlen)
+                       return LZO_E_ERROR;
+
+               /* decompress */
+               tmp = dlen;
+               r = lzo1x_decompress_safe((u8 *) src, slen, dst, &tmp);
+
+               if (r != LZO_E_OK)
+                       return r;
+
+               if (dlen != tmp)
+                       return LZO_E_ERROR;
+
+               src += slen;
+               dst += dlen;
+       }
+
+       return LZO_E_INPUT_OVERRUN;
+}
+
 int lzo1x_decompress_safe(const unsigned char *in, size_t in_len,
                        unsigned char *out, size_t *out_len)
 {
diff --git a/lib_generic/time.c b/lib_generic/time.c
new file mode 100644 (file)
index 0000000..a309c26
--- /dev/null
@@ -0,0 +1,43 @@
+/*
+ * (C) Copyright 2000-2009
+ * 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 <common.h>
+#include <watchdog.h>
+
+#ifndef CONFIG_WD_PERIOD
+# define CONFIG_WD_PERIOD      (10 * 1000 * 1000)      /* 10 seconds default*/
+#endif
+
+/* ------------------------------------------------------------------------- */
+
+void udelay(unsigned long usec)
+{
+       ulong kv;
+
+       do {
+               WATCHDOG_RESET();
+               kv = usec > CONFIG_WD_PERIOD ? CONFIG_WD_PERIOD : usec;
+               __udelay (kv);
+               usec -= kv;
+       } while(usec);
+}
index ef1fa22806a60bf4fd62adbf9d9f8e04a0987d11..26e5af1d8e84bfa74fee86b90adb5d4cbed4b40b 100644 (file)
 #define ZUTIL_H
 #define ZLIB_INTERNAL
 
-#include "u-boot/zlib.h"
 #include <common.h>
+#include <compiler.h>
+#include <asm/unaligned.h>
+#include "u-boot/zlib.h"
 #undef OFF                             /* avoid conflicts */
 
 /* To avoid a build time warning */
@@ -402,6 +404,7 @@ void inflate_fast OF((z_streamp strm, unsigned start));
  */
 #define OFF 1
 #define PUP(a) *++(a)
+#define UP_UNALIGNED(a) get_unaligned(++(a))
 
 /*
    Decode literal, length, and distance codes and write out the resulting
@@ -618,18 +621,47 @@ unsigned start;         /* inflate()'s starting value for strm->avail_out */
                     }
                 }
                 else {
+                   unsigned short *sout;
+                   unsigned long loops;
+
                     from = out - dist;          /* copy direct from output */
-                    do {                        /* minimum length is three */
-                        PUP(out) = PUP(from);
-                        PUP(out) = PUP(from);
-                        PUP(out) = PUP(from);
-                        len -= 3;
-                    } while (len > 2);
-                    if (len) {
-                        PUP(out) = PUP(from);
-                        if (len > 1)
-                            PUP(out) = PUP(from);
-                    }
+                    /* minimum length is three */
+                   /* Align out addr */
+                   if (!((long)(out - 1 + OFF) & 1)) {
+                       PUP(out) = PUP(from);
+                       len--;
+                   }
+                   sout = (unsigned short *)(out - OFF);
+                   if (dist > 2 ) {
+                       unsigned short *sfrom;
+
+                       sfrom = (unsigned short *)(from - OFF);
+                       loops = len >> 1;
+                       do
+                           PUP(sout) = UP_UNALIGNED(sfrom);
+                       while (--loops);
+                       out = (unsigned char *)sout + OFF;
+                       from = (unsigned char *)sfrom + OFF;
+                   } else { /* dist == 1 or dist == 2 */
+                       unsigned short pat16;
+
+                       pat16 = *(sout-2+2*OFF);
+                       if (dist == 1)
+#if defined(__BIG_ENDIAN)
+                           pat16 = (pat16 & 0xff) | ((pat16 & 0xff ) << 8);
+#elif defined(__LITTLE_ENDIAN)
+                           pat16 = (pat16 & 0xff00) | ((pat16 & 0xff00 ) >> 8);
+#else
+#error __BIG_ENDIAN nor __LITTLE_ENDIAN is defined
+#endif
+                       loops = len >> 1;
+                       do
+                           PUP(sout) = pat16;
+                       while (--loops);
+                       out = (unsigned char *)sout + OFF;
+                   }
+                   if (len & 1)
+                       PUP(out) = PUP(from);
                 }
             }
             else if ((op & 64) == 0) {          /* 2nd level distance code */
index bb9b330ac64204685789b23b870f48152433e0c1..9838506689c079beb4466b349d639b69dd60da86 100644 (file)
@@ -32,16 +32,16 @@ SOBJS-y     += realmode_switch.o
 COBJS-y        += bios_setup.o
 COBJS-y        += board.o
 COBJS-y        += bootm.o
+COBJS-y        += interrupts.o
+COBJS-$(CONFIG_SYS_PCAT_INTERRUPTS) += pcat_interrupts.o
+COBJS-$(CONFIG_SYS_GENERIC_TIMER) += pcat_timer.o
 COBJS-$(CONFIG_PCI) += pci.o
 COBJS-$(CONFIG_PCI) += pci_type1.o
 COBJS-y        += realmode.o
+COBJS-y        += timer.o
 COBJS-y        += video_bios.o
 COBJS-y        += video.o
 COBJS-y        += zimage.o
-COBJS-y        += interrupts.o
-COBJS-y        += timer.o
-COBJS-$(CONFIG_SYS_PCAT_INTERRUPTS) += pcat_interrupts.o
-COBJS-$(CONFIG_SYS_GENERIC_TIMER) += pcat_timer.o
 
 SRCS   := $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c)
 OBJS   := $(addprefix $(obj),$(SOBJS-y) $(COBJS-y))
index d6ca3e31592fbef697309c2f9e350a310fa1ff44..48f1b81122272a5c92208629c49100b059e3db41 100644 (file)
        jmp     realmode_reset
 
 .globl rm_int00
+.hidden rm_int00
+.type rm_int00, @function
 rm_int00:
        pushw   $0
        jmp     any_interrupt16
 .globl rm_int01
+.hidden rm_int01
+.type rm_int01, @function
 rm_int01:
        pushw   $1
        jmp     any_interrupt16
 .globl rm_int02
+.hidden rm_int02
+.type rm_int02, @function
 rm_int02:
        pushw   $2
        jmp     any_interrupt16
 .globl rm_int03
+.hidden rm_int03
+.type rm_int03, @function
 rm_int03:
        pushw   $3
        jmp     any_interrupt16
 .globl rm_int04
+.hidden rm_int04
+.type rm_int04, @function
 rm_int04:
        pushw   $4
        jmp     any_interrupt16
 .globl rm_int05
+.hidden rm_int05
+.type rm_int05, @function
 rm_int05:
        pushw   $5
        jmp     any_interrupt16
 .globl rm_int06
+.hidden rm_int06
+.type rm_int06, @function
 rm_int06:
        pushw   $6
        jmp     any_interrupt16
 .globl rm_int07
+.hidden rm_int07
+.type rm_int07, @function
 rm_int07:
        pushw   $7
        jmp     any_interrupt16
 .globl rm_int08
+.hidden rm_int08
+.type rm_int08, @function
 rm_int08:
        pushw   $8
        jmp     any_interrupt16
 .globl rm_int09
+.hidden rm_int09
+.type rm_int09, @function
 rm_int09:
        pushw   $9
        jmp     any_interrupt16
 .globl rm_int0a
+.hidden rm_int0a
+.type rm_int0a, @function
 rm_int0a:
        pushw   $10
        jmp     any_interrupt16
 .globl rm_int0b
+.hidden rm_int0b
+.type rm_int0b, @function
 rm_int0b:
        pushw   $11
        jmp     any_interrupt16
 .globl rm_int0c
+.hidden rm_int0c
+.type rm_int0c, @function
 rm_int0c:
        pushw   $12
        jmp     any_interrupt16
 .globl rm_int0d
+.hidden rm_int0d
+.type rm_int0d, @function
 rm_int0d:
        pushw   $13
        jmp     any_interrupt16
 .globl rm_int0e
+.hidden rm_int0e
+.type rm_int0e, @function
 rm_int0e:
        pushw   $14
        jmp     any_interrupt16
 .globl rm_int0f
+.hidden rm_int0f
+.type rm_int0f, @function
 rm_int0f:
        pushw   $15
        jmp     any_interrupt16
 .globl rm_int10
+.hidden rm_int10
+.type rm_int10, @function
 rm_int10:
        pushw   $16
        jmp     any_interrupt16
 .globl rm_int11
+.hidden rm_int11
+.type rm_int11, @function
 rm_int11:
        pushw   $17
        jmp     any_interrupt16
 .globl rm_int12
+.hidden rm_int12
+.type rm_int12, @function
 rm_int12:
        pushw   $18
        jmp     any_interrupt16
 .globl rm_int13
+.hidden rm_int13
+.type rm_int13, @function
 rm_int13:
        pushw   $19
        jmp     any_interrupt16
 .globl rm_int14
+.hidden rm_int14
+.type rm_int14, @function
 rm_int14:
        pushw   $20
        jmp     any_interrupt16
 .globl rm_int15
+.hidden rm_int15
+.type rm_int15, @function
 rm_int15:
        pushw   $21
        jmp     any_interrupt16
 .globl rm_int16
+.hidden rm_int16
+.type rm_int16, @function
 rm_int16:
        pushw   $22
        jmp     any_interrupt16
 .globl rm_int17
+.hidden rm_int17
+.type rm_int17, @function
 rm_int17:
        pushw   $23
        jmp     any_interrupt16
 .globl rm_int18
+.hidden rm_int18
+.type rm_int18, @function
 rm_int18:
        pushw   $24
        jmp     any_interrupt16
 .globl rm_int19
+.hidden rm_int19
+.type rm_int19, @function
 rm_int19:
        pushw   $25
        jmp     any_interrupt16
 .globl rm_int1a
+.hidden rm_int1a
+.type rm_int1a, @function
 rm_int1a:
        pushw   $26
        jmp     any_interrupt16
 .globl rm_int1b
+.hidden rm_int1b
+.type rm_int1b, @function
 rm_int1b:
        pushw   $27
        jmp     any_interrupt16
 .globl rm_int1c
+.hidden rm_int1c
+.type rm_int1c, @function
 rm_int1c:
        pushw   $28
        jmp     any_interrupt16
 .globl rm_int1d
+.hidden rm_int1d
+.type rm_int1d, @function
 rm_int1d:
        pushw   $29
        jmp     any_interrupt16
 .globl rm_int1e
+.hidden rm_int1e
+.type rm_int1e, @function
 rm_int1e:
        pushw   $30
        jmp     any_interrupt16
 .globl rm_int1f
+.hidden rm_int1f
+.type rm_int1f, @function
 rm_int1f:
        pushw   $31
        jmp     any_interrupt16
 .globl rm_def_int
+.hidden rm_def_int
+.type rm_def_int, @function
 rm_def_int:
        iret
 
@@ -454,9 +520,13 @@ Lfunc_b1h:
 
 
 .globl ram_in_64kb_chunks
+.hidden ram_in_64kb_chunks
+.type ram_in_64kb_chunks, @function
 ram_in_64kb_chunks:
        .word   0
 
 .globl bios_equipment
+.hidden bios_equipment
+.type bios_equipment, @function
 bios_equipment:
        .word   0
index 67fd00b83433ae0bd4632908821491319fb1799f..9e412e5e4c460a419aa50ef6de7872bac77f03ae 100644 (file)
@@ -34,6 +34,8 @@
 .section .bios, "ax"
 .code16
 .globl realmode_pci_bios_call_entry
+.hidden realmode_pci_bios_call_entry
+.type realmode_pci_bios_call_entry, @function
 realmode_pci_bios_call_entry:
        MAKE_BIOS_STACK
        call realmode_pci_bios
index 33c842c6a0aba7e8c54f12b7196b48776282575b..6491e522ec4ef18513e1763f0434a80429175d05 100644 (file)
@@ -45,6 +45,9 @@ DECLARE_GLOBAL_DATA_PTR;
 #define BIOS_BASE        ((char*)0xf0000)
 #define BIOS_CS          0xf000
 
+extern ulong _i386boot_bios;
+extern ulong _i386boot_bios_size;
+
 /* these are defined in a 16bit segment and needs
  * to be accessed with the RELOC_16_xxxx() macros below
  */
@@ -138,6 +141,9 @@ static void setvector(int vector, u16 segment, void *handler)
 
 int bios_setup(void)
 {
+       ulong i386boot_bios      = (ulong)&_i386boot_bios;
+       ulong i386boot_bios_size = (ulong)&_i386boot_bios_size;
+
        static int done=0;
        int vector;
 #ifdef CONFIG_PCI
index 12ca20f608b162baaa4ba86b33320d5991023d10..f3b6348551ea7058b68b72229c008a1985d6235b 100644 (file)
@@ -38,6 +38,7 @@
 #include <net.h>
 #include <ide.h>
 #include <asm/u-boot-i386.h>
+#include <elf.h>
 
 #ifdef CONFIG_BITBANGMII
 #include <miiphy.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
-extern long _i386boot_start;
-extern long _i386boot_end;
-extern long _i386boot_romdata_start;
-extern long _i386boot_romdata_dest;
-extern long _i386boot_romdata_size;
-extern long _i386boot_bss_start;
-extern long _i386boot_bss_size;
-
-extern long _i386boot_realmode;
-extern long _i386boot_realmode_size;
-extern long _i386boot_bios;
-extern long _i386boot_bios_size;
-
-/* The symbols defined by the linker script becomes pointers
- * which is somewhat inconveient ... */
-ulong i386boot_start         = (ulong)&_i386boot_start;         /* code start (in flash) defined in start.S */
-ulong i386boot_end           = (ulong)&_i386boot_end;          /* code end (in flash) */
-ulong i386boot_romdata_start = (ulong)&_i386boot_romdata_start; /* datasegment in flash (also code+rodata end) */
-ulong i386boot_romdata_dest  = (ulong)&_i386boot_romdata_dest;  /* data location segment in ram */
-ulong i386boot_romdata_size  = (ulong)&_i386boot_romdata_size;  /* size of data segment */
-ulong i386boot_bss_start     = (ulong)&_i386boot_bss_start;     /* bss start */
-ulong i386boot_bss_size      = (ulong)&_i386boot_bss_size;      /* bss size */
-
-ulong i386boot_realmode      = (ulong)&_i386boot_realmode;      /* start of realmode entry code */
-ulong i386boot_realmode_size = (ulong)&_i386boot_realmode_size; /* size of realmode entry code */
-ulong i386boot_bios          = (ulong)&_i386boot_bios;          /* start of BIOS emulation code */
-ulong i386boot_bios_size     = (ulong)&_i386boot_bios_size;     /* size of BIOS emulation code */
-
-
+/* Exports from the Linker Script */
+extern ulong _i386boot_text_start;
+extern ulong _i386boot_rel_dyn_start;
+extern ulong _i386boot_rel_dyn_end;
+extern ulong _i386boot_bss_start;
+extern ulong _i386boot_bss_size;
+void ram_bootstrap (void *);
 const char version_string[] =
        U_BOOT_VERSION" (" U_BOOT_DATE " - " U_BOOT_TIME ")";
 
-static int mem_malloc_init(void)
-{
-       /* start malloc area right after the stack */
-       mem_malloc_start = i386boot_bss_start +
-               i386boot_bss_size + CONFIG_SYS_STACK_SIZE;
-       mem_malloc_start = (mem_malloc_start+3)&~3;
-
-       /* Use all available RAM for malloc() */
-       mem_malloc_end = gd->ram_size;
-
-       mem_malloc_brk = mem_malloc_start;
-
-       return 0;
-}
-
 /************************************************************************
  * Init Utilities                                                      *
  ************************************************************************
@@ -115,6 +79,7 @@ static int display_banner (void)
 {
 
        printf ("\n\n%s\n\n", version_string);
+/*
        printf ("U-Boot code: %08lX -> %08lX  data: %08lX -> %08lX\n"
                "        BSS: %08lX -> %08lX stack: %08lX -> %08lX\n",
                i386boot_start, i386boot_romdata_start-1,
@@ -123,6 +88,7 @@ static int display_banner (void)
                i386boot_bss_start+i386boot_bss_size,
                i386boot_bss_start+i386boot_bss_size+CONFIG_SYS_STACK_SIZE-1);
 
+*/
 
        return (0);
 }
@@ -154,7 +120,6 @@ static void display_flash_config (ulong size)
        print_size (size, "\n");
 }
 
-
 /*
  * Breath some life into the board...
  *
@@ -166,6 +131,7 @@ static void display_flash_config (ulong size)
  * can relocate the monitor code to RAM.
  */
 
+
 /*
  * All attempts to come up with a "common" initialization sequence
  * that works for all boards and architectures failed: some of the
@@ -181,13 +147,12 @@ static void display_flash_config (ulong size)
 typedef int (init_fnc_t) (void);
 
 init_fnc_t *init_sequence[] = {
-       cpu_init,               /* basic cpu dependent setup */
-       board_init,             /* basic board dependent setup */
+       serial_init,
+       cpu_init_r,             /* basic cpu dependent setup */
+       board_early_init_r,     /* basic board dependent setup */
        dram_init,              /* configure available RAM banks */
-       mem_malloc_init,        /* dependant on dram_init */
        interrupt_init,         /* set up exceptions */
        timer_init,
-       serial_init,
        env_init,               /* initialize environment */
        init_baudrate,          /* initialze baudrate settings */
        serial_init,            /* serial communications setup */
@@ -199,21 +164,86 @@ init_fnc_t *init_sequence[] = {
 
 gd_t *gd;
 
-void start_i386boot (void)
+/*
+ * Load U-Boot into RAM, initialize BSS, perform relocation adjustments
+ */
+void board_init_f (ulong stack_limit)
+{
+       void *text_start = &_i386boot_text_start;
+       void *u_boot_cmd_end = &__u_boot_cmd_end;
+       Elf32_Rel *rel_dyn_start = (Elf32_Rel *)&_i386boot_rel_dyn_start;
+       Elf32_Rel *rel_dyn_end = (Elf32_Rel *)&_i386boot_rel_dyn_end;
+       void *bss_start = &_i386boot_bss_start;
+       void *bss_size = &_i386boot_bss_size;
+
+       size_t uboot_size;
+       void *ram_start;
+       ulong rel_offset;
+       Elf32_Rel *re;
+
+       void (*start_func)(void *);
+
+       /* compiler optimization barrier needed for GCC >= 3.4 */
+       __asm__ __volatile__("": : :"memory");
+
+       uboot_size = (size_t)u_boot_cmd_end - (size_t)text_start;
+       ram_start  = (void *)stack_limit - (uboot_size + (ulong)bss_size);
+       rel_offset = text_start - ram_start;
+       start_func = ram_bootstrap - rel_offset;
+
+       /* First stage CPU initialization */
+       if (cpu_init_f() != 0)
+               hang();
+
+       /* First stage Board initialization */
+       if (board_early_init_f() != 0)
+               hang();
+
+       /* Copy U-Boot into RAM */
+       memcpy(ram_start, text_start, (size_t)uboot_size);
+
+       /* Clear BSS */
+       memset(bss_start - rel_offset,  0, (size_t)bss_size);
+
+       /* Perform relocation adjustments */
+       for (re = rel_dyn_start; re < rel_dyn_end; re++)
+       {
+               if (re->r_offset >= TEXT_BASE)
+                       if (*(ulong *)re->r_offset >= TEXT_BASE)
+                               *(ulong *)(re->r_offset - rel_offset) -= (Elf32_Addr)rel_offset;
+       }
+
+       start_func(ram_start);
+
+       /* NOTREACHED - relocate_code() does not return */
+       while(1);
+}
+
+/*
+ * All attempts to jump straight from board_init_f() to board_init_r()
+ * have failed, hence this special 'bootstrap' function.
+ */
+void ram_bootstrap (void *ram_start)
+{
+       static gd_t gd_data;
+
+       /* compiler optimization barrier needed for GCC >= 3.4 */
+       __asm__ __volatile__("": : :"memory");
+
+       board_init_r(&gd_data, (ulong)ram_start);
+}
+
+void board_init_r(gd_t *id, ulong ram_start)
 {
        char *s;
        int i;
        ulong size;
-       static gd_t gd_data;
        static bd_t bd_data;
        init_fnc_t **init_fnc_ptr;
 
-#ifndef CONFIG_SKIP_RELOCATE_UBOOT
-       cmd_tbl_t *p;
-#endif
        show_boot_progress(0x21);
 
-       gd = &gd_data;
+       gd = id;
        /* compiler optimization barrier needed for GCC >= 3.4 */
        __asm__ __volatile__("": : :"memory");
 
@@ -224,10 +254,11 @@ void start_i386boot (void)
 
        gd->baudrate =  CONFIG_BAUDRATE;
 
-#ifndef CONFIG_SKIP_RELOCATE_UBOOT
-       /* Need to set relocation offset here for interrupt initialization */
-       gd->reloc_off =  CONFIG_SYS_BL_START_RAM - TEXT_BASE;
-#endif
+       gd->flags |= GD_FLG_RELOC;      /* tell others: relocation done */
+
+       mem_malloc_init((((ulong)ram_start - CONFIG_SYS_MALLOC_LEN)+3)&~3,
+                       CONFIG_SYS_MALLOC_LEN);
+
        for (init_fnc_ptr = init_sequence, i=0; *init_fnc_ptr; ++init_fnc_ptr, i++) {
                show_boot_progress(0xa130|i);
 
@@ -237,26 +268,6 @@ void start_i386boot (void)
        }
        show_boot_progress(0x23);
 
-#ifndef CONFIG_SKIP_RELOCATE_UBOOT
-       for (p = &__u_boot_cmd_start; p != &__u_boot_cmd_end; p++) {
-               ulong addr;
-               addr = (ulong) (p->cmd) + gd->reloc_off;
-               p->cmd = (int (*)(struct cmd_tbl_s *, int, int, char *[]))addr;
-               addr = (ulong)(p->name) + gd->reloc_off;
-               p->name = (char *)addr;
-
-               if (p->usage != NULL) {
-                       addr = (ulong)(p->usage) + gd->reloc_off;
-                       p->usage = (char *)addr;
-               }
-       #ifdef  CONFIG_SYS_LONGHELP
-               if (p->help != NULL) {
-                       addr = (ulong)(p->help) + gd->reloc_off;
-                       p->help = (char *)addr;
-               }
-       #endif
-       }
-#endif
        /* configure available FLASH banks */
        size = flash_init();
        display_flash_config(size);
index 3f3613a2fbaf870df6392d5c61275d51b9725f29..51def59954c2d2525f535c04f5e1351e710b36b5 100644 (file)
@@ -70,12 +70,12 @@ void irq_install_handler(int irq, interrupt_handler_t *handler, void *arg)
 
        if (irq_handlers[irq].handler != NULL)
                printf("irq_install_handler: 0x%08lx replacing 0x%08lx\n",
-                      (ulong) handler + gd->reloc_off,
+                      (ulong) handler,
                       (ulong) irq_handlers[irq].handler);
 
        status = disable_interrupts ();
 
-       irq_handlers[irq].handler = handler + gd->reloc_off;
+       irq_handlers[irq].handler = handler;
        irq_handlers[irq].arg = arg;
        irq_handlers[irq].count = 0;
 
@@ -109,8 +109,10 @@ void irq_free_handler(int irq)
        return;
 }
 
-__isr__ do_irq(int irq)
+void do_irq(int hw_irq)
 {
+       int irq = hw_irq - 0x20;
+
        if (irq < 0 || irq >= CONFIG_SYS_NUM_IRQS) {
                printf("do_irq: bad irq number %d\n", irq);
                return;
index f01298e9cf25292f529b087685b44e9c861353fb..67e6e97e35eb77587df6817425daa7e5f4f97ab8 100644 (file)
 #error "CONFIG_SYS_NUM_IRQS must equal 16 if CONFIG_SYS_NUM_IRQS is defined"
 #endif
 
-DECLARE_INTERRUPT(0);
-DECLARE_INTERRUPT(1);
-DECLARE_INTERRUPT(3);
-DECLARE_INTERRUPT(4);
-DECLARE_INTERRUPT(5);
-DECLARE_INTERRUPT(6);
-DECLARE_INTERRUPT(7);
-DECLARE_INTERRUPT(8);
-DECLARE_INTERRUPT(9);
-DECLARE_INTERRUPT(10);
-DECLARE_INTERRUPT(11);
-DECLARE_INTERRUPT(12);
-DECLARE_INTERRUPT(13);
-DECLARE_INTERRUPT(14);
-DECLARE_INTERRUPT(15);
-
 int interrupt_init(void)
 {
        u8 i;
 
        disable_interrupts();
 
-       /* Setup interrupts */
-       set_vector(0x20, irq_0);
-       set_vector(0x21, irq_1);
-       set_vector(0x23, irq_3);
-       set_vector(0x24, irq_4);
-       set_vector(0x25, irq_5);
-       set_vector(0x26, irq_6);
-       set_vector(0x27, irq_7);
-       set_vector(0x28, irq_8);
-       set_vector(0x29, irq_9);
-       set_vector(0x2a, irq_10);
-       set_vector(0x2b, irq_11);
-       set_vector(0x2c, irq_12);
-       set_vector(0x2d, irq_13);
-       set_vector(0x2e, irq_14);
-       set_vector(0x2f, irq_15);
-
        /* Mask all interrupts */
        outb(0xff, MASTER_PIC + IMR);
        outb(0xff, SLAVE_PIC + IMR);
index c351b23b6334ac5f46b613f8a6a21b304b761b35..1373fd125c81d1f792788ebf8ba837cf4dc9fee1 100644 (file)
@@ -71,7 +71,7 @@ static u16 read_pit(void)
 }
 
 /* this is not very exact */
-void udelay (unsigned long usec)
+void __udelay (unsigned long usec)
 {
        int counter;
        int wraps;
index 6cf273885b838ed55d1c2d02710a722ee4bc0f98..3c3c1fc961f4af854fdb7fc6443a1ff8bb73a4df 100644 (file)
 #define REALMODE_MAILBOX ((char*)0xe00)
 
 
+extern ulong _i386boot_realmode;
+extern ulong _i386boot_realmode_size;
 extern char realmode_enter;
 
 int realmode_setup(void)
 {
+       ulong i386boot_realmode      = (ulong)&_i386boot_realmode;
+       ulong i386boot_realmode_size = (ulong)&_i386boot_realmode_size;
+
        /* copy the realmode switch code */
        if (i386boot_realmode_size > (REALMODE_MAILBOX-REALMODE_BASE)) {
                printf("realmode switch too large (%ld bytes, max is %d)\n",
index 58a0212ad96e1362aad578e80e7c31f9c576795d..5cb1f54fb5628616622a93f659992b5afeb6ae74 100644 (file)
@@ -51,7 +51,7 @@ int register_timer_isr (timer_fnc_t *isr_func)
        if (new_func == NULL)
                return 1;
 
-       new_func->isr_func = isr_func + gd->reloc_off;
+       new_func->isr_func = isr_func;
        new_func->next = NULL;
 
        /*
index 29269f655b9c1248ee9b91b2e5dee1d31e6791bc..7eaea5e7f77deddffede0a00cd5cdc03c4c45e5b 100644 (file)
@@ -47,7 +47,7 @@ static volatile ulong timestamp = 0;
 #endif
 extern void dtimer_intr_setup(void);
 
-void udelay(unsigned long usec)
+void __udelay(unsigned long usec)
 {
        volatile dtmr_t *timerp = (dtmr_t *) (CONFIG_SYS_UDELAY_BASE);
        uint start, now, tmp;
@@ -139,7 +139,7 @@ void set_timer(ulong t)
 
 static unsigned short lastinc;
 
-void udelay(unsigned long usec)
+void __udelay(unsigned long usec)
 {
        volatile pit_t *timerp = (pit_t *) (CONFIG_SYS_UDELAY_BASE);
        uint tmp;
index cbb43414f9cf860b0ad83bb899012e2bbb58d454..da016a0015c0a156fa4895203c4365511b3110f1 100644 (file)
 #include <common.h>
 
 #ifdef CONFIG_SYS_TIMER_0
-void udelay (unsigned long usec)
+void __udelay (unsigned long usec)
 {
        int i;
        i = get_timer (0);
        while ((get_timer (0) - i) < (usec / 1000)) ;
 }
 #else
-void udelay (unsigned long usec)
+void __udelay (unsigned long usec)
 {
        unsigned int i;
        for (i = 0; i < (usec * CONFIG_XILINX_CLOCK_FREQ / 10000000); i++);
index 07e356d235653e031734cb0dc8c34fb4c49911f9..0e6644149b476f6b6e03071815490226721376d2 100644 (file)
@@ -70,7 +70,7 @@ void set_timer(ulong t)
        write_c0_compare(read_c0_count() + CYCLES_PER_JIFFY);
 }
 
-void udelay(unsigned long usec)
+void __udelay(unsigned long usec)
 {
        unsigned int tmo;
 
index 25a233ea785a13d09e2e8d5a82b179d39572f8aa..d5096ee1290561b1ed5179dd60e5d8ef4bab14fd 100644 (file)
 
 extern void dly_clks( unsigned long ticks );
 
-void udelay(unsigned long usec)
+void __udelay(unsigned long usec)
 {
        /* The Nios core doesn't have a timebase, so we do our
         * best for now and call a low-level loop that counts
         * cpu clocks.
         */
        unsigned long cnt = (CONFIG_SYS_CLK_FREQ/1000000) * usec;
-       WATCHDOG_RESET ();      /* trigger watchdog if needed */
        dly_clks (cnt);
 }
index 25a233ea785a13d09e2e8d5a82b179d39572f8aa..d5096ee1290561b1ed5179dd60e5d8ef4bab14fd 100644 (file)
 
 extern void dly_clks( unsigned long ticks );
 
-void udelay(unsigned long usec)
+void __udelay(unsigned long usec)
 {
        /* The Nios core doesn't have a timebase, so we do our
         * best for now and call a low-level loop that counts
         * cpu clocks.
         */
        unsigned long cnt = (CONFIG_SYS_CLK_FREQ/1000000) * usec;
-       WATCHDOG_RESET ();      /* trigger watchdog if needed */
        dly_clks (cnt);
 }
index 173ffab3e8b371b457ee7d6f24f91a208851dd71..29099612db4f4d46d243eed2546a98d997c6597f 100644 (file)
 
 #include <common.h>
 
-#ifndef CONFIG_WD_PERIOD
-# define CONFIG_WD_PERIOD      (10 * 1000 * 1000)      /* 10 seconds default*/
-#endif
-
 /* ------------------------------------------------------------------------- */
 
 /*
@@ -54,16 +50,10 @@ unsigned long usec2ticks(unsigned long usec)
  * microseconds to wait) into a number of time base ticks; then we
  * watch the time base until it has incremented by that amount.
  */
-void udelay(unsigned long usec)
+void __udelay(unsigned long usec)
 {
-       ulong ticks, kv;
-
-       do {
-               kv = usec > CONFIG_WD_PERIOD ? CONFIG_WD_PERIOD : usec;
-               ticks = usec2ticks (kv);
-               wait_ticks (ticks);
-               usec -= kv;
-       } while(usec);
+       ulong ticks = usec2ticks (usec);
+       wait_ticks (ticks);
 }
 
 /* ------------------------------------------------------------------------- */
index 52dbcd06116860843a00cdfaf6770f72573be0cc..9a8f89aef60cf9cf183ec6367d91c7efd555afd1 100644 (file)
@@ -105,7 +105,7 @@ unsigned long long get_ticks (void)
        return 0 - readl(TCNT0);
 }
 
-void udelay (unsigned long usec)
+void __udelay (unsigned long usec)
 {
        unsigned long long tmp;
        ulong tmo;
index 5c6c9d4384f4fa0ad21fc7dd7410ba8b7aa515a6..789b46f0e0261273cfb2545f34bfc3254a7be29c 100644 (file)
@@ -103,7 +103,7 @@ void reset_timer(void)
        cmt_timer_start(0);
 }
 
-void udelay(unsigned long usec)
+void __udelay(unsigned long usec)
 {
        unsigned long end = get_usec() + usec;
 
index 433f3eb5a0dd3fe95384e0d444cc020951bdb6e9..82b2a3abce5bd494808ece127ff944dd6a796fbd 100644 (file)
@@ -53,7 +53,7 @@ unsigned long usec2ticks(unsigned long usec)
  * microseconds to wait) into a number of time base ticks; then we
  * watch the time base until it has incremented by that amount.
  */
-void udelay(unsigned long usec)
+void __udelay(unsigned long usec)
 {
        ulong ticks = usec2ticks(usec);
 
index 10755107900cf190e664596be862d196cd0a4f30..27d9f2bac7ca500f51a771000030d42081c8be3b 100755 (executable)
--- a/mkconfig
+++ b/mkconfig
@@ -79,6 +79,13 @@ echo "BOARD  = $4" >> config.mk
 
 [ "$6" ] && [ "$6" != "NULL" ] && echo "SOC    = $6" >> config.mk
 
+# Assign board directory to BOARDIR variable
+if [ -z "$5" -o "$5" = "NULL" ] ; then
+    BOARDDIR=$4
+else
+    BOARDDIR=$5/$4
+fi
+
 #
 # Create board specific header file
 #
@@ -94,6 +101,8 @@ for i in ${TARGETS} ; do
        echo "#define CONFIG_MK_${i} 1" >>config.h ;
 done
 
+echo "#define CONFIG_BOARDDIR board/$BOARDDIR" >>config.h
+
 echo "#include <configs/$1.h>" >>config.h
 echo "#include <asm/config.h>" >>config.h
 
index b74e7623169d562c3e69ece9c99790ff7302df7f..b29eb87fc2113701ca8c92618b62bdf568ee8e24 100644 (file)
@@ -58,6 +58,22 @@ int post_init_f (void)
        return res;
 }
 
+/*
+ * Supply a default implementation for post_hotkeys_pressed() for boards
+ * without hotkey support. We always return 0 here, so that the
+ * long-running tests won't be started.
+ *
+ * Boards with hotkey support can override this weak default function
+ * by defining one in their board specific code.
+ */
+int __post_hotkeys_pressed(void)
+{
+       return 0;       /* No hotkeys supported */
+}
+int post_hotkeys_pressed(void)
+       __attribute__((weak, alias("__post_hotkeys_pressed")));
+
+
 void post_bootmode_init (void)
 {
        int bootmode = post_bootmode_get (0);
index 6f999dd0b0dcbc3e21d1f6a5649e288beaa4542a..c1670acfb7ad2d240d0cb16657f4ead22ebd443f 100644 (file)
--- a/rules.mk
+++ b/rules.mk
 
 _depend:       $(obj).depend
 
-$(obj).depend: $(src)Makefile $(TOPDIR)/config.mk $(SRCS)
+$(obj).depend: $(src)Makefile $(TOPDIR)/config.mk $(SRCS) $(HOSTSRCS)
                @rm -f $@
                @for f in $(SRCS); do \
                        g=`basename $$f | sed -e 's/\(.*\)\.\w/\1.o/'`; \
-                       $(CC) -M $(HOSTCFLAGS) $(CPPFLAGS) -MQ $(obj)$$g $$f >> $@ ; \
+                       $(CC) -M $(CPPFLAGS) -MQ $(obj)$$g $$f >> $@ ; \
                done
+               @for f in $(HOSTSRCS); do \
+                       g=`basename $$f | sed -e 's/\(.*\)\.\w/\1.o/'`; \
+                       $(HOSTCC) -M $(HOSTCPPFLAGS) -MQ $(obj)$$g $$f >> $@ ; \
+               done
+
+$(HOSTOBJS): $(obj)%.o: %.c
+       $(HOSTCC) $(HOSTCFLAGS) $(HOSTCFLAGS_$(@F)) $(HOSTCFLAGS_$(BCURDIR)) -o $@ $< -c
+$(NOPEDOBJS): $(obj)%.o: %.c
+       $(HOSTCC) $(HOSTCFLAGS_NOPED) $(HOSTCFLAGS_$(@F)) $(HOSTCFLAGS_$(BCURDIR)) -o $@ $< -c
 
 #########################################################################
index b04e3f3044156b1a958be1922d8e20bc4132030f..5b8c3c371bd15175519a587b4e3d908403a563c3 100644 (file)
 
 TOOLSUBDIRS =
 
-#
-# Mac OS X / Darwin's C preprocessor is Apple specific.  It
-# generates numerous errors and warnings.  We want to bypass it
-# and use GNU C's cpp.  To do this we pass the -traditional-cpp
-# option to the compiler.  Note that the -traditional-cpp flag
-# DOES NOT have the same semantics as GNU C's flag, all it does
-# is invoke the GNU preprocessor in stock ANSI/ISO C fashion.
-#
-# Apple's linker is similar, thanks to the new 2 stage linking
-# multiple symbol definitions are treated as errors, hence the
-# -multiply_defined suppress option to turn off this error.
-#
-
-HOSTCFLAGS = -Wall
-HOST_LDFLAGS =
-
-ifeq ($(HOSTOS)-$(HOSTARCH),darwin-ppc)
-HOSTCFLAGS += -traditional-cpp
-HOST_LDFLAGS += -multiply_defined suppress
-else
-HOSTCFLAGS += -pedantic
-endif
-
-ifeq ($(HOSTOS),cygwin)
-HOSTCFLAGS += -ansi
-endif
-
 #
 # toolchains targeting win32 generate .exe files
 #
@@ -93,16 +66,16 @@ EXT_OBJ_FILES-y += lib_generic/sha1.o
 # Source files located in the tools directory
 OBJ_FILES-$(CONFIG_LCD_LOGO) += bmp_logo.o
 OBJ_FILES-$(CONFIG_VIDEO_LOGO) += bmp_logo.o
-OBJ_FILES-y += default_image.o
-OBJ_FILES-$(CONFIG_ENV_IS_EMBEDDED) += envcrc.o
-OBJ_FILES-y += fit_image.o
+NOPED_OBJ_FILES-y += default_image.o
+OBJ_FILES-y += envcrc.o
+NOPED_OBJ_FILES-y += fit_image.o
 OBJ_FILES-$(CONFIG_CMD_NET) += gen_eth_addr.o
 OBJ_FILES-$(CONFIG_CMD_LOADS) += img2srec.o
 OBJ_FILES-$(CONFIG_INCA_IP) += inca-swap-bytes.o
-OBJ_FILES-y += kwbimage.o
-OBJ_FILES-y += mkimage.o
+NOPED_OBJ_FILES-y += kwbimage.o
+NOPED_OBJ_FILES-y += mkimage.o
 OBJ_FILES-$(CONFIG_NETCONSOLE) += ncb.o
-OBJ_FILES-y += os_support.o
+NOPED_OBJ_FILES-y += os_support.o
 OBJ_FILES-$(CONFIG_SHA1_CHECK_UB_IMG) += ubsha1.o
 
 # Don't build by default
@@ -134,57 +107,52 @@ LOGO_BMP= logos/ronetix.bmp
 endif
 
 # now $(obj) is defined
-SRCS   += $(addprefix $(SRCTREE)/,$(EXT_OBJ_FILES-y:.o=.c))
-SRCS   += $(addprefix $(SRCTREE)/tools/,$(OBJ_FILES-y:.o=.c))
-SRCS   += $(addprefix $(SRCTREE)/libfdt/,$(LIBFDT_OBJ_FILES-y:.o=.c))
+HOSTSRCS += $(addprefix $(SRCTREE)/,$(EXT_OBJ_FILES-y:.o=.c))
+HOSTSRCS += $(addprefix $(SRCTREE)/tools/,$(OBJ_FILES-y:.o=.c))
+HOSTSRCS += $(addprefix $(SRCTREE)/libfdt/,$(LIBFDT_OBJ_FILES-y:.o=.c))
 BINS   := $(addprefix $(obj),$(sort $(BIN_FILES-y)))
 LIBFDT_OBJS    := $(addprefix $(obj),$(LIBFDT_OBJ_FILES-y))
 
+HOSTOBJS := $(addprefix $(obj),$(OBJ_FILES-y))
+NOPEDOBJS := $(addprefix $(obj),$(NOPED_OBJ_FILES-y))
+
 #
 # Use native tools and options
 # Define __KERNEL_STRICT_NAMES to prevent typedef overlaps
 #
-CPPFLAGS   = -idirafter $(SRCTREE)/include \
+HOSTCPPFLAGS = -idirafter $(SRCTREE)/include \
                -idirafter $(OBJTREE)/include2 \
                -idirafter $(OBJTREE)/include \
                -I $(SRCTREE)/libfdt \
                -I $(SRCTREE)/tools \
                -DTEXT_BASE=$(TEXT_BASE) -DUSE_HOSTCC \
                -D__KERNEL_STRICT_NAMES
-CFLAGS     = $(HOSTCFLAGS) $(CPPFLAGS) -O
-
-# No -pedantic switch to avoid libfdt compilation warnings
-FIT_CFLAGS = -Wall $(CPPFLAGS) -O
 
-AFLAGS    = -D__ASSEMBLY__ $(CPPFLAGS)
-CC        = $(HOSTCC)
-STRIP     = $(HOSTSTRIP)
-MAKEDEPEND = makedepend
 
 all:   $(obj).depend $(BINS) $(LOGO-y) subdirs
 
 $(obj)bin2header$(SFX): $(obj)bin2header.o
-       $(CC) $(CFLAGS) $(HOST_LDFLAGS) -o $@ $^
-       $(STRIP) $@
+       $(HOSTCC) $(HOSTCFLAGS) $(HOSTLDFLAGS) -o $@ $^
+       $(HOSTSTRIP) $@
 
 $(obj)bmp_logo$(SFX):  $(obj)bmp_logo.o
-       $(CC) $(CFLAGS) $(HOST_LDFLAGS) -o $@ $^
-       $(STRIP) $@
+       $(HOSTCC) $(HOSTCFLAGS) $(HOSTLDFLAGS) -o $@ $^
+       $(HOSTSTRIP) $@
 
 $(obj)envcrc$(SFX):    $(obj)crc32.o $(obj)env_embedded.o $(obj)envcrc.o $(obj)sha1.o
-       $(CC) $(CFLAGS) -o $@ $^
+       $(HOSTCC) $(HOSTCFLAGS) $(HOSTLDFLAGS) -o $@ $^
 
 $(obj)gen_eth_addr$(SFX):      $(obj)gen_eth_addr.o
-       $(CC) $(CFLAGS) $(HOST_LDFLAGS) -o $@ $^
-       $(STRIP) $@
+       $(HOSTCC) $(HOSTCFLAGS) $(HOSTLDFLAGS) -o $@ $^
+       $(HOSTSTRIP) $@
 
 $(obj)img2srec$(SFX):  $(obj)img2srec.o
-       $(CC) $(CFLAGS) $(HOST_LDFLAGS) -o $@ $^
-       $(STRIP) $@
+       $(HOSTCC) $(HOSTCFLAGS) $(HOSTLDFLAGS) -o $@ $^
+       $(HOSTSTRIP) $@
 
 $(obj)inca-swap-bytes$(SFX):   $(obj)inca-swap-bytes.o
-       $(CC) $(CFLAGS) $(HOST_LDFLAGS) -o $@ $^
-       $(STRIP) $@
+       $(HOSTCC) $(HOSTCFLAGS) $(HOSTLDFLAGS) -o $@ $^
+       $(HOSTSTRIP) $@
 
 $(obj)mkimage$(SFX):   $(obj)crc32.o \
                        $(obj)default_image.o \
@@ -196,48 +164,29 @@ $(obj)mkimage$(SFX):      $(obj)crc32.o \
                        $(obj)os_support.o \
                        $(obj)sha1.o \
                        $(LIBFDT_OBJS)
-       $(CC) $(CFLAGS) $(HOST_LDFLAGS) -o $@ $^
-       $(STRIP) $@
+       $(HOSTCC) $(HOSTCFLAGS) $(HOSTLDFLAGS) -o $@ $^
+       $(HOSTSTRIP) $@
 
 $(obj)mpc86x_clk$(SFX):        $(obj)mpc86x_clk.o
-       $(CC) $(CFLAGS) $(HOST_LDFLAGS) -o $@ $^
-       $(STRIP) $@
+       $(HOSTCC) $(HOSTCFLAGS) $(HOSTLDFLAGS) -o $@ $^
+       $(HOSTSTRIP) $@
 
 $(obj)ncb$(SFX):       $(obj)ncb.o
-       $(CC) $(CFLAGS) $(HOST_LDFLAGS) -o $@ $^
-       $(STRIP) $@
+       $(HOSTCC) $(HOSTCFLAGS) $(HOSTLDFLAGS) -o $@ $^
+       $(HOSTSTRIP) $@
 
 $(obj)ubsha1$(SFX):    $(obj)os_support.o $(obj)sha1.o $(obj)ubsha1.o
-       $(CC) $(CFLAGS) -o $@ $^
-
-# Some files complain if compiled with -pedantic, use FIT_CFLAGS
-$(obj)default_image.o: $(SRCTREE)/tools/default_image.c
-       $(CC) -g $(FIT_CFLAGS) -c -o $@ $<
-
-$(obj)fit_image.o: $(SRCTREE)/tools/fit_image.c
-       $(CC) -g $(FIT_CFLAGS) -c -o $@ $<
-
-$(obj)image.o: $(SRCTREE)/common/image.c
-       $(CC) -g $(FIT_CFLAGS) -c -o $@ $<
-
-$(obj)kwbimage.o: $(SRCTREE)/tools/kwbimage.c
-       $(CC) -g $(FIT_CFLAGS) -c -o $@ $<
-
-$(obj)mkimage.o: $(SRCTREE)/tools/mkimage.c
-       $(CC) -g $(FIT_CFLAGS) -c -o $@ $<
-
-$(obj)os_support.o: $(SRCTREE)/tools/os_support.c
-       $(CC) -g $(FIT_CFLAGS) -c -o $@ $<
+       $(HOSTCC) $(HOSTCFLAGS) $(HOSTLDFLAGS) -o $@ $^
 
 # Some of the tool objects need to be accessed from outside the tools directory
 $(obj)%.o: $(SRCTREE)/common/%.c
-       $(CC) -g $(FIT_CFLAGS) -c -o $@ $<
+       $(HOSTCC) -g $(HOSTCFLAGS_NOPED) -c -o $@ $<
 
 $(obj)%.o: $(SRCTREE)/lib_generic/%.c
-       $(CC) -g $(CFLAGS) -c -o $@ $<
+       $(HOSTCC) -g $(HOSTCFLAGS) -c -o $@ $<
 
 $(LIBFDT_OBJS):
-       $(CC) -g $(FIT_CFLAGS) -c -o $@ $<
+       $(HOSTCC) -g $(HOSTCFLAGS_NOPED) -c -o $@ $<
 
 subdirs:
 ifeq ($(TOOLSUBDIRS),)
@@ -247,8 +196,6 @@ else
            $(MAKE) \
                HOSTOS=$(HOSTOS) \
                HOSTARCH=$(HOSTARCH) \
-               HOSTCFLAGS="$(HOSTCFLAGS)" \
-               HOST_LDFLAGS="$(HOST_LDFLAGS)" \
                -C $$dir || exit 1 ; \
        done
 endif
index 566b12506bfa4cfa19960146c518364809b5e3aa..d8e28b0e12adae3978dd8d5959d3b98b8da5350d 100644 (file)
@@ -1,8 +1,11 @@
-CFLAGS += -Wall
+include $(TOPDIR)/config.mk
 
-all: easylogo
+all: $(obj)easylogo
+
+$(obj)easylogo: $(SRCTREE)/tools/easylogo/easylogo.c
+       $(HOSTCC) $(HOSTCFLAGS_NOPED) $(HOSTLDFLAGS) -o $@ $^
 
 clean:
-       rm -f easylogo *.o
+       rm -f $(obj)easylogo
 
 .PHONY: all clean
index 0a5687de779bafc43de0619f68aeb107d415acbd..90037c7883b5dddc7757e6f55669e9fa464bb7e4 100644 (file)
@@ -30,17 +30,14 @@ BINS        = gdbsend gdbcont
 
 COBJS  = gdbsend.o gdbcont.o error.o remote.o serial.o
 
-OBJS   := $(addprefix $(obj),$(COBJS))
-SRCS   := $(COBJS:.o=.c)
+HOSTOBJS := $(addprefix $(obj),$(COBJS))
+HOSTSRCS := $(COBJS:.o=.c)
 BINS   := $(addprefix $(obj),$(BINS))
 
 #
 # Use native tools and options
 #
-CPPFLAGS   = -I$(BFD_ROOT_DIR)/include
-CFLAGS     = $(HOSTCFLAGS) -O $(CPPFLAGS)
-CC        = $(HOSTCC)
-MAKEDEPEND = makedepend
+HOSTCPPFLAGS = -I$(BFD_ROOT_DIR)/include
 
 HOSTOS := $(shell uname -s | sed -e 's/\([Cc][Yy][Gg][Ww][Ii][Nn]\).*/cygwin/')
 
@@ -54,13 +51,13 @@ else        # ! CYGWIN
 all:   $(obj).depend $(BINS)
 
 $(obj)gdbsend: $(obj)gdbsend.o $(obj)error.o $(obj)remote.o $(obj)serial.o
-               $(CC) $(CFLAGS) $(HOST_LDFLAGS) -o $@ $^
+               $(HOSTCC) $(HOSTCFLAGS) $(HOSTLDFLAGS) -o $@ $^
 
 $(obj)gdbcont: $(obj)gdbcont.o $(obj)error.o $(obj)remote.o $(obj)serial.o
-               $(CC) $(CFLAGS) $(HOST_LDFLAGS) -o $@ $^
+               $(HOSTCC) $(HOSTCFLAGS) $(HOSTLDFLAGS) -o $@ $^
 
 clean:
-       rm -f $(OBJS)
+       rm -f $(HOSTOBJS)
 
 distclean:     clean
        rm -f $(BINS) $(obj)core $(obj)*.bak $(obj).depend
index 59b928cb1ffcf5348a00c7c02f6e2e72212e4582..9b2afb07624252240a84414d5277b4ac422b14e0 100644 (file)
@@ -19,8 +19,6 @@
 
 include $(TOPDIR)/config.mk
 
-HOSTCFLAGS = -Wall -pedantic
-
 # Generated executable files
 BIN_FILES-y += imls
 
@@ -48,50 +46,43 @@ BINS        := $(addprefix $(obj),$(sort $(BIN_FILES-y)))
 LIBFDT_OBJS    := $(addprefix $(obj),$(LIBFDT_OBJ_FILES-y))
 
 #
-# Use native tools and options
+# Compile for a hosted environment on the target
 # Define __KERNEL_STRICT_NAMES to prevent typedef overlaps
 #
-CPPFLAGS   = -idirafter $(SRCTREE)/include \
+HOSTCPPFLAGS  = -idirafter $(SRCTREE)/include \
                -idirafter $(OBJTREE)/include2 \
                -idirafter $(OBJTREE)/include \
                -I $(SRCTREE)/libfdt \
                -I $(SRCTREE)/tools \
                -DUSE_HOSTCC -D__KERNEL_STRICT_NAMES
-CFLAGS     = $(HOSTCFLAGS) $(CPPFLAGS) -O
-
-# No -pedantic switch to avoid libfdt compilation warnings
-FIT_CFLAGS = -Wall $(CPPFLAGS) -O
-
-CC        = $(CROSS_COMPILER)gcc
-STRIP     = $(CROSS_COMPILER)strip
 
 ifeq ($(MTD_VERSION),old)
-CPPFLAGS += -DMTD_OLD
+HOSTCPPFLAGS += -DMTD_OLD
 endif
 
 all:   $(BINS)
 
 $(obj)imls:    $(obj)imls.o $(obj)crc32.o $(obj)image.o $(obj)md5.o \
                $(obj)sha1.o $(LIBFDT_OBJS)
-       $(CC) $(CFLAGS) -o $@ $^
+       $(CC) $(HOSTCFLAGS) $(HOSTLDFLAGS) -o $@ $^
        $(STRIP) $@
 
 # Some files complain if compiled with -pedantic, use FIT_CFLAGS
 $(obj)image.o: $(SRCTREE)/common/image.c
-       $(CC) -g $(FIT_CFLAGS) -c -o $@ $<
+       $(CC) -g $(HOSTCFLAGS_NOPED) -c -o $@ $<
 
-$(obj)imls.o: imls.c
-       $(CC) -g $(FIT_CFLAGS) -c -o $@ $<
+$(obj)imls.o: $(SRCTREE)/tools/imls/imls.c
+       $(CC) -g $(HOSTCFLAGS_NOPED) -c -o $@ $<
 
 # Some of the tool objects need to be accessed from outside the tools/imls directory
 $(obj)%.o: $(SRCTREE)/common/%.c
-       $(CC) -g $(FIT_CFLAGS) -c -o $@ $<
+       $(CC) -g $(HOSTCFLAGS_NOPED) -c -o $@ $<
 
 $(obj)%.o: $(SRCTREE)/lib_generic/%.c
-       $(CC) -g $(CFLAGS) -c -o $@ $<
+       $(CC) -g $(HOSTCFLAGS) -c -o $@ $<
 
 $(obj)%.o: $(SRCTREE)/libfdt/%.c
-       $(CC) -g $(FIT_CFLAGS) -c -o $@ $<
+       $(CC) -g $(HOSTCFLAGS_NOPED) -c -o $@ $<
 
 clean:
        rm -rf *.o imls